@nebula.js/stardust 6.0.0-alpha.4 → 6.0.0-alpha.5
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/core/esm/dev.js +3 -3
- package/core/esm/index.js +2 -2
- package/dist/stardust.dev.js +3 -3
- package/dist/stardust.js +2 -2
- package/package.json +9 -9
package/dist/stardust.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v6.0.0-alpha.
|
|
2
|
+
* @nebula.js/stardust v6.0.0-alpha.5
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
animation: ${gl} 1.4s linear infinite;
|
|
121
121
|
`:null,vl="string"!=typeof bl?tr`
|
|
122
122
|
animation: ${bl} 1.4s ease-in-out infinite;
|
|
123
|
-
`:null,Sl=bs("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:yl||{animation:`${gl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),wl=bs("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),xl=bs("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ur(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ls((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:vl||{animation:`${bl} 1.4s ease-in-out infinite`}}]})))),kl=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate",...d}=n,p={...n,color:o,disableShrink:i,size:a,thickness:l,value:c,variant:u},f=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Hi({root:["root",n,`color${Ur(r)}`],svg:["svg"],circle:["circle",`circle${Ur(n)}`,o&&"circleDisableShrink"]},hl,t)})(p),h={},m={},g={};if("determinate"===u){const e=2*Math.PI*((ml-l)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return xr.jsx(Sl,{className:Xo(f.root,r),style:{width:a,height:a,...m,...s},ownerState:p,ref:t,role:"progressbar",...g,...d,children:xr.jsx(wl,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:xr.jsx(xl,{className:f.circle,style:h,ownerState:p,cx:ml,cy:ml,r:(ml-l)/2,fill:"none",strokeWidth:l})})})}));function Cl(e){return Yo("MuiButton",e)}const El=ei("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Rl=S.createContext({}),Ll=S.createContext(void 0),Pl=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Tl=bs(dl,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ur(n.color)}`],t[`size${Ur(n.size)}`],t[`${n.variant}Size${Ur(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ls((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${El.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${El.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${El.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${El.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:yi(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${El.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${El.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${El.loading}`]:{color:"transparent"}}}]}}))),Il=bs("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Ur(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Pl]}))),Ol=bs("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Ur(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Pl]}))),_l=bs("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),Ml=bs("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),ql=S.forwardRef((function(e,t){const n=S.useContext(Rl),r=S.useContext(Ll),o=Ps({props:ui(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,id:m,loading:g=null,loadingIndicator:b,loadingPosition:y="center",size:v="medium",startIcon:w,type:x,variant:k="text",...C}=o,E=_i(m),R=b??xr.jsx(kl,{"aria-labelledby":E,color:"inherit",size:16}),L={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:R,loadingPosition:y,size:v,type:x,variant:k},P=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Hi({root:["root",a&&"loading",i,`${i}${Ur(t)}`,`size${Ur(o)}`,`${i}Size${Ur(o)}`,`color${Ur(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Ur(s)}`],startIcon:["icon","startIcon",`iconSize${Ur(o)}`],endIcon:["icon","endIcon",`iconSize${Ur(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Cl,l);return{...l,...c}})(L),T=(w||g&&"start"===y)&&xr.jsx(Il,{className:P.startIcon,ownerState:L,children:w||xr.jsx(Ml,{className:P.loadingIconPlaceholder,ownerState:L})}),I=(p||g&&"end"===y)&&xr.jsx(Ol,{className:P.endIcon,ownerState:L,children:p||xr.jsx(Ml,{className:P.loadingIconPlaceholder,ownerState:L})}),O=r||"",_="boolean"==typeof g?xr.jsx("span",{className:P.loadingWrapper,style:{display:"contents"},children:g&&xr.jsx(_l,{className:P.loadingIndicator,ownerState:L,children:R})}):null;return xr.jsxs(Tl,{ownerState:L,className:Xo(n.className,P.root,l,O),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Xo(P.focusVisible,f),ref:t,type:x,id:g?E:m,...C,classes:P,children:[T,"end"!==y&&_,i,"end"===y&&_,I]})}));var Dl={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"]};const Nl={green:"#00873D",blue:"#3F8AB3",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},Al={mode:"light",palette:{primary:{main:Nl.grey25,contrastText:Nl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Nl.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:Nl.grey100,dark:Nl.grey0},action:{active:"#545454",hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:Nl.grey100,default:Nl.grey100,lightest:Nl.grey100,lighter:Nl.grey98,darker:Nl.grey95,darkest:Nl.grey90},custom:{focusBorder:Nl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:Nl.grey45,disabledContrastText:Nl.grey100},selected:{main:Nl.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:Nl.grey100,selectedContrastText:Nl.grey100,mainContrastText:Nl.grey100,alternativeContrastText:Nl.grey25,excludedContrastText:Nl.grey25,selectedExcludedContrastText:Nl.grey100,possibleContrastText:Nl.grey0},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},zl={mode:"dark",palette:{primary:{main:Nl.grey20,contrastText:Nl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Nl.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:Nl.grey100,dark:Nl.grey0},action:{active:Nl.grey100,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Nl.grey25,lighter:Nl.grey20,darker:Nl.grey15,darkest:Nl.grey10},custom:{focusBorder:Nl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:Nl.grey45,disabledContrastText:Nl.grey100},selected:{main:Nl.green,alternative:Nl.grey20,excluded:Nl.grey10,selectedExcluded:Nl.grey10,possible:Nl.grey80,selectedContrastText:Nl.grey100,mainContrastText:Nl.grey100,alternativeContrastText:Nl.grey100,excludedContrastText:Nl.grey100,selectedExcludedContrastText:Nl.grey100,possibleContrastText:Nl.grey0},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},jl={},Fl=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}}},MuiButton:{styleOverrides:{outlined:{padding:"3px 11px",["&.".concat(El.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(El.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(El.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(El.disabled)]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function $l(e){let t=Al,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=zl));const r=JSON.stringify(t);if(jl[r])return jl[r];const o={palette:u(u({type:t.mode},Dl.palette),t.palette),typography:u({},Dl.typography),shadows:Dl.shadows,shape:u({},Dl.shape)},i=u(u({},o),{},{components:Fl(o)});return jl[r]=fs(i),jl[r].name=n,jl[r]}Jo.configure((e=>"njs-".concat("4cbe","-").concat(e.replace("Mui",""))));var Bl=w.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Wl={active:!0,select:!0,passive:!0,edit:!1};function Hl(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach((e=>{r[e]=!t[e]})),r}(e);Object.keys(Wl).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Wl[e],n[e]=!Wl[e])})),e.constraints=n,e.interactions=t}var Ul=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],r={},o={get:e=>t[e],set:(n,o)=>{if(void 0===n||"object"==typeof n)throw new Error("Invalid key: ".concat(JSON.stringify(n)));return t[n]=o,r[n]=e({type:"SET",value:o}),o},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));t[e]=null},dispatch:e=>{n.forEach((n=>n(e?{}:t)))},destroy:()=>{Object.keys(r).forEach((e=>{r[e]&&r[e]()}))}};return[()=>{const[,e]=S.useState(t);return S.useEffect((()=>(n.push(e),()=>{const t=n.indexOf(e);n.splice(t,1)})),[e]),[o]},o]};const Vl=S.forwardRef(((e,t)=>{let{initialContext:n,renderCallback:r,modelStore:o,selectionStore:i}=e;const[a,s]=S.useState(n),[l,c]=S.useState(),{theme:u}=S.useMemo((()=>({theme:$l(l)})),[l]),[d,p]=S.useState([]);return S.useEffect((()=>{r&&r()}),[]),S.useImperativeHandle(t,(()=>({setComps(e){p([...e])},setMuiThemeName:c,setContext:e=>s((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t))})),[]),a&&(a.modelStore=o,a.selectionStore=i),w.createElement(Rr,{injectFirst:!0},w.createElement(Es,{theme:u},w.createElement(Bl.Provider,{value:a},d)))}));function Gl(e){let t,{app:n,context:r}=e,o=!1;const i=new Promise((e=>{t=e})),a=w.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","6.0.0-alpha.4"),s.setAttribute("data-app-id",n.id),document.body.appendChild(s),r&&Hl(r);const l=function(e){const[t,n]=Ul({}),[r,o]=Ul({}),[i,a]=Ul({}),[s,l]=Ul({}),[c,u]=Ul({}),[,d]=Ul({}),p=e=>{let{type:t,value:r}=e;const i=d.get(r.id);d.set(r.id,{});const s=()=>{o.clear(r.id),u.set(r.id,{}),u.dispatch(!0)},c=()=>{r.removeListener("closed",c),r.removeListener("changed",s),n.clear(r.id),o.clear(r.id),a.clear(r.id),l.clear(r.id),u.clear(r.id),d.clear(r.id)};return"SET"===t&&(i||(r.on("changed",s),r.once("closed",c))),c},[f,h]=Ul({},p);return{subscribe:e=>{const t=p({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:f,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(n.id),c=function(e){const[t,n]=Ul({}),[r,o]=Ul({}),[i,a]=Ul({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(n.id),u=it.createRoot(s);u.render(w.createElement(Vl,{ref:a,initialContext:r,renderCallback:t,modelStore:l,selectionStore:c}));const d={},p=[],f=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach((t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)}))},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async()=>{await i,f.push(e),p.push(t),a.current.setComps(f)})(),remove(e){o||(async t=>{await i;const n=f.indexOf(e);var r;-1!==n&&(null===(r=p[n])||void 0===r||r.call(p),f.splice(n,1),p.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(f)})()},setMuiThemeName(e){(async()=>{await i,a.current.setMuiThemeName(e)})()},context(e){(async()=>{await i,e&&Hl(e),a.current.setContext(e)})()},destroy(){o=!0,p.forEach((e=>{e&&e()})),l.destroy(),u.unmount(),document.body.removeChild(s)}},l,c,a,i]}const Kl=e=>e.scrollTop;function Jl(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}function Zl(e){return Yo("MuiPaper",e)}ei("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Xl=bs("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(Ls((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),Ql=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiPaper"}),r=ms(),{className:o,component:i="div",elevation:a=1,square:s=!1,variant:l="elevation",...c}=n,u={...n,component:i,elevation:a,square:s,variant:l},d=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Hi({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Zl,o)})(u);return xr.jsx(Xl,{as:i,ownerState:u,className:Xo(d.root,o),ref:t,...c,style:{..."elevation"===l&&{"--Paper-shadow":(r.vars||r).shadows[a],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[a]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${yi("#fff",Ya(a))}, ${yi("#fff",Ya(a))})`}},...c.style}})}));function Yl(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,f=u[e]||r,h=Ji(d[e],o),{props:{component:m,...g},internalRef:b}=Ki({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),y=Di(b,h?.ref,t.ref),v="root"===e?m||c:m;return[f,Ui(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:y},o)]}function ec(e){return Yo("MuiIconButton",e)}const tc=ei("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),nc=bs(dl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Ur(n.color)}`],n.edge&&t[`edge${Ur(n.edge)}`],t[`size${Ur(n.size)}`]]}})(Ls((({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}))),Ls((({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}}))),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${tc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${tc.loading}`]:{color:"transparent"}})))),rc=bs("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}))),oc=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:p,...f}=n,h=_i(u),m=p??xr.jsx(kl,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:c},b=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Hi({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Ur(r)}`,o&&`edge${Ur(o)}`,`size${Ur(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},ec,t)})(g);return xr.jsxs(nc,{id:d?h:u,className:Xo(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&xr.jsx("span",{className:b.loadingWrapper,style:{display:"contents"},children:xr.jsx(rc,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})}));function ic(e){return Yo("MuiTypography",e)}ei("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ac={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sc=Go,lc=bs("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${Ur(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ls((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${Ur(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),cc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},uc=S.forwardRef((function(e,t){const{color:n,...r}=Ps({props:e,name:"MuiTypography"}),o=sc({...r,...!ac[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=cc,...f}=o,h={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p},m=s||(u?"p":p[d]||cc[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Hi({root:["root",i,"inherit"!==e.align&&`align${Ur(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},ic,a)})(h);return xr.jsx(lc,{as:m,ref:t,className:Xo(g.root,a),...f,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})}));var dc="top",pc="bottom",fc="right",hc="left",mc="auto",gc=[dc,pc,fc,hc],bc="start",yc="end",vc="clippingParents",Sc="viewport",wc="popper",xc="reference",kc=gc.reduce((function(e,t){return e.concat([t+"-"+bc,t+"-"+yc])}),[]),Cc=[].concat(gc,[mc]).reduce((function(e,t){return e.concat([t,t+"-"+bc,t+"-"+yc])}),[]),Ec=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Rc(e){return e?(e.nodeName||"").toLowerCase():null}function Lc(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pc(e){return e instanceof Lc(e).Element||e instanceof Element}function Tc(e){return e instanceof Lc(e).HTMLElement||e instanceof HTMLElement}function Ic(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Lc(e).ShadowRoot||e instanceof ShadowRoot)}var Oc={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Tc(o)&&Rc(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Tc(r)&&Rc(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function _c(e){return e.split("-")[0]}var Mc=Math.max,qc=Math.min,Dc=Math.round;function Nc(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Ac(){return!/^((?!chrome|android).)*safari/i.test(Nc())}function zc(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Tc(e)&&(o=e.offsetWidth>0&&Dc(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Dc(r.height)/e.offsetHeight||1);var a=(Pc(e)?Lc(e):window).visualViewport,s=!Ac()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function jc(e){var t=zc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ic(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $c(e){return Lc(e).getComputedStyle(e)}function Bc(e){return["table","td","th"].indexOf(Rc(e))>=0}function Wc(e){return((Pc(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hc(e){return"html"===Rc(e)?e:e.assignedSlot||e.parentNode||(Ic(e)?e.host:null)||Wc(e)}function Uc(e){return Tc(e)&&"fixed"!==$c(e).position?e.offsetParent:null}function Vc(e){for(var t=Lc(e),n=Uc(e);n&&Bc(n)&&"static"===$c(n).position;)n=Uc(n);return n&&("html"===Rc(n)||"body"===Rc(n)&&"static"===$c(n).position)?t:n||function(e){var t=/firefox/i.test(Nc());if(/Trident/i.test(Nc())&&Tc(e)&&"fixed"===$c(e).position)return null;var n=Hc(e);for(Ic(n)&&(n=n.host);Tc(n)&&["html","body"].indexOf(Rc(n))<0;){var r=$c(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Gc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Kc(e,t,n){return Mc(e,qc(t,n))}function Jc(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Zc(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Xc={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_c(n.placement),l=Gc(s),c=[hc,fc].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Jc("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Zc(e,gc))}(o.padding,n),d=jc(i),p="y"===l?dc:hc,f="y"===l?pc:fc,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=Vc(i),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,v=u[p],S=b-d[c]-u[f],w=b/2-d[c]/2+y,x=Kc(v,w,S),k=l;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Fc(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qc(e){return e.split("-")[1]}var Yc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eu(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=hc,S=dc,w=window;if(c){var x=Vc(n),k="clientHeight",C="clientWidth";if(x===Lc(n)&&"static"!==$c(x=Wc(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),o===dc||(o===hc||o===fc)&&i===yc)S=pc,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,m*=l?1:-1;if(o===hc||(o===dc||o===pc)&&i===yc)v=fc,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-r.width,f*=l?1:-1}var E,R=Object.assign({position:s},c&&Yc),L=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Dc(n*o)/o||0,y:Dc(r*o)/o||0}}({x:f,y:m},Lc(n)):{x:f,y:m};return f=L.x,m=L.y,l?Object.assign({},R,((E={})[S]=y?"0":"",E[v]=b?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},R,((t={})[S]=y?m+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var tu={passive:!0};var nu={left:"right",right:"left",bottom:"top",top:"bottom"};function ru(e){return e.replace(/left|right|bottom|top/g,(function(e){return nu[e]}))}var ou={start:"end",end:"start"};function iu(e){return e.replace(/start|end/g,(function(e){return ou[e]}))}function au(e){var t=Lc(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function su(e){return zc(Wc(e)).left+au(e).scrollLeft}function lu(e){var t=$c(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function cu(e){return["html","body","#document"].indexOf(Rc(e))>=0?e.ownerDocument.body:Tc(e)&&lu(e)?e:cu(Hc(e))}function uu(e,t){var n;void 0===t&&(t=[]);var r=cu(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Lc(r),a=o?[i].concat(i.visualViewport||[],lu(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(uu(Hc(a)))}function du(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pu(e,t,n){return t===Sc?du(function(e,t){var n=Lc(e),r=Wc(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Ac();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+su(e),y:l}}(e,n)):Pc(t)?function(e,t){var n=zc(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):du(function(e){var t,n=Wc(e),r=au(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Mc(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Mc(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+su(e),l=-r.scrollTop;return"rtl"===$c(o||n).direction&&(s+=Mc(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Wc(e)))}function fu(e,t,n,r){var o="clippingParents"===t?function(e){var t=uu(Hc(e)),n=["absolute","fixed"].indexOf($c(e).position)>=0&&Tc(e)?Vc(e):e;return Pc(n)?t.filter((function(e){return Pc(e)&&Fc(e,n)&&"body"!==Rc(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=pu(e,n,r);return t.top=Mc(o.top,t.top),t.right=qc(o.right,t.right),t.bottom=qc(o.bottom,t.bottom),t.left=Mc(o.left,t.left),t}),pu(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hu(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?_c(o):null,a=o?Qc(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case dc:t={x:s,y:n.y-r.height};break;case pc:t={x:s,y:n.y+n.height};break;case fc:t={x:n.x+n.width,y:l};break;case hc:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Gc(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case bc:t[c]=t[c]-(n[u]/2-r[u]/2);break;case yc:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function mu(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?vc:s,c=n.rootBoundary,u=void 0===c?Sc:c,d=n.elementContext,p=void 0===d?wc:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,b=Jc("number"!=typeof g?g:Zc(g,gc)),y=p===wc?xc:wc,v=e.rects.popper,S=e.elements[h?y:p],w=fu(Pc(S)?S:S.contextElement||Wc(e.elements.popper),l,u,a),x=zc(e.elements.reference),k=hu({reference:x,element:v,placement:o}),C=du(Object.assign({},v,k)),E=p===wc?C:x,R={top:w.top-E.top+b.top,bottom:E.bottom-w.bottom+b.bottom,left:w.left-E.left+b.left,right:E.right-w.right+b.right},L=e.modifiersData.offset;if(p===wc&&L){var P=L[o];Object.keys(R).forEach((function(e){var t=[fc,pc].indexOf(e)>=0?1:-1,n=[dc,pc].indexOf(e)>=0?"y":"x";R[e]+=P[n]*t}))}return R}function gu(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Cc:l,u=Qc(r),d=u?s?kc:kc.filter((function(e){return Qc(e)===u})):gc,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=mu(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[_c(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var bu={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,b=_c(g),y=l||(b===g||!h?[ru(g)]:function(e){if(_c(e)===mc)return[];var t=ru(e);return[iu(e),t,iu(t)]}(g)),v=[g].concat(y).reduce((function(e,n){return e.concat(_c(n)===mc?gu(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),S=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,C=v[0],E=0;E<v.length;E++){var R=v[E],L=_c(R),P=Qc(R)===bc,T=[dc,pc].indexOf(L)>=0,I=T?"width":"height",O=mu(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),_=T?P?fc:hc:P?pc:dc;S[I]>w[I]&&(_=ru(_));var M=ru(_),q=[];if(i&&q.push(O[L]<=0),s&&q.push(O[_]<=0,O[M]<=0),q.every((function(e){return e}))){C=R,k=!1;break}x.set(R,q)}if(k)for(var D=function(e){var t=v.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},N=h?3:1;N>0;N--){if("break"===D(N))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function yu(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function vu(e){return[dc,fc,pc,hc].some((function(t){return e[t]>=0}))}var Su={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Cc.reduce((function(e,n){return e[n]=function(e,t,n){var r=_c(e),o=[hc,dc].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[hc,fc].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var wu={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=mu(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=_c(t.placement),y=Qc(t.placement),v=!y,S=Gc(b),w="x"===S?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,E="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,R="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(x){if(i){var T,I="y"===S?dc:hc,O="y"===S?pc:fc,_="y"===S?"height":"width",M=x[S],q=M+g[I],D=M-g[O],N=f?-C[_]/2:0,A=y===bc?k[_]:C[_],z=y===bc?-C[_]:-k[_],j=t.elements.arrow,F=f&&j?jc(j):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=$[I],W=$[O],H=Kc(0,k[_],F[_]),U=v?k[_]/2-N-H-B-R.mainAxis:A-H-B-R.mainAxis,V=v?-k[_]/2+N+H+W+R.mainAxis:z+H+W+R.mainAxis,G=t.elements.arrow&&Vc(t.elements.arrow),K=G?"y"===S?G.clientTop||0:G.clientLeft||0:0,J=null!=(T=null==L?void 0:L[S])?T:0,Z=M+V-J,X=Kc(f?qc(q,M+U-J-K):q,M,f?Mc(D,Z):D);x[S]=X,P[S]=X-M}if(s){var Q,Y="x"===S?dc:hc,ee="x"===S?pc:fc,te=x[w],ne="y"===w?"height":"width",re=te+g[Y],oe=te-g[ee],ie=-1!==[dc,hc].indexOf(b),ae=null!=(Q=null==L?void 0:L[w])?Q:0,se=ie?re:te-k[ne]-C[ne]-ae+R.altAxis,le=ie?te+k[ne]+C[ne]-ae-R.altAxis:oe,ce=f&&ie?function(e,t,n){var r=Kc(e,t,n);return r>n?n:r}(se,te,le):Kc(f?se:re,te,f?le:oe);x[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function xu(e,t,n){void 0===n&&(n=!1);var r=Tc(t),o=Tc(t)&&function(e){var t=e.getBoundingClientRect(),n=Dc(t.width)/e.offsetWidth||1,r=Dc(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Wc(t),a=zc(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Rc(t)||lu(i))&&(s=function(e){return e!==Lc(e)&&Tc(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:au(e);var t}(t)),Tc(t)?((l=zc(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=su(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ku(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Cu(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Eu={placement:"bottom",modifiers:[],strategy:"absolute"};function Ru(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Lu(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Eu:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Eu,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Pc(e)?uu(e):e.contextElement?uu(e.contextElement):[],popper:uu(t)};var u,d,p=function(e){var t=ku(e);return Ec.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((u=[].concat(r,o.options.modifiers),d=u.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(d).map((function(e){return d[e]}))));return o.orderedModifiers=p.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Ru(t,n)){o.rects={reference:xu(t,Vc(n),"fixed"===o.options.strategy),popper:jc(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:Cu((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Ru(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var Pu=Lu({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Lc(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,tu)})),s&&l.addEventListener("resize",n.update,tu),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,tu)})),s&&l.removeEventListener("resize",n.update,tu)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=hu({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:_c(t.placement),variation:Qc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,eu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,eu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Oc,Su,bu,wu,Xc,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=mu(t,{elementContext:"reference"}),s=mu(t,{altBoundary:!0}),l=yu(a,r),c=yu(s,o,i),u=vu(l),d=vu(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const Tu=S.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=S.useState(null),s=Di(S.isValidElement(n)?Zi(n):null,t);if(di((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),di((()=>{if(i&&!o)return Ti(t,i),()=>{Ti(t,null)}}),[t,i,o]),o){if(S.isValidElement(n)){const e={ref:s};return S.cloneElement(n,e)}return n}return i?zs.createPortal(n,i):i}));function Iu(e){return Yo("MuiPopper",e)}function Ou(e){return"function"==typeof e?e():e}ei("MuiPopper",["root"]);const _u={},Mu=S.forwardRef((function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:l,popperOptions:c,popperRef:u,slotProps:d={},slots:p={},TransitionProps:f,ownerState:h,...m}=e,g=S.useRef(null),b=Di(g,t),y=S.useRef(null),v=Di(y,u),w=S.useRef(v);di((()=>{w.current=v}),[v]),S.useImperativeHandle(u,(()=>y.current),[]);const x=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(l,o),[k,C]=S.useState(x),[E,R]=S.useState(Ou(n));S.useEffect((()=>{y.current&&y.current.forceUpdate()})),S.useEffect((()=>{n&&R(Ou(n))}),[n]),di((()=>{if(!E||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{C(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Pu(E,g.current,{placement:x,...c,modifiers:e});return w.current(t),()=>{t.destroy(),w.current(null)}}),[E,i,a,s,c,x]);const L={placement:k};null!==f&&(L.TransitionProps=f);const P=(e=>{const{classes:t}=e;return Hi({root:["root"]},Iu,t)})(e),T=p.root??"div",I=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Ji(n,r),{props:s,internalRef:l}=Ki({...i,externalSlotProps:a});return Ui(t,{...s,ref:Di(l,a?.ref,e.additionalProps?.ref)},r)}({elementType:T,externalSlotProps:d.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:P.root});return xr.jsx(T,{...I,children:"function"==typeof r?r(L):r})})),qu=S.forwardRef((function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:u="bottom",popperOptions:d=_u,popperRef:p,style:f,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=S.useState(!0);if(!s&&!c&&(!h||y))return null;let w;if(o)w=o;else if(n){const e=Ou(n);w=e&&void 0!==e.nodeType?Li(e).body:Li(null).body}const x=c||!s||h&&!y?void 0:"none",k=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return xr.jsx(Tu,{disablePortal:a,container:w,children:xr.jsx(Mu,{anchorEl:n,direction:i,disablePortal:a,modifiers:l,ref:t,open:h?!y:c,placement:u,popperOptions:d,popperRef:p,slotProps:m,slots:g,...b,style:{position:"fixed",top:0,left:0,display:x,...f},TransitionProps:k,children:r})})})),Du=bs(qu,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Nu=S.forwardRef((function(e,t){const n=ra(),r=Ps({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:b,slotProps:y,...v}=r,S=b?.root??a?.Root,w={anchorEl:o,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...v};return xr.jsx(Du,{as:i,direction:n?"rtl":"ltr",slots:{root:S},slotProps:y??s,...w,ref:t})}));function Au(e){return parseInt(e,10)||0}const zu={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function ju(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Fu=S.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:l}=S.useRef(null!=a),c=S.useRef(null),u=Di(t,c),d=S.useRef(null),p=S.useRef(null),f=S.useCallback((()=>{const t=c.current,n=p.current;if(!t||!n)return;const i=Pi(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=Au(i.paddingBottom)+Au(i.paddingTop),l=Au(i.borderBottomWidth)+Au(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let f=u;o&&(f=Math.max(Number(o)*d,f)),r&&(f=Math.min(Number(r)*d,f)),f=Math.max(f,d);return{outerHeightStyle:f+("border-box"===a?s+l:0),overflowing:Math.abs(f-u)<=1}}),[r,o,e.placeholder]),h=qi((()=>{const e=c.current,t=f();if(!e||!t||ju(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n})),m=S.useCallback((()=>{const e=c.current,t=f();if(!e||!t||ju(t))return;const n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""}),[f]),g=S.useRef(-1);di((()=>{const e=Ri(m),t=c?.current;if(!t)return;const n=Pi(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{h()&&(r.unobserve(t),cancelAnimationFrame(g.current),m(),g.current=requestAnimationFrame((()=>{r.observe(t)})))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[f,m,h]),di((()=>{m()}));return xr.jsxs(S.Fragment,{children:[xr.jsx("textarea",{value:a,onChange:e=>{l||m(),n&&n(e)},ref:u,rows:o,style:i,...s}),xr.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:{...zu,...i,paddingTop:0,paddingBottom:0}})]})}));function $u(e){return"string"==typeof e}function Bu({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}const Wu=S.createContext(void 0);function Hu(){return S.useContext(Wu)}function Uu(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Vu(e){return Yo("MuiInputBase",e)}const Gu=ei("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ku;const Ju=(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${Ur(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Zu=(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]},Xu=bs("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ju})(Ls((({theme:e})=>({...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",[`&.${Gu.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),Qu=bs("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Zu})(Ls((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Gu.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Gu.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),Yu=function(e){return function(t){return xr.jsx(Rs,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ed=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:l={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:p,endAdornment:f,error:h,fullWidth:m=!1,id:g,inputComponent:b="input",inputProps:y={},inputRef:v,margin:w,maxRows:x,minRows:k,multiline:C=!1,name:E,onBlur:R,onChange:L,onClick:P,onFocus:T,onKeyDown:I,onKeyUp:O,placeholder:_,readOnly:M,renderSuffix:q,rows:D,size:N,slotProps:A={},slots:z={},startAdornment:j,type:F="text",value:$,...B}=n,W=null!=y.value?y.value:$,{current:H}=S.useRef(null!=W),U=S.useRef(),V=S.useCallback((e=>{}),[]),G=Di(U,v,y.ref,V),[K,J]=S.useState(!1),Z=Hu(),X=Bu({props:n,muiFormControl:Z,states:["color","disabled","error","hiddenLabel","size","required","filled"]});X.focused=Z?Z.focused:K,S.useEffect((()=>{!Z&&d&&K&&(J(!1),R&&R())}),[Z,d,K,R]);const Q=Z&&Z.onFilled,Y=Z&&Z.onEmpty,ee=S.useCallback((e=>{!function(e,t=!1){return e&&(Uu(e.value)&&""!==e.value||t&&Uu(e.defaultValue)&&""!==e.defaultValue)}(e)?Y&&Y():Q&&Q()}),[Q,Y]);di((()=>{H&&ee({value:W})}),[W,ee,H]);S.useEffect((()=>{ee(U.current)}),[]);let te=b,ne=y;C&&"input"===te&&(ne=D?{type:void 0,minRows:D,maxRows:D,...ne}:{type:void 0,maxRows:x,minRows:k,...ne},te=Fu);S.useEffect((()=>{Z&&Z.setAdornedStart(Boolean(j))}),[Z,j]);const re={...n,color:X.color||"primary",disabled:X.disabled,endAdornment:f,error:X.error,focused:X.focused,formControl:Z,fullWidth:m,hiddenLabel:X.hiddenLabel,multiline:C,size:X.size,startAdornment:j,type:F},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return Hi({root:["root",`color${Ur(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Ur(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Vu,t)})(re),ie=z.root||l.Root||Xu,ae=A.root||c.root||{},se=z.input||l.Input||Qu;return ne={...ne,...A.input??c.input},xr.jsxs(S.Fragment,{children:[!p&&"function"==typeof Yu&&(Ku||(Ku=xr.jsx(Yu,{}))),xr.jsxs(ie,{...ae,ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),P&&P(e)},...B,...!$u(ie)&&{ownerState:{...re,...ae.ownerState}},className:Xo(oe.root,ae.className,a,M&&"MuiInputBase-readOnly"),children:[j,xr.jsx(Wu.Provider,{value:null,children:xr.jsx(se,{"aria-invalid":X.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:u,disabled:X.disabled,id:g,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:E,placeholder:_,readOnly:M,required:X.required,rows:D,value:W,onKeyDown:I,onKeyUp:O,type:F,...ne,...!$u(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:G,className:Xo(oe.input,ne.className,M&&"MuiInputBase-readOnly"),onBlur:e=>{R&&R(e),y.onBlur&&y.onBlur(e),Z&&Z.onBlur?Z.onBlur(e):J(!1)},onChange:(e,...t)=>{if(!H){const t=e.target||U.current;if(null==t)throw new Error(at(1));ee({value:t.value})}y.onChange&&y.onChange(e,...t),L&&L(e,...t)},onFocus:e=>{T&&T(e),y.onFocus&&y.onFocus(e),Z&&Z.onFocus?Z.onFocus(e):J(!0)}})}),f,q?q({...X,startAdornment:j}):null]})]})}));function td(e){return Yo("MuiOutlinedInput",e)}const nd={...Gu,...ei("MuiOutlinedInput",["root","notchedOutline","input"])},rd={entering:{opacity:1},entered:{opacity:1}},od=S.forwardRef((function(e,t){const n=ms(),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:u,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:b=Gs,...y}=e,v=S.useRef(null),w=Di(v,Zi(a),t),x=e=>t=>{if(e){const n=v.current;void 0===t?e(n):e(n,t)}},k=x(d),C=x(((e,t)=>{Kl(e);const r=Jl({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),E=x(u),R=x(h),L=x((e=>{const t=Jl({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),P=x(f);return xr.jsx(b,{appear:i,in:l,nodeRef:v,onEnter:C,onEntered:E,onEntering:k,onExit:L,onExited:P,onExiting:R,addEndListener:e=>{o&&o(v.current,e)},timeout:g,...y,children:(e,{ownerState:t,...n})=>S.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||l?void 0:"hidden",...rd[e],...m,...a.props.style},ref:w,...n})})}));function id(e){return Yo("MuiBackdrop",e)}ei("MuiBackdrop",["root","invisible"]);const ad=bs("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),sd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:c={},slotProps:u={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Hi({root:["root",n&&"invisible"]},id,t)})(m),b={slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[y,v]=Yl("root",{elementType:ad,externalForwardedProps:b,className:Xo(g.root,o),ownerState:m}),[S,w]=Yl("transition",{elementType:od,externalForwardedProps:b,ownerState:m});return xr.jsx(S,{in:s,timeout:f,...h,...w,children:xr.jsx(y,{"aria-hidden":!0,...v,classes:g,ref:t,children:r})})}));function ld(e){return Yo("MuiBadge",e)}const cd=ei("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ud=bs("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),dd=bs("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ur(n.anchorOrigin.vertical)}${Ur(n.anchorOrigin.horizontal)}${Ur(n.overlap)}`],"default"!==n.color&&t[`color${Ur(n.color)}`],n.invisible&&t.invisible]}})(Ls((({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(fl(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}))));function pd(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const fd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiBadge"}),{anchorOrigin:r,className:o,classes:i,component:a,components:s={},componentsProps:l={},children:c,overlap:u="rectangular",color:d="default",invisible:p=!1,max:f=99,badgeContent:h,slots:m,slotProps:g,showZero:b=!1,variant:y="standard",...v}=n,{badgeContent:S,invisible:w,max:x,displayValue:k}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Wi({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:f,invisible:p,badgeContent:h,showZero:b}),C=Wi({anchorOrigin:pd(r),color:d,overlap:u,variant:y,badgeContent:h}),E=w||null==S&&"dot"!==y,{color:R=d,overlap:L=u,anchorOrigin:P,variant:T=y}=E?C:n,I=pd(P),O="dot"!==T?k:void 0,_={...n,badgeContent:S,invisible:E,max:x,displayValue:O,showZero:b,anchorOrigin:I,color:R,overlap:L,variant:T},M=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Hi({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ur(n.vertical)}${Ur(n.horizontal)}`,`anchorOrigin${Ur(n.vertical)}${Ur(n.horizontal)}${Ur(o)}`,`overlap${Ur(o)}`,"default"!==t&&`color${Ur(t)}`]},ld,a)})(_),q={slots:{root:m?.root??s.Root,badge:m?.badge??s.Badge},slotProps:{root:g?.root??l.root,badge:g?.badge??l.badge}},[D,N]=Yl("root",{elementType:ud,externalForwardedProps:{...q,...v},ownerState:_,className:Xo(M.root,o),ref:t,additionalProps:{as:a}}),[A,z]=Yl("badge",{elementType:dd,externalForwardedProps:q,ownerState:_,className:M.badge});return xr.jsxs(D,{...N,children:[c,xr.jsx(A,{...z,children:O})]})})),hd=ei("MuiBox",["root"]),md=fs(),gd=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Pr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(zo),a=S.forwardRef((function(e,a){const s=Wo(n),{className:l,component:c="div",...u}=Go(e);return xr.jsx(i,{as:c,ref:a,className:Xo(l,o?o(r):r),theme:t&&s[t]||s,...u})}));return a}({themeId:st,defaultTheme:md,defaultClassName:hd.root,generateClassName:Jo.generate});function bd(e){return Yo("PrivateSwitchBase",e)}ei("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const yd=bs(dl,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),vd=bs("input",{name:"MuiSwitchBase",shouldForwardProp:gs})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Sd=S.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:c,id:u,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:b,required:y=!1,tabIndex:v,type:S,value:w,slots:x={},slotProps:k={},...C}=e,[E,R]=Mi({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),L=Hu();let P=a;L&&void 0===P&&(P=L.disabled);const T="checkbox"===S||"radio"===S,I={...e,checked:E,disabled:P,disableFocusRipple:s,edge:l},O=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Hi({root:["root",n&&"checked",r&&"disabled",o&&`edge${Ur(o)}`],input:["input"]},bd,t)})(I),_={slots:x,slotProps:{input:d,...k}},[M,q]=Yl("root",{ref:t,elementType:yd,className:O.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...C},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),L&&L.onFocus&&L.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),L&&L.onBlur&&L.onBlur(e)})(t)}}),ownerState:I,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:P,role:void 0,tabIndex:null}}),[D,N]=Yl("input",{ref:p,elementType:vd,className:O.input,externalForwardedProps:_,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;R(t),m&&m(e,t)})(t)}}),ownerState:I,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:P,id:T?u:void 0,name:f,readOnly:b,required:y,tabIndex:v,type:S,..."checkbox"===S&&void 0===w?{}:{value:w}}});return xr.jsxs(M,{...q,children:[xr.jsx(D,{...N}),E?o:c]})}));var wd=_s(xr.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),xd=_s(xr.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kd=_s(xr.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Cd(e){return Yo("MuiCheckbox",e)}const Ed=ei("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Rd=bs(Sd,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ur(n.size)}`],"default"!==n.color&&t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{[`&.${Ed.checked}, &.${Ed.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ed.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),Ld=xr.jsx(xd,{}),Pd=xr.jsx(wd,{}),Td=xr.jsx(kd,{}),Id=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Ld,color:o="primary",icon:i=Pd,indeterminate:a=!1,indeterminateIcon:s=Td,inputProps:l,size:c="medium",disableRipple:u=!1,className:d,slots:p={},slotProps:f={},...h}=n,m=a?s:i,g=a?s:r,b={...n,disableRipple:u,color:o,indeterminate:a,size:c},y=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Hi({root:["root",n&&"indeterminate",`color${Ur(r)}`,`size${Ur(o)}`]},Cd,t);return{...t,...i}})(b),v=f.input??l,[w,x]=Yl("root",{ref:t,elementType:Rd,className:Xo(y.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:f,...h},ownerState:b,additionalProps:{type:"checkbox",icon:S.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:S.cloneElement(g,{fontSize:g.props.fontSize??c}),disableRipple:u,slots:p,slotProps:{input:Ms("function"==typeof v?v(b):v,{"data-indeterminate":a})}}});return xr.jsx(w,{...x,classes:y})}));function Od(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _d(e){return parseInt(Pi(e).getComputedStyle(e).paddingRight,10)||0}function Md(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Od(e,o)}))}function qd(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Dd(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Li(e);return t.body===e?Pi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Bi(Pi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_d(r)+e}px`;const t=Li(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${_d(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Li(r).body;else{const t=r.parentElement,n=Pi(r);e="HTML"===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 Nd=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Ad(e){const t=[],n=[];return Array.from(e.querySelectorAll(Nd)).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 zd(){return!0}function jd(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Ad,isEnabled:a=zd,open:s}=e,l=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),p=S.useRef(null),f=S.useRef(!1),h=S.useRef(null),m=Di(Zi(t),h),g=S.useRef(null);S.useEffect((()=>{s&&h.current&&(f.current=!n)}),[n,s]),S.useEffect((()=>{if(!s||!h.current)return;const e=Li(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),S.useEffect((()=>{if(!s||!h.current)return;const e=Li(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.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!==u.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=i(h.current)),n.length>0){const e=Boolean(g.current?.shiftKey&&"Tab"===g.current?.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 b=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return xr.jsxs(S.Fragment,{children:[xr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),xr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}const Fd=()=>{},$d=new class{constructor(){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&&Od(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);Md(t,e.mount,e.modalRef,r,!0);const o=qd(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=qd(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=Dd(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=qd(this.containers,(t=>t.modals.includes(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&&Od(e.modalRef,t),Md(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&&Od(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Bd(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=S.useRef({}),p=S.useRef(null),f=S.useRef(null),h=Di(f,u),[m,g]=S.useState(!c),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let y=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(y=!1);const v=()=>(d.current.modalRef=f.current,d.current.mount=p.current,d.current),w=()=>{$d.mount(v(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},x=qi((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Li(p.current).body;$d.add(v(),e),f.current&&w()})),k=()=>$d.isTopModal(v()),C=qi((e=>{p.current=e,e&&(c&&k()?w():f.current&&Od(f.current,y))})),E=S.useCallback((()=>{$d.remove(v(),y)}),[y]);S.useEffect((()=>()=>{E()}),[E]),S.useEffect((()=>{c?x():b&&o||E()}),[c,E,b,o,x]);const R=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),l&&l(t,"escapeKeyDown")))},L=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Vi(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:R(r),ref:h}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:L(t),open:c}},getTransitionProps:()=>({onEnter:Ei((()=>{g(!1),i&&i()}),s?.props.onEnter??Fd),onExited:Ei((()=>{g(!0),a&&a(),o&&E()}),s?.props.onExited??Fd)}),rootRef:h,portalRef:C,isTopModal:k,exited:m,hasTransition:b}}function Wd(e){return Yo("MuiModal",e)}ei("MuiModal",["root","hidden","backdrop"]);const Hd=bs("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ls((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),Ud=bs(sd,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Vd=S.forwardRef((function(e,t){const n=Ps({name:"MuiModal",props:e}),{BackdropComponent:r=Ud,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:l,container:c,component:u,components:d={},componentsProps:p={},disableAutoFocus:f=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:m=!1,disablePortal:g=!1,disableRestoreFocus:b=!1,disableScrollLock:y=!1,hideBackdrop:v=!1,keepMounted:w=!1,onBackdropClick:x,onClose:k,onTransitionEnter:C,onTransitionExited:E,open:R,slotProps:L={},slots:P={},theme:T,...I}=n,O={...n,closeAfterTransition:s,disableAutoFocus:f,disableEnforceFocus:h,disableEscapeKeyDown:m,disablePortal:g,disableRestoreFocus:b,disableScrollLock:y,hideBackdrop:v,keepMounted:w},{getRootProps:_,getBackdropProps:M,getTransitionProps:q,portalRef:D,isTopModal:N,exited:A,hasTransition:z}=Bd({...O,rootRef:t}),j={...O,exited:A},F=(e=>{const{open:t,exited:n,classes:r}=e;return Hi({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Wd,r)})(j),$={};if(void 0===l.props.tabIndex&&($.tabIndex="-1"),z){const{onEnter:e,onExited:t}=q();$.onEnter=e,$.onExited=t}const B={slots:{root:d.Root,backdrop:d.Backdrop,...P},slotProps:{...p,...L}},[W,H]=Yl("root",{ref:t,elementType:Hd,externalForwardedProps:{...B,...I,component:u},getSlotProps:_,ownerState:j,className:Xo(a,F?.root,!j.open&&j.exited&&F?.hidden)}),[U,V]=Yl("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>M({...e,onClick:t=>{x&&x(t),e?.onClick&&e.onClick(t)}}),className:Xo(o?.className,F?.backdrop),ownerState:j});return w||R||z&&!A?xr.jsx(Tu,{ref:D,container:c,disablePortal:g,children:xr.jsxs(W,{...H,children:[!v&&r?xr.jsx(U,{...V}):null,xr.jsx(jd,{disableEnforceFocus:h,disableAutoFocus:f,disableRestoreFocus:b,isEnabled:N,open:R,children:S.cloneElement(l,$)})]})}):null}));function Gd(e){return Yo("MuiDivider",e)}const Kd=ei("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Jd=bs("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]}})(Ls((({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:yi(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]})))),Zd=bs("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(Ls((({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]})))),Xd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,orientation:a="horizontal",component:s=(o||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:p="fullWidth",...f}=n,h={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:p},m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Hi({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"]},Gd,r)})(h);return xr.jsx(Jd,{as:s,className:Xo(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...f,children:o?xr.jsx(Zd,{className:m.wrapper,ownerState:h,children:o}):null})}));function Qd(e){return Yo("MuiFormControlLabel",e)}Xd&&(Xd.muiSkipListHighlight=!0);const Yd=ei("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ep=bs("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Yd.label}`]:t.label},t.root,t[`labelPlacement${Ur(n.labelPlacement)}`]]}})(Ls((({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Yd.disabled}`]:{cursor:"default"},[`& .${Yd.label}`]:{[`&.${Yd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]})))),tp=bs("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ls((({theme:e})=>({[`&.${Yd.error}`]:{color:(e.vars||e).palette.error.main}})))),np=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiFormControlLabel"}),{checked:r,className:o,componentsProps:i={},control:a,disabled:s,disableTypography:l,inputRef:c,label:u,labelPlacement:d="end",name:p,onChange:f,required:h,slots:m={},slotProps:g={},value:b,...y}=n,v=Hu(),w=s??a.props.disabled??v?.disabled,x=h??a.props.required,k={disabled:w,required:x};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===a.props[e]&&void 0!==n[e]&&(k[e]=n[e])}));const C=Bu({props:n,muiFormControl:v,states:["error"]}),E={...n,disabled:w,labelPlacement:d,required:x,error:C.error},R=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Hi({root:["root",n&&"disabled",`labelPlacement${Ur(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},Qd,t)})(E),L={slots:m,slotProps:{...i,...g}},[P,T]=Yl("typography",{elementType:uc,externalForwardedProps:L,ownerState:E});let I=u;return null==I||I.type===uc||l||(I=xr.jsx(P,{component:"span",...T,className:Xo(R.label,T?.className),children:I})),xr.jsxs(ep,{className:Xo(R.root,o),ownerState:E,ref:t,...y,children:[S.cloneElement(a,k),x?xr.jsxs("div",{children:[I,xr.jsxs(tp,{ownerState:E,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):I]})})),rp=S.createContext();function op(e){return Yo("MuiGrid",e)}const ip=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ap=ei("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...ip.map((e=>`grid-xs-${e}`)),...ip.map((e=>`grid-sm-${e}`)),...ip.map((e=>`grid-md-${e}`)),...ip.map((e=>`grid-lg-${e}`)),...ip.map((e=>`grid-xl-${e}`))]);function sp({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const lp=bs("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},..."wrap"!==e.wrap&&{flexWrap:e.wrap}})),(function({theme:e,ownerState:t}){return Br({theme:e},Hr({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${ap.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=Hr({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sp({breakpoints:e.breakpoints.values,values:t})),o=Br({theme:e},t,((t,r)=>{const o=e.spacing(t);return"0px"!==o?{marginTop:`calc(-1 * ${o})`,[`& > .${ap.item}`]:{paddingTop:o}}:n?.includes(r)?{}:{marginTop:0,[`& > .${ap.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=Hr({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sp({breakpoints:e.breakpoints.values,values:t})),o=Br({theme:e},t,((t,r)=>{const o=e.spacing(t);if("0px"!==o){return{width:`calc(100% + ${o})`,marginLeft:`calc(-1 * ${o})`,[`& > .${ap.item}`]:{paddingLeft:o}}}return n?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${ap.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Hr({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${n})`;c={flexBasis:e,maxWidth:e}}}i={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const cp=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Hi({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},op,t)},up=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiGrid"}),{breakpoints:r}=ms(),o=Go(n),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:h="wrap",zeroMinWidth:m=!1,...g}=o,b=p||f,y=s||f,v=S.useContext(rp),w=c?a||12:v,x={},k={...g};r.keys.forEach((e=>{null!=g[e]&&(x[e]=g[e],delete k[e])}));const C={...o,columns:w,container:c,direction:u,item:d,rowSpacing:b,columnSpacing:y,wrap:h,zeroMinWidth:m,spacing:f,...x,breakpoints:r.keys},E=cp(C);return xr.jsx(rp.Provider,{value:w,children:xr.jsx(lp,{ownerState:C,className:Xo(E.root,i),as:l,ref:t,...k})})}));function dp(e){return`scale(${e}, ${e**2})`}const pp={entering:{opacity:1,transform:dp(1)},entered:{opacity:1,transform:"none"}},fp="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),hp=S.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=Gs,...g}=e,b=Fi(),y=S.useRef(),v=ms(),w=S.useRef(null),x=Di(w,Zi(o),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=k(c),E=k(((e,t)=>{Kl(e);const{duration:n,delay:r,easing:o}=Jl({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=v.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[v.transitions.create("opacity",{duration:a,delay:r}),v.transitions.create("transform",{duration:fp?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)})),R=k(l),L=k(p),P=k((e=>{const{duration:t,delay:n,easing:r}=Jl({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=v.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[v.transitions.create("opacity",{duration:o,delay:n}),v.transitions.create("transform",{duration:fp?o:.666*o,delay:fp?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=dp(.75),u&&u(e)})),T=k(d);return xr.jsx(m,{appear:r,in:a,nodeRef:w,onEnter:E,onEntered:R,onEntering:C,onExit:P,onExited:T,onExiting:L,addEndListener:e=>{"auto"===h&&b.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===h?null:h,...g,children:(e,{ownerState:t,...n})=>S.cloneElement(o,{style:{opacity:0,transform:dp(.75),visibility:"exited"!==e||a?void 0:"hidden",...pp[e],...f,...o.props.style},ref:x,...n})})}));function mp(e){return Yo("MuiIcon",e)}hp&&(hp.muiSupportAuto=!0),ei("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const gp=bs("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ur(n.color)}`],t[`fontSize${Ur(n.fontSize)}`]]}})(Ls((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:e.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:e.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(e.vars||e).palette.action.active}},{props:{color:"disabled"},style:{color:(e.vars||e).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),bp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:a="span",fontSize:s="medium",...l}=n,c={...n,baseClassName:r,color:i,component:a,fontSize:s},u=(e=>{const{color:t,fontSize:n,classes:r}=e;return Hi({root:["root","inherit"!==t&&`color${Ur(t)}`,`fontSize${Ur(n)}`]},mp,r)})(c);return xr.jsx(gp,{as:a,className:Xo(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t,...l})}));function yp(e){return Yo("MuiInputAdornment",e)}bp.muiName="Icon";const vp=ei("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Sp;const wp=bs("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ur(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(Ls((({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vp.positionStart}&:not(.${vp.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]})))),xp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=Hu()||{};let p=c;c&&d.variant,d&&!p&&(p=d.variant);const f={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:l,variant:p},h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Hi({root:["root",n&&"disablePointerEvents",o&&`position${Ur(o)}`,a,r&&"hiddenLabel",i&&`size${Ur(i)}`]},yp,t)})(f);return xr.jsx(Wu.Provider,{value:null,children:xr.jsx(wp,{as:i,ownerState:f,className:Xo(h.root,o),ref:t,...u,children:"string"!=typeof r||s?xr.jsxs(S.Fragment,{children:["start"===l?Sp||(Sp=xr.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]}):xr.jsx(uc,{color:"textSecondary",children:r})})})})),kp=S.createContext({});function Cp(e){return Yo("MuiList",e)}ei("MuiList",["root","padding","dense","subheader"]);const Ep=bs("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Rp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l,...c}=n,u=S.useMemo((()=>({dense:a})),[a]),d={...n,component:i,dense:a,disablePadding:s},p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Hi({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Cp,t)})(d);return xr.jsx(kp.Provider,{value:u,children:xr.jsxs(Ep,{as:i,className:Xo(p.root,o),ref:t,ownerState:d,...c,children:[l,r]})})}));function Lp(e){return Yo("MuiListItem",e)}ei("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const Pp=ei("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Tp(e){return Yo("MuiListItemSecondaryAction",e)}ei("MuiListItemSecondaryAction",["root","disableGutters"]);const Ip=bs("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Op=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=S.useContext(kp),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Hi({root:["root",t&&"disableGutters"]},Tp,n)})(a);return xr.jsx(Ip,{className:Xo(s.root,r),ownerState:a,ref:t,...o})}));Op.muiName="ListItemSecondaryAction";const _p=bs("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.hasSecondaryAction&&t.secondaryAction]}})(Ls((({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Pp.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{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"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]})))),Mp=bs("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),qp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItem"}),{alignItems:r="center",children:o,className:i,component:a,components:s={},componentsProps:l={},ContainerComponent:c="li",ContainerProps:{className:u,...d}={},dense:p=!1,disableGutters:f=!1,disablePadding:h=!1,divider:m=!1,secondaryAction:g,slotProps:b={},slots:y={},...v}=n,w=S.useContext(kp),x=S.useMemo((()=>({dense:p||w.dense||!1,alignItems:r,disableGutters:f})),[r,w.dense,p,f]),k=S.useRef(null),C=S.Children.toArray(o),E=C.length&&(R=C[C.length-1],L=["ListItemSecondaryAction"],S.isValidElement(R)&&-1!==L.indexOf(R.type.muiName??R.type?._payload?.value?.muiName));var R,L;const P={...n,alignItems:r,dense:x.dense,disableGutters:f,disablePadding:h,divider:m,hasSecondaryAction:E},T=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Hi({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Lp,n)})(P),I=Di(k,t),O=y.root||s.Root||_p,_=b.root||l.root||{},M={className:Xo(T.root,_.className,i),...v};let q=a||"li";return E?(q=M.component||a?q:"div","li"===c&&("li"===q?q="div":"li"===M.component&&(M.component="div")),xr.jsx(kp.Provider,{value:x,children:xr.jsxs(Mp,{as:c,className:Xo(T.container,u),ref:I,ownerState:P,...d,children:[xr.jsx(O,{..._,...!$u(O)&&{as:q,ownerState:{...P,..._.ownerState}},...M,children:C}),C.pop()]})})):xr.jsx(kp.Provider,{value:x,children:xr.jsxs(O,{..._,as:q,ref:I,...!$u(O)&&{ownerState:{...P,..._.ownerState}},...M,children:[C,g&&xr.jsx(Op,{children:g})]})})}));function Dp(e){return Yo("MuiListItemIcon",e)}const Np=ei("MuiListItemIcon",["root","alignItemsFlexStart"]),Ap=bs("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(Ls((({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]})))),zp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItemIcon"}),{className:r,...o}=n,i=S.useContext(kp),a={...n,alignItems:i.alignItems},s=(e=>{const{alignItems:t,classes:n}=e;return Hi({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Dp,n)})(a);return xr.jsx(Ap,{className:Xo(s.root,r),ownerState:a,ref:t,...o})})),jp=ei("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Fp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $p(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Bp(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]:n.startsWith(t.keys.join("")))}function Wp(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")&&Bp(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Hp=S.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:u="selectedMenu",...d}=e,p=S.useRef(null),f=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});di((()=>{r&&p.current.focus()}),[r]),S.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${Bi(Pi(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=Di(p,t);let m=-1;S.Children.forEach(i,((e,t)=>{S.isValidElement(e)?(e.props.disabled||("selectedMenu"===u&&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 g=S.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),S.cloneElement(e,t)}return e}));return xr.jsx(Rp,{role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=Li(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Wp(t,r,l,s,Fp);else if("ArrowUp"===n)e.preventDefault(),Wp(t,r,l,s,$p);else if("Home"===n)e.preventDefault(),Wp(t,null,l,s,Fp);else if("End"===n)e.preventDefault(),Wp(t,null,l,s,$p);else if(1===n.length){const o=f.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&&Bp(r,o);o.previousKeyMatched&&(l||Wp(t,r,!1,s,Fp,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...d,children:g})}));function Up(e){return Yo("MuiPopover",e)}function Vp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Gp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Kp(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function Jp(e){return"function"==typeof e?e():e}ei("MuiPopover",["root","paper"]);const Zp=bs(Vd,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Xp=bs(Ql,{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}),Qp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:l,className:c,container:u,elevation:d=8,marginThreshold:p=16,open:f,PaperProps:h={},slots:m={},slotProps:g={},transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:y,transitionDuration:v="auto",TransitionProps:w={},disableScrollLock:x=!1,...k}=n,C=S.useRef(),E={...n,anchorOrigin:i,anchorReference:s,elevation:d,marginThreshold:p,transformOrigin:b,TransitionComponent:y,transitionDuration:v,TransitionProps:w},R=(e=>{const{classes:t}=e;return Hi({root:["root"],paper:["paper"]},Up,t)})(E),L=S.useCallback((()=>{if("anchorPosition"===s)return a;const e=Jp(o),t=(e&&1===e.nodeType?e:Li(C.current).body).getBoundingClientRect();return{top:t.top+Vp(t,i.vertical),left:t.left+Gp(t,i.horizontal)}}),[o,i.horizontal,i.vertical,a,s]),P=S.useCallback((e=>({vertical:Vp(e,b.vertical),horizontal:Gp(e,b.horizontal)})),[b.horizontal,b.vertical]),T=S.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===s)return{top:null,left:null,transformOrigin:Kp(n)};const r=L();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,c=a+t.width,u=Pi(Jp(o)),d=u.innerHeight-p,f=u.innerWidth-p;if(null!==p&&i<p){const e=i-p;i-=e,n.vertical+=e}else if(null!==p&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==p&&a<p){const e=a-p;a-=e,n.horizontal+=e}else if(c>f){const e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:Kp(n)}}),[o,s,L,P,p]),[I,O]=S.useState(f),_=S.useCallback((()=>{const e=C.current;if(!e)return;const t=T(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)}),[T]);S.useEffect((()=>(x&&window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_))),[o,x,_]);S.useEffect((()=>{f&&_()})),S.useImperativeHandle(r,(()=>f?{updatePosition:()=>{_()}}:null),[f,_]),S.useEffect((()=>{if(!f)return;const e=Ri((()=>{_()})),t=Pi(Jp(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[o,f,_]);let M=v;const q={slots:{transition:y,...m},slotProps:{transition:w,paper:h,...g}},[D,N]=Yl("transition",{elementType:hp,externalForwardedProps:q,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),_()},onExited:t=>{e.onExited?.(t),O(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==v||D.muiSupportAuto||(M=void 0);const A=u||(o?Li(Jp(o)).body:void 0),[z,{slots:j,slotProps:F,...$}]=Yl("root",{ref:t,elementType:Zp,externalForwardedProps:{...q,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:Ms("function"==typeof g.backdrop?g.backdrop(E):g.backdrop,{invisible:!0})},container:A,open:f},ownerState:E,className:Xo(R.root,c)}),[B,W]=Yl("paper",{ref:C,className:R.paper,elementType:Xp,externalForwardedProps:q,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:I?void 0:{opacity:0}},ownerState:E});return xr.jsx(z,{...$,...!$u(z)&&{slots:j,slotProps:F,disableScrollLock:x},children:xr.jsx(D,{...N,timeout:M,children:xr.jsx(B,{...W,children:l})})})}));function Yp(e){return Yo("MuiMenuItem",e)}const ef=ei("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),tf=bs(dl,{shouldForwardProp:e=>gs(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]}})(Ls((({theme:e})=>({...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","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ef.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:yi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ef.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:yi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ef.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:yi(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})`:yi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ef.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ef.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Kd.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Kd.inset}`]:{marginLeft:52},[`& .${jp.root}`]:{marginTop:0,marginBottom:0},[`& .${jp.inset}`]:{paddingLeft:36},[`& .${Np.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Np.root} svg`]:{fontSize:"1.25rem"}}}]})))),nf=S.forwardRef((function(e,t){const n=Ps({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:u,className:d,...p}=n,f=S.useContext(kp),h=S.useMemo((()=>({dense:i||f.dense||!1,disableGutters:s})),[f.dense,i,s]),m=S.useRef(null);di((()=>{r&&m.current&&m.current.focus()}),[r]);const g={...n,dense:h.dense,divider:a,disableGutters:s},b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Hi({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Yp,a);return{...a,...s}})(n),y=Di(m,t);let v;return n.disabled||(v=void 0!==u?u:-1),xr.jsx(kp.Provider,{value:h,children:xr.jsx(tf,{ref:y,role:c,tabIndex:v,component:o,focusVisibleClassName:Xo(b.focusVisible,l),className:Xo(b.root,d),...p,ownerState:g,classes:b})})}));var rf;const of=bs("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:gs})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),af=bs("legend",{name:"MuiNotchedOutlined",shouldForwardProp:gs})(Ls((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));const sf=bs(Xu,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ju})(Ls((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${nd.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${nd.focused} .${nd.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{[`&.${nd.focused} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${nd.error} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${nd.disabled} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),lf=bs((function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return xr.jsx(of,{"aria-hidden":!0,className:r,ownerState:l,...a,children:xr.jsx(af,{ownerState:l,children:s?xr.jsx("span",{children:o}):rf||(rf=xr.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Ls((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}))),cf=bs(Qu,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Zu})(Ls((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),uf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:l,slots:c={},slotProps:u={},type:d="text",...p}=n,f=(e=>{const{classes:t}=e,n=Hi({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},td,t);return{...t,...n}})(n),h=Hu(),m=Bu({props:n,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),g={...n,color:m.color||"primary",disabled:m.disabled,error:m.error,focused:m.focused,formControl:h,fullWidth:o,hiddenLabel:m.hiddenLabel,multiline:s,size:m.size,type:d},b=c.root??r.Root??sf,y=c.input??r.Input??cf,[v,w]=Yl("notchedOutline",{elementType:lf,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:c,slotProps:u},additionalProps:{label:null!=a&&""!==a&&m.required?xr.jsxs(S.Fragment,{children:[a," ","*"]}):a}});return xr.jsx(ed,{slots:{root:b,input:y},slotProps:u,renderSuffix:e=>xr.jsx(v,{...w,notched:void 0!==l?l:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:d,...p,classes:{...f,notchedOutline:null}})}));uf.muiName="Input";var df=_s(xr.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),pf=_s(xr.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const ff=bs("span",{name:"MuiRadioButtonIcon",shouldForwardProp:gs})({position:"relative",display:"flex"}),hf=bs(df,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),mf=bs(pf,{name:"MuiRadioButtonIcon"})(Ls((({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]}))));function gf(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o={...e,checked:t};return xr.jsxs(ff,{className:n.root,ownerState:o,children:[xr.jsx(hf,{fontSize:r,className:n.background,ownerState:o}),xr.jsx(mf,{fontSize:r,className:n.dot,ownerState:o})]})}const bf=S.createContext(void 0);function yf(e){return Yo("MuiRadio",e)}const vf=ei("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),Sf=bs(Sd,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t[`size${Ur(n.size)}`],t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${vf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disabled:!1},style:{[`&.${vf.checked}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))));const wf=xr.jsx(gf,{checked:!0}),xf=xr.jsx(gf,{}),kf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiRadio"}),{checked:r,checkedIcon:o=wf,color:i="primary",icon:a=xf,name:s,onChange:l,size:c="medium",className:u,disabled:d,disableRipple:p=!1,slots:f={},slotProps:h={},inputProps:m,...g}=n,b=Hu();let y=d;b&&void 0===y&&(y=b.disabled),y??=!1;const v={...n,disabled:y,disableRipple:p,color:i,size:c},w=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root",`color${Ur(n)}`,"medium"!==r&&`size${Ur(r)}`]};return{...t,...Hi(o,yf,t)}})(v),x=S.useContext(bf);let k=r;const C=Ei(l,x&&x.onChange);let E=s;x&&(void 0===k&&(k=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(x.value,n.value)),void 0===E&&(E=x.name));const R=h.input??m,[L,P]=Yl("root",{ref:t,elementType:Sf,className:Xo(w.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),C(t,...n)}}),ownerState:v,additionalProps:{type:"radio",icon:S.cloneElement(a,{fontSize:a.props.fontSize??c}),checkedIcon:S.cloneElement(o,{fontSize:o.props.fontSize??c}),disabled:y,name:E,checked:k,slots:f,slotProps:{input:"function"==typeof R?R(v):R}}});return xr.jsx(L,{...P,classes:w})}));function Cf(e){return Yo("MuiTooltip",e)}const Ef=ei("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Rf=bs(Nu,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Ls((({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Ef.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ef.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]})))),Lf=bs("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ur(n.placement.split("-")[0])}`]]}})(Ls((({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:yi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Ef.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Ef.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Ef.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(t=16/14,Math.round(1e5*t)/1e5)+"em",fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Ef.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Ef.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t}))),Pf=bs("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Ls((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:yi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))));let Tf=!1;const If=new ji;let Of={x:0,y:0};function _f(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Mf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:o,classes:i,components:a={},componentsProps:s={},describeChild:l=!1,disableFocusListener:c=!1,disableHoverListener:u=!1,disableInteractive:d=!1,disableTouchListener:p=!1,enterDelay:f=100,enterNextDelay:h=0,enterTouchDelay:m=700,followCursor:g=!1,id:b,leaveDelay:y=0,leaveTouchDelay:v=1500,onClose:w,onOpen:x,open:k,placement:C="bottom",PopperComponent:E,PopperProps:R={},slotProps:L={},slots:P={},title:T,TransitionComponent:I,TransitionProps:O,..._}=n,M=S.isValidElement(o)?o:xr.jsx("span",{children:o}),q=ms(),D=ra(),[N,A]=S.useState(),[z,j]=S.useState(null),F=S.useRef(!1),$=d||g,B=Fi(),W=Fi(),H=Fi(),U=Fi(),[V,G]=Mi({controlled:k,default:!1,name:"Tooltip",state:"open"});let K=V;const J=_i(b),Z=S.useRef(),X=qi((()=>{void 0!==Z.current&&(document.body.style.WebkitUserSelect=Z.current,Z.current=void 0),U.clear()}));S.useEffect((()=>X),[X]);const Q=e=>{If.clear(),Tf=!0,G(!0),x&&!K&&x(e)},Y=qi((e=>{If.start(800+y,(()=>{Tf=!1})),G(!1),w&&K&&w(e),B.start(q.transitions.duration.shortest,(()=>{F.current=!1}))})),ee=e=>{F.current&&"touchstart"!==e.type||(N&&N.removeAttribute("title"),W.clear(),H.clear(),f||Tf&&h?W.start(Tf?h:f,(()=>{Q(e)})):Q(e))},te=e=>{W.clear(),H.start(y,(()=>{Y(e)}))},[,ne]=S.useState(!1),re=e=>{$i(e.target)||(ne(!1),te(e))},oe=e=>{N||A(e.currentTarget),$i(e.target)&&(ne(!0),ee(e))},ie=e=>{F.current=!0;const t=M.props;t.onTouchStart&&t.onTouchStart(e)},ae=e=>{ie(e),H.clear(),B.clear(),X(),Z.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(m,(()=>{document.body.style.WebkitUserSelect=Z.current,ee(e)}))},se=e=>{M.props.onTouchEnd&&M.props.onTouchEnd(e),X(),H.start(v,(()=>{Y(e)}))};S.useEffect((()=>{if(K)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Y(e)}}),[Y,K]);const le=Di(Zi(M),A,t);T||0===T||(K=!1);const ce=S.useRef(),ue={},de="string"==typeof T;l?(ue.title=K||!de||u?null:T,ue["aria-describedby"]=K?J:null):(ue["aria-label"]=de?T:null,ue["aria-labelledby"]=K&&!de?J:null);const pe={...ue,..._,...M.props,className:Xo(_.className,M.props.className),onTouchStart:ie,ref:le,...g?{onMouseMove:e=>{const t=M.props;t.onMouseMove&&t.onMouseMove(e),Of={x:e.clientX,y:e.clientY},ce.current&&ce.current.update()}}:{}},fe={};p||(pe.onTouchStart=ae,pe.onTouchEnd=se),u||(pe.onMouseOver=_f(ee,pe.onMouseOver),pe.onMouseLeave=_f(te,pe.onMouseLeave),$||(fe.onMouseOver=ee,fe.onMouseLeave=te)),c||(pe.onFocus=_f(oe,pe.onFocus),pe.onBlur=_f(re,pe.onBlur),$||(fe.onFocus=oe,fe.onBlur=re));const he={...n,isRtl:D,arrow:r,disableInteractive:$,placement:C,PopperComponentProp:E,touch:F.current},me="function"==typeof L.popper?L.popper(he):L.popper,ge=S.useMemo((()=>{let e=[{name:"arrow",enabled:Boolean(z),options:{element:z,padding:4}}];return R.popperOptions?.modifiers&&(e=e.concat(R.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...R.popperOptions,...me?.popperOptions,modifiers:e}}),[z,R.popperOptions,me?.popperOptions]),be=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Hi({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ur(i.split("-")[0])}`],arrow:["arrow"]},Cf,t)})(he),ye="function"==typeof L.transition?L.transition(he):L.transition,ve={slots:{popper:a.Popper,transition:a.Transition??I,tooltip:a.Tooltip,arrow:a.Arrow,...P},slotProps:{arrow:L.arrow??s.arrow,popper:{...R,...me??s.popper},tooltip:L.tooltip??s.tooltip,transition:{...O,...ye??s.transition}}},[Se,we]=Yl("popper",{elementType:Rf,externalForwardedProps:ve,ownerState:he,className:Xo(be.popper,R?.className)}),[xe,ke]=Yl("transition",{elementType:hp,externalForwardedProps:ve,ownerState:he}),[Ce,Ee]=Yl("tooltip",{elementType:Lf,className:be.tooltip,externalForwardedProps:ve,ownerState:he}),[Re,Le]=Yl("arrow",{elementType:Pf,className:be.arrow,externalForwardedProps:ve,ownerState:he,ref:j});return xr.jsxs(S.Fragment,{children:[S.cloneElement(M,pe),xr.jsx(Se,{as:E??Nu,placement:C,anchorEl:g?{getBoundingClientRect:()=>({top:Of.y,left:Of.x,right:Of.x,bottom:Of.y,width:0,height:0})}:N,popperRef:ce,open:!!N&&K,id:J,transition:!0,...fe,...we,popperOptions:ge,children:({TransitionProps:e})=>xr.jsx(xe,{timeout:q.transitions.duration.shorter,...e,...ke,children:xr.jsxs(Ce,{...Ee,children:[T,r?xr.jsx(Re,{...Le}):null]})})})]})}));function qf(){const{useModelStore:e}=S.useContext(Bl).modelStore;return e()}function Df(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=qf(),[o]=function(){const{useRpcRequestSessionModelStore:e}=S.useContext(Bl).modelStore;return e()}(),[i,a]=S.useState();for(var s=arguments.length,l=new Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];return S.useEffect((()=>{if(!t)return;(async()=>{let i=o.get(n);i||(i=t.createSessionObject(e),o.set(n,i));const s=await i;r.set(n,s),a(s)})()}),[t,...l]),[i]}const Nf={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Af(e){return Df(Nf,e)}const zf=e=>new Promise((t=>{setTimeout(t,e)})),jf=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=u(u({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:u({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=u(u({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let a=n.get(r);return a||(a={}),a[o]=i,n.set(r,a),i};function Ff(e,t){const n=e?"".concat(e.id):null,[r]=function(){const{useRpcResultStore:e}=S.useContext(Bl).modelStore;return e()}(),[o,i]=S.useReducer(jf,n?r.get(n):null),[a]=function(){const{useModelChangedStore:e}=S.useContext(Bl).modelStore;return e()}(),[s]=function(){const{useRpcRequestStore:e}=S.useContext(Bl).modelStore;return e()}();let l;n&&(l=s.get(n),l||(l={},s.set(n,l)));const c=async o=>{let a=l[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},l[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{await zf(0);const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),c(!0))}},u={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(l[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{l[t].rpcRetry=!0,c()}};return S.useEffect((()=>{e&&c()}),[e,a.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},u]}function $f(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ff(e,"getLayout");return null!=e&&e.pureLayout&&t?[e.pureLayout,{validating:n,canCancel:r,canRetry:o},i]:[t,{validating:n,canCancel:r,canRetry:o},i]}function Bf(e){return Ff(e,"getAppLayout")}function Wf(){const[e,t]=S.useState(),[n,r]=S.useState(),o=S.useCallback((e=>{e&&t(e)}),[]),i=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return S.useLayoutEffect((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(i);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}}}),[e]),[o,n,e]}function Hf(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Uf(e){let{size:t,style:n={},viewBox:r="0 0 16 16",shapes:o=[]}=e;const i=u({fontSize:Hf(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},n);return w.createElement("i",{style:i},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.map(((e,t)=>{let{type:n,attrs:r}=e;return w.createElement(n,l({key:t},r))}))))}var Vf=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var Gf=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));const Kf=e=>u(u({},e),{},{viewBox:"0 0 12 16",shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]});var Jf=e=>Uf(Kf(e));var Zf=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Xf=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Qf=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=Xf(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},Xf(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Zf(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}(S.PureComponent);const Yf=["S","XS"],eh=e=>e.reduce(((e,t)=>e.concat(t)));function th(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!Yf.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return eh(t)}async function nh(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const rh="RowColumn",oh={row:"".concat(rh,"-row"),rowBorderBottom:"".concat(rh,"-rowBorderBottom"),column:"".concat(rh,"-column"),fieldRoot:"".concat(rh,"-fieldRoot"),cell:"".concat(rh,"-cell"),labelText:"".concat(rh,"-labelText"),labelDense:"".concat(rh,"-labelDense"),highlighted:"".concat(rh,"-highlighted"),checkboxLabel:"".concat(rh,"-checkboxLabel"),icon:"".concat(rh,"-icon"),S:"".concat(rh,"-S"),XS:"".concat(rh,"-XS"),A:"".concat(rh,"-A"),X:"".concat(rh,"-X"),frequencyCount:"".concat(rh,"-frequencyCount"),barContainer:"".concat(rh,"-barContainer"),bar:"".concat(rh,"-bar"),barSelected:"".concat(rh,"-barSelected"),barWithCheckbox:"".concat(rh,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(rh,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(rh,"-excludedTextWithCheckbox")},ih=".".concat(oh.fieldRoot),ah=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function sh(e){var t;let{selectionState:n,selections:r,checkboxes:o=!1,doc:i=document,loaderRef:a}=e;const s=S.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});S.useEffect((()=>{var e;if(null===(e=a.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=a.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}}),[null===(t=a.current)||void 0===t||null===(t=t._listRef)||void 0===t?void 0:t._outerRef]);const l=async()=>{var e;return(null===(e=n.selectDisabled)||void 0===e||!e.call(n))&&(n.setSelectableValuesUpdating(),nh({selections:r,elemNumbers:s.current.elemNumbers,isSingleSelect:n.isSingleSelect,toggle:s.current.toggle}))},c=(e,t)=>{const r=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return eh(t)}(n.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],r)},u=e=>{const{startElemNumber:t}=s.current;if(t===e)return;const r=c(s.current.startElemNumber,e);n.updateItems(r,!0,s.current.elemNumbers)},d=S.useCallback((e=>{if(n.selectDisabled())return;const t=+e.target.getAttribute("data-n"),r=!n.isSingleSelect&&ah(e.nativeEvent);s.current.elemNumbers=[t],s.current.toggle=r,r||n.clearItemStates(!0),n.updateItem(t),s.current.active=!1,l()}),[]),p=S.useCallback((e=>{if(0!==e.button||n.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),r=!n.isSingleSelect&&ah(e);s.current.isRange=!1,s.current.startElemNumber=t,s.current.elemNumbers=[t],s.current.toggle=r,s.current.active=!0,r||n.clearItemStates(!0),n.updateItem(t),n.isSingleSelect&&(s.current.active=!1,l()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),f=S.useCallback((e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");u(t)}l()}}),[]),h=S.useCallback((e=>{0===e.button&&s.current.active&&(s.current.active=!1,l())}),[]),m=S.useCallback((e=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,n.isSelected(s.current.startElemNumber)||(n.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");u(t)}),[]),g=S.useCallback((e=>{var t,r;if(s.current.active||s.current.isRange||n.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void l();const o=Number(null===(t=e.touches[0].target)||void 0===t||null===(t=t.closest(ih))||void 0===t?void 0:t.getAttribute("data-n")),i=Number(null===(r=e.touches[1].target)||void 0===r||null===(r=r.closest(ih))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void l();s.current.active=!0;c(o,i).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[o,i]}),[]),b=S.useCallback((()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,u(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,l()}),[]);S.useEffect((()=>(i.addEventListener("mouseup",h),()=>{i.removeEventListener("mouseup",h)})),[h]),S.useEffect((()=>{const e=()=>{n.clearItemStates(!1)},t=()=>{n.clearItemStates(!0),n.triggerStateChanged()};return r.on("clearItemStates",e),r.on("deactivated",e),r.on("cleared",t),()=>{r.removeListener("clearItemStates",e),r.removeListener("deactivated",e),r.removeListener("cleared",t)}}),[r]);const y={};return o?Object.assign(y,{onChange:d}):Object.assign(y,{onMouseUp:f,onMouseDown:p,onMouseEnter:m,onTouchStart:g,onTouchEnd:b}),{interactionEvents:y,select:async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null!==(e=n.selectDisabled)&&void 0!==e&&e.call(n))return!1;const a=!n.isSingleSelect&&ah(null==i?void 0:i.nativeEvent);a||n.clearItemStates(!0);const s=[];return n.updateItems(t,o,s),n.setSelectableValuesUpdating(),nh({selections:r,elemNumbers:o?s:t,isSingleSelect:n.isSingleSelect,toggle:a})}}}const lh=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ch=e=>Uf(lh(e));const uh=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,dh=e=>{let{cell:t,checkboxes:n}=e;return((e=>e?"A"===e.qState:null)(t)||uh(t))&&n};const ph=e=>{let{column:t,histogram:n,cell:r,showGray:o}=e;if(!r)return[];const i=[t?oh.column:oh.row];n||i.push(oh.rowBorderBottom);const a=function(e){let t,{cell:n,showGray:r}=e;switch(n.qState){case"XS":t=r?oh.XS:oh.S;break;case"S":case"L":t=oh.S;break;case"A":t=!!r&&oh.A;break;case"X":case"XL":t=!!r&&oh.X;break;default:t=!1}return t}({cell:r,showGray:o});return a&&i.push(a),i},fh=9,hh=4,mh=7,gh=12+2*(mh+1),bh=80,yh=10,vh=150,Sh=56,wh=20,xh="-",kh=32,Ch=29,Eh=20,Rh=4,Lh=e=>e.filter((e=>!!e)).join(" ").trim(),Ph=e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")},Th=e=>e||xh,Ih=["backgroundColor"],Oh=e=>{let{sizes:t,frequencyMode:n,isGridMode:r,freqHitsValue:o}=e;if("P"===n)return"".concat(t.freqMinWidth,"px");return r&&!o?"max-content":"25%"},_h=e=>{let{sizes:t,frequencyMode:n,isGridMode:r}=e;return r?"max-content":"P"===n?t.freqMinWidth:t.freqMaxWidth},Mh=e=>{let{theme:t,checkboxes:n,styles:r,selectionState:o}=e;if(n)return"selected"===o?{["& .".concat(oh.labelText)]:{color:r.selections.selected}}:{};const i=r.selections,a=i[o],s=i["".concat(o,"Contrast")];return{background:a,color:s,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0},["& .".concat(oh.labelText)]:{color:s},["& .".concat(oh.icon)]:{color:s}}},qh={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Dh=bs("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})((e=>{let{theme:t,checkboxes:n,isGridMode:r,isGridCol:o,dense:i,direction:a,sizes:s,frequencyMode:l,freqHitsValue:c,styles:p}=e;const f=p.content,{backgroundColor:h}=f,m=d(f,Ih),g=Mh({theme:t,styles:p,checkboxes:n,selectionState:"selected"}),b=Mh({theme:t,styles:p,checkboxes:n,selectionState:"excluded"}),y={height:"100%",transition:"width 0.2s",border:"".concat(1,"px solid"),borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},v={opacity:"30%"};return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(oh.row)]:u({flexWrap:"nowrap"},p.content),["& .".concat(oh.rowBorderBottom)]:{borderBottom:o?"none":"1px solid ".concat(t.palette.divider),borderLeft:o?"1px solid ".concat(t.palette.divider):"none"},["& .".concat(oh.column)]:u({flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider)},p.content),["& .".concat(oh.cell)]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:n?"52px":"26px",flexBasis:n?"auto":"max-content",paddingLeft:"".concat(fh,"px"),paddingRight:0},["& .".concat(oh.labelText)]:u(u({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},qh),m),["& .".concat(oh.labelDense)]:{lineHeight:"18px"},["& .".concat(oh.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(oh.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":u(u({},qh),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(oh.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:m.color},["& .".concat(oh.S)]:u(u({},g),{},{border:r?"none":void 0}),["& .".concat(oh.XS)]:u(u({},Mh({theme:t,styles:p,checkboxes:n,selectionState:"selectedExcluded"})),{},{border:r?"none":void 0}),["& .".concat(oh.A)]:u(u({},Mh({theme:t,styles:p,checkboxes:n,selectionState:"alternative"})),{},{border:r?"none":void 0}),["& .".concat(oh.X)]:u(u({},b),{},{border:r?"none":void 0}),["& .".concat(oh.X,", & .").concat(oh.XS)]:{border:r?"none":void 0,["& .".concat(oh.barSelected," .bar-filled")]:u({},y)},["& .".concat(oh.frequencyCount)]:u(u({zIndex:3,justifyContent:"flex-end"},qh),{},{flex:"0 0 ".concat(Oh({sizes:s,frequencyMode:l,isGridMode:r,freqHitsValue:c})),minWidth:!r&&"P"!==l&&c?s.freqMinWidth:"max-content",maxWidth:_h({sizes:s,frequencyMode:l,isGridMode:r}),textAlign:"rtl"===a?"left":"right",paddingLeft:"rtl"!==a?"8px":0}),["&.".concat(oh.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(oh.bar)]:{height:i?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":u({},y)},["& .".concat(oh.barSelected)]:{"& .bar-filled":u({},v)},["& .".concat(oh.barWithCheckbox)]:{left:"rtl"===a?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(oh.barSelectedWithCheckbox)]:{"& .bar-filled":u(u({},v),{},{backgroundColor:p.selections.selected||"#BFE5D0",borderColor:p.selections.selected})},["& .".concat(oh.excludedTextWithCheckbox)]:{color:p.content.color,fontStyle:"italic"}}}));var Nh=w.memo(Dh);const Ah="ListBoxCheckbox",zh={cbIcon:"".concat(Ah,"-cbIcon"),cbIconChecked:"".concat(Ah,"-cbIconChecked"),cbIconExcluded:"".concat(Ah,"-cbIconExcluded"),cbIconAlternative:"".concat(Ah,"-cbIconAlternative"),checkbox:"".concat(Ah,"-checkbox"),dense:"".concat(Ah,"-dense")},jh=bs(Id,{shouldForwardProp:e=>"styles"!==e})((e=>{let{styles:t}=e;return{["& .".concat(zh.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(zh.cbIconChecked)]:{borderRadius:3,backgroundColor:t.selections.selected,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(zh.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.excluded},["& .".concat(zh.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.alternative},["&.".concat(zh.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(zh.dense)]:{padding:"4px 8px"}}})),Fh=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return w.createElement("span",{className:e.cbIcon},n&&w.createElement("span",{className:t&&n?e.cbIconExcluded:""}))};function $h(e){let{onChange:t,checked:n,label:r,dense:o,excluded:i,styles:a,showGray:s=!0,dataN:l}=e;return w.createElement(jh,{edge:"start",onChange:t,checked:n,disableRipple:!0,className:[zh.checkbox,o&&zh.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r,"data-n":l},name:r,icon:Fh(zh,s,i),checkedIcon:w.createElement("span",{className:zh.cbIconChecked}),styles:a})}const Bh={radioButton:"".concat("ListBoxRadioButton","-radioButton")},Wh=bs(kf,{shouldForwardProp:e=>!["dense","styles"].includes(e)})((e=>{let{checked:t,styles:n,dense:r}=e;return{["&.".concat(Bh.radioButton)]:{right:"5px",color:t?n.selections.selected:n.content.color,padding:r?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}}));function Hh(e){let{onChange:t,checked:n,label:r,dense:o,dataN:i,styles:a}=e;return w.createElement(Wh,{checked:n,onChange:t,value:r,name:r,className:Bh.radioButton,inputProps:{"data-n":i},disableRipple:!0,size:o?"small":"medium",dense:o,styles:a})}function Uh(e){let{label:t,dense:n,showGray:r=!0,checkboxes:o,cell:i,valueTextAlign:a}=e;return w.createElement(uc,{component:"span",variant:"body2",className:Lh([oh.labelText,n&&oh.labelDense,r&&dh({cell:i,checkboxes:o})&&oh.excludedTextWithCheckbox]),align:a,dir:"auto"},w.createElement("span",null,t))}function Vh(e){let{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:s}=e;return"string"==typeof t?w.createElement(Uh,{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:s}):t}function Gh(e){let{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}=e;const f=w.createElement($h,{onChange:t,label:n,checked:o,dense:i,excluded:uh(a),isGridCol:s,showGray:l,dataN:r,styles:p}),h=w.createElement(Hh,{onChange:t,label:n,checked:o,dense:i,dataN:r,styles:p});return w.createElement(np,{control:c?h:f,className:oh.checkboxLabel,label:w.createElement(Vh,{label:n,dense:i,showGray:l,checkboxes:u,cell:a,valueTextAlign:d}),key:r})}function Kh(e){let{labels:t,dense:n,showGray:r,checkboxes:o}=e;const i=t.map(((e,t)=>{let[n,r]=e;return w.createElement("span",{id:t,className:r?oh.highlighted:""},n)}));return w.createElement(Uh,{label:i,dense:n,showGray:r,checkboxes:o})}function Jh(e){let{onChange:t,labels:n,checkboxes:r,dense:o,showGray:i,qElemNumber:a,isSelected:s,cell:l,isGridCol:c,isSingleSelect:u,valueTextAlign:d,styles:p}=e;const f=w.createElement(Kh,{labels:n,dense:o,showGray:i,checkboxes:r});return r?w.createElement(Gh,{onChange:t,label:f,qElemNumber:a,isSelected:s,dense:o,cell:l,isGridCol:c,showGray:i,isSingleSelect:u,checkboxes:r,valueTextAlign:d,styles:p}):f}var Zh=w.memo((function(e){let{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}=e;return u?w.createElement(Gh,{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}):w.createElement(Uh,{label:n,dense:i,showGray:!0,checkboxes:u,cell:a,valueTextAlign:d})}));function Xh(e){let{qFrequency:t,histogram:n,checkboxes:r,isSelected:o,frequencyMax:i}=e;if(!(t&&n&&Th(t)!==xh))return;const a=Ph({qFrequency:t,frequencyMax:i});return w.createElement(gd,{className:Lh([oh.bar,r&&oh.barWithCheckbox,o&&(r?oh.barSelectedWithCheckbox:oh.barSelected)])},w.createElement(gd,{className:"bar-filled",width:a}))}function Qh(e){let{cell:t,checkboxes:n,dense:r,showGray:o}=e;const i=Th(null==t?void 0:t.qFrequency);return w.createElement(up,{item:!0,style:{display:"flex",alignItems:"center"},className:oh.frequencyCount,"aria-label":i,title:i},w.createElement(uc,{noWrap:!0,color:"inherit",variant:"body2",className:Lh([r&&oh.labelDense,oh.labelText,o&&dh({cell:t,checkboxes:n})&&oh.excludedTextWithCheckbox])},i))}function Yh(e){let{dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:o}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:o?"100%":"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const em=bs(up,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:i,fillHeight:a}=e;const s="padding".concat("rtl"===i?"Left":"Right");return{["&.".concat(oh.fieldRoot)]:u(u({},Yh({dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:a})),{},{[s]:o?"8px":void 0})}}));const tm=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===tm.ARROW_UP||e===tm.ARROW_DOWN||e===tm.ARROW_LEFT||e===tm.ARROW_RIGHT});function nm(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function rm(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))||(null==e?void 0:e.closest(".qv-gs-listbox"))}function om(e){let{containerRef:t,enabled:n}=e;const[r,o]=S.useState(!1),i={enabled:n,active:r,innerTabStops:!n||r,blur(e){var r;if(!n)return;o(!1);const i=rm(t.current)||(null===(r=t.current)||void 0===r?void 0:r.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),nm(t.current),e&&i&&(i.setAttribute("tabIndex",0),t.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!n)return;o(!0);const e=t.current,r=null==e?void 0:e.querySelector(".search input"),i=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),s=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==e?void 0:e.querySelector("#listbox-unlock-button"),c=(null==e?void 0:e.querySelector(".listbox-cyclic-button"))||r||i||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const im=e=>+e.getAttribute("data-n"),am=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},sm=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused"),n=null==e?void 0:e.querySelector(".value.selector"),r=null==e?void 0:e.querySelector(".value"),o=t||n||r;return null==o||o.setAttribute("tabIndex",0),null==o||o.focus(),nm(e),o},lm=e=>{const t=null==e?void 0:e.querySelector(".listbox-cyclic-button:not(:disabled)");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},cm=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=rm(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{nm(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}},um=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:s}=e;const l=e=>{let t;return"row"===i?(t=s%o,e<t?r:r-1):(t=s%r,e<o-1?r:t)};let c=t,u=n;if(a===tm.ARROW_DOWN)if(t>=l(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=l(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=s%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};const dm={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function pm(e){var t,n;let{index:r,rowIndex:o,columnIndex:i,style:a,data:s}=e;const{onChange:l,onClick:c,onMouseDown:d,onMouseUp:p,onMouseEnter:f,onTouchStart:h,onTouchEnd:m,pages:g,isLocked:b,column:y=!1,checkboxes:v=!1,textAlign:x,direction:k,layoutOptions:C={},freqIsAllowed:E,isSingleSelect:R,actions:L,frequencyMax:P="",histogram:T=!1,keyboard:I,showGray:O=!0,showTick:_=!0,columnCount:M=1,rowCount:q=1,dataOffset:D,deducedFrequencyMode:N,focusListItems:A,listCount:z,sizes:j,translator:F,showSearch:$,isModal:B,contentFontStyle:W,styles:H,fillHeight:U}=s,{dense:V=!1,dataLayout:G="singleColumn",layoutOrder:K}=C,{itemPadding:J}=j;let Z,X;const Q={max:null,currentIndex:null};if("number"==typeof o&&"number"==typeof i){"row"===K?(Z=o*M+i,Q.max=q,Q.currentIndex=o):(Z=i*q+o,Q.max=M,Q.currentIndex=i);const e=0;X=u(u({},a),{},{height:U?"100%":a.height,left:e+(0===i?a.left:Number(a.left)+i*e),top:0===o?a.top:Number(a.top)+o*e})}else Z=r,Q.max=z,Q.currentIndex=r,X=u({},a);Z+=D;const[Y,ee]=S.useState(null);S.useEffect((()=>{null!==Y&&(0===Q.currentIndex&&A.first&&(Y.focus(),A.setFirst(!1)),Q.currentIndex===Q.max-1&&A.last&&(Y.focus(),A.setLast(!1)))}),[Y,A.first,A.last]);const te=S.useCallback(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:s,keyboard:l,isModal:c,rowCount:u,columnCount:d,rowIndex:p,columnIndex:f,layoutOrder:h}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===tm.ARROW_LEFT||e===tm.ARROW_RIGHT||"number"!=typeof p||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=um({rowIndex:p,columnIndex:f,rowCount:u,columnCount:d,layoutOrder:h,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const b=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:p}=e,{keyCode:f,shiftKey:h=!1,ctrlKey:y=!1,metaKey:v=!1}=p;switch(f){case tm.TAB:{const t=d.closest(".listbox-container"),n=void 0!==c?c():void 0;if(d.classList.add("last-focused"),null==l||!l.enabled){if(!n)return;return l.focusSelection(),e.preventDefault(),void e.stopPropagation()}if(h){am(t)||lm(t)||(n?l.focusSelection():cm(e,l));break}l.focusSelection()||lm(t)||am(t)||(d.blur(),cm(e,l));break}case tm.SHIFT:b(!0);break;case tm.SPACE:t([im(d)],!1,e);break;case tm.ARROW_DOWN:case tm.ARROW_RIGHT:u=m(f,d,!0),h&&u&&(g&&(t([im(d)],!0),b(!1)),t([im(u)],!0));break;case tm.ARROW_UP:case tm.ARROW_LEFT:u=m(f,d,!1),h&&u&&(g&&(t([im(d)],!0),b(!1)),t([im(u)],!0));break;case tm.ENTER:if(o(),void 0===c)return;break;case tm.ESCAPE:if(void 0===c)return void i();if(!c())return;i();break;case tm.HOME:if(s.setFirst(!0),y){null==a||a("overflowStart");break}null==a||a("start");break;case tm.END:if(s.setLast(!0),y){null==a||a("overflowEnd");break}null==a||a("end");break;case tm.A:if(y||v){n();break}return;case tm.F:if(y||v){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(u(u({},L),{},{focusListItems:A,keyboard:I,isModal:B,rowCount:q,columnCount:M,rowIndex:o,columnIndex:i,layoutOrder:K})),[L,null==I?void 0:I.innerTabStops,q,M,o,i,K]),ne=S.useMemo((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:g,cellIndex:Z})),[g,Z]),re="S"===(null==ne?void 0:ne.qState)||"XS"===(null==ne?void 0:ne.qState)||"L"===(null==ne?void 0:ne.qState)||"XL"===(null==ne?void 0:ne.qState),oe=S.useMemo((()=>ph({column:y,histogram:T,cell:ne,showGray:O})),[null==ne?void 0:ne.qState,T,V]),ie=S.useCallback((e=>{e.preventDefault()}),[v]),ae=S.useMemo((()=>ne&&function(e){let{direction:t,cell:n,textAlign:r}=e;const o=!["NaN",void 0].includes(null==n?void 0:n.qNum);let i;return i=!r||r.auto?o?"rtl"===t?"left":"right":{rtl:"right",ltr:"left"}[t]:(null==r?void 0:r.align)||"left",["left","center","right"].includes(i)?i:"left"}({direction:k,cell:ne,textAlign:x})),[k,ne,x]);if(!ne)return null;const se="grid"===G&&"column"===K,le=null!==(t=null==ne?void 0:ne.qText)&&void 0!==t?t:"";let ce;if(null!==(n=ne.qHighlightRanges)&&void 0!==n&&null!==(n=n.qRanges)&&void 0!==n&&n.length){const e=ne.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];ce=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(le,e)}const ue={alignItems:"center",display:"flex",fontSize:"8px"},de="rtl"===k,pe={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:de?8:v?0:void 0,paddingRight:v?0:de?8:0,justifyContent:ae,textAlign:ae},fe=0===r,he=re&&b,me=!v&&re&&!b,ge=!v&&_,be=v||!_,ye=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:s}=e;const l=dm[r],c=t.get(l),u=[];if(o){const e=s?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),p=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,p),u.join(". ").trim()}({translator:F,label:le,qState:ne.qState,currentIndex:Q.currentIndex,maxIndex:Q.max,showSearch:$}),ve=!de&&"right"===ae||de&&"left"===ae;return w.createElement(Nh,{className:oh.barContainer,checkboxes:v,style:X,styles:H,isGridCol:se,isGridMode:"grid"===G,dense:V,direction:k,sizes:j,frequencyMode:N,freqHitsValue:ve,contentFontStyle:W,"data-testid":"listbox.item"},w.createElement(em,{role:"row","aria-label":ye,"aria-selected":re,"aria-setsize":Q.max,"aria-rowindex":Q.currentIndex,ref:ee,container:!0,dataLayout:G,cellPaddingRight:be,layoutOrder:K,itemPadding:J,gap:0,className:Lh(["value",...oe]),classes:{root:oh.fieldRoot},onClick:c,onMouseDown:d,onMouseUp:p,onMouseEnter:f,onKeyDown:te,onTouchStart:h,onTouchEnd:m,onContextMenu:ie,tabIndex:fe&&I.innerTabStops?0:-1,"data-n":null==ne?void 0:ne.qElemNumber,direction:k,fillHeight:U},(null==ne?void 0:ne.qFrequency)&&w.createElement(Xh,{qFrequency:null==ne?void 0:ne.qFrequency,histogram:T,checkboxes:v,isSelected:re,frequencyMax:P}),w.createElement(up,{item:!0,style:pe,className:Lh([oh.cell,oh.selectedCell]),title:"".concat(le)},ce?w.createElement(Jh,{onChange:l,labels:ce,checkboxes:v,dense:V,showGray:O,qElemNumber:ne.qElemNumber,isSelected:re,cell:ne,isGridCol:se,isSingleSelect:R,valueTextAlign:ae,styles:H}):w.createElement(Zh,{onChange:l,label:le,qElemNumber:ne.qElemNumber,isSelected:re,dense:V,cell:ne,isGridCol:se,showGray:O,isSingleSelect:R,checkboxes:v,valueTextAlign:ae,styles:H})),E&&w.createElement(Qh,{cell:ne,checkboxes:v,dense:V,showGray:O}),ge&&w.createElement(up,{item:!0,className:oh.icon},he&&w.createElement(Gf,{style:ue,size:"small"}),me&&w.createElement(ch,{style:ue,size:"small"}))))}var fm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function hm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||fm(r)&&fm(o)))return!1;var r,o;return!0}function mm(e,t){var n;void 0===t&&(t=hm);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var gm="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function bm(e){cancelAnimationFrame(e.id)}function ym(e,t){var n=gm();var r={id:requestAnimationFrame((function o(){gm()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var vm=-1;function Sm(e){if(void 0===e&&(e=!1),-1===vm||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),vm=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return vm}var wm=null;function xm(e){if(void 0===e&&(e=!1),null===wm||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?wm="positive-descending":(t.scrollLeft=1,wm=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),wm}return wm}var km=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Cm(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Js(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Js(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=mm((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=mm((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=mm((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(xm()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&bm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}As(t,e),t.getDerivedStateFromProps=function(e,t){return Em(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Sm();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(xm()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&bm(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?km:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,y=e.useIsScrolling,v=e.width,w=this.state.isScrolling,x=this._getHorizontalRangeToRender(),k=x[0],C=x[1],E=this._getVerticalRangeToRender(),R=E[0],L=E[1],P=[];if(r>0&&g)for(var T=R;T<=L;T++)for(var I=k;I<=C;I++)P.push(S.createElement(t,{columnIndex:I,data:d,isScrolling:y?w:void 0,key:f({columnIndex:I,data:d,rowIndex:T}),rowIndex:T,style:this._getItemStyle(T,I)}));var O=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return S.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:lt({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},S.createElement(c||u||"div",{children:P,ref:l,style:{height:O,pointerEvents:w?"none":void 0,width:_}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,y=m.scrollTop,v=m.scrollUpdateWasRequested,S=m.verticalScrollDirection;this._callOnScroll(b,y,g,S,v)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Em=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Rm=function(e,t){return e};function Lm(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Js(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Js(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=mm((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=mm((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=mm((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(xm()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&bm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}As(t,e),t.getDerivedStateFromProps=function(e,t){return Pm(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Sm():0:l.scrollHeight>l.clientHeight?Sm():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(xm()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&bm(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?Rm:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,y=e.width,v=this.state.isScrolling,w="horizontal"===o||"horizontal"===f,x=w?this._onScrollHorizontal:this._onScrollVertical,k=this._getRangeToRender(),C=k[0],E=k[1],R=[];if(c>0)for(var L=C;L<=E;L++)R.push(S.createElement(t,{data:u,key:p(L,u),index:L,isScrolling:b?v:void 0,style:this._getItemStyle(L)}));var P=r(this.props,this._instanceProps);return S.createElement(h||m||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:lt({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},S.createElement(s||l||"div",{children:R,ref:a,style:{height:w?"100%":P,pointerEvents:v?"none":void 0,width:w?P:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Pm=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Tm=Cm({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Im=Lm({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:s,f=Math.max(0,l*c-p),h=Math.min(f,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=h+p?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(p/2)?0:g>f+Math.floor(p/2)?f:g;default:return r>=m&&r<=h?r:r<m?m:h}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Om="#BBB",_m="#f1f1f1",Mm={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const qm=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex,Dm=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex,Nm=(e,t,n,r)=>e===t*n+r+n;function Am(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:s,dataOffset:l}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=qm(t,c),d=c?r.column:r.row,p=(c?o:i)>=d,f=Nm(s,u,c?i:o,l),h=!!l&&Dm(t,c),m=p&&!f&&u>=d-1||h||a.state.show;a.set(m)}const{StyledFixedSizeList:zm,StyledFixedSizeGrid:jm}=function(){const e=e=>({scrollbarColor:"".concat(Om," ").concat(_m),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:_m},"&::-webkit-scrollbar-thumb":{backgroundColor:Om,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:cr(Im,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Mm.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:cr(Tm,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Mm.styledScrollbars)]:e(n)}}))}}();const Fm=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));const r=n.measureText(e);return Math.ceil(r.width||0)},$m=e=>{const t=S.useMemo((()=>"text"in e?e:{}),[e]);return S.useMemo((()=>Fm(t.text,t.font||"12px Source Sans Pro")),[t.text,t.font])};function Bm(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Wm(e){let{isGridMode:t,dense:n}=e;let r=n?Eh:t?kh:Ch;return t&&(r+=Rh),r}function Hm(e){let{layout:t,width:n,height:r,listCount:o,count:i,freqIsAllowed:a,checkboxes:s,styles:l}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:p,dense:f,dataLayout:h}=c,{fontSize:m="12px",fontFamily:g="Source sans pro"}=(null==l?void 0:l.content)||{},b="".concat(m," ").concat(g),y=$m({text:Bm(t),font:b}),v=$m({text:Bm(5),font:b}),S=$m({text:Bm(8),font:b}),w=a?v:0,x=s?wh:0;let k=Sh+w+x;!s&&k>=bh&&(k+=wh);let C,E,R,L,P=y+18+w+x;!s&&P>=bh&&(P+=wh),P=Math.min(vh,Math.max(P,k));const T=Wm({isGridMode:"grid"===h,dense:f}),I=null!=r?r:8*T;if(u){let e=n;"row"===u?(C={overflowX:"hidden"},e+=2*Rh,({rowCount:L,columnWidth:R,columnCount:E}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,s=r-yh;let l;const c=Math.min(n,Math.max(1,Math.round(s/Math.max(i,o))));l=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c),l=Math.max(l,1);const u=s/l;return{rowCount:Math.ceil(n/l),columnWidth:u,columnCount:l}}({maxVisibleColumns:p,listCount:o,containerWidth:e,columnAutoWidth:P,itemMinWidth:k}))):(C={overflowY:"hidden"},({rowCount:L,columnWidth:R,columnCount:E}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:s,itemMinWidth:l}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u),t=Math.max(t,1);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,s/d,l),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:T,listCount:o,listHeight:I,columnAutoWidth:P,containerWidth:e,itemMinWidth:k})))}E=("singleColumn"===h?1:E)||1,L=("singleColumn"===h?i:L)||o;const O=c.dense?838e3:577e3;L=Math.min(L,O);const _=Math.floor(3355e4/R);E=Math.min(E,_)||1;const M=L*E,q=Math.min(o,M);return{columnCount:E,columnWidth:R,rowCount:L,overflowStyling:C,itemHeight:T,listHeight:I,listWidth:n,scrollBarWidth:yh,count:i,listCount:q,maxCount:{row:O,column:_},itemPadding:Rh,textWidth:y,freqMinWidth:v,freqMaxWidth:S}}const Um=e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r};const[Vm]=Ul({});function Gm(e){const t="".concat(e.id),[n]=Vm();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const Km=bs(uc,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return u({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px"),whiteSpace:"normal"},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function Jm(e){let{width:t,text:n,dense:r,tooltip:o}=e;const{translator:i}=S.useContext(Bl);return w.createElement(Mf,{title:o?i.get(n):""},w.createElement(Km,{width:t,dense:r,component:"div",variant:"body1",py:"12px"},i.get(n)))}var Zm=_s(xr.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const Xm=bs(Ql)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),Qm=bs("div")((()=>({paddingLeft:"6px",flexGrow:1}))),Ym=bs("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),eg=bs(Zm)((()=>({fontSize:"14px"})));function tg(e){let{text:t,dismiss:n,dense:r,parentWidth:o=0}=e;const i="function"==typeof n,a=r?370:282,s=Math.max(o/2-a/2,0),l=Math.min(a,o)-42,c=r&&o<a;return w.createElement(Xm,{left:s,style:{maxWidth:a}},w.createElement(Qm,null,w.createElement(Jm,{text:t,dense:r,width:l,tooltip:c})),w.createElement(Ym,{dense:r},i&&w.createElement(oc,{"aria-label":"close",onClick:()=>n()},w.createElement(eg,null))))}const ng=(e,t)=>e.qListObject.qDimensionInfo.qCardinal-t;const rg=80;function og(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>rg,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["N",void 0].includes(r);return!(!o||!a&&!i)}const ig=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e,ag=e=>{const t=ig(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},sg=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=S.useState(),[i,a]=S.useState(n);return S.useEffect((()=>{if(!n)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=ag(r);return(await t.evaluateEx(o)).qNumber})(t,e);o(n),a(!1)})()}),[n&&t]),{frequencyMax:n?r:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:i}};const lg=["isLoadingData"],cg=100,ug=bs("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function dg(e){var t,n;let{model:r,app:o,constraints:i,layout:a,selections:s,selectionState:c,direction:p,checkboxes:f,height:h,width:m,frequencyMode:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:x=!1,keyboard:k={},showGray:C=!0,scrollState:E,keyScroll:R={state:{},reset:()=>{}},currentScrollIndex:L={set:()=>{}},renderedCallback:P,onCtrlF:T,showSearch:I,isModal:O,styles:_}=e;const{translator:M}=S.useContext(Bl),[q,D]=S.useState(!1),N=!(!a||!a.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:A=f,histogram:z}=null!=a?a:{},j=S.useRef(null),F=S.useRef({queue:[],validPages:!1,dataOffset:0}),$=S.useRef({pages:[]}),{frequencyMax:B,awaitingFrequencyMax:W}=sg(o,a),H=function(e){let{local:t,loaderRef:n,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:s}=e;const[l,c]=S.useState(!1),[u,d]=S.useState([]);let[p]=S.useState(0);const f=(e,l)=>{const u=t.current.dataOffset;t.current.queue.push({start:e+u,stop:l+u});const f=!!n.current&&n.current._listRef&&n.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),c(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=a?a(n):n;t.current.validPages=!0,s.current.pages=r,d(r),c(!1),e()}));o&&o(i)}),f?i:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:u,isLoading:l}}({local:F,loaderRef:j,model:r,fetchStart:y,scrollTimeout:0,postProcessPages:v,listData:$}),{isLoadingData:U}=H,V=d(H,lg),{getStoreValue:G,setStoreValue:K}=Gm(r),J=S.useCallback(V.loadMoreItems,[a]),[Z,X]=S.useState({show:!1,dismissed:!1}),[Q,Y]=S.useState([]);null!=V&&V.pages&&c.update({setPages:Y,pages:V.pages,isSingleSelect:N,layout:a});const ee=null==a?void 0:a.qListObject.qDimensionInfo.qCardinal;(null!=V&&V.pages.length&&!W||0===ee)&&(null==P||P());const te=S.useCallback((e=>{if(null==Q||!Q.length||!F.current.validPages)return!1;F.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Q.filter((e=>t(e)))[0];return n&&t(n)}),[a,Q]),{interactionEvents:ne,select:re}=sh({selectionState:c,selections:s,checkboxes:A,doc:document,loaderRef:j}),{layoutOptions:oe={}}=a||{};let ie=!0;oe.dataLayout&&(ie="singleColumn"===oe.dataLayout||"row"===(null==oe?void 0:oe.layoutOrder));const ae="grid"===(null==oe?void 0:oe.dataLayout),se=e=>{const t=u({},ie?{rowIndex:e}:{columnIndex:e}),n=ae?t:e;j.current._listRef.scrollToItem(n)},le=()=>{if(F.current.queue=[],F.current.validPages=!1,j.current){j.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===R.state.scrollPosition;if(a&&a.qSelectionInfo.qInSelections||e)return void(e&&R.reset());F.current.dataOffset=0,se(0)}};b&&b.call(null,le),S.useEffect((()=>{E&&!q&&j.current&&(j.current._listRef.scrollToItem(E.initScrollPos),D(!0))}),[j.current]),S.useEffect((()=>{le()}),[a,F.current.dataOffset]);let ce=cg;const ue="grid"!==oe.dataLayout,de=null==a||null===(t=a.qListObject.qSize)||void 0===t?void 0:t.qcy,pe=function(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;return(null!=t&&t.length&&o?Um({pages:t,minimumBatchSize:n,count:r}):r)||0}({pages:Q,minimumBatchSize:ce,count:de,calculatePagesHeight:x});let fe=og({itemWidth:m,layout:a,frequencyMode:g});const he=function(e){return e.some((e=>{let{qMatrix:t}=e;return t.some((e=>{var t;let[n]=e;return!(null===(t=n.qFrequency)||void 0===t||!t.match("%"))}))}))?"P":"-"}(Q),me=Hm({layout:a,width:m,height:h,listCount:pe,count:de,freqIsAllowed:fe,checkboxes:A,styles:_});me.columnWidth&&(fe=og({itemWidth:me.columnWidth,layout:a,frequencyMode:g}));const{listCount:ge}=me;K("listCount",ge);const be=G("inputText"),ye=function(e){let{layout:t,searchInputText:n,listCount:r}=e;const{translator:o}=S.useContext(Bl),i=[];if(null!=n&&n.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(r),t=o.get(e,[r]);i.push(t)}const a=function(e){var t;let{layout:n,translatorDynamic:r}=e;const{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}return r.get(a,[i])}({layout:t,translatorDynamic:o});i.push(a);const s=i.filter((e=>!(null==e||!e.length))).join(". ");return s}({layout:a,searchInputText:be,listCount:ge}),ve=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,s=!1,l=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":l=0,t=0,s=!0;break;case"overflowEnd":l=ng(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,s=!0}return{scrollIndex:t,offset:l,triggerRerender:s}}({position:e,isRow:ie,sizes:me,layout:a,offset:F.current.dataOffset});F.current.dataOffset=n,r&&c.triggerStateChanged(),se(t)};S.useEffect((()=>{const e=R.state;e.up?se(L.state.start-e.up):e.down?se(L.state.stop+e.down):e.scrollPosition&&ve(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&R.reset()}),[R.state.up,R.state.down,R.state.scrollPosition]);const{textAlign:Se}=(null==a?void 0:a.qListObject.qDimensionInfo)||{},[we,xe]=S.useState({first:!1,last:!1}),{List:ke,Grid:Ce}=function(e){let{layout:t,width:n,checkboxes:r,local:o,isVertical:i,pages:a,selectionState:s,interactionEvents:c,deducedFrequencyMode:d,histogram:p,isSingleSelect:f,select:h,selectAll:m,onCtrlF:g,textAlign:b,selections:y,keyboard:v,showGray:S,scrollState:x,direction:k,sizes:C,listCount:E,overflowDisclaimer:R,setScrollPosition:L,focusListItems:P,setCurrentScrollIndex:T,constraints:I,frequencyMax:O,freqIsAllowed:_,translator:M,showSearch:q,isModal:D,styles:N}=e;const{layoutOptions:A={}}=t||{},{columnWidth:z,listHeight:j,itemHeight:F,rowCount:$,columnCount:B}=C||{},W=("grid"===A.dataLayout?z:n)>bh,H={direction:"rtl"===k?"rtl":"ltr",useIsScrolling:!0,className:Mm.styledScrollbars},U=null==t?void 0:t.qListObject.qDimensionInfo.qLocked,V=j<=F,G=u(u({isLocked:U,column:!i,pages:a},U||s.selectDisabled()?{}:c),{},{checkboxes:r,layoutOptions:A,deducedFrequencyMode:d,freqIsAllowed:_,isSingleSelect:f,textAlign:b,sizes:C,actions:{select:h,confirm:()=>null==y?void 0:y.confirm.call(y),cancel:()=>null==y?void 0:y.cancel.call(y),setScrollPosition:L,selectAll:m,onCtrlF:g},frequencyMax:O,histogram:p,keyboard:v,showGray:S,showTick:W,dataOffset:o.current.dataOffset,focusListItems:P,direction:k,translator:M,showSearch:q,isModal:D,styles:N,fillHeight:V});return{List:e=>{let{onItemsRendered:r,ref:i}=e;return o.current.listRef=i,w.createElement(zm,l({},H,{dataTestid:"fixed-size-list",scrollDisabled:null==I?void 0:I.active,height:j,width:n,itemCount:E,itemData:u(u({},G),{},{listCount:E}),itemSize:F,onItemsRendered:e=>{var n;T({start:e.visibleStartIndex,stop:e.visibleStopIndex}),x&&x.setScrollPos(e.visibleStopIndex),Am({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:B,rowCount:$,overflowDisclaimer:R,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qCardinal,dataOffset:o.current.dataOffset}),r(u({},e))},ref:i}),pm)},Grid:e=>{let{onItemsRendered:r,ref:i}=e;const{overflowStyling:a,scrollBarWidth:s}=C,{layoutOrder:c}=A||{},d=Math.min(j,$*F+s);return o.current.listRef=i,w.createElement(jm,l({},H,{dataTestid:"fixed-size-grid",scrollDisabled:null==I?void 0:I.active,height:d,width:n,columnCount:B,columnWidth:z,rowCount:$,rowHeight:F,style:u({},a),itemData:u(u({},G),{},{column:void 0,columnCount:B,rowCount:$}),onItemsRendered:e=>{var n;const i="row"===c;T({start:i?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:i?e.visibleRowStopIndex:e.visibleColumnStopIndex});const a=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,f,h;return n&&n.setScrollPos(u),"column"===r?(d=l*o,p=a,f=c*o,h=s):(d=l,p=a*i,f=c,h=s*i),{visibleStartIndex:d+p,visibleStopIndex:f+h}}({renderProps:e,scrollState:x,layoutOrder:c,rowCount:$,columnCount:B});Am({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:B,rowCount:$,overflowDisclaimer:R,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qCardinal,dataOffset:o.current.dataOffset}),r(a)},ref:i}),pm)}}}({direction:p,layout:a,width:m,checkboxes:A,deducedFrequencyMode:he,histogram:z,keyboard:k,showGray:C,interactionEvents:ne,select:re,selectAll:()=>{c.clearItemStates(!1),r.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:Se,isVertical:ue,pages:Q,selectionState:c,isSingleSelect:N,selections:s,scrollState:E,local:F,sizes:me,listCount:ge,overflowDisclaimer:{state:Z,set:e=>X((t=>u(u({},t),{},{show:e})))},setScrollPosition:ve,focusListItems:{first:we.first,setFirst:e=>xe((t=>u(u({},t),{},{first:e}))),last:we.last,setLast:e=>xe((t=>u(u({},t),{},{last:e})))},setCurrentScrollIndex:L.set,constraints:i,frequencyMax:B,freqIsAllowed:fe,translator:M,showSearch:I,isModal:O,styles:_}),{columnWidth:Ee,listHeight:Re,itemHeight:Le}=me||{};return ue||(ce=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:m,columnWidth:Ee,listHeight:Re,itemHeight:Le})),w.createElement(ug,null,w.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},ye),!ge&&ee>0&&w.createElement(Jm,{width:m,text:"Listbox.NoMatchesForYourTerms"}),w.createElement(Qf,{isItemLoaded:te,itemCount:ge||1,loadMoreItems:J.with({minimumBatchSize:ce}),threshold:0,minimumBatchSize:ce,ref:j,role:"grid"},ue?ke:Ce),Z.show&&!Z.dismissed&&w.createElement(tg,{text:"Listbox.ItemsOverflow",dismiss:()=>X((e=>u(u({},e),{},{dismissed:!0}))),parentWidth:null==j||null===(n=j.current)||void 0===n||null===(n=n._listRef)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.width,dense:null==oe?void 0:oe.dense}))}const pg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),fg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),hg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),mg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var gg=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1,selections:a}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const s="/qListObjectDef",l=()=>{a.isActive()||a.begin(s)};return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:pg,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAll(s)}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:hg,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectPossible(s)}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:fg,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAlternative(s)}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:mg,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectExcluded(s)}}].filter(Boolean)};const bg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function yg(e){const t=ms(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const vg={className:"njs-cell-action"},Sg=w.forwardRef(((e,t)=>{let{ariaExpanded:n=!1,item:r,addAnchor:o=!1}=e;const i=ms(),{hidden:a,disabled:s,style:l,hasSvgIconShape:c}=yg(r);if(a)return null;const u=Number.parseInt(i.spacing(.5),10),d=r.keyboardAction||r.action,p=d?e=>["Enter"].includes(e.key)&&d():null,f=d?e=>[" ","Spacebar"].includes(e.key)&&d():null,h="actions-toolbar-".concat(r.key);return w.createElement(oc,{ref:o?null:t,title:r.label,onClick:r.action,onKeyDown:p,onKeyUp:f,disabled:s,style:l,className:[vg.className,h].join(" "),size:"large",disableRipple:!0,"aria-label":r.label,"aria-expanded":n,"aria-controls":"moreMenuList","data-testid":h},c&&Uf(r.getSvgIconShape()),o&&w.createElement("div",{ref:t,style:{bottom:-u,right:0,position:"absolute",width:"100%",height:0}}))})),wg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]});var xg=e=>Uf(wg(e));const kg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var Cg=e=>Uf(kg(e));const Eg="njs-action-toolbar-more",Rg={icon:"".concat("More","-icon")},Lg=bs(Qp)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(Rg.icon," *")]:{color:t.palette.text.primary}}}));function Pg(e){let{item:t,autoFocus:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=yg(t);return o?null:w.createElement(nf,{autoFocus:n,title:t.label,onClick:()=>{t.action(),r()},disabled:i,tabindex:"0"},a&&w.createElement(zp,{className:Rg.icon},Uf(t.getSvgIconShape())),w.createElement(uc,{noWrap:!0},t.label))}const Tg=w.forwardRef(((e,t)=>{let{actions:n=[],show:r=!0,alignTo:o,popoverProps:i={},popoverPaperStyle:a={},onCloseOrActionClick:s=(()=>{}),disablePortal:c=!0}=e;const d=n.length>0,p=n.findIndex((e=>!e.disabled));return d&&w.createElement(Lg,l({},i,{onClose:s,ref:t,open:r,anchorEl:o.current,getContentAnchorEl:c?null:void 0,container:c?o.current:void 0,disablePortal:c,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:Eg},paper:{style:u({pointerEvents:"auto",maxWidth:"250px"},a)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}),w.createElement(Hp,{id:"moreMenuList"},n.map(((e,t)=>w.createElement(Pg,{key:t,item:e,autoFocus:t===p,onActionClick:s})))))})),Ig=e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)},Og=e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()};const _g="ActionsToolbar",Mg={item:"".concat(_g,"-item"),itemSpacing:"".concat(_g,"-itemSpacing")},qg=bs(Qp)((e=>{let{theme:t}=e;return{["& .".concat(Mg.itemSpacing)]:{padding:t.spacing(0,.25)}}})),Dg={className:"njs-action-toolbar-popover"},Ng=w.forwardRef(((e,t)=>{let{className:n,ariaExpanded:r=!1,actions:o=[],addAnchor:i=!1,isRtl:a=!1}=e;return o.length>0?w.createElement(up,{item:!0,container:!0,gap:0,flexDirection:a?"row-reverse":"row",wrap:"nowrap",className:n},o.map(((e,n)=>w.createElement(up,{item:!0,key:e.key,className:"".concat(Mg.itemSpacing," ").concat(Mg.item)},w.createElement(Sg,{ariaExpanded:r,key:e.key,item:e,ref:0===n?t:null,addAnchor:i}))))):null})),Ag={pointerEvents:"none"};function zg(e){var t,n;let{show:r=!0,actions:o=[],maxItems:i=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:s,more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:c={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:f,autoConfirm:h=!1,layout:m}=e;const g=function(e){let{api:t,layout:n,onConfirm:r=(()=>{}),onCancel:o=(()=>{}),onKeyDeactivate:i=(()=>{})}=e;const{translator:a}=S.useContext(Bl);return[{key:"clear",type:"icon-button",label:a.get("Selection.Clear"),enabled:()=>t.canClear(n),action:()=>t.clear(),getSvgIconShape:kg},{key:"cancel",type:"icon-button",label:a.get("Selection.Cancel"),enabled:()=>t.canCancel(n),action:()=>{o(),t.cancel()},keyboardAction:()=>{i(),o(),t.cancel()},getSvgIconShape:wg},{key:"confirm",type:"icon-button",label:a.get("Selection.Confirm"),enabled:()=>t.canConfirm(n),action:()=>{r(),t.confirm()},keyboardAction:()=>{i(),r(),t.confirm()},getSvgIconShape:lh}]}(u(u({},a),{},{layout:m})),{translator:b,keyboardNavigation:y}=S.useContext(Bl),[v,x]=S.useState(!1),k={vertical:12,horizontal:f?0:(null!==(t=null===(n=c.anchorEl)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)-7},C={vertical:"bottom",horizontal:f?-7:"right"},E=S.useRef(),R=S.useRef(),L=ms(),P=S.useMemo((()=>({margin:L.spacing(.5,0)}))),T=e=>{const t=E.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},I=S.useMemo((()=>function(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o,isRtl:i}=e;return e=>{const{target:a,nativeEvent:s}=e,{keyCode:l}=s;switch(l){case tm.ARROW_LEFT:case tm.ARROW_DOWN:case tm.ARROW_RIGHT:case tm.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=Ig(a);let t=[tm.ARROW_LEFT,tm.ARROW_DOWN].includes(l);t=i?!t:t,Og(t?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case tm.SPACE:e.preventDefault();break;case tm.TAB:t&&null!=n&&n.refocusContent&&(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent());break;case tm.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}({keyboardNavigation:y,focusHandler:d,getEnabledButton:T,selections:a,isRtl:f})),[y,d,T,a,f]);if(S.useEffect((()=>()=>{x(!1)}),[c.show,r,a.show]),S.useEffect((()=>{if(!d)return;d.on("focus_toolbar_first",(()=>{const e=T(!1);null==e||e.focus()})),d.on("focus_toolbar_last",(()=>{const e=T(!0);null==e||e.focus()}))}),[]),h)return;let O=l.enabled,_=l.actions;const M=l.alignTo||R,q=o.filter((e=>!e.hidden));if(q.length>i){const e=q.splice(-(q.length-i)-1);O=!0,_=[...e,...l.actions]}if(!a.show&&0===q.length&&!O)return null;const D={key:"more",label:b.get("Menu.More"),getSvgIconShape:bg,hidden:!1,active:v,enabled:()=>O,action:()=>x(!v)},N=q.length>0,A=_.length>0,z=N&&a.show||A&&a.show,j=w.createElement(up,{ref:E,onKeyDown:I,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:f?"row-reverse":"row"}},(null==s?void 0:s.length)&&w.createElement(Ng,{className:"actions-toolbar-extra-actions",actions:s,isRtl:f}),N&&w.createElement(Ng,{actions:q}),A&&w.createElement(Ng,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:R,ariaExpanded:v,actions:[D],addAnchor:!0}),z&&w.createElement(up,{item:!0,className:Mg.itemSpacing,style:P},w.createElement(Xd,{orientation:"vertical"})),a.show&&w.createElement(Ng,{className:"actions-toolbar-default-actions",actions:g,isRtl:f}),v&&w.createElement(Tg,{show:v,actions:_,alignTo:M,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{x(!1)},disablePortal:l.disablePortal}));return c.show?w.createElement(qg,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:c.show,anchorEl:c.anchorEl,anchorOrigin:k,transformOrigin:C,hideBackdrop:!0,style:Ag,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Dg.className,style:{pointerEvents:"auto",padding:L.spacing(.5,.25)}}}},j):r&&j}var jg=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const Fg="/qListObjectDef",$g=e=>null==e?void 0:e.substring(0,64e3),Bg=bs(uf,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})((e=>{let{styles:t,dense:n,isRtl:r}=e,o={};return n&&(o={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:t.search.color,textAlign:r?"right":"left"}}),u({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:t.search.backgroundColor,backdropFilter:t.background.backgroundImage?t.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:r?"row-reverse":"row","& fieldset":{borderColor:"".concat(t.search.borderColor),borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:"".concat(t.search.highlightBorderColor," !important")},"& .MuiInputBase-root":u({},t.search),"& *":{color:t.search.color},"& input":{color:t.search.color,textAlign:r?"right":"left"}},o)})),Wg=bs(oc)((()=>({border:0,padding:"8px",cursor:"pointer",lineHeight:"12px","&:hover":{backgroundColor:"transparent"},":focus-visible":{borderRadius:"4px",boxShadow:"inset 0 0 0 2px rgb(2, 117, 217)"}})));var Hg=S.forwardRef((function(e,t){let{popoverOpen:n,selections:r,selectionState:o,model:i,keyboard:a,dense:s=!1,visible:l=!0,autoFocus:c=!0,beginSelectionOnFocus:u=!0,wildCardSearch:d=!1,searchEnabled:p,direction:f,hide:h,styles:m}=e;const{translator:g}=S.useContext(Bl),[b,y]=S.useState(""),[v,x]=S.useState(!1),k=S.useRef(),C=S.useRef(),E=g.get("Listbox.Clear.Search"),{getStoreValue:R,setStoreValue:L}=Gm(i),P="rtl"===f,T=async()=>{try{await i.abortListObjectSearch(Fg)}finally{y("")}};S.useEffect((()=>l?()=>T():()=>{}),[l]),S.useEffect((()=>(r.on("deactivated",T),()=>{r.removeListener&&r.removeListener("deactivated",T)})),[]),S.useEffect((()=>{if(v&&k.current){const e=b.length-1;k.current.setSelectionRange(e,e),x(!1)}}),[v,k.current]),S.useEffect((()=>{L("inputText",b)}),[b]);const I=async()=>{let e;const t=$g(b),n=await i.searchListObjectFor(Fg,t);return o.selectDisabled()?n:(n&&t.length&&R("listCount")>0&&(e=i.acceptListObjectSearch(Fg,!0),r.selectionsMade=!0,o.clearItemStates(!1),y("")),e)},O=()=>{var e;null===(e=k.current)||void 0===e||e.focus()},_=()=>{T(),O()};return S.useImperativeHandle(t,(()=>({focus(){O()}}))),l&&!1!==p?w.createElement(Bg,{styles:m,dense:s,isRtl:P,startAdornment:w.createElement(xp,{position:"start",sx:{marginLeft:s?"8px":"".concat(fh,"px")}},w.createElement(jg,{size:s?"small":"normal"})),endAdornment:w.createElement(xp,{position:"end",sx:{marginLeft:0}},""!==b&&w.createElement(Wg,{tabIndex:0,ref:C,title:E,"aria-label":E,onClick:_,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":_();break;case"Tab":e.shiftKey?O():sm(t);break;default:return}e.preventDefault(),e.stopPropagation()}},w.createElement(xg,{size:s?"small":"normal"}))),className:"search",inputRef:k,size:"small",fullWidth:!0,placeholder:g.get("Listbox.Search"),value:b,onFocus:()=>{d&&(y("**"),x(!0)),u&&!o.selectDisabled()&&!r.isModal()&&r.begin("/qListObjectDef")},onChange:async e=>{const t=$g(e.target.value);return y(t),t.length?i.searchListObjectFor(Fg,t):T()},onKeyDown:async e=>{const{currentTarget:t}=e,o=t.closest(".listbox-container");switch(e.key){case"Enter":I();break;case"Escape":if(sm(o),r.cancel(),n)return;break;case"Tab":e.shiftKey?lm(o)||a.focusSelection():C.current?C.current.focus():sm(o);break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;h&&(h(),sm(o));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:c,inputProps:{tabIndex:a.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":g.get("Listbox.Search.ScreenReaderInstructions")}}):null}));function Ug(e){if(!e.session)return[];const{selectionStore:t}=S.useContext(Bl),[n]=t.useAppSelectionsStore(),r=e?e.id:null;let o=n.get(r);return S.useEffect((()=>{e&&!o&&(o=function(e){let{app:t,selectionStore:n}=e;const r="".concat(t.id),{modalObjectStore:o,appModalStore:i}=n,a=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{model:t,objectSelections:n}=o.get(r)||{};t&&(await t.endSelections(e),o.clear(r),n.emit("deactivated"))},s={begin:async e=>{var n;let{model:i,paths:s,accept:l=!0,objectSelections:c}=e;if(c===(null===(n=o.get(r))||void 0===n?void 0:n.objectSelections))return;a(l),o.set(r,{model:i,objectSelections:c});const u=Array.isArray(s)?s:[s],d=async e=>{try{await i.beginSelections(u),o.set(r,{model:i,objectSelections:c})}catch(n){6003!==n.code||e?o.clear(r):(await t.abortModal(l),d(!0))}};await d()},end:a};i.set(r,s);const l={model:t,isInModal:()=>!!o.get(r),isModal(e){var t;return e?(null===(t=o.get(r))||void 0===t?void 0:t.objectSelections)===e:!!o.get(r)},forward:()=>s.end().then((()=>t.forward())),back:()=>s.end().then((()=>t.back())),clear:()=>s.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return s.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return l}({app:e,selectionStore:t}),n.set(r,o),n.dispatch(!0))}),[e]),[o]}function Vg(e){return Object.keys(T.prototype).forEach((t=>{e[t]=T.prototype[t]})),T.init(e),e}const Gg=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin({model:o,paths:e,accept:!0,objectSelections:s}))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(s),goModal:e=>r.begin({model:o,paths:e,accept:!1,objectSelections:s}),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return Vg(s),s},Kg=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function Jg(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=Ug(e),[a]=$f(t),{appModalStore:s}=S.useContext(Bl).selectionStore,l=s.get(e.id),[c,u]=S.useState();return S.useEffect((()=>{i&&t&&!c&&u(Gg({appSelections:i,appModal:l,model:t}))}),[i,t]),S.useEffect((()=>{if(!c)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Kg({elements:o,objectSelections:c,options:r});return c.addListener("activated",e),c.addListener("deactivated",t),()=>{c.isActive()&&c.confirm(),c.removeListener("activated",e),c.removeListener("deactivated",t)}}),[c]),S.useEffect((()=>{c&&c.setLayout(a)}),[c,a]),[c]}function Zg(){const e=u(u({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{update(t){var n,r;let{setPages:o,pages:i,isSingleSelect:a,selectDisabled:s,layout:l}=t;this.setPages=o;const c=this.lastRowCount===l.qListObject.qSize.qcy,u=this.lastApprMaxGlyphCount===l.qListObject.qDimensionInfo.qApprMaxGlyphCount;c&&u||(this.lastRowCount=l.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=l.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==i&&void 0!==i&&(e.enginePages=null!=i?i:[],e.selectedInEngine=th(i),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=a,e.selectDisabled=s||e.selectDisabled,e.isDimCalculated=null!==(n=null==l||null===(r=l.qListObject)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r?void 0:r.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[u(u({},n),{},{qState:r}),...t.slice(1)]}));return u(u({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}});return e}const Xg=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function Qg(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Xg(t,"qSelected",0)+Xg(t,"qSelectedExcluded",0)+Xg(t,"qLocked",0)+Xg(t,"qLockedExcluded",0)>0}function Yg(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function eb(e){if("object"==typeof e&&Yg(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const tb={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function nb(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Yg(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in tb}(e)){const t=tb[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function rb(e){let t,n,r;if(Yg(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?eb(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function ob(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function ib(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function ab(e){if(Yg(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?eb(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function sb(e,t){return Yg(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:sb(nb(e))}function lb(e){return Yg(e)?1===e.a?ab(e):sb(e):lb(nb(e))}const cb=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function ub(e){return.2126*cb(e.r)+.7152*cb(e.g)+.0722*cb(e.b)}function db(...e){const t=nb(...e);return t.invalid||ub(t)<.4}function pb(...e){const t=nb(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=ob(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=nb(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>db(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=ab(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=sb(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=lb(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=rb(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=ob(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=ib(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=ib(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>pb(o(18*e)),getDarkenedColor:(e=1)=>pb(o(18*-e))}}function fb(e,t){if(!e||!t)return;const n=ub(e),r=ub(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function hb(e,t){const n=pb("#FFFFFF"),r=pb(e),o=pb(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=fb(n,r),a=fb(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}function mb(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gb,bb,yb,vb="top",Sb="top-right",wb="right",xb="bottom-right",kb="bottom",Cb="bottom-left",Eb="left",Rb="top-left";mb(mb(mb(mb(mb(mb(mb(mb(mb(mb(gb={},"equal-equal",[vb,kb]),"equal-higher",[kb,xb]),"equal-lower",[vb,Sb]),"equal-void",[vb,kb]),"higher-equal",[Eb,Cb,vb,Sb]),"higher-higher-acute",[kb,Cb,Eb,Sb]),"higher-higher-obtuse",[kb,vb]),"higher-lower-negative",[vb,Sb,wb]),"higher-lower-positive",[kb,Cb,Eb]),"higher-void",[vb]),mb(mb(mb(mb(mb(mb(mb(mb(mb(mb(gb,"lower-equal",[vb]),"lower-higher-negative",[vb,Rb]),"lower-higher-positive",[xb]),"lower-lower-acute",[vb,Rb,Eb,Sb,wb]),"lower-lower-obtuse",[vb,kb]),"lower-void",[vb]),"void-equal",[vb]),"void-higher",[vb,kb]),"void-lower",[vb,kb,Eb]),"void-void",[vb]),mb(gb,"unclassified",[vb,kb,wb,Eb,Sb,xb,Cb,Rb]);var Lb=function(){if(yb)return bb;yb=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 bb=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},bb}();function Pb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tb(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ib(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Lb);var Ob=1/.7,_b="\\s*([+-]?\\d+)\\s*",Mb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Db=/^#([0-9a-f]{3,8})$/,Nb=new RegExp(`^rgb\\(${_b},${_b},${_b}\\)$`),Ab=new RegExp(`^rgb\\(${qb},${qb},${qb}\\)$`),zb=new RegExp(`^rgba\\(${_b},${_b},${_b},${Mb}\\)$`),jb=new RegExp(`^rgba\\(${qb},${qb},${qb},${Mb}\\)$`),Fb=new RegExp(`^hsl\\(${Mb},${qb},${qb}\\)$`),$b=new RegExp(`^hsla\\(${Mb},${qb},${qb},${Mb}\\)$`),Bb={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 Wb(){return this.rgb().formatHex()}function Hb(){return this.rgb().formatRgb()}function Ub(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Db.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Vb(t):3===n?new Zb(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Gb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Gb(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=Nb.exec(e))?new Zb(t[1],t[2],t[3],1):(t=Ab.exec(e))?new Zb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=zb.exec(e))?Gb(t[1],t[2],t[3],t[4]):(t=jb.exec(e))?Gb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fb.exec(e))?ny(t[1],t[2]/100,t[3]/100,1):(t=$b.exec(e))?ny(t[1],t[2]/100,t[3]/100,t[4]):Bb.hasOwnProperty(e)?Vb(Bb[e]):"transparent"===e?new Zb(NaN,NaN,NaN,0):null}function Vb(e){return new Zb(e>>16&255,e>>8&255,255&e,1)}function Gb(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zb(e,t,n,r)}function Kb(e){return e instanceof Ib||(e=Ub(e)),e?new Zb((e=e.rgb()).r,e.g,e.b,e.opacity):new Zb}function Jb(e,t,n,r){return 1===arguments.length?Kb(e):new Zb(e,t,n,null==r?1:r)}function Zb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Xb(){return`#${ty(this.r)}${ty(this.g)}${ty(this.b)}`}function Qb(){const e=Yb(this.opacity);return`${1===e?"rgb(":"rgba("}${ey(this.r)}, ${ey(this.g)}, ${ey(this.b)}${1===e?")":`, ${e})`}`}function Yb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ey(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ty(e){return((e=ey(e))<16?"0":"")+e.toString(16)}function ny(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oy(e,t,n,r)}function ry(e){if(e instanceof oy)return new oy(e.h,e.s,e.l,e.opacity);if(e instanceof Ib||(e=Ub(e)),!e)return new oy;if(e instanceof oy)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 oy(a,s,l,e.opacity)}function oy(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function iy(e){return(e=(e||0)%360)<0?e+360:e}function ay(e){return Math.max(0,Math.min(1,e||0))}function sy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pb(Ib,Ub,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Wb,formatHex:Wb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ry(this).formatHsl()},formatRgb:Hb,toString:Hb}),Pb(Zb,Jb,Tb(Ib,{brighter(e){return e=null==e?Ob:Math.pow(Ob,e),new Zb(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Zb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zb(ey(this.r),ey(this.g),ey(this.b),Yb(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:Xb,formatHex:Xb,formatHex8:function(){return`#${ty(this.r)}${ty(this.g)}${ty(this.b)}${ty(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qb,toString:Qb})),Pb(oy,(function(e,t,n,r){return 1===arguments.length?ry(e):new oy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return e=null==e?Ob:Math.pow(Ob,e),new oy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new oy(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 Zb(sy(e>=240?e-240:e+120,o,r),sy(e,o,r),sy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new oy(iy(this.h),ay(this.s),ay(this.l),Yb(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=Yb(this.opacity);return`${1===e?"hsl(":"hsla("}${iy(this.h)}, ${100*ay(this.s)}%, ${100*ay(this.l)}%${1===e?")":`, ${e})`}`}}));const ly=Math.PI/180,cy=180/Math.PI,uy=4/29,dy=6/29,py=3*dy*dy;function fy(e){if(e instanceof hy)return new hy(e.l,e.a,e.b,e.opacity);if(e instanceof vy)return Sy(e);e instanceof Zb||(e=Kb(e));var t,n,r=yy(e.r),o=yy(e.g),i=yy(e.b),a=my((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=my((.4360747*r+.3850649*o+.1430804*i)/.96422),n=my((.0139322*r+.0971045*o+.7141733*i)/.82521)),new hy(116*a-16,500*(t-a),200*(a-n),e.opacity)}function hy(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function my(e){return e>.008856451679035631?Math.pow(e,1/3):e/py+uy}function gy(e){return e>dy?e*e*e:py*(e-uy)}function by(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vy(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Sy(e){if(isNaN(e.h))return new hy(e.l,0,0,e.opacity);var t=e.h*ly;return new hy(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Pb(hy,(function(e,t,n,r){return 1===arguments.length?fy(e):new hy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return new hy(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new hy(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 Zb(by(3.1338561*(t=.96422*gy(t))-1.6168667*(e=1*gy(e))-.4906146*(n=.82521*gy(n))),by(-.9787684*t+1.9161415*e+.033454*n),by(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Pb(vy,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof vy)return new vy(e.h,e.c,e.l,e.opacity);if(e instanceof hy||(e=fy(e)),0===e.a&&0===e.b)return new vy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*cy;return new vy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new vy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return new vy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new vy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Sy(this).rgb()}}));var wy=e=>()=>e;function xy(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):wy(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?xy: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):wy(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Jb(e)).r,(t=Jb(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=xy(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 ky,Cy="center",Ey="bottom";function Ry(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 Ly(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ty)):void 0===t&&(t=Py);for(var n,r,o,i,a,s=new _y(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 _y(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Oy)}function Py(e){return e.children}function Ty(e){return Array.isArray(e)?e[1]:null}function Iy(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Oy(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function _y(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Cy,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Cy,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Cy,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Cy},{key:"DataRangeIncludingZero",alignment:Ey},{key:"LimitedData",alignment:Ey},{key:"NegativeOrZeroValues",alignment:Ey}].reduce((function(e,t){return e[t.key]=t,e}),{}),_y.prototype=Ly.prototype={constructor:_y,count:function(){return this.eachAfter(Ry)},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 Ly(this).eachBefore(Iy)},[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)}},ky=function(e){
|
|
123
|
+
`:null,Sl=bs("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:yl||{animation:`${gl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),wl=bs("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),xl=bs("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ur(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ls((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:vl||{animation:`${bl} 1.4s ease-in-out infinite`}}]})))),kl=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate",...d}=n,p={...n,color:o,disableShrink:i,size:a,thickness:l,value:c,variant:u},f=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Hi({root:["root",n,`color${Ur(r)}`],svg:["svg"],circle:["circle",`circle${Ur(n)}`,o&&"circleDisableShrink"]},hl,t)})(p),h={},m={},g={};if("determinate"===u){const e=2*Math.PI*((ml-l)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return xr.jsx(Sl,{className:Xo(f.root,r),style:{width:a,height:a,...m,...s},ownerState:p,ref:t,role:"progressbar",...g,...d,children:xr.jsx(wl,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:xr.jsx(xl,{className:f.circle,style:h,ownerState:p,cx:ml,cy:ml,r:(ml-l)/2,fill:"none",strokeWidth:l})})})}));function Cl(e){return Yo("MuiButton",e)}const El=ei("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Rl=S.createContext({}),Ll=S.createContext(void 0),Pl=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Tl=bs(dl,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ur(n.color)}`],t[`size${Ur(n.size)}`],t[`${n.variant}Size${Ur(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ls((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${El.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${El.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${El.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${El.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:yi(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${El.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${El.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${El.loading}`]:{color:"transparent"}}}]}}))),Il=bs("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Ur(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Pl]}))),Ol=bs("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Ur(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Pl]}))),_l=bs("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),Ml=bs("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),ql=S.forwardRef((function(e,t){const n=S.useContext(Rl),r=S.useContext(Ll),o=Ps({props:ui(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,id:m,loading:g=null,loadingIndicator:b,loadingPosition:y="center",size:v="medium",startIcon:w,type:x,variant:k="text",...C}=o,E=_i(m),R=b??xr.jsx(kl,{"aria-labelledby":E,color:"inherit",size:16}),L={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:R,loadingPosition:y,size:v,type:x,variant:k},P=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Hi({root:["root",a&&"loading",i,`${i}${Ur(t)}`,`size${Ur(o)}`,`${i}Size${Ur(o)}`,`color${Ur(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Ur(s)}`],startIcon:["icon","startIcon",`iconSize${Ur(o)}`],endIcon:["icon","endIcon",`iconSize${Ur(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Cl,l);return{...l,...c}})(L),T=(w||g&&"start"===y)&&xr.jsx(Il,{className:P.startIcon,ownerState:L,children:w||xr.jsx(Ml,{className:P.loadingIconPlaceholder,ownerState:L})}),I=(p||g&&"end"===y)&&xr.jsx(Ol,{className:P.endIcon,ownerState:L,children:p||xr.jsx(Ml,{className:P.loadingIconPlaceholder,ownerState:L})}),O=r||"",_="boolean"==typeof g?xr.jsx("span",{className:P.loadingWrapper,style:{display:"contents"},children:g&&xr.jsx(_l,{className:P.loadingIndicator,ownerState:L,children:R})}):null;return xr.jsxs(Tl,{ownerState:L,className:Xo(n.className,P.root,l,O),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Xo(P.focusVisible,f),ref:t,type:x,id:g?E:m,...C,classes:P,children:[T,"end"!==y&&_,i,"end"===y&&_,I]})}));var Dl={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"]};const Nl={green:"#00873D",blue:"#3F8AB3",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},Al={mode:"light",palette:{primary:{main:Nl.grey25,contrastText:Nl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Nl.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:Nl.grey100,dark:Nl.grey0},action:{active:"#545454",hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:Nl.grey100,default:Nl.grey100,lightest:Nl.grey100,lighter:Nl.grey98,darker:Nl.grey95,darkest:Nl.grey90},custom:{focusBorder:Nl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:Nl.grey45,disabledContrastText:Nl.grey100},selected:{main:Nl.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:Nl.grey100,selectedContrastText:Nl.grey100,mainContrastText:Nl.grey100,alternativeContrastText:Nl.grey25,excludedContrastText:Nl.grey25,selectedExcludedContrastText:Nl.grey100,possibleContrastText:Nl.grey0},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},zl={mode:"dark",palette:{primary:{main:Nl.grey20,contrastText:Nl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Nl.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:Nl.grey100,dark:Nl.grey0},action:{active:Nl.grey100,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Nl.grey25,lighter:Nl.grey20,darker:Nl.grey15,darkest:Nl.grey10},custom:{focusBorder:Nl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:Nl.grey45,disabledContrastText:Nl.grey100},selected:{main:Nl.green,alternative:Nl.grey20,excluded:Nl.grey10,selectedExcluded:Nl.grey10,possible:Nl.grey80,selectedContrastText:Nl.grey100,mainContrastText:Nl.grey100,alternativeContrastText:Nl.grey100,excludedContrastText:Nl.grey100,selectedExcludedContrastText:Nl.grey100,possibleContrastText:Nl.grey0},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},jl={},Fl=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}}},MuiButton:{styleOverrides:{outlined:{padding:"3px 11px",["&.".concat(El.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(El.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(El.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(El.disabled)]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function $l(e){let t=Al,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=zl));const r=JSON.stringify(t);if(jl[r])return jl[r];const o={palette:u(u({type:t.mode},Dl.palette),t.palette),typography:u({},Dl.typography),shadows:Dl.shadows,shape:u({},Dl.shape)},i=u(u({},o),{},{components:Fl(o)});return jl[r]=fs(i),jl[r].name=n,jl[r]}Jo.configure((e=>"njs-".concat("c075","-").concat(e.replace("Mui",""))));var Bl=w.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Wl={active:!0,select:!0,passive:!0,edit:!1};function Hl(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach((e=>{r[e]=!t[e]})),r}(e);Object.keys(Wl).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Wl[e],n[e]=!Wl[e])})),e.constraints=n,e.interactions=t}var Ul=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],r={},o={get:e=>t[e],set:(n,o)=>{if(void 0===n||"object"==typeof n)throw new Error("Invalid key: ".concat(JSON.stringify(n)));return t[n]=o,r[n]=e({type:"SET",value:o}),o},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));t[e]=null},dispatch:e=>{n.forEach((n=>n(e?{}:t)))},destroy:()=>{Object.keys(r).forEach((e=>{r[e]&&r[e]()}))}};return[()=>{const[,e]=S.useState(t);return S.useEffect((()=>(n.push(e),()=>{const t=n.indexOf(e);n.splice(t,1)})),[e]),[o]},o]};const Vl=S.forwardRef(((e,t)=>{let{initialContext:n,renderCallback:r,modelStore:o,selectionStore:i}=e;const[a,s]=S.useState(n),[l,c]=S.useState(),{theme:u}=S.useMemo((()=>({theme:$l(l)})),[l]),[d,p]=S.useState([]);return S.useEffect((()=>{r&&r()}),[]),S.useImperativeHandle(t,(()=>({setComps(e){p([...e])},setMuiThemeName:c,setContext:e=>s((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t))})),[]),a&&(a.modelStore=o,a.selectionStore=i),w.createElement(Rr,{injectFirst:!0},w.createElement(Es,{theme:u},w.createElement(Bl.Provider,{value:a},d)))}));function Gl(e){let t,{app:n,context:r}=e,o=!1;const i=new Promise((e=>{t=e})),a=w.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","6.0.0-alpha.5"),s.setAttribute("data-app-id",n.id),document.body.appendChild(s),r&&Hl(r);const l=function(e){const[t,n]=Ul({}),[r,o]=Ul({}),[i,a]=Ul({}),[s,l]=Ul({}),[c,u]=Ul({}),[,d]=Ul({}),p=e=>{let{type:t,value:r}=e;const i=d.get(r.id);d.set(r.id,{});const s=()=>{o.clear(r.id),u.set(r.id,{}),u.dispatch(!0)},c=()=>{r.removeListener("closed",c),r.removeListener("changed",s),n.clear(r.id),o.clear(r.id),a.clear(r.id),l.clear(r.id),u.clear(r.id),d.clear(r.id)};return"SET"===t&&(i||(r.on("changed",s),r.once("closed",c))),c},[f,h]=Ul({},p);return{subscribe:e=>{const t=p({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:f,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(n.id),c=function(e){const[t,n]=Ul({}),[r,o]=Ul({}),[i,a]=Ul({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(n.id),u=it.createRoot(s);u.render(w.createElement(Vl,{ref:a,initialContext:r,renderCallback:t,modelStore:l,selectionStore:c}));const d={},p=[],f=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach((t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)}))},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async()=>{await i,f.push(e),p.push(t),a.current.setComps(f)})(),remove(e){o||(async t=>{await i;const n=f.indexOf(e);var r;-1!==n&&(null===(r=p[n])||void 0===r||r.call(p),f.splice(n,1),p.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(f)})()},setMuiThemeName(e){(async()=>{await i,a.current.setMuiThemeName(e)})()},context(e){(async()=>{await i,e&&Hl(e),a.current.setContext(e)})()},destroy(){o=!0,p.forEach((e=>{e&&e()})),l.destroy(),u.unmount(),document.body.removeChild(s)}},l,c,a,i]}const Kl=e=>e.scrollTop;function Jl(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}function Zl(e){return Yo("MuiPaper",e)}ei("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Xl=bs("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(Ls((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),Ql=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiPaper"}),r=ms(),{className:o,component:i="div",elevation:a=1,square:s=!1,variant:l="elevation",...c}=n,u={...n,component:i,elevation:a,square:s,variant:l},d=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return Hi({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Zl,o)})(u);return xr.jsx(Xl,{as:i,ownerState:u,className:Xo(d.root,o),ref:t,...c,style:{..."elevation"===l&&{"--Paper-shadow":(r.vars||r).shadows[a],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[a]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${yi("#fff",Ya(a))}, ${yi("#fff",Ya(a))})`}},...c.style}})}));function Yl(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,f=u[e]||r,h=Ji(d[e],o),{props:{component:m,...g},internalRef:b}=Ki({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),y=Di(b,h?.ref,t.ref),v="root"===e?m||c:m;return[f,Ui(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:y},o)]}function ec(e){return Yo("MuiIconButton",e)}const tc=ei("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),nc=bs(dl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Ur(n.color)}`],n.edge&&t[`edge${Ur(n.edge)}`],t[`size${Ur(n.size)}`]]}})(Ls((({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}))),Ls((({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}}))),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${tc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${tc.loading}`]:{color:"transparent"}})))),rc=bs("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}))),oc=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:p,...f}=n,h=_i(u),m=p??xr.jsx(kl,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:c},b=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Hi({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Ur(r)}`,o&&`edge${Ur(o)}`,`size${Ur(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},ec,t)})(g);return xr.jsxs(nc,{id:d?h:u,className:Xo(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&xr.jsx("span",{className:b.loadingWrapper,style:{display:"contents"},children:xr.jsx(rc,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})}));function ic(e){return Yo("MuiTypography",e)}ei("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ac={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sc=Go,lc=bs("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${Ur(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ls((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${Ur(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),cc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},uc=S.forwardRef((function(e,t){const{color:n,...r}=Ps({props:e,name:"MuiTypography"}),o=sc({...r,...!ac[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=cc,...f}=o,h={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p},m=s||(u?"p":p[d]||cc[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Hi({root:["root",i,"inherit"!==e.align&&`align${Ur(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},ic,a)})(h);return xr.jsx(lc,{as:m,ref:t,className:Xo(g.root,a),...f,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})}));var dc="top",pc="bottom",fc="right",hc="left",mc="auto",gc=[dc,pc,fc,hc],bc="start",yc="end",vc="clippingParents",Sc="viewport",wc="popper",xc="reference",kc=gc.reduce((function(e,t){return e.concat([t+"-"+bc,t+"-"+yc])}),[]),Cc=[].concat(gc,[mc]).reduce((function(e,t){return e.concat([t,t+"-"+bc,t+"-"+yc])}),[]),Ec=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Rc(e){return e?(e.nodeName||"").toLowerCase():null}function Lc(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pc(e){return e instanceof Lc(e).Element||e instanceof Element}function Tc(e){return e instanceof Lc(e).HTMLElement||e instanceof HTMLElement}function Ic(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Lc(e).ShadowRoot||e instanceof ShadowRoot)}var Oc={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Tc(o)&&Rc(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Tc(r)&&Rc(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function _c(e){return e.split("-")[0]}var Mc=Math.max,qc=Math.min,Dc=Math.round;function Nc(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Ac(){return!/^((?!chrome|android).)*safari/i.test(Nc())}function zc(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Tc(e)&&(o=e.offsetWidth>0&&Dc(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Dc(r.height)/e.offsetHeight||1);var a=(Pc(e)?Lc(e):window).visualViewport,s=!Ac()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function jc(e){var t=zc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ic(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $c(e){return Lc(e).getComputedStyle(e)}function Bc(e){return["table","td","th"].indexOf(Rc(e))>=0}function Wc(e){return((Pc(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hc(e){return"html"===Rc(e)?e:e.assignedSlot||e.parentNode||(Ic(e)?e.host:null)||Wc(e)}function Uc(e){return Tc(e)&&"fixed"!==$c(e).position?e.offsetParent:null}function Vc(e){for(var t=Lc(e),n=Uc(e);n&&Bc(n)&&"static"===$c(n).position;)n=Uc(n);return n&&("html"===Rc(n)||"body"===Rc(n)&&"static"===$c(n).position)?t:n||function(e){var t=/firefox/i.test(Nc());if(/Trident/i.test(Nc())&&Tc(e)&&"fixed"===$c(e).position)return null;var n=Hc(e);for(Ic(n)&&(n=n.host);Tc(n)&&["html","body"].indexOf(Rc(n))<0;){var r=$c(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Gc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Kc(e,t,n){return Mc(e,qc(t,n))}function Jc(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Zc(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Xc={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_c(n.placement),l=Gc(s),c=[hc,fc].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Jc("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Zc(e,gc))}(o.padding,n),d=jc(i),p="y"===l?dc:hc,f="y"===l?pc:fc,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=Vc(i),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,v=u[p],S=b-d[c]-u[f],w=b/2-d[c]/2+y,x=Kc(v,w,S),k=l;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Fc(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qc(e){return e.split("-")[1]}var Yc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eu(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=hc,S=dc,w=window;if(c){var x=Vc(n),k="clientHeight",C="clientWidth";if(x===Lc(n)&&"static"!==$c(x=Wc(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),o===dc||(o===hc||o===fc)&&i===yc)S=pc,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,m*=l?1:-1;if(o===hc||(o===dc||o===pc)&&i===yc)v=fc,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-r.width,f*=l?1:-1}var E,R=Object.assign({position:s},c&&Yc),L=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Dc(n*o)/o||0,y:Dc(r*o)/o||0}}({x:f,y:m},Lc(n)):{x:f,y:m};return f=L.x,m=L.y,l?Object.assign({},R,((E={})[S]=y?"0":"",E[v]=b?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},R,((t={})[S]=y?m+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var tu={passive:!0};var nu={left:"right",right:"left",bottom:"top",top:"bottom"};function ru(e){return e.replace(/left|right|bottom|top/g,(function(e){return nu[e]}))}var ou={start:"end",end:"start"};function iu(e){return e.replace(/start|end/g,(function(e){return ou[e]}))}function au(e){var t=Lc(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function su(e){return zc(Wc(e)).left+au(e).scrollLeft}function lu(e){var t=$c(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function cu(e){return["html","body","#document"].indexOf(Rc(e))>=0?e.ownerDocument.body:Tc(e)&&lu(e)?e:cu(Hc(e))}function uu(e,t){var n;void 0===t&&(t=[]);var r=cu(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Lc(r),a=o?[i].concat(i.visualViewport||[],lu(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(uu(Hc(a)))}function du(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pu(e,t,n){return t===Sc?du(function(e,t){var n=Lc(e),r=Wc(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Ac();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+su(e),y:l}}(e,n)):Pc(t)?function(e,t){var n=zc(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):du(function(e){var t,n=Wc(e),r=au(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Mc(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Mc(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+su(e),l=-r.scrollTop;return"rtl"===$c(o||n).direction&&(s+=Mc(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Wc(e)))}function fu(e,t,n,r){var o="clippingParents"===t?function(e){var t=uu(Hc(e)),n=["absolute","fixed"].indexOf($c(e).position)>=0&&Tc(e)?Vc(e):e;return Pc(n)?t.filter((function(e){return Pc(e)&&Fc(e,n)&&"body"!==Rc(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=pu(e,n,r);return t.top=Mc(o.top,t.top),t.right=qc(o.right,t.right),t.bottom=qc(o.bottom,t.bottom),t.left=Mc(o.left,t.left),t}),pu(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hu(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?_c(o):null,a=o?Qc(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case dc:t={x:s,y:n.y-r.height};break;case pc:t={x:s,y:n.y+n.height};break;case fc:t={x:n.x+n.width,y:l};break;case hc:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Gc(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case bc:t[c]=t[c]-(n[u]/2-r[u]/2);break;case yc:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function mu(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?vc:s,c=n.rootBoundary,u=void 0===c?Sc:c,d=n.elementContext,p=void 0===d?wc:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,b=Jc("number"!=typeof g?g:Zc(g,gc)),y=p===wc?xc:wc,v=e.rects.popper,S=e.elements[h?y:p],w=fu(Pc(S)?S:S.contextElement||Wc(e.elements.popper),l,u,a),x=zc(e.elements.reference),k=hu({reference:x,element:v,placement:o}),C=du(Object.assign({},v,k)),E=p===wc?C:x,R={top:w.top-E.top+b.top,bottom:E.bottom-w.bottom+b.bottom,left:w.left-E.left+b.left,right:E.right-w.right+b.right},L=e.modifiersData.offset;if(p===wc&&L){var P=L[o];Object.keys(R).forEach((function(e){var t=[fc,pc].indexOf(e)>=0?1:-1,n=[dc,pc].indexOf(e)>=0?"y":"x";R[e]+=P[n]*t}))}return R}function gu(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Cc:l,u=Qc(r),d=u?s?kc:kc.filter((function(e){return Qc(e)===u})):gc,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=mu(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[_c(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var bu={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,b=_c(g),y=l||(b===g||!h?[ru(g)]:function(e){if(_c(e)===mc)return[];var t=ru(e);return[iu(e),t,iu(t)]}(g)),v=[g].concat(y).reduce((function(e,n){return e.concat(_c(n)===mc?gu(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),S=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,C=v[0],E=0;E<v.length;E++){var R=v[E],L=_c(R),P=Qc(R)===bc,T=[dc,pc].indexOf(L)>=0,I=T?"width":"height",O=mu(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),_=T?P?fc:hc:P?pc:dc;S[I]>w[I]&&(_=ru(_));var M=ru(_),q=[];if(i&&q.push(O[L]<=0),s&&q.push(O[_]<=0,O[M]<=0),q.every((function(e){return e}))){C=R,k=!1;break}x.set(R,q)}if(k)for(var D=function(e){var t=v.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},N=h?3:1;N>0;N--){if("break"===D(N))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function yu(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function vu(e){return[dc,fc,pc,hc].some((function(t){return e[t]>=0}))}var Su={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Cc.reduce((function(e,n){return e[n]=function(e,t,n){var r=_c(e),o=[hc,dc].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[hc,fc].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var wu={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=mu(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=_c(t.placement),y=Qc(t.placement),v=!y,S=Gc(b),w="x"===S?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,E="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,R="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(x){if(i){var T,I="y"===S?dc:hc,O="y"===S?pc:fc,_="y"===S?"height":"width",M=x[S],q=M+g[I],D=M-g[O],N=f?-C[_]/2:0,A=y===bc?k[_]:C[_],z=y===bc?-C[_]:-k[_],j=t.elements.arrow,F=f&&j?jc(j):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=$[I],W=$[O],H=Kc(0,k[_],F[_]),U=v?k[_]/2-N-H-B-R.mainAxis:A-H-B-R.mainAxis,V=v?-k[_]/2+N+H+W+R.mainAxis:z+H+W+R.mainAxis,G=t.elements.arrow&&Vc(t.elements.arrow),K=G?"y"===S?G.clientTop||0:G.clientLeft||0:0,J=null!=(T=null==L?void 0:L[S])?T:0,Z=M+V-J,X=Kc(f?qc(q,M+U-J-K):q,M,f?Mc(D,Z):D);x[S]=X,P[S]=X-M}if(s){var Q,Y="x"===S?dc:hc,ee="x"===S?pc:fc,te=x[w],ne="y"===w?"height":"width",re=te+g[Y],oe=te-g[ee],ie=-1!==[dc,hc].indexOf(b),ae=null!=(Q=null==L?void 0:L[w])?Q:0,se=ie?re:te-k[ne]-C[ne]-ae+R.altAxis,le=ie?te+k[ne]+C[ne]-ae-R.altAxis:oe,ce=f&&ie?function(e,t,n){var r=Kc(e,t,n);return r>n?n:r}(se,te,le):Kc(f?se:re,te,f?le:oe);x[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function xu(e,t,n){void 0===n&&(n=!1);var r=Tc(t),o=Tc(t)&&function(e){var t=e.getBoundingClientRect(),n=Dc(t.width)/e.offsetWidth||1,r=Dc(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Wc(t),a=zc(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Rc(t)||lu(i))&&(s=function(e){return e!==Lc(e)&&Tc(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:au(e);var t}(t)),Tc(t)?((l=zc(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=su(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ku(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Cu(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Eu={placement:"bottom",modifiers:[],strategy:"absolute"};function Ru(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Lu(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Eu:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Eu,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Pc(e)?uu(e):e.contextElement?uu(e.contextElement):[],popper:uu(t)};var u,d,p=function(e){var t=ku(e);return Ec.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((u=[].concat(r,o.options.modifiers),d=u.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(d).map((function(e){return d[e]}))));return o.orderedModifiers=p.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Ru(t,n)){o.rects={reference:xu(t,Vc(n),"fixed"===o.options.strategy),popper:jc(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:Cu((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Ru(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var Pu=Lu({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Lc(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,tu)})),s&&l.addEventListener("resize",n.update,tu),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,tu)})),s&&l.removeEventListener("resize",n.update,tu)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=hu({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:_c(t.placement),variation:Qc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,eu(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,eu(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Oc,Su,bu,wu,Xc,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=mu(t,{elementContext:"reference"}),s=mu(t,{altBoundary:!0}),l=yu(a,r),c=yu(s,o,i),u=vu(l),d=vu(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const Tu=S.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=S.useState(null),s=Di(S.isValidElement(n)?Zi(n):null,t);if(di((()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),di((()=>{if(i&&!o)return Ti(t,i),()=>{Ti(t,null)}}),[t,i,o]),o){if(S.isValidElement(n)){const e={ref:s};return S.cloneElement(n,e)}return n}return i?zs.createPortal(n,i):i}));function Iu(e){return Yo("MuiPopper",e)}function Ou(e){return"function"==typeof e?e():e}ei("MuiPopper",["root"]);const _u={},Mu=S.forwardRef((function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:l,popperOptions:c,popperRef:u,slotProps:d={},slots:p={},TransitionProps:f,ownerState:h,...m}=e,g=S.useRef(null),b=Di(g,t),y=S.useRef(null),v=Di(y,u),w=S.useRef(v);di((()=>{w.current=v}),[v]),S.useImperativeHandle(u,(()=>y.current),[]);const x=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(l,o),[k,C]=S.useState(x),[E,R]=S.useState(Ou(n));S.useEffect((()=>{y.current&&y.current.forceUpdate()})),S.useEffect((()=>{n&&R(Ou(n))}),[n]),di((()=>{if(!E||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{C(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Pu(E,g.current,{placement:x,...c,modifiers:e});return w.current(t),()=>{t.destroy(),w.current(null)}}),[E,i,a,s,c,x]);const L={placement:k};null!==f&&(L.TransitionProps=f);const P=(e=>{const{classes:t}=e;return Hi({root:["root"]},Iu,t)})(e),T=p.root??"div",I=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Ji(n,r),{props:s,internalRef:l}=Ki({...i,externalSlotProps:a});return Ui(t,{...s,ref:Di(l,a?.ref,e.additionalProps?.ref)},r)}({elementType:T,externalSlotProps:d.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:P.root});return xr.jsx(T,{...I,children:"function"==typeof r?r(L):r})})),qu=S.forwardRef((function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:u="bottom",popperOptions:d=_u,popperRef:p,style:f,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=S.useState(!0);if(!s&&!c&&(!h||y))return null;let w;if(o)w=o;else if(n){const e=Ou(n);w=e&&void 0!==e.nodeType?Li(e).body:Li(null).body}const x=c||!s||h&&!y?void 0:"none",k=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return xr.jsx(Tu,{disablePortal:a,container:w,children:xr.jsx(Mu,{anchorEl:n,direction:i,disablePortal:a,modifiers:l,ref:t,open:h?!y:c,placement:u,popperOptions:d,popperRef:p,slotProps:m,slots:g,...b,style:{position:"fixed",top:0,left:0,display:x,...f},TransitionProps:k,children:r})})})),Du=bs(qu,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Nu=S.forwardRef((function(e,t){const n=ra(),r=Ps({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:b,slotProps:y,...v}=r,S=b?.root??a?.Root,w={anchorEl:o,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...v};return xr.jsx(Du,{as:i,direction:n?"rtl":"ltr",slots:{root:S},slotProps:y??s,...w,ref:t})}));function Au(e){return parseInt(e,10)||0}const zu={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function ju(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Fu=S.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:l}=S.useRef(null!=a),c=S.useRef(null),u=Di(t,c),d=S.useRef(null),p=S.useRef(null),f=S.useCallback((()=>{const t=c.current,n=p.current;if(!t||!n)return;const i=Pi(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=Au(i.paddingBottom)+Au(i.paddingTop),l=Au(i.borderBottomWidth)+Au(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let f=u;o&&(f=Math.max(Number(o)*d,f)),r&&(f=Math.min(Number(r)*d,f)),f=Math.max(f,d);return{outerHeightStyle:f+("border-box"===a?s+l:0),overflowing:Math.abs(f-u)<=1}}),[r,o,e.placeholder]),h=qi((()=>{const e=c.current,t=f();if(!e||!t||ju(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n})),m=S.useCallback((()=>{const e=c.current,t=f();if(!e||!t||ju(t))return;const n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""}),[f]),g=S.useRef(-1);di((()=>{const e=Ri(m),t=c?.current;if(!t)return;const n=Pi(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{h()&&(r.unobserve(t),cancelAnimationFrame(g.current),m(),g.current=requestAnimationFrame((()=>{r.observe(t)})))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[f,m,h]),di((()=>{m()}));return xr.jsxs(S.Fragment,{children:[xr.jsx("textarea",{value:a,onChange:e=>{l||m(),n&&n(e)},ref:u,rows:o,style:i,...s}),xr.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:{...zu,...i,paddingTop:0,paddingBottom:0}})]})}));function $u(e){return"string"==typeof e}function Bu({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}const Wu=S.createContext(void 0);function Hu(){return S.useContext(Wu)}function Uu(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Vu(e){return Yo("MuiInputBase",e)}const Gu=ei("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ku;const Ju=(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${Ur(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Zu=(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]},Xu=bs("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ju})(Ls((({theme:e})=>({...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",[`&.${Gu.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),Qu=bs("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Zu})(Ls((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Gu.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Gu.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),Yu=function(e){return function(t){return xr.jsx(Rs,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ed=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:l={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:p,endAdornment:f,error:h,fullWidth:m=!1,id:g,inputComponent:b="input",inputProps:y={},inputRef:v,margin:w,maxRows:x,minRows:k,multiline:C=!1,name:E,onBlur:R,onChange:L,onClick:P,onFocus:T,onKeyDown:I,onKeyUp:O,placeholder:_,readOnly:M,renderSuffix:q,rows:D,size:N,slotProps:A={},slots:z={},startAdornment:j,type:F="text",value:$,...B}=n,W=null!=y.value?y.value:$,{current:H}=S.useRef(null!=W),U=S.useRef(),V=S.useCallback((e=>{}),[]),G=Di(U,v,y.ref,V),[K,J]=S.useState(!1),Z=Hu(),X=Bu({props:n,muiFormControl:Z,states:["color","disabled","error","hiddenLabel","size","required","filled"]});X.focused=Z?Z.focused:K,S.useEffect((()=>{!Z&&d&&K&&(J(!1),R&&R())}),[Z,d,K,R]);const Q=Z&&Z.onFilled,Y=Z&&Z.onEmpty,ee=S.useCallback((e=>{!function(e,t=!1){return e&&(Uu(e.value)&&""!==e.value||t&&Uu(e.defaultValue)&&""!==e.defaultValue)}(e)?Y&&Y():Q&&Q()}),[Q,Y]);di((()=>{H&&ee({value:W})}),[W,ee,H]);S.useEffect((()=>{ee(U.current)}),[]);let te=b,ne=y;C&&"input"===te&&(ne=D?{type:void 0,minRows:D,maxRows:D,...ne}:{type:void 0,maxRows:x,minRows:k,...ne},te=Fu);S.useEffect((()=>{Z&&Z.setAdornedStart(Boolean(j))}),[Z,j]);const re={...n,color:X.color||"primary",disabled:X.disabled,endAdornment:f,error:X.error,focused:X.focused,formControl:Z,fullWidth:m,hiddenLabel:X.hiddenLabel,multiline:C,size:X.size,startAdornment:j,type:F},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return Hi({root:["root",`color${Ur(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Ur(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Vu,t)})(re),ie=z.root||l.Root||Xu,ae=A.root||c.root||{},se=z.input||l.Input||Qu;return ne={...ne,...A.input??c.input},xr.jsxs(S.Fragment,{children:[!p&&"function"==typeof Yu&&(Ku||(Ku=xr.jsx(Yu,{}))),xr.jsxs(ie,{...ae,ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),P&&P(e)},...B,...!$u(ie)&&{ownerState:{...re,...ae.ownerState}},className:Xo(oe.root,ae.className,a,M&&"MuiInputBase-readOnly"),children:[j,xr.jsx(Wu.Provider,{value:null,children:xr.jsx(se,{"aria-invalid":X.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:u,disabled:X.disabled,id:g,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:E,placeholder:_,readOnly:M,required:X.required,rows:D,value:W,onKeyDown:I,onKeyUp:O,type:F,...ne,...!$u(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:G,className:Xo(oe.input,ne.className,M&&"MuiInputBase-readOnly"),onBlur:e=>{R&&R(e),y.onBlur&&y.onBlur(e),Z&&Z.onBlur?Z.onBlur(e):J(!1)},onChange:(e,...t)=>{if(!H){const t=e.target||U.current;if(null==t)throw new Error(at(1));ee({value:t.value})}y.onChange&&y.onChange(e,...t),L&&L(e,...t)},onFocus:e=>{T&&T(e),y.onFocus&&y.onFocus(e),Z&&Z.onFocus?Z.onFocus(e):J(!0)}})}),f,q?q({...X,startAdornment:j}):null]})]})}));function td(e){return Yo("MuiOutlinedInput",e)}const nd={...Gu,...ei("MuiOutlinedInput",["root","notchedOutline","input"])},rd={entering:{opacity:1},entered:{opacity:1}},od=S.forwardRef((function(e,t){const n=ms(),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:u,onEntering:d,onExit:p,onExited:f,onExiting:h,style:m,timeout:g=r,TransitionComponent:b=Gs,...y}=e,v=S.useRef(null),w=Di(v,Zi(a),t),x=e=>t=>{if(e){const n=v.current;void 0===t?e(n):e(n,t)}},k=x(d),C=x(((e,t)=>{Kl(e);const r=Jl({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),E=x(u),R=x(h),L=x((e=>{const t=Jl({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),P=x(f);return xr.jsx(b,{appear:i,in:l,nodeRef:v,onEnter:C,onEntered:E,onEntering:k,onExit:L,onExited:P,onExiting:R,addEndListener:e=>{o&&o(v.current,e)},timeout:g,...y,children:(e,{ownerState:t,...n})=>S.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||l?void 0:"hidden",...rd[e],...m,...a.props.style},ref:w,...n})})}));function id(e){return Yo("MuiBackdrop",e)}ei("MuiBackdrop",["root","invisible"]);const ad=bs("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),sd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:c={},slotProps:u={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Hi({root:["root",n&&"invisible"]},id,t)})(m),b={slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[y,v]=Yl("root",{elementType:ad,externalForwardedProps:b,className:Xo(g.root,o),ownerState:m}),[S,w]=Yl("transition",{elementType:od,externalForwardedProps:b,ownerState:m});return xr.jsx(S,{in:s,timeout:f,...h,...w,children:xr.jsx(y,{"aria-hidden":!0,...v,classes:g,ref:t,children:r})})}));function ld(e){return Yo("MuiBadge",e)}const cd=ei("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ud=bs("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),dd=bs("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ur(n.anchorOrigin.vertical)}${Ur(n.anchorOrigin.horizontal)}${Ur(n.overlap)}`],"default"!==n.color&&t[`color${Ur(n.color)}`],n.invisible&&t.invisible]}})(Ls((({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(fl(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}))));function pd(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const fd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiBadge"}),{anchorOrigin:r,className:o,classes:i,component:a,components:s={},componentsProps:l={},children:c,overlap:u="rectangular",color:d="default",invisible:p=!1,max:f=99,badgeContent:h,slots:m,slotProps:g,showZero:b=!1,variant:y="standard",...v}=n,{badgeContent:S,invisible:w,max:x,displayValue:k}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=Wi({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:f,invisible:p,badgeContent:h,showZero:b}),C=Wi({anchorOrigin:pd(r),color:d,overlap:u,variant:y,badgeContent:h}),E=w||null==S&&"dot"!==y,{color:R=d,overlap:L=u,anchorOrigin:P,variant:T=y}=E?C:n,I=pd(P),O="dot"!==T?k:void 0,_={...n,badgeContent:S,invisible:E,max:x,displayValue:O,showZero:b,anchorOrigin:I,color:R,overlap:L,variant:T},M=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Hi({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ur(n.vertical)}${Ur(n.horizontal)}`,`anchorOrigin${Ur(n.vertical)}${Ur(n.horizontal)}${Ur(o)}`,`overlap${Ur(o)}`,"default"!==t&&`color${Ur(t)}`]},ld,a)})(_),q={slots:{root:m?.root??s.Root,badge:m?.badge??s.Badge},slotProps:{root:g?.root??l.root,badge:g?.badge??l.badge}},[D,N]=Yl("root",{elementType:ud,externalForwardedProps:{...q,...v},ownerState:_,className:Xo(M.root,o),ref:t,additionalProps:{as:a}}),[A,z]=Yl("badge",{elementType:dd,externalForwardedProps:q,ownerState:_,className:M.badge});return xr.jsxs(D,{...N,children:[c,xr.jsx(A,{...z,children:O})]})})),hd=ei("MuiBox",["root"]),md=fs(),gd=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=Pr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(zo),a=S.forwardRef((function(e,a){const s=Wo(n),{className:l,component:c="div",...u}=Go(e);return xr.jsx(i,{as:c,ref:a,className:Xo(l,o?o(r):r),theme:t&&s[t]||s,...u})}));return a}({themeId:st,defaultTheme:md,defaultClassName:hd.root,generateClassName:Jo.generate});function bd(e){return Yo("PrivateSwitchBase",e)}ei("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const yd=bs(dl,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),vd=bs("input",{name:"MuiSwitchBase",shouldForwardProp:gs})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Sd=S.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:c,id:u,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:b,required:y=!1,tabIndex:v,type:S,value:w,slots:x={},slotProps:k={},...C}=e,[E,R]=Mi({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),L=Hu();let P=a;L&&void 0===P&&(P=L.disabled);const T="checkbox"===S||"radio"===S,I={...e,checked:E,disabled:P,disableFocusRipple:s,edge:l},O=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Hi({root:["root",n&&"checked",r&&"disabled",o&&`edge${Ur(o)}`],input:["input"]},bd,t)})(I),_={slots:x,slotProps:{input:d,...k}},[M,q]=Yl("root",{ref:t,elementType:yd,className:O.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...C},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),L&&L.onFocus&&L.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),L&&L.onBlur&&L.onBlur(e)})(t)}}),ownerState:I,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:P,role:void 0,tabIndex:null}}),[D,N]=Yl("input",{ref:p,elementType:vd,className:O.input,externalForwardedProps:_,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;R(t),m&&m(e,t)})(t)}}),ownerState:I,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:P,id:T?u:void 0,name:f,readOnly:b,required:y,tabIndex:v,type:S,..."checkbox"===S&&void 0===w?{}:{value:w}}});return xr.jsxs(M,{...q,children:[xr.jsx(D,{...N}),E?o:c]})}));var wd=_s(xr.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),xd=_s(xr.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kd=_s(xr.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Cd(e){return Yo("MuiCheckbox",e)}const Ed=ei("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Rd=bs(Sd,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ur(n.size)}`],"default"!==n.color&&t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{[`&.${Ed.checked}, &.${Ed.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ed.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),Ld=xr.jsx(xd,{}),Pd=xr.jsx(wd,{}),Td=xr.jsx(kd,{}),Id=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Ld,color:o="primary",icon:i=Pd,indeterminate:a=!1,indeterminateIcon:s=Td,inputProps:l,size:c="medium",disableRipple:u=!1,className:d,slots:p={},slotProps:f={},...h}=n,m=a?s:i,g=a?s:r,b={...n,disableRipple:u,color:o,indeterminate:a,size:c},y=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Hi({root:["root",n&&"indeterminate",`color${Ur(r)}`,`size${Ur(o)}`]},Cd,t);return{...t,...i}})(b),v=f.input??l,[w,x]=Yl("root",{ref:t,elementType:Rd,className:Xo(y.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:f,...h},ownerState:b,additionalProps:{type:"checkbox",icon:S.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:S.cloneElement(g,{fontSize:g.props.fontSize??c}),disableRipple:u,slots:p,slotProps:{input:Ms("function"==typeof v?v(b):v,{"data-indeterminate":a})}}});return xr.jsx(w,{...x,classes:y})}));function Od(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _d(e){return parseInt(Pi(e).getComputedStyle(e).paddingRight,10)||0}function Md(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Od(e,o)}))}function qd(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Dd(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Li(e);return t.body===e?Pi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Bi(Pi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_d(r)+e}px`;const t=Li(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${_d(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Li(r).body;else{const t=r.parentElement,n=Pi(r);e="HTML"===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 Nd=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Ad(e){const t=[],n=[];return Array.from(e.querySelectorAll(Nd)).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 zd(){return!0}function jd(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Ad,isEnabled:a=zd,open:s}=e,l=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),p=S.useRef(null),f=S.useRef(!1),h=S.useRef(null),m=Di(Zi(t),h),g=S.useRef(null);S.useEffect((()=>{s&&h.current&&(f.current=!n)}),[n,s]),S.useEffect((()=>{if(!s||!h.current)return;const e=Li(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),S.useEffect((()=>{if(!s||!h.current)return;const e=Li(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.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!==u.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=i(h.current)),n.length>0){const e=Boolean(g.current?.shiftKey&&"Tab"===g.current?.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 b=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return xr.jsxs(S.Fragment,{children:[xr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),xr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}const Fd=()=>{},$d=new class{constructor(){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&&Od(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);Md(t,e.mount,e.modalRef,r,!0);const o=qd(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=qd(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=Dd(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=qd(this.containers,(t=>t.modals.includes(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&&Od(e.modalRef,t),Md(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&&Od(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Bd(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=S.useRef({}),p=S.useRef(null),f=S.useRef(null),h=Di(f,u),[m,g]=S.useState(!c),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let y=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(y=!1);const v=()=>(d.current.modalRef=f.current,d.current.mount=p.current,d.current),w=()=>{$d.mount(v(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},x=qi((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Li(p.current).body;$d.add(v(),e),f.current&&w()})),k=()=>$d.isTopModal(v()),C=qi((e=>{p.current=e,e&&(c&&k()?w():f.current&&Od(f.current,y))})),E=S.useCallback((()=>{$d.remove(v(),y)}),[y]);S.useEffect((()=>()=>{E()}),[E]),S.useEffect((()=>{c?x():b&&o||E()}),[c,E,b,o,x]);const R=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),l&&l(t,"escapeKeyDown")))},L=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Vi(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:R(r),ref:h}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:L(t),open:c}},getTransitionProps:()=>({onEnter:Ei((()=>{g(!1),i&&i()}),s?.props.onEnter??Fd),onExited:Ei((()=>{g(!0),a&&a(),o&&E()}),s?.props.onExited??Fd)}),rootRef:h,portalRef:C,isTopModal:k,exited:m,hasTransition:b}}function Wd(e){return Yo("MuiModal",e)}ei("MuiModal",["root","hidden","backdrop"]);const Hd=bs("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ls((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),Ud=bs(sd,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Vd=S.forwardRef((function(e,t){const n=Ps({name:"MuiModal",props:e}),{BackdropComponent:r=Ud,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:l,container:c,component:u,components:d={},componentsProps:p={},disableAutoFocus:f=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:m=!1,disablePortal:g=!1,disableRestoreFocus:b=!1,disableScrollLock:y=!1,hideBackdrop:v=!1,keepMounted:w=!1,onBackdropClick:x,onClose:k,onTransitionEnter:C,onTransitionExited:E,open:R,slotProps:L={},slots:P={},theme:T,...I}=n,O={...n,closeAfterTransition:s,disableAutoFocus:f,disableEnforceFocus:h,disableEscapeKeyDown:m,disablePortal:g,disableRestoreFocus:b,disableScrollLock:y,hideBackdrop:v,keepMounted:w},{getRootProps:_,getBackdropProps:M,getTransitionProps:q,portalRef:D,isTopModal:N,exited:A,hasTransition:z}=Bd({...O,rootRef:t}),j={...O,exited:A},F=(e=>{const{open:t,exited:n,classes:r}=e;return Hi({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Wd,r)})(j),$={};if(void 0===l.props.tabIndex&&($.tabIndex="-1"),z){const{onEnter:e,onExited:t}=q();$.onEnter=e,$.onExited=t}const B={slots:{root:d.Root,backdrop:d.Backdrop,...P},slotProps:{...p,...L}},[W,H]=Yl("root",{ref:t,elementType:Hd,externalForwardedProps:{...B,...I,component:u},getSlotProps:_,ownerState:j,className:Xo(a,F?.root,!j.open&&j.exited&&F?.hidden)}),[U,V]=Yl("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>M({...e,onClick:t=>{x&&x(t),e?.onClick&&e.onClick(t)}}),className:Xo(o?.className,F?.backdrop),ownerState:j});return w||R||z&&!A?xr.jsx(Tu,{ref:D,container:c,disablePortal:g,children:xr.jsxs(W,{...H,children:[!v&&r?xr.jsx(U,{...V}):null,xr.jsx(jd,{disableEnforceFocus:h,disableAutoFocus:f,disableRestoreFocus:b,isEnabled:N,open:R,children:S.cloneElement(l,$)})]})}):null}));function Gd(e){return Yo("MuiDivider",e)}const Kd=ei("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Jd=bs("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]}})(Ls((({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:yi(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]})))),Zd=bs("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(Ls((({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]})))),Xd=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,orientation:a="horizontal",component:s=(o||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:p="fullWidth",...f}=n,h={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:p},m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Hi({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"]},Gd,r)})(h);return xr.jsx(Jd,{as:s,className:Xo(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...f,children:o?xr.jsx(Zd,{className:m.wrapper,ownerState:h,children:o}):null})}));function Qd(e){return Yo("MuiFormControlLabel",e)}Xd&&(Xd.muiSkipListHighlight=!0);const Yd=ei("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ep=bs("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Yd.label}`]:t.label},t.root,t[`labelPlacement${Ur(n.labelPlacement)}`]]}})(Ls((({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Yd.disabled}`]:{cursor:"default"},[`& .${Yd.label}`]:{[`&.${Yd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]})))),tp=bs("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ls((({theme:e})=>({[`&.${Yd.error}`]:{color:(e.vars||e).palette.error.main}})))),np=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiFormControlLabel"}),{checked:r,className:o,componentsProps:i={},control:a,disabled:s,disableTypography:l,inputRef:c,label:u,labelPlacement:d="end",name:p,onChange:f,required:h,slots:m={},slotProps:g={},value:b,...y}=n,v=Hu(),w=s??a.props.disabled??v?.disabled,x=h??a.props.required,k={disabled:w,required:x};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===a.props[e]&&void 0!==n[e]&&(k[e]=n[e])}));const C=Bu({props:n,muiFormControl:v,states:["error"]}),E={...n,disabled:w,labelPlacement:d,required:x,error:C.error},R=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Hi({root:["root",n&&"disabled",`labelPlacement${Ur(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},Qd,t)})(E),L={slots:m,slotProps:{...i,...g}},[P,T]=Yl("typography",{elementType:uc,externalForwardedProps:L,ownerState:E});let I=u;return null==I||I.type===uc||l||(I=xr.jsx(P,{component:"span",...T,className:Xo(R.label,T?.className),children:I})),xr.jsxs(ep,{className:Xo(R.root,o),ownerState:E,ref:t,...y,children:[S.cloneElement(a,k),x?xr.jsxs("div",{children:[I,xr.jsxs(tp,{ownerState:E,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):I]})})),rp=S.createContext();function op(e){return Yo("MuiGrid",e)}const ip=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ap=ei("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...ip.map((e=>`grid-xs-${e}`)),...ip.map((e=>`grid-sm-${e}`)),...ip.map((e=>`grid-md-${e}`)),...ip.map((e=>`grid-lg-${e}`)),...ip.map((e=>`grid-xl-${e}`))]);function sp({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const lp=bs("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},..."wrap"!==e.wrap&&{flexWrap:e.wrap}})),(function({theme:e,ownerState:t}){return Br({theme:e},Hr({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${ap.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=Hr({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sp({breakpoints:e.breakpoints.values,values:t})),o=Br({theme:e},t,((t,r)=>{const o=e.spacing(t);return"0px"!==o?{marginTop:`calc(-1 * ${o})`,[`& > .${ap.item}`]:{paddingTop:o}}:n?.includes(r)?{}:{marginTop:0,[`& > .${ap.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=Hr({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=sp({breakpoints:e.breakpoints.values,values:t})),o=Br({theme:e},t,((t,r)=>{const o=e.spacing(t);if("0px"!==o){return{width:`calc(100% + ${o})`,marginLeft:`calc(-1 * ${o})`,[`& > .${ap.item}`]:{paddingLeft:o}}}return n?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${ap.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Hr({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${n})`;c={flexBasis:e,maxWidth:e}}}i={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return 0===e.breakpoints.values[o]?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r}),{})}));const cp=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Hi({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]},op,t)},up=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiGrid"}),{breakpoints:r}=ms(),o=Go(n),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:h="wrap",zeroMinWidth:m=!1,...g}=o,b=p||f,y=s||f,v=S.useContext(rp),w=c?a||12:v,x={},k={...g};r.keys.forEach((e=>{null!=g[e]&&(x[e]=g[e],delete k[e])}));const C={...o,columns:w,container:c,direction:u,item:d,rowSpacing:b,columnSpacing:y,wrap:h,zeroMinWidth:m,spacing:f,...x,breakpoints:r.keys},E=cp(C);return xr.jsx(rp.Provider,{value:w,children:xr.jsx(lp,{ownerState:C,className:Xo(E.root,i),as:l,ref:t,...k})})}));function dp(e){return`scale(${e}, ${e**2})`}const pp={entering:{opacity:1,transform:dp(1)},entered:{opacity:1,transform:"none"}},fp="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),hp=S.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:p,style:f,timeout:h="auto",TransitionComponent:m=Gs,...g}=e,b=Fi(),y=S.useRef(),v=ms(),w=S.useRef(null),x=Di(w,Zi(o),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=k(c),E=k(((e,t)=>{Kl(e);const{duration:n,delay:r,easing:o}=Jl({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=v.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[v.transitions.create("opacity",{duration:a,delay:r}),v.transitions.create("transform",{duration:fp?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)})),R=k(l),L=k(p),P=k((e=>{const{duration:t,delay:n,easing:r}=Jl({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=v.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[v.transitions.create("opacity",{duration:o,delay:n}),v.transitions.create("transform",{duration:fp?o:.666*o,delay:fp?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=dp(.75),u&&u(e)})),T=k(d);return xr.jsx(m,{appear:r,in:a,nodeRef:w,onEnter:E,onEntered:R,onEntering:C,onExit:P,onExited:T,onExiting:L,addEndListener:e=>{"auto"===h&&b.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===h?null:h,...g,children:(e,{ownerState:t,...n})=>S.cloneElement(o,{style:{opacity:0,transform:dp(.75),visibility:"exited"!==e||a?void 0:"hidden",...pp[e],...f,...o.props.style},ref:x,...n})})}));function mp(e){return Yo("MuiIcon",e)}hp&&(hp.muiSupportAuto=!0),ei("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const gp=bs("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ur(n.color)}`],t[`fontSize${Ur(n.fontSize)}`]]}})(Ls((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:e.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:e.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(e.vars||e).palette.action.active}},{props:{color:"disabled"},style:{color:(e.vars||e).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),bp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:a="span",fontSize:s="medium",...l}=n,c={...n,baseClassName:r,color:i,component:a,fontSize:s},u=(e=>{const{color:t,fontSize:n,classes:r}=e;return Hi({root:["root","inherit"!==t&&`color${Ur(t)}`,`fontSize${Ur(n)}`]},mp,r)})(c);return xr.jsx(gp,{as:a,className:Xo(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t,...l})}));function yp(e){return Yo("MuiInputAdornment",e)}bp.muiName="Icon";const vp=ei("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Sp;const wp=bs("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ur(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(Ls((({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vp.positionStart}&:not(.${vp.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]})))),xp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=Hu()||{};let p=c;c&&d.variant,d&&!p&&(p=d.variant);const f={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:l,variant:p},h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Hi({root:["root",n&&"disablePointerEvents",o&&`position${Ur(o)}`,a,r&&"hiddenLabel",i&&`size${Ur(i)}`]},yp,t)})(f);return xr.jsx(Wu.Provider,{value:null,children:xr.jsx(wp,{as:i,ownerState:f,className:Xo(h.root,o),ref:t,...u,children:"string"!=typeof r||s?xr.jsxs(S.Fragment,{children:["start"===l?Sp||(Sp=xr.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]}):xr.jsx(uc,{color:"textSecondary",children:r})})})})),kp=S.createContext({});function Cp(e){return Yo("MuiList",e)}ei("MuiList",["root","padding","dense","subheader"]);const Ep=bs("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Rp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l,...c}=n,u=S.useMemo((()=>({dense:a})),[a]),d={...n,component:i,dense:a,disablePadding:s},p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Hi({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Cp,t)})(d);return xr.jsx(kp.Provider,{value:u,children:xr.jsxs(Ep,{as:i,className:Xo(p.root,o),ref:t,ownerState:d,...c,children:[l,r]})})}));function Lp(e){return Yo("MuiListItem",e)}ei("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const Pp=ei("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Tp(e){return Yo("MuiListItemSecondaryAction",e)}ei("MuiListItemSecondaryAction",["root","disableGutters"]);const Ip=bs("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Op=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=S.useContext(kp),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Hi({root:["root",t&&"disableGutters"]},Tp,n)})(a);return xr.jsx(Ip,{className:Xo(s.root,r),ownerState:a,ref:t,...o})}));Op.muiName="ListItemSecondaryAction";const _p=bs("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.hasSecondaryAction&&t.secondaryAction]}})(Ls((({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Pp.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{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"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]})))),Mp=bs("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),qp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItem"}),{alignItems:r="center",children:o,className:i,component:a,components:s={},componentsProps:l={},ContainerComponent:c="li",ContainerProps:{className:u,...d}={},dense:p=!1,disableGutters:f=!1,disablePadding:h=!1,divider:m=!1,secondaryAction:g,slotProps:b={},slots:y={},...v}=n,w=S.useContext(kp),x=S.useMemo((()=>({dense:p||w.dense||!1,alignItems:r,disableGutters:f})),[r,w.dense,p,f]),k=S.useRef(null),C=S.Children.toArray(o),E=C.length&&(R=C[C.length-1],L=["ListItemSecondaryAction"],S.isValidElement(R)&&-1!==L.indexOf(R.type.muiName??R.type?._payload?.value?.muiName));var R,L;const P={...n,alignItems:r,dense:x.dense,disableGutters:f,disablePadding:h,divider:m,hasSecondaryAction:E},T=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Hi({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Lp,n)})(P),I=Di(k,t),O=y.root||s.Root||_p,_=b.root||l.root||{},M={className:Xo(T.root,_.className,i),...v};let q=a||"li";return E?(q=M.component||a?q:"div","li"===c&&("li"===q?q="div":"li"===M.component&&(M.component="div")),xr.jsx(kp.Provider,{value:x,children:xr.jsxs(Mp,{as:c,className:Xo(T.container,u),ref:I,ownerState:P,...d,children:[xr.jsx(O,{..._,...!$u(O)&&{as:q,ownerState:{...P,..._.ownerState}},...M,children:C}),C.pop()]})})):xr.jsx(kp.Provider,{value:x,children:xr.jsxs(O,{..._,as:q,ref:I,...!$u(O)&&{ownerState:{...P,..._.ownerState}},...M,children:[C,g&&xr.jsx(Op,{children:g})]})})}));function Dp(e){return Yo("MuiListItemIcon",e)}const Np=ei("MuiListItemIcon",["root","alignItemsFlexStart"]),Ap=bs("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(Ls((({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]})))),zp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiListItemIcon"}),{className:r,...o}=n,i=S.useContext(kp),a={...n,alignItems:i.alignItems},s=(e=>{const{alignItems:t,classes:n}=e;return Hi({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Dp,n)})(a);return xr.jsx(Ap,{className:Xo(s.root,r),ownerState:a,ref:t,...o})})),jp=ei("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Fp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function $p(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Bp(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]:n.startsWith(t.keys.join("")))}function Wp(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")&&Bp(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Hp=S.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:u="selectedMenu",...d}=e,p=S.useRef(null),f=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});di((()=>{r&&p.current.focus()}),[r]),S.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${Bi(Pi(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}})),[]);const h=Di(p,t);let m=-1;S.Children.forEach(i,((e,t)=>{S.isValidElement(e)?(e.props.disabled||("selectedMenu"===u&&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 g=S.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),S.cloneElement(e,t)}return e}));return xr.jsx(Rp,{role:"menu",ref:h,className:a,onKeyDown:e=>{const t=p.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=Li(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Wp(t,r,l,s,Fp);else if("ArrowUp"===n)e.preventDefault(),Wp(t,r,l,s,$p);else if("Home"===n)e.preventDefault(),Wp(t,null,l,s,Fp);else if("End"===n)e.preventDefault(),Wp(t,null,l,s,$p);else if(1===n.length){const o=f.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&&Bp(r,o);o.previousKeyMatched&&(l||Wp(t,r,!1,s,Fp,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...d,children:g})}));function Up(e){return Yo("MuiPopover",e)}function Vp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Gp(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Kp(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function Jp(e){return"function"==typeof e?e():e}ei("MuiPopover",["root","paper"]);const Zp=bs(Vd,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Xp=bs(Ql,{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}),Qp=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:l,className:c,container:u,elevation:d=8,marginThreshold:p=16,open:f,PaperProps:h={},slots:m={},slotProps:g={},transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:y,transitionDuration:v="auto",TransitionProps:w={},disableScrollLock:x=!1,...k}=n,C=S.useRef(),E={...n,anchorOrigin:i,anchorReference:s,elevation:d,marginThreshold:p,transformOrigin:b,TransitionComponent:y,transitionDuration:v,TransitionProps:w},R=(e=>{const{classes:t}=e;return Hi({root:["root"],paper:["paper"]},Up,t)})(E),L=S.useCallback((()=>{if("anchorPosition"===s)return a;const e=Jp(o),t=(e&&1===e.nodeType?e:Li(C.current).body).getBoundingClientRect();return{top:t.top+Vp(t,i.vertical),left:t.left+Gp(t,i.horizontal)}}),[o,i.horizontal,i.vertical,a,s]),P=S.useCallback((e=>({vertical:Vp(e,b.vertical),horizontal:Gp(e,b.horizontal)})),[b.horizontal,b.vertical]),T=S.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===s)return{top:null,left:null,transformOrigin:Kp(n)};const r=L();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,c=a+t.width,u=Pi(Jp(o)),d=u.innerHeight-p,f=u.innerWidth-p;if(null!==p&&i<p){const e=i-p;i-=e,n.vertical+=e}else if(null!==p&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==p&&a<p){const e=a-p;a-=e,n.horizontal+=e}else if(c>f){const e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:Kp(n)}}),[o,s,L,P,p]),[I,O]=S.useState(f),_=S.useCallback((()=>{const e=C.current;if(!e)return;const t=T(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)}),[T]);S.useEffect((()=>(x&&window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_))),[o,x,_]);S.useEffect((()=>{f&&_()})),S.useImperativeHandle(r,(()=>f?{updatePosition:()=>{_()}}:null),[f,_]),S.useEffect((()=>{if(!f)return;const e=Ri((()=>{_()})),t=Pi(Jp(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[o,f,_]);let M=v;const q={slots:{transition:y,...m},slotProps:{transition:w,paper:h,...g}},[D,N]=Yl("transition",{elementType:hp,externalForwardedProps:q,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),_()},onExited:t=>{e.onExited?.(t),O(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==v||D.muiSupportAuto||(M=void 0);const A=u||(o?Li(Jp(o)).body:void 0),[z,{slots:j,slotProps:F,...$}]=Yl("root",{ref:t,elementType:Zp,externalForwardedProps:{...q,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:Ms("function"==typeof g.backdrop?g.backdrop(E):g.backdrop,{invisible:!0})},container:A,open:f},ownerState:E,className:Xo(R.root,c)}),[B,W]=Yl("paper",{ref:C,className:R.paper,elementType:Xp,externalForwardedProps:q,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:I?void 0:{opacity:0}},ownerState:E});return xr.jsx(z,{...$,...!$u(z)&&{slots:j,slotProps:F,disableScrollLock:x},children:xr.jsx(D,{...N,timeout:M,children:xr.jsx(B,{...W,children:l})})})}));function Yp(e){return Yo("MuiMenuItem",e)}const ef=ei("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),tf=bs(dl,{shouldForwardProp:e=>gs(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]}})(Ls((({theme:e})=>({...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","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ef.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:yi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ef.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:yi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ef.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:yi(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})`:yi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ef.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ef.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Kd.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Kd.inset}`]:{marginLeft:52},[`& .${jp.root}`]:{marginTop:0,marginBottom:0},[`& .${jp.inset}`]:{paddingLeft:36},[`& .${Np.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Np.root} svg`]:{fontSize:"1.25rem"}}}]})))),nf=S.forwardRef((function(e,t){const n=Ps({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:u,className:d,...p}=n,f=S.useContext(kp),h=S.useMemo((()=>({dense:i||f.dense||!1,disableGutters:s})),[f.dense,i,s]),m=S.useRef(null);di((()=>{r&&m.current&&m.current.focus()}),[r]);const g={...n,dense:h.dense,divider:a,disableGutters:s},b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Hi({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Yp,a);return{...a,...s}})(n),y=Di(m,t);let v;return n.disabled||(v=void 0!==u?u:-1),xr.jsx(kp.Provider,{value:h,children:xr.jsx(tf,{ref:y,role:c,tabIndex:v,component:o,focusVisibleClassName:Xo(b.focusVisible,l),className:Xo(b.root,d),...p,ownerState:g,classes:b})})}));var rf;const of=bs("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:gs})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),af=bs("legend",{name:"MuiNotchedOutlined",shouldForwardProp:gs})(Ls((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));const sf=bs(Xu,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ju})(Ls((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${nd.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${nd.focused} .${nd.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t},style:{[`&.${nd.focused} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${nd.error} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${nd.disabled} .${nd.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),lf=bs((function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return xr.jsx(of,{"aria-hidden":!0,className:r,ownerState:l,...a,children:xr.jsx(af,{ownerState:l,children:s?xr.jsx("span",{children:o}):rf||(rf=xr.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Ls((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}))),cf=bs(Qu,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Zu})(Ls((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),uf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:l,slots:c={},slotProps:u={},type:d="text",...p}=n,f=(e=>{const{classes:t}=e,n=Hi({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},td,t);return{...t,...n}})(n),h=Hu(),m=Bu({props:n,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),g={...n,color:m.color||"primary",disabled:m.disabled,error:m.error,focused:m.focused,formControl:h,fullWidth:o,hiddenLabel:m.hiddenLabel,multiline:s,size:m.size,type:d},b=c.root??r.Root??sf,y=c.input??r.Input??cf,[v,w]=Yl("notchedOutline",{elementType:lf,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:c,slotProps:u},additionalProps:{label:null!=a&&""!==a&&m.required?xr.jsxs(S.Fragment,{children:[a," ","*"]}):a}});return xr.jsx(ed,{slots:{root:b,input:y},slotProps:u,renderSuffix:e=>xr.jsx(v,{...w,notched:void 0!==l?l:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:d,...p,classes:{...f,notchedOutline:null}})}));uf.muiName="Input";var df=_s(xr.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),pf=_s(xr.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const ff=bs("span",{name:"MuiRadioButtonIcon",shouldForwardProp:gs})({position:"relative",display:"flex"}),hf=bs(df,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),mf=bs(pf,{name:"MuiRadioButtonIcon"})(Ls((({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]}))));function gf(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o={...e,checked:t};return xr.jsxs(ff,{className:n.root,ownerState:o,children:[xr.jsx(hf,{fontSize:r,className:n.background,ownerState:o}),xr.jsx(mf,{fontSize:r,className:n.dot,ownerState:o})]})}const bf=S.createContext(void 0);function yf(e){return Yo("MuiRadio",e)}const vf=ei("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),Sf=bs(Sd,{shouldForwardProp:e=>gs(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t[`size${Ur(n.size)}`],t[`color${Ur(n.color)}`]]}})(Ls((({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${vf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yi(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter(fl()).map((([t])=>({props:{color:t,disabled:!1},style:{[`&.${vf.checked}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))));const wf=xr.jsx(gf,{checked:!0}),xf=xr.jsx(gf,{}),kf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiRadio"}),{checked:r,checkedIcon:o=wf,color:i="primary",icon:a=xf,name:s,onChange:l,size:c="medium",className:u,disabled:d,disableRipple:p=!1,slots:f={},slotProps:h={},inputProps:m,...g}=n,b=Hu();let y=d;b&&void 0===y&&(y=b.disabled),y??=!1;const v={...n,disabled:y,disableRipple:p,color:i,size:c},w=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root",`color${Ur(n)}`,"medium"!==r&&`size${Ur(r)}`]};return{...t,...Hi(o,yf,t)}})(v),x=S.useContext(bf);let k=r;const C=Ei(l,x&&x.onChange);let E=s;x&&(void 0===k&&(k=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(x.value,n.value)),void 0===E&&(E=x.name));const R=h.input??m,[L,P]=Yl("root",{ref:t,elementType:Sf,className:Xo(w.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),C(t,...n)}}),ownerState:v,additionalProps:{type:"radio",icon:S.cloneElement(a,{fontSize:a.props.fontSize??c}),checkedIcon:S.cloneElement(o,{fontSize:o.props.fontSize??c}),disabled:y,name:E,checked:k,slots:f,slotProps:{input:"function"==typeof R?R(v):R}}});return xr.jsx(L,{...P,classes:w})}));function Cf(e){return Yo("MuiTooltip",e)}const Ef=ei("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Rf=bs(Nu,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Ls((({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Ef.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ef.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Ef.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Ef.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]})))),Lf=bs("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ur(n.placement.split("-")[0])}`]]}})(Ls((({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:yi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Ef.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Ef.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Ef.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(t=16/14,Math.round(1e5*t)/1e5)+"em",fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Ef.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Ef.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Ef.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Ef.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t}))),Pf=bs("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Ls((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:yi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))));let Tf=!1;const If=new ji;let Of={x:0,y:0};function _f(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Mf=S.forwardRef((function(e,t){const n=Ps({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:o,classes:i,components:a={},componentsProps:s={},describeChild:l=!1,disableFocusListener:c=!1,disableHoverListener:u=!1,disableInteractive:d=!1,disableTouchListener:p=!1,enterDelay:f=100,enterNextDelay:h=0,enterTouchDelay:m=700,followCursor:g=!1,id:b,leaveDelay:y=0,leaveTouchDelay:v=1500,onClose:w,onOpen:x,open:k,placement:C="bottom",PopperComponent:E,PopperProps:R={},slotProps:L={},slots:P={},title:T,TransitionComponent:I,TransitionProps:O,..._}=n,M=S.isValidElement(o)?o:xr.jsx("span",{children:o}),q=ms(),D=ra(),[N,A]=S.useState(),[z,j]=S.useState(null),F=S.useRef(!1),$=d||g,B=Fi(),W=Fi(),H=Fi(),U=Fi(),[V,G]=Mi({controlled:k,default:!1,name:"Tooltip",state:"open"});let K=V;const J=_i(b),Z=S.useRef(),X=qi((()=>{void 0!==Z.current&&(document.body.style.WebkitUserSelect=Z.current,Z.current=void 0),U.clear()}));S.useEffect((()=>X),[X]);const Q=e=>{If.clear(),Tf=!0,G(!0),x&&!K&&x(e)},Y=qi((e=>{If.start(800+y,(()=>{Tf=!1})),G(!1),w&&K&&w(e),B.start(q.transitions.duration.shortest,(()=>{F.current=!1}))})),ee=e=>{F.current&&"touchstart"!==e.type||(N&&N.removeAttribute("title"),W.clear(),H.clear(),f||Tf&&h?W.start(Tf?h:f,(()=>{Q(e)})):Q(e))},te=e=>{W.clear(),H.start(y,(()=>{Y(e)}))},[,ne]=S.useState(!1),re=e=>{$i(e.target)||(ne(!1),te(e))},oe=e=>{N||A(e.currentTarget),$i(e.target)&&(ne(!0),ee(e))},ie=e=>{F.current=!0;const t=M.props;t.onTouchStart&&t.onTouchStart(e)},ae=e=>{ie(e),H.clear(),B.clear(),X(),Z.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(m,(()=>{document.body.style.WebkitUserSelect=Z.current,ee(e)}))},se=e=>{M.props.onTouchEnd&&M.props.onTouchEnd(e),X(),H.start(v,(()=>{Y(e)}))};S.useEffect((()=>{if(K)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Y(e)}}),[Y,K]);const le=Di(Zi(M),A,t);T||0===T||(K=!1);const ce=S.useRef(),ue={},de="string"==typeof T;l?(ue.title=K||!de||u?null:T,ue["aria-describedby"]=K?J:null):(ue["aria-label"]=de?T:null,ue["aria-labelledby"]=K&&!de?J:null);const pe={...ue,..._,...M.props,className:Xo(_.className,M.props.className),onTouchStart:ie,ref:le,...g?{onMouseMove:e=>{const t=M.props;t.onMouseMove&&t.onMouseMove(e),Of={x:e.clientX,y:e.clientY},ce.current&&ce.current.update()}}:{}},fe={};p||(pe.onTouchStart=ae,pe.onTouchEnd=se),u||(pe.onMouseOver=_f(ee,pe.onMouseOver),pe.onMouseLeave=_f(te,pe.onMouseLeave),$||(fe.onMouseOver=ee,fe.onMouseLeave=te)),c||(pe.onFocus=_f(oe,pe.onFocus),pe.onBlur=_f(re,pe.onBlur),$||(fe.onFocus=oe,fe.onBlur=re));const he={...n,isRtl:D,arrow:r,disableInteractive:$,placement:C,PopperComponentProp:E,touch:F.current},me="function"==typeof L.popper?L.popper(he):L.popper,ge=S.useMemo((()=>{let e=[{name:"arrow",enabled:Boolean(z),options:{element:z,padding:4}}];return R.popperOptions?.modifiers&&(e=e.concat(R.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...R.popperOptions,...me?.popperOptions,modifiers:e}}),[z,R.popperOptions,me?.popperOptions]),be=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Hi({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ur(i.split("-")[0])}`],arrow:["arrow"]},Cf,t)})(he),ye="function"==typeof L.transition?L.transition(he):L.transition,ve={slots:{popper:a.Popper,transition:a.Transition??I,tooltip:a.Tooltip,arrow:a.Arrow,...P},slotProps:{arrow:L.arrow??s.arrow,popper:{...R,...me??s.popper},tooltip:L.tooltip??s.tooltip,transition:{...O,...ye??s.transition}}},[Se,we]=Yl("popper",{elementType:Rf,externalForwardedProps:ve,ownerState:he,className:Xo(be.popper,R?.className)}),[xe,ke]=Yl("transition",{elementType:hp,externalForwardedProps:ve,ownerState:he}),[Ce,Ee]=Yl("tooltip",{elementType:Lf,className:be.tooltip,externalForwardedProps:ve,ownerState:he}),[Re,Le]=Yl("arrow",{elementType:Pf,className:be.arrow,externalForwardedProps:ve,ownerState:he,ref:j});return xr.jsxs(S.Fragment,{children:[S.cloneElement(M,pe),xr.jsx(Se,{as:E??Nu,placement:C,anchorEl:g?{getBoundingClientRect:()=>({top:Of.y,left:Of.x,right:Of.x,bottom:Of.y,width:0,height:0})}:N,popperRef:ce,open:!!N&&K,id:J,transition:!0,...fe,...we,popperOptions:ge,children:({TransitionProps:e})=>xr.jsx(xe,{timeout:q.transitions.duration.shorter,...e,...ke,children:xr.jsxs(Ce,{...Ee,children:[T,r?xr.jsx(Re,{...Le}):null]})})})]})}));function qf(){const{useModelStore:e}=S.useContext(Bl).modelStore;return e()}function Df(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=qf(),[o]=function(){const{useRpcRequestSessionModelStore:e}=S.useContext(Bl).modelStore;return e()}(),[i,a]=S.useState();for(var s=arguments.length,l=new Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];return S.useEffect((()=>{if(!t)return;(async()=>{let i=o.get(n);i||(i=t.createSessionObject(e),o.set(n,i));const s=await i;r.set(n,s),a(s)})()}),[t,...l]),[i]}const Nf={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Af(e){return Df(Nf,e)}const zf=e=>new Promise((t=>{setTimeout(t,e)})),jf=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=u(u({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:u({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=u(u({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let a=n.get(r);return a||(a={}),a[o]=i,n.set(r,a),i};function Ff(e,t){const n=e?"".concat(e.id):null,[r]=function(){const{useRpcResultStore:e}=S.useContext(Bl).modelStore;return e()}(),[o,i]=S.useReducer(jf,n?r.get(n):null),[a]=function(){const{useModelChangedStore:e}=S.useContext(Bl).modelStore;return e()}(),[s]=function(){const{useRpcRequestStore:e}=S.useContext(Bl).modelStore;return e()}();let l;n&&(l=s.get(n),l||(l={},s.set(n,l)));const c=async o=>{let a=l[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},l[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{await zf(0);const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),c(!0))}},u={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(l[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{l[t].rpcRetry=!0,c()}};return S.useEffect((()=>{e&&c()}),[e,a.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},u]}function $f(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ff(e,"getLayout");return null!=e&&e.pureLayout&&t?[e.pureLayout,{validating:n,canCancel:r,canRetry:o},i]:[t,{validating:n,canCancel:r,canRetry:o},i]}function Bf(e){return Ff(e,"getAppLayout")}function Wf(){const[e,t]=S.useState(),[n,r]=S.useState(),o=S.useCallback((e=>{e&&t(e)}),[]),i=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return S.useLayoutEffect((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(i);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}}}),[e]),[o,n,e]}function Hf(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Uf(e){let{size:t,style:n={},viewBox:r="0 0 16 16",shapes:o=[]}=e;const i=u({fontSize:Hf(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},n);return w.createElement("i",{style:i},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.map(((e,t)=>{let{type:n,attrs:r}=e;return w.createElement(n,l({key:t},r))}))))}var Vf=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var Gf=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));const Kf=e=>u(u({},e),{},{viewBox:"0 0 12 16",shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]});var Jf=e=>Uf(Kf(e));var Zf=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Xf=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Qf=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=Xf(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},Xf(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Zf(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}(S.PureComponent);const Yf=["S","XS"],eh=e=>e.reduce(((e,t)=>e.concat(t)));function th(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!Yf.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return eh(t)}async function nh(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const rh="RowColumn",oh={row:"".concat(rh,"-row"),rowBorderBottom:"".concat(rh,"-rowBorderBottom"),column:"".concat(rh,"-column"),fieldRoot:"".concat(rh,"-fieldRoot"),cell:"".concat(rh,"-cell"),labelText:"".concat(rh,"-labelText"),labelDense:"".concat(rh,"-labelDense"),highlighted:"".concat(rh,"-highlighted"),checkboxLabel:"".concat(rh,"-checkboxLabel"),icon:"".concat(rh,"-icon"),S:"".concat(rh,"-S"),XS:"".concat(rh,"-XS"),A:"".concat(rh,"-A"),X:"".concat(rh,"-X"),frequencyCount:"".concat(rh,"-frequencyCount"),barContainer:"".concat(rh,"-barContainer"),bar:"".concat(rh,"-bar"),barSelected:"".concat(rh,"-barSelected"),barWithCheckbox:"".concat(rh,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(rh,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(rh,"-excludedTextWithCheckbox")},ih=".".concat(oh.fieldRoot),ah=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function sh(e){var t;let{selectionState:n,selections:r,checkboxes:o=!1,doc:i=document,loaderRef:a}=e;const s=S.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});S.useEffect((()=>{var e;if(null===(e=a.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=a.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}}),[null===(t=a.current)||void 0===t||null===(t=t._listRef)||void 0===t?void 0:t._outerRef]);const l=async()=>{var e;return(null===(e=n.selectDisabled)||void 0===e||!e.call(n))&&(n.setSelectableValuesUpdating(),nh({selections:r,elemNumbers:s.current.elemNumbers,isSingleSelect:n.isSingleSelect,toggle:s.current.toggle}))},c=(e,t)=>{const r=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return eh(t)}(n.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],r)},u=e=>{const{startElemNumber:t}=s.current;if(t===e)return;const r=c(s.current.startElemNumber,e);n.updateItems(r,!0,s.current.elemNumbers)},d=S.useCallback((e=>{if(n.selectDisabled())return;const t=+e.target.getAttribute("data-n"),r=!n.isSingleSelect&&ah(e.nativeEvent);s.current.elemNumbers=[t],s.current.toggle=r,r||n.clearItemStates(!0),n.updateItem(t),s.current.active=!1,l()}),[]),p=S.useCallback((e=>{if(0!==e.button||n.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),r=!n.isSingleSelect&&ah(e);s.current.isRange=!1,s.current.startElemNumber=t,s.current.elemNumbers=[t],s.current.toggle=r,s.current.active=!0,r||n.clearItemStates(!0),n.updateItem(t),n.isSingleSelect&&(s.current.active=!1,l()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),f=S.useCallback((e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");u(t)}l()}}),[]),h=S.useCallback((e=>{0===e.button&&s.current.active&&(s.current.active=!1,l())}),[]),m=S.useCallback((e=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,n.isSelected(s.current.startElemNumber)||(n.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");u(t)}),[]),g=S.useCallback((e=>{var t,r;if(s.current.active||s.current.isRange||n.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void l();const o=Number(null===(t=e.touches[0].target)||void 0===t||null===(t=t.closest(ih))||void 0===t?void 0:t.getAttribute("data-n")),i=Number(null===(r=e.touches[1].target)||void 0===r||null===(r=r.closest(ih))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void l();s.current.active=!0;c(o,i).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[o,i]}),[]),b=S.useCallback((()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,u(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,l()}),[]);S.useEffect((()=>(i.addEventListener("mouseup",h),()=>{i.removeEventListener("mouseup",h)})),[h]),S.useEffect((()=>{const e=()=>{n.clearItemStates(!1)},t=()=>{n.clearItemStates(!0),n.triggerStateChanged()};return r.on("clearItemStates",e),r.on("deactivated",e),r.on("cleared",t),()=>{r.removeListener("clearItemStates",e),r.removeListener("deactivated",e),r.removeListener("cleared",t)}}),[r]);const y={};return o?Object.assign(y,{onChange:d}):Object.assign(y,{onMouseUp:f,onMouseDown:p,onMouseEnter:m,onTouchStart:g,onTouchEnd:b}),{interactionEvents:y,select:async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null!==(e=n.selectDisabled)&&void 0!==e&&e.call(n))return!1;const a=!n.isSingleSelect&&ah(null==i?void 0:i.nativeEvent);a||n.clearItemStates(!0);const s=[];return n.updateItems(t,o,s),n.setSelectableValuesUpdating(),nh({selections:r,elemNumbers:o?s:t,isSingleSelect:n.isSingleSelect,toggle:a})}}}const lh=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ch=e=>Uf(lh(e));const uh=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,dh=e=>{let{cell:t,checkboxes:n}=e;return((e=>e?"A"===e.qState:null)(t)||uh(t))&&n};const ph=e=>{let{column:t,histogram:n,cell:r,showGray:o}=e;if(!r)return[];const i=[t?oh.column:oh.row];n||i.push(oh.rowBorderBottom);const a=function(e){let t,{cell:n,showGray:r}=e;switch(n.qState){case"XS":t=r?oh.XS:oh.S;break;case"S":case"L":t=oh.S;break;case"A":t=!!r&&oh.A;break;case"X":case"XL":t=!!r&&oh.X;break;default:t=!1}return t}({cell:r,showGray:o});return a&&i.push(a),i},fh=9,hh=4,mh=7,gh=12+2*(mh+1),bh=80,yh=10,vh=150,Sh=56,wh=20,xh="-",kh=32,Ch=29,Eh=20,Rh=4,Lh=e=>e.filter((e=>!!e)).join(" ").trim(),Ph=e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")},Th=e=>e||xh,Ih=["backgroundColor"],Oh=e=>{let{sizes:t,frequencyMode:n,isGridMode:r,freqHitsValue:o}=e;if("P"===n)return"".concat(t.freqMinWidth,"px");return r&&!o?"max-content":"25%"},_h=e=>{let{sizes:t,frequencyMode:n,isGridMode:r}=e;return r?"max-content":"P"===n?t.freqMinWidth:t.freqMaxWidth},Mh=e=>{let{theme:t,checkboxes:n,styles:r,selectionState:o}=e;if(n)return"selected"===o?{["& .".concat(oh.labelText)]:{color:r.selections.selected}}:{};const i=r.selections,a=i[o],s=i["".concat(o,"Contrast")];return{background:a,color:s,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0},["& .".concat(oh.labelText)]:{color:s},["& .".concat(oh.icon)]:{color:s}}},qh={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Dh=bs("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})((e=>{let{theme:t,checkboxes:n,isGridMode:r,isGridCol:o,dense:i,direction:a,sizes:s,frequencyMode:l,freqHitsValue:c,styles:p}=e;const f=p.content,{backgroundColor:h}=f,m=d(f,Ih),g=Mh({theme:t,styles:p,checkboxes:n,selectionState:"selected"}),b=Mh({theme:t,styles:p,checkboxes:n,selectionState:"excluded"}),y={height:"100%",transition:"width 0.2s",border:"".concat(1,"px solid"),borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},v={opacity:"30%"};return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(oh.row)]:u({flexWrap:"nowrap"},p.content),["& .".concat(oh.rowBorderBottom)]:{borderBottom:o?"none":"1px solid ".concat(t.palette.divider),borderLeft:o?"1px solid ".concat(t.palette.divider):"none"},["& .".concat(oh.column)]:u({flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider)},p.content),["& .".concat(oh.cell)]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:n?"52px":"26px",flexBasis:n?"auto":"max-content",paddingLeft:"".concat(fh,"px"),paddingRight:0},["& .".concat(oh.labelText)]:u(u({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},qh),m),["& .".concat(oh.labelDense)]:{lineHeight:"18px"},["& .".concat(oh.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(oh.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":u(u({},qh),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(oh.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:m.color},["& .".concat(oh.S)]:u(u({},g),{},{border:r?"none":void 0}),["& .".concat(oh.XS)]:u(u({},Mh({theme:t,styles:p,checkboxes:n,selectionState:"selectedExcluded"})),{},{border:r?"none":void 0}),["& .".concat(oh.A)]:u(u({},Mh({theme:t,styles:p,checkboxes:n,selectionState:"alternative"})),{},{border:r?"none":void 0}),["& .".concat(oh.X)]:u(u({},b),{},{border:r?"none":void 0}),["& .".concat(oh.X,", & .").concat(oh.XS)]:{border:r?"none":void 0,["& .".concat(oh.barSelected," .bar-filled")]:u({},y)},["& .".concat(oh.frequencyCount)]:u(u({zIndex:3,justifyContent:"flex-end"},qh),{},{flex:"0 0 ".concat(Oh({sizes:s,frequencyMode:l,isGridMode:r,freqHitsValue:c})),minWidth:!r&&"P"!==l&&c?s.freqMinWidth:"max-content",maxWidth:_h({sizes:s,frequencyMode:l,isGridMode:r}),textAlign:"rtl"===a?"left":"right",paddingLeft:"rtl"!==a?"8px":0}),["&.".concat(oh.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(oh.bar)]:{height:i?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":u({},y)},["& .".concat(oh.barSelected)]:{"& .bar-filled":u({},v)},["& .".concat(oh.barWithCheckbox)]:{left:"rtl"===a?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(oh.barSelectedWithCheckbox)]:{"& .bar-filled":u(u({},v),{},{backgroundColor:p.selections.selected||"#BFE5D0",borderColor:p.selections.selected})},["& .".concat(oh.excludedTextWithCheckbox)]:{color:p.content.color,fontStyle:"italic"}}}));var Nh=w.memo(Dh);const Ah="ListBoxCheckbox",zh={cbIcon:"".concat(Ah,"-cbIcon"),cbIconChecked:"".concat(Ah,"-cbIconChecked"),cbIconExcluded:"".concat(Ah,"-cbIconExcluded"),cbIconAlternative:"".concat(Ah,"-cbIconAlternative"),checkbox:"".concat(Ah,"-checkbox"),dense:"".concat(Ah,"-dense")},jh=bs(Id,{shouldForwardProp:e=>"styles"!==e})((e=>{let{styles:t}=e;return{["& .".concat(zh.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(zh.cbIconChecked)]:{borderRadius:3,backgroundColor:t.selections.selected,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(zh.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.excluded},["& .".concat(zh.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.alternative},["&.".concat(zh.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(zh.dense)]:{padding:"4px 8px"}}})),Fh=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return w.createElement("span",{className:e.cbIcon},n&&w.createElement("span",{className:t&&n?e.cbIconExcluded:""}))};function $h(e){let{onChange:t,checked:n,label:r,dense:o,excluded:i,styles:a,showGray:s=!0,dataN:l}=e;return w.createElement(jh,{edge:"start",onChange:t,checked:n,disableRipple:!0,className:[zh.checkbox,o&&zh.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r,"data-n":l},name:r,icon:Fh(zh,s,i),checkedIcon:w.createElement("span",{className:zh.cbIconChecked}),styles:a})}const Bh={radioButton:"".concat("ListBoxRadioButton","-radioButton")},Wh=bs(kf,{shouldForwardProp:e=>!["dense","styles"].includes(e)})((e=>{let{checked:t,styles:n,dense:r}=e;return{["&.".concat(Bh.radioButton)]:{right:"5px",color:t?n.selections.selected:n.content.color,padding:r?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}}));function Hh(e){let{onChange:t,checked:n,label:r,dense:o,dataN:i,styles:a}=e;return w.createElement(Wh,{checked:n,onChange:t,value:r,name:r,className:Bh.radioButton,inputProps:{"data-n":i},disableRipple:!0,size:o?"small":"medium",dense:o,styles:a})}function Uh(e){let{label:t,dense:n,showGray:r=!0,checkboxes:o,cell:i,valueTextAlign:a}=e;return w.createElement(uc,{component:"span",variant:"body2",className:Lh([oh.labelText,n&&oh.labelDense,r&&dh({cell:i,checkboxes:o})&&oh.excludedTextWithCheckbox]),align:a,dir:"auto"},w.createElement("span",null,t))}function Vh(e){let{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:s}=e;return"string"==typeof t?w.createElement(Uh,{label:t,color:n,dense:r,showGray:o,checkboxes:i,cell:a,valueTextAlign:s}):t}function Gh(e){let{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}=e;const f=w.createElement($h,{onChange:t,label:n,checked:o,dense:i,excluded:uh(a),isGridCol:s,showGray:l,dataN:r,styles:p}),h=w.createElement(Hh,{onChange:t,label:n,checked:o,dense:i,dataN:r,styles:p});return w.createElement(np,{control:c?h:f,className:oh.checkboxLabel,label:w.createElement(Vh,{label:n,dense:i,showGray:l,checkboxes:u,cell:a,valueTextAlign:d}),key:r})}function Kh(e){let{labels:t,dense:n,showGray:r,checkboxes:o}=e;const i=t.map(((e,t)=>{let[n,r]=e;return w.createElement("span",{id:t,className:r?oh.highlighted:""},n)}));return w.createElement(Uh,{label:i,dense:n,showGray:r,checkboxes:o})}function Jh(e){let{onChange:t,labels:n,checkboxes:r,dense:o,showGray:i,qElemNumber:a,isSelected:s,cell:l,isGridCol:c,isSingleSelect:u,valueTextAlign:d,styles:p}=e;const f=w.createElement(Kh,{labels:n,dense:o,showGray:i,checkboxes:r});return r?w.createElement(Gh,{onChange:t,label:f,qElemNumber:a,isSelected:s,dense:o,cell:l,isGridCol:c,showGray:i,isSingleSelect:u,checkboxes:r,valueTextAlign:d,styles:p}):f}var Zh=w.memo((function(e){let{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}=e;return u?w.createElement(Gh,{onChange:t,label:n,qElemNumber:r,isSelected:o,dense:i,cell:a,isGridCol:s,showGray:l,isSingleSelect:c,checkboxes:u,valueTextAlign:d,styles:p}):w.createElement(Uh,{label:n,dense:i,showGray:!0,checkboxes:u,cell:a,valueTextAlign:d})}));function Xh(e){let{qFrequency:t,histogram:n,checkboxes:r,isSelected:o,frequencyMax:i}=e;if(!(t&&n&&Th(t)!==xh))return;const a=Ph({qFrequency:t,frequencyMax:i});return w.createElement(gd,{className:Lh([oh.bar,r&&oh.barWithCheckbox,o&&(r?oh.barSelectedWithCheckbox:oh.barSelected)])},w.createElement(gd,{className:"bar-filled",width:a}))}function Qh(e){let{cell:t,checkboxes:n,dense:r,showGray:o}=e;const i=Th(null==t?void 0:t.qFrequency);return w.createElement(up,{item:!0,style:{display:"flex",alignItems:"center"},className:oh.frequencyCount,"aria-label":i,title:i},w.createElement(uc,{noWrap:!0,color:"inherit",variant:"body2",className:Lh([r&&oh.labelDense,oh.labelText,o&&dh({cell:t,checkboxes:n})&&oh.excludedTextWithCheckbox])},i))}function Yh(e){let{dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:o}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:o?"100%":"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const em=bs(up,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:i,fillHeight:a}=e;const s="padding".concat("rtl"===i?"Left":"Right");return{["&.".concat(oh.fieldRoot)]:u(u({},Yh({dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:a})),{},{[s]:o?"8px":void 0})}}));const tm=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===tm.ARROW_UP||e===tm.ARROW_DOWN||e===tm.ARROW_LEFT||e===tm.ARROW_RIGHT});function nm(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function rm(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))||(null==e?void 0:e.closest(".qv-gs-listbox"))}function om(e){let{containerRef:t,enabled:n}=e;const[r,o]=S.useState(!1),i={enabled:n,active:r,innerTabStops:!n||r,blur(e){var r;if(!n)return;o(!1);const i=rm(t.current)||(null===(r=t.current)||void 0===r?void 0:r.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),nm(t.current),e&&i&&(i.setAttribute("tabIndex",0),t.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!n)return;o(!0);const e=t.current,r=null==e?void 0:e.querySelector(".search input"),i=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),s=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==e?void 0:e.querySelector("#listbox-unlock-button"),c=(null==e?void 0:e.querySelector(".listbox-cyclic-button"))||r||i||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const im=e=>+e.getAttribute("data-n"),am=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},sm=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused"),n=null==e?void 0:e.querySelector(".value.selector"),r=null==e?void 0:e.querySelector(".value"),o=t||n||r;return null==o||o.setAttribute("tabIndex",0),null==o||o.focus(),nm(e),o},lm=e=>{const t=null==e?void 0:e.querySelector(".listbox-cyclic-button:not(:disabled)");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},cm=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=rm(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{nm(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}},um=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:s}=e;const l=e=>{let t;return"row"===i?(t=s%o,e<t?r:r-1):(t=s%r,e<o-1?r:t)};let c=t,u=n;if(a===tm.ARROW_DOWN)if(t>=l(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=l(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=s%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};const dm={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function pm(e){var t,n;let{index:r,rowIndex:o,columnIndex:i,style:a,data:s}=e;const{onChange:l,onClick:c,onMouseDown:d,onMouseUp:p,onMouseEnter:f,onTouchStart:h,onTouchEnd:m,pages:g,isLocked:b,column:y=!1,checkboxes:v=!1,textAlign:x,direction:k,layoutOptions:C={},freqIsAllowed:E,isSingleSelect:R,actions:L,frequencyMax:P="",histogram:T=!1,keyboard:I,showGray:O=!0,showTick:_=!0,columnCount:M=1,rowCount:q=1,dataOffset:D,deducedFrequencyMode:N,focusListItems:A,listCount:z,sizes:j,translator:F,showSearch:$,isModal:B,contentFontStyle:W,styles:H,fillHeight:U}=s,{dense:V=!1,dataLayout:G="singleColumn",layoutOrder:K}=C,{itemPadding:J}=j;let Z,X;const Q={max:null,currentIndex:null};if("number"==typeof o&&"number"==typeof i){"row"===K?(Z=o*M+i,Q.max=q,Q.currentIndex=o):(Z=i*q+o,Q.max=M,Q.currentIndex=i);const e=0;X=u(u({},a),{},{height:U?"100%":a.height,left:e+(0===i?a.left:Number(a.left)+i*e),top:0===o?a.top:Number(a.top)+o*e})}else Z=r,Q.max=z,Q.currentIndex=r,X=u({},a);Z+=D;const[Y,ee]=S.useState(null);S.useEffect((()=>{null!==Y&&(0===Q.currentIndex&&A.first&&(Y.focus(),A.setFirst(!1)),Q.currentIndex===Q.max-1&&A.last&&(Y.focus(),A.setLast(!1)))}),[Y,A.first,A.last]);const te=S.useCallback(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:s,keyboard:l,isModal:c,rowCount:u,columnCount:d,rowIndex:p,columnIndex:f,layoutOrder:h}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===tm.ARROW_LEFT||e===tm.ARROW_RIGHT||"number"!=typeof p||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=um({rowIndex:p,columnIndex:f,rowCount:u,columnCount:d,layoutOrder:h,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const b=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:p}=e,{keyCode:f,shiftKey:h=!1,ctrlKey:y=!1,metaKey:v=!1}=p;switch(f){case tm.TAB:{const t=d.closest(".listbox-container"),n=void 0!==c?c():void 0;if(d.classList.add("last-focused"),null==l||!l.enabled){if(!n)return;return l.focusSelection(),e.preventDefault(),void e.stopPropagation()}if(h){am(t)||lm(t)||(n?l.focusSelection():cm(e,l));break}l.focusSelection()||lm(t)||am(t)||(d.blur(),cm(e,l));break}case tm.SHIFT:b(!0);break;case tm.SPACE:t([im(d)],!1,e);break;case tm.ARROW_DOWN:case tm.ARROW_RIGHT:u=m(f,d,!0),h&&u&&(g&&(t([im(d)],!0),b(!1)),t([im(u)],!0));break;case tm.ARROW_UP:case tm.ARROW_LEFT:u=m(f,d,!1),h&&u&&(g&&(t([im(d)],!0),b(!1)),t([im(u)],!0));break;case tm.ENTER:if(o(),void 0===c)return;break;case tm.ESCAPE:if(void 0===c)return void i();if(!c())return;i();break;case tm.HOME:if(s.setFirst(!0),y){null==a||a("overflowStart");break}null==a||a("start");break;case tm.END:if(s.setLast(!0),y){null==a||a("overflowEnd");break}null==a||a("end");break;case tm.A:if(y||v){n();break}return;case tm.F:if(y||v){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(u(u({},L),{},{focusListItems:A,keyboard:I,isModal:B,rowCount:q,columnCount:M,rowIndex:o,columnIndex:i,layoutOrder:K})),[L,null==I?void 0:I.innerTabStops,q,M,o,i,K]),ne=S.useMemo((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:g,cellIndex:Z})),[g,Z]),re="S"===(null==ne?void 0:ne.qState)||"XS"===(null==ne?void 0:ne.qState)||"L"===(null==ne?void 0:ne.qState)||"XL"===(null==ne?void 0:ne.qState),oe=S.useMemo((()=>ph({column:y,histogram:T,cell:ne,showGray:O})),[null==ne?void 0:ne.qState,T,V]),ie=S.useCallback((e=>{e.preventDefault()}),[v]),ae=S.useMemo((()=>ne&&function(e){let{direction:t,cell:n,textAlign:r}=e;const o=!["NaN",void 0].includes(null==n?void 0:n.qNum);let i;return i=!r||r.auto?o?"rtl"===t?"left":"right":{rtl:"right",ltr:"left"}[t]:(null==r?void 0:r.align)||"left",["left","center","right"].includes(i)?i:"left"}({direction:k,cell:ne,textAlign:x})),[k,ne,x]);if(!ne)return null;const se="grid"===G&&"column"===K,le=null!==(t=null==ne?void 0:ne.qText)&&void 0!==t?t:"";let ce;if(null!==(n=ne.qHighlightRanges)&&void 0!==n&&null!==(n=n.qRanges)&&void 0!==n&&n.length){const e=ne.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];ce=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(le,e)}const ue={alignItems:"center",display:"flex",fontSize:"8px"},de="rtl"===k,pe={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:de?8:v?0:void 0,paddingRight:v?0:de?8:0,justifyContent:ae,textAlign:ae},fe=0===r,he=re&&b,me=!v&&re&&!b,ge=!v&&_,be=v||!_,ye=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:s}=e;const l=dm[r],c=t.get(l),u=[];if(o){const e=s?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),p=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,p),u.join(". ").trim()}({translator:F,label:le,qState:ne.qState,currentIndex:Q.currentIndex,maxIndex:Q.max,showSearch:$}),ve=!de&&"right"===ae||de&&"left"===ae;return w.createElement(Nh,{className:oh.barContainer,checkboxes:v,style:X,styles:H,isGridCol:se,isGridMode:"grid"===G,dense:V,direction:k,sizes:j,frequencyMode:N,freqHitsValue:ve,contentFontStyle:W,"data-testid":"listbox.item"},w.createElement(em,{role:"row","aria-label":ye,"aria-selected":re,"aria-setsize":Q.max,"aria-rowindex":Q.currentIndex,ref:ee,container:!0,dataLayout:G,cellPaddingRight:be,layoutOrder:K,itemPadding:J,gap:0,className:Lh(["value",...oe]),classes:{root:oh.fieldRoot},onClick:c,onMouseDown:d,onMouseUp:p,onMouseEnter:f,onKeyDown:te,onTouchStart:h,onTouchEnd:m,onContextMenu:ie,tabIndex:fe&&I.innerTabStops?0:-1,"data-n":null==ne?void 0:ne.qElemNumber,direction:k,fillHeight:U},(null==ne?void 0:ne.qFrequency)&&w.createElement(Xh,{qFrequency:null==ne?void 0:ne.qFrequency,histogram:T,checkboxes:v,isSelected:re,frequencyMax:P}),w.createElement(up,{item:!0,style:pe,className:Lh([oh.cell,oh.selectedCell]),title:"".concat(le)},ce?w.createElement(Jh,{onChange:l,labels:ce,checkboxes:v,dense:V,showGray:O,qElemNumber:ne.qElemNumber,isSelected:re,cell:ne,isGridCol:se,isSingleSelect:R,valueTextAlign:ae,styles:H}):w.createElement(Zh,{onChange:l,label:le,qElemNumber:ne.qElemNumber,isSelected:re,dense:V,cell:ne,isGridCol:se,showGray:O,isSingleSelect:R,checkboxes:v,valueTextAlign:ae,styles:H})),E&&w.createElement(Qh,{cell:ne,checkboxes:v,dense:V,showGray:O}),ge&&w.createElement(up,{item:!0,className:oh.icon},he&&w.createElement(Gf,{style:ue,size:"small"}),me&&w.createElement(ch,{style:ue,size:"small"}))))}var fm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function hm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||fm(r)&&fm(o)))return!1;var r,o;return!0}function mm(e,t){var n;void 0===t&&(t=hm);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var gm="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function bm(e){cancelAnimationFrame(e.id)}function ym(e,t){var n=gm();var r={id:requestAnimationFrame((function o(){gm()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var vm=-1;function Sm(e){if(void 0===e&&(e=!1),-1===vm||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),vm=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return vm}var wm=null;function xm(e){if(void 0===e&&(e=!1),null===wm||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?wm="positive-descending":(t.scrollLeft=1,wm=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),wm}return wm}var km=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Cm(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Js(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Js(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=mm((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=mm((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=mm((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(xm()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&bm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}As(t,e),t.getDerivedStateFromProps=function(e,t){return Em(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Sm();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(xm()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&bm(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?km:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,y=e.useIsScrolling,v=e.width,w=this.state.isScrolling,x=this._getHorizontalRangeToRender(),k=x[0],C=x[1],E=this._getVerticalRangeToRender(),R=E[0],L=E[1],P=[];if(r>0&&g)for(var T=R;T<=L;T++)for(var I=k;I<=C;I++)P.push(S.createElement(t,{columnIndex:I,data:d,isScrolling:y?w:void 0,key:f({columnIndex:I,data:d,rowIndex:T}),rowIndex:T,style:this._getItemStyle(T,I)}));var O=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return S.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:lt({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},S.createElement(c||u||"div",{children:P,ref:l,style:{height:O,pointerEvents:w?"none":void 0,width:_}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,y=m.scrollTop,v=m.scrollUpdateWasRequested,S=m.verticalScrollDirection;this._callOnScroll(b,y,g,S,v)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Em=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Rm=function(e,t){return e};function Lm(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Js(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Js(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=mm((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=mm((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=mm((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(xm()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&bm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}As(t,e),t.getDerivedStateFromProps=function(e,t){return Pm(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Sm():0:l.scrollHeight>l.clientHeight?Sm():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(xm()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&bm(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?Rm:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,y=e.width,v=this.state.isScrolling,w="horizontal"===o||"horizontal"===f,x=w?this._onScrollHorizontal:this._onScrollVertical,k=this._getRangeToRender(),C=k[0],E=k[1],R=[];if(c>0)for(var L=C;L<=E;L++)R.push(S.createElement(t,{data:u,key:p(L,u),index:L,isScrolling:b?v:void 0,style:this._getItemStyle(L)}));var P=r(this.props,this._instanceProps);return S.createElement(h||m||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:lt({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},S.createElement(s||l||"div",{children:R,ref:a,style:{height:w?"100%":P,pointerEvents:v?"none":void 0,width:w?P:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Pm=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Tm=Cm({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Im=Lm({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:s,f=Math.max(0,l*c-p),h=Math.min(f,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=h+p?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(p/2)?0:g>f+Math.floor(p/2)?f:g;default:return r>=m&&r<=h?r:r<m?m:h}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Om="#BBB",_m="#f1f1f1",Mm={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const qm=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex,Dm=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex,Nm=(e,t,n,r)=>e===t*n+r+n;function Am(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:s,dataOffset:l}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=qm(t,c),d=c?r.column:r.row,p=(c?o:i)>=d,f=Nm(s,u,c?i:o,l),h=!!l&&Dm(t,c),m=p&&!f&&u>=d-1||h||a.state.show;a.set(m)}const{StyledFixedSizeList:zm,StyledFixedSizeGrid:jm}=function(){const e=e=>({scrollbarColor:"".concat(Om," ").concat(_m),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:_m},"&::-webkit-scrollbar-thumb":{backgroundColor:Om,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:cr(Im,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Mm.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:cr(Tm,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Mm.styledScrollbars)]:e(n)}}))}}();const Fm=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));const r=n.measureText(e);return Math.ceil(r.width||0)},$m=e=>{const t=S.useMemo((()=>"text"in e?e:{}),[e]);return S.useMemo((()=>Fm(t.text,t.font||"12px Source Sans Pro")),[t.text,t.font])};function Bm(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Wm(e){let{isGridMode:t,dense:n}=e;let r=n?Eh:t?kh:Ch;return t&&(r+=Rh),r}function Hm(e){let{layout:t,width:n,height:r,listCount:o,count:i,freqIsAllowed:a,checkboxes:s,styles:l}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:p,dense:f,dataLayout:h}=c,{fontSize:m="12px",fontFamily:g="Source sans pro"}=(null==l?void 0:l.content)||{},b="".concat(m," ").concat(g),y=$m({text:Bm(t),font:b}),v=$m({text:Bm(5),font:b}),S=$m({text:Bm(8),font:b}),w=a?v:0,x=s?wh:0;let k=Sh+w+x;!s&&k>=bh&&(k+=wh);let C,E,R,L,P=y+18+w+x;!s&&P>=bh&&(P+=wh),P=Math.min(vh,Math.max(P,k));const T=Wm({isGridMode:"grid"===h,dense:f}),I=null!=r?r:8*T;if(u){let e=n;"row"===u?(C={overflowX:"hidden"},e+=2*Rh,({rowCount:L,columnWidth:R,columnCount:E}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,s=r-yh;let l;const c=Math.min(n,Math.max(1,Math.round(s/Math.max(i,o))));l=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c),l=Math.max(l,1);const u=s/l;return{rowCount:Math.ceil(n/l),columnWidth:u,columnCount:l}}({maxVisibleColumns:p,listCount:o,containerWidth:e,columnAutoWidth:P,itemMinWidth:k}))):(C={overflowY:"hidden"},({rowCount:L,columnWidth:R,columnCount:E}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:s,itemMinWidth:l}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u),t=Math.max(t,1);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,s/d,l),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:T,listCount:o,listHeight:I,columnAutoWidth:P,containerWidth:e,itemMinWidth:k})))}E=("singleColumn"===h?1:E)||1,L=("singleColumn"===h?i:L)||o;const O=c.dense?838e3:577e3;L=Math.min(L,O);const _=Math.floor(3355e4/R);E=Math.min(E,_)||1;const M=L*E,q=Math.min(o,M);return{columnCount:E,columnWidth:R,rowCount:L,overflowStyling:C,itemHeight:T,listHeight:I,listWidth:n,scrollBarWidth:yh,count:i,listCount:q,maxCount:{row:O,column:_},itemPadding:Rh,textWidth:y,freqMinWidth:v,freqMaxWidth:S}}const Um=e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r};const[Vm]=Ul({});function Gm(e){const t="".concat(e.id),[n]=Vm();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const Km=bs(uc,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return u({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px"),whiteSpace:"normal"},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function Jm(e){let{width:t,text:n,dense:r,tooltip:o}=e;const{translator:i}=S.useContext(Bl);return w.createElement(Mf,{title:o?i.get(n):""},w.createElement(Km,{width:t,dense:r,component:"div",variant:"body1",py:"12px"},i.get(n)))}var Zm=_s(xr.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const Xm=bs(Ql)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),Qm=bs("div")((()=>({paddingLeft:"6px",flexGrow:1}))),Ym=bs("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),eg=bs(Zm)((()=>({fontSize:"14px"})));function tg(e){let{text:t,dismiss:n,dense:r,parentWidth:o=0}=e;const i="function"==typeof n,a=r?370:282,s=Math.max(o/2-a/2,0),l=Math.min(a,o)-42,c=r&&o<a;return w.createElement(Xm,{left:s,style:{maxWidth:a}},w.createElement(Qm,null,w.createElement(Jm,{text:t,dense:r,width:l,tooltip:c})),w.createElement(Ym,{dense:r},i&&w.createElement(oc,{"aria-label":"close",onClick:()=>n()},w.createElement(eg,null))))}const ng=(e,t)=>e.qListObject.qDimensionInfo.qCardinal-t;const rg=80;function og(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>rg,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["N",void 0].includes(r);return!(!o||!a&&!i)}const ig=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e,ag=e=>{const t=ig(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},sg=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=S.useState(),[i,a]=S.useState(n);return S.useEffect((()=>{if(!n)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=ag(r);return(await t.evaluateEx(o)).qNumber})(t,e);o(n),a(!1)})()}),[n&&t]),{frequencyMax:n?r:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:i}};const lg=["isLoadingData"],cg=100,ug=bs("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function dg(e){var t,n;let{model:r,app:o,constraints:i,layout:a,selections:s,selectionState:c,direction:p,checkboxes:f,height:h,width:m,frequencyMode:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:x=!1,keyboard:k={},showGray:C=!0,scrollState:E,keyScroll:R={state:{},reset:()=>{}},currentScrollIndex:L={set:()=>{}},renderedCallback:P,onCtrlF:T,showSearch:I,isModal:O,styles:_}=e;const{translator:M}=S.useContext(Bl),[q,D]=S.useState(!1),N=!(!a||!a.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:A=f,histogram:z}=null!=a?a:{},j=S.useRef(null),F=S.useRef({queue:[],validPages:!1,dataOffset:0}),$=S.useRef({pages:[]}),{frequencyMax:B,awaitingFrequencyMax:W}=sg(o,a),H=function(e){let{local:t,loaderRef:n,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:s}=e;const[l,c]=S.useState(!1),[u,d]=S.useState([]);let[p]=S.useState(0);const f=(e,l)=>{const u=t.current.dataOffset;t.current.queue.push({start:e+u,stop:l+u});const f=!!n.current&&n.current._listRef&&n.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),c(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=a?a(n):n;t.current.validPages=!0,s.current.pages=r,d(r),c(!1),e()}));o&&o(i)}),f?i:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:u,isLoading:l}}({local:F,loaderRef:j,model:r,fetchStart:y,scrollTimeout:0,postProcessPages:v,listData:$}),{isLoadingData:U}=H,V=d(H,lg),{getStoreValue:G,setStoreValue:K}=Gm(r),J=S.useCallback(V.loadMoreItems,[a]),[Z,X]=S.useState({show:!1,dismissed:!1}),[Q,Y]=S.useState([]);null!=V&&V.pages&&c.update({setPages:Y,pages:V.pages,isSingleSelect:N,layout:a});const ee=null==a?void 0:a.qListObject.qDimensionInfo.qCardinal;(null!=V&&V.pages.length&&!W||0===ee)&&(null==P||P());const te=S.useCallback((e=>{if(null==Q||!Q.length||!F.current.validPages)return!1;F.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Q.filter((e=>t(e)))[0];return n&&t(n)}),[a,Q]),{interactionEvents:ne,select:re}=sh({selectionState:c,selections:s,checkboxes:A,doc:document,loaderRef:j}),{layoutOptions:oe={}}=a||{};let ie=!0;oe.dataLayout&&(ie="singleColumn"===oe.dataLayout||"row"===(null==oe?void 0:oe.layoutOrder));const ae="grid"===(null==oe?void 0:oe.dataLayout),se=e=>{const t=u({},ie?{rowIndex:e}:{columnIndex:e}),n=ae?t:e;j.current._listRef.scrollToItem(n)},le=()=>{if(F.current.queue=[],F.current.validPages=!1,j.current){j.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===R.state.scrollPosition;if(a&&a.qSelectionInfo.qInSelections||e)return void(e&&R.reset());F.current.dataOffset=0,se(0)}};b&&b.call(null,le),S.useEffect((()=>{E&&!q&&j.current&&(j.current._listRef.scrollToItem(E.initScrollPos),D(!0))}),[j.current]),S.useEffect((()=>{le()}),[a,F.current.dataOffset]);let ce=cg;const ue="grid"!==oe.dataLayout,de=null==a||null===(t=a.qListObject.qSize)||void 0===t?void 0:t.qcy,pe=function(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;return(null!=t&&t.length&&o?Um({pages:t,minimumBatchSize:n,count:r}):r)||0}({pages:Q,minimumBatchSize:ce,count:de,calculatePagesHeight:x});let fe=og({itemWidth:m,layout:a,frequencyMode:g});const he=function(e){return e.some((e=>{let{qMatrix:t}=e;return t.some((e=>{var t;let[n]=e;return!(null===(t=n.qFrequency)||void 0===t||!t.match("%"))}))}))?"P":"-"}(Q),me=Hm({layout:a,width:m,height:h,listCount:pe,count:de,freqIsAllowed:fe,checkboxes:A,styles:_});me.columnWidth&&(fe=og({itemWidth:me.columnWidth,layout:a,frequencyMode:g}));const{listCount:ge}=me;K("listCount",ge);const be=G("inputText"),ye=function(e){let{layout:t,searchInputText:n,listCount:r}=e;const{translator:o}=S.useContext(Bl),i=[];if(null!=n&&n.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(r),t=o.get(e,[r]);i.push(t)}const a=function(e){var t;let{layout:n,translatorDynamic:r}=e;const{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}return r.get(a,[i])}({layout:t,translatorDynamic:o});i.push(a);const s=i.filter((e=>!(null==e||!e.length))).join(". ");return s}({layout:a,searchInputText:be,listCount:ge}),ve=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,s=!1,l=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":l=0,t=0,s=!0;break;case"overflowEnd":l=ng(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,s=!0}return{scrollIndex:t,offset:l,triggerRerender:s}}({position:e,isRow:ie,sizes:me,layout:a,offset:F.current.dataOffset});F.current.dataOffset=n,r&&c.triggerStateChanged(),se(t)};S.useEffect((()=>{const e=R.state;e.up?se(L.state.start-e.up):e.down?se(L.state.stop+e.down):e.scrollPosition&&ve(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&R.reset()}),[R.state.up,R.state.down,R.state.scrollPosition]);const{textAlign:Se}=(null==a?void 0:a.qListObject.qDimensionInfo)||{},[we,xe]=S.useState({first:!1,last:!1}),{List:ke,Grid:Ce}=function(e){let{layout:t,width:n,checkboxes:r,local:o,isVertical:i,pages:a,selectionState:s,interactionEvents:c,deducedFrequencyMode:d,histogram:p,isSingleSelect:f,select:h,selectAll:m,onCtrlF:g,textAlign:b,selections:y,keyboard:v,showGray:S,scrollState:x,direction:k,sizes:C,listCount:E,overflowDisclaimer:R,setScrollPosition:L,focusListItems:P,setCurrentScrollIndex:T,constraints:I,frequencyMax:O,freqIsAllowed:_,translator:M,showSearch:q,isModal:D,styles:N}=e;const{layoutOptions:A={}}=t||{},{columnWidth:z,listHeight:j,itemHeight:F,rowCount:$,columnCount:B}=C||{},W=("grid"===A.dataLayout?z:n)>bh,H={direction:"rtl"===k?"rtl":"ltr",useIsScrolling:!0,className:Mm.styledScrollbars},U=null==t?void 0:t.qListObject.qDimensionInfo.qLocked,V=j<=F,G=u(u({isLocked:U,column:!i,pages:a},U||s.selectDisabled()?{}:c),{},{checkboxes:r,layoutOptions:A,deducedFrequencyMode:d,freqIsAllowed:_,isSingleSelect:f,textAlign:b,sizes:C,actions:{select:h,confirm:()=>null==y?void 0:y.confirm.call(y),cancel:()=>null==y?void 0:y.cancel.call(y),setScrollPosition:L,selectAll:m,onCtrlF:g},frequencyMax:O,histogram:p,keyboard:v,showGray:S,showTick:W,dataOffset:o.current.dataOffset,focusListItems:P,direction:k,translator:M,showSearch:q,isModal:D,styles:N,fillHeight:V});return{List:e=>{let{onItemsRendered:r,ref:i}=e;return o.current.listRef=i,w.createElement(zm,l({},H,{dataTestid:"fixed-size-list",scrollDisabled:null==I?void 0:I.active,height:j,width:n,itemCount:E,itemData:u(u({},G),{},{listCount:E}),itemSize:F,onItemsRendered:e=>{var n;T({start:e.visibleStartIndex,stop:e.visibleStopIndex}),x&&x.setScrollPos(e.visibleStopIndex),Am({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:B,rowCount:$,overflowDisclaimer:R,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qCardinal,dataOffset:o.current.dataOffset}),r(u({},e))},ref:i}),pm)},Grid:e=>{let{onItemsRendered:r,ref:i}=e;const{overflowStyling:a,scrollBarWidth:s}=C,{layoutOrder:c}=A||{},d=Math.min(j,$*F+s);return o.current.listRef=i,w.createElement(jm,l({},H,{dataTestid:"fixed-size-grid",scrollDisabled:null==I?void 0:I.active,height:d,width:n,columnCount:B,columnWidth:z,rowCount:$,rowHeight:F,style:u({},a),itemData:u(u({},G),{},{column:void 0,columnCount:B,rowCount:$}),onItemsRendered:e=>{var n;const i="row"===c;T({start:i?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:i?e.visibleRowStopIndex:e.visibleColumnStopIndex});const a=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,f,h;return n&&n.setScrollPos(u),"column"===r?(d=l*o,p=a,f=c*o,h=s):(d=l,p=a*i,f=c,h=s*i),{visibleStartIndex:d+p,visibleStopIndex:f+h}}({renderProps:e,scrollState:x,layoutOrder:c,rowCount:$,columnCount:B});Am({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:B,rowCount:$,overflowDisclaimer:R,qCardinal:null==t||null===(n=t.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qCardinal,dataOffset:o.current.dataOffset}),r(a)},ref:i}),pm)}}}({direction:p,layout:a,width:m,checkboxes:A,deducedFrequencyMode:he,histogram:z,keyboard:k,showGray:C,interactionEvents:ne,select:re,selectAll:()=>{c.clearItemStates(!1),r.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:Se,isVertical:ue,pages:Q,selectionState:c,isSingleSelect:N,selections:s,scrollState:E,local:F,sizes:me,listCount:ge,overflowDisclaimer:{state:Z,set:e=>X((t=>u(u({},t),{},{show:e})))},setScrollPosition:ve,focusListItems:{first:we.first,setFirst:e=>xe((t=>u(u({},t),{},{first:e}))),last:we.last,setLast:e=>xe((t=>u(u({},t),{},{last:e})))},setCurrentScrollIndex:L.set,constraints:i,frequencyMax:B,freqIsAllowed:fe,translator:M,showSearch:I,isModal:O,styles:_}),{columnWidth:Ee,listHeight:Re,itemHeight:Le}=me||{};return ue||(ce=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:m,columnWidth:Ee,listHeight:Re,itemHeight:Le})),w.createElement(ug,null,w.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},ye),!ge&&ee>0&&w.createElement(Jm,{width:m,text:"Listbox.NoMatchesForYourTerms"}),w.createElement(Qf,{isItemLoaded:te,itemCount:ge||1,loadMoreItems:J.with({minimumBatchSize:ce}),threshold:0,minimumBatchSize:ce,ref:j,role:"grid"},ue?ke:Ce),Z.show&&!Z.dismissed&&w.createElement(tg,{text:"Listbox.ItemsOverflow",dismiss:()=>X((e=>u(u({},e),{},{dismissed:!0}))),parentWidth:null==j||null===(n=j.current)||void 0===n||null===(n=n._listRef)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.width,dense:null==oe?void 0:oe.dense}))}const pg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),fg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),hg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),mg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var gg=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1,selections:a}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const s="/qListObjectDef",l=()=>{a.isActive()||a.begin(s)};return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:pg,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAll(s)}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:hg,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectPossible(s)}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:fg,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAlternative(s)}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:mg,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectExcluded(s)}}].filter(Boolean)};const bg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function yg(e){const t=ms(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const vg={className:"njs-cell-action"},Sg=w.forwardRef(((e,t)=>{let{ariaExpanded:n=!1,item:r,addAnchor:o=!1}=e;const i=ms(),{hidden:a,disabled:s,style:l,hasSvgIconShape:c}=yg(r);if(a)return null;const u=Number.parseInt(i.spacing(.5),10),d=r.keyboardAction||r.action,p=d?e=>["Enter"].includes(e.key)&&d():null,f=d?e=>[" ","Spacebar"].includes(e.key)&&d():null,h="actions-toolbar-".concat(r.key);return w.createElement(oc,{ref:o?null:t,title:r.label,onClick:r.action,onKeyDown:p,onKeyUp:f,disabled:s,style:l,className:[vg.className,h].join(" "),size:"large",disableRipple:!0,"aria-label":r.label,"aria-expanded":n,"aria-controls":"moreMenuList","data-testid":h},c&&Uf(r.getSvgIconShape()),o&&w.createElement("div",{ref:t,style:{bottom:-u,right:0,position:"absolute",width:"100%",height:0}}))})),wg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]});var xg=e=>Uf(wg(e));const kg=e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var Cg=e=>Uf(kg(e));const Eg="njs-action-toolbar-more",Rg={icon:"".concat("More","-icon")},Lg=bs(Qp)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(Rg.icon," *")]:{color:t.palette.text.primary}}}));function Pg(e){let{item:t,autoFocus:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=yg(t);return o?null:w.createElement(nf,{autoFocus:n,title:t.label,onClick:()=>{t.action(),r()},disabled:i,tabindex:"0"},a&&w.createElement(zp,{className:Rg.icon},Uf(t.getSvgIconShape())),w.createElement(uc,{noWrap:!0},t.label))}const Tg=w.forwardRef(((e,t)=>{let{actions:n=[],show:r=!0,alignTo:o,popoverProps:i={},popoverPaperStyle:a={},onCloseOrActionClick:s=(()=>{}),disablePortal:c=!0}=e;const d=n.length>0,p=n.findIndex((e=>!e.disabled));return d&&w.createElement(Lg,l({},i,{onClose:s,ref:t,open:r,anchorEl:o.current,getContentAnchorEl:c?null:void 0,container:c?o.current:void 0,disablePortal:c,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:Eg},paper:{style:u({pointerEvents:"auto",maxWidth:"250px"},a)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}),w.createElement(Hp,{id:"moreMenuList"},n.map(((e,t)=>w.createElement(Pg,{key:t,item:e,autoFocus:t===p,onActionClick:s})))))})),Ig=e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)},Og=e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()};const _g="ActionsToolbar",Mg={item:"".concat(_g,"-item"),itemSpacing:"".concat(_g,"-itemSpacing")},qg=bs(Qp)((e=>{let{theme:t}=e;return{["& .".concat(Mg.itemSpacing)]:{padding:t.spacing(0,.25)}}})),Dg={className:"njs-action-toolbar-popover"},Ng=w.forwardRef(((e,t)=>{let{className:n,ariaExpanded:r=!1,actions:o=[],addAnchor:i=!1,isRtl:a=!1}=e;return o.length>0?w.createElement(up,{item:!0,container:!0,gap:0,flexDirection:a?"row-reverse":"row",wrap:"nowrap",className:n},o.map(((e,n)=>w.createElement(up,{item:!0,key:e.key,className:"".concat(Mg.itemSpacing," ").concat(Mg.item)},w.createElement(Sg,{ariaExpanded:r,key:e.key,item:e,ref:0===n?t:null,addAnchor:i}))))):null})),Ag={pointerEvents:"none"};function zg(e){var t,n;let{show:r=!0,actions:o=[],maxItems:i=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:s,more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:c={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:f,autoConfirm:h=!1,layout:m}=e;const g=function(e){let{api:t,layout:n,onConfirm:r=(()=>{}),onCancel:o=(()=>{}),onKeyDeactivate:i=(()=>{})}=e;const{translator:a}=S.useContext(Bl);return[{key:"clear",type:"icon-button",label:a.get("Selection.Clear"),enabled:()=>t.canClear(n),action:()=>t.clear(),getSvgIconShape:kg},{key:"cancel",type:"icon-button",label:a.get("Selection.Cancel"),enabled:()=>t.canCancel(n),action:()=>{o(),t.cancel()},keyboardAction:()=>{i(),o(),t.cancel()},getSvgIconShape:wg},{key:"confirm",type:"icon-button",label:a.get("Selection.Confirm"),enabled:()=>t.canConfirm(n),action:()=>{r(),t.confirm()},keyboardAction:()=>{i(),r(),t.confirm()},getSvgIconShape:lh}]}(u(u({},a),{},{layout:m})),{translator:b,keyboardNavigation:y}=S.useContext(Bl),[v,x]=S.useState(!1),k={vertical:12,horizontal:f?0:(null!==(t=null===(n=c.anchorEl)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)-7},C={vertical:"bottom",horizontal:f?-7:"right"},E=S.useRef(),R=S.useRef(),L=ms(),P=S.useMemo((()=>({margin:L.spacing(.5,0)}))),T=e=>{const t=E.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},I=S.useMemo((()=>function(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o,isRtl:i}=e;return e=>{const{target:a,nativeEvent:s}=e,{keyCode:l}=s;switch(l){case tm.ARROW_LEFT:case tm.ARROW_DOWN:case tm.ARROW_RIGHT:case tm.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=Ig(a);let t=[tm.ARROW_LEFT,tm.ARROW_DOWN].includes(l);t=i?!t:t,Og(t?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case tm.SPACE:e.preventDefault();break;case tm.TAB:t&&null!=n&&n.refocusContent&&(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent());break;case tm.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}({keyboardNavigation:y,focusHandler:d,getEnabledButton:T,selections:a,isRtl:f})),[y,d,T,a,f]);if(S.useEffect((()=>()=>{x(!1)}),[c.show,r,a.show]),S.useEffect((()=>{if(!d)return;d.on("focus_toolbar_first",(()=>{const e=T(!1);null==e||e.focus()})),d.on("focus_toolbar_last",(()=>{const e=T(!0);null==e||e.focus()}))}),[]),h)return;let O=l.enabled,_=l.actions;const M=l.alignTo||R,q=o.filter((e=>!e.hidden));if(q.length>i){const e=q.splice(-(q.length-i)-1);O=!0,_=[...e,...l.actions]}if(!a.show&&0===q.length&&!O)return null;const D={key:"more",label:b.get("Menu.More"),getSvgIconShape:bg,hidden:!1,active:v,enabled:()=>O,action:()=>x(!v)},N=q.length>0,A=_.length>0,z=N&&a.show||A&&a.show,j=w.createElement(up,{ref:E,onKeyDown:I,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:f?"row-reverse":"row"}},(null==s?void 0:s.length)&&w.createElement(Ng,{className:"actions-toolbar-extra-actions",actions:s,isRtl:f}),N&&w.createElement(Ng,{actions:q}),A&&w.createElement(Ng,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:R,ariaExpanded:v,actions:[D],addAnchor:!0}),z&&w.createElement(up,{item:!0,className:Mg.itemSpacing,style:P},w.createElement(Xd,{orientation:"vertical"})),a.show&&w.createElement(Ng,{className:"actions-toolbar-default-actions",actions:g,isRtl:f}),v&&w.createElement(Tg,{show:v,actions:_,alignTo:M,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{x(!1)},disablePortal:l.disablePortal}));return c.show?w.createElement(qg,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:c.show,anchorEl:c.anchorEl,anchorOrigin:k,transformOrigin:C,hideBackdrop:!0,style:Ag,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Dg.className,style:{pointerEvents:"auto",padding:L.spacing(.5,.25)}}}},j):r&&j}var jg=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const Fg="/qListObjectDef",$g=e=>null==e?void 0:e.substring(0,64e3),Bg=bs(uf,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})((e=>{let{styles:t,dense:n,isRtl:r}=e,o={};return n&&(o={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:t.search.color,textAlign:r?"right":"left"}}),u({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:t.search.backgroundColor,backdropFilter:t.background.backgroundImage?t.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:r?"row-reverse":"row","& fieldset":{borderColor:"".concat(t.search.borderColor),borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:"".concat(t.search.highlightBorderColor," !important")},"& .MuiInputBase-root":u({},t.search),"& *":{color:t.search.color},"& input":{color:t.search.color,textAlign:r?"right":"left"}},o)})),Wg=bs(oc)((()=>({border:0,padding:"8px",cursor:"pointer",lineHeight:"12px","&:hover":{backgroundColor:"transparent"},":focus-visible":{borderRadius:"4px",boxShadow:"inset 0 0 0 2px rgb(2, 117, 217)"}})));var Hg=S.forwardRef((function(e,t){let{popoverOpen:n,selections:r,selectionState:o,model:i,keyboard:a,dense:s=!1,visible:l=!0,autoFocus:c=!0,beginSelectionOnFocus:u=!0,wildCardSearch:d=!1,searchEnabled:p,direction:f,hide:h,styles:m}=e;const{translator:g}=S.useContext(Bl),[b,y]=S.useState(""),[v,x]=S.useState(!1),k=S.useRef(),C=S.useRef(),E=g.get("Listbox.Clear.Search"),{getStoreValue:R,setStoreValue:L}=Gm(i),P="rtl"===f,T=async()=>{try{await i.abortListObjectSearch(Fg)}finally{y("")}};S.useEffect((()=>l?()=>T():()=>{}),[l]),S.useEffect((()=>(r.on("deactivated",T),()=>{r.removeListener&&r.removeListener("deactivated",T)})),[]),S.useEffect((()=>{if(v&&k.current){const e=b.length-1;k.current.setSelectionRange(e,e),x(!1)}}),[v,k.current]),S.useEffect((()=>{L("inputText",b)}),[b]);const I=async()=>{let e;const t=$g(b),n=await i.searchListObjectFor(Fg,t);return o.selectDisabled()?n:(n&&t.length&&R("listCount")>0&&(e=i.acceptListObjectSearch(Fg,!0),r.selectionsMade=!0,o.clearItemStates(!1),y("")),e)},O=()=>{var e;null===(e=k.current)||void 0===e||e.focus()},_=()=>{T(),O()};return S.useImperativeHandle(t,(()=>({focus(){O()}}))),l&&!1!==p?w.createElement(Bg,{styles:m,dense:s,isRtl:P,startAdornment:w.createElement(xp,{position:"start",sx:{marginLeft:s?"8px":"".concat(fh,"px")}},w.createElement(jg,{size:s?"small":"normal"})),endAdornment:w.createElement(xp,{position:"end",sx:{marginLeft:0}},""!==b&&w.createElement(Wg,{tabIndex:0,ref:C,title:E,"aria-label":E,onClick:_,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":_();break;case"Tab":e.shiftKey?O():sm(t);break;default:return}e.preventDefault(),e.stopPropagation()}},w.createElement(xg,{size:s?"small":"normal"}))),className:"search",inputRef:k,size:"small",fullWidth:!0,placeholder:g.get("Listbox.Search"),value:b,onFocus:()=>{d&&(y("**"),x(!0)),u&&!o.selectDisabled()&&!r.isModal()&&r.begin("/qListObjectDef")},onChange:async e=>{const t=$g(e.target.value);return y(t),t.length?i.searchListObjectFor(Fg,t):T()},onKeyDown:async e=>{const{currentTarget:t}=e,o=t.closest(".listbox-container");switch(e.key){case"Enter":I();break;case"Escape":if(sm(o),r.cancel(),n)return;break;case"Tab":e.shiftKey?lm(o)||a.focusSelection():C.current?C.current.focus():sm(o);break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;h&&(h(),sm(o));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:c,inputProps:{tabIndex:a.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":g.get("Listbox.Search.ScreenReaderInstructions")}}):null}));function Ug(e){if(!e.session)return[];const{selectionStore:t}=S.useContext(Bl),[n]=t.useAppSelectionsStore(),r=e?e.id:null;let o=n.get(r);return S.useEffect((()=>{e&&!o&&(o=function(e){let{app:t,selectionStore:n}=e;const r="".concat(t.id),{modalObjectStore:o,appModalStore:i}=n,a=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{model:t,objectSelections:n}=o.get(r)||{};t&&(await t.endSelections(e),o.clear(r),n.emit("deactivated"))},s={begin:async e=>{var n;let{model:i,paths:s,accept:l=!0,objectSelections:c}=e;if(c===(null===(n=o.get(r))||void 0===n?void 0:n.objectSelections))return;a(l),o.set(r,{model:i,objectSelections:c});const u=Array.isArray(s)?s:[s],d=async e=>{try{await i.beginSelections(u),o.set(r,{model:i,objectSelections:c})}catch(n){6003!==n.code||e?o.clear(r):(await t.abortModal(l),d(!0))}};await d()},end:a};i.set(r,s);const l={model:t,isInModal:()=>!!o.get(r),isModal(e){var t;return e?(null===(t=o.get(r))||void 0===t?void 0:t.objectSelections)===e:!!o.get(r)},forward:()=>s.end().then((()=>t.forward())),back:()=>s.end().then((()=>t.back())),clear:()=>s.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return s.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return l}({app:e,selectionStore:t}),n.set(r,o),n.dispatch(!0))}),[e]),[o]}function Vg(e){return Object.keys(T.prototype).forEach((t=>{e[t]=T.prototype[t]})),T.init(e),e}const Gg=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin({model:o,paths:e,accept:!0,objectSelections:s}))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(s),goModal:e=>r.begin({model:o,paths:e,accept:!1,objectSelections:s}),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return Vg(s),s},Kg=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function Jg(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=Ug(e),[a]=$f(t),{appModalStore:s}=S.useContext(Bl).selectionStore,l=s.get(e.id),[c,u]=S.useState();return S.useEffect((()=>{i&&t&&!c&&u(Gg({appSelections:i,appModal:l,model:t}))}),[i,t]),S.useEffect((()=>{if(!c)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Kg({elements:o,objectSelections:c,options:r});return c.addListener("activated",e),c.addListener("deactivated",t),()=>{c.isActive()&&c.confirm(),c.removeListener("activated",e),c.removeListener("deactivated",t)}}),[c]),S.useEffect((()=>{c&&c.setLayout(a)}),[c,a]),[c]}function Zg(){const e=u(u({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{update(t){var n,r;let{setPages:o,pages:i,isSingleSelect:a,selectDisabled:s,layout:l}=t;this.setPages=o;const c=this.lastRowCount===l.qListObject.qSize.qcy,u=this.lastApprMaxGlyphCount===l.qListObject.qDimensionInfo.qApprMaxGlyphCount;c&&u||(this.lastRowCount=l.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=l.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==i&&void 0!==i&&(e.enginePages=null!=i?i:[],e.selectedInEngine=th(i),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=a,e.selectDisabled=s||e.selectDisabled,e.isDimCalculated=null!==(n=null==l||null===(r=l.qListObject)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r?void 0:r.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[u(u({},n),{},{qState:r}),...t.slice(1)]}));return u(u({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}});return e}const Xg=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function Qg(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Xg(t,"qSelected",0)+Xg(t,"qSelectedExcluded",0)+Xg(t,"qLocked",0)+Xg(t,"qLockedExcluded",0)>0}function Yg(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function eb(e){if("object"==typeof e&&Yg(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const tb={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function nb(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Yg(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in tb}(e)){const t=tb[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function rb(e){let t,n,r;if(Yg(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?eb(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function ob(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function ib(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function ab(e){if(Yg(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?eb(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function sb(e,t){return Yg(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:sb(nb(e))}function lb(e){return Yg(e)?1===e.a?ab(e):sb(e):lb(nb(e))}const cb=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function ub(e){return.2126*cb(e.r)+.7152*cb(e.g)+.0722*cb(e.b)}function db(...e){const t=nb(...e);return t.invalid||ub(t)<.4}function pb(...e){const t=nb(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=ob(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=nb(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>db(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=ab(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=sb(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=lb(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=rb(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?nb(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=ob(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=ib(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=ib(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>pb(o(18*e)),getDarkenedColor:(e=1)=>pb(o(18*-e))}}function fb(e,t){if(!e||!t)return;const n=ub(e),r=ub(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function hb(e,t){const n=pb("#FFFFFF"),r=pb(e),o=pb(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=fb(n,r),a=fb(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}function mb(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gb,bb,yb,vb="top",Sb="top-right",wb="right",xb="bottom-right",kb="bottom",Cb="bottom-left",Eb="left",Rb="top-left";mb(mb(mb(mb(mb(mb(mb(mb(mb(mb(gb={},"equal-equal",[vb,kb]),"equal-higher",[kb,xb]),"equal-lower",[vb,Sb]),"equal-void",[vb,kb]),"higher-equal",[Eb,Cb,vb,Sb]),"higher-higher-acute",[kb,Cb,Eb,Sb]),"higher-higher-obtuse",[kb,vb]),"higher-lower-negative",[vb,Sb,wb]),"higher-lower-positive",[kb,Cb,Eb]),"higher-void",[vb]),mb(mb(mb(mb(mb(mb(mb(mb(mb(mb(gb,"lower-equal",[vb]),"lower-higher-negative",[vb,Rb]),"lower-higher-positive",[xb]),"lower-lower-acute",[vb,Rb,Eb,Sb,wb]),"lower-lower-obtuse",[vb,kb]),"lower-void",[vb]),"void-equal",[vb]),"void-higher",[vb,kb]),"void-lower",[vb,kb,Eb]),"void-void",[vb]),mb(gb,"unclassified",[vb,kb,wb,Eb,Sb,xb,Cb,Rb]);var Lb=function(){if(yb)return bb;yb=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 bb=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},bb}();function Pb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tb(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ib(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Lb);var Ob=1/.7,_b="\\s*([+-]?\\d+)\\s*",Mb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Db=/^#([0-9a-f]{3,8})$/,Nb=new RegExp(`^rgb\\(${_b},${_b},${_b}\\)$`),Ab=new RegExp(`^rgb\\(${qb},${qb},${qb}\\)$`),zb=new RegExp(`^rgba\\(${_b},${_b},${_b},${Mb}\\)$`),jb=new RegExp(`^rgba\\(${qb},${qb},${qb},${Mb}\\)$`),Fb=new RegExp(`^hsl\\(${Mb},${qb},${qb}\\)$`),$b=new RegExp(`^hsla\\(${Mb},${qb},${qb},${Mb}\\)$`),Bb={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 Wb(){return this.rgb().formatHex()}function Hb(){return this.rgb().formatRgb()}function Ub(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Db.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Vb(t):3===n?new Zb(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Gb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Gb(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=Nb.exec(e))?new Zb(t[1],t[2],t[3],1):(t=Ab.exec(e))?new Zb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=zb.exec(e))?Gb(t[1],t[2],t[3],t[4]):(t=jb.exec(e))?Gb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fb.exec(e))?ny(t[1],t[2]/100,t[3]/100,1):(t=$b.exec(e))?ny(t[1],t[2]/100,t[3]/100,t[4]):Bb.hasOwnProperty(e)?Vb(Bb[e]):"transparent"===e?new Zb(NaN,NaN,NaN,0):null}function Vb(e){return new Zb(e>>16&255,e>>8&255,255&e,1)}function Gb(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zb(e,t,n,r)}function Kb(e){return e instanceof Ib||(e=Ub(e)),e?new Zb((e=e.rgb()).r,e.g,e.b,e.opacity):new Zb}function Jb(e,t,n,r){return 1===arguments.length?Kb(e):new Zb(e,t,n,null==r?1:r)}function Zb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Xb(){return`#${ty(this.r)}${ty(this.g)}${ty(this.b)}`}function Qb(){const e=Yb(this.opacity);return`${1===e?"rgb(":"rgba("}${ey(this.r)}, ${ey(this.g)}, ${ey(this.b)}${1===e?")":`, ${e})`}`}function Yb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ey(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ty(e){return((e=ey(e))<16?"0":"")+e.toString(16)}function ny(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oy(e,t,n,r)}function ry(e){if(e instanceof oy)return new oy(e.h,e.s,e.l,e.opacity);if(e instanceof Ib||(e=Ub(e)),!e)return new oy;if(e instanceof oy)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 oy(a,s,l,e.opacity)}function oy(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function iy(e){return(e=(e||0)%360)<0?e+360:e}function ay(e){return Math.max(0,Math.min(1,e||0))}function sy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pb(Ib,Ub,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Wb,formatHex:Wb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ry(this).formatHsl()},formatRgb:Hb,toString:Hb}),Pb(Zb,Jb,Tb(Ib,{brighter(e){return e=null==e?Ob:Math.pow(Ob,e),new Zb(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Zb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zb(ey(this.r),ey(this.g),ey(this.b),Yb(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:Xb,formatHex:Xb,formatHex8:function(){return`#${ty(this.r)}${ty(this.g)}${ty(this.b)}${ty(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qb,toString:Qb})),Pb(oy,(function(e,t,n,r){return 1===arguments.length?ry(e):new oy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return e=null==e?Ob:Math.pow(Ob,e),new oy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new oy(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 Zb(sy(e>=240?e-240:e+120,o,r),sy(e,o,r),sy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new oy(iy(this.h),ay(this.s),ay(this.l),Yb(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=Yb(this.opacity);return`${1===e?"hsl(":"hsla("}${iy(this.h)}, ${100*ay(this.s)}%, ${100*ay(this.l)}%${1===e?")":`, ${e})`}`}}));const ly=Math.PI/180,cy=180/Math.PI,uy=4/29,dy=6/29,py=3*dy*dy;function fy(e){if(e instanceof hy)return new hy(e.l,e.a,e.b,e.opacity);if(e instanceof vy)return Sy(e);e instanceof Zb||(e=Kb(e));var t,n,r=yy(e.r),o=yy(e.g),i=yy(e.b),a=my((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=my((.4360747*r+.3850649*o+.1430804*i)/.96422),n=my((.0139322*r+.0971045*o+.7141733*i)/.82521)),new hy(116*a-16,500*(t-a),200*(a-n),e.opacity)}function hy(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function my(e){return e>.008856451679035631?Math.pow(e,1/3):e/py+uy}function gy(e){return e>dy?e*e*e:py*(e-uy)}function by(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vy(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Sy(e){if(isNaN(e.h))return new hy(e.l,0,0,e.opacity);var t=e.h*ly;return new hy(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Pb(hy,(function(e,t,n,r){return 1===arguments.length?fy(e):new hy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return new hy(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new hy(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 Zb(by(3.1338561*(t=.96422*gy(t))-1.6168667*(e=1*gy(e))-.4906146*(n=.82521*gy(n))),by(-.9787684*t+1.9161415*e+.033454*n),by(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Pb(vy,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof vy)return new vy(e.h,e.c,e.l,e.opacity);if(e instanceof hy||(e=fy(e)),0===e.a&&0===e.b)return new vy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*cy;return new vy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new vy(e,t,n,null==r?1:r)}),Tb(Ib,{brighter(e){return new vy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new vy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Sy(this).rgb()}}));var wy=e=>()=>e;function xy(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):wy(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?xy: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):wy(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Jb(e)).r,(t=Jb(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=xy(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 ky,Cy="center",Ey="bottom";function Ry(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 Ly(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ty)):void 0===t&&(t=Py);for(var n,r,o,i,a,s=new _y(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 _y(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Oy)}function Py(e){return e.children}function Ty(e){return Array.isArray(e)?e[1]:null}function Iy(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Oy(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function _y(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Cy,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Cy,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Cy,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Cy},{key:"DataRangeIncludingZero",alignment:Ey},{key:"LimitedData",alignment:Ey},{key:"NegativeOrZeroValues",alignment:Ey}].reduce((function(e,t){return e[t.key]=t,e}),{}),_y.prototype=Ly.prototype={constructor:_y,count:function(){return this.eachAfter(Ry)},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 Ly(this).eachBefore(Iy)},[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)}},ky=function(e){
|
|
124
124
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
125
125
|
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=p-g,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),S=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-b+1)%l)&&v<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+S}},ky({exports:{}});const My=/,(?![^(]*\))/,qy=/\s(?![^(]*\))/,Dy=/^[0-9]+[a-zA-Z%]+?$/,Ny=["none","inset","initial","inherit"],Ay=e=>{if(!e)return;const t=e.split(qy).filter((e=>!Ny.includes(e.toLowerCase()))).at(-1),n=!t||(e=>"0"===e||Dy.test(e))(t)||Ny.includes(t.toLowerCase())?void 0:t;return n},zy=e=>e?e.split(My).map((e=>e.trim())):[];function jy(e,t,n,r){return n&&r?n.getStyle("object.".concat(r),e,t):n?n.getStyle("",e,t):void 0}function Fy(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:jy(t,n,r,o)}const $y={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},By={"top-left":"top left","top-center":"top center","top-right":"top right","center-left":"center left","center-center":"center center","center-right":"center right","bottom-left":"bottom left","bottom-center":"bottom center","bottom-right":"bottom right"};function Wy(e,t){return t?function(e){var t;let n,r,o,i;return null!=e&&null!==(t=e.session)&&void 0!==t&&t.config?(n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host):""}(e)+t:void 0}function Hy(e,t,n){const r=null==e?void 0:e.bgImage;if(r){let o="";if("media"===r.mode||"media"===e.useImage){let e;const i=null==r?void 0:r.mediaUrl,{qUrl:a}=(null==i?void 0:i.qStaticContentUrl)||{};o=a?decodeURIComponent(a):void 0,o=Wy(t,o),n&&(e=Object.entries(n).map((e=>{let[t,n]=e;return"&".concat(t,"=").concat(encodeURIComponent(n))})).join("&"),o="".concat(o,"?").concat(e))}"expression"===r.mode&&(o=r.expressionUrl?decodeURIComponent(r.expressionUrl):void 0);const i=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=By[e.bgImage.position]),n}(e),a=function(e){var t;let n=$y.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=$y[r]),n}(e);return o?{url:o,pos:i,size:a}:void 0}}function Uy(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):Fy(null==r?void 0:r.color,"","backgroundColor",t,n)}function Vy(e,t,n){var r,o;const i=jy("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&Ny.includes(e.toLowerCase()))return e.toLowerCase();const r=zy(e);if(1!==r.length)return e;let o=n;if(!o){const n=zy(t);if(1!==n.length)return e;o=Ay(n[0])}if(!o)return e;const i=Ay(r[0]);return i?e.replace(i,o):"".concat(e," ").concat(o)})((null==e||null===(r=e.shadow)||void 0===r?void 0:r.boxShadow)||i,i,Fy(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function Gy(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle("object.".concat(r),"title.".concat(t),"fontFamily"),fontSize:i.fontSize||n.getStyle("object.".concat(r),"title.".concat(t),"fontSize"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color):n.getStyle("object.".concat(r),"title.".concat(t),"color"),backgroundColor:i.backgroundColor||n.getStyle("object.".concat(r),"title.".concat(t),"backgroundColor"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const Ky={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},Jy=["theme","selections"];function Zy(e){var t,n,r,o,i,a,s,l;let{app:c,themeApi:d,theme:p,queryParams:f,components:h=[],checkboxes:m=!1}=e;const g=function(){const e={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const n=null==t?void 0:t.key;Jy.includes(n)&&(e[n]=t)})),e}(h),b=(e,t)=>d.getStyle("object.listBox",e,t),y=e=>(null==e?void 0:e.index)>0||null!=e&&e.color?d.getColorPickerColor(e):void 0,v=function(e){var t,n,r,o,i;let{getColorPickerColor:a,theme:s,getListboxStyle:l,overrides:c,checkboxes:d}=e;const p=null===(t=c.theme)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.fontColor,f=a(p)||l("content","color")||(null===(n=s.palette)||void 0===n?void 0:n.text.primary),h=!d&&(null===(r=null===(o=c.theme)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.useContrastColor)||void 0===r||r),m=(null===(i=c.selections)||void 0===i?void 0:i.colors)||{},g=e=>{var t,n;const r="selected"===e?"main":e,o="".concat(e,"Contrast"),i=a(m[e])||l("","dataColors.".concat(e))||"possible"===e&&l("","backgroundColor")||(null===(t=s.palette)||void 0===t||null===(t=t.selected)||void 0===t?void 0:t[r])||Ky[e];return{[e]:i,[o]:h?hb(i,f):f||(null===(n=s.palette)||void 0===n?void 0:n.selected["".concat(o,"Text}")])}};return u(u(u(u(u({},g("selected")),g("alternative")),g("excluded")),g("selectedExcluded")),g("possible"))}({getColorPickerColor:y,theme:p,getListboxStyle:b,overrides:g,checkboxes:m}),S=g.theme||{},w=y(null===(t=S.header)||void 0===t?void 0:t.fontColor)||b("title.main","color"),x=function(e){let t,{themeApi:n,themeOverrides:r}=e;const o=null==r?void 0:r.background;return o?(t=null!=o&&o.useExpression?Uy({bgColor:o},n,"listBox"):n.getColorPickerColor(null==o?void 0:o.color),t):t}({themeApi:d,themeOverrides:S}),k=null!==(n=S.background)&&void 0!==n&&n.image?Hy({bgImage:S.background.image},c,f):void 0,C=x||b("","backgroundColor")||p.palette.background.default,E=function(e,t){const n=pb(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(C,b),R=function(e){return hb("#fff",e("content","color"))}(b),L=(null===(r=S.header)||void 0===r?void 0:r.fontStyle)||{},P=(null===(o=S.content)||void 0===o?void 0:o.fontStyle)||{},T=(e,t,n)=>!0===e&&t||!1===e&&n||void 0;return{background:{backgroundColor:C,backgroundImage:null==k||!k.url||null!=k&&k.url.startsWith("url(")?void 0:"url('".concat(k.url,"')"),backgroundRepeat:"no-repeat",backgroundSize:null==k?void 0:k.size,backgroundPosition:null==k?void 0:k.pos},header:{color:w,fontSize:(null===(i=S.header)||void 0===i?void 0:i.fontSize)||b("title.main","fontSize"),fontFamily:(null===(a=S.header)||void 0===a?void 0:a.fontFamily)||b("title.main","fontFamily"),fontWeight:T(L.bold,"bold","normal")||b("title.main","fontWeight")||"bold",textDecoration:L.underline?"underline":"initial",fontStyle:T(L.italic,"italic","normal")||b("title.main","fontStyle")||"initial"},content:{backgroundColor:m?void 0:v.possible,color:v.possibleContrast||b("content","color"),fontSize:(null===(s=S.content)||void 0===s?void 0:s.fontSize)||b("content","fontSize"),fontFamily:(null===(l=S.content)||void 0===l?void 0:l.fontFamily)||b("content","fontFamily"),fontWeight:T(P.bold,"bold","normal")||b("content","fontWeight")||"normal",textDecoration:P.underline?"underline":"initial",fontStyle:T(P.italic,"italic","normal")||b("content","fontStyle")||"initial"},search:{color:R,borderColor:p.palette.divider,highlightBorderColor:p.palette.custom.focusBorder,backgroundColor:E,backdropFilter:"blur(8px)"},selections:v}}function Xy(e){let{app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a}=e;return Zy({app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a})}function Qy(e){let{alignTo:t,anchorOrigin:n={vertical:"bottom",horizontal:"center"},transformOrigin:r={vertical:"top",horizontal:"center"},show:o,close:i,app:a,fieldName:s,stateName:l="$",autoFocus:c,components:u,checkboxes:d,selectDisabled:p=(()=>!1),sortCriteria:f=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:h="ltr"}=e;const m=Boolean(null==s?void 0:s.qLibraryId),g=o&&Boolean(t.current),[b,y]=S.useState(0),v=ms(),x=S.useRef(),[k]=Df({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:l,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:f,qFieldDefs:m?void 0:[s]},qLibraryId:m?s.qLibraryId:void 0}},a,s,l),C=S.useCallback((()=>{k.lock("/qListObjectDef")}),[k]),E=S.useCallback((()=>{k.unlock("/qListObjectDef")}),[k]),{translator:R,themeApi:L,keyboardNavigation:P,hostConfig:T}=S.useContext(Bl),I=S.useRef(),O=S.useRef(),[_]=Jg(a,k,O),[M]=$f(k),[q]=S.useState((()=>Zg({selectDisabled:p}))),D=om({containerRef:O,enabled:P}),{checkboxes:N=d}=M||{},A=Xy({themeApi:L,theme:v,components:u,checkboxes:N});if(S.useEffect((()=>{_&&g&&(_.isModal(k)||_.goModal("/qListObjectDef"))}),[_,g]),!(k&&M&&R&&A))return null;const z=!0===M.qListObject.qDimensionInfo.qLocked,j=(e,t)=>{const n="escapeKeyDown"!==t;_.noModal(n),i()},F=gg({layout:M,model:k,translator:R,selectionState:q,selections:_}),$=Qg(M);return w.createElement(Qp,{className:"listbox-container",open:g,onClose:j,anchorEl:t.current,anchorOrigin:n,transformOrigin:r,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?j():void 0,direction:h},w.createElement(up,{container:!0,direction:"column",gap:0,ref:O},w.createElement(up,{item:!0,container:!0,style:{direction:h,padding:v.spacing(1)}},w.createElement(up,{item:!0},z?w.createElement(oc,{onClick:E,disabled:!z,size:"large"},w.createElement(Gf,{title:R.get("Listbox.Unlock")})):w.createElement(oc,{onClick:C,disabled:!$,size:"large"},w.createElement(Jf,{title:R.get("Listbox.Lock")}))),w.createElement(up,{item:!0,xs:!0}),w.createElement(up,{item:!0},w.createElement(zg,{layout:M,more:{enabled:!z,actions:F,alignTo:I,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:_,onConfirm:j,onCancel:()=>j(0,"escapeKeyDown")}}))),w.createElement(up,{item:!0,xs:!0},w.createElement("div",{ref:I}),w.createElement(up,{item:!0},w.createElement(Hg,{ref:x,popoverOpen:g,styles:A,visible:!0,model:k,listCount:b,selections:_,selectionState:q,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:D.focusSelection},autoFocus:null==c||c,direction:h})),w.createElement(dg,{model:k,app:a,layout:M,selections:_,selectionState:q,direction:h,onSetListCount:e=>y(e),onCtrlF:()=>{x.current.focus()},styles:A,keyboard:D}))))}function Yy(e){let{field:t,api:n,stateIx:r=0,skipHandleShowListBoxPopover:o=!1,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const{translator:s}=S.useContext(Bl),l=i||S.useRef(),c=ms(),[u,d]=S.useState(!1),p=e=>{e.currentTarget.contains(e.target)&&d(!u)},f=()=>{d(!1),a()},h=t.selections[r];void 0===h.qTotal&&(h.qTotal=0);const m=h.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},g=(m.qSelected+m.qLocked)/h.qTotal,b=m.qAlternative/h.qTotal,y=(m.qExcluded+m.qLockedExcluded+m.qSelectedExcluded)/h.qTotal,v=m.qSelected+m.qSelectedExcluded+m.qLocked+m.qLockedExcluded,x=0===v&&0===h.qTotal;let k="";h.qTotal===v&&h.qTotal>1?k=s.get("CurrentSelections.All"):v>1&&h.qTotal?k=s.get("CurrentSelections.Of",[v,h.qTotal]):h.qSelectedFieldSelectionInfo&&(k=h.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==t.states[r]&&(k="".concat(t.states[r],": ").concat(k));const C=[{color:c.palette.selected.main,ratio:g},{color:c.palette.selected.alternative,ratio:b},{color:c.palette.selected.excluded,ratio:y}];C.forEach(((e,t)=>{e.offset=t?C[t-1].offset+C[t-1].ratio:0}));let E=null,R=null,L=null,P=null;return i||(E=w.createElement(up,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:h.qLocked?"0.3":""}},w.createElement(uc,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},t.label),w.createElement(uc,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},k)),h.qLocked?R=w.createElement(up,{item:!0},w.createElement(oc,{size:"large"},w.createElement(Gf,null))):h.qOneAndOnlyOne||(R=w.createElement(up,{item:!0},w.createElement(oc,{title:s.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),n.clearField(h.qField,t.states[r])},size:"large"},w.createElement(Vf,null)))),L=w.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===x&&C.map((e=>w.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),P=w.createElement(up,{container:!0,gap:1,ref:l,sx:{backgroundColor:c.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:c.palette.action.hover}},onClick:!1===o&&p||null},E,R,L,u&&w.createElement(Qy,{alignTo:l,show:u,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}))),i?w.createElement(Qy,{alignTo:l,show:!0,close:f,app:n.model,fieldName:h.qField,stateName:t.states[r]}):P}var ev=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8,9 L12.5,4.5 L14,6 L9.5,10.5 L8,12 L2,6 L3.5,4.5 L8,9 Z"}}]}))(e));const tv={item:"".concat("MultiState","-item")},nv=bs(up)((e=>{let{theme:t}=e;return{["&.".concat(tv.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function rv(e){let{field:t,api:n,moreAlignTo:r=null,onClose:o=(()=>{})}=e;const[i,a]=S.useState(!!r),[s,l]=S.useState(-1),[c,u]=S.useState(r?r.current:null),d=r||S.useRef(),{translator:p}=S.useContext(Bl),f=p.get("Selection.ClearAllStates"),h=()=>{l(-1),o()};let m=null;r||(m=w.createElement(w.Fragment,null,w.createElement(up,{item:!0,xs:!0,zeroMinWidth:!0},w.createElement(fd,{style:{padding:"0px 8px"},color:"secondary",badgeContent:t.states.length},w.createElement(uc,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},t.label))),w.createElement(up,{item:!0},w.createElement("div",{style:{width:"12px"}})),w.createElement(up,{item:!0},w.createElement(oc,{size:"large"},w.createElement(ev,null)))));const g=w.createElement(Rp,{dense:!0},w.createElement(qp,{title:f,onClick:()=>{t.states.forEach((e=>n.clearField(t.name,e)))}},w.createElement(ql,{variant:"contained",fullWidth:!0},f)),t.states.map(((e,r)=>w.createElement(qp,{key:r,title:t.label,onClick:e=>((e,t)=>{e.stopPropagation(),a(!1),l(t)})(e,r)},w.createElement(gd,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},w.createElement(Yy,{field:t,api:n,stateIx:r,skipHandleShowListBoxPopover:!0})))))),b=w.createElement(Qp,{open:i,onClose:()=>{a(!1),o()},anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},g),y=r?b:w.createElement(nv,{container:!0,gap:0,className:tv.item,onClick:e=>{e.currentTarget.contains(e.target)&&(u(e.currentTarget),d.current=e.currentTarget,a(!i))}},m,i&&b,s>-1&&w.createElement(Qy,{alignTo:d,show:s>-1,close:h,app:n.model,fieldName:t.selections[s].qField,stateName:t.states[s]}));return r&&s>-1?w.createElement(Qy,{alignTo:d,show:s>-1,close:h,app:n.model,fieldName:t.selections[s].qField,stateName:t.states[s]}):y}const ov="More",iv={item:"".concat(ov,"-item"),badge:"".concat(ov,"-badge")},av=bs(up)((e=>{let{theme:t}=e;return{["&.".concat(iv.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(iv.badge)]:{padding:t.spacing(0,1)}}}));function sv(e){let{items:t=[],api:n}=e;const r=ms(),[o,i]=S.useState(!1),[a,s]=S.useState(-1),[l,c]=S.useState(null),u=S.useRef(),d=()=>{s(-1)};let p=null;return a>-1&&(p=t[a].states.length>1?w.createElement(rv,{field:t[a],api:n,moreAlignTo:u,onClose:d}):w.createElement(Yy,{field:t[a],api:n,skipHandleShowListBoxPopover:!0,moreAlignTo:u,onClose:d})),w.createElement(av,{container:!0,gap:0,className:iv.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))}},w.createElement(up,{item:!0},w.createElement(gd,{borderRadius:r.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:r.palette.selected.main,color:r.palette.selected.mainContrastText}},w.createElement(uc,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",t.length))),w.createElement(up,{item:!0},w.createElement(oc,{size:"large"},w.createElement(ev,null))),o&&w.createElement(Qp,{open:o,onClose:()=>{i(!1)},anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},w.createElement(Rp,{dense:!0},t.map(((e,t)=>w.createElement(qp,{key:t,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),s(t)})(e,t)},w.createElement(gd,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?w.createElement(rv,{field:e,api:n}):w.createElement(Yy,{field:e,api:n}))))))),p)}const lv=120,cv=72;function uv(e){let{api:t,app:n}=e;const r=ms(),[o]=Af(n),[i]=$f(o),[a,s]=S.useState({items:[],more:[]}),{modalObjectStore:l}=S.useContext(Bl).selectionStore,[c,u]=Wf(),[d,p]=S.useState(0);return S.useEffect((()=>{if(!u)return;const{width:e}=u,t=Math.floor(e)-cv,n=Math.floor(t/lv);p(n)}),[u]),S.useEffect((()=>{if(!(n&&o&&i&&d))return;const e=function(e){if(!e)return[];const t={};function n(e,n){e.qSelections.forEach((e=>{const r=e.qField;let o=t[r];var i;void 0===o&&(o={name:r,label:(null===(i=e.qDimensionReferences)||void 0===i||null===(i=i.find((e=>e.qLabel)))||void 0===i?void 0:i.qLabel)||e.qReadableName||r,states:[],selections:[]},t[r]=o),o.states.push(n),o.selections.push(e)}))}return e.qSelectionObject&&n(e.qSelectionObject,"$"),e.alternateStates&&e.alternateStates.forEach((e=>n(e.qSelectionObject,e.stateName))),Object.keys(t).map((e=>t[e])).filter((e=>!e.selections.some((e=>e.qIsHidden))))}(i);s((t=>{const r=e;if((()=>{const{model:e}=l.get(n.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)})()&&r.length+1===t.items.length){const e=t.items.filter((e=>!1===r.some((t=>e.name===t.name))))[0],{qField:n}=e.selections[0];e.selections=[{qField:n}];const o=t.items.indexOf(e);r.splice(o,0,e)}let o=[];return d<r.length&&(o=r.splice(d-r.length)),{items:r,more:o}}))}),[n,o,i,t.isInModal(),d]),w.createElement(up,{ref:c,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},a.items.map((e=>w.createElement(up,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(lv,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},e.states.length>1?w.createElement(rv,{field:e,api:t}):w.createElement(Yy,{field:e,api:t})))),a.more.length>0&&w.createElement(up,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(cv,"px"),background:r.palette.background.paper,borderRight:"1px solid ".concat(r.palette.divider)}},w.createElement(sv,{items:a.more,api:t})))}var dv=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 Z M16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,-5.07265313e-17 13.5,0 L15,0 C15.5522847,1.01453063e-16 16,0.44771525 16,1 L16,2.5 Z M10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,-5.07265313e-17 6.5,0 L9.5,0 C9.77614237,5.07265313e-17 10,0.223857625 10,0.5 Z M1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 5.18696197e-13,2.77614237 5.18696197e-13,2.5 L5.18696197e-13,1 C5.18696197e-13,0.44771525 0.44771525,-1.01453063e-16 1,0 L2.5,0 C2.77614237,5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 5.18696197e-13,15.5522847 5.18696197e-13,15 L5.18696197e-13,13.5 C5.18696197e-13,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M4,7 C7.49095643,7 10,10.1337595 10,12.1872632 C10,12.1872632 8.16051135,9.86624054 4,10 L4,12 C4,12 2.66666667,10.8333333 -1.0658141e-14,8.5 C-2.59348099e-13,8.5 1.33333333,7.33333333 4,5 C4,5 4,5.66666667 4,7 Z"}}]}))(e));var pv=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));const fv=(e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}}))),o=(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::"),i=(n.qStateNames||[]).map((e=>e)).join("::");o!==i&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)};function hv(e){let{api:t,app:n}=e;const{translator:r}=S.useContext(Bl),[o]=function(e){const[t]=Af(e),[n]=$f(t),[r]=Bf(e),[o,i]=S.useState(null);return S.useEffect((()=>{r&&t&&n&&fv(t,n,r)}),[r,t,n]),S.useEffect((()=>{if(!n)return;let e=!1,t=!1,r=!1;[n,...n.alternateStates||[]].forEach((n=>{e=e||n.qSelectionObject&&n.qSelectionObject.qBackCount>0,t=t||n.qSelectionObject&&n.qSelectionObject.qForwardCount>0,r=r||(n.qSelectionObject&&n.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),i({canGoBack:e,canGoForward:t,canClear:r})}),[n]),[o,t,n]}(n);return w.createElement(up,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},w.createElement(up,{item:!0},w.createElement(oc,{style:{marginRight:"8px"},disabled:!o||!o.canGoBack,title:r.get("Navigate.Back"),onClick:()=>t.back(),size:"large"},w.createElement(dv,null))),w.createElement(up,{item:!0},w.createElement(oc,{style:{marginRight:"8px"},disabled:!o||!o.canGoForward,title:r.get("Navigate.Forward"),onClick:()=>t.forward(),size:"large"},w.createElement(pv,null))),w.createElement(up,{item:!0},w.createElement(oc,{disabled:!o||!o.canClear,title:r.get("Selection.ClearAll"),onClick:()=>t.clear(),size:"large"},w.createElement(Cg,null))))}const mv=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function gv(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function bv(){return mv.map(gv).join("")}function yv(e){let{app:t}=e;const n=ms(),[r]=Ug(t);return r?w.createElement(up,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:n.palette.background.paper,minHeight:"40px"}},w.createElement(up,{item:!0,style:{borderRight:"1px solid ".concat(n.palette.divider)}},w.createElement(hv,{api:r,app:t})),w.createElement(up,{item:!0,xs:!0,style:{backgroundColor:n.palette.background.darker,overflow:"hidden"}},w.createElement(uv,{api:r,app:t}))):null}let vv;vv="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let Sv=null,wv=null;const xv=vv.clearTimeout,kv=vv.setTimeout,Cv=vv.cancelAnimationFrame||vv.mozCancelAnimationFrame||vv.webkitCancelAnimationFrame,Ev=vv.requestAnimationFrame||vv.mozRequestAnimationFrame||vv.webkitRequestAnimationFrame;function Rv(e){let t,n,r,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&Sv(this.__resizeRAF__),this.__resizeRAF__=wv((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,l="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],l="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+l+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=vv.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const d=l.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==Cv||null==Ev?(Sv=xv,wv=function(e){return kv(e,20)}):(Sv=function([e,t]){Cv(e),xv(t)},wv=function(e){const t=Ev((function(){xv(n),e()})),n=kv((function(){Cv(t),e()}),20);return[t,n]});class Lv extends S.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},o=parseFloat(r.paddingLeft||"0"),i=parseFloat(r.paddingRight||"0"),a=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),c=l.height-a-s,u=l.width-o-i,d=this._parentNode.offsetHeight-a-s,p=this._parentNode.offsetWidth-o-i;(e||this.state.height===d&&this.state.scaledHeight===c)&&(t||this.state.width===p&&this.state.scaledWidth===u)||(this.setState({height:d,width:p,scaledHeight:c,scaledWidth:u}),"function"==typeof n&&n({height:d,scaledHeight:c,scaledWidth:u,width:p}))}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const n=t.ownerDocument.defaultView.ResizeObserver;null!=n?(this._resizeObserver=new n((()=>{this._timeoutId=setTimeout(this._onResize,0)})),this._resizeObserver.observe(t)):(this._detectElementResize=Rv(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:i=!1,nonce:a,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:p,scaledWidth:f,width:h}=this.state,m={overflow:"visible"},g={};let b=!1;return r||(0===d&&(b=!0),m.height=0,g.height=d,g.scaledHeight=p),o||(0===h&&(b=!0),m.width=0,g.width=h,g.scaledWidth=f),i&&(b=!1),S.createElement(c,{ref:this._setRef,style:{...m,...l},...u},!b&&e(g))}}function Pv(e){let{keyboard:t,hovering:n,updateKeyScroll:r,currentScrollIndex:o,isModal:i,constraints:a,selections:s}=e;return{handleKeyDown:e=>{const{keyCode:n,shiftKey:r=!1}=e.nativeEvent,o=()=>{e.stopPropagation(),e.preventDefault()};if(!t.enabled)return;const a=e.currentTarget.closest(".listbox-container"),l=i();switch(n){case tm.TAB:if(document.activeElement===a||!l&&!a.contains(document.activeElement))return;if(r){sm(a)||am(a)||cm(e,t)}else{if(!(lm(a)||am(a)||sm(a)))break}o();break;case tm.ENTER:case tm.SPACE:if(!e.target.classList.contains("listbox-container"))break;t.focus(),o();break;case tm.ESCAPE:cm(e,t),s.isActive()&&s.cancel()}},handleOnMouseEnter:()=>{n.current=!0},handleOnMouseLeave:()=>{n.current&&(n.current=!1)},globalKeyDown:e=>{if(!n.current||(()=>{const e=(null==a?void 0:a.select)||(null==a?void 0:a.active),t=i();return e||t})())return;const{keyCode:t,ctrlKey:s=!1,shiftKey:l=!1}=e;switch(t){case tm.ARROW_UP:r({up:1});break;case tm.ARROW_DOWN:r({down:1});break;case tm.PAGE_UP:r({up:o.stop-o.start});break;case tm.PAGE_DOWN:r({down:o.stop-o.start});break;case tm.HOME:r({scrollPosition:s&&l?"overflowStart":"start"});break;case tm.END:r({scrollPosition:s&&l?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const Tv=bs("div")((()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"})));function Iv(e){let{text:t}=e;const{translator:n}=S.useContext(Bl);return w.createElement(Tv,null,n.get(t))}const Ov={fontSize:"12px"},_v=bs(dl)((e=>{let{theme:t,isLoading:n}=e;return{position:"absolute",top:0,left:0,height:48,zIndex:2,background:t.palette.custom.disabledBackground,opacity:1,color:t.palette.custom.disabledContrastText,width:"100%",display:"flex",justifyContent:n?"center":"flex-start",paddingLeft:16,paddingRight:16,borderRadius:0,"& *, & p":{color:t.palette.custom.disabledContrastText},"& i":{padding:"".concat(mh,"px")}}})),Mv=bs(up,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})((e=>{let{styles:t,isRtl:n}=e;return u(u({flexDirection:n?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},t.header),{},{"& *":{color:t.header.color}})})),qv=bs(uc)((e=>{let{styles:t}=e;return u(u({},t.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})}));function Dv(e){let{translator:t,toggleLock:n,keyboard:r,isLoading:o}=e;const i=t.get("SelectionToolbar.ClickToUnlock");return w.createElement(_v,{title:i,tabIndex:r.enabled?0:-1,onClick:n,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:o},o?w.createElement(kl,{size:16,variant:"indeterminate",color:"primary"}):w.createElement(Gf,{disableRipple:!0,style:Ov}),!o&&w.createElement(uc,{fontSize:"14px"},i))}var Nv=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"}}]}))(e));var Av=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"}}]}))(e));var zv=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"}}]}))(e));const jv="H",Fv="C";var $v={createDimensionIconData:e=>{let{dimInfo:t,app:n,selections:r,isPopover:o,active:i,keyboard:a}=e;switch(t.qGrouping){case jv:return{icon:Av,tooltip:"Listbox.DrillDown",onClick:void 0};case Fv:{const e=n&&i,s=()=>{o||r.confirm(),n.getDimension(t.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):console.log("engine api spec version doesn't have support for function stepCycle")})).catch((()=>null))};return{icon:e?zv:Nv,tooltip:"Listbox.Cyclic",onClick:e?s:void 0,onKeyDown:e?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case tm.SPACE:case tm.ENTER:s();break;case tm.TAB:{if(!a.enabled)return;let n;n=e.shiftKey?a.focusSelection():am(t)||sm(t),n||cm(e,a)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}}};const Bv=bs(ql)((()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0})));function Wv(e){let{iconData:t,translator:n,iconStyle:r,disabled:o,keyboard:i}=e;if(!t)return;const{icon:a,tooltip:s,onClick:l,onKeyDown:c}=t,d=a,p=n.get(s);return l?w.createElement(Bv,{variant:"outlined",onClick:l,tabIndex:i.innerTabStops?0:-1,title:p,size:"large",disableRipple:!0,disabled:o,onKeyDown:c,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button"},w.createElement(d,{style:r})):w.createElement(d,{title:p,size:"large",style:u(u({},r),{},{padding:"".concat(mh,"px")})})}const Hv=500;let Uv=0;function Vv(e){var t,n,r;let{layout:o,translator:i,styles:a,isRtl:s,showLock:c,showSearchIcon:d,constraints:p,onShowSearch:f,classes:h,containerRect:m,isPopover:g,showToolbar:b,showDetachedToolbarOnly:y,containerRef:v,model:x,selectionState:k,isDirectQuery:C,selections:E,keyboard:R,autoConfirm:L,app:P,disablePortal:T}=e;const[I,O]=S.useState(y),[_,M]=S.useState(null==o||null===(t=o.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qLocked),[q,D]=S.useState(!1);S.useEffect((()=>{var e;M(null==o||null===(e=o.qListObject)||void 0===e||null===(e=e.qDimensionInfo)||void 0===e?void 0:e.qLocked)}),[null==o||null===(n=o.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qLocked]);const N=S.useRef(null),A=$v.createDimensionIconData({dimInfo:null==o||null===(r=o.qListObject)||void 0===r?void 0:r.qDimensionInfo,app:P,selections:E,isPopover:g,active:!(null!=p&&p.active),keyboard:R}),z=c&&_,j=!c&&_,F=d||j||A,$=fh-(F?mh:0),B=s?fh-(F?mh:0):hh,W=(d?gh:0)+(j?gh:0)+(A?gh:0),H=function(e){let{isLocked:t,setLocked:n,settingLockedState:r,model:o,setSettingLockedState:i}=e;return()=>{const e=new Date;if(e-Uv<Hv)return Promise.resolve();if(r)return()=>{};i(!0),Uv=e;const a=t?o.unlock:o.lock;return n(!t),a.call(o,"/qListObjectDef").catch((()=>{n(t)})).finally((()=>{setTimeout((()=>{i(!1)}),0)}))}}({isLocked:_,setLocked:M,settingLockedState:q,setSettingLockedState:D,model:x}),U=gg({layout:o,model:x,translator:i,selectionState:k,isDirectQuery:C,selections:E}),V=_||!c?void 0:[{key:"lock",type:void 0,label:i.get("SelectionToolbar.ClickToLock"),getSvgIconShape:Kf,enabled:()=>!q&&!k.selectDisabled()&&Qg(o),action:H}],G=null!=p&&p.active?w.createElement(jg,{title:i.get("Listbox.Search"),size:"large",style:u(u({},Ov),{},{padding:"".concat(mh,"px")})}):w.createElement(oc,{onClick:f,tabIndex:-1,title:i.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn"},w.createElement(jg,{style:Ov}));S.useEffect((()=>{if(!N.current||!m)return;const e=function(e){var t,n,r,o;let{containerRect:i,titleRef:a,iconsWidth:s,paddingLeft:l,paddingRight:c}=e;const u=l+c,d=i.width<(null!==(t=null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)+s+u+2+128,p=(null==a||null===(r=a.current)||void 0===r?void 0:r.scrollWidth)>(null==a||null===(o=a.current)||void 0===o?void 0:o.offsetWidth);return!(!d&&!p)}({containerRect:m,titleRef:N,iconsWidth:W,paddingLeft:$,paddingRight:B});O(y||e)}),[W,$,B,N.current,y,Object.entries(m||{}).sort().join(",")]);const K=function(e){let{isDetached:t,showToolbar:n,containerRef:r,isLocked:o,listboxSelectionToolbarItems:i,extraItems:a,selections:s,keyboard:l,autoConfirm:c,disablePortal:u}=e;return{autoConfirm:c,isDetached:t,show:n&&!t,popover:{show:n&&t,anchorEl:r.current},extraItems:a,more:{enabled:!o,actions:i,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"},disablePortal:u},selections:{show:n,api:s,onConfirm:()=>{null==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!g&&I,showToolbar:b,containerRef:v,isLocked:_,extraItems:V,listboxSelectionToolbarItems:U,selections:E,keyboard:R,autoConfirm:L,disablePortal:T}),J=w.createElement(zg,l({isRtl:s,layout:o},K));if(y)return J;const Z=j?w.createElement(Gf,{size:"large",style:u(u({},Ov),{},{padding:"".concat(mh,"px")})}):void 0;return w.createElement(Mv,{item:!0,container:!0,styles:a,isRtl:s,marginY:1,paddingLeft:"".concat($,"px"),paddingRight:"".concat(B,"px"),className:"header-container"},z&&w.createElement(Dv,{isLoading:q,translator:i,toggleLock:H,keyboard:R}),F&&w.createElement(up,{item:!0,container:!0,alignItems:"center",width:W,className:"header-action-container"},Z||d&&G,w.createElement(Wv,{iconData:A,iconStyle:Ov,disabled:E.isActive()&&g,translator:i,keyboard:R})),w.createElement(up,{item:!0,xs:!0,minWidth:0,justifyContent:s?"flex-end":"flex-start",className:h.listBoxHeader},w.createElement(qv,{variant:"h6",noWrap:!0,ref:N,title:o.title,styles:a},o.title)),w.createElement(up,{item:!0,display:"flex"},J))}const Gv="ListBoxInline",Kv={listBoxHeader:"".concat(Gv,"-listBoxHeader"),screenReaderOnly:"".concat(Gv,"-screenReaderOnly"),listboxWrapper:"".concat(Gv,"-listboxWrapper")},Jv=bs(up,{shouldForwardProp:e=>!["containerPadding","isGridMode","styles"].includes(e)})((e=>{let{theme:t,containerPadding:n,isGridMode:r,styles:o}=e;return u(u({},o.background),{},{["& .".concat(Kv.listBoxHeader)]:{alignSelf:"center",display:"flex"},["& .".concat(Kv.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"},["& .".concat(Kv.listboxWrapper)]:{padding:n},"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus ::-webkit-scrollbar-track":{boxShadow:r?void 0:"inset -2px -2px 0px #3F8AB3"},"&:focus-visible":{outline:"none"}})}));const Zv=w.memo((function(e){var t,n,r,o;let{options:i,layout:a}=e;const{app:s,direction:l,frequencyMode:c,checkboxes:d,search:p=!0,focusSearch:f=!1,rangeSelect:h=!0,model:m,selections:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:x,showGray:k=!0,scrollState:C,renderedCallback:E,toolbar:R=!0,isPopover:L=!1,showLock:P=!1,components:T,selectDisabled:I=(()=>!1),disablePortal:O=!0}=i,_=ms(),{translator:M,keyboardNavigation:q,themeApi:D,queryParams:N,constraints:A}=S.useContext(Bl),{checkboxes:z=d}=a||{},j=Xy({app:s,themeApi:D,theme:_,queryParams:N,components:T,checkboxes:z}),F=function(e){let{appLayout:t}=e;return!(null==t||!t.qIsDirectQueryMode)}({appLayout:null==s?void 0:s.layout}),$=S.useRef(),B=S.useRef(),[W,H]=Wf(),[U,V]=S.useState(!1),[G,K]=S.useState(!1),J=S.useRef(!1),[Z,X]=S.useState({down:0,up:0,scrollPosition:""}),Q=e=>X((t=>u(u({},t),e))),[Y,ee]=S.useState({start:0,stop:0}),[te]=Ug(s),[ne]=S.useState((()=>Zg({selectDisabled:I}))),re=om({containerRef:$,enabled:q}),oe=S.useCallback((()=>(e=>{var t,n;let{app:r,appSelections:o}=e;return null!==(t=null===(n=r.isInModalSelection)||void 0===n?void 0:n.call(r))&&void 0!==t?t:o.isInModal()})({app:s,appSelections:te})),[s,te]),ie=null==a?void 0:a.qListObject.qDimensionInfo.qError,ae=ie&&A.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",{handleKeyDown:se,handleOnMouseEnter:le,handleOnMouseLeave:ce,globalKeyDown:ue}=S.useMemo((()=>Pv({keyboard:re,hovering:J,updateKeyScroll:Q,currentScrollIndex:Y,constraints:A,isModal:oe,selections:g})),[re,J,Q,$,Y,s,te,A,oe]);S.useEffect((()=>(document.addEventListener("keydown",ue),()=>{document.removeEventListener("keydown",ue)})),[ue]),S.useEffect((()=>{!0===p&&K(!0);const e=()=>{V(!0)},t=()=>{V(!1),"toggle"===p&&K(!1)};return L&&(g.isActive()||(g.on("activated",e),g.on("deactivated",t)),V(L)),R&&g&&(g.isModal()||(g.on("activated",e),g.on("deactivated",t)),V(L||g.isActive())),()=>{g&&g.removeListener&&(g.removeListener("activated",e),g.removeListener("deactivated",t))}}),[R,g,L]);const{wildCardSearch:de,searchEnabled:pe,autoConfirm:fe=!1,layoutOptions:he={}}=null!=a?a:{},me=null==a||null===(t=a.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qLocked,ge=!1!==pe&&"toggle"===p&&!me,be=(null==a||null===(n=a.title)||void 0===n?void 0:n.length)&&!1!==(null==a?void 0:a.showTitle),ye=R&&!be&&!L,ve=R&&be||L,Se="rtl"===l;if(!(m&&a&&M&&j))return null;const we=!0===p||"toggle"===p&&G&&!1!==pe,xe=null!==(r=he.dense)&&void 0!==r&&r,ke=()=>{K(!G)},Ce=()=>{"toggle"===p?ke():B.current.focus()},Ee=we&&("toggle"===p||f),Re="grid"===(null==he?void 0:he.dataLayout),Le=function(e){let t,{isGridMode:n,dense:r,height:o,layoutOrder:i}=e;if(n){let e;e=Wm({isGridMode:n,dense:r})>o?"0px":"2px",t="row"===i?"".concat(e," 4px"):"".concat(e," 6px ").concat(e," 4px")}else t=void 0;return t}({isGridMode:Re,dense:xe,height:null===(o=$.current)||void 0===o?void 0:o.clientHeight,layoutOrder:he.layoutOrder});ie&&(null==E||E());const Pe=ve?Eh+yh:0,Te=w.createElement(Vv,{app:s,showSearchIcon:ge,onShowSearch:ke,isPopover:L,showToolbar:U,isDirectQuery:F,autoConfirm:fe,showDetachedToolbarOnly:ye,layout:a,translator:M,styles:j,isRtl:Se,showLock:P,constraints:A,classes:Kv,containerRect:H,containerRef:$,model:m,selectionState:ne,selections:g,keyboard:re,disablePortal:O});return w.createElement(w.Fragment,null,ye&&Te,w.createElement(Jv,{className:"listbox-container",container:!0,tabIndex:re.enabled?-1:void 0,direction:"column",gap:0,containerPadding:Le,styles:j,style:{height:"100%",flexFlow:"column nowrap"},onKeyDown:se,onMouseEnter:le,onMouseLeave:ce,ref:e=>{$.current=e,W(e)},isGridMode:Re,"aria-label":re.active?M.get("Listbox.ScreenReaderInstructions"):""},ve&&Te,w.createElement(up,{item:!0,container:!0,direction:"column",height:"100%",minHeight:Pe,role:"region","aria-label":M.get("Listbox.ResultFilterLabel")},w.createElement(up,{item:!0},w.createElement(Hg,{ref:B,selections:g,selectionState:ne,model:m,dense:xe,keyboard:re,visible:we,search:p,autoFocus:Ee,beginSelectionOnFocus:!L,wildCardSearch:de,searchEnabled:pe,direction:l,hide:ge&&ke,styles:j})),w.createElement(up,{item:!0,xs:!0,className:Kv.listboxWrapper},ie?w.createElement(Iv,{text:ae}):w.createElement(Lv,null,(e=>{let{height:t,width:n}=e;return w.createElement(dg,{model:m,app:s,constraints:A,layout:a,selections:g,selectionState:ne,direction:l,frequencyMode:c,rangeSelect:h,checkboxes:z,height:t,width:n,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:x,keyboard:re,showGray:k,scrollState:C,keyScroll:{state:Z,reset:()=>X({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:Y,set:ee},renderedCallback:E,onCtrlF:Ce,isModal:oe,styles:j})}))))))}));function Xv(e){let{options:t={}}=e;const{model:n}=t,[r]=$f(n);return w.createElement(Zv,{options:t,layout:r})}function Qv(e){let{app:t,qId:n,options:r={}}=e;const[o,i]=S.useState(),[a]=qf(),{sessionModel:s}=r,l=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],c=Object.keys(r).filter((e=>l.includes(e)));if(c.length)throw new Error('Option "'.concat(c.join(", "),'" is not applicable for existing objects.'));return S.useEffect((()=>{let e=!1,r=()=>{};return async function(){const o=await Promise.resolve(s||async function(e){return a.get(e)||await t.getObject(e)}(n));if(!e){if(!a.get(o.id)){a.set(o.id,o);const e=()=>{a.clear(o.id)};o.once("closed",e),r=()=>{o.removeListener("closed",e)}}i(o)}}(),()=>{e=!0,r()}}),[]),o}const Yv={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,autoConfirm:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};function eS(e){let t;switch(!0){case["none","N","NX_FREQUENCY_NONE"].includes(e):t="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(e):t="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(e):t="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(e):t="R";break;default:t="N"}return t}const tS=["__DO_NOT_USE__"],nS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1};return u(u(u({},d(e,tS)),n),t)},rS=S.forwardRef(((e,t)=>{let{app:n,fieldIdentifier:r,qId:o,stateName:i,element:a,initialOptions:s,renderedCallback:l}=e;const[c,d]=S.useState(s),{isExistingObject:p,hasExternalSelectionsApi:f}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:o,options:c});p||Object.assign(c,{frequencyMode:eS(c.frequencyMode)});const[h,m]=S.useState(0);S.useEffect((()=>{if(h)throw new Error("Source or selection Api can not change after a listbox has been mounted");m(h+1)}),[p,f]);const g=p?Qv({app:n,qId:o,options:c}):function(e){var t;let{app:n,fieldIdentifier:r,stateName:o,options:i={}}=e;const[a,s]=S.useState(""),[l,c]=S.useState(!0),[u,d]=S.useState(),[p,f]=S.useState(),h=null!==(t=i.title)&&void 0!==t?t:p;let{histogram:m=!1,frequencyMode:g="N"}=i;a&&a.failedToFetchFieldDef&&(m=!1,g="N"),S.useEffect((()=>{const e=m||"N"!==g;r.qLibraryId&&e?async function(){try{const e=await n.getDimension(r.qLibraryId),t=await e.getLayout();f(t.qDim.title),"N"===t.qDim.qGrouping?s(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""):s({multiFieldDim:!0}),c(!1)}catch(e){throw c(!1),s({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():(c(!1),f(r))}),[]);const{dense:b,checkboxes:y,listLayout:v,properties:w={}}=i,x={dense:b};"horizontal"===v&&(x.dataLayout="grid",x.layoutOrder="column",x.maxVisibleColumns={auto:!0},x.maxVisibleRows={auto:!1,maxRows:1});const k=S.useRef();k.current||(k.current=bv());const C=fe(!0,{},Yv,{qInfo:{qId:k.current},qListObjectDef:{qStateName:o,qFrequencyMode:m&&"N"===g?"V":g},histogram:m,checkboxes:y,layoutOptions:x,title:h});let E;if(fe(!0,C,w),r.qLibraryId?(C.qListObjectDef.qLibraryId=r.qLibraryId,E=r.qLibraryId):(C.qListObjectDef.qDef.qFieldDefs=[r],E=r),"P"!==g&&m)if(null!=a&&a.multiFieldDim)C.frequencyMax="fetch";else{const e=r.qLibraryId?a:E;C.frequencyMax={qValueExpression:ag(e)}}const[R]=Df(C,l?null:n,E,o);return S.useEffect((()=>{R&&d(R)}),[R]),u}({app:n,fieldIdentifier:r,stateName:i,options:c}),b=S.useRef(a),y=f?c.selectionsApi:Jg(n,g,[b,".njs-action-toolbar-more",".njs-action-toolbar-popover"],c)[0],v=S.useMemo((()=>u(u({},c),{},{selections:y,model:g,app:n,renderedCallback:l})),[c,y,g,n]);return S.useImperativeHandle(t,(()=>({setOptions:e=>d(e)})),[]),y&&g?w.createElement(Xv,{options:v}):null}));const oS={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function iS(e){let{app:t,fieldIdentifier:n,stateName:r,element:o,options:i={}}=e;const[a,s]=S.useState(!!i.show);return w.createElement(Qy,{show:a,app:t,alignTo:{current:o},anchorOrigin:i.anchorOrigin,transformOrigin:i.transformOrigin,close:()=>{s(!1),i.onPopoverClose&&i.onPopoverClose()},fieldName:n,stateName:r,autoFocus:i.autoFocus,components:i.components,sortCriteria:i.sortCriteria,direction:i.direction})}function aS(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function sS(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}const lS=e=>({qDef:{qFieldDefs:[e]}}),cS=e=>({qDef:{qDef:e}});function uS(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,i={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r="string"==typeof e?lS(e):u(u({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||bv(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<i.maxDimensions()?(t.qDimensions.push(r),aS(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return sS(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?cS(e):u(u({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||bv(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<i.maxMeasures()?(t.qMeasures.push(r),aS(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];sS(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<i.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<i.maxMeasures()};return i}const dS=e=>({qDef:{qFieldDefs:[e]}});function pS(e){let{dc:t,def:n,properties:r}=e;t.qInitialDataFetch=t.qInitialDataFetch||[];const o=r,i={dimensions:()=>t.qLibraryId||t.qDef&&t.qDef.qFieldDefs&&0!==t.qDef.qFieldDefs.length?[t]:[],measures:()=>[],addDimension(e){const r="string"==typeof e?dS(e):u(u({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||bv(),r.qDef.qSortCriterias=t.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(r).forEach((e=>{t[e]=r[e]})),n.dimensions.added(r,o),r},removeDimension(e){const r=t;return delete t.qDef,delete t.qLibraryId,n.dimensions.removed(r,o,e),r},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===i.dimensions().length,canAddMeasure:()=>!1};return i}const fS=e=>({qDef:{qFieldDefs:[e]}}),hS=e=>{let t;return t="string"==typeof e?fe(!0,{},Yv,{qListObjectDef:fS(e)}):e.qListObjectDef?fe(!0,{},Yv,e):fe(!0,{},Yv,{qListObjectDef:e}),t};function mS(e){let{children:t,halo:n}=e;const r={async addDimension(e){const r=hS(e),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||bv(),!r.title)if(o.qLibraryId){const e=await n.app.getDimension(o.qLibraryId),t=await e.getProperties();t.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:t.qDim.qLabelExpression}}:r.title=t.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}t.push({qProperty:r,qChildren:[]})},addMeasure(){}};return r}function gS(e){return"string"==typeof e&&"="===e[0]||"object"==typeof e&&e.qDef&&e.qDef.qDef||"object"==typeof e&&e.qLibraryId&&"measure"===e.type?"measure":"dimension"}async function bS(e,t){let{sn:n,properties:r,fields:o,children:i}=e;if(!o.length)return;const a=n.qae.data.targets[0];if(!a)return;const{propertyPath:s}=a,l=s.split("/");let c=r;for(let e=0;e<l.length;e++){const t=l[e];c=t?c[t]:c}const u=function(e){return e.match("/qListObjectDef")?pS:e.match("/qChildListDef")?mS:uS}(s),d=u({dc:c,def:a,properties:r,children:i,halo:t});for(let e=0;e<o.length;++e){const t=o[e];"measure"===gS(t)?await d.addMeasure(t):await d.addDimension(t)}}var yS={getValue:(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},setValue:(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var vS={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;let n=e.indexOf(t[0]);if(-1!==n){for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){let n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},move:function(e,t,n){if(n<0)throw Error("newIndex cannot be a negative value!");if(n>=e.length){let t=n-e.length+1;for(;t;)e.push(void 0),t--}const r=e.at(t);e.splice(t,1),e.splice(n,0,r)}};const SS=2**53-1;function wS(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function xS(e,t){const n=fe(!0,{},t,e);return yS.getValue(n,"qOtherTotalSpec.qOtherCounted")||yS.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),yS.getValue(n,"qOtherTotalSpec.qOtherLimit")||yS.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function kS(e,t){return fe(!0,{},t,e)}function CS(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var ES={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===yS.getValue(e,t)&&yS.setValue(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:wS,importCommonProperties:function(e,t,n){const r="masterobject"===yS.getValue(t,"properties.qInfo.qType")?"masterobject":yS.getValue(n,"qInfo.qType");yS.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},createDefaultDimension:xS,createDefaultMeasure:kS,resolveValue:CS,getHypercubePath:function(e){const t=yS.getValue(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(vS.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,vS.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=fe(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?yS.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||wS(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=fe(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=CS(i.max,r.dimensions.length,SS),s=CS(i.min,r.dimensions.length,0);return{maxDimensions:CS(o.max,a,SS),minDimensions:CS(o.min,s,0),maxMeasures:a,minMeasures:s}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.dimensions.length;++s)o.qDimensions.length<n?o.qDimensions.push(xS(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(xS(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(xS(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(xS(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(xS(a.excludedDimensions[s],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.measures.length;++s)o.qMeasures.length<n?o.qMeasures.push(kS(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(kS(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(kS(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(kS(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(kS(a.excludedMeasures[s],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=yS.getValue(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=yS.getValue(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var RS={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=yS.getValue(o,n||""),a=i.qHyperCubeDef,s=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),s.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&s.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),s.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&s.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),s.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();vS.isOrderedSubset(e,s.interColumnSortOrder)&&(s.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(ES.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!yS.isEmpty(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},s=ES.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=yS.getValue(n,i||"").qHyperCubeDef,c=yS.getValue(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f}=ES.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:h=ES.getDefaultDimension(),defaultMeasure:m=ES.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,ES.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f})&&ES.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:f,newHyperCubeDef:c}),ES.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:h}),ES.addDefaultMeasures({exportFormat:t,maxMeasures:p,minMeasures:f,newHyperCubeDef:c,defaultMeasure:m}),ES.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),ES.copyPropertyIfExist("qMaxStackedCells",l,c),ES.copyPropertyIfExist("qNoOfLeftDims",l,c),ES.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),ES.copyPropertyOrSetDefault("qMode",l,c,"S"),ES.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),ES.copyPropertyOrSetDefault("qSortbyYValue",l,c),ES.copyPropertyOrSetDefault("qIndentMode",l,c),ES.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),ES.importCommonProperties(s,t,n),ES.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),ES.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const LS=e=>yS.getValue(e,"data.targets.0.propertyPath"),PS=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return RS.exportProperties})(LS(e))},TS=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return RS.importProperties})(LS(e))},IS=async e=>{let{halo:t,model:n,cellRef:r,newType:o,properties:i,viewDataMode:a=!1}=e;const s=i?{qProperty:i}:await n.getFullPropertyTree(),l=r.current.getQae(),c=PS(l);if(!c)throw new Error("Source chart does not support conversion");const d=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),p=d.qae,f=TS(p);if(!f)throw new Error("Target chart does not support conversion");return f({exportFormat:c({propertyTree:s,hypercubePath:ES.getHypercubePath(l),viewDataMode:a}),initialProperties:u({qInfo:{qType:o},visualization:o},yS.getValue(p,"properties.initial",{})),dataDefinition:yS.getValue(p,"data.targets.0.",{}),hypercubePath:ES.getHypercubePath(p),viewDataMode:a})},OS={hypercube:RS},_S=fe.bind(null,!0),MS={},{isArray:qS}=Array;function DS(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function NS(e){return void 0===e}function AS(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function zS(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=NS(e[r||t])?i:e[t],e=e[r||t]})),e}function jS(e,t){let n=!0;if(DS(e)&&DS(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{jS(e[r],t[r])||(n=!1)})),n);if(qS(e)&&qS(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!jS(e[n],t[n]))return!1;return!0}return e===t}MS.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?_S({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);jS(i,a)||AS(t,o)||(NS(a)?r.push({op:"add",path:s,value:i}):DS(i)&&DS(a)?r=r.concat(MS.generate(a,i,s)):qS(i)&&qS(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&NS(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(jS(t,o))return r;if(!NS(t[0])&&NS(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(MS.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((o=>{NS(t[o])&&!AS(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},MS.apply=function(e,t){t.forEach((t=>{let n=zS(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(qS(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(qS(o)&&qS(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(DS(o)&&DS(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!AS(a,e)&&delete a[e]})),_S(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=zS(e,t.from);qS(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(qS(n)?n.splice(+r,1):delete n[r]);var a}))},MS.clone=function(e){return _S({},e)},MS.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},MS.updateObject=function(e,t){Object.keys(e).length?MS.apply(e,MS.generate(e,t)):_S(e,t)};const FS=e=>t=>{const n=(r=u(u({},t),{},{action(){"function"==typeof t.action&&t.action.call(n,e),n.emit("changed")},enabled:()=>"function"!=typeof t.enabled||t.enabled.call(n,e),active:"function"==typeof t.active?function(){return t.active.call(n,e)}:void 0}),Object.keys(T.prototype).forEach((e=>{r[e]=T.prototype[e]})),T.init(r),r);var r;return n};let $S,BS;function WS(e,t){if(!e)return!0;if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!0;return!1}function HS(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null},contraintsWarning:!0}}function US(e){GS(e.__hooks.list,!0),e.__hooks.obsolete=!0,e.__hooks.list.length=0,e.__hooks.pendingEffects.length=0,e.__hooks.pendingLayoutEffects.length=0,e.__hooks.actions=null,e.__hooks.imperativeHandle=null,e.__hooks.resizer=null,e.__hooks.accessibility=null,e.__actionsDispatch=null,clearTimeout(e.__hooks.micro),cancelAnimationFrame(e.__hooks.macro)}async function VS(e){if(e.__hooks.obsolete)return Promise.resolve();BS=-1,$S=e,$S.__hooks.initiated&&$S.__hooks.list.length;try{$S.fn.call(null)}catch(e){console.error(e)}$S.__hooks.initiated=!0;const t=$S.__hooks;return XS($S),BS=void 0,$S=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){GS(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){GS(e.pendingEffects),e.macro=null,function(e){if(e.pendingPromises.length||e.micro||e.macro)return;e.chain.promise=null,e.chain.resolve(!e.waitForData)}(e)}(e)}))}(t),t.chain.promise}function GS(e,t){try{e.forEach((e=>{"function"==typeof e.teardown&&e.teardown(),t||(e.teardown=e.value[0]())}))}catch(e){console.error(e)}e.length=0}function KS(e,t){try{return Promise.all(e.__hooks.snaps.map((e=>Promise.resolve(e.fn(t))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function JS(e,t,n,r){try{return Promise.all(e.__hooks.menus.map((e=>Promise.resolve(e.fn(t,n,r))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function ZS(e){return e.__hooks.imperativeHandle}function XS(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function QS(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,XS(e))}function YS(e){if(void 0===$S)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=$S.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function ew(e){YS(++BS);return $S.context[e]}function tw(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function nw(e){return{__hooked:!0,fn:e,initiate:HS,run:VS,teardown:US,runSnaps:KS,runMenu:JS,focus:lw,blur:cw,observeActions:QS,getImperativeHandle:ZS,updateRectOnNextRun:tw}}function rw(e){const t=YS(++BS);if(!t.value){t.component=$S;const n=e=>{if(t.component.__hooks.obsolete)return;const n="function"==typeof e?e(t.value[0]):e;var r;n!==t.value[0]&&(t.value[0]=n,(r=t.component).__hooks.micro||(r.__hooks.micro=setTimeout((()=>{r.__hooks.micro=null,VS(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function ow(e,t){const n=YS(++BS);WS(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===$S.__hooks.pendingEffects.indexOf(n)&&$S.__hooks.pendingEffects.push(n))}function iw(e,t){const n=YS(++BS);WS(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],$S.__hooks.pendingLayoutEffects.push(n))}function aw(e,t){const n=YS(++BS);return WS(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function sw(){return ew("element")}function lw(e){const t=e.__hooks.accessibility;t.active||(t.active=!0,t&&t.setter&&t.setter({active:!0,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}function cw(e){const t=e.__hooks.accessibility;t&&t.active&&(t.active=!1,t&&t.setter&&t.setter({active:!1,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}const uw={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},dw=Object.keys(uw),pw=e=>(Object.keys(T.prototype).forEach((t=>{e[t]=T.prototype[t]})),T.init(e),e);function fw(e,t){const n=u({},uw);pw(n);const r={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==dw.indexOf(t)?n[t]=e.component[t].bind(r):r[t]=e.component[t]}));const o=function(e){let{sn:t,component:n}=e;const r={},o=[],i=FS(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:r}),i=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(r,{model:t.model,app:t.app,global:i,selections:t.selections,actions:o.actions}),Object.assign(n,{actions:o.actions,model:t.model,app:t.app,selections:t.selections}),[n,o]}function hw(e,t,n){"function"==typeof e.component&&(e.component=nw(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const i={},a=["appLayout","constraints","interactions"],s={},l={};t.model&&t.model.session||(s.select=!0,s.edit=!0,l.select=!1,l.edit=!1);const c={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,navigation:t.navigation,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,externalFocusManagement:t.externalFocusManagement||!1,focusHandler:t.focusHandler,constraints:s,interactions:l,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(c,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(u(u({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(u(u({},r[e]),l))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=c.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n,r){return e.component.runMenu(this,t,n,r)},focus(){const t=e.component.getImperativeHandle(this);t&&"function"==typeof t.focus?t.focus():e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach((e=>{i[e]=JSON.stringify(c.context[e])})),i.themeName=c.context.theme?c.context.theme.name():void 0,i.language=c.context.translator?c.context.translator.language():void 0,Object.assign(c,{selections:t.selections}),[c,null]}(e,t,n):fw(e,t),i=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];try{e.qae.properties.onChange.call({model:t.model},...r)}catch(e){}return t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=MS.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));MS.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const s=MS.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,s,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.__snInterceptor&&(t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor)},i.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){i.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const mw=1e3,gw=1e3,bw=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],yw=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map((e=>{let[t,n]=e;return t+(Math.random()*(n-t)|0).toString(32)})).join(""),vw=(e,t)=>e&&e.find((e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t}))||null,Sw=e=>{var t,n;return u(u({},e),{},{qDef:u(u({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:yw()})})},ww=e=>{var t;return u(u({},Sw(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},xw=(e,t,n)=>{const r=t;e.forEach(((e,t)=>{const o=e.qTags,i={qSortByLoadOrder:1};"function"==typeof n.dimensionDefinition.autoSort?n.dimensionDefinition.autoSort(r,n.properties,o,i,n):(i.qSortByNumeric=1,i.qSortByAscii=1),r.qDef.qSortCriterias?r.qDef.qSortCriterias[t]=i:r.qDef.qSortCriterias=[i]}))},kw=new Error("Not supported in this object, need to implement in subclass."),Cw=e=>{if(!e)return[];return[...e].map((e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?u(u({},e),{},{qDef:u(u({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e}))},Ew=(e,t)=>{if(e)return t&&yS.getValue(e,t)?yS.getValue(e,t).qHyperCube:e.qHyperCube};function Rw(e,t){return e.filter(((e,n)=>t.includes(n)))}function Lw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeDimensions(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function Pw(e,t,n){vS.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function Tw(e,t){return"function"==typeof e.dimensionDefinition.move?Promise.resolve(e.dimensionDefinition.move.call(e,t,e.properties,e)).then((()=>t)):Promise.resolve(t)}function Iw(e,t){return e.getAlternativeDimensions().length+t.length>=mw}function Ow(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<mw}async function _w(e,t,n,r,o,i){await e.autoSortDimension(t),vS.indexAdded(e.hcProperties.qInterColumnSortOrder,n+i),r.push(t),o.push(t),"function"==typeof e.dimensionDefinition.add&&e.dimensionDefinition.add.call(e,t,e.properties,e)}function Mw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeMeasures(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function qw(e,t){vS.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function Dw(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<gw}function Nw(e,t,n,r){const o=e-n.length;let[i]=n.splice(n.length-1,1);return r.splice(0,0,i),[i]=r.splice(o+1,1),n.splice(t,0,i),Promise.resolve(i)}class Aw{constructor(e){var t,n;const r=e||{};this.dimensionDefinition=r.dimensionDefinition||{max:0},this.measureDefinition=r.measureDefinition||{max:0},this.dimensionProperties=null!==(t=r.dimensionProperties)&&void 0!==t?t:{},this.measureProperties=null!==(n=r.measureProperties)&&void 0!==n?n:{},this.globalChangeListeners=r.globalChangeListeners,this.app=r.app}setProperties(e){var t;this.properties=e,this.isAnalysisType=null===(t=this.properties)||void 0===t||null===(t=t.metaData)||void 0===t?void 0:t.isAnalysisType}setGlobalChangeListeners(e){this.globalChangeListeners=e}setLayout(e){this.layout=e}type(){throw new Error("Must override this method")}getDimensions(){return[]}getDimension(e){var t;const n=this.getDimensions(),r=this.getAlternativeDimensions();return null!==(t=vw(n,e.id))&&void 0!==t?t:vw(r,e.id)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw kw}addDimensions(){throw kw}removeDimension(){throw kw}removeDimensions(){throw kw}autoSortDimension(){throw kw}replaceDimension(){throw kw}getSorting(){throw kw}createLibraryDimension(e){let t=fe(!0,{},this.dimensionProperties||{},e.defaults||{});return t=ww(t),t.qLibraryId=e.id,t.qDef.autoSort=!0,t.qDef.qSortCriterias=bw,delete t.qDef.qFieldDefs,delete t.qDef.qFieldLabels,t}createFieldDimension(e){let t=fe(!0,{},this.dimensionProperties||{},e.defaults||{});return t=ww(t),e.field||(t.qDef.qFieldDefs=[],t.qDef.qFieldLabels=[],t.qDef.qSortCriterias=[]),t.qDef.qFieldDefs=[e.field],t.qDef.qFieldLabels=e.label?[e.label]:[""],t.qDef.qSortCriterias=bw,t.qDef.autoSort=!0,t}addFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t)}addFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t)}addLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t)}addLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t)}async addAltLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t,!0)}async addAltFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t,!0)}addAlternativeFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t,!0)}addAlternativeLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t,!0)}minDimensions(){return"function"==typeof this.dimensionDefinition.min?this.dimensionDefinition.min.call(null,this.properties,this):this.dimensionDefinition.min||0}maxDimensions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.getMeasures().length-e;if("function"==typeof this.dimensionDefinition.max){var n;const e=[t];return null===(n=this.dimensionDefinition.max)||void 0===n?void 0:n.apply(null,e)}return Number.isNaN(+this.dimensionDefinition.max)?1e4:this.dimensionDefinition.max}canAddDimension(){return this.getDimensions().length<this.maxDimensions()}getMeasures(){return[]}getAlternativeMeasures(){throw new Error("Method not implemented.")}addMeasure(){throw kw}addMeasures(){throw kw}removeMeasure(){throw kw}removeMeasures(){throw kw}autoSortMeasure(){throw kw}replaceMeasure(){throw kw}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=vw(n,e.id))&&void 0!==t?t:vw(r,e.id)}createExpressionMeasure(e){var t,n;const r=fe(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},r.qDef.qDef=e.expression,r.qDef.qLabel=e.label,r.qDef.autoSort=!0,r}addExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t)}addExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t)}createLibraryMeasure(e){var t,n;const r=fe(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},(e=>{const t=e;t.quarantine={qNumFormat:t.qNumFormat||{},isCustomFormatted:t.isCustomFormatted||!1},t.qNumFormat=null,t.isCustomFormatted=void 0})(r.qDef),r.qLibraryId=e.id,r.qDef.autoSort=!0,delete r.qDef.qDef,delete r.qDef.qLabel,r}addLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t)}addLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t)}addAltLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t,!0)}addAltExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t,!0)}addAlternativeExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t,!0)}addAlternativeLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t,!0)}minMeasures(){return"function"==typeof this.measureDefinition.min?this.measureDefinition.min.call(null,this.properties,this):this.measureDefinition.min||0}maxMeasures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("function"==typeof this.measureDefinition.max){const t=[this.getDimensions().length-e];return this.measureDefinition.max.apply(null,t)}return Number.isNaN(+this.measureDefinition.max)?1e4:this.measureDefinition.max}canAddMeasure(){return this.getMeasures().length<this.maxMeasures()}updateGlobalChangeListeners(e){this.globalChangeListeners&&(this.globalChangeListeners||[]).forEach((t=>{t&&"function"==typeof t&&t(this.properties,this,{layout:e})}))}}function zw(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then((async()=>(Pw(e,r,n),await function(e,t){return t&&"function"==typeof e.dimensionDefinition.add?Promise.resolve(e.dimensionDefinition.add.call(null,t,e.properties,e)).then((()=>t)):Promise.resolve(t)}(e,t),t)))}function jw(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),e.autoSortMeasure(t).then((()=>(qw(e,r),function(e,t){return t&&"function"==typeof e.measureDefinition.add?Promise.resolve(e.measureDefinition.add.call(null,t,e.properties,e)):Promise.resolve()}(e,t).then((()=>t)),t)))):Promise.resolve()}async function Fw(e,t){!function(e,t){vS.indexRemoved(e.hcProperties.qInterColumnSortOrder,t)}(e,t),await function(e,t){const[n]=e.getDimensions().splice(t,1);return n&&"function"==typeof e.dimensionDefinition.remove?Promise.resolve(e.dimensionDefinition.remove.call(null,n,e.properties,e,t)):Promise.resolve()}(e,t)}async function $w(e,t){!function(e,t){vS.indexRemoved(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t)}(e,t),await function(e,t){const[n]=e.getMeasures().splice(t,1);return n&&"function"==typeof e.measureDefinition.remove?Promise.resolve(e.measureDefinition.remove.call(null,n,e.properties,e,t)):Promise.resolve()}(e,t)}function Bw(e,t){const[n]=e.getAlternativeDimensions().splice(t,1);if(n&&"function"==typeof e.dimensionDefinition.remove)return n.isAlternative=!0,Promise.resolve(e.dimensionDefinition.remove.call(null,n,e.properties,e,t)).then((()=>{delete n.isAlternative}))}function Ww(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),qw(e,r),function(e,t){return"function"==typeof e.measureDefinition.move?Promise.resolve(e.measureDefinition.move.call(null,t,e.properties,e,!0)).then((()=>t)):Promise.resolve(t)}(e,t)):Promise.resolve(t)}class Hw extends Aw{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?yS.getValue(e,"".concat(this.path,".qHyperCubeDef")):e.qHyperCubeDef,this.hcProperties&&(!function(e){var t,n,r,o,i,a,s;const l=e;l.hcProperties.qDimensions=null!==(t=l.getDimensions())&&void 0!==t?t:[],l.hcProperties.qMeasures=null!==(n=l.getMeasures())&&void 0!==n?n:[],l.hcProperties.qInterColumnSortOrder=null!==(r=l.hcProperties.qInterColumnSortOrder)&&void 0!==r?r:[],l.hcProperties.qLayoutExclude=null!==(o=l.hcProperties.qLayoutExclude)&&void 0!==o?o:{qHyperCubeDef:{qDimensions:[],qMeasures:[]}},l.hcProperties.qLayoutExclude.qHyperCubeDef=null!==(i=l.hcProperties.qLayoutExclude.qHyperCubeDef)&&void 0!==i?i:{qDimensions:[],qMeasures:[]},l.hcProperties.qLayoutExclude.qHyperCubeDef.qDimensions=null!==(a=l.getAlternativeDimensions())&&void 0!==a?a:[],l.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=null!==(s=l.getAlternativeMeasures())&&void 0!==s?s:[]}(this),function(e){const t=e;t.hcProperties.isHCEnabled&&0===t.hcProperties.qDynamicScript.length&&"S"===t.hcProperties.qMode&&(t.hcProperties.qDynamicScript=[])}(this),this.hcProperties.qDimensions=Cw(this.hcProperties.qDimensions),this.hcProperties.qMeasures=Cw(this.hcProperties.qMeasures)))}getDimensions(){return this.hcProperties?this.hcProperties.qDimensions:[]}getAlternativeDimensions(){var e,t;return null!==(e=null===(t=this.hcProperties)||void 0===t||null===(t=t.qLayoutExclude)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qDimensions)&&void 0!==e?e:[]}getDimensionLayout(e){return this.getDimensionLayouts().filter((t=>e===t.cId))[0]}getDimensionLayouts(){const e=Ew(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e){const t=ww(e.dimension);return Ow(this,e.alternative)?Lw(this,t,e.index):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?zw(e,t,o):Promise.resolve(t)}(this,t,e.index)}async addDimensions(e){const t=this.getDimensions(),n=t.length,r=[];let o=0;const{dimensions:a}=e;var s,l=!1,c=!1;try{for(var u,d=i(a);l=!(u=await d.next()).done;l=!1){const i=u.value;{if(Iw(this,t))return r;const a=ww(i);if(Ow(this,e.alternative||!1)){const e=await Lw(this,a);r.push(e)}else t.length<this.maxDimensions()&&(await _w(this,a,n,t,r,o),o++)}}}catch(e){c=!0,s=e}finally{try{l&&null!=d.return&&await d.return()}finally{if(c)throw s}}return r}removeDimension(e){const{alternative:t,index:n}=e;t&&Bw(this,n),Fw(this,n)}async removeDimensions(e){const t=this.getAlternativeDimensions(),n=this.getDimensions();if(0===e.indexes.length)return[];let r=[];const o=[...e.indexes].sort(((e,t)=>t-e));if(e.alternative&&t.length>0){r=Rw(t,e.indexes);var a,s=!1,l=!1;try{for(var c,u=i(o);s=!(c=await u.next()).done;s=!1){const e=c.value;await Bw(this,e)}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}}else if(n.length>0){r=Rw(n,e.indexes);var d,p=!1,f=!1;try{for(var h,m=i(o);p=!(h=await m.next()).done;p=!1){const e=h.value;await Fw(this,e)}}catch(e){f=!0,d=e}finally{try{p&&null!=m.return&&await m.return()}finally{if(f)throw d}}}return r}replaceDimension(e){const{index:t,dimension:n}=e;return this.autoSortDimension(n).then((()=>function(e,t,n){if(!n)return;const r=e.getDimensions(),o=r[t],i=u(u({},n),{},{qDef:u(u({},n.qDef),{},{cId:yw()})});return r[t]=i,i&&"function"==typeof e.dimensionDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertDimension(e){const t=Sw(e.dimension);return Ow(this,e.alternative)?Lw(this,t,e.index).then((()=>{Tw(this,t)})):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?(r.splice(o,0,t),Pw(e,r),Tw(e,t)):Promise.resolve(t)}(this,t,e.index)}moveDimension(e){const t=this.getDimensions(),n=this.getAlternativeDimensions();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(vS.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Promise.resolve(Nw(e.fromIndex,e.toIndex,t,n)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;vS.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}autoSortDimension(e){return e.qLibraryId?function(e,t){return e.app.getDimensionList().then((n=>{const r=(null==t?void 0:t.qLibraryId)&&(o=t.qLibraryId,(i=n)&&i.find((e=>e.qInfo.qId===o))||null);var o,i;return r&&xw(r.qData.info,t,e),t}))}(this,e):function(e,t){return e.app.getFieldList().then((n=>{var r;const o=(null==t||null===(r=t.qDef)||void 0===r?void 0:r.qFieldDefs)&&((e,t)=>{const n=(e=>{const t=[];return e.forEach((e=>{t.push((e=>{const t=e;return t.isDateField=(e=>{var t,n;return(null==e?void 0:e.qDerivedFieldData)&&((null==e||null===(t=e.qTags)||void 0===t?void 0:t.indexOf("$date"))>-1||(null==e||null===(n=e.qTags)||void 0===n?void 0:n.indexOf("$timestamp"))>-1)})(t),t.isGeoField=(e=>e.qTags.indexOf("$geoname")>-1)(t),t})(e));const n=(e=>{const t=[];return e.qDerivedFieldData?(e.qDerivedFieldData.qDerivedFieldLists.forEach((n=>{n.qFieldDefs.forEach((r=>{var o;t.push({qName:r.qName,displayName:(o=r.qName,o?o.split(".autoCalendar").join(""):""),qSrcTables:e.qSrcTables,qTags:r.qTags,isDerived:!0,isDerivedFromDate:e.isDateField,sourceField:e.qName,derivedDefinitionName:n.qDerivedDefinitionName})}))})),t):t})(e);t.push(...n)})),t})(t.slice(0)),r=(e=>{let t=e;t=t.trim(),"="===t.charAt(0)&&(t=t.substring(1),t=t.trim());const n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=t.substring(1,n),t=t.trim()),t})(e);return n&&((e,t)=>t&&t.find((t=>t.qName===e))||null)(r,n)||null})(t.qDef.qFieldDefs[0],n);return o&&xw([o],t,e),t}))}(this,e)}getMeasures(){return this.hcProperties?this.hcProperties.qMeasures:[]}getAlternativeMeasures(){var e,t;return null!==(e=null===(t=this.hcProperties)||void 0===t||null===(t=t.qLayoutExclude)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)&&void 0!==e?e:[]}getMeasureLayouts(){const e=Ew(this.layout,this.path);return e?e.qMeasureInfo:[]}getMeasureLayout(e){return this.getMeasureLayouts().filter((t=>e===t.cId))[0]}addMeasure(e){const t=Sw(e.measure);if(Dw(this,e.alternative)){return Mw(t,this.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures,e.index)}return jw(this,t,e.index)}autoSortMeasure(e){const t=e;return t.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},Promise.resolve(t)}addMeasures(e){const t=this.getMeasures(),n=[];let r=0;return e.measures.forEach((async o=>{if(function(e,t){return e.getAlternativeMeasures().length+t.length>=gw}(this,t))return!1;const i=Sw(o);return Dw(this,e.alternative||!1)?(Mw(this,i),n.push(i)):t.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=u({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},vS.indexAdded(e.hcProperties.qInterColumnSortOrder,i.length+n.length+o),n.push(a),r.push(a),"function"==typeof e.measureDefinition.add&&e.measureDefinition.add.call(null,a,e.properties,e),Promise.resolve(r)}(this,i,t,n,r),r++),!0})),n}removeMeasure(e){const{index:t,alternative:n}=e;n&&function(e,t){e.getAlternativeMeasures().splice(t,1)}(this,t),$w(this,t)}async removeMeasures(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();let r=[];if(0===e.length)return r;if(e.alternative&&n.length>0)r=Rw(n,e.indexes),function(e,t){const n=e,r=function(e,t){return e.filter(((e,n)=>!t.includes(n)))}(n.getAlternativeMeasures(),t);n.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=r}(this,e.indexes);else if(t.length>0){r=Rw(t,e.indexes);const n=[...e.indexes].sort(((e,t)=>t-e));var o,a=!1,s=!1;try{for(var l,c=i(n);a=!(l=await c.next()).done;a=!1){const e=l.value;await $w(this,e)}}catch(e){s=!0,o=e}finally{try{a&&null!=c.return&&await c.return()}finally{if(s)throw o}}}return r}replaceMeasure(e){const{index:t,measure:n}=e;return this.autoSortMeasure(n).then((()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=u(u({},n),{},{qDef:u(u({},n.qDef),{},{cId:yw()})});return r[t]=i,i&&"function"==typeof e.measureDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertMeasure(e){const t=Sw(e.measure);return Dw(this,e.alternative)?Mw(this,t,e.index):Ww(this,t,e.index)}moveMeasure(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(vS.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Nw(e.fromIndex,e.toIndex,t,n):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;vS.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}setSorting(e){e&&e.length===this.hcProperties.qInterColumnSortOrder.length&&(this.hcProperties.qInterColumnSortOrder=e)}getSorting(){return this.hcProperties.qInterColumnSortOrder}changeSorting(e){yS.move(this.hcProperties.qInterColumnSortOrder,e.fromIndex,e.toIndex)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}setHCEnabled(e){this.hcProperties&&(this.hcProperties.isHCEnabled=e)}getDynamicScripts(){var e;return(null===(e=this.hcProperties)||void 0===e?void 0:e.qDynamicScript)||[]}}const Uw=()=>{};function Vw(e,t){return void 0===e?()=>t:()=>e}function Gw(e){const t=e||{};return{min:"function"==typeof t.min?t.min:Vw(t.min,0),max:"function"==typeof t.max?t.max:Vw(t.max,1e3),added:t.added||t.add||Uw,description:t.description||Uw,moved:t.moved||t.move||Uw,removed:t.removed||t.remove||Uw,replaced:t.replaced||t.replace||Uw,isDefined:()=>!!e}}const Kw=(e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o};function Jw(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>Kw(e,n,{}),dimensions:Gw(e.dimensions),measures:Gw(e.measures)}}function Zw(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);return{properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(Jw)},exportProperties:t.exportProperties,importProperties:t.importProperties}}function Xw(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:Zw(n.qae),component:n.component||{},create:e=>hw(r,e,t),definition:t.flags.isEnabled("NEBULA_DATA_HANDLERS")?{dataHandler:e=>new Hw(e)}:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var Qw=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M8.86225926,1.6 L15.7815749,13.5 C16.2829746,14.3 15.8818548,15 14.9793354,15 L1.04042422,15 C0.0853772072,15 -0.232971797,14.3650794 0.172002787,13.6135407 L7.05722041,1.6 C7.55862009,0.8 8.36085958,0.8 8.86225926,1.6 Z M7.962,2.007 C7.95987183,2.02476599 7.95607967,2.03712023 7.94920396,2.05249845 L1.1033193,14 L14.915544,14 L7.99777452,2.10265906 L7.97779697,2.06138411 L7.96394459,2.01964415 L7.962,2.007 Z M7.5,11 L8.5,11 C8.76666667,11 8.95432099,11.1580247 8.99272977,11.4038409 L9,11.5 L9,12.5 C9,12.7666667 8.84197531,12.954321 8.59615912,12.9927298 L8.5,13 L7.5,13 C7.23333333,13 7.04567901,12.8419753 7.00727023,12.5961591 L7,12.5 L7,11.5 C7,11.2333333 7.15802469,11.045679 7.40384088,11.0072702 L7.5,11 L8.5,11 L7.5,11 Z M7.5,5 L8.5,5 C8.76666667,5 8.95432099,5.15802469 8.99272977,5.40384088 L9,5.5 L9,9.5 C9,9.76666667 8.84197531,9.95432099 8.59615912,9.99272977 L8.5,10 L7.5,10 C7.23333333,10 7.04567901,9.84197531 7.00727023,9.59615912 L7,9.5 L7,5.5 C7,5.23333333 7.15802469,5.04567901 7.40384088,5.00727023 L7.5,5 L8.5,5 L7.5,5 Z"}}]}))(e));function Yw(e){let{d:t}=e;const n=ms();let r="inherit",o=n.palette.success.main;t.missing?o=n.palette.warning.main:t.error&&(r="error",o=n.palette.error.main);const i={color:o},a=w.createElement(uc,{style:{lineHeight:"30px",paddingRight:n.spacing(1)}},w.createElement(bp,null,t.missing||t.error?w.createElement(Qw,{style:i}):w.createElement(ch,{style:i})));return w.createElement(up,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},w.createElement(up,{item:!0},a),w.createElement(up,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},w.createElement(uc,{noWrap:!0,component:"p"},w.createElement(uc,{component:"span",variant:"subtitle2",color:r},t.description),w.createElement(uc,{component:"span"}," "),w.createElement(uc,{component:"span",variant:"subtitle2",color:t.error?"error":"inherit",style:{fontWeight:400}},t.label))))}function ex(e){let{data:t}=e;const n=ms();return w.createElement(up,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},t.map(((e,t)=>{const r=e.descriptions.map(((e,t)=>w.createElement(Yw,{d:e,key:t})));return r.length>0&&w.createElement(up,{container:!0,item:!0,key:t,direction:"column",style:{paddingBottom:n.spacing(2)}},w.createElement(uc,{noWrap:!0,key:t,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),r)})))}function tx(e){let{title:t="Error",message:n="",data:r=[]}=e;return w.createElement(up,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},w.createElement(up,{item:!0},w.createElement(Qw,{style:{fontSize:"38px"}})),w.createElement(up,{item:!0},w.createElement(uc,{variant:"h6",align:"center","data-tid":"error-title"},t)),w.createElement(up,{item:!0},w.createElement(uc,{variant:"subtitle1",align:"center","data-tid":"error-message"},n)),w.createElement(ex,{data:r}))}const nx=["size"],rx="Progress",ox={root:"".concat(rx,"-root"),front:"".concat(rx,"-front"),back:"".concat(rx,"-back")},ix=bs("div")((e=>{let{theme:t}=e;return{["&.".concat(ox.root)]:{position:"relative",display:"inline-block"},["& .".concat(ox.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(ox.back)]:{color:t.palette.divider}}})),ax={small:16,medium:32,large:64,xlarge:128};function sx(e){let{size:t="medium"}=e,n=d(e,nx);const r=ax[t];return w.createElement(ix,{className:ox.root},w.createElement(kl,l({variant:"determinate",value:100,className:ox.back,size:r,thickness:3},n)),w.createElement(kl,l({variant:"indeterminate",disableShrink:!0,className:ox.front,size:r,thickness:3},n)))}const lx=["cancel","translator"],cx=["retry","translator"],ux={stripes:"".concat("LongRunningQuery","-stripes")},dx=bs(up)((()=>({["& .".concat(ux.stripes)]:{"&::before":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',backgroundSize:"14.14px 14.14px",backgroundImage:"linear-gradient(135deg, currentColor 10%, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 50%, currentColor 50%, currentColor 59%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 103%)",opacity:.1}}})));function px(e){let{cancel:t,translator:n}=e,r=d(e,lx);return w.createElement(w.Fragment,null,w.createElement(dx,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},w.createElement(up,{item:!0},w.createElement(sx,null)),w.createElement(up,{item:!0},w.createElement(uc,{variant:"h6",align:"center","data-tid":"update-active"},n.get("Object.Update.Active")))),w.createElement(up,l({item:!0},r),w.createElement(ql,{variant:"contained",onClick:t},n.get("Cancel"))))}function fx(e){let{retry:t,translator:n}=e,r=d(e,cx);return w.createElement(w.Fragment,null,w.createElement(up,{item:!0},w.createElement(Qw,{style:{fontSize:"38px"}})),w.createElement(up,{item:!0},w.createElement(uc,{variant:"h6",align:"center","data-tid":"update-cancelled"},n.get("Object.Update.Cancelled"))),w.createElement(up,{item:!0},w.createElement(ql,l({variant:"contained",onClick:t},r),n.get("Retry"))))}function hx(e){let{canCancel:t,canRetry:n,api:r}=e;const{translator:o}=S.useContext(Bl);return w.createElement(up,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:ux.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t&&w.createElement(px,{cancel:r.cancel,translator:o,className:ux.cancel}),n&&w.createElement(fx,{retry:r.retry,translator:o,className:ux.retry}))}function mx(){return w.createElement(up,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},w.createElement(sx,{size:"large"}))}const gx={width:0,height:0},bx="Header",yx={containerStyle:"".concat(bx,"-containerStyle"),containerTitleStyle:"".concat(bx,"-containerTitleStyle")},vx=bs(up)((e=>{let{theme:t}=e;return{["&.".concat(yx.containerStyle)]:{flexGrow:0},["&.".concat(yx.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),Sx="njs-cell-title",wx="njs-cell-sub-title";function xx(e){let{id:t,layout:n,sn:r,anchorEl:o,hovering:i,focusHandler:a,titleStyles:s={},isRtl:l,translator:c}=e;const u=n.showTitles&&!!n.title,d=n.showTitles&&!!n.subtitle,p=n.qSelectionInfo&&n.qSelectionInfo.qInSelections,[f,h]=S.useState([]);S.useEffect((()=>{r&&r.component&&r.component.isHooked&&r.component.observeActions((e=>{h([...e,...r&&r.selectionToolbar&&r.selectionToolbar.items||[]])}))}),[r]);const m=[yx.containerStyle,...u||d?[yx.containerTitleStyle]:[]],g=i||p,b=w.createElement(zg,{show:!1,selections:{show:p,api:r.component.selections,onKeyDeactivate:a.refocusContent},actions:f,popover:{show:g,anchorEl:o},focusHandler:a,layout:n,isRtl:l});return w.createElement(vx,{item:!0,container:!0,wrap:"nowrap",className:m.join(" ")},w.createElement(up,{item:!0,zeroMinWidth:!0,xs:!0,dir:l?"rtl":"ltr"},w.createElement(up,{container:!0,wrap:"nowrap",direction:"column"},u?w.createElement(Mf,{title:n.title},w.createElement(uc,{id:"".concat(t,"_title"),variant:"h6",noWrap:!0,className:Sx,style:s.main},n.title)):w.createElement("div",{id:"".concat(t,"_title"),style:gx,"aria-label":c.get("Accessibility.Object.NoTitle")}),d&&w.createElement(Mf,{title:n.subtitle},w.createElement(uc,{variant:"body2",noWrap:!0,className:wx,style:s.subTitle},n.subtitle)))),w.createElement(up,{item:!0},b))}const kx="condition",Cx="search",Ex="clear_selection",Rx="matches_exactly",Lx="starts_with",Px="ends_with",Tx="beginning_of_word",Ix="general",Ox="fixed_value",_x=(e,t)=>{if(!Array.isArray(e))return[];const n=t.get("Object.FilterLabel.Exclude"),r=e.filter((e=>!1!==e.showInFooter));return r.map((e=>{var r;let o="";switch(e.type){case Cx:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case Tx:o="*^",i="*";break;case Px:o="*";break;case Lx:i="*";break;case Rx:break;default:o="*",i="*"}const a=null!==(n=null===(r=e.options.values)||void 0===r?void 0:r[0])&&void 0!==n?n:"";return""!==a?'"'.concat(o).concat(a).concat(i,'"'):""})(e);break;case kx:o+=(e=>{var t,n,r,o,i,a,s;const{options:l}=e,c=(null==l?void 0:l.mode)===Ix,u=(null==l||null===(t=l.modifier)||void 0===t?void 0:t.type)===Ox,d=null!=l&&null!==(n=l.modifier)&&void 0!==n&&n.operator?l.modifier.operator.split(" "):[];if(0===d.length||!u&&(null===(r=l.firstValue)||void 0===r||!r.aggregator||null===(o=l.firstValue)||void 0===o||!o.field)||u&&(null===(i=l.firstValue)||void 0===i||!i.fixedValue)||c&&(null===(a=l.conditionField)||void 0===a||!a.aggregator||null===(s=l.conditionField)||void 0===s||!s.field))return"";let p,f,h="=";var m,g,b;if(c&&u)p="".concat(null===(m=l.conditionField)||void 0===m?void 0:m.aggregator,"(").concat(ig(null===(g=l.conditionField)||void 0===g?void 0:g.field),")"),f="".concat(null===(b=l.firstValue)||void 0===b?void 0:b.fixedValue);else if(!c&&u){var y;p="",f="".concat(null===(y=l.firstValue)||void 0===y?void 0:y.fixedValue),h=""}else if(c||u){var v,S,w,x;p="".concat(null===(v=l.conditionField)||void 0===v?void 0:v.aggregator,"(").concat(ig(null===(S=l.conditionField)||void 0===S?void 0:S.field),")"),f="".concat(null===(w=l.firstValue)||void 0===w?void 0:w.aggregator,"(").concat(ig(null===(x=l.firstValue)||void 0===x?void 0:x.field),")")}else{var k,C;p="".concat(ig(e.field)),f="".concat(null===(k=l.firstValue)||void 0===k?void 0:k.aggregator,"(total ").concat(ig(null===(C=l.firstValue)||void 0===C?void 0:C.field),")")}const E="".concat(h).concat(p).concat(d[0]).concat(f);let R="";if(d.length>1){var L,P,T;if(!u&&(null===(L=l.secondValue)||void 0===L||!L.aggregator||null===(P=l.secondValue)||void 0===P||!P.field)||u&&(null===(T=l.secondValue)||void 0===T||!T.fixedValue))return"";let e,t;var I;if(c&&u)e="".concat(null===(I=l.secondValue)||void 0===I?void 0:I.fixedValue),t=" and ".concat(p);else if(!c&&u){var O;e="".concat(null===(O=l.secondValue)||void 0===O?void 0:O.fixedValue),t=""}else if(c||u){var _,M;e="".concat(null===(_=l.secondValue)||void 0===_?void 0:_.aggregator,"(").concat(ig(null===(M=l.secondValue)||void 0===M?void 0:M.field),")"),t=" and ".concat(p)}else{var q,D;e="".concat(null===(q=l.secondValue)||void 0===q?void 0:q.aggregator,"(total ").concat(ig(null===(D=l.secondValue)||void 0===D?void 0:D.field),")"),t=" and ".concat(p)}R="".concat(t).concat(d[1]).concat(e)}return'"'.concat(E).concat(R,'"')})(e);break;case Ex:o+=t.get("Object.FilterLabel.All");break;default:o+=null!==(r=e.options)&&void 0!==r&&r.values?e.options.values.join(", "):t.get("Object.FilterLabel.Unknown")}return""!==o&&(o=o.replace(/^"|"$/g,""),e.exclude&&(o="".concat(n," ").concat(o))),{field:e.field,label:o}})).filter((e=>""!==e.label))},Mx=(e,t)=>_x(e,t).map((e=>"".concat(e.field,": ").concat(e.label))).join("; ");var qx=e=>Uf((e=>u(u({},e),{},{shapes:[{type:"path",attrs:{d:"M14.07 0a1 1 0 0 1 .816 1.577L10 8.5v4.398a1 1 0 0 1-.532.884l-2.734 1.445A.5.5 0 0 1 6 14.785V8.5L1.112 1.577A1 1 0 0 1 1.93 0zm0 1H1.93L7 8.183v5.772l2-1.057V8.183z"}}]}))(e));function Dx(e){let{styles:t,children:n}=e;return w.createElement(uc,{noWrap:!0,variant:"body2",style:u(u({},t),{},{fontStyle:"italic"})},n)}function Nx(e){var t;let{layout:n,translator:r,filtersFootnoteString:o,footerStyle:i,isRtl:a}=e;const s=_x(null!==(t=null==n?void 0:n.filters)&&void 0!==t?t:[],r),l={color:null==i?void 0:i.color,fontFamily:null==i?void 0:i.fontFamily,fontSize:null==i?void 0:i.fontSize,fontWeight:null==i?void 0:i.fontWeight};return w.createElement(Mf,{title:o},w.createElement(up,{container:!0,wrap:"nowrap",sx:{backgroundColor:null==i?void 0:i.backgroundColor,padding:null==i?void 0:i.padding,borderTop:null==i?void 0:i.borderTop},"data-testid":"filters-footnote",justifyContent:a?"flex-end":"flex-start"},w.createElement(up,{item:!0,display:"flex"},w.createElement(qx,{style:{fontSize:"12px",color:i.color,margin:"auto"}}),w.createElement(Dx,{styles:u(u({},l),{},{marginLeft:"2px"})},r.get("Object.FiltersApplied")," ")),w.createElement(up,{item:!0,display:"flex"},s.map((e=>w.createElement(up,{container:!0,wrap:"nowrap",key:"".concat(e.field,"-").concat(e.label)},w.createElement(Dx,{styles:u(u({},l),{},{fontWeight:"bold"})},"".concat(e.field,":")),w.createElement(Dx,{styles:l}," ",e.label," ")))))))}const Ax={itemStyle:"".concat("Footer","-itemStyle")},zx=bs(up)((()=>({["& .".concat(Ax.itemStyle)]:{minWidth:0,width:"100%"}}))),jx="njs-cell-footer";function Fx(e){var t,n,r;let{layout:o,titleStyles:i={},translator:a,flags:s,isCardTheme:l,isRtl:c}=e;const u=i.footer,d=(null==o||null===(t=o.filters)||void 0===t?void 0:t.length)>0&&(null==o||null===(n=o.qHyperCube)||void 0===n||null===(n=n.qMeasureInfo)||void 0===n?void 0:n.length)>0,p=Mx(null!==(r=null==o?void 0:o.filters)&&void 0!==r?r:[],a),f=!(null!=o&&o.footnote)&&d&&p,h=null==s?void 0:s.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),m=l?"1px":"6px";return o&&o.showTitles&&(o.footnote||f)?w.createElement(zx,{container:!0},w.createElement(up,{item:!0,className:Ax.itemStyle,"data-testid":jx,sx:{paddingTop:e=>h?m:e.spacing(1)}},o.footnote&&w.createElement(Mf,{title:o.footnote},w.createElement(uc,{noWrap:!0,variant:"body2",className:jx,style:u,align:c?"right":"left"},o.footnote)),f&&w.createElement(Nx,{layout:o,translator:a,filtersFootnoteString:p,footerStyle:u,isRtl:c}))):null}class $x{constructor(){this.timer=null,this.next=null,this.running=!1}start(){this.running||(this.running=!0,this.scheduleNext())}scheduleNext(){this.timer=setTimeout((()=>{this.doNext()}),10)}async doNext(){const e=this.next;this.next=null,e?(await e(),this.scheduleNext()):this.stop()}schedule(e){this.next=e,this.start()}stop(){this.running&&(clearTimeout(this.timer),this.timer=null,this.running=!1)}}const Bx="njs-viz";function Wx(e){let{sn:t,snOptions:n,snPlugins:r,layout:o,appLayout:i,halo:a,cellId:s}=e;const{component:l}=t,{theme:c,language:d,constraints:p,interactions:f,keyboardNavigation:h}=S.useContext(Bl),[m]=S.useState((()=>new $x)),[g,b]=S.useState(!1),[y,v]=S.useState(0),[x,k,C]=Wf(),[E,R]=S.useState(null),L=S.useCallback((e=>{e&&R(e)}),[]);return S.useEffect((()=>{if(E)return l.created({options:n}),l.mounted(E),b(!0),()=>{m.stop(),l.willUnmount()}}),[E,l]),S.useEffect((()=>{g&&E&&k&&(!l.isHooked&&o&&o.qSelectionInfo&&o.qSelectionInfo.qInSelections||m.schedule((()=>{const e=[];return p.passive||e.push("passive"),p.active||e.push("interact"),p.select||e.push("select"),p.edit||e.push("edit"),a.app&&a.app.session&&e.push("fetch"),Promise.resolve(l.render({layout:o,options:n,plugins:r,embed:a.public.nebbie,context:u({constraints:p,interactions:f,theme:a.public.theme,appLayout:i,keyboardNavigation:h},l.isHooked?{}:{logicalSize:t.logicalSize({layout:o}),localeInfo:(i||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===y&&"function"==typeof n.onInitialRender&&n.onInitialRender.call(null),v(y+1))}))})))}),[k,n,r,E,C,o,i,c,d,p,f,g,h]),w.createElement("div",{ref:x,"data-render-count":y,style:{position:"relative",height:"100%"},className:Bx},w.createElement("div",{ref:L,id:"".concat(s,"_content"),style:{position:"absolute",width:"100%",height:"100%"}}))}const Hx={linechart:"lineChart",barchart:"barChart",combochart:"comboChart",scatterplot:"scatterPlot",piechart:"pieChart",straightable:"straightTable",pivottable:"pivotTable",table:"straightTable","pivot-table":"pivotTable",listbox:"listBox",referenceline:"referenceLine",datacolors:"dataColors","text-image":"textImage",boxplot:"boxPlot",map:"mapChart",mapchart:"mapChart",bulletchart:"bulletChart"},Ux=e=>{let{layout:t,theme:n,app:r,themeName:o,disableThemeBorder:i,queryParams:a}=e;const s=S.useMemo((()=>{if(t&&n){const o=t.components?t.components.find((e=>"general"===e.key)):null,s=(e=t.visualization,Hx[e.toLowerCase()]?Hx[e.toLowerCase()]:e),l={main:Gy(o,"main",n,s),footer:Gy(o,"footer",n,s),subTitle:Gy(o,"subTitle",n,s)},c=Uy(o,n,s),u=Hy(o,r,a),d=function(e,t,n,r){const o=Fy(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=jy("","borderWidth",t,n)),i&&o?"".concat(i," solid ").concat(o):void 0}(o,n,s,i),p=function(e,t,n){return(null==e?void 0:e.borderRadius)||jy("","borderRadius",t,n)}(o,n,s);return{titleStyles:l,bgColor:c,bgImage:u,border:d,borderRadius:p,boxShadow:Vy(o,n,s)}}var e;return{}}),[t,n,r,o,i]);return s};class Vx extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const Gx=["action-button","sn-nav-menu","filterpane","sn-shape"],Kx=[...Gx,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],Jx=e=>-1===Gx.indexOf(e),Zx=e=>Jx(e)?"10px 10px 0":"10px 0 0",Xx=e=>{let{layout:t,isError:n,isCardTheme:r,titleStyles:o,translator:i}=e;if(r){var a,s,l;const e=(null==t?void 0:t.showTitles)&&!(null==t||!t.title),r=(null==t?void 0:t.showTitles)&&!(null==t||!t.subtitle),c=(null==t||null===(a=t.filters)||void 0===a?void 0:a.length)>0&&(null==t||null===(s=t.qHyperCube)||void 0===s||null===(s=s.qMeasureInfo)||void 0===s?void 0:s.length)>0,u=null==t?void 0:t.visualization,d=Mx(null!==(l=null==t?void 0:t.filters)&&void 0!==l?l:[],i),p=!(null!=t&&t.footnote)&&c&&d,f=(null==t?void 0:t.showTitles)&&(!(null==t||!t.footnote)||p);let h;return e&&(o.main.padding=Zx(u)),r&&(o.subTitle.padding=((e,t)=>{const n=Jx(e);return t?n?"0 10px":"0":Zx(e)})(u,e)),f&&(-1===Gx.indexOf(u)&&(o.footer.borderTop="1px solid #d9d9d9"),o.footer.padding="6px 10px"),(n||-1===Kx.indexOf(u))&&(h="".concat(e||r?"0":"10px"," 10px ").concat(f?"0":"5px")),h}},Qx=new Map;[["auto-chart","Object.AutoChart"],["dummy-chart","Dummy"],["barchart","Object.BarChart"],["combochart","Object.ComboChart"],["container","Object.Container"],["distributionplot","Object.DistributionPlot"],["boxplot","Object.BoxPlot"],["filterpane","Object.FilterPane"],["gauge","Object.Gauge"],["histogram","Object.Histogram"],["kpi","Object.Kpi"],["linechart","Object.LineChart"],["listbox","Object.Listbox"],["piechart","Object.PieChart"],["pivot-table","Object.PivotTable"],["map","Object.Map"],["scatterplot","Object.ScatterPlot"],["sn-table","Object.StraightTable"],["text-image","Object.TextImage"],["treemap","Object.Treemap"],["waterfallchart","Object.WaterfallChart"],["mekkochart","Object.MekkoChart"],["action-button","Object.ActionButton"],["sn-nav-menu","Object.NavMenu"],["bulletchart","Object.BulletChart"],["sn-nlg-chart","Object.NlgChart"],["sn-analysis-autochart","Common.AnalysisTypes"],["sn-tabbed-container","Object.TabContainer"],["qlik-sankey-chart-ext","Object.SankeyChart"],["qlik-radar-chart","Object.RadarChart"],["qlik-funnel-chart-ext","Object.FunnelChart"],["sn-grid-chart","Object.GridChart"],["sn-layout-container","Object.LayoutContainer"]].forEach((e=>{let[t,n]=e;Qx.set(t,n)}));const Yx="njs-cell",ek="njs-cell-body";const tk=(e,t)=>{switch(t.type){case"LOADING":return u(u({},e),{},{loading:!0});case"LOADED":return u(u({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return u(u({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return u(u({},e),{},{longRunningQuery:!0});case"ERROR":return u(u({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function nk(e){let{delay:t=750}=e;const[n,r]=S.useState(!1);return S.useEffect((()=>{const e=setTimeout((()=>r(!0)),t);return()=>clearTimeout(e)}),[]),n?w.createElement(mx,null):null}const rk=e=>!e.qError||7005===e.qError.qErrorCode,ok=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,s=i&&!a&&t[e].qError,l=a&&t[e].qCalcCondMsg,c="".concat(s?r:a?l||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}})),ik=e=>e&&(Array.isArray(e)?e:[e])||[],ak=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t),s=ok(o,ik(a.qDimensionInfo||a.qItems),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),l=ok(i,ik(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:s,reqMeasErrors:l}},sk=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:s,hasLayoutErrors:l,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,s=!1;const l=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),p=u.measures.min(),f=u.resolveLayout(n),h=ik(f.qDimensionInfo||f.qItems).filter(rk),m=ik(f.qMeasureInfo).filter(rk);if(o+=d,i+=p,(h.length<d||m.length<p)&&(r=!0),f.qError){a=!0,s=7005===f.qError.qErrorCode;const t=s&&f.qCalcCondMsg?f.qCalcCondMsg:s?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");l.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:l}})(e,o,t),u=[],d=[];let p=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=p||await r.getProperties();p=n;const o=ak(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const f=u.filter((e=>!(e.missing||e.error))).length,h=e.get("Visualization.Incomplete.Dimensions",[f,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),b=[{title:h,descriptions:[...u]},{title:g,descriptions:[...d]}],y=l?c:b;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:y}]};function lk(){return new T}const ck=S.forwardRef(((e,t)=>{var n,r;let{halo:o,model:i,initialSnOptions:a,initialSnPlugins:s,initialError:l,onMount:c,currentId:d,emitter:p,navigation:f,onError:h}=e;const{app:m,types:g}=o,{nebbie:b}=o.public,{theme:y,translator:v,language:x,keyboardNavigation:k,externalFocusManagement:C,disableCellPadding:E=!1,navigation:R,queryParams:L}=S.useContext(Bl),[P]=S.useState(p||lk),T=ms(),[I,O,_]=Wf(),[M,q]=S.useReducer(tk,{loading:!1,loaded:!1,longRunningQuery:!1,error:(D=l)?{title:D.message}:null,sn:null,visualization:null});var D;const[N,A]=S.useState(i),[z,{validating:j,canCancel:F,canRetry:$},B]=$f(N),[W]=Bf(m),[H,U,V]=Wf(),[G,K]=S.useState(a),[J,Z]=S.useState(s),X="njs-cell-".concat(d),[Q]=Jg(m,N,["#".concat(X),".njs-action-toolbar-popover"]),[Y,ee]=S.useState(!1),te=S.useRef({enter:null,leave:null}),{titleStyles:ne,bgColor:re,bgImage:oe,border:ie,borderRadius:ae,boxShadow:se}=Ux({layout:z,theme:o.public.theme,app:o.app,themeName:y,disableThemeBorder:null==G?void 0:G.disableThemeBorder,queryParams:L}),le=!("rtl"!==(null==G?void 0:G.direction)),ce=S.useRef({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});S.useEffect((()=>{Vg(ce.current),ce.current.blurCallback=e=>{ce.current.onBlurHandler?ce.current.onBlurHandler(e):(o.root.toggleFocusOfCells(),e&&V&&V.focus())},ce.current.refocusContent=()=>{M.sn.component&&"function"==typeof M.sn.component.focus&&M.sn.component.focus()}}),[]);S.useEffect((()=>{if(l)return void c();if(!W||!z)return;if(M.visualization===z.visualization&&M.sn)return void(async e=>{const[t,n]=await sk(v,z,e.generator.qae.data,N);q(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:M.sn,layout:z,model:N})})(M.sn);const e=g.getSupportedVersion(z.visualization,z.version);return(async(e,t)=>{q({type:"LOADING"}),await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,onMount:d,navigation:p}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o}),f=e.create({model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,navigation:p});f&&(t({type:"LOADED",sn:f,visualization:r}),d())}catch(e){t(o?{type:"ERROR",error:{title:e.message,errorObject:e}}:{type:"ERROR",error:{title:"Could not find a version of '".concat(r,"' that supports current object version. Did you forget to register ").concat(r,"?")}}),d()}})({dispatch:q,types:g,visualization:e,version:t,model:N,app:m,selections:Q,nebbie:b,focusHandler:ce.current,emitter:P,onMount:c,navigation:null!=f?f:R})})(z.visualization,e),()=>{}}),[g,M.sn,N,Q,z,W,x]),S.useEffect((()=>{if(!j)return;const e=setTimeout((()=>q({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[j]),S.useImperativeHandle(t,(()=>({getQae:()=>M.sn.generator.qae,getExtensionDefinition:()=>M.sn.generator.definition.ext,support(e,t,n){if(z&&M.loaded&&!M.error){var r;const o=t||(null===(r=M.sn.generator.definition.ext)||void 0===r?void 0:r.support);if(o)return function(e,t,n){const r=t[e];return"function"==typeof r?r.call(null,n):"boolean"==typeof r&&r}(e,o,n||z)}return!1},toggleFocus(e){"function"==typeof M.sn.component.focus&&(e?M.sn.component.focus():M.sn.component.blur())},setOnBlurHandler(e){ce.current.onBlurHandler=e},setSnOptions:K,setSnPlugins:Z,setModel:A,getImperativeHandle(){var e;return null!==(e=M.sn)&&void 0!==e&&e.component&&"function"==typeof M.sn.component.getImperativeHandle?M.sn.component.getImperativeHandle():{}},onContextMenu(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=M.sn)||void 0===e?void 0:e.component.onContextMenu(...n)},async takeSnapshot(){const{width:e,height:t}=O;let n=JSON.parse(JSON.stringify(z));return"function"==typeof M.sn.component.setSnapshotData&&(n=await M.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:v.language(),theme:T.name,appLayout:W,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof o.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return o.config.snapshot.capture(e)}})),[M.sn,U,O,z,T.name,W]);let ue=null;if(M.loading&&!M.longRunningQuery)ue=w.createElement(nk,null);else if(M.error){if(h){h(M.error.errorObject?M.error.errorObject:new Vx(M.error.title))}ue=w.createElement(tx,M.error)}else M.loaded&&(ue=w.createElement(Wx,{key:z.visualization,sn:M.sn,halo:o,snOptions:G,snPlugins:J,layout:z,appLayout:W,cellId:d}));const de=!(null===(n=o.public.theme)||void 0===n||!n.getStyle("","","_cards")),pe=null===(r=o.public.galaxy)||void 0===r?void 0:r.flags;let fe,he;E?(fe=!1,he=void 0):null!=pe&&pe.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(fe=!1,he=Xx({layout:z,isError:M.error,isCardTheme:de,titleStyles:ne,translator:v})):(fe=!0,he=void 0);const me=Qx.get(null==z?void 0:z.visualization),ge=v.get(me);return w.createElement(Ql,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:re||"unset",backgroundImage:oe&&oe.url?"url(".concat(oe.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:oe&&oe.size,backgroundPosition:oe&&oe.pos,border:ie,borderRadius:ae,boxShadow:se,boxSizing:"border-box"},elevation:0,square:!0,className:Yx,ref:I,id:X,onMouseEnter:()=>{te.current.leave&&clearTimeout(te.current.leave),te.enter||(te.current.enter=setTimeout((()=>{ee(!0),te.current.enter=null}),250))},onMouseLeave:()=>{te.current.enter&&clearTimeout(te.current.enter),te.current.leave||(te.current.leave=setTimeout((()=>{ee(!1),te.current.leave=null}),750))}},w.createElement(up,{container:!0,direction:"column",gap:0,style:u(u({position:"relative",width:"100%",height:"100%"},fe?{padding:T.spacing(1)}:{}),M.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":"".concat(d,"_title ").concat(d,"_type ").concat(d,"_content")},z&&w.createElement("div",{id:"".concat(d,"_type"),style:gx,"aria-label":null!=ge?ge:z.visualization}),_&&z&&M.sn&&w.createElement(xx,{layout:z,sn:M.sn,anchorEl:_,hovering:Y,focusHandler:ce.current,titleStyles:ne,isRtl:le,id:d,translator:v}," "),w.createElement(up,{tabIndex:k&&!C?0:-1,onKeyDown:k&&!C?e=>{["Enter"," ","Spacebar"].includes(e.key)&&o.root.toggleFocusOfCells(d)}:null,item:!0,xs:!0,className:ek,style:u({height:"100%"},he?{padding:he}:{}),ref:H},ue),_&&z&&M.sn&&w.createElement(Fx,{layout:z,titleStyles:ne,translator:v,flags:pe,isCardTheme:de,isRtl:le})),M.longRunningQuery&&w.createElement(hx,{canCancel:F,canRetry:$,api:B}))}));function uk(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function dk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?function(e,t){return uk(e)&&uk(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...dk("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function pk(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const fk=e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))},hk=(e,t)=>e.__snInterceptor?e.__snInterceptor.setProperties.call(e,t):e.setProperties(t),mk=(e,t,n)=>{if(!e)return Promise.resolve();let r=MS.generate(t,n);return fe(!0,t,n),r&&r.length?(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.__snInterceptor?e.__snInterceptor.applyPatches.call(e,r,!0):e.applyPatches(r,!0)):Promise.resolve()},gk=()=>{};function bk(){var e;let t,n,r,{model:o,halo:i,navigation:a,initialError:s,onDestroy:l=(async()=>{}),onRender:c=(()=>{}),onError:d=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=gk,f=null,h=null,m=null,g=null,b=!1;const y=new Promise((e=>{m=e})),v=new Promise((e=>{g=e})),S=e=>()=>{null==e||e(),g(),c(),b=!0};let x={},k=[];const C=new T;let E={};null!==(e=i.context)&&void 0!==e&&e.enablePrivateExperimental&&(E={support(e){var t;return!(!h||!b)&&f.current.support(e,null===(t=n)||void 0===t?void 0:t.support,r)},getPropertyPanelDefinition:()=>!(!h||!b)&&(n?n.definition:f.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){var e;await v;const t=f.current.getQae();if(null==t||null===(e=t.data)||void 0===e||null===(e=e.targets)||void 0===e||null===(e=e[0])||void 0===e||!e.propertyPath)return;const n=t.data.targets[0].propertyPath,r=f.current.getExtensionDefinition().data,i=await o.getEffectiveProperties();if(n&&r){var a,s;const e={app:o.app,dimensionDefinition:r.dimensions,measureDefinition:r.measures,dimensionProperties:(null===(a=i.qHyperCubeDef)||void 0===a||null===(a=a.qDimensions)||void 0===a?void 0:a[0])||ES.getDefaultDimension(),measureProperties:(null===(s=i.qHyperCubeDef)||void 0===s||null===(s=s.qMeasures)||void 0===s?void 0:s[0])||ES.getDefaultMeasure(),globalChangeListeners:void 0,path:n};return new Hw(e)}},toggleFocus(e){f.current.toggleFocus(e)},setOnBlurHandler(e){f.current.setOnBlurHandler(e)},onContextMenu(){return f.current.onContextMenu(...arguments)}});const R=u(u({id:o.id,model:o,async destroy(){await l(),p(),p=gk},async convertTo(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){const n=await o.getLayout();if(fk(n)&&!t){const t=await IS({halo:i,model:o,cellRef:f,newType:e});return await hk(o,t.qProperty),t}const r=await o.getEffectiveProperties(),a=await IS({halo:i,model:o,cellRef:f,newType:e,properties:r}),s=a.qProperty;return await mk(o,r,s),a}return await IS({halo:i,model:o,cellRef:f,newType:e})},async toggleDataView(e){let a;if(t||!1===e)t&&!0!==e&&(a=o,await i.app.destroySessionObject(t),t=void 0,n=void 0,r=void 0);else{let e=i.context.dataViewType;const s=await o.getEffectiveProperties();if(!i.types.getSupportedVersion(e)){if(!i.types.getSupportedVersion("table"))throw new Error("No data view type registered");e="table"}const l=await IS({halo:i,model:o,cellRef:f,newType:e,properties:s,viewDataMode:!0});a=await i.app.createSessionObject(l.qProperty),t=a.id,n=f.current.getExtensionDefinition(),r=await o.getLayout()}a&&f.current.setModel(a)},get viewDataToggled(){return void 0!==t},addListener(e,t){C.addListener(e,t)},removeListener(e,t){C.removeListener(e,t)},getImperativeHandle:async()=>(await v,f.current.getImperativeHandle()),takeSnapshot:async()=>(await v,f.current.takeSnapshot())},E),{},{__DO_NOT_USE__:{mount(e){if(h)throw new Error("Already mounted");if(!(e instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return h=e,[p,f]=function(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,emitter:s,initialError:l,navigation:c,onError:u}=e;const{root:d}=t,p=w.createRef(),f=bv(),h=js.createPortal(w.createElement(ck,{ref:p,halo:t,model:r,currentId:f,initialSnOptions:o,initialSnPlugins:i,initialError:l,onMount:a,emitter:s,navigation:c,onError:u}),n,f),m=()=>{d.remove(h),r.removeListener("closed",m)};return r.on("closed",m),d.addCell(f,p),(async()=>{try{await d.add(h,m)}catch(e){m(),a(),u(e)}})(),[m,p]}({halo:i,element:e,model:o,initialSnOptions:x,initialSnPlugins:k,initialError:s,onMount:m,emitter:C,navigation:a,onError:d}),y},async applyProperties(e){const t=dk("/",e,await o.getEffectiveProperties());if(t.length)return o.applyPatches(t,!0)},options(e){(async e=>{const t=e.onInitialRender;h?(async()=>{await y,f.current.setSnOptions(u(u(u({},x),e),{onInitialRender:S(t)}))})():x=u(u(u({},x),e),{onInitialRender:S(t)})})(e)},plugins(e){(async e=>{pk(e),h?(async()=>{await y,f.current.setSnPlugins(e)})():k=e})(e)},exportImage:()=>f.current.exportImage(),takeSnapshot:()=>f.current.takeSnapshot(),getModel:()=>o,convert:{async toType(e){const t=await o.getEffectiveProperties(),n=await IS({halo:i,model:o,cellRef:f,newType:e,properties:t}),r=n.qProperty;return await mk(o,t,r),n},async revert(){await o.clearSoftPatches()}}}});return R}async function yk(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=bk({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}async function vk(e,t,n,r){let{type:o,version:i,fields:a,properties:s,extendProperties:l}=e,c={};const u=[],{modelStore:d}=r;try{const e=t.types.get({name:o,version:i});c=await e.initialProperties(s,l);const n=await e.supernova();a&&await bS({sn:n,properties:c,fields:a,children:u},t),s&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},c)}catch(e){c=n?null:{qInfo:{qType:o},visualization:o}}if(!n){const e=await t.app.createObject(c);return u.length>0&&await e.setFullPropertyTree({qProperty:c,qChildren:u}),d.set(e.id,e),e}return c}const Sk="njs-sheet";function wk(e,t,n){return e.bounds?e.bounds:{y:e.row/n*100,x:e.col/t*100,width:e.colspan/t*100,height:e.rowspan/n*100}}const xk=S.forwardRef(((e,t)=>{var n;let{model:r,halo:o,initialSnOptions:i,initialSnPlugins:a,initialError:s,onMount:l,unmount:c,navigation:d,onError:p}=e;const{root:f}=o,[h,m]=S.useState(r),[g]=$f(h),{theme:b,modelStore:y}=S.useContext(Bl),[v,x]=S.useState([]),[k,C]=S.useState(void 0),[E,R]=S.useState(void 0),[L,P]=S.useState(""),T=S.useRef({cellCount:0,cellsRendered:0,initialRender:!1});null==d||null===(n=d.setCurrentSheetId)||void 0===n||n.call(d,h.id),S.useEffect((()=>{if(g){const e=JSON.stringify(g.cells);if(e===L)return;P(e);const t=async()=>{v.forEach((e=>{f.removeCell(e.currentId)}));const e=g.cells;T.cellCount=e.length,T.cellsRendered=0;const t=()=>{T.cellsRendered++,T.cellsRendered!==T.cellCount||T.initialRender||(T.initialRender=!0,i.onInitialRender())},{columns:n,rows:r}=g,a=await Promise.all(e.map((async e=>{let a;const s=new Promise((e=>{a=e})),l=v.find((t=>t.id===e.name));if(l)return l.bounds=wk(e,n,r),delete l.mountedPromise,l;const c=await async function(e,t,n){let{id:r,options:o,plugins:i,element:a}=e;const{modelStore:s,rpcRequestModelStore:l}=n,c="".concat(r);let u=l.get(c);u||(u=t.app.getObject(r),l.set(c,u));const d=await u;return s.set(c,d),yk(d,{options:o,plugins:i,element:a},t)}({id:e.name},o,y);return{model:c.model,id:e.name,bounds:wk(e,n,r),cellRef:w.createRef(),currentId:bv(),mounted:a,mountedPromise:s,options:u(u({},i),{onInitialRender:t})}})));a.forEach((e=>f.addCell(e.currentId,e.cellRef))),x(a)};t()}}),[g]),S.useEffect((()=>{const e=()=>{h.removeListener("closed",e),c()};return h.on("closed",e),()=>h.removeListener("closed",e)}),[h]);const I=S.useMemo((()=>v?v.map((e=>function(e,t,n,r,o,i,a,s){var l;const{x:c,y:u,width:d,height:p}=e.bounds,f={left:"".concat(c,"%"),top:"".concat(u,"%"),width:"".concat(d,"%"),height:"".concat(p,"%"),position:"absolute"},h=null===(l=t.public.galaxy)||void 0===l?void 0:l.flags;return null!=h&&h.isEnabled("VNA-13_CELLPADDING_FROM_THEME")&&(f.boxSizing="border-box",f.padding="4px"),w.createElement("div",{style:f,key:e.model.id},w.createElement(ck,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,navigation:a,onError:s}))}(e,o,e.options,a,s,e.mounted,d,p))):[]),[v]);S.useEffect((()=>{const e=null!=g&&g.components?g.components.find((e=>"general"===e.key)):null;C(Uy(e,o.public.theme)),R(Hy(e,o.app))}),[g,o.public.theme,o.app,b]),S.useImperativeHandle(t,(()=>({setModel:m})),[]);const O=!g||void 0===g.height||Number.isNaN(g.height)?"100%":"".concat(Number(g.height),"%"),_=v.map((e=>e.mountedPromise)),M=_.filter((e=>!!e));return M.length&&Promise.all(_).then((()=>{l()})),w.createElement("div",{className:Sk,style:{width:"100%",height:O,position:"relative",backgroundColor:k,backgroundImage:E&&E.url?"url(".concat(E.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:E&&E.size,backgroundPosition:E&&E.pos}},I)}));const kk=()=>{};function Ck(){let{model:e,halo:t,navigation:n,initialError:r,onDestroy:o=(async()=>{}),onRender:i=(()=>{}),onError:a=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=kk,l=null,c=null,d=null,p=null;const f=new Promise((e=>{d=e})),h=new Promise((e=>{p=e})),m=e=>()=>{null==e||e(),p(),i()};let g={},b=[];const y={id:e.id,model:e,navigation:n,getImperativeHandle:async()=>(await h,l.current.getImperativeHandle()),async destroy(){await o(),s(),s=kk},__DO_NOT_USE__:{mount(o){if(c)throw new Error("Already mounted");if(!(o instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return c=o,[s,l]=function(e){let{halo:t,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,initialError:s,navigation:l,onError:c}=e;const{root:u}=t,d=w.createRef();let p;const f=()=>{u.remove(p)};return p=js.createPortal(w.createElement(xk,{ref:d,halo:t,model:r,initialSnOptions:o,initialSnPlugins:i,initialError:s,onMount:a,unmount:f,navigation:l,onError:c}),n,r.id),l.setSheetRef(d),u.add(p,f),[f,d]}({halo:t,element:o,model:e,initialSnOptions:g,initialSnPlugins:b,initialError:r,onMount:d,navigation:n,onError:a}),f},async applyProperties(t){const n=dk("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;c?(async()=>{await f,l.current.setSnOptions(u(u(u({},g),e),{onInitialRender:m(t)}))})():g=u(u(u({},g),e),{onInitialRender:m(t)})})(e)},plugins(e){(async e=>{pk(e),c?(async()=>{await f,l.current.setSnPlugins(e)})():b=e})(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return y}async function Ek(e,t,n){let{id:r,options:o,plugins:i,element:a,onRender:s,onError:l,navigation:c}=e;const{modelStore:u,rpcRequestModelStore:d}=n,p="".concat(r);let f=d.get(p);f||(f=t.app.getObject(r),d.set(p,f));const h=await f;u.set(p,h);const m=c||("sheet"===h.genericType?function(e,t,n){var r;const{galaxy:o}=e.public;var i;if(null!==(r=o.anything)&&void 0!==r&&null!==(r=r.sense)&&void 0!==r&&r.navigation)return null===(i=o.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.navigation;const a={model:n},s={goToSheet:async n=>{var r,o;if(!a.sheetRef)return;const{modelStore:i,rpcRequestModelStore:l}=t,c="".concat(n);let u,d=l.get(c);d||(d=e.app.getObject(n),l.set(c,d));try{if(u=await d,"sheet"!==u.genericType)return}catch(e){return}i.set(c,u),null===(r=a.sheetRef)||void 0===r||null===(r=r.current)||void 0===r||null===(o=r.setModel)||void 0===o||o.call(r,u),a.model=u,s.emit("sheetChanged")},setSheetRef:e=>{a.sheetRef=e},getCurrentSheetId:()=>!!a.model&&a.model.id};return Vg(s),s}(t,n,h):void 0);return"sheet"===h.genericType?async function(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=Ck({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}(h,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m):yk(h,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m)}function Rk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}var Lk,Pk,Tk,Ik;function Ok(){if(Ik)return Tk;Ik=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Tk=n=>n?"object"!=typeof n?e:n:t}var _k,Mk,qk,Dk,Nk,Ak,zk,jk,Fk,$k,Bk,Wk,Hk,Uk,Vk,Gk,Kk,Jk,Zk,Xk,Qk,Yk,eC,tC,nC,rC,oC,iC,aC,sC,lC,cC={exports:{}};function uC(){if(Mk)return _k;Mk=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return _k={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function dC(){if(Dk)return qk;Dk=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};return qk=e}function pC(){return Nk||(Nk=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=uC(),i=dC(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[p,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split("".concat(t,"*")).join("".concat(t,"{0,").concat(n,"}")).split("".concat(t,"+")).join("".concat(t,"{1,").concat(n,"}"));return e})(t),o=d++;i(e,o,t),u[e]=o,l[o]=t,c[o]=r,a[o]=new RegExp(t,n?"g":void 0),s[o]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-]".concat(p,"*")),h("MAINVERSION","(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")")),h("MAINVERSIONLOOSE","(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")")),h("PRERELEASEIDENTIFIER","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIER],")")),h("PRERELEASEIDENTIFIERLOOSE","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIERLOOSE],")")),h("PRERELEASE","(?:-(".concat(l[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIER],")*))")),h("PRERELEASELOOSE","(?:-?(".concat(l[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIERLOOSE],")*))")),h("BUILDIDENTIFIER","".concat(p,"+")),h("BUILD","(?:\\+(".concat(l[u.BUILDIDENTIFIER],"(?:\\.").concat(l[u.BUILDIDENTIFIER],")*))")),h("FULLPLAIN","v?".concat(l[u.MAINVERSION]).concat(l[u.PRERELEASE],"?").concat(l[u.BUILD],"?")),h("FULL","^".concat(l[u.FULLPLAIN],"$")),h("LOOSEPLAIN","[v=\\s]*".concat(l[u.MAINVERSIONLOOSE]).concat(l[u.PRERELEASELOOSE],"?").concat(l[u.BUILD],"?")),h("LOOSE","^".concat(l[u.LOOSEPLAIN],"$")),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE","".concat(l[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),h("XRANGEIDENTIFIER","".concat(l[u.NUMERICIDENTIFIER],"|x|X|\\*")),h("XRANGEPLAIN","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:".concat(l[u.PRERELEASE],")?").concat(l[u.BUILD],"?")+")?)?"),h("XRANGEPLAINLOOSE","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(l[u.PRERELEASELOOSE],")?").concat(l[u.BUILD],"?")+")?)?"),h("XRANGE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAIN],"$")),h("XRANGELOOSE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAINLOOSE],"$")),h("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),h("COERCE","".concat(l[u.COERCEPLAIN],"(?:$|[^\\d])")),h("COERCEFULL",l[u.COERCEPLAIN]+"(?:".concat(l[u.PRERELEASE],")?")+"(?:".concat(l[u.BUILD],")?")+"(?:$|[^\\d])"),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM","(\\s*)".concat(l[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",h("TILDE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAIN],"$")),h("TILDELOOSE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAINLOOSE],"$")),h("LONECARET","(?:\\^)"),h("CARETTRIM","(\\s*)".concat(l[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",h("CARET","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAIN],"$")),h("CARETLOOSE","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAINLOOSE],"$")),h("COMPARATORLOOSE","^".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],")$|^$")),h("COMPARATOR","^".concat(l[u.GTLT],"\\s*(").concat(l[u.FULLPLAIN],")$|^$")),h("COMPARATORTRIM","(\\s*)".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],"|").concat(l[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE","^\\s*(".concat(l[u.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAIN],")")+"\\s*$"),h("HYPHENRANGELOOSE","^\\s*(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s*$"),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(cC,cC.exports)),cC.exports}function fC(){if(Fk)return jk;Fk=1;const e=dC(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=uC(),{safeRe:r,t:o}=pC(),i=Ok(),{compareIdentifiers:a}=function(){if(zk)return Ak;zk=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};return Ak={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},Ak}();class s{constructor(a,l){if(l=i(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof a,'".'));if(a.length>t)throw new TypeError("version is longer than ".concat(t," characters"));e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[o.LOOSE]:r[o.FULL]);if(!c)throw new TypeError("Invalid Version: ".concat(a));if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],o=t.prerelease[n];if(e("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],o=t.build[n];if(e("build compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e="-".concat(t).match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error("invalid identifier: ".concat(t))}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error("version ".concat(this.raw," is not a prerelease"));this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error("invalid increment argument: ".concat(e))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}return jk=s}function hC(){if(Bk)return $k;Bk=1;const e=fC();return $k=(t,n,r)=>new e(t,r).compare(new e(n,r)),$k}function mC(){if(nC)return tC;nC=1;const e=function(){if(Hk)return Wk;Hk=1;const e=hC();return Wk=(t,n,r)=>0===e(t,n,r),Wk}(),t=function(){if(Vk)return Uk;Vk=1;const e=hC();return Uk=(t,n,r)=>0!==e(t,n,r),Uk}(),n=function(){if(Kk)return Gk;Kk=1;const e=hC();return Gk=(t,n,r)=>e(t,n,r)>0,Gk}(),r=function(){if(Zk)return Jk;Zk=1;const e=hC();return Jk=(t,n,r)=>e(t,n,r)>=0,Jk}(),o=function(){if(Qk)return Xk;Qk=1;const e=hC();return Xk=(t,n,r)=>e(t,n,r)<0,Xk}(),i=function(){if(eC)return Yk;eC=1;const e=hC();return Yk=(t,n,r)=>e(t,n,r)<=0,Yk}();return tC=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return o(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError("Invalid operator: ".concat(s))}},tC}function gC(){if(aC)return iC;aC=1;const e=/\s+/g;class t{constructor(n,i){if(i=r(i),n instanceof t)return n.loose===!!i.loose&&n.includePrerelease===!!i.includePrerelease?n:new t(n.raw,i);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&f))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,m=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(m,L(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),i("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),i("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),i("caret trim",e);let g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));a&&(g=g.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),i("range list",g);const y=new Map,v=g.map((e=>new o(e,this.options)));for(const e of v){if(h(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const S=[...y.values()];return n.set(t,S),S}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}iC=t;const n=new(Pk?Lk:(Pk=1,Lk=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=Ok(),o=function(){if(oC)return rC;oC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: ".concat(t));this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}rC=t;const n=Ok(),{safeRe:r,t:o}=pC(),i=mC(),a=dC(),s=fC(),l=gC();return rC}(),i=dC(),a=fC(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:d}=pC(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:f}=uC(),h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},b=(e,t)=>(i("comp",e,t),e=w(e,t),i("caret",e),e=v(e,t),i("tildes",e),e=k(e,t),i("xrange",e),e=E(e,t),i("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,o,a)=>{let s;return i("tilde",e,t,n,r,o,a),y(n)?s="":y(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):y(o)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):a?(i("replaceTilde pr",a),s=">=".concat(n,".").concat(r,".").concat(o,"-").concat(a," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),i("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{i("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,a,s)=>{let l;return i("caret",e,t,n,o,a,s),y(n)?l="":y(o)?l=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):y(a)?l="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(i("replaceCaret pr",s),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(+n+1,".0.0-0")):(i("no pr"),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a," <").concat(+n+1,".0.0-0")),i("caret return",l),l}))},k=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,o,a,s,l)=>{i("xRange",e,n,r,o,a,s,l);const c=y(o),u=c||y(a),d=u||y(s),p=d;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(a=0),s=0,">"===r?(r=">=",u?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(l="-0"),n="".concat(r+o,".").concat(a,".").concat(s).concat(l)):u?n=">=".concat(o,".0.0").concat(l," <").concat(+o+1,".0.0-0"):d&&(n=">=".concat(o,".").concat(a,".0").concat(l," <").concat(o,".").concat(+a+1,".0-0")),i("xRange return",n),n}))},E=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),R=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),L=e=>(t,n,r,o,i,a,s,l,c,u,d,p)=>(n=y(r)?"":y(o)?">=".concat(r,".0.0").concat(e?"-0":""):y(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":""),l=y(c)?"":y(u)?"<".concat(+c+1,".0.0-0"):y(d)?"<".concat(c,".").concat(+u+1,".0-0"):p?"<=".concat(c,".").concat(u,".").concat(d,"-").concat(p):e?"<".concat(c,".").concat(u,".").concat(+d+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return iC}var bC=function(){if(lC)return sC;lC=1;const e=gC();return sC=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},sC}(),yC=n(bC);const vC={};function SC(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:i}=o,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||yC(e,i.deps.properties),supernova:()=>async function(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!vC[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),s=Promise.resolve(a);vC[i]=s.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new Vx("Failed to load visualization: '".concat(n,"'"),e)}))}return vC[i]}(a.name,a.version,t,o.load).then((e=>(n=n||Xw(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.supernova().then((()=>{const n=u({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(r));return t?(fe(!0,n,e),n):u(u({},n),e)}))}};return a}function wC(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=SC({name:e,version:o},t,i),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter((e=>"undefined"===e));return[...t,...e.filter((e=>"undefined"!==e)).map((e=>e.split(".").map((e=>parseInt(e,10))))).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2])).map((e=>e.join(".")))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function xC(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=wC(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>{if(r[e])return r[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(vC).forEach((t=>{t.split("__")[0]===e&&(vC[t]=void 0)}))}(e)}}}const kC={context:{},load:()=>{},types:[],themes:[],anything:{},flags:{KPI_REACTCOLORPICKER:!0,CLIENT_IM_3365:!0},snapshot:{get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))}},CC={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};kC.context=CC;const EC=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(u({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),e)},RC=function(){return[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]].filter(((e,t,n)=>n.indexOf(e)===t))};var LC=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=L(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=u(u({},t.context),{},{translator:n.translator,hostConfig:t.hostConfig});const[a,s]=Gl({app:e,context:i}),l=function(){let{themes:e=[],loadTheme:t,root:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=$e();return{setTheme:async o=>{let i=e.filter((e=>e.id===o))[0],a="dark"===o?"dark":"light";if(!i&&t&&(i={load:t}),i&&i.load)try{const e=await Promise.race([i.load(o),Be(We,{__timedOut:!0})]);e.__timedOut||(a="dark"===e.type?"dark":"light",r.internalAPI.setTheme(e,o),n.setMuiThemeName(a))}catch(e){}else r.internalAPI.setTheme({type:a},o),n.setMuiThemeName(a)},externalAPI:r.externalAPI}}({themes:t.themes,loadTheme:t.loadTheme,root:a});i.themeApi=l.externalAPI;const c={galaxy:{translator:n.translator,theme:l.externalAPI,flags:Rk(t.flags),deviceType:He(t.context.deviceType),hostConfig:t.hostConfig,anything:t.anything},theme:l.externalAPI,translator:n.translator,nebbie:null},d={app:e,root:a,config:t,public:c,context:i,types:null},p=xC({halo:d});t.types.forEach((e=>p.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let f=new Promise((e=>{(async()=>{if(await l.setTheme(t.context.theme),t.hostConfig&&m&&m.getWebResourceAuthParams){const{queryParams:e}=await m.getWebResourceAuthParams({hostConfig:t.hostConfig});i.queryParams=e,a.context(i)}})().then(e)})),h=null,g=null;const b={render:async e=>(await f,e.id?Ek(e,d,s):async function(e,t,n){let{type:r,version:o,fields:i,properties:a,options:s,plugins:l,element:c,extendProperties:u,navigation:d,onRender:p,onError:f}=e,h={};const m=[],{modelStore:g,subscribe:b}=n;let y;try{const e=t.types.get({name:r,version:o});h=await e.initialProperties(a,u);const n=await e.supernova();i&&await bS({sn:n,properties:h,fields:i,children:m},t),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},h)}catch(e){y=e,h={qInfo:{qType:r},visualization:r}}const v=await t.app.createSessionObject(h);m.length>0&&await v.setFullPropertyTree({qProperty:h,qChildren:m}),g.set(v.id,v);const S=b(v);return yk(v,{options:s,plugins:l,element:c,onRender:p,onError:f},t,d,y,(async()=>{await t.app.destroySessionObject(v.id),S()}))}(e,d,s)),destroy:async()=>{a.destroy()},create:async e=>vk(e,d,!1,s),generateProperties:async e=>vk(e,d,!0,s),context:async e=>{let t;["theme","language","constraints","interactions","keyboardNavigation"].forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==i[n]&&(t||(t={}),t[n]=e[n])})),t&&(i=u(u(u({},i),t),{},{translator:n.translator}),t.theme&&(await f,f=l.setTheme(t.theme),await f),t.language&&d.public.translator.language(t.language),a.context(i))},selections:async()=>(h||(h={mount(t){g||(g=function(e){let{element:t,app:n}=e;return js.createPortal(w.createElement(yv,{app:n}),t,bv())}({element:t,app:e}),a.add(g))},unmount(){g&&(a.remove(g),g=null)}}),h),field:async t=>{let n;const r="string"==typeof t?t:t.qLibraryId;if(t.qId)n=t.qId;else if(!r)throw new Error("Field identifier or object id must be provided");const o={fieldName:r,async mount(i){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i)throw new Error("Element for ".concat(r||n," not provided"));if(this._instance)throw new Error("Field or object ".concat(r||n," already mounted"));const l=()=>o.emit("selectionActivated"),c=()=>o.emit("selectionDeactivated");return new Promise((r=>{[this._instance,this._ref]=function(e){let{element:t,app:n,fieldIdentifier:r,qId:o,stateName:i="$",options:a={},renderedCallback:s}=e;const l=w.createRef();return[js.createPortal(w.createElement(rS,{ref:l,app:n,element:t,fieldIdentifier:r,qId:o,stateName:i,initialOptions:a,renderedCallback:s}),t,bv()),l]}({element:i,app:e,fieldIdentifier:t,qId:n,options:nS(u({onSelectionActivated:l,onSelectionDeactivated:c},s)),stateName:s.stateName||"$",renderedCallback:r}),a.add(this._instance)}))},unmount(){this._instance&&(a.remove(this._instance),this._instance=null,this._ref=null)},__DO_NOT_USE__:{options(e){var t;const n=()=>o.emit("selectionActivated"),r=()=>o.emit("selectionDeactivated");if(null!==(t=o._ref)&&void 0!==t&&t.current){const t=nS(u({onSelectionActivated:n,onSelectionDeactivated:r},e));o._ref.current.setOptions(t)}}}};return Vg(o),o},getRegisteredTypes:p.getList,__DO_NOT_USE__:{types:p,popover(t,n,r){b._popoverInstance&&(a.remove(b._popoverInstance),b._popoverInstance=null);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=u({},oS);return fe(!0,t,e),t}(u({onPopoverClose:()=>b.emit("fieldPopoverClose")},r));b._popoverInstance=w.createElement(iS,{element:t,key:bv(),app:e,fieldIdentifier:n,options:o,stateName:r.stateName||"$"}),a.add(b._popoverInstance)}}};return d.public.nebbie=b,d.types=p,Vg(b),b}return r.createConfiguration=n=>e(((e,t)=>({context:EC(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:u({},t.snapshot||e.snapshot),types:RC(e.types,t.types),themes:RC(e.themes,t.themes),flags:EC(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:EC(e.anything,t.anything)}))(t,n)),r.config=t,r}(kC);function PC(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const TC=globalThis.crypto||{getRandomValues:()=>123456};function IC(e){return t=>{const n=fe({},t);n.qInfo=n.qInfo||{},n.qInfo.qId=n.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^TC.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const r=n._mock;let o=n;return r&&(delete n._mock,o=fe({},n,r)),Promise.resolve({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(o),getProperties:()=>Promise.resolve(n),getEffectiveProperties:()=>Promise.resolve(n),removeListener:()=>{},id:n.qInfo.qId,properties:n,session:e})}}const OC=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},_C=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const s=OC(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},MC=["id","session"],qC=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function DC(e){return!qC.includes(e)}function NC(e){const t=OC(e.getLayout);return t.qInfo&&t.qInfo.qId}function AC(e,t){return e.reduce(((e,n)=>u(u({},e),function(e,t){let n=NC(e);const{delay:r}=t,{id:o,session:i}=e,a=d(e,MC);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:u(u({id:n,session:OC(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce(((e,t)=>{let[n,o]=t;return u(u({},e),{},{[n]:_C(o,{async:DC(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function zC(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!NC(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function jC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(zC);const n=AC(e,t);return async e=>Promise.resolve(n[e])}function FC(){return()=>Promise.resolve({id:"app-layout"})}const $C={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new PC,r=new IC(n),o=new jC(e,t),i=new FC,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,destroySessionObject:async()=>{},getObject:o,getAppLayout:i,getListObject:async e=>{var t;return o(null===(t=e.qInfo)||void 0===t?void 0:t.qId)}};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},BC={generator:Xw,hook:nw,theme:$e,locale:k};function WC(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.self}function HC(){return!("undefined"==typeof process||!process.version||!process.versions.node)}function UC(e){if(Array.isArray(e))return e.map(UC);if("object"==typeof(t=e)&&null!==t&&t.constructor===Object){const t={};for(const n of Object.keys(e).sort())t[n]=UC(e[n]);return t}var t;return e}function VC(e){if(Array.isArray(e))return e.map((e=>"object"==typeof e&&null!==e?VC(e):e)).filter((e=>"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e&&""!==e));if("object"==typeof e&&null!==e){const t={};for(const n of Object.keys(e)){const r=e[n];switch(typeof r){case"undefined":break;case"boolean":r&&(t[n]=r);break;case"string":{const e=r.trim();""!==e&&(t[n]=e);break}case"object":{if(null===r)break;const e=VC(r);e&&(Array.isArray(e)&&e.length>0||"object"==typeof e&&Object.keys(e).length>0)&&(t[n]=e);break}case"function":case"number":t[n]=r;break;default:console.warn(`Unexpected type for key "${n}": ${typeof r}`),t[n]=r}}if(0===Object.keys(t).length)return;return t}return e}let GC;GC=function(){const e=[...GC?.getInterceptors()||[]];return{addInterceptor:t=>(e.push(t),t),removeInterceptor:t=>{const n=e.indexOf(t);let r;return-1!==n&&(r=e.splice(n,1)[0]),r||null},getInterceptors:()=>e}}();const KC=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],JC=["apikey","oauth2","cookie","windowscookie","reference","anonymous"];let ZC=e=>crypto.getRandomValues(new Uint8Array(e)),XC=(e,t=21)=>((e,t,n)=>{let r=(2<<Math.log2(e.length-1))-1,o=-~(1.6*r*t/e.length);return(i=t)=>{let a="";for(;;){let t=n(o),s=0|o;for(;s--;)if(a+=e[t[s]&r]||"",a.length>=i)return a}}})(e,0|t,ZC),QC=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const YC=async(e={})=>{const t=aL(e.hostConfig),n="anonymous"===t?.authType||!!t.accessCode;if("undefined"==typeof window)return rE({isNodeEnv:!0,isAnonymous:n});if("noauth"===t?.authType)return rE({isUnknown:!0,isAnonymous:!1});const{data:r,status:o}=await tE(e);if(404===o)return rE({isUnknown:!0,isAnonymous:n});if(!r||o<=399&&o>=300)return rE({isQSE:!0,isWindows:!0,isAnonymous:n});const i=(r.composition?.deploymentType||"").toLowerCase(),a="controlcenter"===i;return"qliksenseserver"===i?rE({isQSE:!0,isWindows:!0,isAnonymous:n,meta:nE(r)}):"qliksensedesktop"===i?rE({isQSD:!0,isWindows:!0,isAnonymous:n,meta:nE(r)}):"qliksensemobile"===i?rE({isQSE:!0,isWindows:!0,isAnonymous:n,meta:nE(r)}):"cloud-console"===i?rE({isCloud:!0,isCloudConsole:!0,isAnonymous:n,meta:nE(r)}):"fedramp"===r.composition?.provider?rE({isCloud:!0,isQCG:!0,isControlCenter:a,isAnonymous:n,meta:nE(r)}):rE({isCloud:!0,isQCS:!0,isControlCenter:a,isAnonymous:n,meta:nE(r)})},eE={};const tE=async({hostConfig:e,noCache:t}={})=>{const n=VR(e),r=`${n}/resources/autogenerated/product-info.json`;try{if(!(r in eE)){const e={};globalThis.QlikMain&&globalThis.QlikMain.resourceNeedsCredentials(r)&&(e.credentials="include");const t=fetch(r,e).then((async e=>e.ok?{data:await e.json(),status:e.status}:{data:void 0,status:e.status}));eE[r]=t}const e=await eE[r];return(e.status>=400||!e.data)&&delete eE[r],e}catch{return delete eE[r],{data:void 0,status:500}}finally{t&&delete eE[r]}},nE=e=>{const t=e.externalUrls;if(!t)return;const n=e.composition?.productName??"Qlik",r=e.composition?.releaseLabel||"-",o="-"===r?n:`${n} (${r})`;return{productId:e.composition?.senseId??"qlik",productLabel:o,version:e.composition?.version,urls:{personalHelpBaseUrl:t.personalHelpBaseUrl,personalUpgradeBase:t.personalUpgradeBase,personalUpgradeUrl:t.personalUpgradeUrl,serverHelpBaseUrl:t.serverHelpBaseUrl,qlikWebPageUrl:t.qlikWebPageUrl}}},rE=e=>({isNodeEnv:!1,isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isControlCenter:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,isAnonymous:!1,...e});function oE(e){return QC(e)}const iE="__QLIK_INTERNAL__DO_NOT_USE_OR_YOU_WILL_BE_FIRED";const aE="qlik-qmfe-api";function sE(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function lE(e){return`${e.accessCode}_${e.clientId}`}const cE={};function uE(e,t,n){localStorage.setItem(`${aE}-${e}-${t}`,n)}function dE(e,t,n){sessionStorage.setItem(`${aE}-${e}-${t}`,n)}function pE(e,t){return localStorage.getItem(`${aE}-${e}-${t}`)||void 0}function fE(e,t){return sessionStorage.getItem(`${aE}-${e}-${t}`)||void 0}function hE(e,t){t.forEach((t=>localStorage.removeItem(`${aE}-${e}-${t}`)))}function mE(e,t){t.forEach((t=>sessionStorage.removeItem(`${aE}-${e}-${t}`)))}function gE(e,t){const n=`${aE}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}async function bE(e,t){if(!e.clientId)throw new IR('A host config with authType set to "oauth2" has to also provide a clientId');return yE(sE(e),t,e.noCache,e.accessTokenStorage)}async function yE(e,t,n,r){if(n)return t();const o=WC(),i=cE[e]||(o?function(e,t){let n,r;if("local"===t?(n=pE(e,"access-token"),r=pE(e,"refresh-token")):"session"===t&&(n=fE(e,"access-token"),r=fE(e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r):void 0);if(i)return cE[e]=i,Promise.resolve(i);const a=t();if(cE[e]=a,o){const t=await a;"local"===r&&t?(t.accessToken&&uE(e,"access-token",t.accessToken),t.refreshToken&&uE(e,"refresh-token",t.refreshToken)):"session"===r&&t&&(t.accessToken&&dE(e,"access-token",t.accessToken),t.refreshToken&&dE(e,"refresh-token",t.refreshToken))}return a}function vE(e){const t=sE(e);delete cE[t],WC()&&(hE(t,["access-token","refresh-token"]),mE(t,["access-token","refresh-token"]))}function SE(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function wE(e){if(e.errors)throw new qR(e.errors)}function xE(e){const t=Object.keys(e);t.sort();return t.map((t=>`${t}=${e[t]}`)).join("&")}async function kE(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t),r=function(e){let t="";if(WC()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!HC())throw new Error("Environment not supported for oauth2 authentication");t=Buffer.from(e).toString("base64")}return t}(Array.from(new Uint8Array(n)));return r.replaceAll(/\+/g,"-").replaceAll(/\//g,"_").replace(/=+$/,"")}async function CE(e){const t=e.clientId||"",n=VR(e),r=oE(128),o=oE(43),i=await kE(r),a=e.redirectUri||globalThis.location.href,s=sE(e);vE(e),dE(s,"state",o),dE(s,"verifier",r),dE(s,"href",globalThis.location.href),dE("","client-in-progress",s);const l=`${n}/oauth/authorize?${xE({response_type:"code",client_id:t,redirect_uri:a,scope:e.scope||"user_default",state:o,code_challenge:i,code_challenge_method:"S256"})}`;globalThis.location.replace(l)}async function EE(e,t,n,r){try{const o=await fetch(`${VR(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({grant_type:"authorization_code",scope:e.scope||"user_default",...t?{code:t}:{},redirect_uri:r||globalThis.location.href,...n?{code_verifier:n}:{},client_id:e.clientId})}),i=await o.json();return wE(i),{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}catch(e){return console.error(e),new Promise((()=>{}))}}function RE(e,t,n,r,o){const i={client_id:e,client_secret:t,scope:n};return r?{...i,grant_type:"urn:qlik:oauth:user-impersonation",user_lookup:{field:"subject",value:r}}:o?{...i,grant_type:"urn:qlik:oauth:user-impersonation",user_lookup:{field:"userId",value:o}}:{...i,grant_type:"client_credentials"}}async function LE(e){const{clientId:t,clientSecret:n}=e;if(!t||!n)throw new IR('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');const r=await bE(e,(async()=>{if(!e.clientId||!e.clientSecret)throw new IR('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');return async function(e,t,n,r="user_default",o,i){const a=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify(RE(t,n,r,o,i))}),s=await a.json();return{accessToken:s.access_token,refreshToken:s.refresh_token,errors:s.errors}}(VR(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)}));return r}async function PE(e){const{clientId:t}=e;if(!t)throw new IR('A host config with authType set to "oauth2" has to also provide a clientId');const n=await bE(e,(async()=>{if(e.getAccessToken)try{const t="string"==typeof e.getAccessToken?await function(e){return globalThis[e]}(e.getAccessToken)():await e.getAccessToken();return{accessToken:t,refreshToken:void 0,errors:void 0}}catch{return _E("Could not fetch access token using custom function")}if(e.performInteractiveLogin){let t;try{const n=oE(128),r=oE(43),{code:o,state:i}=function(e){if("string"==typeof e){const t=new URLSearchParams(new URL(e).search);return{code:t.get("code")||"",state:t.get("state")||""}}return e}(await SE(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=VR(e),a=await kE(r);return`${i}/oauth/authorize?${xE({response_type:"code",client_id:o,redirect_uri:t,scope:e.scope||"user_default",state:n,code_challenge:a,code_challenge_method:"S256"})}`}(e,o,r,n))}));if(!t)return _E("No redirect uri provided");if(r!==i)return _E("State returned by custom interactive login function does not match original");if(!o)return _E("No code found in response from custom interactive login function");return await EE(e,o,n,t)}catch(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:"Could not perform custom interactive login",detail:`${e}`}]}}}const t=sE(e),n=gE(t,"code"),r=gE(t,"verifier");if(n&&r){const t=await EE(e,n,r,e.redirectUri);if(t)return t}}));return n||(e.performInteractiveLogin||(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),CE(e)),new Promise((()=>{})))}!function(e,t){(globalThis.location?.origin.startsWith("https://localhost:")||globalThis.location?.origin?.endsWith("qlik-stage.com"))&&(void 0===globalThis[iE]&&(globalThis[iE]={}),globalThis[iE][e]=t)}("clearAllAccessTokens",(()=>{console.log("Clearing tokens",cE),Object.keys(cE).forEach((e=>{console.log("Clearing access tokens for",e),hE(e,["access-token","refresh-token"]),mE(e,["access-token","refresh-token"])})),function(){for(const e in cE)delete cE[e]}()}));let TE=Promise.resolve("");async function IE(e){if(HC()){const t=await LE(e);return t?(wE(t),t.accessToken||""):""}return WC()&&(TE=TE.then((async()=>{const t=await PE(e);return t?(wE(t),t.accessToken||""):""}))),TE}async function OE(e){const t=await async function(e){return cE[sE(e)]}(e);if(vE(e),t&&t.refreshToken&&e.clientSecret){const n=await bE(e,(async()=>{if(!t||!t.refreshToken||!e.clientSecret)throw new Error("Trying to refresh tokens without refreshToken or clientSecret");return async function(e,t,n){const r=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:t,client_secret:n})}),o=await r.json();return{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}(VR(e),t.refreshToken,e.clientSecret)}));n&&wE(n)}}function _E(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function ME(e,t,n){const r=await fetch(`${VR(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({subject_token:t,subject_token_type:"urn:ietf:params:oauth:token-type:access_token",grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",purpose:n,redirect_uri:globalThis.location?.href,client_id:e.clientId})});if(200!==r.status)throw await async function(e){const t=await e.text();try{const e=JSON.parse(t);return new qR(e.errors)}catch{return new qR([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function qE(e,t){try{return await t()}catch(n){const{retry:r}=await AE({hostConfig:e});if(r)return t();throw n}}function DE(){const e=Math.floor(Date.now()/1e3).toString(16);var t;return`${e}${t=40-e.length,XC("1234567890abcdef",t)()}`}async function NE(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new IR('A host config with authType set to "anonymous" has to provide both an accessCode and clientId');const r=await async function(e,t){if(!e.accessCode)throw new IR('A host config with authType set to "anonymous" has to also provide an accessCode');return yE(lE(e),t,!1,void 0)}(e,(async()=>{const r=VR(e),o=await async function(e){let t;if(WC()){const n=lE(e);t=pE(n,"tracking-code"),t||(t=DE()),uE(n,"tracking-code",t)}else t=DE();return t}(e);return async function(e,t,n,r){const o=await fetch(`${e}/oauth/token/anonymous-embed`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({eac:t,client_id:n,grant_type:"urn:qlik:oauth:anonymous-embed",tracking_code:r})}),i=await o.json();return{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}(r,t,n,o)}));if(!r)return"";if(r.errors)throw new qR(r.errors);return r.accessToken?r.accessToken:""}async function AE({hostConfig:e}){return function(e){const t=lE(e);delete cE[t],WC()&&(hE(t,["access-token","refresh-token"]),mE(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var zE={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await NE(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await qE(e,(async()=>{const t=await NE(e);return ME(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await qE(e,(async()=>{const t=await NE(e);return ME(e,t,"websocket")}))}}},handleAuthenticationError:AE};var jE={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function(){return{queryParams:{}}},handleAuthenticationError:function(){return Promise.resolve({})}},FE=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=HE(this.stack)}},$E=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=HE(this.stack)}};const BE=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,WE=e=>{const t=e.match(BE);return Boolean(t&&t.length>0)};function HE(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(WE(e))break;t.unshift(e)}return t.join("\n")}function UE(e,t,n,r){let o=e;return""!==t&&(o=o.concat(`?${t}`)),r&&(o=o.concat(`+headers=${JSON.stringify(r)}`)),n&&(o=o.concat(`+host-config=${n}`)),o}const VE=e=>"get"===e||"GET"===e;function GE(e){return e&&(e instanceof Blob||e instanceof Object&&"[object Blob]"===e.toString())||e&&e instanceof ReadableStream||"string"==typeof e?e:JSON.parse(JSON.stringify(e))}function KE(e){return!("get"===e||"GET"===e)}function JE(e){const t=e.indexOf("?");if(t>=0)return e.substring(0,t);const n=e.indexOf("+headers=");if(n>=0)return e.substring(0,n);const r=e.indexOf("+host-config=");return r>=0?e.substring(0,r):e}function ZE(e){return e.then((e=>{const t={data:GE(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t}))}let XE=6e5;const QE={};function YE(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${YE(e.cause)}`:YE(e.cause):e.message:String(e)}async function eR(e,t,n,r,o,i,a,s){const{body:l,contentTypeHeader:c,requestOptions:u}=function(e,t){if(!e)return{body:null,contentTypeHeader:{},requestOptions:{}};const n={},r={};let o=null;switch(t){case"":case"application/json":n["Content-Type"]="application/json",o=JSON.stringify(e);break;case"multipart/form-data":o=function(e){const t="multipart/form-data";if("object"!=typeof e)throw new $E(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new $E(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(e instanceof FormData)return e;const n=new FormData;return Object.entries(e).forEach((r=>{const[o,i]=r;switch(typeof i){case"boolean":case"number":case"string":n.set(o,`${i}`);break;case"object":if(i instanceof Blob)n.set(o,i);else if(i instanceof Uint8Array){const e=new Blob([i],{type:"application/octet-stream"});n.set(o,e)}else{const e=JSON.stringify(i),t=new Blob([e],{type:"application/json"});n.set(o,t,"")}break;default:throw new $E(`Cannot encode multipart-field "${o}" with value of type ${typeof i}, values must be objects, strings, numbers or boolean.`,t,e)}})),n}(e);break;case"application/octet-stream":n["Content-Type"]=t,r.duplex="half",o=e;break;case"text/plain":if("string"!=typeof e)throw new $E(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new $E(`Unsupported content-type "${t}", supported are: application/json, multipart/form-data, application/octet-stream and text/plain`,t,e)}return{body:o,contentTypeHeader:n,requestOptions:r}}(n,r??""),d={...c,...i,...o?.headers,...iR()};!d["User-Agent"]&&s&&(d["User-Agent"]=s);const p={method:e,credentials:a,mode:"cors",headers:d,redirect:await UR(o?.hostConfig)?"manual":"follow",keepalive:o?.keepalive,progress:o?.progress,body:l,...u};let f,h;if(o?.signal)p.signal=o.signal;else if(o?.timeoutMs&&o.timeoutMs>0){const e=new AbortController;f=setTimeout((()=>{e.abort()}),o.timeoutMs),p.signal=e.signal}h=o?.progress?await async function(e,{method:t,headers:n,credentials:r,keepalive:o,body:i,signal:a,progress:s}){const l=new XMLHttpRequest;let c,u;const d=new Promise(((e,t)=>{c=e,u=t}));if(l.open(t||"GET",e),"object"!=typeof n)throw Error("malformed headers",n);for(const[e,t]of Object.entries(n))l.setRequestHeader(e,t);o&&l.setRequestHeader("Connection","keep-alive"),a&&a.addEventListener("abort",(()=>{l.abort(),u()})),l.withCredentials="include"===r,s?.onUpload&&(l.upload.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onUpload?.({loaded:t,total:r?n:void 0})}),s?.onDownload&&(l.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onDownload?.({loaded:t,total:r?n:void 0})}),l.onloadend=()=>{const{status:e}=l,t={};for(const e of l.getAllResponseHeaders().split("\r\n")){const[n,r]=e.split(":",2);n&&r&&(t[n]=r)}l.response?c(new Response(l.response,{status:e,headers:t})):c(new Response(void 0,{status:e,headers:t}))};try{const e=i;l.send(e)}catch(e){return Promise.reject(new FE(YE(e),0,new Headers,{}))}return d}(t,p):await async function(e,t){try{return await fetch(e,t)}catch(e){return Promise.reject(new FE(YE(e),0,new Headers,{}))}}(t,p),f&&clearTimeout(f);const m=await async function(e,t){let n;const r=e.headers.get("content-type")?.split(";")[0],o=e.headers.get("content-disposition")?.split(";");if(o&&"attachment"===o[0]){let t="";for(let e=1;e<o.length;e++){const n=o[e].trim();if(0===n.indexOf("filename")){const e=n.indexOf('"'),r=n.lastIndexOf('"');t=n.slice(e+1,r)}}n=aR(await e.blob(),t)}else switch(r){case"image/png":case"image/jpeg":case"image/x-icon":case"application/offset+octet-stream":case"application/octet-stream":case"application/zip":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/pdf":n=aR(await e.blob());break;case"text/event-stream":n=e.body;break;default:try{n=await e.text(),n=JSON.parse(n)}catch{}}const{status:i,statusText:a,headers:s}=e,l=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new FE(l,i,s,n);if(0===i)throw new FE(l,302,s,n);const c={status:i,headers:s,data:n};return c}(h,t);return m}async function tR({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=VR(o?.hostConfig),{headers:a,queryParams:s,credentials:l}=await XR({hostConfig:o?.hostConfig,method:e}),c=i+function(e,t){let n=e;return t&&Object.keys(t).forEach((e=>{n=n.replace(`{${e}}`,t[e])})),n}(t,n),u=function(e){return e?Object.entries(e).map((e=>{const[,t]=e;if(void 0!==t)return e.map((e=>encodeURIComponent(decodeURIComponent(e)))).join("=")})).filter(Boolean).join("&"):""}({...r,...s}),d=function(e,t){return""!==t?`${e}?${t}`:e}(c,u);return{completeUrl:d,cacheKey:UE(c,u,nL(o?.hostConfig),o?.headers),authHeaders:a,credentials:l}}function nR(e,t){return rR(e,t,(async()=>{const{cacheKey:n,authHeaders:r,credentials:o}=await tR(t);return rR(e,{...t,cacheKey:n,authHeaders:r,credentials:o,options:{...t.options,noCache:!0}},void 0)}))}function rR(e,{method:t,completeUrl:n,cacheKey:r,body:o,options:i,authHeaders:a,credentials:s,contentType:l,userAgent:c},u){QE[e]||(QE[e]={});const d=KE(t)?void 0:QE[e][r];if(KE(t)&&function(e,t){const n=JE(t);for(const t in e){const r=JE(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}(QE[e],r),d&&function(e,t,n){if(!t||void 0===t.value)return!1;if(e?.noCache)return!1;if(e?.useCacheIfAfter)return e.useCacheIfAfter.getTime()<=t.lastPulled;const r=Date.now()-t.lastPulled;return e?.maxCacheAge?r<=e?.maxCacheAge:r<n}(i,d,XE))return d.lastHit=new Date,d.hitCount+=1,d.accessedPaths.add(globalThis.location?globalThis.location.pathname:"node"),ZE(d.value);const p=eR(t,n,o,l,i,a,s,c),f=async function(e,t,n){try{return await t}catch(t){const r=t,o=r.data;if(401===r.status||403===r.status&&"CSRF-TOKEN-2"===o?.code||(301===r.status||302===r.status)&&await UR(e)){if(globalThis.loggingOut)return oR();const{retry:t,preventDefault:i}=await ZR({hostConfig:e,status:r.status,headers:r.headers,errorBody:o,canRetry:!!n});if(t&&n)return n();if(i)return oR()}throw t}}(i?.hostConfig,p,u),h=function(e,t,n,r,o,i,a){const s=nL(o?.hostConfig);return t.then((t=>{const l=t.data;if(!l)return t;const c=l.links?.prev?.href,u=l.links?.next?.href;return c&&(t.prev=t=>nR(e,{method:n,completeUrl:c,body:r,options:t||o,cacheKey:UE(c,"",s,o?.headers),authHeaders:i,credentials:a})),u&&(t.next=t=>nR(e,{method:n,completeUrl:u,body:r,options:t||o,cacheKey:UE(u,"",s,o?.headers),authHeaders:i,credentials:a})),t}))}(e,f,t,o,i,a,s),m=function(e,t,n){return n.catch((n=>(delete e[t],Promise.reject(n))))}(QE[e],r,h);if(VE(t)){if(Object.hasOwn&&!Object.hasOwn(QE,e)||"__proto__"===e)throw new Error(`Forbidden api name: ${e}`);QE[e][r]={lastPulled:Date.now(),value:m,lastHit:null,hitCount:0,accessedPaths:new Set}}return ZE(m)}function oR(){return new Promise((()=>{}))}function iR(){if(!WC())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function aR(e,t){const n=e;return n.download=t?(n=t)=>sR(e,n):t=>sR(e,t),n}async function sR(e,t){if(WC()){const n=document.createElement("a"),r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),window.URL.revokeObjectURL(r)}else{const{writeFileSync:n}=await Promise.resolve().then((function(){return dL})),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QE;const lR="qmfe-api/latest";async function cR(e,t,n){const r=(GC.getInterceptors()||[]).reduce(((e,t)=>n=>t(n,e)),(t=>async function(e,t){if(function(e){const t=aL(e);if(HR(t)){if(0===Object.keys(t).length)throw new IR("a host config must be provided when making a cross domain request");if(!t.host)throw new IR("A 'host' property must be set in host config when making a cross domain request")}}(t.options?.hostConfig),"noauth"===t.options?.hostConfig?.authType)return console.info("API call blocked: noauth auth module is configured, no API calls should be made"),{status:204,headers:new Headers,data:null};let n;n=t?.userAgent?t.userAgent:WC()?`${window.navigator.userAgent} ${lR}`:lR;const{completeUrl:r,cacheKey:o,authHeaders:i,credentials:a}=await tR(t);return nR(e,{...t,method:t.method.toUpperCase(),completeUrl:r,cacheKey:o,authHeaders:i,credentials:a,userAgent:n})}(e,t)));return r(t)}const uR="qlik-csrf-token";async function dR(e,t){const n=VR(e);let r;r=await UR(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const t=(await cR("csrf-token",{method:"get",pathTemplate:r,options:{hostConfig:e,noCache:!0}})).headers.get(uR);return t||""}catch(e){if(404===e.status)return"";throw e}};return t?(pR[n]=o(),pR[n]):(pR[n]=pR[n]||o(),pR[n])}const pR={};function fR(e){return!1===e.crossSiteCookies?"same-origin":HR(e)?"include":"same-origin"}var hR={requiredProps:[],optionalProps:["webIntegrationId","crossSiteCookies","anonymousMode"],getRestCallAuthParams:async function({hostConfig:e,method:t}){const n={};var r;return"get"!==(r=t)&&"GET"!==r&&(n["qlik-csrf-token"]=await dR(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:fR(e)}},getWebSocketAuthParams:async function({hostConfig:e}){const t={"qlik-csrf-token":await dR(e,!0)};return e.webIntegrationId&&(t["qlik-web-integration-id"]=e.webIntegrationId),{queryParams:t}},handleAuthenticationError:async function({hostConfig:e,status:t}){if(function(e){const t=VR(e);delete pR[t]}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=VR(e);return e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var mR={requiredProps:[],optionalProps:[],getRestCallAuthParams:function(e){return Promise.resolve({headers:{},queryParams:{},credentials:"same-origin"})},getWebSocketAuthParams:function(e){return Promise.resolve({queryParams:{}})},handleAuthenticationError:function(e){return Promise.resolve({})}};var gR={requiredProps:[],optionalProps:[],getRestCallAuthParams:function(){return Promise.resolve({headers:{},queryParams:{},credentials:"same-origin"})},getWebSocketAuthParams:function(){return Promise.resolve({queryParams:{}})},handleAuthenticationError:function(){return Promise.resolve({})}};async function bR(e,t){try{return await t()}catch(n){const{retry:r}=await yR({hostConfig:e});if(r)return t();throw n}}async function yR({hostConfig:e}){return e.getAccessToken?(vE(e),{preventDefault:!1,retry:!0}):WC()?e.performInteractiveLogin?(vE(e),{retry:!0}):(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),CE(e),{preventDefault:!0}):(await OE(e),{preventDefault:!1,retry:!0})}WC()&&function(){const e=new URLSearchParams(globalThis.location.search),t=e.get("code")||void 0,n=e.get("state")||void 0;if(e.get("error")){const t=document.createElement("pre");t.innerText=`<code>${JSON.stringify({error:e.get("error"),error_code:e.get("error_code"),error_description:e.get("error_description"),error_detail:e.get("error_detail"),error_uri:e.get("error_uri")})}</code>`,document.body.prepend(t)}const r=gE("","client-in-progress");if(r&&t&&n){const e=gE(r,"state"),o=gE(r,"href");e&&e===n&&o&&(dE(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var vR={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await IE(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await bR(e,(async()=>{const t=await IE(e);return ME(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await bR(e,(async()=>{const t=await IE(e);return ME(e,t,"webresource")}))}}},handleAuthenticationError:yR};var SR={requiredProps:["reference"],optionalProps:[],getRestCallAuthParams:function(){throw new Error("getRestCallAuthParams should never be called for reference auth module")},getWebSocketAuthParams:function(){throw new Error("getWebSocketAuthParams should never be called for reference auth module")},handleAuthenticationError:function(){throw new Error("handleAuthenticationError should never be called for reference auth module")}};const wR={};function xR(e){const t=VR(e);return wR[t]=wR[t]||function(){let e="";for(let t=0;t<16;t+=1){const t=Math.floor(62*Math.random());e+=t<10?t:t>9&&t<36?String.fromCharCode(t+55):String.fromCharCode(t+61)}return e}(),wR[t]}var kR={requiredProps:[],optionalProps:["loginUri","crossSiteCookies"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":xR(e)},queryParams:{xrfkey:xR(e)},credentials:fR(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:xR(e),"qlik-csrf-token":await dR(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){return e.loginUri?(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0}):{}}};const CR={};let ER=Promise.resolve(),RR=!1;function LR(e,t){CR[e.toLowerCase()]=t}async function PR(e){const t=aL(e),n=await TR(t);ER&&await ER;let r=function(e){return CR[e.toLowerCase()]}(n);if(r||(ER=(async()=>{r=await async function(e){const t=globalThis[e];if(t){let n;if(n="function"==typeof t?await t():t,n&&n.getRestCallAuthParams&&n.getWebSocketAuthParams&&n.handleAuthenticationError)return n;throw console.error("Not a valid auth module",n),new _R(e)}return Promise.resolve(void 0)}(n),r&&LR(n,r)})(),await ER),!r)throw new _R(n);return r.validateHostConfig?r.validateHostConfig({authType:n,...t}):function(e,{requiredProps:t,optionalProps:n}){const r=[];for(const n of t)e[n]||r.push(n);if(r.length>0)throw new IR(`missing required properties in host config; '${r.join("', '")}'`);const o=[...KC,...t,...n],i=[];Object.keys(e).forEach((e=>{o.includes(e)||i.push(e)})),i.length>0&&console.warn(`WARNING: unknown properties in host config; '${i.join("', '")}'`)}({authType:n,...t},{requiredProps:r.requiredProps||[],optionalProps:r.optionalProps||[]}),r}async function TR(e){return e.authType?e.authType:e.apiKey?"apikey":e.accessCode?"anonymous":e.clientId?"oauth2":e.webIntegrationId?"cookie":e.reference?"reference":await UR(e)?"windowscookie":"cookie"}RR||(LR("apikey",jE),LR("cookie",hR),LR("none",gR),LR("noauth",mR),LR("oauth2",vR),LR("anonymous",zE),LR("windowscookie",kR),LR("reference",SR),RR=!0);var IR=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},OR=class extends Error{constructor(...e){const t=e.map(((e,t)=>0===t?`"${e}"`:`or "${e}"`)).join(" ");super(`HostConfig is not properly configured. authType is expected to be ${t}`),this.name="UnexpectedAuthTypeError"}},_R=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(CR).filter((e=>"qmfeembedframerauthmodule"!==e.toLowerCase())).join("', '")}'`),this.name="InvalidAuthTypeError"}};function MR({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var qR=class extends Error{errors;constructor(e){if("object"!=typeof e)return void super("Unknown error");const t=Array.isArray(e)?e:[e];super(t.map(MR).join(", ")),this.errors=t}};function DR(e){const t=VC(e)||{};return t.host&&(t.host=VR(t)),WC()&&VR(t)===window.location.origin&&delete t.host,t.authType&&JC.includes(t.authType)&&delete t.authType,t}function NR(e,t){if("function"!=typeof t)return t}const AR=new Map;function zR(e,t){const n=t?.reference||null;if(n&&!AR.has(n))throw new IR(`Host config with reference "${n}" is not registered. Please register it before using it.`);AR.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),AR.set(e,t)}function jR(e){return AR.get(e)}function FR(){return jR("default")||{}}globalThis.loggingOut=!1;let $R="";function BR({message:e}){e!==$R&&($R=e,console.error(e))}function WR(e){return TR(e)}function HR(e){if(!globalThis.location?.origin)return!0;const t=aL(e);if(0===Object.keys(t).length)return!1;try{return new URL(VR(t)).origin!==globalThis.location.origin}catch{}return!1}async function UR(e){const t=aL(e);return"boolean"==typeof t.forceIsWindows?t.forceIsWindows:"cookie"!==t.authType&&("windowscookie"===t.authType||(await YC({hostConfig:e})).isWindows)}function VR(e){const t=aL(e)?.host?.trim();let n;for(n=t?t.toLowerCase().startsWith("https://")||t.toLowerCase().startsWith("http://")?t:`https://${t}`:"";"/"===n[n.length-1];)n=n.substring(0,n.length-1);return n}function GR(e){const t=aL(e)?.host;let n;for(n=t?t.toLowerCase().startsWith("https://")||t.toLowerCase().startsWith("http://")?t:`https://${t}`:globalThis.location.origin;"/"===n[n.length-1];)n=n.substring(0,n.length-1);return n.replace(oL,"ws")}async function KR(e){const t=aL(e.hostConfig);try{const n=await PR(t);return await n.getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||BR)(iL(e)),e}}async function JR(e){const t=aL(e.hostConfig);try{const n=await PR(t);return await(n.getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw(t.onAuthFailed||BR)(iL(e)),e}}async function ZR(e){const t=aL(e.hostConfig),n=await PR(t),r=await n.handleAuthenticationError({...e,hostConfig:t}),o=e.canRetry&&r.retry,i=r.preventDefault;if(!o&&!i){const{status:n,errorBody:r}=e;(t.onAuthFailed||BR)(function({errorBody:e,status:t}){const n=e;if("object"==typeof n?.errors){return{message:new qR(n?.errors).message}}return{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return r}async function XR(e){const t=aL(e.hostConfig);try{const n=await PR(t);return await n.getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||BR)(iL(e)),e}}function QR(e,t){LR(e,t)}function YR(e){!function(e){zR("default",e||{})}(e)}function eL(e,t){zR(e,t)}function tL(e){!function(e){AR.has(e)?AR.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function nL(e){return function(e){const t=UC(DR(aL(e)));return JSON.stringify(t,NR)}(e)}const rL=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},oL=/^http/;function iL(e){return{message:e.message||"Unknown error"}}function aL(e){if(e?.reference){const t=jR(e.reference);if(!t)throw new IR(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:FR()}function sL(){return FR()}var lL={determineAuthType:WR,getDefaultHostConfig:sL,getRestCallAuthParams:XR,getWebResourceAuthParams:JR,getWebSocketAuthParams:KR,handleAuthenticationError:ZR,isHostCrossOrigin:HR,isWindows:UR,logout:rL,registerAuthModule:QR,registerHostConfig:eL,serializeHostConfig:nL,setDefaultHostConfig:YR,toValidLocationUrl:VR,toValidWebsocketLocationUrl:GR,unregisterHostConfig:tL},cL=Object.freeze({__proto__:null,AuthorizationError:qR,InvalidAuthTypeError:_R,InvalidHostConfigError:IR,UnexpectedAuthTypeError:OR,default:lL,determineAuthType:WR,getAccessToken:async function(e){const t=await XR({method:"GET",...e}),n=t.headers?.Authorization;if(0===n.indexOf("Bearer "))return n.substring(7);throw new Error("Unknown format of authorization header returned by remote auth module")},getDefaultHostConfig:sL,getRestCallAuthParams:XR,getWebResourceAuthParams:JR,getWebSocketAuthParams:KR,handleAuthenticationError:ZR,isHostCrossOrigin:HR,isWindows:UR,logout:rL,registerAuthModule:QR,registerHostConfig:eL,serializeHostConfig:nL,setDefaultHostConfig:YR,toValidLocationUrl:VR,toValidWebsocketLocationUrl:GR,unregisterHostConfig:tL});window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise((e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})}))),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout((()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")}),5e3),t=await window.__qlikMainPrivateResolvers.mainUrlPromise;return clearTimeout(e),new Promise((e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),n.addEventListener("error",(()=>{console.error(`Qlik runtime system not found: ${t}`)})),n.addEventListener("load",(()=>{window.QlikMain&&e(window.QlikMain)})),window.document.head.appendChild(n)}}))})());var uL=Object.freeze({__proto__:null,importRuntimeModule:async function(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&window.__qlikMainPrivateResolvers.resolveMainJsUrl(t)}(t),async function(e){if(!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}}),dL=Object.freeze({__proto__:null});e.DataPropertyHandler=Aw,e.EnigmaMocker=$C,e.HyperCubeHandler=Hw,e.__DO_NOT_USE__=BC,e.conversion=OS,e.embed=LC,e.onContextMenu=function(e){const t=YS(++BS);t.value||(t.value=1,$S.__hooks.menus.push(t)),t.fn=e},e.onTakeSnapshot=function(e){const t=YS(++BS);t.value||(t.value=1,$S.__hooks.snaps.push(t)),t.fn=e},e.useAction=function(e,t){const[n]=rw({action(){n._config.action.call(null)}});return n.component||(n.component=$S,$S.__hooks.actions.list.push(n)),aw((()=>{const t=e();n._config=t,n.active=t.active||!1,n.disabled=t.disabled||!1,n.hidden=t.hidden||!1,n.label=t.label||"",n.getSvgIconShape=t.icon?()=>t.icon:void 0,n.key=t.key||n.component.__hooks.actions.list.length,n.component.__hooks.actions.changed=!0}),t),n.action},e.useApp=function(){const e=ew("app");return e&&e.session?e:void 0},e.useAppLayout=function(){return ew("appLayout")},e.useConstraints=function(){return ew("constraints")},e.useDeviceType=function(){return ew("deviceType")},e.useEffect=ow,e.useElement=sw,e.useEmbed=function(){return ew("nebbie")},e.useEmitter=function(){return ew("emitter")},e.useGlobal=function(){const e=ew("global");return e&&e.session?e:void 0},e.useImperativeHandle=function(e,t){const n=YS(++BS);if(n.imperative||(n.imperative=!0),WS(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],$S.__hooks.imperativeHandle=r}},e.useInteractionState=function(){return ew("interactions")},e.useKeyboard=function(){const e=ew("keyboardNavigation"),t=ew("focusHandler");if(!$S.__hooks.accessibility.exitFunction){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&n.active&&(cw(this),t&&t.blurCallback&&t.blurCallback(e))}.bind($S);$S.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),lw(this))}.bind($S);$S.__hooks.accessibility.focusFunction=n;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind($S);$S.__hooks.accessibility.focusSelectionFunction=r}const n=$S.__hooks.accessibility.focusFunction,r=$S.__hooks.accessibility.exitFunction,o=$S.__hooks.accessibility.focusSelectionFunction,[i,a]=rw({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return $S.__hooks.accessibility.setter=a,$S.__hooks.accessibility.enabled=e,ow((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i},e.useLayout=function(){return ew("layout")},e.useMemo=aw,e.useModel=function(){const e=ew("model");return e&&e.session?e:void 0},e.useNavigation=function(){return ew("navigation")},e.useOptions=function(){return ew("options")},e.usePlugins=function(){return ew("plugins")},e.usePromise=function(e,t){const[n,r]=rw((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=YS(++BS);return o.component||(o.component=$S),iw((()=>{let t=!1;return o.teardown=()=>{t=!0,o.teardown=null;const e=o.component.__hooks.pendingPromises.indexOf(o);e>-1&&o.component.__hooks.pendingPromises.splice(e,1)},e().then((e=>{t||(o.teardown&&o.teardown(),r({resolved:e,rejected:void 0,state:"resolved"}))})).catch((e=>{t||(o.teardown&&o.teardown(),r({resolved:void 0,rejected:e,state:"resolved"}))})),o.component.__hooks.pendingPromises.push(o),()=>{o.teardown&&o.teardown()}}),t),[n.resolved,n.rejected]},e.useRect=function(){const e=sw(),t=$S.__hooks.resizer,[n,r]=rw((()=>{const{left:t,top:n,width:r,height:o}=e.getBoundingClientRect();return{left:t,top:n,width:r,height:o}}));return t.current=n,-1===t.setters.indexOf(r)&&t.setters.push(r),t.update&&t.resize&&(t.update=!1,t.resize()),iw((()=>{if(t.initiated)return;t.initiated=!0;const n=()=>{const{left:n,top:r,width:o,height:i}=e.getBoundingClientRect(),a=t.current;a.width===o&&a.height===i&&a.left===n&&a.top===r||t.setters.forEach((e=>e({left:n,top:r,width:o,height:i})))};if(t.resize=()=>{n()},t.explicitResize)return()=>{t.resize=void 0};if("function"==typeof ResizeObserver){let r=new ResizeObserver(n);return r.observe(e),()=>{r.unobserve(e),r.disconnect(e),r=null,t.resize=void 0}}}),[e]),n},e.useRef=function(e){return aw((()=>({current:e})),[])},e.useRenderState=function(){YS(++BS);const e=$S.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}},e.useSelections=function(){return ew("selections")},e.useStaleLayout=function(){const e=ew("layout"),[t]=rw({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current},e.useState=rw,e.useTheme=function(){return ew("theme")},e.useTranslator=function(){return ew("translator")}}));
|
|
126
126
|
//# sourceMappingURL=stardust.js.map
|