@nebula.js/stardust 7.3.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stardust.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v7.3.0
2
+ * @nebula.js/stardust v7.4.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -120,7 +120,7 @@
120
120
  animation: ${Kl} 1.4s linear infinite;
121
121
  `:null,Xl="string"!=typeof Jl?nr`
122
122
  animation: ${Jl} 1.4s ease-in-out infinite;
123
- `:null,Zl=Ns("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Ql||{animation:`${Kl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Yl=Ns("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),ec=Ns("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Dr(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Vs(({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:Xl||{animation:`${Jl} 1.4s ease-in-out infinite`}}]}))),tc=Ns("circle",{name:"MuiCircularProgress",slot:"Track"})(Vs(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),nc=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:c,value:u,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Ki({root:["root",n,`color${Dr(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Dr(n)}`,o&&"circleDisableShrink"]},Vl,t)})(f),m={},g={},b={};if("determinate"===d){const e=2*Math.PI*((Gl-c)/2);m.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return mr.jsx(Zl,{className:Bo(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...b,...p,children:mr.jsxs(Yl,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?mr.jsx(tc,{className:h.track,ownerState:f,cx:Gl,cy:Gl,r:(Gl-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,mr.jsx(ec,{className:h.circle,style:m,ownerState:f,cx:Gl,cy:Gl,r:(Gl-c)/2,fill:"none",strokeWidth:c})]})})});function rc(e){return Ho("MuiButton",e)}const oc=Uo("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"]),ic=E.createContext({}),ac=E.createContext(void 0),sc=[{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}}}],lc=Ns(Wl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Dr(n.color)}`],t[`size${Dr(n.size)}`],t[`${n.variant}Size${Dr(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Vs(({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"},[`&.${oc.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&"start"===e.loadingPosition,style:{"&::before":{content:'"\\200b"',width:0,overflow:"hidden"}}},{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]},[`&.${oc.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${oc.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)",[`&.${oc.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(Ul()).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.alpha((e.vars||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.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||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.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||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"},[`&.${oc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oc.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}),[`&.${oc.loading}`]:{color:"transparent"}}}]}})),cc=Ns("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Dr(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}},...sc]})),uc=Ns("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Dr(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}},...sc]})),dc=Ns("span",{name:"MuiButton",slot:"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}}]})),pc=Ns("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),fc=E.forwardRef(function(e,t){const n=E.useContext(ic),r=E.useContext(ac),o=Gs({props:ri(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:S,type:w,variant:x="text",...k}=o,C=Ii(m),L=b??mr.jsx(nc,{"aria-labelledby":C,color:"inherit",size:16}),R={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:L,loadingPosition:y,size:v,type:w,variant:x},P=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Ki({root:["root",a&&"loading",i,`${i}${Dr(t)}`,`size${Dr(o)}`,`${i}Size${Dr(o)}`,`color${Dr(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Dr(s)}`],startIcon:["icon","startIcon",`iconSize${Dr(o)}`],endIcon:["icon","endIcon",`iconSize${Dr(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},rc,l);return{...l,...c}})(R),T=(S||g&&"start"===y)&&mr.jsx(cc,{className:P.startIcon,ownerState:R,children:S||mr.jsx(pc,{className:P.loadingIconPlaceholder,ownerState:R})}),O=(p||g&&"end"===y)&&mr.jsx(uc,{className:P.endIcon,ownerState:R,children:p||mr.jsx(pc,{className:P.loadingIconPlaceholder,ownerState:R})}),I=r||"",_="boolean"==typeof g?mr.jsx("span",{className:P.loadingWrapper,style:{display:"contents"},children:g&&mr.jsx(dc,{className:P.loadingIndicator,ownerState:R,children:L})}):null,{root:q,...M}=P;return mr.jsxs(lc,{ownerState:R,className:Bo(n.className,P.root,l,I),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Bo(P.focusVisible,f),ref:t,type:w,id:g?C:m,...k,classes:M,children:[T,"end"!==y&&_,i,"end"===y&&_,O]})});var hc={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 mc={green:"#00873D",blue:"#3F8AB3",blueDark:"#005DB9",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},gc={mode:"light",palette:{primary:{main:mc.grey25,contrastText:mc.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:mc.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:mc.grey100,dark:mc.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:mc.grey100,default:mc.grey100,lightest:mc.grey100,lighter:mc.grey98,darker:mc.grey95,darkest:mc.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:mc.blueDark,focusBorder:mc.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:mc.grey45,disabledContrastText:mc.grey100},selected:{main:mc.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:mc.grey100,selectedContrastText:mc.grey100,mainContrastText:mc.grey100,alternativeContrastText:mc.grey25,excludedContrastText:mc.grey25,selectedExcludedContrastText:mc.grey100,possibleContrastText:mc.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)"}}},bc={mode:"dark",palette:{primary:{main:mc.grey20,contrastText:mc.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:mc.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:mc.grey100,dark:mc.grey0},action:{active:mc.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:mc.grey25,lighter:mc.grey20,darker:mc.grey15,darkest:mc.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:mc.blueDark,focusBorder:mc.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:mc.grey45,disabledContrastText:mc.grey100},selected:{main:mc.green,alternative:mc.grey20,excluded:mc.grey10,selectedExcluded:mc.grey10,possible:mc.grey80,selectedContrastText:mc.grey100,mainContrastText:mc.grey100,alternativeContrastText:mc.grey100,excludedContrastText:mc.grey100,selectedExcludedContrastText:mc.grey100,possibleContrastText:mc.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)"}}},yc={},vc=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 ${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 ${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",[`&.${oc.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:`1px solid ${e.palette.btn.border}`,backgroundColor:e.palette.btn.normal,boxShadow:"none",[`&.${oc.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",[`&.${oc.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${oc.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Sc(e){let t=gc,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=bc));const r=JSON.stringify(t);if(yc[r])return yc[r];const o={palette:c(c({type:t.mode},hc.palette),t.palette),typography:c({},hc.typography),shadows:hc.shadows,shape:c({},hc.shape)},i=c(c({},o),{},{components:vc(o)});return yc[r]=Is(i),yc[r].name=n,yc[r]}zo.configure(e=>`njs-baf6-${e.replace("Mui","")}`);var wc=L.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const xc={active:!0,select:!0,passive:!0,edit:!1};function kc(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(xc).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=xc[e],n[e]=!xc[e])}),e.constraints=n,e.interactions=t}var Cc=(e={},t=()=>{})=>{const n=e,r=[],o={},i={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return n[e]=r,o[e]=t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);n[e]=null},dispatch:e=>{r.forEach(t=>t(e?{}:n))},destroy:()=>{Object.keys(o).forEach(e=>{o[e]&&o[e]()})}};return[()=>{const[,e]=E.useState(n);return E.useEffect(()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)}),[e]),[i]},i]};const Ec=E.forwardRef(({initialContext:e,renderCallback:t,modelStore:n,selectionStore:r},o)=>{const[i,a]=E.useState(e),[s,l]=E.useState(),{theme:c}=E.useMemo(()=>({theme:Sc(s)}),[s]),[u,d]=E.useState([]);return E.useEffect(()=>{t&&t()},[]),E.useImperativeHandle(o,()=>({setComps(e){d([...e])},setMuiThemeName:l,setContext:e=>a(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),i&&(i.modelStore=n,i.selectionStore=r),mr.jsx(vr,{injectFirst:!0,children:mr.jsx(Ws,{theme:c,children:mr.jsx(wc.Provider,{value:i,children:u})})})});function Lc({app:e,context:t}){let n,r=!1;const o=new Promise(e=>{n=e}),i=L.createRef(),a=document.createElement("div");a.style.display="none",a.setAttribute("data-nebulajs-version","7.3.0"),a.setAttribute("data-app-id",e.id),document.body.appendChild(a),t&&kc(t);const s=function(e){const[t,n]=Cc({}),[r,o]=Cc({}),[i,a]=Cc({}),[s,l]=Cc({}),[c,u]=Cc({}),[,d]=Cc({}),p=({type:e,value:t})=>{const r=d.get(t.id);d.set(t.id,{});const i=()=>{o.clear(t.id),u.set(t.id,{}),u.dispatch(!0)},s=()=>{t.removeListener("closed",s),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),l.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",s))),s},[f,h]=Cc({},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}}(e.id),l=function(e){const[t,n]=Cc({}),[r,o]=Cc({}),[i,a]=Cc({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),c=ut.createRoot(a);c.render(mr.jsx(Ec,{ref:i,initialContext:t,renderCallback:n,modelStore:s,selectionStore:l}));const u={},d=[],p=[];return[{toggleFocusOfCells(e){Object.keys(u).forEach(t=>{var n;null===(n=u[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:u,addCell(e,t){u[e]=t},removeCell(e){delete u[e]},add:(e,t)=>(async n=>{await o,p.push(e),d.push(t),null==i||null===(n=i.current)||void 0===n||n.setComps(p)})(),remove(e){r||(async t=>{await o;const n=p.indexOf(e);var r;-1!==n&&(null===(r=d[n])||void 0===r||r.call(d),p.splice(n,1),d.splice(n,1));null==i||null===(t=i.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await o,null==i||null===(t=i.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await o,e&&kc(e),null==i||null===(t=i.current)||void 0===t||t.setContext(e)})()},destroy(){r=!0,d.forEach(e=>{e&&e()}),s.destroy(),c.unmount(),document.body.removeChild(a)}},s,l,i,o]}const Rc=e=>e.scrollTop;function Pc(e,t){return n=>{if(t){const r=e.current;void 0===n?t(r):t(r,n)}}}function Tc(e,t,n,r,o,i){const a="exited"!==e||t?n[e]||n.exited:r;return o||i?{...a,...o,...i}:a}function Oc(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 Ic(e){return"string"==typeof e}function _c(e,t,n){return void 0===e||Ic(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function qc(e,t,n){return"function"==typeof e?e(t,n):e}function Mc(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Nc(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function Ac(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Bo(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=Mc({...o,...r}),s=Nc(r),l=Nc(o),c=t(a),u=Bo(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}function Dc(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=qc(d[e],o),{props:{component:m,...g},internalRef:b}=Ac({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),y=ol(b,h?.ref,t.ref),v="root"===e?m||c:m;return[f,_c(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 jc(e){return Ho("MuiPaper",e)}Uo("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 $c=Ns("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}`]]}})(Vs(({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)"}}]}))),zc=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiPaper"}),r=qs(),{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 Ki({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},jc,o)})(u);return mr.jsx($c,{as:i,ownerState:u,className:Bo(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(${pi("#fff",ys(a))}, ${pi("#fff",ys(a))})`}},...c.style}})});function Fc(e){return Ho("MuiIconButton",e)}const Bc=Uo("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Wc=Ns(Wl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Dr(n.color)}`],n.edge&&t[`edge${Dr(n.edge)}`],t[`size${Dr(n.size)}`]]}})(Vs(({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.alpha((e.vars||e).palette.action.active,(e.vars||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}}]})),Vs(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||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)}}],[`&.${Bc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Bc.loading}`]:{color:"transparent"}}))),Hc=Ns("span",{name:"MuiIconButton",slot:"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"}}]})),Uc=E.forwardRef(function(e,t){const n=Gs({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=Ii(u),m=p??mr.jsx(nc,{"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 Ki({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Dr(r)}`,o&&`edge${Dr(o)}`,`size${Dr(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Fc,t)})(g);return mr.jsxs(Wc,{id:d?h:u,className:Bo(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&mr.jsx("span",{className:b.loadingWrapper,style:{display:"contents"},children:mr.jsx(Hc,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})});function Vc(e){return Ho("MuiTypography",e)}Uo("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Gc={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Kc=jo,Jc=Ns("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${Dr(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Vs(({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(Ul()).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${Dr(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}}]}))),Qc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Xc=E.forwardRef(function(e,t){const{color:n,...r}=Gs({props:e,name:"MuiTypography"}),o=Kc({...r,...!Gc[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Qc,...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]||Qc[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Ki({root:["root",i,"inherit"!==e.align&&`align${Dr(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Vc,a)})(h);return mr.jsx(Jc,{as:m,ref:t,className:Bo(g.root,a),...f,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})});function Zc(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;const n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function Yc(e){const t=E.useRef({});return E.useEffect(()=>{t.current=e}),t.current}var eu="top",tu="bottom",nu="right",ru="left",ou="auto",iu=[eu,tu,nu,ru],au="start",su="end",lu="viewport",cu="popper",uu=iu.reduce(function(e,t){return e.concat([t+"-"+au,t+"-"+su])},[]),du=[].concat(iu,[ou]).reduce(function(e,t){return e.concat([t,t+"-"+au,t+"-"+su])},[]),pu=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function fu(e){return e?(e.nodeName||"").toLowerCase():null}function hu(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function mu(e){return e instanceof hu(e).Element||e instanceof Element}function gu(e){return e instanceof hu(e).HTMLElement||e instanceof HTMLElement}function bu(e){return"undefined"!=typeof ShadowRoot&&(e instanceof hu(e).ShadowRoot||e instanceof ShadowRoot)}var yu={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];gu(o)&&fu(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},{});gu(r)&&fu(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function vu(e){return e.split("-")[0]}var Su=Math.max,wu=Math.min,xu=Math.round;function ku(){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 Cu(){return!/^((?!chrome|android).)*safari/i.test(ku())}function Eu(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&gu(e)&&(o=e.offsetWidth>0&&xu(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&xu(r.height)/e.offsetHeight||1);var a=(mu(e)?hu(e):window).visualViewport,s=!Cu()&&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 Lu(e){var t=Eu(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 Ru(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bu(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Pu(e){return hu(e).getComputedStyle(e)}function Tu(e){return["table","td","th"].indexOf(fu(e))>=0}function Ou(e){return((mu(e)?e.ownerDocument:e.document)||window.document).documentElement}function Iu(e){return"html"===fu(e)?e:e.assignedSlot||e.parentNode||(bu(e)?e.host:null)||Ou(e)}function _u(e){return gu(e)&&"fixed"!==Pu(e).position?e.offsetParent:null}function qu(e){for(var t=hu(e),n=_u(e);n&&Tu(n)&&"static"===Pu(n).position;)n=_u(n);return n&&("html"===fu(n)||"body"===fu(n)&&"static"===Pu(n).position)?t:n||function(e){var t=/firefox/i.test(ku());if(/Trident/i.test(ku())&&gu(e)&&"fixed"===Pu(e).position)return null;var n=Iu(e);for(bu(n)&&(n=n.host);gu(n)&&["html","body"].indexOf(fu(n))<0;){var r=Pu(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 Mu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nu(e,t,n){return Su(e,wu(t,n))}function Au(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Du(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ju={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=vu(n.placement),l=Mu(s),c=[ru,nu].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Au("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Du(e,iu))}(o.padding,n),d=Lu(i),p="y"===l?eu:ru,f="y"===l?tu:nu,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=qu(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=Nu(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)))&&Ru(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $u(e){return e.split("-")[1]}var zu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fu(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=ru,S=eu,w=window;if(c){var x=qu(n),k="clientHeight",C="clientWidth";if(x===hu(n)&&"static"!==Pu(x=Ou(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),o===eu||(o===ru||o===nu)&&i===su)S=tu,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,m*=l?1:-1;if(o===ru||(o===eu||o===tu)&&i===su)v=nu,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-r.width,f*=l?1:-1}var E,L=Object.assign({position:s},c&&zu),R=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:xu(n*o)/o||0,y:xu(r*o)/o||0}}({x:f,y:m},hu(n)):{x:f,y:m};return f=R.x,m=R.y,l?Object.assign({},L,((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({},L,((t={})[S]=y?m+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var Bu={passive:!0};var Wu={left:"right",right:"left",bottom:"top",top:"bottom"};function Hu(e){return e.replace(/left|right|bottom|top/g,function(e){return Wu[e]})}var Uu={start:"end",end:"start"};function Vu(e){return e.replace(/start|end/g,function(e){return Uu[e]})}function Gu(e){var t=hu(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ku(e){return Eu(Ou(e)).left+Gu(e).scrollLeft}function Ju(e){var t=Pu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Qu(e){return["html","body","#document"].indexOf(fu(e))>=0?e.ownerDocument.body:gu(e)&&Ju(e)?e:Qu(Iu(e))}function Xu(e,t){var n;void 0===t&&(t=[]);var r=Qu(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=hu(r),a=o?[i].concat(i.visualViewport||[],Ju(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Xu(Iu(a)))}function Zu(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yu(e,t,n){return t===lu?Zu(function(e,t){var n=hu(e),r=Ou(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Cu();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Ku(e),y:l}}(e,n)):mu(t)?function(e,t){var n=Eu(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):Zu(function(e){var t,n=Ou(e),r=Gu(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Su(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Su(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ku(e),l=-r.scrollTop;return"rtl"===Pu(o||n).direction&&(s+=Su(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Ou(e)))}function ed(e,t,n,r){var o="clippingParents"===t?function(e){var t=Xu(Iu(e)),n=["absolute","fixed"].indexOf(Pu(e).position)>=0&&gu(e)?qu(e):e;return mu(n)?t.filter(function(e){return mu(e)&&Ru(e,n)&&"body"!==fu(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=Yu(e,n,r);return t.top=Su(o.top,t.top),t.right=wu(o.right,t.right),t.bottom=wu(o.bottom,t.bottom),t.left=Su(o.left,t.left),t},Yu(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 td(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?vu(o):null,a=o?$u(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case eu:t={x:s,y:n.y-r.height};break;case tu:t={x:s,y:n.y+n.height};break;case nu:t={x:n.x+n.width,y:l};break;case ru:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Mu(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case au:t[c]=t[c]-(n[u]/2-r[u]/2);break;case su:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function nd(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?"clippingParents":s,c=n.rootBoundary,u=void 0===c?lu:c,d=n.elementContext,p=void 0===d?cu:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,b=Au("number"!=typeof g?g:Du(g,iu)),y=p===cu?"reference":cu,v=e.rects.popper,S=e.elements[h?y:p],w=ed(mu(S)?S:S.contextElement||Ou(e.elements.popper),l,u,a),x=Eu(e.elements.reference),k=td({reference:x,element:v,placement:o}),C=Zu(Object.assign({},v,k)),E=p===cu?C:x,L={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},R=e.modifiersData.offset;if(p===cu&&R){var P=R[o];Object.keys(L).forEach(function(e){var t=[nu,tu].indexOf(e)>=0?1:-1,n=[eu,tu].indexOf(e)>=0?"y":"x";L[e]+=P[n]*t})}return L}function rd(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?du:l,u=$u(r),d=u?s?uu:uu.filter(function(e){return $u(e)===u}):iu,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]=nd(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[vu(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var od={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=vu(g),y=l||(b===g||!h?[Hu(g)]:function(e){if(vu(e)===ou)return[];var t=Hu(e);return[Vu(e),t,Vu(t)]}(g)),v=[g].concat(y).reduce(function(e,n){return e.concat(vu(n)===ou?rd(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 L=v[E],R=vu(L),P=$u(L)===au,T=[eu,tu].indexOf(R)>=0,O=T?"width":"height",I=nd(t,{placement:L,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),_=T?P?nu:ru:P?tu:eu;S[O]>w[O]&&(_=Hu(_));var q=Hu(_),M=[];if(i&&M.push(I[R]<=0),s&&M.push(I[_]<=0,I[q]<=0),M.every(function(e){return e})){C=L,k=!1;break}x.set(L,M)}if(k)for(var N=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"},A=h?3:1;A>0;A--){if("break"===N(A))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function id(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 ad(e){return[eu,nu,tu,ru].some(function(t){return e[t]>=0})}var sd={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=du.reduce(function(e,n){return e[n]=function(e,t,n){var r=vu(e),o=[ru,eu].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,[ru,nu].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 ld={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=nd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=vu(t.placement),y=$u(t.placement),v=!y,S=Mu(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,L="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(x){if(i){var T,O="y"===S?eu:ru,I="y"===S?tu:nu,_="y"===S?"height":"width",q=x[S],M=q+g[O],N=q-g[I],A=f?-C[_]/2:0,D=y===au?k[_]:C[_],j=y===au?-C[_]:-k[_],$=t.elements.arrow,z=f&&$?Lu($):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[O],W=F[I],H=Nu(0,k[_],z[_]),U=v?k[_]/2-A-H-B-L.mainAxis:D-H-B-L.mainAxis,V=v?-k[_]/2+A+H+W+L.mainAxis:j+H+W+L.mainAxis,G=t.elements.arrow&&qu(t.elements.arrow),K=G?"y"===S?G.clientTop||0:G.clientLeft||0:0,J=null!=(T=null==R?void 0:R[S])?T:0,Q=q+V-J,X=Nu(f?wu(M,q+U-J-K):M,q,f?Su(N,Q):N);x[S]=X,P[S]=X-q}if(s){var Z,Y="x"===S?eu:ru,ee="x"===S?tu:nu,te=x[w],ne="y"===w?"height":"width",re=te+g[Y],oe=te-g[ee],ie=-1!==[eu,ru].indexOf(b),ae=null!=(Z=null==R?void 0:R[w])?Z:0,se=ie?re:te-k[ne]-C[ne]-ae+L.altAxis,le=ie?te+k[ne]+C[ne]-ae-L.altAxis:oe,ce=f&&ie?function(e,t,n){var r=Nu(e,t,n);return r>n?n:r}(se,te,le):Nu(f?se:re,te,f?le:oe);x[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function cd(e,t,n){void 0===n&&(n=!1);var r=gu(t),o=gu(t)&&function(e){var t=e.getBoundingClientRect(),n=xu(t.width)/e.offsetWidth||1,r=xu(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Ou(t),a=Eu(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==fu(t)||Ju(i))&&(s=function(e){return e!==hu(e)&&gu(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Gu(e);var t}(t)),gu(t)?((l=Eu(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ku(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ud(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 dd(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var pd={placement:"bottom",modifiers:[],strategy:"absolute"};function fd(){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 hd(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?pd:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},pd,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:mu(e)?Xu(e):e.contextElement?Xu(e.contextElement):[],popper:Xu(t)};var u,d,p=function(e){var t=ud(e);return pu.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(fd(t,n)){o.rects={reference:cd(t,qu(n),"fixed"===o.options.strategy),popper:Lu(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:dd(function(){return new Promise(function(e){l.forceUpdate(),e(o)})}),destroy:function(){c(),s=!0}};if(!fd(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 md=hd({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=hu(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,Bu)}),s&&l.addEventListener("resize",n.update,Bu),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Bu)}),s&&l.removeEventListener("resize",n.update,Bu)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=td({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:vu(t.placement),variation:$u(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,Fu(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,Fu(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:{}},yu,sd,od,ld,ju,{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=nd(t,{elementContext:"reference"}),s=nd(t,{altBoundary:!0}),l=id(a,r),c=id(s,o,i),u=ad(l),d=ad(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})}}]});function gd(e){return parseInt(E.version,10)>=19?e?.props?.ref||null:e?.ref||null}const bd=E.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=E.useState(null),s=ol(E.isValidElement(n)?gd(n):null,t);if(ii(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),ii(()=>{if(i&&!o)return tl(t,i),()=>{tl(t,null)}},[t,i,o]),o){if(E.isValidElement(n)){const e={ref:s};return E.cloneElement(n,e)}return n}return i?fl.createPortal(n,i):i});function yd(e){return Ho("MuiPopper",e)}function vd(e){return"function"==typeof e?e():e}Uo("MuiPopper",["root"]);const Sd={},wd=E.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=E.useRef(null),b=ol(g,t),y=E.useRef(null),v=ol(y,u),S=E.useRef(v);ii(()=>{S.current=v},[v]),E.useImperativeHandle(u,()=>y.current,[]);const w=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),[x,k]=E.useState(w),[C,L]=E.useState(vd(n));E.useEffect(()=>{y.current&&y.current.forceUpdate()}),E.useEffect(()=>{n&&L(vd(n))},[n]),ii(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=md(C,g.current,{placement:w,...c,modifiers:e});S.current(t);const n=g.current;return()=>{if(n){const{style:e}=n,r=e.position,o=e.top,i=e.left,a=e.transform;t.destroy(),e.position=r,e.top=o,e.left=i,e.transform=a}else t.destroy();S.current(null)}},[C,i,a,s,c,w]);const R={placement:x};null!==f&&(R.TransitionProps=f);const P=(e=>{const{classes:t}=e;return Ki({root:["root"]},yd,t)})(e),T=p.root??"div",O=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:qc(n,r),{props:s,internalRef:l}=Ac({...i,externalSlotProps:a});return _c(t,{...s,ref:ol(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 mr.jsx(T,{...O,children:"function"==typeof r?r(R):r})}),xd=E.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=Sd,popperRef:p,style:f,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=E.useState(!0);if(!s&&!c&&(!h||y))return null;let S;if(o)S=o;else if(n){const e=vd(n);S=e&&void 0!==e.nodeType?Ys(e).body:Ys(null).body}const w=c||!s||h&&!y?void 0:"none",x=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return mr.jsx(bd,{disablePortal:a,container:S,children:mr.jsx(wd,{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:w,...f},TransitionProps:x,children:r})})}),kd=Ns(xd,{name:"MuiPopper",slot:"Root"})({}),Cd=E.forwardRef(function(e,t){const n=Ei(),r=Gs({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 mr.jsx(kd,{as:i,direction:n?"rtl":"ltr",slots:{root:S},slotProps:y??s,...w,ref:t})});function Ed(e){return parseInt(e,10)||0}const Ld={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Rd(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Pd=E.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:l}=E.useRef(null!=a),c=E.useRef(null),u=ol(t,c),d=E.useRef(null),p=E.useRef(null),f=E.useCallback(()=>{const t=c.current,n=p.current;if(!t||!n)return;const i=el(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=Ed(i.paddingBottom)+Ed(i.paddingTop),l=Ed(i.borderBottomWidth)+Ed(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=rl(()=>{const e=c.current,t=f();if(!e||!t||Rd(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),m=E.useCallback(()=>{const e=c.current,t=f();if(!e||!t||Rd(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=E.useRef(-1);ii(()=>{const e=Zs(m),t=c?.current;if(!t)return;const n=el(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]),ii(()=>{m()});return mr.jsxs(E.Fragment,{children:[mr.jsx("textarea",{value:a,onChange:e=>{l||m();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:o,style:i,...s}),mr.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:{...Ld,...i,paddingTop:0,paddingBottom:0}})]})});function Td({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 Od=E.createContext(void 0);function Id(){return E.useContext(Od)}function _d(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function qd(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Md(e){return Ho("MuiInputBase",e)}const Nd=Uo("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ad;const Dd="mui-auto-fill",jd="mui-auto-fill-cancel",$d=(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${Dr(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},zd=(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]},Fd=Ns("div",{name:"MuiInputBase",slot:"Root",overridesResolver:$d})(Vs(({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",[`&.${Nd.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%"}}]}))),Bd=Ns("input",{name:"MuiInputBase",slot:"Input",overridesResolver:zd})(Vs(({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] + .${Nd.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},[`&.${Nd.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:jd,animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:Dd}}},{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"}}]}})),Wd=function(e){return function(t){return mr.jsx(Us,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({[`@keyframes ${Dd}`]:{from:{animationName:Dd}},[`@keyframes ${jd}`]:{from:{animationName:jd}}}),Hd=E.forwardRef(function(e,t){const n=Gs({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:S,maxRows:w,minRows:x,multiline:k=!1,name:C,onBlur:L,onChange:R,onClick:P,onFocus:T,onKeyDown:O,onKeyUp:I,placeholder:_,readOnly:q,renderSuffix:M,rows:N,size:A,slotProps:D={},slots:j={},startAdornment:$,type:z="text",value:F,...B}=n,W=null!=y.value?y.value:F,{current:H}=E.useRef(null!=W),U=E.useRef(),V=E.useCallback(e=>{},[]),G=ol(U,v,y.ref,V),[K,J]=E.useState(!1),Q=Id(),X=Td({props:n,muiFormControl:Q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});X.focused=Q?Q.focused:K,E.useEffect(()=>{!Q&&d&&K&&(J(!1),L&&L())},[Q,d,K,L]);const Z=Q&&Q.onFilled,Y=Q&&Q.onEmpty,ee=E.useCallback(e=>{!function(e,t=!1){return e&&(qd(e.value)&&""!==e.value||t&&qd(e.defaultValue)&&""!==e.defaultValue)}(e)?Y&&Y():Z&&Z()},[Z,Y]);ii(()=>{H&&ee({value:W})},[W,ee,H]),ii(()=>{if(!i)return;const e=U.current;if(!e)return;const t=Ys(e),n=_d(t),r=null==n||n===t.body||n===t.documentElement;e===n?Q&&Q.onFocus?Q.onFocus():J(!0):r&&e.focus()},[i]);E.useEffect(()=>{ee(U.current)},[]);let te=b,ne=y;k&&"input"===te&&(ne=N?{type:void 0,minRows:N,maxRows:N,...ne}:{type:void 0,maxRows:w,minRows:x,...ne},te=Pd);E.useEffect(()=>{Q&&Q.setAdornedStart(Boolean($))},[Q,$]);const re={...n,color:X.color||"primary",disabled:X.disabled,endAdornment:f,error:X.error,focused:X.focused,formControl:Q,fullWidth:m,hiddenLabel:X.hiddenLabel,multiline:k,size:X.size,startAdornment:$,type:z},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 Ki({root:["root",`color${Dr(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Dr(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"]},Md,t)})(re),ie=j.root||l.Root||Fd,ae=D.root||c.root||{},se=j.input||l.Input||Bd;return ne={...ne,...D.input??c.input},mr.jsxs(E.Fragment,{children:[!p&&"function"==typeof Wd&&(Ad||(Ad=mr.jsx(Wd,{}))),mr.jsxs(ie,{...ae,ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),P&&P(e)},...B,...!Ic(ie)&&{ownerState:{...re,...ae.ownerState}},className:Bo(oe.root,ae.className,a,q&&"MuiInputBase-readOnly"),children:[$,mr.jsx(Od.Provider,{value:null,children:mr.jsx(se,{"aria-invalid":X.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:u,disabled:X.disabled,id:g,onAnimationStart:e=>{ee(e.animationName===jd?U.current:{value:"x"})},name:C,placeholder:_,readOnly:q,required:X.required,rows:N,value:W,onKeyDown:O,onKeyUp:I,type:z,...ne,...!Ic(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:G,className:Bo(oe.input,ne.className,q&&"MuiInputBase-readOnly"),onBlur:e=>{L&&L(e),y.onBlur&&y.onBlur(e),Q&&Q.onBlur?Q.onBlur(e):J(!1)},onChange:(e,...t)=>{if(!H){const t=e.target||U.current;if(null==t)throw new Error(dt(1));ee({value:t.value})}y.onChange&&y.onChange(e,...t),R&&R(e,...t)},onFocus:e=>{T&&T(e),y.onFocus&&y.onFocus(e),Q&&Q.onFocus?Q.onFocus(e):J(!0)}})}),f,M?M({...X,startAdornment:$}):null]})]})});function Ud(e){return Ho("MuiOutlinedInput",e)}const Vd={...Nd,...Uo("MuiOutlinedInput",["root","notchedOutline","input"])},Gd={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Kd={opacity:0,visibility:"hidden"},Jd=E.forwardRef(function(e,t){const n=qs(),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,...b}=e,y=E.useRef(null),v=ol(y,gd(a),t),S=Pc(y,d),w=Pc(y,(e,t)=>{Rc(e);const r=Oc({style:m,timeout:g,easing:s},{mode:"enter"});e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),x=Pc(y,u),k=Pc(y,h),C=Pc(y,e=>{const t=Oc({style:m,timeout:g,easing:s},{mode:"exit"});e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),L=Pc(y,e=>{e.style.transition="",f&&f(e)});return mr.jsx(xl,{appear:i,in:l,nodeRef:y,onEnter:w,onEntered:x,onEntering:S,onExit:C,onExited:L,onExiting:k,addEndListener:e=>{o&&o(y.current,e)},timeout:g,...b,children:(e,{ownerState:t,...n})=>{const r=Tc(e,l,Gd,Kd,m,a.props.style);return E.cloneElement(a,{style:r,ref:v,...n})}})});function Qd(e){return Ho("MuiBackdrop",e)}Uo("MuiBackdrop",["root","invisible"]);const Xd=Ns("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"}}]}),Zd=E.forwardRef(function(e,t){const n=Gs({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 Ki({root:["root",n&&"invisible"]},Qd,t)})(m),b={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[y,v]=Dc("root",{elementType:Xd,externalForwardedProps:b,className:Bo(g.root,o),ownerState:m}),[S,w]=Dc("transition",{elementType:Jd,externalForwardedProps:b,ownerState:m});return mr.jsx(S,{in:s,timeout:f,...h,...w,children:mr.jsx(y,{"aria-hidden":!0,...v,ref:t,children:r})})});function Yd(e){return Ho("MuiBadge",e)}const ep=Uo("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"]),tp=Ns("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),np=Ns("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Dr(n.anchorOrigin.vertical)}${Dr(n.anchorOrigin.horizontal)}${Dr(n.overlap)}`],"default"!==n.color&&t[`color${Dr(n.color)}`],n.invisible&&t.invisible]}})(Vs(({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(Ul(["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:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:({ownerState:e})=>{const{vertical:t,horizontal:n}=e.anchorOrigin,r="circular"===e.overlap?"14%":0;return{"--Badge-translateX":"right"===n?"50%":"-50%","--Badge-translateY":"top"===t?"-50%":"50%",top:"top"===t?r:"initial",bottom:"bottom"===t?r:"initial",right:"right"===n?r:"initial",left:"left"===n?r:"initial",transform:"scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))",transformOrigin:`${"right"===n?"100%":"0%"} ${"top"===t?"0%":"100%"}`,[`&.${ep.invisible}`]:{transform:"scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))"}}}}]})));function rp(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const op=E.forwardRef(function(e,t){const n=Gs({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=Yc({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=Yc({anchorOrigin:rp(r),color:d,overlap:u,variant:y,badgeContent:h}),E=w||null==S&&"dot"!==y,{color:L=d,overlap:R=u,anchorOrigin:P,variant:T=y}=E?C:n,O=rp(P),I="dot"!==T?k:void 0,_={...n,badgeContent:S,invisible:E,max:x,displayValue:I,showZero:b,anchorOrigin:O,color:L,overlap:R,variant:T},q=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Ki({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Dr(n.vertical)}${Dr(n.horizontal)}`,`anchorOrigin${Dr(n.vertical)}${Dr(n.horizontal)}${Dr(o)}`,`overlap${Dr(o)}`,"default"!==t&&`color${Dr(t)}`]},Yd,a)})(_),M={slots:{root:m?.root??s.Root,badge:m?.badge??s.Badge},slotProps:{root:g?.root??l.root,badge:g?.badge??l.badge}},[N,A]=Dc("root",{elementType:tp,externalForwardedProps:{...M,...v},ownerState:_,className:Bo(q.root,o),ref:t,additionalProps:{as:a}}),[D,j]=Dc("badge",{elementType:np,externalForwardedProps:M,ownerState:_,className:q.badge});return mr.jsxs(N,{...A,children:[c,mr.jsx(D,{...j,children:I})]})}),ip=Uo("MuiBox",["root"]),ap=Is(),sp=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=wr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Oo),a=E.forwardRef(function(e,a){const s=No(n),{className:l,component:c="div",...u}=jo(e);return mr.jsx(i,{as:c,ref:a,className:Bo(l,o?o(r):r),theme:t&&s[t]||s,...u})});return a}({themeId:pt,defaultTheme:ap,defaultClassName:ip.root,generateClassName:zo.generate});function lp(e){return Ho("PrivateSwitchBase",e)}Uo("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const cp=Ns(Wl,{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}}]}),up=Ns("input",{name:"MuiSwitchBase",shouldForwardProp:Ms})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),dp=E.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,L]=nl({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),R=Id();let P=a;R&&void 0===P&&(P=R.disabled);const T="checkbox"===S||"radio"===S,O={...e,checked:E,disabled:P,disableFocusRipple:s,edge:l},I=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Ki({root:["root",n&&"checked",r&&"disabled",o&&`edge${Dr(o)}`],input:["input"]},lp,t)})(O),_={slots:x,slotProps:{input:d,...k}},[q,M]=Dc("root",{ref:t,elementType:cp,className:I.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...C},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),R&&R.onFocus&&R.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),R&&R.onBlur&&R.onBlur(e)})(t)}}),ownerState:O,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[N,A]=Dc("input",{ref:p,elementType:up,className:I.input,externalForwardedProps:_,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented||b)return;const t=e.target.checked;L(t),m&&m(e,t)})(t)}}),ownerState:O,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 mr.jsxs(q,{...M,children:[mr.jsx(N,{...A}),E?o:c]})});var pp=Xs(mr.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"})),fp=Xs(mr.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"})),hp=Xs(mr.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"}));function mp(e){return Ho("MuiCheckbox",e)}const gp=Uo("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),bp=Ns(dp,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Dr(n.size)}`],"default"!==n.color&&t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{[`&.${gp.checked}, &.${gp.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${gp.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),yp=mr.jsx(fp,{}),vp=mr.jsx(pp,{}),Sp=mr.jsx(hp,{}),wp=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiCheckbox"}),{checkedIcon:r=yp,color:o="primary",icon:i=vp,indeterminate:a=!1,indeterminateIcon:s=Sp,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=Ki({root:["root",n&&"indeterminate",`color${Dr(r)}`,`size${Dr(o)}`]},mp,t);return{...t,...i}})(b),v=f.input??l,[S,w]=Dc("root",{ref:t,elementType:bp,className:Bo(y.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:f,...h},ownerState:b,additionalProps:{type:"checkbox",icon:E.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:E.cloneElement(g,{fontSize:g.props.fontSize??c}),disableRipple:u,slots:p,slotProps:{input:il("function"==typeof v?v(b):v,{"data-indeterminate":a,"aria-checked":a?"mixed":void 0})}}});return mr.jsx(S,{...w,classes:y})});function xp(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function kp(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Cp(e){return parseFloat(el(e).getComputedStyle(e).paddingRight)||0}function Ep(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&&kp(e,o)})}function Lp(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Rp(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ys(e);return t.body===e?el(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=xp(el(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Cp(r)+e}px`;const t=Ys(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Cp(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Ys(r).body;else{const t=r.parentElement,n=el(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 Pp="data-mui-focusable";const Tp=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Op(e){const t=[],n=[];return Array.from(e.querySelectorAll(Tp)).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 Ip(){return!0}function _p(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Op,isEnabled:a=Ip,open:s}=e,l=E.useRef(!1),c=E.useRef(null),u=E.useRef(null),d=E.useRef(null),p=E.useRef(null),f=E.useRef(!1),h=E.useRef(null),m=ol(gd(t),h),g=E.useRef(null);E.useEffect(()=>{s&&h.current&&(f.current=!n)},[n,s]),E.useEffect(()=>{if(l.current=!1,!s||!h.current)return;const e=_d(Ys(h.current)),t=((n=h.current)?n.hasAttribute(Pp)?n:n.querySelector(`[${Pp}]`):null)??h.current;var n;return Zc(h.current,e)||(t.hasAttribute("tabIndex")||t.setAttribute("tabIndex","-1"),f.current&&t.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),E.useEffect(()=>{if(!s||!h.current)return;const e=Ys(h.current),t=t=>{if(g.current=t,r||!a()||"Tab"!==t.key)return;_d(e)===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.current;if(null===t)return;const n=_d(e);if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(Zc(t,n))return;if(r&&n!==c.current&&n!==u.current)return;if(n!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let o=[];if(n!==c.current&&n!==u.current||(o=i(h.current)),o.length>0){const e=Boolean(g.current?.shiftKey&&"Tab"===g.current?.key),t=o[0],n=o[o.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{const t=_d(e);t&&"BODY"===t.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 mr.jsxs(E.Fragment,{children:[mr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),E.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)}}),mr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}const qp=()=>{},Mp=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&&kp(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);Ep(t,e.mount,e.modalRef,r,!0);const o=Lp(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=Lp(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=Rp(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Lp(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&&kp(e.modalRef,t),Ep(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&&kp(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Np(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=E.useRef({}),p=E.useRef(null),f=E.useRef(null),h=ol(f,u),[m,g]=E.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),S=()=>{Mp.mount(v(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},w=rl(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Ys(p.current).body;Mp.add(v(),e),f.current&&S()}),x=()=>Mp.isTopModal(v()),k=rl(e=>{p.current=e,e&&(c&&x()?S():f.current&&kp(f.current,y))}),C=E.useCallback(()=>{Mp.remove(v(),y)},[y]);E.useEffect(()=>()=>{C()},[C]),E.useEffect(()=>{c?w():b&&o||C()},[c,C,b,o,w]);const L=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&x()&&(n||(t.stopPropagation(),l&&l(t,"escapeKeyDown")))},R=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Mc(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:L(r),ref:h}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:R(t),open:c}},getTransitionProps:()=>({onEnter:Hs(()=>{g(!1),i&&i()},s?.props.onEnter??qp),onExited:Hs(()=>{g(!0),a&&a(),o&&C()},s?.props.onExited??qp)}),rootRef:h,portalRef:k,isTopModal:x,exited:m,hasTransition:b}}function Ap(e){return Ho("MuiModal",e)}Uo("MuiModal",["root","hidden","backdrop"]);const Dp=Ns("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Vs(({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"}}]}))),jp=Ns(Zd,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),$p=E.forwardRef(function(e,t){const n=Gs({name:"MuiModal",props:e}),{BackdropComponent:r=jp,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:S=!1,onClose:w,onTransitionEnter:x,onTransitionExited:k,open:C,slotProps:L={},slots:R={},theme:P,...T}=n,O={...n,closeAfterTransition:s,disableAutoFocus:f,disableEnforceFocus:h,disableEscapeKeyDown:m,disablePortal:g,disableRestoreFocus:b,disableScrollLock:y,hideBackdrop:v,keepMounted:S},{getRootProps:I,getBackdropProps:_,getTransitionProps:q,portalRef:M,isTopModal:N,exited:A,hasTransition:D}=Np({...O,rootRef:t}),j={...O,exited:A},$=(e=>{const{open:t,exited:n,classes:r}=e;return Ki({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ap,r)})(j),z={};if(void 0===l.props.tabIndex&&(z.tabIndex="-1"),D){const{onEnter:e,onExited:t}=q();z.onEnter=e,z.onExited=t}const F={slots:{root:d.Root,backdrop:d.Backdrop,...R},slotProps:{...p,...L}},[B,W]=Dc("root",{ref:t,elementType:Dp,externalForwardedProps:{...F,...T,component:u},getSlotProps:I,ownerState:j,className:Bo(a,$?.root,!j.open&&j.exited&&$?.hidden)}),[H,U]=Dc("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:F,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>_({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:Bo(o?.className,$?.backdrop),ownerState:j});return S||C||D&&!A?mr.jsx(bd,{ref:M,container:c,disablePortal:g,children:mr.jsxs(B,{...W,children:[!v&&r?mr.jsx(H,{...U}):null,mr.jsx(_p,{disableEnforceFocus:h,disableAutoFocus:f,disableRestoreFocus:b,isEnabled:N,open:C,children:E.cloneElement(l,z)})]})}):null});function zp(e){return Ho("MuiDivider",e)}const Fp=Uo("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Bp=Ns("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]}})(Vs(({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.alpha((e.vars||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%"}}}]}))),Wp=Ns("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(Vs(({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)`}}]}))),Hp=E.forwardRef(function(e,t){const n=Gs({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 Ki({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"]},zp,r)})(h);return mr.jsx(Bp,{as:s,className:Bo(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...f,children:o?mr.jsx(Wp,{className:m.wrapper,ownerState:h,children:o}):null})});function Up(e){return Ho("MuiFormControlLabel",e)}Hp&&(Hp.muiSkipListHighlight=!0);const Vp=Uo("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Gp=Ns("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Vp.label}`]:t.label},t.root,t[`labelPlacement${Dr(n.labelPlacement)}`]]}})(Vs(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Vp.disabled}`]:{cursor:"default"},[`& .${Vp.label}`]:{[`&.${Vp.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}}]}))),Kp=Ns("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Vs(({theme:e})=>({[`&.${Vp.error}`]:{color:(e.vars||e).palette.error.main}}))),Jp=E.forwardRef(function(e,t){const n=Gs({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=Id(),S=s??a.props.disabled??v?.disabled,w=h??a.props.required,x={disabled:S,required:w};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===a.props[e]&&void 0!==n[e]&&(x[e]=n[e])});const k=Td({props:n,muiFormControl:v,states:["error"]}),C={...n,disabled:S,labelPlacement:d,required:w,error:k.error},L=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Ki({root:["root",n&&"disabled",`labelPlacement${Dr(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},Up,t)})(C),R={slots:m,slotProps:{...i,...g}},[P,T]=Dc("typography",{elementType:Xc,externalForwardedProps:R,ownerState:C});let O=u;return null==O||O.type===Xc||l||(O=mr.jsx(P,{component:"span",...T,className:Bo(L.label,T?.className),children:O})),mr.jsxs(Gp,{className:Bo(L.root,o),ownerState:C,ref:t,...y,children:[E.cloneElement(a,x),w?mr.jsxs("div",{children:[O,mr.jsxs(Kp,{ownerState:C,"aria-hidden":!0,className:L.asterisk,children:[" ","*"]})]}):O]})}),Qp=function(e={}){const{createStyledComponent:t=pa,useThemeProps:n=fa,useTheme:r=No,componentName:o="MuiGrid"}=e;function i(e,t,n=()=>!0){const r={};return null===e||(Array.isArray(e)?e.forEach((e,o)=>{null!==e&&n(e)&&t.keys[o]&&(r[t.keys[o]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{const o=e[t];null!=o&&n(o)&&(r[t]=o)}):r[t.keys[0]]=e),r}const a=t(ra,ia,oa,ta,aa,sa,na),s=E.forwardRef(function(e,t){const s=r(),l=jo(n(e));!function(e,t){void 0!==e.item&&delete e.item,void 0!==e.zeroMinWidth&&delete e.zeroMinWidth,t.keys.forEach(t=>{void 0!==e[t]&&delete e[t]})}(l,s.breakpoints);const{className:c,children:u,columns:d=12,container:p=!1,component:f="div",direction:h="row",wrap:m="wrap",size:g={},offset:b={},spacing:y=0,rowSpacing:v=y,columnSpacing:S=y,unstable_level:w=0,...x}=l,k=i(g,s.breakpoints,e=>!1!==e),C=i(b,s.breakpoints),L=e.columns??(w?void 0:d),R=e.spacing??(w?void 0:y),P=e.rowSpacing??e.spacing??(w?void 0:v),T=e.columnSpacing??e.spacing??(w?void 0:S),O={...l,level:w,columns:L,container:p,direction:h,wrap:m,spacing:R,rowSpacing:P,columnSpacing:T,size:k,offset:C},I=((e,t)=>{const{container:n,direction:r,spacing:i,wrap:a,size:s}=e;return Ki({root:["root",n&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...ua(r),...la(s),...n?ca(i,t.breakpoints.keys[0]):[]]},e=>Ho(o,e),{})})(O,s);return mr.jsx(a,{ref:t,as:f,ownerState:O,className:Bo(I.root,c),...x,children:E.Children.map(u,e=>E.isValidElement(e)&&Ji(e,["Grid"])&&p&&e.props.container?E.cloneElement(e,{unstable_level:e.props?.unstable_level??w+1}):e)})});return s.muiName="Grid",s}({createStyledComponent:Ns("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>Gs({props:e,name:"MuiGrid"}),useTheme:qs});function Xp(e){return`scale(${e}, ${e**2})`}const Zp={entering:{opacity:1,transform:Xp(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:Xp(.75)},exited:{opacity:0,transform:Xp(.75)}},Yp={opacity:0,transform:Xp(.75),visibility:"hidden"},ef=E.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",...m}=e,g=_l(),b=E.useRef(),y=qs(),v=E.useRef(null),S=ol(v,gd(o),t),w=Pc(v,c),x=Pc(v,(e,t)=>{Rc(e);const{duration:n,delay:r,easing:o}=Oc({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),k=Pc(v,l),C=Pc(v,p),L=Pc(v,e=>{const{duration:t,delay:n,easing:r}=Oc({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:.666*o,delay:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=Xp(.75),u&&u(e)}),R=Pc(v,e=>{e.style.transition="",d&&d(e)});return mr.jsx(xl,{appear:r,in:a,nodeRef:v,onEnter:x,onEntered:k,onEntering:w,onExit:L,onExited:R,onExiting:C,addEndListener:e=>{"auto"===h&&g.start(b.current||0,e),n&&n(v.current,e)},timeout:"auto"===h?null:h,...m,children:(e,{ownerState:t,...n})=>{const r=Tc(e,a,Zp,Yp,f,o.props.style);return E.cloneElement(o,{style:r,ref:S,...n})}})});function tf(e){return Ho("MuiIcon",e)}ef&&(ef.muiSupportAuto=!0),Uo("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nf=Ns("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Dr(n.color)}`],t[`fontSize${Dr(n.fontSize)}`]]}})(Vs(({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(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),rf=E.forwardRef(function(e,t){const n=Gs({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 Ki({root:["root","inherit"!==t&&`color${Dr(t)}`,`fontSize${Dr(n)}`]},tf,r)})(c);return mr.jsx(nf,{as:a,className:Bo(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t,...l})});function of(e){return Ho("MuiInputAdornment",e)}rf.muiName="Icon";const af=Uo("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var sf;const lf=Ns("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Dr(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(Vs(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${af.positionStart}&:not(.${af.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),cf=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=Id()||{};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 Ki({root:["root",n&&"disablePointerEvents",o&&`position${Dr(o)}`,a,r&&"hiddenLabel",i&&`size${Dr(i)}`]},of,t)})(f);return mr.jsx(Od.Provider,{value:null,children:mr.jsx(lf,{as:i,ownerState:f,className:Bo(h.root,o),ref:t,...u,children:"string"!=typeof r||s?mr.jsxs(E.Fragment,{children:["start"===l?sf||(sf=mr.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,r]}):mr.jsx(Xc,{color:"textSecondary",children:r})})})}),uf=E.createContext({});function df(e){return Ho("MuiList",e)}Uo("MuiList",["root","padding","dense","subheader"]);const pf=Ns("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}}]}),ff=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l,...c}=n,u=E.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 Ki({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},df,t)})(d);return mr.jsx(uf.Provider,{value:u,children:mr.jsxs(pf,{as:i,className:Bo(p.root,o),ref:t,ownerState:d,...c,children:[l,r]})})});function hf(e){return Ho("MuiListItem",e)}Uo("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const mf=Uo("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function gf(e){return Ho("MuiListItemSecondaryAction",e)}Uo("MuiListItemSecondaryAction",["root","disableGutters"]);const bf=Ns("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}}]}),yf=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=E.useContext(uf),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Ki({root:["root",t&&"disableGutters"]},gf,n)})(a);return mr.jsx(bf,{className:Bo(s.root,r),ownerState:a,ref:t,...o})});yf.muiName="ListItemSecondaryAction";const vf=Ns("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]}})(Vs(({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:{[`& > .${mf.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}}]}))),Sf=Ns("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),wf=E.forwardRef(function(e,t){const n=Gs({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,S=E.useContext(uf),w=E.useMemo(()=>({dense:p||S.dense||!1,alignItems:r,disableGutters:f}),[r,S.dense,p,f]),x=E.useRef(null),k=E.Children.toArray(o),C=k.length&&Ji(k[k.length-1],["ListItemSecondaryAction"]),L={...n,alignItems:r,dense:w.dense,disableGutters:f,disablePadding:h,divider:m,hasSecondaryAction:C},R=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Ki({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},hf,n)})(L),P=ol(x,t),T={slots:y,slotProps:b},[O,I]=Dc("secondaryAction",{elementType:yf,externalForwardedProps:T,ownerState:L,className:R.secondaryAction}),_=y.root||s.Root||vf,q=b.root||l.root||{},M={className:Bo(R.root,q.className,i),...v};let N=a||"li";return C?(N=M.component||a?N:"div","li"===c&&("li"===N?N="div":"li"===M.component&&(M.component="div")),mr.jsx(uf.Provider,{value:w,children:mr.jsxs(Sf,{as:c,className:Bo(R.container,u),ref:P,ownerState:L,...d,children:[mr.jsx(_,{...q,...!Ic(_)&&{as:N,ownerState:{...L,...q.ownerState}},...M,children:k}),k.pop()]})})):mr.jsx(uf.Provider,{value:w,children:mr.jsxs(_,{...q,as:N,ref:P,...!Ic(_)&&{ownerState:{...L,...q.ownerState}},...M,children:[k,g&&mr.jsx(O,{...I,children:g})]})})});function xf(e){return Ho("MuiListItemIcon",e)}const kf=Uo("MuiListItemIcon",["root","alignItemsFlexStart"]),Cf=Ns("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(Vs(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ef=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiListItemIcon"}),{className:r,...o}=n,i=E.useContext(uf),a={...n,alignItems:i.alignItems},s=(e=>{const{alignItems:t,classes:n}=e;return Ki({root:["root","flex-start"===t&&"alignItemsFlexStart"]},xf,n)})(a);return mr.jsx(Cf,{className:Bo(s.root,r),ownerState:a,ref:t,...o})}),Lf=Uo("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Rf(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Pf(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Tf(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 Of(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")&&Tf(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const If=E.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=E.useRef(null),f=E.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ii(()=>{r&&p.current.focus()},[r]),E.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${xp(el(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}}),[]);const h=ol(p,t);let m=-1;E.Children.forEach(i,(e,t)=>{E.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=E.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),E.cloneElement(e,t)}return e});return mr.jsx(ff,{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=_d(Ys(t));if("ArrowDown"===n)e.preventDefault(),Of(t,r,l,s,Rf);else if("ArrowUp"===n)e.preventDefault(),Of(t,r,l,s,Pf);else if("Home"===n)e.preventDefault(),Of(t,null,l,s,Rf);else if("End"===n)e.preventDefault(),Of(t,null,l,s,Pf);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&&Tf(r,o);o.previousKeyMatched&&(l||Of(t,r,!1,s,Rf,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...d,children:g})});function _f(e){return Ho("MuiPopover",e)}function qf(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Mf(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Nf(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function Af(e){return"function"==typeof e?e():e}Uo("MuiPopover",["root","paper"]);const Df=Ns($p,{name:"MuiPopover",slot:"Root"})({}),jf=Ns(zc,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$f=E.forwardRef(function(e,t){const n=Gs({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:S={},disableScrollLock:w=!1,...x}=n,k=E.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:d,marginThreshold:p,transformOrigin:b,TransitionComponent:y,transitionDuration:v,TransitionProps:S},L=(e=>{const{classes:t}=e;return Ki({root:["root"],paper:["paper"]},_f,t)})(C),R=E.useCallback(()=>{if("anchorPosition"===s)return a;const e=Af(o),t=(e&&1===e.nodeType?e:Ys(k.current).body).getBoundingClientRect();return{top:t.top+qf(t,i.vertical),left:t.left+Mf(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),P=E.useCallback(e=>({vertical:qf(e,b.vertical),horizontal:Mf(e,b.horizontal)}),[b.horizontal,b.vertical]),T=E.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===s)return{top:null,left:null,transformOrigin:Nf(n)};const r=R();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,c=a+t.width,u=el(Af(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:Nf(n)}},[o,s,R,P,p]),[O,I]=E.useState(f),_=E.useCallback(()=>{const e=k.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,I(!0)},[T]);E.useEffect(()=>(w&&window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)),[o,w,_]);E.useEffect(()=>{f&&_()}),E.useImperativeHandle(r,()=>f?{updatePosition:()=>{_()}}:null,[f,_]),E.useEffect(()=>{if(!f)return;const e=Zs(()=>{_()}),t=el(Af(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,f,_]);let q=v;const M={slots:{transition:y,...m},slotProps:{transition:S,paper:h,...g}},[N,A]=Dc("transition",{elementType:ef,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),_()},onExited:t=>{e.onExited?.(t),I(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==v||N.muiSupportAuto||(q=void 0);const D=u||(o?Ys(Af(o)).body:void 0),[j,{slots:$,slotProps:z,...F}]=Dc("root",{ref:t,elementType:Df,externalForwardedProps:{...M,...x},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:il("function"==typeof g.backdrop?g.backdrop(C):g.backdrop,{invisible:!0})},container:D,open:f},ownerState:C,className:Bo(L.root,c)}),[B,W]=Dc("paper",{ref:k,className:L.paper,elementType:jf,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:O?void 0:{opacity:0}},ownerState:C});return mr.jsx(j,{...F,...!Ic(j)&&{slots:$,slotProps:z,disableScrollLock:w},children:mr.jsx(N,{...A,timeout:q,children:mr.jsx(B,{...W,children:l})})})});function zf(e){return Ho("MuiMenuItem",e)}const Ff=Uo("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Bf=E.createContext(null);var Wf;Bf.Provider;const Hf=Ns("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Uf=Ns("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})(Vs(({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 Vf=Ns(Fd,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:$d})(Vs(({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 .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Vd.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Vd.focused} .${Vd.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{[`&.${Vd.focused} .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Vd.error} .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Vd.disabled} .${Vd.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"}}]}})),Gf=Ns(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 mr.jsx(Hf,{"aria-hidden":!0,className:r,ownerState:l,...a,children:mr.jsx(Uf,{ownerState:l,children:s?mr.jsx("span",{children:o}):Wf||(Wf=mr.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Vs(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Kf=Ns(Bd,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zd})(Vs(({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}}]}))),Jf=E.forwardRef(function(e,t){const n=Gs({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=Ki({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ud,t);return{...t,...n}})(n),h=Id(),m=Td({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??Vf,y=c.input??r.Input??Kf,[v,S]=Dc("notchedOutline",{elementType:Gf,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:c,slotProps:u},additionalProps:{label:null!=a&&""!==a&&m.required?mr.jsxs(E.Fragment,{children:[a," ","*"]}):a}});return mr.jsx(Hd,{slots:{root:b,input:y},slotProps:u,renderSuffix:e=>mr.jsx(v,{...S,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}})});Jf.muiName="Input";const Qf=Ns(Wl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(Vs(({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"}},[`&.${Ff.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Ff.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Ff.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Ff.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ff.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Fp.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Fp.inset}`]:{marginLeft:52},[`& .${Lf.root}`]:{marginTop:0,marginBottom:0},[`& .${Lf.inset}`]:{paddingLeft:36},[`& .${kf.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,[`& .${kf.root} svg`]:{fontSize:"1.25rem"}}}]}))),Xf=E.forwardRef(function(e,t){const n=Gs({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=E.useContext(Bf),h=E.useContext(uf),m=E.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=E.useRef(null);ii(()=>{r&&g.current&&function(e,t){if(null!=t)try{e.focus({focusVisible:"keyboard"===t})}catch(t){e.focus()}else e.focus()}(g.current,f)},[r]);const b={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Ki({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},zf,a);return{...a,...s}})(n),v=ol(g,t),{root:S,...w}=y;let x;return n.disabled||(x=void 0!==u?u:-1),mr.jsx(uf.Provider,{value:m,children:mr.jsx(Qf,{ref:v,role:c,tabIndex:x,component:o,focusVisibleClassName:Bo(y.focusVisible,l),className:Bo(y.root,d),...p,ownerState:b,classes:w})})});var Zf=Xs(mr.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"})),Yf=Xs(mr.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"}));const eh=Ns("span",{name:"MuiRadioButtonIcon",shouldForwardProp:Ms})({position:"relative",display:"flex"}),th=Ns(Zf,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),nh=Ns(Yf,{name:"MuiRadioButtonIcon"})(Vs(({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 rh(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o={...e,checked:t};return mr.jsxs(eh,{className:n.root,ownerState:o,children:[mr.jsx(th,{fontSize:r,className:n.background,ownerState:o}),mr.jsx(nh,{fontSize:r,className:n.dot,ownerState:o})]})}const oh=E.createContext(void 0);function ih(e){return Ho("MuiRadio",e)}const ah=Uo("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),sh=Ns(dp,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t[`size${Dr(n.size)}`],t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${ah.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));const lh=mr.jsx(rh,{checked:!0}),ch=mr.jsx(rh,{}),uh=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiRadio"}),{checked:r,checkedIcon:o=lh,color:i="primary",icon:a=ch,name:s,onChange:l,size:c="medium",className:u,disabled:d,disableRipple:p=!1,slots:f={},slotProps:h={},inputProps:m,...g}=n,b=Id();let y=d;b&&void 0===y&&(y=b.disabled),y??=!1;const v={...n,disabled:y,disableRipple:p,color:i,size:c},S=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root",`color${Dr(n)}`,"medium"!==r&&`size${Dr(r)}`]};return{...t,...Ki(o,ih,t)}})(v),w=E.useContext(oh);let x=r;const k=Hs(l,w&&w.onChange);let C=s;w&&(void 0===x&&(x=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(w.value,n.value)),void 0===C&&(C=w.name));const L=h.input??m,[R,P]=Dc("root",{ref:t,elementType:sh,className:Bo(S.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),k(t,...n)}}),ownerState:v,additionalProps:{type:"radio",icon:E.cloneElement(a,{fontSize:a.props.fontSize??c}),checkedIcon:E.cloneElement(o,{fontSize:o.props.fontSize??c}),disabled:y,name:C,checked:x,slots:f,slotProps:{input:"function"==typeof L?L(v):L}}});return mr.jsx(R,{...P,classes:S})});function dh(e){return Ho("MuiTooltip",e)}const ph=Uo("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const fh=Ns(Cd,{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]}})(Vs(({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"] .${ph.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ph.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ph.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ph.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${ph.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${ph.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${ph.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${ph.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),hh=Ns("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${Dr(n.placement.split("-")[0])}`]]}})(Vs(({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(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,[`.${ph.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${ph.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ph.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:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${ph.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${ph.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t})),mh=Ns("span",{name:"MuiTooltip",slot:"Arrow"})(Vs(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let gh=!1;const bh=new Il;let yh={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Sh=E.forwardRef(function(e,t){const n=Gs({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:S,onOpen:w,open:x,placement:k="bottom",PopperComponent:C,PopperProps:L={},slotProps:R={},slots:P={},title:T,TransitionComponent:O,TransitionProps:I,..._}=n,q=E.isValidElement(o)?o:mr.jsx("span",{children:o}),M=qs(),N=Ei(),[A,D]=E.useState(),[j,$]=E.useState(null),z=E.useRef(!1),F=d||g,B=_l(),W=_l(),H=_l(),U=_l(),[V,G]=nl({controlled:x,default:!1,name:"Tooltip",state:"open"});let K=V;const J=Ii(b),Q=E.useRef(),X=rl(()=>{void 0!==Q.current&&(document.body.style.WebkitUserSelect=Q.current,Q.current=void 0),U.clear()});E.useEffect(()=>X,[X]);const Z=e=>{bh.clear(),gh=!0,G(!0),w&&!K&&w(e)},Y=rl(e=>{bh.start(800+y,()=>{gh=!1}),G(!1),S&&K&&S(e),B.start(M.transitions.duration.shortest,()=>{z.current=!1})}),ee=e=>{z.current&&"touchstart"!==e.type||(A&&A.removeAttribute("title"),W.clear(),H.clear(),f||gh&&h?W.start(gh?h:f,()=>{Z(e)}):Z(e))},te=e=>{W.clear(),H.start(y,()=>{Y(e)})},[,ne]=E.useState(!1),re=e=>{const t=e?.target??A;if(!t||!al(t)){ne(!1);const n=e??new Event("blur");!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),te(n)}},oe=e=>{A||D(e.currentTarget),al(e.target)&&(ne(!0),ee(e))},ie=e=>{z.current=!0;const t=q.props;t.onTouchStart&&t.onTouchStart(e)},ae=e=>{ie(e),H.clear(),B.clear(),X(),Q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(m,()=>{document.body.style.WebkitUserSelect=Q.current,ee(e)})},se=e=>{q.props.onTouchEnd&&q.props.onTouchEnd(e),X(),H.start(v,()=>{Y(e)})};E.useEffect(()=>{if(K)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Y(e)}},[Y,K]);const le=ol(gd(q),D,t);T||0===T||(K=!1);const ce=E.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,..._,...q.props,className:Bo(_.className,q.props.className),onTouchStart:ie,ref:le,...g?{onMouseMove:e=>{const t=q.props;t.onMouseMove&&t.onMouseMove(e),yh={x:e.clientX,y:e.clientY},ce.current&&ce.current.update()}}:{}},fe={};p||(pe.onTouchStart=ae,pe.onTouchEnd=se),u||(pe.onMouseOver=vh(ee,pe.onMouseOver),pe.onMouseLeave=vh(te,pe.onMouseLeave),F||(fe.onMouseOver=ee,fe.onMouseLeave=te)),c||(pe.onFocus=vh(oe,pe.onFocus),pe.onBlur=vh(re,pe.onBlur),F||(fe.onFocus=oe,fe.onBlur=re));const he={...n,isRtl:N,arrow:r,disableInteractive:F,placement:k,PopperComponentProp:C,touch:z.current},me="function"==typeof R.popper?R.popper(he):R.popper,ge=E.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(j),options:{element:j,padding:4}}];return L.popperOptions?.modifiers&&(e=e.concat(L.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...L.popperOptions,...me?.popperOptions,modifiers:e}},[j,L.popperOptions,me?.popperOptions]),be=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Ki({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Dr(i.split("-")[0])}`],arrow:["arrow"]},dh,t)})(he),ye="function"==typeof R.transition?R.transition(he):R.transition,ve={slots:{popper:a.Popper,transition:a.Transition??O,tooltip:a.Tooltip,arrow:a.Arrow,...P},slotProps:{arrow:R.arrow??s.arrow,popper:{...L,...me??s.popper},tooltip:R.tooltip??s.tooltip,transition:{...I,...ye??s.transition}}},[Se,we]=Dc("popper",{elementType:fh,externalForwardedProps:ve,ownerState:he,className:Bo(be.popper,L?.className)}),[xe,ke]=Dc("transition",{elementType:ef,externalForwardedProps:ve,ownerState:he}),[Ce,Ee]=Dc("tooltip",{elementType:hh,className:be.tooltip,externalForwardedProps:ve,ownerState:he}),[Le,Re]=Dc("arrow",{elementType:mh,className:be.arrow,externalForwardedProps:ve,ownerState:he,ref:$});return mr.jsxs(E.Fragment,{children:[E.cloneElement(q,pe),mr.jsx(Se,{as:C??Cd,placement:k,anchorEl:g?{getBoundingClientRect:()=>({top:yh.y,left:yh.x,right:yh.x,bottom:yh.y,width:0,height:0})}:A,popperRef:ce,open:!!A&&K,id:J,transition:!0,...fe,...we,popperOptions:ge,children:({TransitionProps:e})=>mr.jsx(xe,{timeout:M.transitions.duration.shorter,...e,...ke,children:mr.jsxs(Ce,{...Ee,children:[T,r?mr.jsx(Le,{...Re}):null]})})})]})});function wh(){const{useModelStore:e}=E.useContext(wc).modelStore;return e()}function xh(e,t,...n){const r=t?`${t.id}/${JSON.stringify(e)}`:null,[o]=wh(),[i]=function(){const{useRpcRequestSessionModelStore:e}=E.useContext(wc).modelStore;return e()}(),[a,s]=E.useState();return E.useEffect(()=>{if(!t)return;(async()=>{let n=i.get(r);n||(n=t.createSessionObject(e),i.set(r,n));const a=await n;o.set(r,a),s(a)})()},[t,...n]),[a]}const kh={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ch(e){return xh(kh,e)}const Eh=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=c(c({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:c({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=c(c({},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 Lh(e,t){const n=e?`${e.id}`:null,[r]=function(){const{useRpcResultStore:e}=E.useContext(wc).modelStore;return e()}(),[o,i]=E.useReducer(Eh,n?r.get(n):null),[a]=function(){const{useModelChangedStore:e}=E.useContext(wc).modelStore;return e()}(),[s]=function(){const{useRpcRequestStore:e}=E.useContext(wc).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(s=0,new Promise(e=>{setTimeout(e,s)}));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))}var s},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 E.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 Rh(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Lh(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 Ph(e){return Lh(e,"getAppLayout")}function Th(){const[e,t]=E.useState(),[n,r]=E.useState(),o=E.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 E.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]}const Oh="singlepublic-pinnedItems",Ih=e=>{var t;const[n]=(e=>{const[t,n]=E.useState(null),[r,o]=E.useState(null),[i]=wh();return E.useEffect(()=>{let t=!0,r=()=>{};if(e)return async function(){try{const a=`${e.id}-${Oh}`;let s=i.get(a);if(!s){if(s=await(async(e,t)=>{var n;const r=!(null===(n=(await e.getLayout()).permissions)||void 0===n||!n.createMasterobject);let o=null;try{o=r?await e.getOrCreateObject({qInfo:{qType:"singlepublic",qId:t}}):await e.getObject(t)}catch(e){}return o})(e,Oh),!t)return;if(s){i.set(a,s);const e=()=>{i.clear(a)};s.once("closed",e),r=()=>{s.removeListener("closed",e)}}}t&&(o(null),n(s))}catch(e){t&&(o(e instanceof Error?e:new Error(String(e))),n(null))}}(),()=>{t=!1,r()}},[e,i]),[t,r]})(e),[r]=Lh(n,"getLayout");return[null!==(t=null==r?void 0:r.pinnedItems)&&void 0!==t?t:[]]},_h=(e,t,n)=>{const[r,o]=E.useState(void 0),[i,a]=E.useState(void 0),[s]=wh();return E.useEffect(()=>{let r=!0,i=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const l=`${e.id}-${t}`;let c=s.get(l);if(!c){try{c=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!n)throw t;c=await e.createSessionObject(n)}if(!r)return;s.set(l,c);const o=()=>{s.clear(l)};c.once("closed",o),i=()=>{c.removeListener("closed",o)}}r&&(a(void 0),o(c))}catch(e){r&&(a(e instanceof Error?e:new Error(String(e))),o(void 0))}}(),()=>{r=!1,i()}},[e,t,s]),[r,i]},qh={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Mh={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Nh="qField",Ah="id",Dh=(e,t)=>{const n=e.selections[0],r=t.selections[0],o=!!n.qOneAndOnlyOne;return o===!!r.qOneAndOnlyOne?n.qSortIndex-r.qSortIndex:o?-1:1},jh=(e,t,n,r)=>{if(!e||!r)return n;if(0===e.length||0===t.length&&0===n.length)return[];const o=((e,t,n)=>n.filter(n=>Nh in n&&n[Nh]?e.some(e=>e.qName===n[Nh]):!(!(Ah in n)||!n[Ah])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ah]&&"N"===(null===(r=e.qData)||void 0===r?void 0:r.grouping)})))(e,r,t),i=[],a=[...n];for(let e=0;e<o.length;e++){var s;const t=o[e],n=!(!(Ah in t)||!t[Ah]),l=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ah]}):null,u=n?null==l||null===(s=l.qData)||void 0===s||null===(s=s.info[0])||void 0===s?void 0:s.qName:t[Nh],d=a.findIndex(e=>{var r;return n&&(null===(r=e.selections[0].qDimensionReferences)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qId)===t[Ah]||!n&&(e.selections[0].qField===u||e.selections[0].qReadableName===u)});if(!(-1!==i.findIndex(e=>{var t;return(null===(t=e.selections)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.qField)===u&&!e.isPinned})))if(-1===d){const t=c(c({},o[e]),{},{isPinned:!0,states:["$"]});n&&l&&(t.qField=u,t.qName=l.qData.labelExpression||l.qData.title||u),i.push(t)}else i.push(a[d]),a.splice(d,1)}return[...i,...a]};function $h(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function zh({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=c({fontSize:$h(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return mr.jsx("i",{style:o,children:mr.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor",children:r.map(({type:e,attrs:t},n)=>mr.jsx(e,c({},t),n))})})}var Fh=e=>zh((e=>c(c({},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 Bh=e=>zh((e=>c(c({},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 Wh=e=>c(c({},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 Hh=e=>zh(Wh(e));var Uh=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}}(),Vh=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},Gh=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=Vh(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},Vh(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),Uh(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}(E.PureComponent);const Kh=["S","XS"],Jh=e=>e.reduce((e,t)=>e.concat(t));function Qh(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!Kh.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return Jh(t)}async function Xh({selections:e,elemNumbers:t,toggle:n,isSingleSelect:r}){if(0===t.length)return!1;let o=!1;if(!t.some(e=>Number.isNaN(e))){const i=t;try{o=!1!==await e.select({method:"selectListObjectValues",params:["/qListObjectDef",i,n]})}catch(e){o=!1}o||(r?e.cancel():e.clear())}return o}const Zh="RowColumn",Yh={row:`${Zh}-row`,rowBorderBottom:`${Zh}-rowBorderBottom`,column:`${Zh}-column`,fieldRoot:`${Zh}-fieldRoot`,cell:`${Zh}-cell`,labelText:`${Zh}-labelText`,labelDense:`${Zh}-labelDense`,highlighted:`${Zh}-highlighted`,checkboxLabel:`${Zh}-checkboxLabel`,icon:`${Zh}-icon`,S:`${Zh}-S`,XS:`${Zh}-XS`,A:`${Zh}-A`,X:`${Zh}-X`,frequencyCount:`${Zh}-frequencyCount`,barContainer:`${Zh}-barContainer`,bar:`${Zh}-bar`,barSelected:`${Zh}-barSelected`,barWithCheckbox:`${Zh}-barWithCheckbox`,barSelectedWithCheckbox:`${Zh}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${Zh}-excludedTextWithCheckbox`},em=`.${Yh.fieldRoot}`,tm=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function nm({selectionState:e,selections:t,checkboxes:n=!1,doc:r=document,loaderRef:o}){var i;const a=E.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});E.useEffect(()=>{var e;if(null===(e=o.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(),i=o.current._listRef._outerRef;return i.addEventListener("gesturestart",t),i.addEventListener("gesturechange",n),i.addEventListener("gestureend",r),()=>{i.removeEventListener("gesturestart",t),i.removeEventListener("gesturechange",n),i.removeEventListener("gestureend",r)}},[null===(i=o.current)||void 0===i||null===(i=i._listRef)||void 0===i?void 0:i._outerRef]);const s=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),Xh({selections:t,elemNumbers:a.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:a.current.toggle}))},l=(t,n)=>{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 Jh(t)}(e.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)}([t,n],r)},c=t=>{const{startElemNumber:n}=a.current;if(n===t)return;const r=l(a.current.startElemNumber,t);e.updateItems(r,!0,a.current.elemNumbers)},u=E.useCallback(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&tm(t.nativeEvent);a.current.elemNumbers=[n],a.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),a.current.active=!1,s()},[]),d=E.useCallback(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&tm(t);a.current.isRange=!1,a.current.startElemNumber=n,a.current.elemNumbers=[n],a.current.toggle=r,a.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(a.current.active=!1,s()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),p=E.useCallback(e=>{if(0===e.button&&a.current.active){if(a.current.active=!1,a.current.isRange){const t=+e.currentTarget.getAttribute("data-n");c(t)}s()}},[]),f=E.useCallback(e=>{0===e.button&&a.current.active&&(a.current.active=!1,s())},[]),h=E.useCallback(t=>{if(!a.current.active)return;a.current.isRange||(a.current.isRange=!0,e.isSelected(a.current.startElemNumber)||(e.updateItem(a.current.startElemNumber,!0),a.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");c(n)},[]),m=E.useCallback(t=>{var n,r;if(a.current.active||a.current.isRange||e.isSingleSelect||t.touches.length<=1)return;if(t.touches.length>2)return void s();const o=Number(null===(n=t.touches[0].target)||void 0===n||null===(n=n.closest(em))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(em))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void s();a.current.active=!0;l(o,i).length<7&&(a.current.touchRangeSmall=!0),a.current.elemNumbers=[],a.current.touchElemNumbers=[o,i]},[]),g=E.useCallback(()=>{if(2!==a.current.touchElemNumbers.length)return;if(a.current.touchRangeSmall)return a.current.touchRangeSmall=!1,a.current.touchElemNumbers=[],void(a.current.active=!1);const[e,t]=a.current.touchElemNumbers;a.current.startElemNumber=e,c(t),a.current.touchElemNumbers=[],a.current.active=!1,a.current.toggle=!0,s()},[]);E.useEffect(()=>(r.addEventListener("mouseup",f),()=>{r.removeEventListener("mouseup",f)}),[f]),E.useEffect(()=>{const n=()=>{e.clearItemStates(!1)},r=()=>{e.clearItemStates(!0),e.triggerStateChanged()};return t.on("clearItemStates",n),t.on("deactivated",n),t.on("cleared",r),()=>{t.removeListener("clearItemStates",n),t.removeListener("deactivated",n),t.removeListener("cleared",r)}},[t]);const b={};return n?Object.assign(b,{onChange:u}):Object.assign(b,{onMouseUp:p,onMouseDown:d,onMouseEnter:h,onTouchStart:m,onTouchEnd:g}),{interactionEvents:b,select:async(n=[],r=!1,o=void 0)=>{var i;if(null!==(i=e.selectDisabled)&&void 0!==i&&i.call(e))return!1;const a=!e.isSingleSelect&&tm(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const s=[];return e.updateItems(n,r,s),e.setSelectableValuesUpdating(),Xh({selections:t,elemNumbers:r?s:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const rm=e=>c(c({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var om=e=>zh(rm(e));const im=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,am=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||im(e))&&t;const sm=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?Yh.column:Yh.row];t||o.push(Yh.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?Yh.XS:Yh.S;break;case"S":case"L":n=Yh.S;break;case"A":n=!!t&&Yh.A;break;case"X":case"XL":n=!!t&&Yh.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},lm=e=>e.filter(e=>!!e).join(" ").trim(),cm=e=>e||"-",um=["backgroundColor"],dm=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},pm=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,fm=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${Yh.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${Yh.labelText}`]:{color:i},[`& .${Yh.icon}`]:{color:i}}},hm={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},mm=Ns("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})(({theme:e,checkboxes:t,isGridMode:n,isGridCol:r,dense:o,direction:i,sizes:a,frequencyMode:s,freqHitsValue:l,styles:d})=>{const p=d.content,{backgroundColor:f}=p,h=u(p,um),m=fm({styles:d,checkboxes:t,selectionState:"selected"}),g=fm({styles:d,checkboxes:t,selectionState:"excluded"}),b={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},y={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${Yh.row}`]:c({flexWrap:"nowrap"},d.content),[`& .${Yh.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${Yh.column}`]:c({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},d.content),[`& .${Yh.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${Yh.labelText}`]:c(c({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},hm),h),[`& .${Yh.labelDense}`]:{lineHeight:"18px"},[`& .${Yh.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${Yh.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":c(c({},hm),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${Yh.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:h.color},[`& .${Yh.S}`]:c(c({},m),{},{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder}, inset 0 0 0 4px ${e.palette.custom.whiteBorder} !important`,borderRadius:"4px",outline:"none"},border:n?"none":void 0}),[`& .${Yh.XS}`]:c(c({},fm({styles:d,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${Yh.A}`]:c(c({},fm({styles:d,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${Yh.X}`]:c(c({},g),{},{border:n?"none":void 0}),[`& .${Yh.X}, & .${Yh.XS}`]:{border:n?"none":void 0,[`& .${Yh.barSelected} .bar-filled`]:c({},b)},[`& .${Yh.frequencyCount}`]:c(c({zIndex:3,justifyContent:"flex-end"},hm),{},{flex:`0 0 ${dm({sizes:a,frequencyMode:s,isGridMode:n,freqHitsValue:l})}`,minWidth:!n&&"P"!==s&&l?a.freqMinWidth:"max-content",maxWidth:pm({sizes:a,frequencyMode:s,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${Yh.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${Yh.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":c({},b)},[`& .${Yh.barSelected}`]:{"& .bar-filled":c({},y)},[`& .${Yh.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${Yh.barSelectedWithCheckbox}`]:{"& .bar-filled":c(c({},y),{},{backgroundColor:d.selections.selected||"#BFE5D0",borderColor:d.selections.selected})},[`& .${Yh.excludedTextWithCheckbox}`]:{color:d.content.color,fontStyle:"italic"}}});var gm=L.memo(mm);const bm="ListBoxCheckbox",ym={cbIcon:`${bm}-cbIcon`,cbIconChecked:`${bm}-cbIconChecked`,cbIconExcluded:`${bm}-cbIconExcluded`,cbIconAlternative:`${bm}-cbIconAlternative`,checkbox:`${bm}-checkbox`,dense:`${bm}-dense`},vm=Ns(wp,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${ym.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"},[`& .${ym.cbIconChecked}`]:{borderRadius:3,backgroundColor:e.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:'""'}},[`& .${ym.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${ym.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${ym.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${ym.dense}`]:{padding:"4px 8px"}})),Sm=(e,t=!0,n=!1)=>mr.jsx("span",{className:e.cbIcon,children:n&&mr.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function wm({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:s}){return mr.jsx(vm,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[ym.checkbox,r&&ym.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":s},name:n,icon:Sm(ym,a,o),checkedIcon:mr.jsx("span",{className:ym.cbIconChecked}),styles:i})}const xm={radioButton:"ListBoxRadioButton-radioButton"},km=Ns(uh,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${xm.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Cm({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return mr.jsx(km,{checked:t,onChange:e,value:n,name:n,className:xm.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function Em({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return mr.jsx(Xc,{component:"span",variant:"body2",className:lm([Yh.labelText,t&&Yh.labelDense,n&&am({cell:o,checkboxes:r})&&Yh.excludedTextWithCheckbox]),align:i,dir:"auto",children:mr.jsx("span",{children:e})})}function Lm({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?mr.jsx(Em,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function Rm({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){const p=mr.jsx(wm,{onChange:e,label:t,checked:r,dense:o,excluded:im(i),isGridCol:a,showGray:s,dataN:n,styles:d}),f=mr.jsx(Cm,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return mr.jsx(Jp,{control:l?f:p,className:Yh.checkboxLabel,label:mr.jsx(Lm,{label:t,dense:o,showGray:s,checkboxes:c,cell:i,valueTextAlign:u})},n)}function Pm({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>mr.jsx("span",{id:n,className:t?Yh.highlighted:"",children:e}));return mr.jsx(Em,{label:o,dense:t,showGray:n,checkboxes:r})}function Tm({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:s,isGridCol:l,isSingleSelect:c,valueTextAlign:u,styles:d}){const p=mr.jsx(Pm,{labels:t,dense:r,showGray:o,checkboxes:n});return n?mr.jsx(Rm,{onChange:e,label:p,qElemNumber:i,isSelected:a,dense:r,cell:s,isGridCol:l,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):p}var Om=L.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){return c?mr.jsx(Rm,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}):mr.jsx(Em,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});function Im({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==cm(e)))return;const i=(({qFrequency:e,frequencyMax:t})=>{const n=String(e),r="%"===n.substring(n.length-1),o=parseFloat(r?n:e);return`${r?o:o/t*100}%`})({qFrequency:e,frequencyMax:o});return mr.jsx(sp,{className:lm([Yh.bar,n&&Yh.barWithCheckbox,r&&(n?Yh.barSelectedWithCheckbox:Yh.barSelected)]),children:mr.jsx(sp,{className:"bar-filled",width:i})})}function _m({cell:e,checkboxes:t,dense:n,showGray:r}){const o=cm(null==e?void 0:e.qFrequency);return mr.jsx(Qp,{style:{display:"flex",alignItems:"center"},className:Yh.frequencyCount,"aria-label":o,title:o,children:mr.jsx(Xc,{noWrap:!0,color:"inherit",variant:"body2",className:lm([n&&Yh.labelDense,Yh.labelText,r&&am({cell:e,checkboxes:t})&&Yh.excludedTextWithCheckbox]),children:o})})}function qm({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r}){if("singleColumn"===e)return{height:"100%",width:"100%"};switch(t){case"row":case"column":return{height:r?"100%":`calc(100% - ${n}px)`,width:`calc(100% - ${2*n}px)`,position:"absolute",left:4};default:return{}}}const Mm=Ns(Qp,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i})=>{const a="padding"+("rtl"===o?"Left":"Right");return{[`&.${Yh.fieldRoot}`]:c(c({},qm({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i})),{},{[a]:r?"8px":void 0})}});const Nm=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===Nm.ARROW_UP||e===Nm.ARROW_DOWN||e===Nm.ARROW_LEFT||e===Nm.ARROW_RIGHT});function Am(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function Dm(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 jm({containerRef:e,enabled:t}){const[n,r]=E.useState(!1),o={enabled:t,active:n,innerTabStops:!t||n,blur(n){var o;if(!t)return;r(!1);const i=Dm(e.current)||(null===(o=e.current)||void 0===o?void 0:o.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),Am(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;r(!0);const n=e.current,o=null==n?void 0:n.querySelector(".search input"),i=null==n?void 0:n.querySelector(".value.last-focused"),a=null==n?void 0:n.querySelector(".value.selector, .value"),s=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||o||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 o}const $m=e=>+e.getAttribute("data-n"),zm=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Fm=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(),Am(e),o},Bm=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},Wm=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=Dm(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{Am(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function Hm({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:s,isModal:l,rowCount:c,columnCount:u,rowIndex:d,columnIndex:p,layoutOrder:f}){const h=(e,t,n=!1)=>{if(e===Nm.ARROW_LEFT||e===Nm.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof p){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=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const s=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let l=e,c=t;if(i===Nm.ARROW_DOWN)if(e>=s(t)-1){if(t===r-1)return-1;l=0,c=t+1}else l=e+1;else if(0===e){if(0===t)return-1;l=s(t-1)-1,c=t-1}else l=e-1;if("row"===o)return l*r+c;const u=a%n;return 0===u||l<u?l*r+c:(l-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:p,rowCount:c,columnCount:u,layoutOrder:f,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let m=!1;const g=e=>{m=e};return c=>{let u;const{currentTarget:d,nativeEvent:p}=c,{keyCode:f,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=p;switch(f){case Nm.TAB:{const e=d.closest(".listbox-container"),t=void 0!==l?l():void 0;d.classList.add("last-focused");if(!(null!=s&&s.enabled)){if(!t)return;return s.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){zm(e)||Bm(e)||(t?s.focusSelection():Wm(c,s));break}s.focusSelection()||Bm(e)||zm(e)||(d.blur(),Wm(c,s));break}case Nm.SHIFT:g(!0);break;case Nm.SPACE:e([$m(d)],!1,c);break;case Nm.ARROW_DOWN:case Nm.ARROW_RIGHT:u=h(f,d,!0),b&&u&&(m&&(e([$m(d)],!0),g(!1)),e([$m(u)],!0));break;case Nm.ARROW_UP:case Nm.ARROW_LEFT:u=h(f,d,!1),b&&u&&(m&&(e([$m(d)],!0),g(!1)),e([$m(u)],!0));break;case Nm.ENTER:if(r(),void 0===l)return;break;case Nm.ESCAPE:if(void 0===l)return void o();if(!l())return;o();break;case Nm.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case Nm.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case Nm.A:if(y||v){t();break}return;case Nm.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const Um={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 Vm({index:e,rowIndex:t,columnIndex:n,style:r,data:o}){var i,a;const{onChange:s,onClick:l,onMouseDown:u,onMouseUp:d,onMouseEnter:p,onTouchStart:f,onTouchEnd:h,pages:m,isLocked:g,column:b=!1,checkboxes:y=!1,textAlign:v,direction:S,layoutOptions:w={},freqIsAllowed:x,isSingleSelect:k,actions:C,frequencyMax:L="",histogram:R=!1,keyboard:P,showGray:T=!0,showTick:O=!0,columnCount:I=1,rowCount:_=1,dataOffset:q,deducedFrequencyMode:M,focusListItems:N,listCount:A,sizes:D,translator:j,showSearch:$,isModal:z,contentFontStyle:F,styles:B,fillHeight:W}=o,{dense:H=!1,dataLayout:U="singleColumn",layoutOrder:V}=w,{itemPadding:G}=D;let K,J;const Q={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof n){"row"===V?(K=t*I+n,Q.max=_,Q.currentIndex=t):(K=n*_+t,Q.max=I,Q.currentIndex=n);const e=0;J=c(c({},r),{},{height:W?"100%":r.height,left:e+(0===n?r.left:Number(r.left)+n*e),top:0===t?r.top:Number(r.top)+t*e})}else K=e,Q.max=A,Q.currentIndex=e,J=c({},r);K+=q;const[X,Z]=E.useState(null);E.useEffect(()=>{null!==X&&(0===Q.currentIndex&&N.first&&(X.focus(),N.setFirst(!1)),Q.currentIndex===Q.max-1&&N.last&&(X.focus(),N.setLast(!1)))},[X,N.first,N.last]);const Y=E.useCallback(Hm(c(c({},C),{},{focusListItems:N,keyboard:P,isModal:z,rowCount:_,columnCount:I,rowIndex:t,columnIndex:n,layoutOrder:V})),[C,null==P?void 0:P.innerTabStops,_,I,t,n,V]),ee=E.useMemo(()=>function({pages:e,cellIndex:t}){let n;const r=e.filter(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight)[0];if(r){const e=r.qArea;t>=e.qTop&&t<e.qTop+e.qHeight&&([n]=r.qMatrix[t-e.qTop])}return n}({pages:m,cellIndex:K}),[m,K]),te="S"===(null==ee?void 0:ee.qState)||"XS"===(null==ee?void 0:ee.qState)||"L"===(null==ee?void 0:ee.qState)||"XL"===(null==ee?void 0:ee.qState),ne=E.useMemo(()=>sm({column:b,histogram:R,cell:ee,showGray:T}),[null==ee?void 0:ee.qState,R,H]),re=E.useCallback(e=>{e.preventDefault()},[y]),oe=E.useMemo(()=>ee&&function({direction:e,cell:t,textAlign:n}){const r=!["NaN",void 0].includes(null==t?void 0:t.qNum);let o;return o=!n||n.auto?r?"rtl"===e?"left":"right":{rtl:"right",ltr:"left"}[e]:(null==n?void 0:n.align)||"left",["left","center","right"].includes(o)?o:"left"}({direction:S,cell:ee,textAlign:v}),[S,ee,v]);if(!ee)return null;const ie="grid"===U&&"column"===V,ae=null!==(i=null==ee?void 0:ee.qText)&&void 0!==i?i:"";let se;if(null!==(a=ee.qHighlightRanges)&&void 0!==a&&null!==(a=a.qRanges)&&void 0!==a&&a.length){const e=ee.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];se=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,n=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}(ae,e)}const le={alignItems:"center",display:"flex",fontSize:"8px"},ce="rtl"===S,ue={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:ce?8:y?0:void 0,paddingRight:y?0:ce?8:0,justifyContent:oe,textAlign:oe},de=0===e,pe=te&&g,fe=!y&&te&&!g,he=!y&&O,me=y||!O,ge=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const s=Um[n],l=e.get(s),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${l}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:j,label:ae,qState:ee.qState,currentIndex:Q.currentIndex,maxIndex:Q.max,showSearch:$}),be=!ce&&"right"===oe||ce&&"left"===oe;return mr.jsx(gm,{className:Yh.barContainer,checkboxes:y,style:J,styles:B,isGridCol:ie,isGridMode:"grid"===U,dense:H,direction:S,sizes:D,frequencyMode:M,freqHitsValue:be,contentFontStyle:F,"data-testid":"listbox.item",children:mr.jsxs(Mm,{role:"row","aria-label":ge,"aria-selected":te,"aria-setsize":Q.max,"aria-rowindex":Q.currentIndex,ref:Z,container:!0,dataLayout:U,cellPaddingRight:me,layoutOrder:V,itemPadding:G,gap:0,className:lm(["value",Yh.fieldRoot,...ne]),onClick:l,onMouseDown:u,onMouseUp:d,onMouseEnter:p,onKeyDown:Y,onTouchStart:f,onTouchEnd:h,onContextMenu:re,tabIndex:de&&P.innerTabStops?0:-1,"data-n":null==ee?void 0:ee.qElemNumber,direction:S,fillHeight:W,children:[(null==ee?void 0:ee.qFrequency)&&mr.jsx(Im,{qFrequency:null==ee?void 0:ee.qFrequency,histogram:R,checkboxes:y,isSelected:te,frequencyMax:L}),mr.jsx(Qp,{style:ue,className:lm([Yh.cell,Yh.selectedCell]),title:`${ae}`,children:se?mr.jsx(Tm,{onChange:s,labels:se,checkboxes:y,dense:H,showGray:T,qElemNumber:ee.qElemNumber,isSelected:te,cell:ee,isGridCol:ie,isSingleSelect:k,valueTextAlign:oe,styles:B}):mr.jsx(Om,{onChange:s,label:ae,qElemNumber:ee.qElemNumber,isSelected:te,dense:H,cell:ee,isGridCol:ie,showGray:T,isSingleSelect:k,checkboxes:y,valueTextAlign:oe,styles:B})}),x&&mr.jsx(_m,{cell:ee,checkboxes:y,dense:H,showGray:T}),he&&mr.jsxs(Qp,{className:Yh.icon,children:[pe&&mr.jsx(Bh,{style:le,size:"small"}),fe&&mr.jsx(om,{style:le,size:"small"})]})]})})}var Gm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Km(e,t){return e===t||!(!Gm(e)||!Gm(t))}function Jm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Km(e[n],t[n]))return!1;return!0}function Qm(e,t){var n;void 0===t&&(t=Jm);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 Xm="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Zm(e){cancelAnimationFrame(e.id)}function Ym(e,t){var n=Xm();var r={id:requestAnimationFrame(function o(){Xm()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var eg=-1;function tg(e){if(void 0===e&&(e=!1),-1===eg||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),eg=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return eg}var ng=null;function rg(e){if(void 0===e&&(e=!1),null===ng||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?ng="positive-descending":(t.scrollLeft=1,ng=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),ng}return ng}var og=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function ig(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,Cl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Cl(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=Qm(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=Qm(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=Qm(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(rg()){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&&Zm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return ag(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=tg();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(rg()){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&&Zm(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?og:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),x=w[0],k=w[1],C=this._getVerticalRangeToRender(),L=C[0],R=C[1],P=[];if(r>0&&g)for(var T=L;T<=R;T++)for(var O=x;O<=k;O++)P.push(E.createElement(t,{columnIndex:O,data:d,isScrolling:y?S:void 0,key:f({columnIndex:O,data:d,rowIndex:T}),rowIndex:T,style:this._getItemStyle(T,O)}));var I=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return E.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ft({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},E.createElement(c||u||"div",{children:P,ref:l,style:{height:I,pointerEvents:S?"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}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var ag=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},sg=function(e,t){return e};function lg(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,Cl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Cl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Qm(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=Qm(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=Qm(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(rg()){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&&Zm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return cg(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?tg():0:l.scrollHeight>l.clientHeight?tg():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(rg()){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&&Zm(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?sg:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,y=e.width,v=this.state.isScrolling,S="horizontal"===o||"horizontal"===f,w=S?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),k=x[0],C=x[1],L=[];if(c>0)for(var R=k;R<=C;R++)L.push(E.createElement(t,{data:u,key:p(R,u),index:R,isScrolling:b?v:void 0,style:this._getItemStyle(R)}));var P=r(this.props,this._instanceProps);return E.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:ft({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},E.createElement(s||l||"div",{children:L,ref:a,style:{height:S?"100%":P,pointerEvents:v?"none":void 0,width:S?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}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var cg=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ug=ig({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}}),dg=lg({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 pg="#BBB",fg="#f1f1f1",hg={styledScrollbars:"ListBox-styledScrollbars"};function mg({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:s}){const l="column"===(null==t?void 0:t.layoutOrder)&&"singleColumn"!==t.dataLayout,c=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(e,l),u=l?n.column:n.row,d=(l?r:o)>=u,p=((e,t,n,r)=>e===t*n+r+n)(a,c,l?o:r,s),f=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(e,l),h=d&&!p&&c>=u-1||f||i.state.show;i.set(h)}const{StyledFixedSizeList:gg,StyledFixedSizeGrid:bg}=function(){const e=e=>({scrollbarColor:`${pg} ${fg}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:fg},"&::-webkit-scrollbar-thumb":{backgroundColor:pg,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:ur(dg,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${hg.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:ur(ug,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${hg.styledScrollbars}`]:e(t)}))}}();const yg=(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)},vg=e=>{const t=E.useMemo(()=>"text"in e?e:{},[e]);return E.useMemo(()=>yg(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function Sg(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function wg({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function xg({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:s}){const{layoutOptions:l={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:p,dataLayout:f}=l,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==s?void 0:s.content)||{},g=`${h} ${m}`,b=vg({text:Sg(e),font:g}),y=vg({text:Sg(5),font:g}),v=vg({text:Sg(8),font:g}),S=i?y:0,w=a?20:0;let x=56+S+w;!a&&x>=80&&(x+=20);let k,C,E,L,R=b+18+S+w;!a&&R>=80&&(R+=20),R=Math.min(150,Math.max(R,x));const P=wg({isGridMode:"grid"===f,dense:p}),T=null!=n?n:8*P;if(c){let e=t;"row"===c?(k={overflowX:"hidden"},e+=8,({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleColumns:e,listCount:t,containerWidth:n,columnAutoWidth:r,itemMinWidth:o}){const i=(null==e?void 0:e.maxColumns)||3,a=n-10;let s;const l=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));s=!1!==(null==e?void 0:e.auto)?l:Math.min(t,i,l),s=Math.max(s,1);const c=a/s;return{rowCount:Math.ceil(t/s),columnWidth:c,columnCount:s}}({maxVisibleColumns:d,listCount:r,containerWidth:e,columnAutoWidth:R,itemMinWidth:x}))):(k={overflowY:"hidden"},({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let s;const l=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);s=!1!==e.auto?c:Math.min(n,l,c),s=Math.max(s,1);const u=Math.ceil(n/s);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:s}}({maxVisibleRows:u,itemHeight:P,listCount:r,listHeight:T,columnAutoWidth:R,containerWidth:e,itemMinWidth:x})))}C=("singleColumn"===f?1:C)||1,L=("singleColumn"===f?o:L)||r;const O=l.dense?838e3:577e3;L=Math.min(L,O);const I=Math.floor(3355e4/E);C=Math.min(C,I)||1;const _=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:k,itemHeight:P,listHeight:T,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,_),maxCount:{row:O,column:I},itemPadding:4,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function kg({pages:e,minimumBatchSize:t,count:n,calculatePagesHeight:r=!1}){const o=null!=e&&e.length&&r?(({pages:e=[],minimumBatchSize:t,count:n})=>{const r=e.some(e=>e.qArea.qHeight<t),o=Math.max(...e.map(e=>e.qArea.qTop+e.qArea.qHeight));return r?o:n})({pages:e,minimumBatchSize:t,count:n}):n;return o||0}const[Cg]=Cc({});function Eg(e){const t=`${e.id}`,[n]=Cg();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Lg=Ns(Xc,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>c({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function Rg({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=E.useContext(wc);return mr.jsx(Sh,{title:r?o.get(t):"",children:mr.jsx(Lg,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var Pg=Xs(mr.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"}));const Tg=Ns(zc)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),Og=Ns("div")(()=>({paddingLeft:"6px",flexGrow:1})),Ig=Ns("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),_g=Ns(Pg)(()=>({fontSize:"14px"}));function qg({text:e,dismiss:t,dense:n,parentWidth:r=0}){const o="function"==typeof t,i=n?370:282,a=Math.max(r/2-i/2,0),s=Math.min(i,r)-42,l=n&&r<i;return mr.jsxs(Tg,{left:a,style:{maxWidth:i},children:[mr.jsx(Og,{children:mr.jsx(Rg,{text:e,dense:n,width:s,tooltip:l})}),mr.jsx(Ig,{dense:n,children:o&&mr.jsx(Uc,{"aria-label":"close",onClick:()=>t(),children:mr.jsx(_g,{})})})]})}function Mg({itemWidth:e,layout:t,frequencyMode:n}){const r=e>80,{frequencyEnabled:o=!1}=(null==t?void 0:t.qListObject)||{},i=!["N",void 0].includes(n);return!(!r||!i&&!o)}const Ng=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,Ag=e=>{const t=Ng(e);return`Max(AGGR(Count(${t}), ${t}))`},Dg=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=E.useState(),[i,a]=E.useState(n);return E.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 jg=["isLoadingData"],$g=Ns("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function zg({model:e,app:t,constraints:n,layout:r,selections:o,selectionState:i,direction:a,checkboxes:s,height:l,width:d,frequencyMode:p,update:f,fetchStart:h,postProcessPages:m,calculatePagesHeight:g=!1,keyboard:b={},showGray:y=!0,scrollState:v,keyScroll:S={state:{},reset:()=>{}},currentScrollIndex:w={set:()=>{}},renderedCallback:x,onCtrlF:k,showSearch:C,isModal:L,styles:R}){var P,T;const{translator:O}=E.useContext(wc),[I,_]=E.useState(!1),q=!(!r||!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:M=s,histogram:N}=null!=r?r:{},A=E.useRef(null),D=E.useRef({queue:[],validPages:!1,dataOffset:0}),j=E.useRef({pages:[]}),{frequencyMax:$,awaitingFrequencyMax:z}=Dg(t,r),F=function({local:e,loaderRef:t,model:n,fetchStart:r,scrollTimeout:o,postProcessPages:i,listData:a}){const[s,l]=E.useState(!1),[c,u]=E.useState([]);let[d]=E.useState(0);const p=(s,c)=>{const p=e.current.dataOffset;e.current.queue.push({start:s+p,stop:c+p});const f=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),l(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const o=e.current.queue.slice(-1)[0];if(!o)return l(!1),void t();const s=n.getListObjectData("/qListObjectDef",[{qTop:o.start>d?o.start-d:0,qHeight:d,qLeft:0,qWidth:1},{qTop:o.start,qHeight:d,qLeft:0,qWidth:1}]).then(n=>{const r=i?i(n):n;e.current.validPages=!0,a.current.pages=r,u(r),l(!1),t()});r&&r(s)},f?o:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(d=e),p)},pages:c,isLoading:s}}({local:D,loaderRef:A,model:e,fetchStart:h,scrollTimeout:0,postProcessPages:m,listData:j}),{isLoadingData:B}=F,W=u(F,jg),{getStoreValue:H,setStoreValue:U}=Eg(e),V=E.useCallback(W.loadMoreItems,[r]),[G,K]=E.useState({show:!1,dismissed:!1}),[J,Q]=E.useState([]);null!=W&&W.pages&&i.update({setPages:Q,pages:W.pages,isSingleSelect:q,layout:r});const X=null==r?void 0:r.qListObject.qDimensionInfo.qCardinal;(null!=W&&W.pages.length&&!z||0===X)&&(null==x||x());const Z=E.useCallback(e=>{if(null==J||!J.length||!D.current.validPages)return!1;D.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=J.filter(e=>t(e))[0];return n&&t(n)},[r,J]),{interactionEvents:Y,select:ee}=nm({selectionState:i,selections:o,checkboxes:M,doc:document,loaderRef:A}),{layoutOptions:te={}}=r||{};let ne=!0;te.dataLayout&&(ne="singleColumn"===te.dataLayout||"row"===(null==te?void 0:te.layoutOrder));const re="grid"===(null==te?void 0:te.dataLayout),oe=e=>{const t=c({},ne?{rowIndex:e}:{columnIndex:e}),n=re?t:e;A.current._listRef.scrollToItem(n)},ie=()=>{if(D.current.queue=[],D.current.validPages=!1,A.current){A.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===S.state.scrollPosition;if(r&&r.qSelectionInfo.qInSelections||e)return void(e&&S.reset());D.current.dataOffset=0,oe(0)}};f&&f.call(null,ie),E.useEffect(()=>{v&&!I&&A.current&&(A.current._listRef.scrollToItem(v.initScrollPos),_(!0))},[A.current]),E.useEffect(()=>{ie()},[r,D.current.dataOffset]);let ae=100;const se="grid"!==te.dataLayout,le=null==r||null===(P=r.qListObject.qSize)||void 0===P?void 0:P.qcy,ce=kg({pages:J,minimumBatchSize:ae,count:le,calculatePagesHeight:g});let ue=Mg({itemWidth:d,layout:r,frequencyMode:p});const de=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(J),pe=xg({layout:r,width:d,height:l,listCount:ce,count:le,freqIsAllowed:ue,checkboxes:M,styles:R});pe.columnWidth&&(ue=Mg({itemWidth:pe.columnWidth,layout:r,frequencyMode:p}));const{listCount:fe}=pe;U("listCount",fe);const he=H("inputText"),me=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=E.useContext(wc),o=[];if(null!=t&&t.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}(n),t=r.get(e,[n]);o.push(t)}const i=function({layout:e,translatorDynamic:t}){var n;const{qStateCounts:r={}}=(null==e||null===(n=e.qListObject)||void 0===n?void 0:n.qDimensionInfo)||{},o=r.qSelected+r.qSelectedExcluded+r.qLocked+r.qLockedExcluded;let i;switch(o){case 0:i="ScreenReader.ZeroSelected";break;case 1:i="ScreenReader.OneSelected";break;default:i="ScreenReader.ManySelected"}return t.get(i,[o])}({layout:e,translatorDynamic:r});o.push(i);const a=o.filter(e=>!(null==e||!e.length)).join(". ");return a}({layout:r,searchInputText:he,listCount:fe}),ge=e=>{const{scrollIndex:t,offset:n,triggerRerender:o}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,s=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":s=0,i=0,a=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:s,triggerRerender:a}}({position:e,isRow:ne,sizes:pe,layout:r,offset:D.current.dataOffset});D.current.dataOffset=n,o&&i.triggerStateChanged(),oe(t)};E.useEffect(()=>{const e=S.state;e.up?oe(w.state.start-e.up):e.down?oe(w.state.stop+e.down):e.scrollPosition&&ge(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&S.reset()},[S.state.up,S.state.down,S.state.scrollPosition]);const{textAlign:be}=(null==r?void 0:r.qListObject.qDimensionInfo)||{},[ye,ve]=E.useState({first:!1,last:!1}),{List:Se,Grid:we}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:s,deducedFrequencyMode:l,histogram:u,isSingleSelect:d,select:p,selectAll:f,onCtrlF:h,textAlign:m,selections:g,keyboard:b,showGray:y,scrollState:v,direction:S,sizes:w,listCount:x,overflowDisclaimer:k,setScrollPosition:C,focusListItems:E,setCurrentScrollIndex:L,constraints:R,frequencyMax:P,freqIsAllowed:T,translator:O,showSearch:I,isModal:_,styles:q}){const{layoutOptions:M={}}=e||{},{columnWidth:N,listHeight:A,itemHeight:D,rowCount:j,columnCount:$}=w||{},z=("grid"===M.dataLayout?N:t)>80,F={direction:"rtl"===S?"rtl":"ltr",useIsScrolling:!0,className:hg.styledScrollbars},B=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,W=A<=D,H=c(c({isLocked:B,column:!o,pages:i},B||a.selectDisabled()?{}:s),{},{checkboxes:n,layoutOptions:M,deducedFrequencyMode:l,freqIsAllowed:T,isSingleSelect:d,textAlign:m,sizes:w,actions:{select:p,confirm:()=>null==g?void 0:g.confirm.call(g),cancel:()=>null==g?void 0:g.cancel.call(g),setScrollPosition:C,selectAll:f,onCtrlF:h},frequencyMax:P,histogram:u,keyboard:b,showGray:y,showTick:z,dataOffset:r.current.dataOffset,focusListItems:E,direction:S,translator:O,showSearch:I,isModal:_,styles:q,fillHeight:W});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,mr.jsx(gg,c(c({},F),{},{dataTestid:"fixed-size-list",scrollDisabled:null==R?void 0:R.active,height:A,width:t,itemCount:x,itemData:c(c({},H),{},{listCount:x}),itemSize:D,onItemsRendered:t=>{var o;L({start:t.visibleStartIndex,stop:t.visibleStopIndex}),v&&v.setScrollPos(t.visibleStopIndex),mg({renderProps:t,layoutOptions:M,maxCount:w.maxCount,columnCount:$,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(c({},t))},ref:o,children:Vm}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=w,{layoutOrder:s}=M||{},l=Math.min(A,j*D+a);return r.current.listRef=o,mr.jsx(bg,c(c({},F),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==R?void 0:R.active,height:l,width:t,columnCount:$,columnWidth:N,rowCount:j,rowHeight:D,style:c({},i),itemData:c(c({},H),{},{column:void 0,columnCount:$,rowCount:j}),onItemsRendered:t=>{var o;const i="row"===s;L({start:i?t.visibleRowStartIndex:t.visibleColumnStartIndex,stop:i?t.visibleRowStopIndex:t.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:t,scrollState:v,layoutOrder:s,rowCount:j,columnCount:$});mg({renderProps:t,layoutOptions:M,maxCount:w.maxCount,columnCount:$,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(a)},ref:o,children:Vm}))}}}({direction:a,layout:r,width:d,checkboxes:M,deducedFrequencyMode:de,histogram:N,keyboard:b,showGray:y,interactionEvents:Y,select:ee,selectAll:()=>{i.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:k,textAlign:be,isVertical:se,pages:J,selectionState:i,isSingleSelect:q,selections:o,scrollState:v,local:D,sizes:pe,listCount:fe,overflowDisclaimer:{state:G,set:e=>K(t=>c(c({},t),{},{show:e}))},setScrollPosition:ge,focusListItems:{first:ye.first,setFirst:e=>ve(t=>c(c({},t),{},{first:e})),last:ye.last,setLast:e=>ve(t=>c(c({},t),{},{last:e}))},setCurrentScrollIndex:w.set,constraints:n,frequencyMax:$,freqIsAllowed:ue,translator:O,showSearch:C,isModal:L,styles:R}),{columnWidth:xe,listHeight:ke,itemHeight:Ce}=pe||{};return se||(ae=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:d,columnWidth:xe,listHeight:ke,itemHeight:Ce})),mr.jsxs($g,{children:[mr.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:me}),!fe&&X>0&&mr.jsx(Rg,{width:d,text:"Listbox.NoMatchesForYourTerms"}),mr.jsx(Gh,{isItemLoaded:Z,itemCount:fe||1,loadMoreItems:V.with({minimumBatchSize:ae}),threshold:0,minimumBatchSize:ae,ref:A,role:"grid",children:se?Se:we}),G.show&&!G.dismissed&&mr.jsx(qg,{text:"Listbox.ItemsOverflow",dismiss:()=>K(e=>c(c({},e),{},{dismissed:!0})),parentWidth:null==A||null===(T=A.current)||void 0===T||null===(T=T._listRef)||void 0===T||null===(T=T.props)||void 0===T?void 0:T.width,dense:null==te?void 0:te.dense})]})}const Fg=e=>c(c({},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"}}]}),Bg=e=>c(c({},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"}}]}),Wg=e=>c(c({},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"}}]}),Hg=e=>c(c({},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 Ug=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",s=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:Fg,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:Wg,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:Bg,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:Hg,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const Vg=e=>c(c({},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 Gg(e){const t=qs(),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 Kg={className:"njs-cell-action"},Jg=L.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=qs(),{hidden:o,disabled:i,style:a,hasSvgIconShape:s}=Gg(e);if(o)return null;const l=Number.parseInt(r.spacing(.5),10),c=e.keyboardAction||e.action,u=c?e=>["Enter"].includes(e.key)&&c():null,d=c?e=>[" ","Spacebar"].includes(e.key)&&c():null,p=`actions-toolbar-${e.key}`,f=e.ref||(t?null:n);return mr.jsxs(Uc,{ref:f,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[Kg.className,p].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":p,children:[s&&zh(e.getSvgIconShape()),t&&mr.jsx("div",{ref:n,style:{bottom:-l,right:0,position:"absolute",width:"100%",height:0}})]})}),Qg=e=>c(c({},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=>zh(Qg(e));const Zg=e=>c(c({},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 Yg=e=>zh(Zg(e));const eb="njs-action-toolbar-more",tb={icon:"More-icon"},nb=Ns($f)(({theme:e})=>({pointerEvents:"none",[`& .${tb.icon} *`]:{color:e.palette.text.primary}}));function rb({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=Gg(e);return r?null:mr.jsxs(Xf,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&mr.jsx(Ef,{className:tb.icon,children:zh(e.getSvgIconShape())}),mr.jsx(Xc,{noWrap:!0,children:e.label})]})}const ob=L.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},s)=>{const l=e.length>0,u=e.findIndex(e=>!e.disabled);return l&&mr.jsx(nb,c(c({},r),{},{onClose:i,ref:s,open:t,anchorEl:n.current,getContentAnchorEl:a?null:void 0,container:a?n.current:void 0,disablePortal:a,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:eb},paper:{style:c({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:mr.jsx(If,{id:"moreMenuList",children:e.map((e,t)=>mr.jsx(rb,{item:e,autoFocus:t===u,onActionClick:i},t))})}))});function ib({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:s}=i,{keyCode:l}=s;switch(l){case Nm.ARROW_LEFT:case Nm.ARROW_DOWN:case Nm.ARROW_RIGHT:case Nm.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(a);let t=[Nm.ARROW_LEFT,Nm.ARROW_DOWN].includes(l);t=o?!t:t,(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()})(t?e-1:e+1)}i.stopPropagation(),i.preventDefault();break;case Nm.SPACE:i.preventDefault();break;case Nm.TAB:if(e&&null!=t&&t.refocusContent){(i.shiftKey&&n(!1)===i.target||!i.shiftKey&&n(!0)===i.target)&&(i.preventDefault(),i.stopPropagation(),t.refocusContent())}break;case Nm.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const ab="ActionsToolbar",sb={item:`${ab}-item`,itemSpacing:`${ab}-itemSpacing`},lb=Ns($f)(({theme:e})=>({[`& .${sb.itemSpacing}`]:{padding:e.spacing(0,.25)}})),cb="njs-action-toolbar-popover",ub=L.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?mr.jsx(Qp,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>mr.jsx(Qp,{className:`${sb.itemSpacing} ${sb.item}`,children:mr.jsx(Jg,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),db={pointerEvents:"none"};function pb({show:e=!0,actions:t=[],maxItems:n=3,selections:r={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:o,more:i={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:a={show:!1,anchorEl:null},focusHandler:s=null,actionsRefMock:l=null,isRtl:u,autoConfirm:d=!1,layout:p}){var f,h;const m=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=E.useContext(wc);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:Zg},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:Qg},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:rm}]}(c(c({},r),{},{layout:p})),{translator:g,keyboardNavigation:b}=E.useContext(wc),[y,v]=E.useState(!1),S={vertical:12,horizontal:u?0:(null!==(f=null===(h=a.anchorEl)||void 0===h?void 0:h.clientWidth)&&void 0!==f?f:0)-7},w={vertical:"bottom",horizontal:u?-7:"right"},x=E.useRef(),k=E.useRef(),C=qs(),L=E.useMemo(()=>({margin:C.spacing(.5,0)})),R=e=>{const t=x.current||l;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},P=E.useMemo(()=>ib({keyboardNavigation:b,focusHandler:s,getEnabledButton:R,selections:r,isRtl:u}),[b,s,R,r,u]);if(E.useEffect(()=>()=>{v(!1)},[a.show,e,r.show]),E.useEffect(()=>{if(!s)return;s.on("focus_toolbar_first",()=>{const e=R(!1);null==e||e.focus()}),s.on("focus_toolbar_last",()=>{const e=R(!0);null==e||e.focus()})},[]),d)return;let T=i.enabled,O=i.actions;const I=i.alignTo||k,_=t.filter(e=>!e.hidden);if(_.length>n){const e=_.splice(-(_.length-n)-1);T=!0,O=[...e,...i.actions]}if(!r.show&&0===_.length&&!T)return null;const q={key:"more",label:g.get("Menu.More"),getSvgIconShape:Vg,hidden:!1,active:y,enabled:()=>T,action:()=>v(!y)},M=_.length>0,N=O.length>0,A=M&&r.show||N&&r.show,D=mr.jsxs(Qp,{ref:x,onKeyDown:P,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:u?"row-reverse":"row"},children:[(null==o?void 0:o.length)&&mr.jsx(ub,{className:"actions-toolbar-extra-actions",actions:o,isRtl:u}),M&&mr.jsx(ub,{actions:_}),N&&mr.jsx(ub,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:k,actions:[q],addAnchor:!0}),A&&mr.jsx(Qp,{className:sb.itemSpacing,style:L,children:mr.jsx(Hp,{orientation:"vertical"})}),r.show&&mr.jsx(ub,{className:"actions-toolbar-default-actions",actions:m,isRtl:u}),y&&mr.jsx(ob,{show:y,actions:O,alignTo:I,popoverProps:i.popoverProps,popoverPaperStyle:i.popoverPaperStyle,onCloseOrActionClick:()=>{v(!1)},disablePortal:i.disablePortal})]});return a.show?mr.jsx(lb,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:a.show,anchorEl:a.anchorEl,anchorOrigin:S,transformOrigin:w,hideBackdrop:!0,style:db,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:cb,style:{pointerEvents:"auto",padding:C.spacing(.5,.25)}}},children:D}):e&&D}var fb=e=>zh((e=>c(c({},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 hb="/qListObjectDef",mb=e=>null==e?void 0:e.substring(0,64e3),gb=Ns(Jf,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})(({styles:e,dense:t,isRtl:n})=>{let r={};return t&&(r={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:e.search.color,textAlign:n?"right":"left"}}),c({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:e.search.backgroundColor,backdropFilter:e.background.backgroundImage?e.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:n?"row-reverse":"row","& fieldset":{borderColor:`${e.search.borderColor}`,borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:`${e.search.highlightBorderColor} !important`},"& .MuiInputBase-root":c({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),bb=Ns(Uc)(()=>({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 yb=E.forwardRef(function({popoverOpen:e,selections:t,selectionState:n,model:r,keyboard:o,dense:i=!1,visible:a=!0,autoFocus:s=!0,beginSelectionOnFocus:l=!0,wildCardSearch:c=!1,searchEnabled:u,direction:d,hide:p,styles:f},h){const{translator:m}=E.useContext(wc),[g,b]=E.useState(""),[y,v]=E.useState(!1),S=E.useRef(),w=E.useRef(),x=m.get("Listbox.Clear.Search"),{getStoreValue:k,setStoreValue:C}=Eg(r),L="rtl"===d,R=async()=>{try{await r.abortListObjectSearch(hb)}finally{b("")}};E.useEffect(()=>a?()=>R():()=>{},[a]),E.useEffect(()=>(t.on("deactivated",R),()=>{t.removeListener&&t.removeListener("deactivated",R)}),[]),E.useEffect(()=>{if(y&&S.current){const e=g.length-1;S.current.setSelectionRange(e,e),v(!1)}},[y,S.current]),E.useEffect(()=>{C("inputText",g)},[g]);const P=async()=>{let e;const o=mb(g),i=await r.searchListObjectFor(hb,o);return n.selectDisabled()?i:(i&&o.length&&k("listCount")>0&&(e=r.acceptListObjectSearch(hb,!0),t.selectionsMade=!0,n.clearItemStates(!1),b("")),e)},T=()=>{var e;null===(e=S.current)||void 0===e||e.focus()},O=()=>{R(),T()};return E.useImperativeHandle(h,()=>({focus(){T()}})),a&&!1!==u?mr.jsxs(mr.Fragment,{children:[mr.jsx(gb,{styles:f,dense:i,isRtl:L,startAdornment:mr.jsx(cf,{position:"start",sx:{marginLeft:i?"8px":"9px"},children:mr.jsx(fb,{size:i?"small":"normal"})}),endAdornment:mr.jsx(cf,{position:"end",sx:{marginLeft:0},children:""!==g&&mr.jsx(bb,{tabIndex:0,ref:w,title:x,"aria-label":x,onClick:O,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":O();break;case"Tab":e.shiftKey?T():Fm(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:mr.jsx(Xg,{size:i?"small":"normal"})})}),className:"search",inputRef:S,size:"small",fullWidth:!0,placeholder:m.get("Listbox.Search"),value:g,onFocus:()=>{c&&(b("**"),v(!0)),l&&!n.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=mb(e.target.value);return b(t),t.length?r.searchListObjectFor(hb,t):R()},onKeyDown:async n=>{const{currentTarget:r}=n,i=r.closest(".listbox-container");switch(n.key){case"Enter":P();break;case"Escape":if(Fm(i),t.cancel(),e)return;break;case"Tab":n.shiftKey?Bm(i)||o.focusSelection():w.current?w.current.focus():Fm(i);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;p&&(p(),Fm(i));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:s,inputProps:{tabIndex:o.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":m.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),mr.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:m.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function vb(e){if(!e.session)return[];const{selectionStore:t}=E.useContext(wc),[n]=t.useAppSelectionsStore(),r=e?e.id:null;let o=n.get(r);return E.useEffect(()=>{e&&!o&&(o=function({app:e,selectionStore:t}){const n=`${e.id}`,{modalObjectStore:r,appModalStore:o}=t,i=async(e=!0)=>{const{model:t,objectSelections:o}=r.get(n)||{};t&&(await t.endSelections(e),r.clear(n),o.emit("deactivated"))},a={begin:async({model:t,paths:o,accept:a=!0,objectSelections:s})=>{var l;if(s===(null===(l=r.get(n))||void 0===l?void 0:l.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:s});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:s})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const s={model:e,isInModal:()=>!!r.get(n),isModal(e){var t;return e?(null===(t=r.get(n))||void 0===t?void 0:t.objectSelections)===e:!!r.get(n)},forward:()=>a.end().then(()=>e.forward()),back:()=>a.end().then(()=>e.back()),clear:()=>a.end().then(()=>e.clearAll()),clearField:(t,n="$")=>a.end().then(()=>e.getField(t,n).then(e=>e.clear()))};return s}({app:e,selectionStore:t}),n.set(r,o),n.dispatch(!0))},[e]),[o]}function Sb(e){return Object.keys(M.prototype).forEach(t=>{e[t]=M.prototype[t]}),M.init(e),e}const wb=({appSelections:e,appModal:t,model:n})=>{let r,o=!1,i=!1;const a={id:n.id,setLayout(e){r=e},begin(e){const r=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",r),r.isPrevented()?Promise.resolve():(o=!0,this.emit("activated"),t.begin({model:n,paths:e,accept:!0,objectSelections:a}))},clear(){return i=!1,this.emit("cleared"),r.qListObject?n.clearSelections("/qListObjectDef"):n.resetMadeSelections()},confirm(){return i=!1,o=!1,this.emit("confirmed"),this.emit("deactivated"),t.end(!0)},cancel(){return i=!1,o=!1,this.emit("canceled"),this.emit("deactivated"),t.end(!1)},async select(t){const r=this.begin([t.params[0]]);if(!e.isModal())return!1;await r;const o=await n[t.method](...t.params);return i="resetMadeSelections"!==t.method,!!o||(n.resetMadeSelections(),!1)},canClear:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked&&!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne:i,canConfirm:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked:i,canCancel:()=>!(r&&r.qListObject&&r.qListObject.qDimensionInfo)||!r.qListObject.qDimensionInfo.qLocked,isActive:()=>o,isModal:()=>e.isModal(a),goModal:e=>t.begin({model:n,paths:e,accept:!1,objectSelections:a}),noModal:(e=!1)=>t.end(e)};return Sb(a),a},xb=({elements:e,objectSelections:t,options:n={}})=>{const r=function({elements:e,handleClickOutside:t}){return n=>{if(!document.contains(n.target))return;const r=e.map(e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current).filter(e=>!!e&&!!document.contains(e));r.length&&!r.some(e=>e.contains(n.target))&&t(n)}}({elements:e,handleClickOutside:()=>t.confirm.call(t)});return{activateClickOut(){var e;document.addEventListener("mousedown",r),null==n||null===(e=n.onSelectionActivated)||void 0===e||e.call(n)},deactivateClickOut(){var e;document.removeEventListener("mousedown",r),null==n||null===(e=n.onSelectionDeactivated)||void 0===e||e.call(n)}}};function kb(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=vb(e),[a]=Rh(t),{appModalStore:s}=E.useContext(wc).selectionStore,l=s.get(e.id),[c,u]=E.useState();return E.useEffect(()=>{i&&t&&!c&&u(wb({appSelections:i,appModal:l,model:t}))},[i,t]),E.useEffect(()=>{if(!c)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=xb({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]),E.useEffect(()=>{c&&c.setLayout(a)},[c,a]),[c]}function Cb(e={}){const t=c(c({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},e),{},{update({setPages:e,pages:n,isSingleSelect:r,selectDisabled:o,layout:i}){var a,s;this.setPages=e;const l=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;l&&c||(this.lastRowCount=i.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=i.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),t.enginePages!==n&&void 0!==n&&(t.enginePages=null!=n?n:[],t.selectedInEngine=Qh(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(s=i.qListObject)||void 0===s||null===(s=s.qDimensionInfo)||void 0===s?void 0:s.qIsCalculated)&&void 0!==a&&a},allowedToSelect:()=>!t.selectDisabled()&&!(t.isDimCalculated&&t.selectableValuesUpdating),setSelectableValuesUpdating(){t.selectableValuesUpdating=!0},useClientItemState:e=>t.ignoreSelectionState||e in t.itemStates,isSelected:e=>t.useClientItemState(e)?!!t.itemStates[e]:t.selectedInEngine.includes(e),getState(e){const{qElemNumber:n,qState:r}=e;return t.useClientItemState(n)?t.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(e,n,r){const o=t.isSelected(e);o&&!n?t.itemStates[e]=!1:o||(null==r||r.push(e),t.itemStates[e]=!0)},triggerStateChanged(){if(this.setPages){const e=t.applySelectionsOnPages(t.enginePages);this.setPages(e)}},applySelectionsOnPages(e){const n=e.map(e=>{const n=e.qMatrix.map(e=>{const[n]=e,r=t.getState(n);return[c(c({},n),{},{qState:r}),...e.slice(1)]});return c(c({},e),{},{qMatrix:n})});return n},updateItem(e,n,r){t.updateItemNoEvents(e,n,r),t.triggerStateChanged()},updateItems(e,n,r){e.forEach(e=>{t.updateItemNoEvents(e,n,r)}),t.triggerStateChanged()},clearItemStates(e){t.itemStates={},t.ignoreSelectionState=e}});return t}const Eb=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Lb(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Eb(t,"qSelected",0)+Eb(t,"qSelectedExcluded",0)+Eb(t,"qLocked",0)+Eb(t,"qLockedExcluded",0)>0}function Rb(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 Pb(e){if("object"==typeof e&&Rb(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}},Ob="qcm-color";function Ib(...e){const t={type:Ob,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===Ob)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Rb(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 _b(e){let t,n,r;if(Rb(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?Pb(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 qb(e){let t,n,r=0;const o="string"==typeof e?Ib(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 Mb(e){let t,n,r=0;const o="string"==typeof e?Ib(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 Nb(e){if(Rb(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?Pb(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Ab(e,t){return Rb(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Ab(Ib(e))}function Db(e){return Rb(e)?1===e.a?Nb(e):Ab(e):Db(Ib(e))}const jb=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function $b(e){return.2126*jb(e.r)+.7152*jb(e.g)+.0722*jb(e.b)}function zb(...e){const t=Ib(...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=qb(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=Ib(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=Ib(...e);return t.invalid||$b(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=Nb(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Ab(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=Db(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=_b(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?Ib(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}=qb(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}=Mb(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=Mb(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)=>zb(o(18*e)),getDarkenedColor:(e=1)=>zb(o(18*-e))}}function Fb(e,t){if(!e||!t)return;const n=$b(e),r=$b(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const Bb="#FFFFFF";function Wb(e,t){const n=zb(Bb),r=zb(e),o=zb(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?Bb:"#000000"}function Hb(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 Ub,Vb,Gb,Kb="top",Jb="top-right",Qb="right",Xb="bottom-right",Zb="bottom",Yb="bottom-left",ey="left",ty="top-left";Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Ub={},"equal-equal",[Kb,Zb]),"equal-higher",[Zb,Xb]),"equal-lower",[Kb,Jb]),"equal-void",[Kb,Zb]),"higher-equal",[ey,Yb,Kb,Jb]),"higher-higher-acute",[Zb,Yb,ey,Jb]),"higher-higher-obtuse",[Zb,Kb]),"higher-lower-negative",[Kb,Jb,Qb]),"higher-lower-positive",[Zb,Yb,ey]),"higher-void",[Kb]),Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Ub,"lower-equal",[Kb]),"lower-higher-negative",[Kb,ty]),"lower-higher-positive",[Xb]),"lower-lower-acute",[Kb,ty,ey,Jb,Qb]),"lower-lower-obtuse",[Kb,Zb]),"lower-void",[Kb]),"void-equal",[Kb]),"void-higher",[Kb,Zb]),"void-lower",[Kb,Zb,ey]),"void-void",[Kb]),Hb(Ub,"unclassified",[Kb,Zb,Qb,ey,Jb,Xb,Yb,ty]);var ny=function(){if(Gb)return Vb;Gb=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 Vb=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},Vb}();function ry(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function oy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function iy(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(ny);var ay=.7,sy=1/ay,ly="\\s*([+-]?\\d+)\\s*",cy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dy=/^#([0-9a-f]{3,8})$/,py=new RegExp(`^rgb\\(${ly},${ly},${ly}\\)$`),fy=new RegExp(`^rgb\\(${uy},${uy},${uy}\\)$`),hy=new RegExp(`^rgba\\(${ly},${ly},${ly},${cy}\\)$`),my=new RegExp(`^rgba\\(${uy},${uy},${uy},${cy}\\)$`),gy=new RegExp(`^hsl\\(${cy},${uy},${uy}\\)$`),by=new RegExp(`^hsla\\(${cy},${uy},${uy},${cy}\\)$`),yy={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 vy(){return this.rgb().formatHex()}function Sy(){return this.rgb().formatRgb()}function wy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?xy(t):3===n?new Ly(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ky(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ky(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=py.exec(e))?new Ly(t[1],t[2],t[3],1):(t=fy.exec(e))?new Ly(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=hy.exec(e))?ky(t[1],t[2],t[3],t[4]):(t=my.exec(e))?ky(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=gy.exec(e))?_y(t[1],t[2]/100,t[3]/100,1):(t=by.exec(e))?_y(t[1],t[2]/100,t[3]/100,t[4]):yy.hasOwnProperty(e)?xy(yy[e]):"transparent"===e?new Ly(NaN,NaN,NaN,0):null}function xy(e){return new Ly(e>>16&255,e>>8&255,255&e,1)}function ky(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ly(e,t,n,r)}function Cy(e){return e instanceof iy||(e=wy(e)),e?new Ly((e=e.rgb()).r,e.g,e.b,e.opacity):new Ly}function Ey(e,t,n,r){return 1===arguments.length?Cy(e):new Ly(e,t,n,null==r?1:r)}function Ly(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ry(){return`#${Iy(this.r)}${Iy(this.g)}${Iy(this.b)}`}function Py(){const e=Ty(this.opacity);return`${1===e?"rgb(":"rgba("}${Oy(this.r)}, ${Oy(this.g)}, ${Oy(this.b)}${1===e?")":`, ${e})`}`}function Ty(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oy(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Iy(e){return((e=Oy(e))<16?"0":"")+e.toString(16)}function _y(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new My(e,t,n,r)}function qy(e){if(e instanceof My)return new My(e.h,e.s,e.l,e.opacity);if(e instanceof iy||(e=wy(e)),!e)return new My;if(e instanceof My)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 My(a,s,l,e.opacity)}function My(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ny(e){return(e=(e||0)%360)<0?e+360:e}function Ay(e){return Math.max(0,Math.min(1,e||0))}function Dy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ry(iy,wy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vy,formatHex:vy,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return qy(this).formatHsl()},formatRgb:Sy,toString:Sy}),ry(Ly,Ey,oy(iy,{brighter(e){return e=null==e?sy:Math.pow(sy,e),new Ly(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ay:Math.pow(ay,e),new Ly(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ly(Oy(this.r),Oy(this.g),Oy(this.b),Ty(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:Ry,formatHex:Ry,formatHex8:function(){return`#${Iy(this.r)}${Iy(this.g)}${Iy(this.b)}${Iy(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Py,toString:Py})),ry(My,function(e,t,n,r){return 1===arguments.length?qy(e):new My(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return e=null==e?sy:Math.pow(sy,e),new My(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ay:Math.pow(ay,e),new My(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 Ly(Dy(e>=240?e-240:e+120,o,r),Dy(e,o,r),Dy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new My(Ny(this.h),Ay(this.s),Ay(this.l),Ty(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=Ty(this.opacity);return`${1===e?"hsl(":"hsla("}${Ny(this.h)}, ${100*Ay(this.s)}%, ${100*Ay(this.l)}%${1===e?")":`, ${e})`}`}}));const jy=Math.PI/180,$y=180/Math.PI,zy=.96422,Fy=.82521,By=4/29,Wy=6/29,Hy=3*Wy*Wy,Uy=Wy*Wy*Wy;function Vy(e){if(e instanceof Gy)return new Gy(e.l,e.a,e.b,e.opacity);if(e instanceof Zy)return Yy(e);e instanceof Ly||(e=Cy(e));var t,n,r=Xy(e.r),o=Xy(e.g),i=Xy(e.b),a=Ky((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ky((.4360747*r+.3850649*o+.1430804*i)/zy),n=Ky((.0139322*r+.0971045*o+.7141733*i)/Fy)),new Gy(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Gy(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ky(e){return e>Uy?Math.pow(e,1/3):e/Hy+By}function Jy(e){return e>Wy?e*e*e:Hy*(e-By)}function Qy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Zy(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Yy(e){if(isNaN(e.h))return new Gy(e.l,0,0,e.opacity);var t=e.h*jy;return new Gy(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ry(Gy,function(e,t,n,r){return 1===arguments.length?Vy(e):new Gy(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return new Gy(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Gy(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 Ly(Qy(3.1338561*(t=zy*Jy(t))-1.6168667*(e=1*Jy(e))-.4906146*(n=Fy*Jy(n))),Qy(-.9787684*t+1.9161415*e+.033454*n),Qy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ry(Zy,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Zy)return new Zy(e.h,e.c,e.l,e.opacity);if(e instanceof Gy||(e=Vy(e)),0===e.a&&0===e.b)return new Zy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*$y;return new Zy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Zy(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return new Zy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Zy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Yy(this).rgb()}}));var ev=e=>()=>e;function tv(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ev(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?tv: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):ev(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ey(e)).r,(t=Ey(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=tv(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 nv,rv="center",ov="bottom";function iv(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 av(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=lv)):void 0===t&&(t=sv);for(var n,r,o,i,a,s=new dv(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 dv(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(uv)}function sv(e){return e.children}function lv(e){return Array.isArray(e)?e[1]:null}function cv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function uv(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function dv(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:rv,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:rv,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:rv,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:rv},{key:"DataRangeIncludingZero",alignment:ov},{key:"LimitedData",alignment:ov},{key:"NegativeOrZeroValues",alignment:ov}].reduce(function(e,t){return e[t.key]=t,e},{}),dv.prototype=av.prototype={constructor:dv,count:function(){return this.eachAfter(iv)},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 av(this).eachBefore(cv)},[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)}},nv=function(e){
123
+ `:null,Zl=Ns("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Ql||{animation:`${Kl} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Yl=Ns("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),ec=Ns("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Dr(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Vs(({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:Xl||{animation:`${Jl} 1.4s ease-in-out infinite`}}]}))),tc=Ns("circle",{name:"MuiCircularProgress",slot:"Track"})(Vs(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),nc=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:c,value:u,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Ki({root:["root",n,`color${Dr(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Dr(n)}`,o&&"circleDisableShrink"]},Vl,t)})(f),m={},g={},b={};if("determinate"===d){const e=2*Math.PI*((Gl-c)/2);m.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return mr.jsx(Zl,{className:Bo(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...b,...p,children:mr.jsxs(Yl,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?mr.jsx(tc,{className:h.track,ownerState:f,cx:Gl,cy:Gl,r:(Gl-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,mr.jsx(ec,{className:h.circle,style:m,ownerState:f,cx:Gl,cy:Gl,r:(Gl-c)/2,fill:"none",strokeWidth:c})]})})});function rc(e){return Ho("MuiButton",e)}const oc=Uo("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"]),ic=E.createContext({}),ac=E.createContext(void 0),sc=[{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}}}],lc=Ns(Wl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Dr(n.color)}`],t[`size${Dr(n.size)}`],t[`${n.variant}Size${Dr(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Vs(({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"},[`&.${oc.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&"start"===e.loadingPosition,style:{"&::before":{content:'"\\200b"',width:0,overflow:"hidden"}}},{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]},[`&.${oc.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${oc.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)",[`&.${oc.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(Ul()).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.alpha((e.vars||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.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||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.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||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"},[`&.${oc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oc.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}),[`&.${oc.loading}`]:{color:"transparent"}}}]}})),cc=Ns("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Dr(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}},...sc]})),uc=Ns("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Dr(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}},...sc]})),dc=Ns("span",{name:"MuiButton",slot:"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}}]})),pc=Ns("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),fc=E.forwardRef(function(e,t){const n=E.useContext(ic),r=E.useContext(ac),o=Gs({props:ri(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:S,type:w,variant:x="text",...k}=o,C=Ii(m),L=b??mr.jsx(nc,{"aria-labelledby":C,color:"inherit",size:16}),R={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:L,loadingPosition:y,size:v,type:w,variant:x},P=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Ki({root:["root",a&&"loading",i,`${i}${Dr(t)}`,`size${Dr(o)}`,`${i}Size${Dr(o)}`,`color${Dr(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Dr(s)}`],startIcon:["icon","startIcon",`iconSize${Dr(o)}`],endIcon:["icon","endIcon",`iconSize${Dr(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},rc,l);return{...l,...c}})(R),T=(S||g&&"start"===y)&&mr.jsx(cc,{className:P.startIcon,ownerState:R,children:S||mr.jsx(pc,{className:P.loadingIconPlaceholder,ownerState:R})}),O=(p||g&&"end"===y)&&mr.jsx(uc,{className:P.endIcon,ownerState:R,children:p||mr.jsx(pc,{className:P.loadingIconPlaceholder,ownerState:R})}),I=r||"",_="boolean"==typeof g?mr.jsx("span",{className:P.loadingWrapper,style:{display:"contents"},children:g&&mr.jsx(dc,{className:P.loadingIndicator,ownerState:R,children:L})}):null,{root:q,...M}=P;return mr.jsxs(lc,{ownerState:R,className:Bo(n.className,P.root,l,I),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Bo(P.focusVisible,f),ref:t,type:w,id:g?C:m,...k,classes:M,children:[T,"end"!==y&&_,i,"end"===y&&_,O]})});var hc={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 mc={green:"#00873D",blue:"#3F8AB3",blueDark:"#005DB9",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},gc={mode:"light",palette:{primary:{main:mc.grey25,contrastText:mc.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:mc.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:mc.grey100,dark:mc.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:mc.grey100,default:mc.grey100,lightest:mc.grey100,lighter:mc.grey98,darker:mc.grey95,darkest:mc.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:mc.blueDark,focusBorder:mc.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:mc.grey45,disabledContrastText:mc.grey100},selected:{main:mc.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:mc.grey100,selectedContrastText:mc.grey100,mainContrastText:mc.grey100,alternativeContrastText:mc.grey25,excludedContrastText:mc.grey25,selectedExcludedContrastText:mc.grey100,possibleContrastText:mc.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)"}}},bc={mode:"dark",palette:{primary:{main:mc.grey20,contrastText:mc.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:mc.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:mc.grey100,dark:mc.grey0},action:{active:mc.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:mc.grey25,lighter:mc.grey20,darker:mc.grey15,darkest:mc.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:mc.blueDark,focusBorder:mc.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:mc.grey45,disabledContrastText:mc.grey100},selected:{main:mc.green,alternative:mc.grey20,excluded:mc.grey10,selectedExcluded:mc.grey10,possible:mc.grey80,selectedContrastText:mc.grey100,mainContrastText:mc.grey100,alternativeContrastText:mc.grey100,excludedContrastText:mc.grey100,selectedExcludedContrastText:mc.grey100,possibleContrastText:mc.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)"}}},yc={},vc=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 ${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 ${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",[`&.${oc.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:`1px solid ${e.palette.btn.border}`,backgroundColor:e.palette.btn.normal,boxShadow:"none",[`&.${oc.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",[`&.${oc.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${oc.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Sc(e){let t=gc,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=bc));const r=JSON.stringify(t);if(yc[r])return yc[r];const o={palette:c(c({type:t.mode},hc.palette),t.palette),typography:c({},hc.typography),shadows:hc.shadows,shape:c({},hc.shape)},i=c(c({},o),{},{components:vc(o)});return yc[r]=Is(i),yc[r].name=n,yc[r]}zo.configure(e=>`njs-1c83-${e.replace("Mui","")}`);var wc=L.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const xc={active:!0,select:!0,passive:!0,edit:!1};function kc(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(xc).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=xc[e],n[e]=!xc[e])}),e.constraints=n,e.interactions=t}var Cc=(e={},t=()=>{})=>{const n=e,r=[],o={},i={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return n[e]=r,o[e]=t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);n[e]=null},dispatch:e=>{r.forEach(t=>t(e?{}:n))},destroy:()=>{Object.keys(o).forEach(e=>{o[e]&&o[e]()})}};return[()=>{const[,e]=E.useState(n);return E.useEffect(()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)}),[e]),[i]},i]};const Ec=E.forwardRef(({initialContext:e,renderCallback:t,modelStore:n,selectionStore:r},o)=>{const[i,a]=E.useState(e),[s,l]=E.useState(),{theme:c}=E.useMemo(()=>({theme:Sc(s)}),[s]),[u,d]=E.useState([]);return E.useEffect(()=>{t&&t()},[]),E.useImperativeHandle(o,()=>({setComps(e){d([...e])},setMuiThemeName:l,setContext:e=>a(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),i&&(i.modelStore=n,i.selectionStore=r),mr.jsx(vr,{injectFirst:!0,children:mr.jsx(Ws,{theme:c,children:mr.jsx(wc.Provider,{value:i,children:u})})})});function Lc({app:e,context:t}){let n,r=!1;const o=new Promise(e=>{n=e}),i=L.createRef(),a=document.createElement("div");a.style.display="none",a.setAttribute("data-nebulajs-version","7.4.0"),a.setAttribute("data-app-id",e.id),document.body.appendChild(a),t&&kc(t);const s=function(e){const[t,n]=Cc({}),[r,o]=Cc({}),[i,a]=Cc({}),[s,l]=Cc({}),[c,u]=Cc({}),[,d]=Cc({}),p=({type:e,value:t})=>{const r=d.get(t.id);d.set(t.id,{});const i=()=>{o.clear(t.id),u.set(t.id,{}),u.dispatch(!0)},s=()=>{t.removeListener("closed",s),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),l.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",s))),s},[f,h]=Cc({},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}}(e.id),l=function(e){const[t,n]=Cc({}),[r,o]=Cc({}),[i,a]=Cc({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),c=ut.createRoot(a);c.render(mr.jsx(Ec,{ref:i,initialContext:t,renderCallback:n,modelStore:s,selectionStore:l}));const u={},d=[],p=[];return[{toggleFocusOfCells(e){Object.keys(u).forEach(t=>{var n;null===(n=u[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:u,addCell(e,t){u[e]=t},removeCell(e){delete u[e]},add:(e,t)=>(async n=>{await o,p.push(e),d.push(t),null==i||null===(n=i.current)||void 0===n||n.setComps(p)})(),remove(e){r||(async t=>{await o;const n=p.indexOf(e);var r;-1!==n&&(null===(r=d[n])||void 0===r||r.call(d),p.splice(n,1),d.splice(n,1));null==i||null===(t=i.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await o,null==i||null===(t=i.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await o,e&&kc(e),null==i||null===(t=i.current)||void 0===t||t.setContext(e)})()},destroy(){r=!0,d.forEach(e=>{e&&e()}),s.destroy(),c.unmount(),document.body.removeChild(a)}},s,l,i,o]}const Rc=e=>e.scrollTop;function Pc(e,t){return n=>{if(t){const r=e.current;void 0===n?t(r):t(r,n)}}}function Tc(e,t,n,r,o,i){const a="exited"!==e||t?n[e]||n.exited:r;return o||i?{...a,...o,...i}:a}function Oc(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 Ic(e){return"string"==typeof e}function _c(e,t,n){return void 0===e||Ic(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function qc(e,t,n){return"function"==typeof e?e(t,n):e}function Mc(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Nc(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function Ac(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Bo(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=Mc({...o,...r}),s=Nc(r),l=Nc(o),c=t(a),u=Bo(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}function Dc(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=qc(d[e],o),{props:{component:m,...g},internalRef:b}=Ac({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),y=ol(b,h?.ref,t.ref),v="root"===e?m||c:m;return[f,_c(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 jc(e){return Ho("MuiPaper",e)}Uo("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 $c=Ns("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}`]]}})(Vs(({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)"}}]}))),zc=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiPaper"}),r=qs(),{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 Ki({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},jc,o)})(u);return mr.jsx($c,{as:i,ownerState:u,className:Bo(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(${pi("#fff",ys(a))}, ${pi("#fff",ys(a))})`}},...c.style}})});function Fc(e){return Ho("MuiIconButton",e)}const Bc=Uo("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Wc=Ns(Wl,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Dr(n.color)}`],n.edge&&t[`edge${Dr(n.edge)}`],t[`size${Dr(n.size)}`]]}})(Vs(({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.alpha((e.vars||e).palette.action.active,(e.vars||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}}]})),Vs(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||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)}}],[`&.${Bc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Bc.loading}`]:{color:"transparent"}}))),Hc=Ns("span",{name:"MuiIconButton",slot:"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"}}]})),Uc=E.forwardRef(function(e,t){const n=Gs({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=Ii(u),m=p??mr.jsx(nc,{"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 Ki({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Dr(r)}`,o&&`edge${Dr(o)}`,`size${Dr(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Fc,t)})(g);return mr.jsxs(Wc,{id:d?h:u,className:Bo(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&mr.jsx("span",{className:b.loadingWrapper,style:{display:"contents"},children:mr.jsx(Hc,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})});function Vc(e){return Ho("MuiTypography",e)}Uo("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Gc={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Kc=jo,Jc=Ns("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${Dr(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Vs(({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(Ul()).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${Dr(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}}]}))),Qc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Xc=E.forwardRef(function(e,t){const{color:n,...r}=Gs({props:e,name:"MuiTypography"}),o=Kc({...r,...!Gc[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Qc,...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]||Qc[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Ki({root:["root",i,"inherit"!==e.align&&`align${Dr(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Vc,a)})(h);return mr.jsx(Jc,{as:m,ref:t,className:Bo(g.root,a),...f,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})});function Zc(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;const n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function Yc(e){const t=E.useRef({});return E.useEffect(()=>{t.current=e}),t.current}var eu="top",tu="bottom",nu="right",ru="left",ou="auto",iu=[eu,tu,nu,ru],au="start",su="end",lu="viewport",cu="popper",uu=iu.reduce(function(e,t){return e.concat([t+"-"+au,t+"-"+su])},[]),du=[].concat(iu,[ou]).reduce(function(e,t){return e.concat([t,t+"-"+au,t+"-"+su])},[]),pu=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function fu(e){return e?(e.nodeName||"").toLowerCase():null}function hu(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function mu(e){return e instanceof hu(e).Element||e instanceof Element}function gu(e){return e instanceof hu(e).HTMLElement||e instanceof HTMLElement}function bu(e){return"undefined"!=typeof ShadowRoot&&(e instanceof hu(e).ShadowRoot||e instanceof ShadowRoot)}var yu={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];gu(o)&&fu(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},{});gu(r)&&fu(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function vu(e){return e.split("-")[0]}var Su=Math.max,wu=Math.min,xu=Math.round;function ku(){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 Cu(){return!/^((?!chrome|android).)*safari/i.test(ku())}function Eu(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&gu(e)&&(o=e.offsetWidth>0&&xu(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&xu(r.height)/e.offsetHeight||1);var a=(mu(e)?hu(e):window).visualViewport,s=!Cu()&&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 Lu(e){var t=Eu(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 Ru(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bu(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Pu(e){return hu(e).getComputedStyle(e)}function Tu(e){return["table","td","th"].indexOf(fu(e))>=0}function Ou(e){return((mu(e)?e.ownerDocument:e.document)||window.document).documentElement}function Iu(e){return"html"===fu(e)?e:e.assignedSlot||e.parentNode||(bu(e)?e.host:null)||Ou(e)}function _u(e){return gu(e)&&"fixed"!==Pu(e).position?e.offsetParent:null}function qu(e){for(var t=hu(e),n=_u(e);n&&Tu(n)&&"static"===Pu(n).position;)n=_u(n);return n&&("html"===fu(n)||"body"===fu(n)&&"static"===Pu(n).position)?t:n||function(e){var t=/firefox/i.test(ku());if(/Trident/i.test(ku())&&gu(e)&&"fixed"===Pu(e).position)return null;var n=Iu(e);for(bu(n)&&(n=n.host);gu(n)&&["html","body"].indexOf(fu(n))<0;){var r=Pu(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 Mu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nu(e,t,n){return Su(e,wu(t,n))}function Au(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Du(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ju={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=vu(n.placement),l=Mu(s),c=[ru,nu].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Au("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Du(e,iu))}(o.padding,n),d=Lu(i),p="y"===l?eu:ru,f="y"===l?tu:nu,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=qu(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=Nu(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)))&&Ru(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $u(e){return e.split("-")[1]}var zu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fu(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=ru,S=eu,w=window;if(c){var x=qu(n),k="clientHeight",C="clientWidth";if(x===hu(n)&&"static"!==Pu(x=Ou(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),o===eu||(o===ru||o===nu)&&i===su)S=tu,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,m*=l?1:-1;if(o===ru||(o===eu||o===tu)&&i===su)v=nu,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[C])-r.width,f*=l?1:-1}var E,L=Object.assign({position:s},c&&zu),R=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:xu(n*o)/o||0,y:xu(r*o)/o||0}}({x:f,y:m},hu(n)):{x:f,y:m};return f=R.x,m=R.y,l?Object.assign({},L,((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({},L,((t={})[S]=y?m+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var Bu={passive:!0};var Wu={left:"right",right:"left",bottom:"top",top:"bottom"};function Hu(e){return e.replace(/left|right|bottom|top/g,function(e){return Wu[e]})}var Uu={start:"end",end:"start"};function Vu(e){return e.replace(/start|end/g,function(e){return Uu[e]})}function Gu(e){var t=hu(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ku(e){return Eu(Ou(e)).left+Gu(e).scrollLeft}function Ju(e){var t=Pu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Qu(e){return["html","body","#document"].indexOf(fu(e))>=0?e.ownerDocument.body:gu(e)&&Ju(e)?e:Qu(Iu(e))}function Xu(e,t){var n;void 0===t&&(t=[]);var r=Qu(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=hu(r),a=o?[i].concat(i.visualViewport||[],Ju(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Xu(Iu(a)))}function Zu(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yu(e,t,n){return t===lu?Zu(function(e,t){var n=hu(e),r=Ou(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Cu();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Ku(e),y:l}}(e,n)):mu(t)?function(e,t){var n=Eu(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):Zu(function(e){var t,n=Ou(e),r=Gu(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Su(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Su(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ku(e),l=-r.scrollTop;return"rtl"===Pu(o||n).direction&&(s+=Su(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Ou(e)))}function ed(e,t,n,r){var o="clippingParents"===t?function(e){var t=Xu(Iu(e)),n=["absolute","fixed"].indexOf(Pu(e).position)>=0&&gu(e)?qu(e):e;return mu(n)?t.filter(function(e){return mu(e)&&Ru(e,n)&&"body"!==fu(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=Yu(e,n,r);return t.top=Su(o.top,t.top),t.right=wu(o.right,t.right),t.bottom=wu(o.bottom,t.bottom),t.left=Su(o.left,t.left),t},Yu(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 td(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?vu(o):null,a=o?$u(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case eu:t={x:s,y:n.y-r.height};break;case tu:t={x:s,y:n.y+n.height};break;case nu:t={x:n.x+n.width,y:l};break;case ru:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Mu(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case au:t[c]=t[c]-(n[u]/2-r[u]/2);break;case su:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function nd(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?"clippingParents":s,c=n.rootBoundary,u=void 0===c?lu:c,d=n.elementContext,p=void 0===d?cu:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,b=Au("number"!=typeof g?g:Du(g,iu)),y=p===cu?"reference":cu,v=e.rects.popper,S=e.elements[h?y:p],w=ed(mu(S)?S:S.contextElement||Ou(e.elements.popper),l,u,a),x=Eu(e.elements.reference),k=td({reference:x,element:v,placement:o}),C=Zu(Object.assign({},v,k)),E=p===cu?C:x,L={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},R=e.modifiersData.offset;if(p===cu&&R){var P=R[o];Object.keys(L).forEach(function(e){var t=[nu,tu].indexOf(e)>=0?1:-1,n=[eu,tu].indexOf(e)>=0?"y":"x";L[e]+=P[n]*t})}return L}function rd(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?du:l,u=$u(r),d=u?s?uu:uu.filter(function(e){return $u(e)===u}):iu,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]=nd(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[vu(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var od={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=vu(g),y=l||(b===g||!h?[Hu(g)]:function(e){if(vu(e)===ou)return[];var t=Hu(e);return[Vu(e),t,Vu(t)]}(g)),v=[g].concat(y).reduce(function(e,n){return e.concat(vu(n)===ou?rd(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 L=v[E],R=vu(L),P=$u(L)===au,T=[eu,tu].indexOf(R)>=0,O=T?"width":"height",I=nd(t,{placement:L,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),_=T?P?nu:ru:P?tu:eu;S[O]>w[O]&&(_=Hu(_));var q=Hu(_),M=[];if(i&&M.push(I[R]<=0),s&&M.push(I[_]<=0,I[q]<=0),M.every(function(e){return e})){C=L,k=!1;break}x.set(L,M)}if(k)for(var N=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"},A=h?3:1;A>0;A--){if("break"===N(A))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function id(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 ad(e){return[eu,nu,tu,ru].some(function(t){return e[t]>=0})}var sd={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=du.reduce(function(e,n){return e[n]=function(e,t,n){var r=vu(e),o=[ru,eu].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,[ru,nu].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 ld={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=nd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=vu(t.placement),y=$u(t.placement),v=!y,S=Mu(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,L="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(x){if(i){var T,O="y"===S?eu:ru,I="y"===S?tu:nu,_="y"===S?"height":"width",q=x[S],M=q+g[O],N=q-g[I],A=f?-C[_]/2:0,D=y===au?k[_]:C[_],j=y===au?-C[_]:-k[_],$=t.elements.arrow,z=f&&$?Lu($):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[O],W=F[I],H=Nu(0,k[_],z[_]),U=v?k[_]/2-A-H-B-L.mainAxis:D-H-B-L.mainAxis,V=v?-k[_]/2+A+H+W+L.mainAxis:j+H+W+L.mainAxis,G=t.elements.arrow&&qu(t.elements.arrow),K=G?"y"===S?G.clientTop||0:G.clientLeft||0:0,J=null!=(T=null==R?void 0:R[S])?T:0,Q=q+V-J,X=Nu(f?wu(M,q+U-J-K):M,q,f?Su(N,Q):N);x[S]=X,P[S]=X-q}if(s){var Z,Y="x"===S?eu:ru,ee="x"===S?tu:nu,te=x[w],ne="y"===w?"height":"width",re=te+g[Y],oe=te-g[ee],ie=-1!==[eu,ru].indexOf(b),ae=null!=(Z=null==R?void 0:R[w])?Z:0,se=ie?re:te-k[ne]-C[ne]-ae+L.altAxis,le=ie?te+k[ne]+C[ne]-ae-L.altAxis:oe,ce=f&&ie?function(e,t,n){var r=Nu(e,t,n);return r>n?n:r}(se,te,le):Nu(f?se:re,te,f?le:oe);x[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function cd(e,t,n){void 0===n&&(n=!1);var r=gu(t),o=gu(t)&&function(e){var t=e.getBoundingClientRect(),n=xu(t.width)/e.offsetWidth||1,r=xu(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Ou(t),a=Eu(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==fu(t)||Ju(i))&&(s=function(e){return e!==hu(e)&&gu(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Gu(e);var t}(t)),gu(t)?((l=Eu(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ku(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ud(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 dd(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var pd={placement:"bottom",modifiers:[],strategy:"absolute"};function fd(){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 hd(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?pd:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},pd,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:mu(e)?Xu(e):e.contextElement?Xu(e.contextElement):[],popper:Xu(t)};var u,d,p=function(e){var t=ud(e);return pu.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(fd(t,n)){o.rects={reference:cd(t,qu(n),"fixed"===o.options.strategy),popper:Lu(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:dd(function(){return new Promise(function(e){l.forceUpdate(),e(o)})}),destroy:function(){c(),s=!0}};if(!fd(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 md=hd({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=hu(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,Bu)}),s&&l.addEventListener("resize",n.update,Bu),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Bu)}),s&&l.removeEventListener("resize",n.update,Bu)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=td({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:vu(t.placement),variation:$u(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,Fu(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,Fu(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:{}},yu,sd,od,ld,ju,{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=nd(t,{elementContext:"reference"}),s=nd(t,{altBoundary:!0}),l=id(a,r),c=id(s,o,i),u=ad(l),d=ad(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})}}]});function gd(e){return parseInt(E.version,10)>=19?e?.props?.ref||null:e?.ref||null}const bd=E.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=E.useState(null),s=ol(E.isValidElement(n)?gd(n):null,t);if(ii(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),ii(()=>{if(i&&!o)return tl(t,i),()=>{tl(t,null)}},[t,i,o]),o){if(E.isValidElement(n)){const e={ref:s};return E.cloneElement(n,e)}return n}return i?fl.createPortal(n,i):i});function yd(e){return Ho("MuiPopper",e)}function vd(e){return"function"==typeof e?e():e}Uo("MuiPopper",["root"]);const Sd={},wd=E.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=E.useRef(null),b=ol(g,t),y=E.useRef(null),v=ol(y,u),S=E.useRef(v);ii(()=>{S.current=v},[v]),E.useImperativeHandle(u,()=>y.current,[]);const w=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),[x,k]=E.useState(w),[C,L]=E.useState(vd(n));E.useEffect(()=>{y.current&&y.current.forceUpdate()}),E.useEffect(()=>{n&&L(vd(n))},[n]),ii(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=md(C,g.current,{placement:w,...c,modifiers:e});S.current(t);const n=g.current;return()=>{if(n){const{style:e}=n,r=e.position,o=e.top,i=e.left,a=e.transform;t.destroy(),e.position=r,e.top=o,e.left=i,e.transform=a}else t.destroy();S.current(null)}},[C,i,a,s,c,w]);const R={placement:x};null!==f&&(R.TransitionProps=f);const P=(e=>{const{classes:t}=e;return Ki({root:["root"]},yd,t)})(e),T=p.root??"div",O=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:qc(n,r),{props:s,internalRef:l}=Ac({...i,externalSlotProps:a});return _c(t,{...s,ref:ol(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 mr.jsx(T,{...O,children:"function"==typeof r?r(R):r})}),xd=E.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=Sd,popperRef:p,style:f,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=E.useState(!0);if(!s&&!c&&(!h||y))return null;let S;if(o)S=o;else if(n){const e=vd(n);S=e&&void 0!==e.nodeType?Ys(e).body:Ys(null).body}const w=c||!s||h&&!y?void 0:"none",x=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return mr.jsx(bd,{disablePortal:a,container:S,children:mr.jsx(wd,{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:w,...f},TransitionProps:x,children:r})})}),kd=Ns(xd,{name:"MuiPopper",slot:"Root"})({}),Cd=E.forwardRef(function(e,t){const n=Ei(),r=Gs({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 mr.jsx(kd,{as:i,direction:n?"rtl":"ltr",slots:{root:S},slotProps:y??s,...w,ref:t})});function Ed(e){return parseInt(e,10)||0}const Ld={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Rd(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Pd=E.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:l}=E.useRef(null!=a),c=E.useRef(null),u=ol(t,c),d=E.useRef(null),p=E.useRef(null),f=E.useCallback(()=>{const t=c.current,n=p.current;if(!t||!n)return;const i=el(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=Ed(i.paddingBottom)+Ed(i.paddingTop),l=Ed(i.borderBottomWidth)+Ed(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=rl(()=>{const e=c.current,t=f();if(!e||!t||Rd(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),m=E.useCallback(()=>{const e=c.current,t=f();if(!e||!t||Rd(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=E.useRef(-1);ii(()=>{const e=Zs(m),t=c?.current;if(!t)return;const n=el(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]),ii(()=>{m()});return mr.jsxs(E.Fragment,{children:[mr.jsx("textarea",{value:a,onChange:e=>{l||m();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:o,style:i,...s}),mr.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:{...Ld,...i,paddingTop:0,paddingBottom:0}})]})});function Td({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 Od=E.createContext(void 0);function Id(){return E.useContext(Od)}function _d(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function qd(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Md(e){return Ho("MuiInputBase",e)}const Nd=Uo("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ad;const Dd="mui-auto-fill",jd="mui-auto-fill-cancel",$d=(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${Dr(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},zd=(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]},Fd=Ns("div",{name:"MuiInputBase",slot:"Root",overridesResolver:$d})(Vs(({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",[`&.${Nd.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%"}}]}))),Bd=Ns("input",{name:"MuiInputBase",slot:"Input",overridesResolver:zd})(Vs(({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] + .${Nd.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},[`&.${Nd.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:jd,animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:Dd}}},{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"}}]}})),Wd=function(e){return function(t){return mr.jsx(Us,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({[`@keyframes ${Dd}`]:{from:{animationName:Dd}},[`@keyframes ${jd}`]:{from:{animationName:jd}}}),Hd=E.forwardRef(function(e,t){const n=Gs({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:S,maxRows:w,minRows:x,multiline:k=!1,name:C,onBlur:L,onChange:R,onClick:P,onFocus:T,onKeyDown:O,onKeyUp:I,placeholder:_,readOnly:q,renderSuffix:M,rows:N,size:A,slotProps:D={},slots:j={},startAdornment:$,type:z="text",value:F,...B}=n,W=null!=y.value?y.value:F,{current:H}=E.useRef(null!=W),U=E.useRef(),V=E.useCallback(e=>{},[]),G=ol(U,v,y.ref,V),[K,J]=E.useState(!1),Q=Id(),X=Td({props:n,muiFormControl:Q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});X.focused=Q?Q.focused:K,E.useEffect(()=>{!Q&&d&&K&&(J(!1),L&&L())},[Q,d,K,L]);const Z=Q&&Q.onFilled,Y=Q&&Q.onEmpty,ee=E.useCallback(e=>{!function(e,t=!1){return e&&(qd(e.value)&&""!==e.value||t&&qd(e.defaultValue)&&""!==e.defaultValue)}(e)?Y&&Y():Z&&Z()},[Z,Y]);ii(()=>{H&&ee({value:W})},[W,ee,H]),ii(()=>{if(!i)return;const e=U.current;if(!e)return;const t=Ys(e),n=_d(t),r=null==n||n===t.body||n===t.documentElement;e===n?Q&&Q.onFocus?Q.onFocus():J(!0):r&&e.focus()},[i]);E.useEffect(()=>{ee(U.current)},[]);let te=b,ne=y;k&&"input"===te&&(ne=N?{type:void 0,minRows:N,maxRows:N,...ne}:{type:void 0,maxRows:w,minRows:x,...ne},te=Pd);E.useEffect(()=>{Q&&Q.setAdornedStart(Boolean($))},[Q,$]);const re={...n,color:X.color||"primary",disabled:X.disabled,endAdornment:f,error:X.error,focused:X.focused,formControl:Q,fullWidth:m,hiddenLabel:X.hiddenLabel,multiline:k,size:X.size,startAdornment:$,type:z},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 Ki({root:["root",`color${Dr(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Dr(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"]},Md,t)})(re),ie=j.root||l.Root||Fd,ae=D.root||c.root||{},se=j.input||l.Input||Bd;return ne={...ne,...D.input??c.input},mr.jsxs(E.Fragment,{children:[!p&&"function"==typeof Wd&&(Ad||(Ad=mr.jsx(Wd,{}))),mr.jsxs(ie,{...ae,ref:t,onClick:e=>{U.current&&e.currentTarget===e.target&&U.current.focus(),P&&P(e)},...B,...!Ic(ie)&&{ownerState:{...re,...ae.ownerState}},className:Bo(oe.root,ae.className,a,q&&"MuiInputBase-readOnly"),children:[$,mr.jsx(Od.Provider,{value:null,children:mr.jsx(se,{"aria-invalid":X.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:u,disabled:X.disabled,id:g,onAnimationStart:e=>{ee(e.animationName===jd?U.current:{value:"x"})},name:C,placeholder:_,readOnly:q,required:X.required,rows:N,value:W,onKeyDown:O,onKeyUp:I,type:z,...ne,...!Ic(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:G,className:Bo(oe.input,ne.className,q&&"MuiInputBase-readOnly"),onBlur:e=>{L&&L(e),y.onBlur&&y.onBlur(e),Q&&Q.onBlur?Q.onBlur(e):J(!1)},onChange:(e,...t)=>{if(!H){const t=e.target||U.current;if(null==t)throw new Error(dt(1));ee({value:t.value})}y.onChange&&y.onChange(e,...t),R&&R(e,...t)},onFocus:e=>{T&&T(e),y.onFocus&&y.onFocus(e),Q&&Q.onFocus?Q.onFocus(e):J(!0)}})}),f,M?M({...X,startAdornment:$}):null]})]})});function Ud(e){return Ho("MuiOutlinedInput",e)}const Vd={...Nd,...Uo("MuiOutlinedInput",["root","notchedOutline","input"])},Gd={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Kd={opacity:0,visibility:"hidden"},Jd=E.forwardRef(function(e,t){const n=qs(),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,...b}=e,y=E.useRef(null),v=ol(y,gd(a),t),S=Pc(y,d),w=Pc(y,(e,t)=>{Rc(e);const r=Oc({style:m,timeout:g,easing:s},{mode:"enter"});e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),x=Pc(y,u),k=Pc(y,h),C=Pc(y,e=>{const t=Oc({style:m,timeout:g,easing:s},{mode:"exit"});e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),L=Pc(y,e=>{e.style.transition="",f&&f(e)});return mr.jsx(xl,{appear:i,in:l,nodeRef:y,onEnter:w,onEntered:x,onEntering:S,onExit:C,onExited:L,onExiting:k,addEndListener:e=>{o&&o(y.current,e)},timeout:g,...b,children:(e,{ownerState:t,...n})=>{const r=Tc(e,l,Gd,Kd,m,a.props.style);return E.cloneElement(a,{style:r,ref:v,...n})}})});function Qd(e){return Ho("MuiBackdrop",e)}Uo("MuiBackdrop",["root","invisible"]);const Xd=Ns("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"}}]}),Zd=E.forwardRef(function(e,t){const n=Gs({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 Ki({root:["root",n&&"invisible"]},Qd,t)})(m),b={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[y,v]=Dc("root",{elementType:Xd,externalForwardedProps:b,className:Bo(g.root,o),ownerState:m}),[S,w]=Dc("transition",{elementType:Jd,externalForwardedProps:b,ownerState:m});return mr.jsx(S,{in:s,timeout:f,...h,...w,children:mr.jsx(y,{"aria-hidden":!0,...v,ref:t,children:r})})});function Yd(e){return Ho("MuiBadge",e)}const ep=Uo("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"]),tp=Ns("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),np=Ns("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Dr(n.anchorOrigin.vertical)}${Dr(n.anchorOrigin.horizontal)}${Dr(n.overlap)}`],"default"!==n.color&&t[`color${Dr(n.color)}`],n.invisible&&t.invisible]}})(Vs(({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(Ul(["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:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:({ownerState:e})=>{const{vertical:t,horizontal:n}=e.anchorOrigin,r="circular"===e.overlap?"14%":0;return{"--Badge-translateX":"right"===n?"50%":"-50%","--Badge-translateY":"top"===t?"-50%":"50%",top:"top"===t?r:"initial",bottom:"bottom"===t?r:"initial",right:"right"===n?r:"initial",left:"left"===n?r:"initial",transform:"scale(1) translate(var(--Badge-translateX), var(--Badge-translateY))",transformOrigin:`${"right"===n?"100%":"0%"} ${"top"===t?"0%":"100%"}`,[`&.${ep.invisible}`]:{transform:"scale(0) translate(var(--Badge-translateX), var(--Badge-translateY))"}}}}]})));function rp(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const op=E.forwardRef(function(e,t){const n=Gs({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=Yc({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=Yc({anchorOrigin:rp(r),color:d,overlap:u,variant:y,badgeContent:h}),E=w||null==S&&"dot"!==y,{color:L=d,overlap:R=u,anchorOrigin:P,variant:T=y}=E?C:n,O=rp(P),I="dot"!==T?k:void 0,_={...n,badgeContent:S,invisible:E,max:x,displayValue:I,showZero:b,anchorOrigin:O,color:L,overlap:R,variant:T},q=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e;return Ki({root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Dr(n.vertical)}${Dr(n.horizontal)}`,`anchorOrigin${Dr(n.vertical)}${Dr(n.horizontal)}${Dr(o)}`,`overlap${Dr(o)}`,"default"!==t&&`color${Dr(t)}`]},Yd,a)})(_),M={slots:{root:m?.root??s.Root,badge:m?.badge??s.Badge},slotProps:{root:g?.root??l.root,badge:g?.badge??l.badge}},[N,A]=Dc("root",{elementType:tp,externalForwardedProps:{...M,...v},ownerState:_,className:Bo(q.root,o),ref:t,additionalProps:{as:a}}),[D,j]=Dc("badge",{elementType:np,externalForwardedProps:M,ownerState:_,className:q.badge});return mr.jsxs(N,{...A,children:[c,mr.jsx(D,{...j,children:I})]})}),ip=Uo("MuiBox",["root"]),ap=Is(),sp=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=wr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Oo),a=E.forwardRef(function(e,a){const s=No(n),{className:l,component:c="div",...u}=jo(e);return mr.jsx(i,{as:c,ref:a,className:Bo(l,o?o(r):r),theme:t&&s[t]||s,...u})});return a}({themeId:pt,defaultTheme:ap,defaultClassName:ip.root,generateClassName:zo.generate});function lp(e){return Ho("PrivateSwitchBase",e)}Uo("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const cp=Ns(Wl,{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}}]}),up=Ns("input",{name:"MuiSwitchBase",shouldForwardProp:Ms})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),dp=E.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,L]=nl({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),R=Id();let P=a;R&&void 0===P&&(P=R.disabled);const T="checkbox"===S||"radio"===S,O={...e,checked:E,disabled:P,disableFocusRipple:s,edge:l},I=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Ki({root:["root",n&&"checked",r&&"disabled",o&&`edge${Dr(o)}`],input:["input"]},lp,t)})(O),_={slots:x,slotProps:{input:d,...k}},[q,M]=Dc("root",{ref:t,elementType:cp,className:I.root,shouldForwardComponentProp:!0,externalForwardedProps:{..._,component:"span",...C},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),R&&R.onFocus&&R.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),R&&R.onBlur&&R.onBlur(e)})(t)}}),ownerState:O,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[N,A]=Dc("input",{ref:p,elementType:up,className:I.input,externalForwardedProps:_,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented||b)return;const t=e.target.checked;L(t),m&&m(e,t)})(t)}}),ownerState:O,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 mr.jsxs(q,{...M,children:[mr.jsx(N,{...A}),E?o:c]})});var pp=Xs(mr.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"})),fp=Xs(mr.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"})),hp=Xs(mr.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"}));function mp(e){return Ho("MuiCheckbox",e)}const gp=Uo("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),bp=Ns(dp,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Dr(n.size)}`],"default"!==n.color&&t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{[`&.${gp.checked}, &.${gp.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${gp.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),yp=mr.jsx(fp,{}),vp=mr.jsx(pp,{}),Sp=mr.jsx(hp,{}),wp=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiCheckbox"}),{checkedIcon:r=yp,color:o="primary",icon:i=vp,indeterminate:a=!1,indeterminateIcon:s=Sp,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=Ki({root:["root",n&&"indeterminate",`color${Dr(r)}`,`size${Dr(o)}`]},mp,t);return{...t,...i}})(b),v=f.input??l,[S,w]=Dc("root",{ref:t,elementType:bp,className:Bo(y.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:f,...h},ownerState:b,additionalProps:{type:"checkbox",icon:E.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:E.cloneElement(g,{fontSize:g.props.fontSize??c}),disableRipple:u,slots:p,slotProps:{input:il("function"==typeof v?v(b):v,{"data-indeterminate":a,"aria-checked":a?"mixed":void 0})}}});return mr.jsx(S,{...w,classes:y})});function xp(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function kp(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Cp(e){return parseFloat(el(e).getComputedStyle(e).paddingRight)||0}function Ep(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&&kp(e,o)})}function Lp(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Rp(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ys(e);return t.body===e?el(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=xp(el(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Cp(r)+e}px`;const t=Ys(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Cp(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Ys(r).body;else{const t=r.parentElement,n=el(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 Pp="data-mui-focusable";const Tp=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Op(e){const t=[],n=[];return Array.from(e.querySelectorAll(Tp)).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 Ip(){return!0}function _p(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Op,isEnabled:a=Ip,open:s}=e,l=E.useRef(!1),c=E.useRef(null),u=E.useRef(null),d=E.useRef(null),p=E.useRef(null),f=E.useRef(!1),h=E.useRef(null),m=ol(gd(t),h),g=E.useRef(null);E.useEffect(()=>{s&&h.current&&(f.current=!n)},[n,s]),E.useEffect(()=>{if(l.current=!1,!s||!h.current)return;const e=_d(Ys(h.current)),t=((n=h.current)?n.hasAttribute(Pp)?n:n.querySelector(`[${Pp}]`):null)??h.current;var n;return Zc(h.current,e)||(t.hasAttribute("tabIndex")||t.setAttribute("tabIndex","-1"),f.current&&t.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),E.useEffect(()=>{if(!s||!h.current)return;const e=Ys(h.current),t=t=>{if(g.current=t,r||!a()||"Tab"!==t.key)return;_d(e)===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.current;if(null===t)return;const n=_d(e);if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(Zc(t,n))return;if(r&&n!==c.current&&n!==u.current)return;if(n!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let o=[];if(n!==c.current&&n!==u.current||(o=i(h.current)),o.length>0){const e=Boolean(g.current?.shiftKey&&"Tab"===g.current?.key),t=o[0],n=o[o.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{const t=_d(e);t&&"BODY"===t.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 mr.jsxs(E.Fragment,{children:[mr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),E.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)}}),mr.jsx("div",{tabIndex:s?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}const qp=()=>{},Mp=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&&kp(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);Ep(t,e.mount,e.modalRef,r,!0);const o=Lp(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=Lp(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=Rp(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Lp(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&&kp(e.modalRef,t),Ep(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&&kp(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Np(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=E.useRef({}),p=E.useRef(null),f=E.useRef(null),h=ol(f,u),[m,g]=E.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),S=()=>{Mp.mount(v(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},w=rl(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Ys(p.current).body;Mp.add(v(),e),f.current&&S()}),x=()=>Mp.isTopModal(v()),k=rl(e=>{p.current=e,e&&(c&&x()?S():f.current&&kp(f.current,y))}),C=E.useCallback(()=>{Mp.remove(v(),y)},[y]);E.useEffect(()=>()=>{C()},[C]),E.useEffect(()=>{c?w():b&&o||C()},[c,C,b,o,w]);const L=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&x()&&(n||(t.stopPropagation(),l&&l(t,"escapeKeyDown")))},R=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Mc(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:L(r),ref:h}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:R(t),open:c}},getTransitionProps:()=>({onEnter:Hs(()=>{g(!1),i&&i()},s?.props.onEnter??qp),onExited:Hs(()=>{g(!0),a&&a(),o&&C()},s?.props.onExited??qp)}),rootRef:h,portalRef:k,isTopModal:x,exited:m,hasTransition:b}}function Ap(e){return Ho("MuiModal",e)}Uo("MuiModal",["root","hidden","backdrop"]);const Dp=Ns("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Vs(({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"}}]}))),jp=Ns(Zd,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),$p=E.forwardRef(function(e,t){const n=Gs({name:"MuiModal",props:e}),{BackdropComponent:r=jp,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:S=!1,onClose:w,onTransitionEnter:x,onTransitionExited:k,open:C,slotProps:L={},slots:R={},theme:P,...T}=n,O={...n,closeAfterTransition:s,disableAutoFocus:f,disableEnforceFocus:h,disableEscapeKeyDown:m,disablePortal:g,disableRestoreFocus:b,disableScrollLock:y,hideBackdrop:v,keepMounted:S},{getRootProps:I,getBackdropProps:_,getTransitionProps:q,portalRef:M,isTopModal:N,exited:A,hasTransition:D}=Np({...O,rootRef:t}),j={...O,exited:A},$=(e=>{const{open:t,exited:n,classes:r}=e;return Ki({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ap,r)})(j),z={};if(void 0===l.props.tabIndex&&(z.tabIndex="-1"),D){const{onEnter:e,onExited:t}=q();z.onEnter=e,z.onExited=t}const F={slots:{root:d.Root,backdrop:d.Backdrop,...R},slotProps:{...p,...L}},[B,W]=Dc("root",{ref:t,elementType:Dp,externalForwardedProps:{...F,...T,component:u},getSlotProps:I,ownerState:j,className:Bo(a,$?.root,!j.open&&j.exited&&$?.hidden)}),[H,U]=Dc("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:F,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>_({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:Bo(o?.className,$?.backdrop),ownerState:j});return S||C||D&&!A?mr.jsx(bd,{ref:M,container:c,disablePortal:g,children:mr.jsxs(B,{...W,children:[!v&&r?mr.jsx(H,{...U}):null,mr.jsx(_p,{disableEnforceFocus:h,disableAutoFocus:f,disableRestoreFocus:b,isEnabled:N,open:C,children:E.cloneElement(l,z)})]})}):null});function zp(e){return Ho("MuiDivider",e)}const Fp=Uo("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Bp=Ns("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]}})(Vs(({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.alpha((e.vars||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%"}}}]}))),Wp=Ns("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(Vs(({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)`}}]}))),Hp=E.forwardRef(function(e,t){const n=Gs({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 Ki({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"]},zp,r)})(h);return mr.jsx(Bp,{as:s,className:Bo(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...f,children:o?mr.jsx(Wp,{className:m.wrapper,ownerState:h,children:o}):null})});function Up(e){return Ho("MuiFormControlLabel",e)}Hp&&(Hp.muiSkipListHighlight=!0);const Vp=Uo("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Gp=Ns("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Vp.label}`]:t.label},t.root,t[`labelPlacement${Dr(n.labelPlacement)}`]]}})(Vs(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Vp.disabled}`]:{cursor:"default"},[`& .${Vp.label}`]:{[`&.${Vp.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}}]}))),Kp=Ns("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Vs(({theme:e})=>({[`&.${Vp.error}`]:{color:(e.vars||e).palette.error.main}}))),Jp=E.forwardRef(function(e,t){const n=Gs({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=Id(),S=s??a.props.disabled??v?.disabled,w=h??a.props.required,x={disabled:S,required:w};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===a.props[e]&&void 0!==n[e]&&(x[e]=n[e])});const k=Td({props:n,muiFormControl:v,states:["error"]}),C={...n,disabled:S,labelPlacement:d,required:w,error:k.error},L=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e;return Ki({root:["root",n&&"disabled",`labelPlacement${Dr(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]},Up,t)})(C),R={slots:m,slotProps:{...i,...g}},[P,T]=Dc("typography",{elementType:Xc,externalForwardedProps:R,ownerState:C});let O=u;return null==O||O.type===Xc||l||(O=mr.jsx(P,{component:"span",...T,className:Bo(L.label,T?.className),children:O})),mr.jsxs(Gp,{className:Bo(L.root,o),ownerState:C,ref:t,...y,children:[E.cloneElement(a,x),w?mr.jsxs("div",{children:[O,mr.jsxs(Kp,{ownerState:C,"aria-hidden":!0,className:L.asterisk,children:[" ","*"]})]}):O]})}),Qp=function(e={}){const{createStyledComponent:t=pa,useThemeProps:n=fa,useTheme:r=No,componentName:o="MuiGrid"}=e;function i(e,t,n=()=>!0){const r={};return null===e||(Array.isArray(e)?e.forEach((e,o)=>{null!==e&&n(e)&&t.keys[o]&&(r[t.keys[o]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{const o=e[t];null!=o&&n(o)&&(r[t]=o)}):r[t.keys[0]]=e),r}const a=t(ra,ia,oa,ta,aa,sa,na),s=E.forwardRef(function(e,t){const s=r(),l=jo(n(e));!function(e,t){void 0!==e.item&&delete e.item,void 0!==e.zeroMinWidth&&delete e.zeroMinWidth,t.keys.forEach(t=>{void 0!==e[t]&&delete e[t]})}(l,s.breakpoints);const{className:c,children:u,columns:d=12,container:p=!1,component:f="div",direction:h="row",wrap:m="wrap",size:g={},offset:b={},spacing:y=0,rowSpacing:v=y,columnSpacing:S=y,unstable_level:w=0,...x}=l,k=i(g,s.breakpoints,e=>!1!==e),C=i(b,s.breakpoints),L=e.columns??(w?void 0:d),R=e.spacing??(w?void 0:y),P=e.rowSpacing??e.spacing??(w?void 0:v),T=e.columnSpacing??e.spacing??(w?void 0:S),O={...l,level:w,columns:L,container:p,direction:h,wrap:m,spacing:R,rowSpacing:P,columnSpacing:T,size:k,offset:C},I=((e,t)=>{const{container:n,direction:r,spacing:i,wrap:a,size:s}=e;return Ki({root:["root",n&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...ua(r),...la(s),...n?ca(i,t.breakpoints.keys[0]):[]]},e=>Ho(o,e),{})})(O,s);return mr.jsx(a,{ref:t,as:f,ownerState:O,className:Bo(I.root,c),...x,children:E.Children.map(u,e=>E.isValidElement(e)&&Ji(e,["Grid"])&&p&&e.props.container?E.cloneElement(e,{unstable_level:e.props?.unstable_level??w+1}):e)})});return s.muiName="Grid",s}({createStyledComponent:Ns("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>Gs({props:e,name:"MuiGrid"}),useTheme:qs});function Xp(e){return`scale(${e}, ${e**2})`}const Zp={entering:{opacity:1,transform:Xp(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:Xp(.75)},exited:{opacity:0,transform:Xp(.75)}},Yp={opacity:0,transform:Xp(.75),visibility:"hidden"},ef=E.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",...m}=e,g=_l(),b=E.useRef(),y=qs(),v=E.useRef(null),S=ol(v,gd(o),t),w=Pc(v,c),x=Pc(v,(e,t)=>{Rc(e);const{duration:n,delay:r,easing:o}=Oc({style:f,timeout:h,easing:i},{mode:"enter"});let a;"auto"===h?(a=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),k=Pc(v,l),C=Pc(v,p),L=Pc(v,e=>{const{duration:t,delay:n,easing:r}=Oc({style:f,timeout:h,easing:i},{mode:"exit"});let o;"auto"===h?(o=y.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[y.transitions.create("opacity",{duration:o,delay:n}),y.transitions.create("transform",{duration:.666*o,delay:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=Xp(.75),u&&u(e)}),R=Pc(v,e=>{e.style.transition="",d&&d(e)});return mr.jsx(xl,{appear:r,in:a,nodeRef:v,onEnter:x,onEntered:k,onEntering:w,onExit:L,onExited:R,onExiting:C,addEndListener:e=>{"auto"===h&&g.start(b.current||0,e),n&&n(v.current,e)},timeout:"auto"===h?null:h,...m,children:(e,{ownerState:t,...n})=>{const r=Tc(e,a,Zp,Yp,f,o.props.style);return E.cloneElement(o,{style:r,ref:S,...n})}})});function tf(e){return Ho("MuiIcon",e)}ef&&(ef.muiSupportAuto=!0),Uo("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nf=Ns("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Dr(n.color)}`],t[`fontSize${Dr(n.fontSize)}`]]}})(Vs(({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(Ul()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),rf=E.forwardRef(function(e,t){const n=Gs({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 Ki({root:["root","inherit"!==t&&`color${Dr(t)}`,`fontSize${Dr(n)}`]},tf,r)})(c);return mr.jsx(nf,{as:a,className:Bo(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t,...l})});function of(e){return Ho("MuiInputAdornment",e)}rf.muiName="Icon";const af=Uo("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var sf;const lf=Ns("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Dr(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(Vs(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${af.positionStart}&:not(.${af.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),cf=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=Id()||{};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 Ki({root:["root",n&&"disablePointerEvents",o&&`position${Dr(o)}`,a,r&&"hiddenLabel",i&&`size${Dr(i)}`]},of,t)})(f);return mr.jsx(Od.Provider,{value:null,children:mr.jsx(lf,{as:i,ownerState:f,className:Bo(h.root,o),ref:t,...u,children:"string"!=typeof r||s?mr.jsxs(E.Fragment,{children:["start"===l?sf||(sf=mr.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,r]}):mr.jsx(Xc,{color:"textSecondary",children:r})})})}),uf=E.createContext({});function df(e){return Ho("MuiList",e)}Uo("MuiList",["root","padding","dense","subheader"]);const pf=Ns("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}}]}),ff=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l,...c}=n,u=E.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 Ki({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},df,t)})(d);return mr.jsx(uf.Provider,{value:u,children:mr.jsxs(pf,{as:i,className:Bo(p.root,o),ref:t,ownerState:d,...c,children:[l,r]})})});function hf(e){return Ho("MuiListItem",e)}Uo("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const mf=Uo("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function gf(e){return Ho("MuiListItemSecondaryAction",e)}Uo("MuiListItemSecondaryAction",["root","disableGutters"]);const bf=Ns("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}}]}),yf=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=E.useContext(uf),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Ki({root:["root",t&&"disableGutters"]},gf,n)})(a);return mr.jsx(bf,{className:Bo(s.root,r),ownerState:a,ref:t,...o})});yf.muiName="ListItemSecondaryAction";const vf=Ns("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]}})(Vs(({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:{[`& > .${mf.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}}]}))),Sf=Ns("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),wf=E.forwardRef(function(e,t){const n=Gs({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,S=E.useContext(uf),w=E.useMemo(()=>({dense:p||S.dense||!1,alignItems:r,disableGutters:f}),[r,S.dense,p,f]),x=E.useRef(null),k=E.Children.toArray(o),C=k.length&&Ji(k[k.length-1],["ListItemSecondaryAction"]),L={...n,alignItems:r,dense:w.dense,disableGutters:f,disablePadding:h,divider:m,hasSecondaryAction:C},R=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Ki({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},hf,n)})(L),P=ol(x,t),T={slots:y,slotProps:b},[O,I]=Dc("secondaryAction",{elementType:yf,externalForwardedProps:T,ownerState:L,className:R.secondaryAction}),_=y.root||s.Root||vf,q=b.root||l.root||{},M={className:Bo(R.root,q.className,i),...v};let N=a||"li";return C?(N=M.component||a?N:"div","li"===c&&("li"===N?N="div":"li"===M.component&&(M.component="div")),mr.jsx(uf.Provider,{value:w,children:mr.jsxs(Sf,{as:c,className:Bo(R.container,u),ref:P,ownerState:L,...d,children:[mr.jsx(_,{...q,...!Ic(_)&&{as:N,ownerState:{...L,...q.ownerState}},...M,children:k}),k.pop()]})})):mr.jsx(uf.Provider,{value:w,children:mr.jsxs(_,{...q,as:N,ref:P,...!Ic(_)&&{ownerState:{...L,...q.ownerState}},...M,children:[k,g&&mr.jsx(O,{...I,children:g})]})})});function xf(e){return Ho("MuiListItemIcon",e)}const kf=Uo("MuiListItemIcon",["root","alignItemsFlexStart"]),Cf=Ns("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(Vs(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ef=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiListItemIcon"}),{className:r,...o}=n,i=E.useContext(uf),a={...n,alignItems:i.alignItems},s=(e=>{const{alignItems:t,classes:n}=e;return Ki({root:["root","flex-start"===t&&"alignItemsFlexStart"]},xf,n)})(a);return mr.jsx(Cf,{className:Bo(s.root,r),ownerState:a,ref:t,...o})}),Lf=Uo("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Rf(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Pf(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Tf(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 Of(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")&&Tf(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const If=E.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=E.useRef(null),f=E.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ii(()=>{r&&p.current.focus()},[r]),E.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&n){const n=`${xp(el(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,p.current.style.width=`calc(100% + ${n})`}return p.current}}),[]);const h=ol(p,t);let m=-1;E.Children.forEach(i,(e,t)=>{E.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=E.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),E.cloneElement(e,t)}return e});return mr.jsx(ff,{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=_d(Ys(t));if("ArrowDown"===n)e.preventDefault(),Of(t,r,l,s,Rf);else if("ArrowUp"===n)e.preventDefault(),Of(t,r,l,s,Pf);else if("Home"===n)e.preventDefault(),Of(t,null,l,s,Rf);else if("End"===n)e.preventDefault(),Of(t,null,l,s,Pf);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&&Tf(r,o);o.previousKeyMatched&&(l||Of(t,r,!1,s,Rf,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...d,children:g})});function _f(e){return Ho("MuiPopover",e)}function qf(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Mf(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Nf(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function Af(e){return"function"==typeof e?e():e}Uo("MuiPopover",["root","paper"]);const Df=Ns($p,{name:"MuiPopover",slot:"Root"})({}),jf=Ns(zc,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$f=E.forwardRef(function(e,t){const n=Gs({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:S={},disableScrollLock:w=!1,...x}=n,k=E.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:d,marginThreshold:p,transformOrigin:b,TransitionComponent:y,transitionDuration:v,TransitionProps:S},L=(e=>{const{classes:t}=e;return Ki({root:["root"],paper:["paper"]},_f,t)})(C),R=E.useCallback(()=>{if("anchorPosition"===s)return a;const e=Af(o),t=(e&&1===e.nodeType?e:Ys(k.current).body).getBoundingClientRect();return{top:t.top+qf(t,i.vertical),left:t.left+Mf(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),P=E.useCallback(e=>({vertical:qf(e,b.vertical),horizontal:Mf(e,b.horizontal)}),[b.horizontal,b.vertical]),T=E.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===s)return{top:null,left:null,transformOrigin:Nf(n)};const r=R();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,c=a+t.width,u=el(Af(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:Nf(n)}},[o,s,R,P,p]),[O,I]=E.useState(f),_=E.useCallback(()=>{const e=k.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,I(!0)},[T]);E.useEffect(()=>(w&&window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)),[o,w,_]);E.useEffect(()=>{f&&_()}),E.useImperativeHandle(r,()=>f?{updatePosition:()=>{_()}}:null,[f,_]),E.useEffect(()=>{if(!f)return;const e=Zs(()=>{_()}),t=el(Af(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,f,_]);let q=v;const M={slots:{transition:y,...m},slotProps:{transition:S,paper:h,...g}},[N,A]=Dc("transition",{elementType:ef,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),_()},onExited:t=>{e.onExited?.(t),I(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==v||N.muiSupportAuto||(q=void 0);const D=u||(o?Ys(Af(o)).body:void 0),[j,{slots:$,slotProps:z,...F}]=Dc("root",{ref:t,elementType:Df,externalForwardedProps:{...M,...x},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:il("function"==typeof g.backdrop?g.backdrop(C):g.backdrop,{invisible:!0})},container:D,open:f},ownerState:C,className:Bo(L.root,c)}),[B,W]=Dc("paper",{ref:k,className:L.paper,elementType:jf,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:O?void 0:{opacity:0}},ownerState:C});return mr.jsx(j,{...F,...!Ic(j)&&{slots:$,slotProps:z,disableScrollLock:w},children:mr.jsx(N,{...A,timeout:q,children:mr.jsx(B,{...W,children:l})})})});function zf(e){return Ho("MuiMenuItem",e)}const Ff=Uo("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Bf=E.createContext(null);var Wf;Bf.Provider;const Hf=Ns("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Uf=Ns("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ms})(Vs(({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 Vf=Ns(Fd,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:$d})(Vs(({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 .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Vd.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Vd.focused} .${Vd.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t},style:{[`&.${Vd.focused} .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Vd.error} .${Vd.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Vd.disabled} .${Vd.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"}}]}})),Gf=Ns(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 mr.jsx(Hf,{"aria-hidden":!0,className:r,ownerState:l,...a,children:mr.jsx(Uf,{ownerState:l,children:s?mr.jsx("span",{children:o}):Wf||(Wf=mr.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Vs(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Kf=Ns(Bd,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zd})(Vs(({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}}]}))),Jf=E.forwardRef(function(e,t){const n=Gs({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=Ki({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ud,t);return{...t,...n}})(n),h=Id(),m=Td({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??Vf,y=c.input??r.Input??Kf,[v,S]=Dc("notchedOutline",{elementType:Gf,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:c,slotProps:u},additionalProps:{label:null!=a&&""!==a&&m.required?mr.jsxs(E.Fragment,{children:[a," ","*"]}):a}});return mr.jsx(Hd,{slots:{root:b,input:y},slotProps:u,renderSuffix:e=>mr.jsx(v,{...S,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}})});Jf.muiName="Input";const Qf=Ns(Wl,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(Vs(({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"}},[`&.${Ff.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Ff.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Ff.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Ff.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ff.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Fp.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Fp.inset}`]:{marginLeft:52},[`& .${Lf.root}`]:{marginTop:0,marginBottom:0},[`& .${Lf.inset}`]:{paddingLeft:36},[`& .${kf.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,[`& .${kf.root} svg`]:{fontSize:"1.25rem"}}}]}))),Xf=E.forwardRef(function(e,t){const n=Gs({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=E.useContext(Bf),h=E.useContext(uf),m=E.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=E.useRef(null);ii(()=>{r&&g.current&&function(e,t){if(null!=t)try{e.focus({focusVisible:"keyboard"===t})}catch(t){e.focus()}else e.focus()}(g.current,f)},[r]);const b={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Ki({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},zf,a);return{...a,...s}})(n),v=ol(g,t),{root:S,...w}=y;let x;return n.disabled||(x=void 0!==u?u:-1),mr.jsx(uf.Provider,{value:m,children:mr.jsx(Qf,{ref:v,role:c,tabIndex:x,component:o,focusVisibleClassName:Bo(y.focusVisible,l),className:Bo(y.root,d),...p,ownerState:b,classes:w})})});var Zf=Xs(mr.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"})),Yf=Xs(mr.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"}));const eh=Ns("span",{name:"MuiRadioButtonIcon",shouldForwardProp:Ms})({position:"relative",display:"flex"}),th=Ns(Zf,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),nh=Ns(Yf,{name:"MuiRadioButtonIcon"})(Vs(({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 rh(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o={...e,checked:t};return mr.jsxs(eh,{className:n.root,ownerState:o,children:[mr.jsx(th,{fontSize:r,className:n.background,ownerState:o}),mr.jsx(nh,{fontSize:r,className:n.dot,ownerState:o})]})}const oh=E.createContext(void 0);function ih(e){return Ho("MuiRadio",e)}const ah=Uo("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),sh=Ns(dp,{shouldForwardProp:e=>Ms(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t[`size${Dr(n.size)}`],t[`color${Dr(n.color)}`]]}})(Vs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Ul()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${ah.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));const lh=mr.jsx(rh,{checked:!0}),ch=mr.jsx(rh,{}),uh=E.forwardRef(function(e,t){const n=Gs({props:e,name:"MuiRadio"}),{checked:r,checkedIcon:o=lh,color:i="primary",icon:a=ch,name:s,onChange:l,size:c="medium",className:u,disabled:d,disableRipple:p=!1,slots:f={},slotProps:h={},inputProps:m,...g}=n,b=Id();let y=d;b&&void 0===y&&(y=b.disabled),y??=!1;const v={...n,disabled:y,disableRipple:p,color:i,size:c},S=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root",`color${Dr(n)}`,"medium"!==r&&`size${Dr(r)}`]};return{...t,...Ki(o,ih,t)}})(v),w=E.useContext(oh);let x=r;const k=Hs(l,w&&w.onChange);let C=s;w&&(void 0===x&&(x=function(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}(w.value,n.value)),void 0===C&&(C=w.name));const L=h.input??m,[R,P]=Dc("root",{ref:t,elementType:sh,className:Bo(S.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...g},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),k(t,...n)}}),ownerState:v,additionalProps:{type:"radio",icon:E.cloneElement(a,{fontSize:a.props.fontSize??c}),checkedIcon:E.cloneElement(o,{fontSize:o.props.fontSize??c}),disabled:y,name:C,checked:x,slots:f,slotProps:{input:"function"==typeof L?L(v):L}}});return mr.jsx(R,{...P,classes:S})});function dh(e){return Ho("MuiTooltip",e)}const ph=Uo("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const fh=Ns(Cd,{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]}})(Vs(({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"] .${ph.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ph.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ph.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ph.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${ph.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${ph.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${ph.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${ph.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),hh=Ns("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${Dr(n.placement.split("-")[0])}`]]}})(Vs(({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(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,[`.${ph.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${ph.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ph.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:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${ph.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${ph.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${ph.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${ph.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t})),mh=Ns("span",{name:"MuiTooltip",slot:"Arrow"})(Vs(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let gh=!1;const bh=new Il;let yh={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Sh=E.forwardRef(function(e,t){const n=Gs({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:S,onOpen:w,open:x,placement:k="bottom",PopperComponent:C,PopperProps:L={},slotProps:R={},slots:P={},title:T,TransitionComponent:O,TransitionProps:I,..._}=n,q=E.isValidElement(o)?o:mr.jsx("span",{children:o}),M=qs(),N=Ei(),[A,D]=E.useState(),[j,$]=E.useState(null),z=E.useRef(!1),F=d||g,B=_l(),W=_l(),H=_l(),U=_l(),[V,G]=nl({controlled:x,default:!1,name:"Tooltip",state:"open"});let K=V;const J=Ii(b),Q=E.useRef(),X=rl(()=>{void 0!==Q.current&&(document.body.style.WebkitUserSelect=Q.current,Q.current=void 0),U.clear()});E.useEffect(()=>X,[X]);const Z=e=>{bh.clear(),gh=!0,G(!0),w&&!K&&w(e)},Y=rl(e=>{bh.start(800+y,()=>{gh=!1}),G(!1),S&&K&&S(e),B.start(M.transitions.duration.shortest,()=>{z.current=!1})}),ee=e=>{z.current&&"touchstart"!==e.type||(A&&A.removeAttribute("title"),W.clear(),H.clear(),f||gh&&h?W.start(gh?h:f,()=>{Z(e)}):Z(e))},te=e=>{W.clear(),H.start(y,()=>{Y(e)})},[,ne]=E.useState(!1),re=e=>{const t=e?.target??A;if(!t||!al(t)){ne(!1);const n=e??new Event("blur");!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),te(n)}},oe=e=>{A||D(e.currentTarget),al(e.target)&&(ne(!0),ee(e))},ie=e=>{z.current=!0;const t=q.props;t.onTouchStart&&t.onTouchStart(e)},ae=e=>{ie(e),H.clear(),B.clear(),X(),Q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(m,()=>{document.body.style.WebkitUserSelect=Q.current,ee(e)})},se=e=>{q.props.onTouchEnd&&q.props.onTouchEnd(e),X(),H.start(v,()=>{Y(e)})};E.useEffect(()=>{if(K)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Y(e)}},[Y,K]);const le=ol(gd(q),D,t);T||0===T||(K=!1);const ce=E.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,..._,...q.props,className:Bo(_.className,q.props.className),onTouchStart:ie,ref:le,...g?{onMouseMove:e=>{const t=q.props;t.onMouseMove&&t.onMouseMove(e),yh={x:e.clientX,y:e.clientY},ce.current&&ce.current.update()}}:{}},fe={};p||(pe.onTouchStart=ae,pe.onTouchEnd=se),u||(pe.onMouseOver=vh(ee,pe.onMouseOver),pe.onMouseLeave=vh(te,pe.onMouseLeave),F||(fe.onMouseOver=ee,fe.onMouseLeave=te)),c||(pe.onFocus=vh(oe,pe.onFocus),pe.onBlur=vh(re,pe.onBlur),F||(fe.onFocus=oe,fe.onBlur=re));const he={...n,isRtl:N,arrow:r,disableInteractive:F,placement:k,PopperComponentProp:C,touch:z.current},me="function"==typeof R.popper?R.popper(he):R.popper,ge=E.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(j),options:{element:j,padding:4}}];return L.popperOptions?.modifiers&&(e=e.concat(L.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...L.popperOptions,...me?.popperOptions,modifiers:e}},[j,L.popperOptions,me?.popperOptions]),be=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e;return Ki({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Dr(i.split("-")[0])}`],arrow:["arrow"]},dh,t)})(he),ye="function"==typeof R.transition?R.transition(he):R.transition,ve={slots:{popper:a.Popper,transition:a.Transition??O,tooltip:a.Tooltip,arrow:a.Arrow,...P},slotProps:{arrow:R.arrow??s.arrow,popper:{...L,...me??s.popper},tooltip:R.tooltip??s.tooltip,transition:{...I,...ye??s.transition}}},[Se,we]=Dc("popper",{elementType:fh,externalForwardedProps:ve,ownerState:he,className:Bo(be.popper,L?.className)}),[xe,ke]=Dc("transition",{elementType:ef,externalForwardedProps:ve,ownerState:he}),[Ce,Ee]=Dc("tooltip",{elementType:hh,className:be.tooltip,externalForwardedProps:ve,ownerState:he}),[Le,Re]=Dc("arrow",{elementType:mh,className:be.arrow,externalForwardedProps:ve,ownerState:he,ref:$});return mr.jsxs(E.Fragment,{children:[E.cloneElement(q,pe),mr.jsx(Se,{as:C??Cd,placement:k,anchorEl:g?{getBoundingClientRect:()=>({top:yh.y,left:yh.x,right:yh.x,bottom:yh.y,width:0,height:0})}:A,popperRef:ce,open:!!A&&K,id:J,transition:!0,...fe,...we,popperOptions:ge,children:({TransitionProps:e})=>mr.jsx(xe,{timeout:M.transitions.duration.shorter,...e,...ke,children:mr.jsxs(Ce,{...Ee,children:[T,r?mr.jsx(Le,{...Re}):null]})})})]})});function wh(){const{useModelStore:e}=E.useContext(wc).modelStore;return e()}function xh(e,t,...n){const r=t?`${t.id}/${JSON.stringify(e)}`:null,[o]=wh(),[i]=function(){const{useRpcRequestSessionModelStore:e}=E.useContext(wc).modelStore;return e()}(),[a,s]=E.useState();return E.useEffect(()=>{if(!t)return;(async()=>{let n=i.get(r);n||(n=t.createSessionObject(e),i.set(r,n));const a=await n;o.set(r,a),s(a)})()},[t,...n]),[a]}const kh={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ch(e){return xh(kh,e)}const Eh=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=c(c({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:c({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=c(c({},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 Lh(e,t){const n=e?`${e.id}`:null,[r]=function(){const{useRpcResultStore:e}=E.useContext(wc).modelStore;return e()}(),[o,i]=E.useReducer(Eh,n?r.get(n):null),[a]=function(){const{useModelChangedStore:e}=E.useContext(wc).modelStore;return e()}(),[s]=function(){const{useRpcRequestStore:e}=E.useContext(wc).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(s=0,new Promise(e=>{setTimeout(e,s)}));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))}var s},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 E.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 Rh(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Lh(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 Ph(e){return Lh(e,"getAppLayout")}function Th(){const[e,t]=E.useState(),[n,r]=E.useState(),o=E.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 E.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]}const Oh="singlepublic-pinnedItems",Ih=e=>{var t;const[n]=(e=>{const[t,n]=E.useState(null),[r,o]=E.useState(null),[i]=wh();return E.useEffect(()=>{let t=!0,r=()=>{};if(e)return async function(){try{const a=`${e.id}-${Oh}`;let s=i.get(a);if(!s){if(s=await(async(e,t)=>{var n;const r=!(null===(n=(await e.getLayout()).permissions)||void 0===n||!n.createMasterobject);let o=null;try{o=r?await e.getOrCreateObject({qInfo:{qType:"singlepublic",qId:t}}):await e.getObject(t)}catch(e){}return o})(e,Oh),!t)return;if(s){i.set(a,s);const e=()=>{i.clear(a)};s.once("closed",e),r=()=>{s.removeListener("closed",e)}}}t&&(o(null),n(s))}catch(e){t&&(o(e instanceof Error?e:new Error(String(e))),n(null))}}(),()=>{t=!1,r()}},[e,i]),[t,r]})(e),[r]=Lh(n,"getLayout");return[null!==(t=null==r?void 0:r.pinnedItems)&&void 0!==t?t:[]]},_h=(e,t,n)=>{const[r,o]=E.useState(void 0),[i,a]=E.useState(void 0),[s]=wh();return E.useEffect(()=>{let r=!0,i=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const l=`${e.id}-${t}`;let c=s.get(l);if(!c){try{c=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!n)throw t;c=await e.createSessionObject(n)}if(!r)return;s.set(l,c);const o=()=>{s.clear(l)};c.once("closed",o),i=()=>{c.removeListener("closed",o)}}r&&(a(void 0),o(c))}catch(e){r&&(a(e instanceof Error?e:new Error(String(e))),o(void 0))}}(),()=>{r=!1,i()}},[e,t,s]),[r,i]},qh={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Mh={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Nh="qField",Ah="id",Dh=(e,t)=>{const n=e.selections[0],r=t.selections[0],o=!!n.qOneAndOnlyOne;return o===!!r.qOneAndOnlyOne?n.qSortIndex-r.qSortIndex:o?-1:1},jh=(e,t,n,r)=>{if(!e||!r)return n;if(0===e.length||0===t.length&&0===n.length)return[];const o=((e,t,n)=>n.filter(n=>Nh in n&&n[Nh]?e.some(e=>e.qName===n[Nh]):!(!(Ah in n)||!n[Ah])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ah]&&"N"===(null===(r=e.qData)||void 0===r?void 0:r.grouping)})))(e,r,t),i=[],a=[...n];for(let e=0;e<o.length;e++){var s;const t=o[e],n=!(!(Ah in t)||!t[Ah]),l=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ah]}):null,u=n?null==l||null===(s=l.qData)||void 0===s||null===(s=s.info[0])||void 0===s?void 0:s.qName:t[Nh],d=a.findIndex(e=>{var r;return n&&(null===(r=e.selections[0].qDimensionReferences)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qId)===t[Ah]||!n&&(e.selections[0].qField===u||e.selections[0].qReadableName===u)});if(!(-1!==i.findIndex(e=>{var t;return(null===(t=e.selections)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.qField)===u&&!e.isPinned})))if(-1===d){const t=c(c({},o[e]),{},{isPinned:!0,states:["$"]});n&&l&&(t.qField=u,t.qName=l.qData.labelExpression||l.qData.title||u),i.push(t)}else i.push(a[d]),a.splice(d,1)}return[...i,...a]};function $h(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function zh({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=c({fontSize:$h(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return mr.jsx("i",{style:o,children:mr.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor",children:r.map(({type:e,attrs:t},n)=>mr.jsx(e,c({},t),n))})})}var Fh=e=>zh((e=>c(c({},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 Bh=e=>zh((e=>c(c({},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 Wh=e=>c(c({},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 Hh=e=>zh(Wh(e));var Uh=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}}(),Vh=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},Gh=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=Vh(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},Vh(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),Uh(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}(E.PureComponent);const Kh=["S","XS"],Jh=e=>e.reduce((e,t)=>e.concat(t));function Qh(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!Kh.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return Jh(t)}async function Xh({selections:e,elemNumbers:t,toggle:n,isSingleSelect:r}){if(0===t.length)return!1;let o=!1;if(!t.some(e=>Number.isNaN(e))){const i=t;try{o=!1!==await e.select({method:"selectListObjectValues",params:["/qListObjectDef",i,n]})}catch(e){o=!1}o||(r?e.cancel():e.clear())}return o}const Zh="RowColumn",Yh={row:`${Zh}-row`,rowBorderBottom:`${Zh}-rowBorderBottom`,column:`${Zh}-column`,fieldRoot:`${Zh}-fieldRoot`,cell:`${Zh}-cell`,labelText:`${Zh}-labelText`,labelDense:`${Zh}-labelDense`,highlighted:`${Zh}-highlighted`,checkboxLabel:`${Zh}-checkboxLabel`,icon:`${Zh}-icon`,S:`${Zh}-S`,XS:`${Zh}-XS`,A:`${Zh}-A`,X:`${Zh}-X`,frequencyCount:`${Zh}-frequencyCount`,barContainer:`${Zh}-barContainer`,bar:`${Zh}-bar`,barSelected:`${Zh}-barSelected`,barWithCheckbox:`${Zh}-barWithCheckbox`,barSelectedWithCheckbox:`${Zh}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${Zh}-excludedTextWithCheckbox`},em=`.${Yh.fieldRoot}`,tm=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function nm({selectionState:e,selections:t,checkboxes:n=!1,doc:r=document,loaderRef:o}){var i;const a=E.useRef({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});E.useEffect(()=>{var e;if(null===(e=o.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(),i=o.current._listRef._outerRef;return i.addEventListener("gesturestart",t),i.addEventListener("gesturechange",n),i.addEventListener("gestureend",r),()=>{i.removeEventListener("gesturestart",t),i.removeEventListener("gesturechange",n),i.removeEventListener("gestureend",r)}},[null===(i=o.current)||void 0===i||null===(i=i._listRef)||void 0===i?void 0:i._outerRef]);const s=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),Xh({selections:t,elemNumbers:a.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:a.current.toggle}))},l=(t,n)=>{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 Jh(t)}(e.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)}([t,n],r)},c=t=>{const{startElemNumber:n}=a.current;if(n===t)return;const r=l(a.current.startElemNumber,t);e.updateItems(r,!0,a.current.elemNumbers)},u=E.useCallback(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&tm(t.nativeEvent);a.current.elemNumbers=[n],a.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),a.current.active=!1,s()},[]),d=E.useCallback(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&tm(t);a.current.isRange=!1,a.current.startElemNumber=n,a.current.elemNumbers=[n],a.current.toggle=r,a.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(a.current.active=!1,s()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),p=E.useCallback(e=>{if(0===e.button&&a.current.active){if(a.current.active=!1,a.current.isRange){const t=+e.currentTarget.getAttribute("data-n");c(t)}s()}},[]),f=E.useCallback(e=>{0===e.button&&a.current.active&&(a.current.active=!1,s())},[]),h=E.useCallback(t=>{if(!a.current.active)return;a.current.isRange||(a.current.isRange=!0,e.isSelected(a.current.startElemNumber)||(e.updateItem(a.current.startElemNumber,!0),a.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");c(n)},[]),m=E.useCallback(t=>{var n,r;if(a.current.active||a.current.isRange||e.isSingleSelect||t.touches.length<=1)return;if(t.touches.length>2)return void s();const o=Number(null===(n=t.touches[0].target)||void 0===n||null===(n=n.closest(em))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(em))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void s();a.current.active=!0;l(o,i).length<7&&(a.current.touchRangeSmall=!0),a.current.elemNumbers=[],a.current.touchElemNumbers=[o,i]},[]),g=E.useCallback(()=>{if(2!==a.current.touchElemNumbers.length)return;if(a.current.touchRangeSmall)return a.current.touchRangeSmall=!1,a.current.touchElemNumbers=[],void(a.current.active=!1);const[e,t]=a.current.touchElemNumbers;a.current.startElemNumber=e,c(t),a.current.touchElemNumbers=[],a.current.active=!1,a.current.toggle=!0,s()},[]);E.useEffect(()=>(r.addEventListener("mouseup",f),()=>{r.removeEventListener("mouseup",f)}),[f]),E.useEffect(()=>{const n=()=>{e.clearItemStates(!1)},r=()=>{e.clearItemStates(!0),e.triggerStateChanged()};return t.on("clearItemStates",n),t.on("deactivated",n),t.on("cleared",r),()=>{t.removeListener("clearItemStates",n),t.removeListener("deactivated",n),t.removeListener("cleared",r)}},[t]);const b={};return n?Object.assign(b,{onChange:u}):Object.assign(b,{onMouseUp:p,onMouseDown:d,onMouseEnter:h,onTouchStart:m,onTouchEnd:g}),{interactionEvents:b,select:async(n=[],r=!1,o=void 0)=>{var i;if(null!==(i=e.selectDisabled)&&void 0!==i&&i.call(e))return!1;const a=!e.isSingleSelect&&tm(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const s=[];return e.updateItems(n,r,s),e.setSelectableValuesUpdating(),Xh({selections:t,elemNumbers:r?s:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const rm=e=>c(c({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var om=e=>zh(rm(e));const im=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,am=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||im(e))&&t;const sm=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?Yh.column:Yh.row];t||o.push(Yh.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?Yh.XS:Yh.S;break;case"S":case"L":n=Yh.S;break;case"A":n=!!t&&Yh.A;break;case"X":case"XL":n=!!t&&Yh.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},lm=e=>e.filter(e=>!!e).join(" ").trim(),cm=e=>e||"-",um=["backgroundColor"],dm=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},pm=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,fm=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${Yh.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${Yh.labelText}`]:{color:i},[`& .${Yh.icon}`]:{color:i}}},hm={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},mm=Ns("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})(({theme:e,checkboxes:t,isGridMode:n,isGridCol:r,dense:o,direction:i,sizes:a,frequencyMode:s,freqHitsValue:l,styles:d})=>{const p=d.content,{backgroundColor:f}=p,h=u(p,um),m=fm({styles:d,checkboxes:t,selectionState:"selected"}),g=fm({styles:d,checkboxes:t,selectionState:"excluded"}),b={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},y={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${Yh.row}`]:c({flexWrap:"nowrap"},d.content),[`& .${Yh.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${Yh.column}`]:c({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},d.content),[`& .${Yh.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${Yh.labelText}`]:c(c({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},hm),h),[`& .${Yh.labelDense}`]:{lineHeight:"18px"},[`& .${Yh.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${Yh.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":c(c({},hm),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${Yh.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:h.color},[`& .${Yh.S}`]:c(c({},m),{},{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder}, inset 0 0 0 4px ${e.palette.custom.whiteBorder} !important`,borderRadius:"4px",outline:"none"},border:n?"none":void 0}),[`& .${Yh.XS}`]:c(c({},fm({styles:d,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${Yh.A}`]:c(c({},fm({styles:d,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${Yh.X}`]:c(c({},g),{},{border:n?"none":void 0}),[`& .${Yh.X}, & .${Yh.XS}`]:{border:n?"none":void 0,[`& .${Yh.barSelected} .bar-filled`]:c({},b)},[`& .${Yh.frequencyCount}`]:c(c({zIndex:3,justifyContent:"flex-end"},hm),{},{flex:`0 0 ${dm({sizes:a,frequencyMode:s,isGridMode:n,freqHitsValue:l})}`,minWidth:!n&&"P"!==s&&l?a.freqMinWidth:"max-content",maxWidth:pm({sizes:a,frequencyMode:s,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${Yh.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${Yh.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":c({},b)},[`& .${Yh.barSelected}`]:{"& .bar-filled":c({},y)},[`& .${Yh.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${Yh.barSelectedWithCheckbox}`]:{"& .bar-filled":c(c({},y),{},{backgroundColor:d.selections.selected||"#BFE5D0",borderColor:d.selections.selected})},[`& .${Yh.excludedTextWithCheckbox}`]:{color:d.content.color,fontStyle:"italic"}}});var gm=L.memo(mm);const bm="ListBoxCheckbox",ym={cbIcon:`${bm}-cbIcon`,cbIconChecked:`${bm}-cbIconChecked`,cbIconExcluded:`${bm}-cbIconExcluded`,cbIconAlternative:`${bm}-cbIconAlternative`,checkbox:`${bm}-checkbox`,dense:`${bm}-dense`},vm=Ns(wp,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${ym.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"},[`& .${ym.cbIconChecked}`]:{borderRadius:3,backgroundColor:e.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:'""'}},[`& .${ym.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${ym.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${ym.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${ym.dense}`]:{padding:"4px 8px"}})),Sm=(e,t=!0,n=!1)=>mr.jsx("span",{className:e.cbIcon,children:n&&mr.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function wm({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:s}){return mr.jsx(vm,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[ym.checkbox,r&&ym.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":s},name:n,icon:Sm(ym,a,o),checkedIcon:mr.jsx("span",{className:ym.cbIconChecked}),styles:i})}const xm={radioButton:"ListBoxRadioButton-radioButton"},km=Ns(uh,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${xm.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Cm({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return mr.jsx(km,{checked:t,onChange:e,value:n,name:n,className:xm.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function Em({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return mr.jsx(Xc,{component:"span",variant:"body2",className:lm([Yh.labelText,t&&Yh.labelDense,n&&am({cell:o,checkboxes:r})&&Yh.excludedTextWithCheckbox]),align:i,dir:"auto",children:mr.jsx("span",{children:e})})}function Lm({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?mr.jsx(Em,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function Rm({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){const p=mr.jsx(wm,{onChange:e,label:t,checked:r,dense:o,excluded:im(i),isGridCol:a,showGray:s,dataN:n,styles:d}),f=mr.jsx(Cm,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return mr.jsx(Jp,{control:l?f:p,className:Yh.checkboxLabel,label:mr.jsx(Lm,{label:t,dense:o,showGray:s,checkboxes:c,cell:i,valueTextAlign:u})},n)}function Pm({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>mr.jsx("span",{id:n,className:t?Yh.highlighted:"",children:e}));return mr.jsx(Em,{label:o,dense:t,showGray:n,checkboxes:r})}function Tm({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:s,isGridCol:l,isSingleSelect:c,valueTextAlign:u,styles:d}){const p=mr.jsx(Pm,{labels:t,dense:r,showGray:o,checkboxes:n});return n?mr.jsx(Rm,{onChange:e,label:p,qElemNumber:i,isSelected:a,dense:r,cell:s,isGridCol:l,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):p}var Om=L.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){return c?mr.jsx(Rm,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}):mr.jsx(Em,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});function Im({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==cm(e)))return;const i=(({qFrequency:e,frequencyMax:t})=>{const n=String(e),r="%"===n.substring(n.length-1),o=parseFloat(r?n:e);return`${r?o:o/t*100}%`})({qFrequency:e,frequencyMax:o});return mr.jsx(sp,{className:lm([Yh.bar,n&&Yh.barWithCheckbox,r&&(n?Yh.barSelectedWithCheckbox:Yh.barSelected)]),children:mr.jsx(sp,{className:"bar-filled",width:i})})}function _m({cell:e,checkboxes:t,dense:n,showGray:r}){const o=cm(null==e?void 0:e.qFrequency);return mr.jsx(Qp,{style:{display:"flex",alignItems:"center"},className:Yh.frequencyCount,"aria-label":o,title:o,children:mr.jsx(Xc,{noWrap:!0,color:"inherit",variant:"body2",className:lm([n&&Yh.labelDense,Yh.labelText,r&&am({cell:e,checkboxes:t})&&Yh.excludedTextWithCheckbox]),children:o})})}function qm({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r}){if("singleColumn"===e)return{height:"100%",width:"100%"};switch(t){case"row":case"column":return{height:r?"100%":`calc(100% - ${n}px)`,width:`calc(100% - ${2*n}px)`,position:"absolute",left:4};default:return{}}}const Mm=Ns(Qp,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i})=>{const a="padding"+("rtl"===o?"Left":"Right");return{[`&.${Yh.fieldRoot}`]:c(c({},qm({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i})),{},{[a]:r?"8px":void 0})}});const Nm=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===Nm.ARROW_UP||e===Nm.ARROW_DOWN||e===Nm.ARROW_LEFT||e===Nm.ARROW_RIGHT});function Am(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function Dm(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 jm({containerRef:e,enabled:t}){const[n,r]=E.useState(!1),o={enabled:t,active:n,innerTabStops:!t||n,blur(n){var o;if(!t)return;r(!1);const i=Dm(e.current)||(null===(o=e.current)||void 0===o?void 0:o.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),Am(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;r(!0);const n=e.current,o=null==n?void 0:n.querySelector(".search input"),i=null==n?void 0:n.querySelector(".value.last-focused"),a=null==n?void 0:n.querySelector(".value.selector, .value"),s=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||o||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 o}const $m=e=>+e.getAttribute("data-n"),zm=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Fm=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(),Am(e),o},Bm=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},Wm=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=Dm(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{Am(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function Hm({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:s,isModal:l,rowCount:c,columnCount:u,rowIndex:d,columnIndex:p,layoutOrder:f}){const h=(e,t,n=!1)=>{if(e===Nm.ARROW_LEFT||e===Nm.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof p){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=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const s=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let l=e,c=t;if(i===Nm.ARROW_DOWN)if(e>=s(t)-1){if(t===r-1)return-1;l=0,c=t+1}else l=e+1;else if(0===e){if(0===t)return-1;l=s(t-1)-1,c=t-1}else l=e-1;if("row"===o)return l*r+c;const u=a%n;return 0===u||l<u?l*r+c:(l-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:p,rowCount:c,columnCount:u,layoutOrder:f,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let m=!1;const g=e=>{m=e};return c=>{let u;const{currentTarget:d,nativeEvent:p}=c,{keyCode:f,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=p;switch(f){case Nm.TAB:{const e=d.closest(".listbox-container"),t=void 0!==l?l():void 0;d.classList.add("last-focused");if(!(null!=s&&s.enabled)){if(!t)return;return s.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){zm(e)||Bm(e)||(t?s.focusSelection():Wm(c,s));break}s.focusSelection()||Bm(e)||zm(e)||(d.blur(),Wm(c,s));break}case Nm.SHIFT:g(!0);break;case Nm.SPACE:e([$m(d)],!1,c);break;case Nm.ARROW_DOWN:case Nm.ARROW_RIGHT:u=h(f,d,!0),b&&u&&(m&&(e([$m(d)],!0),g(!1)),e([$m(u)],!0));break;case Nm.ARROW_UP:case Nm.ARROW_LEFT:u=h(f,d,!1),b&&u&&(m&&(e([$m(d)],!0),g(!1)),e([$m(u)],!0));break;case Nm.ENTER:if(r(),void 0===l)return;break;case Nm.ESCAPE:if(void 0===l)return void o();if(!l())return;o();break;case Nm.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case Nm.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case Nm.A:if(y||v){t();break}return;case Nm.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const Um={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 Vm({index:e,rowIndex:t,columnIndex:n,style:r,data:o}){var i,a;const{onChange:s,onClick:l,onMouseDown:u,onMouseUp:d,onMouseEnter:p,onTouchStart:f,onTouchEnd:h,pages:m,isLocked:g,column:b=!1,checkboxes:y=!1,textAlign:v,direction:S,layoutOptions:w={},freqIsAllowed:x,isSingleSelect:k,actions:C,frequencyMax:L="",histogram:R=!1,keyboard:P,showGray:T=!0,showTick:O=!0,columnCount:I=1,rowCount:_=1,dataOffset:q,deducedFrequencyMode:M,focusListItems:N,listCount:A,sizes:D,translator:j,showSearch:$,isModal:z,contentFontStyle:F,styles:B,fillHeight:W}=o,{dense:H=!1,dataLayout:U="singleColumn",layoutOrder:V}=w,{itemPadding:G}=D;let K,J;const Q={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof n){"row"===V?(K=t*I+n,Q.max=_,Q.currentIndex=t):(K=n*_+t,Q.max=I,Q.currentIndex=n);const e=0;J=c(c({},r),{},{height:W?"100%":r.height,left:e+(0===n?r.left:Number(r.left)+n*e),top:0===t?r.top:Number(r.top)+t*e})}else K=e,Q.max=A,Q.currentIndex=e,J=c({},r);K+=q;const[X,Z]=E.useState(null);E.useEffect(()=>{null!==X&&(0===Q.currentIndex&&N.first&&(X.focus(),N.setFirst(!1)),Q.currentIndex===Q.max-1&&N.last&&(X.focus(),N.setLast(!1)))},[X,N.first,N.last]);const Y=E.useCallback(Hm(c(c({},C),{},{focusListItems:N,keyboard:P,isModal:z,rowCount:_,columnCount:I,rowIndex:t,columnIndex:n,layoutOrder:V})),[C,null==P?void 0:P.innerTabStops,_,I,t,n,V]),ee=E.useMemo(()=>function({pages:e,cellIndex:t}){let n;const r=e.filter(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight)[0];if(r){const e=r.qArea;t>=e.qTop&&t<e.qTop+e.qHeight&&([n]=r.qMatrix[t-e.qTop])}return n}({pages:m,cellIndex:K}),[m,K]),te="S"===(null==ee?void 0:ee.qState)||"XS"===(null==ee?void 0:ee.qState)||"L"===(null==ee?void 0:ee.qState)||"XL"===(null==ee?void 0:ee.qState),ne=E.useMemo(()=>sm({column:b,histogram:R,cell:ee,showGray:T}),[null==ee?void 0:ee.qState,R,H]),re=E.useCallback(e=>{e.preventDefault()},[y]),oe=E.useMemo(()=>ee&&function({direction:e,cell:t,textAlign:n}){const r=!["NaN",void 0].includes(null==t?void 0:t.qNum);let o;return o=!n||n.auto?r?"rtl"===e?"left":"right":{rtl:"right",ltr:"left"}[e]:(null==n?void 0:n.align)||"left",["left","center","right"].includes(o)?o:"left"}({direction:S,cell:ee,textAlign:v}),[S,ee,v]);if(!ee)return null;const ie="grid"===U&&"column"===V,ae=null!==(i=null==ee?void 0:ee.qText)&&void 0!==i?i:"";let se;if(null!==(a=ee.qHighlightRanges)&&void 0!==a&&null!==(a=a.qRanges)&&void 0!==a&&a.length){const e=ee.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];se=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,n=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}(ae,e)}const le={alignItems:"center",display:"flex",fontSize:"8px"},ce="rtl"===S,ue={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:ce?8:y?0:void 0,paddingRight:y?0:ce?8:0,justifyContent:oe,textAlign:oe},de=0===e,pe=te&&g,fe=!y&&te&&!g,he=!y&&O,me=y||!O,ge=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const s=Um[n],l=e.get(s),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${l}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:j,label:ae,qState:ee.qState,currentIndex:Q.currentIndex,maxIndex:Q.max,showSearch:$}),be=!ce&&"right"===oe||ce&&"left"===oe;return mr.jsx(gm,{className:Yh.barContainer,checkboxes:y,style:J,styles:B,isGridCol:ie,isGridMode:"grid"===U,dense:H,direction:S,sizes:D,frequencyMode:M,freqHitsValue:be,contentFontStyle:F,"data-testid":"listbox.item",children:mr.jsxs(Mm,{role:"row","aria-label":ge,"aria-selected":te,"aria-setsize":Q.max,"aria-rowindex":Q.currentIndex,ref:Z,container:!0,dataLayout:U,cellPaddingRight:me,layoutOrder:V,itemPadding:G,gap:0,className:lm(["value",Yh.fieldRoot,...ne]),onClick:l,onMouseDown:u,onMouseUp:d,onMouseEnter:p,onKeyDown:Y,onTouchStart:f,onTouchEnd:h,onContextMenu:re,tabIndex:de&&P.innerTabStops?0:-1,"data-n":null==ee?void 0:ee.qElemNumber,direction:S,fillHeight:W,children:[(null==ee?void 0:ee.qFrequency)&&mr.jsx(Im,{qFrequency:null==ee?void 0:ee.qFrequency,histogram:R,checkboxes:y,isSelected:te,frequencyMax:L}),mr.jsx(Qp,{style:ue,className:lm([Yh.cell,Yh.selectedCell]),title:`${ae}`,children:se?mr.jsx(Tm,{onChange:s,labels:se,checkboxes:y,dense:H,showGray:T,qElemNumber:ee.qElemNumber,isSelected:te,cell:ee,isGridCol:ie,isSingleSelect:k,valueTextAlign:oe,styles:B}):mr.jsx(Om,{onChange:s,label:ae,qElemNumber:ee.qElemNumber,isSelected:te,dense:H,cell:ee,isGridCol:ie,showGray:T,isSingleSelect:k,checkboxes:y,valueTextAlign:oe,styles:B})}),x&&mr.jsx(_m,{cell:ee,checkboxes:y,dense:H,showGray:T}),he&&mr.jsxs(Qp,{className:Yh.icon,children:[pe&&mr.jsx(Bh,{style:le,size:"small"}),fe&&mr.jsx(om,{style:le,size:"small"})]})]})})}var Gm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Km(e,t){return e===t||!(!Gm(e)||!Gm(t))}function Jm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Km(e[n],t[n]))return!1;return!0}function Qm(e,t){var n;void 0===t&&(t=Jm);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 Xm="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Zm(e){cancelAnimationFrame(e.id)}function Ym(e,t){var n=Xm();var r={id:requestAnimationFrame(function o(){Xm()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var eg=-1;function tg(e){if(void 0===e&&(e=!1),-1===eg||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),eg=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return eg}var ng=null;function rg(e){if(void 0===e&&(e=!1),null===ng||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?ng="positive-descending":(t.scrollLeft=1,ng=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),ng}return ng}var og=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function ig(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,Cl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Cl(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=Qm(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=Qm(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=Qm(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(rg()){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&&Zm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return ag(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=tg();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(rg()){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&&Zm(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?og:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),x=w[0],k=w[1],C=this._getVerticalRangeToRender(),L=C[0],R=C[1],P=[];if(r>0&&g)for(var T=L;T<=R;T++)for(var O=x;O<=k;O++)P.push(E.createElement(t,{columnIndex:O,data:d,isScrolling:y?S:void 0,key:f({columnIndex:O,data:d,rowIndex:T}),rowIndex:T,style:this._getItemStyle(T,O)}));var I=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return E.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ft({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},E.createElement(c||u||"div",{children:P,ref:l,style:{height:I,pointerEvents:S?"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}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var ag=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},sg=function(e,t){return e};function lg(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,Cl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Cl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Qm(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=Qm(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=Qm(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(rg()){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&&Zm(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ym(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return cg(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?tg():0:l.scrollHeight>l.clientHeight?tg():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(rg()){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&&Zm(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?sg:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,y=e.width,v=this.state.isScrolling,S="horizontal"===o||"horizontal"===f,w=S?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),k=x[0],C=x[1],L=[];if(c>0)for(var R=k;R<=C;R++)L.push(E.createElement(t,{data:u,key:p(R,u),index:R,isScrolling:b?v:void 0,style:this._getItemStyle(R)}));var P=r(this.props,this._instanceProps);return E.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:ft({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},E.createElement(s||l||"div",{children:L,ref:a,style:{height:S?"100%":P,pointerEvents:v?"none":void 0,width:S?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}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var cg=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ug=ig({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}}),dg=lg({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 pg="#BBB",fg="#f1f1f1",hg={styledScrollbars:"ListBox-styledScrollbars"};function mg({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:s}){const l="column"===(null==t?void 0:t.layoutOrder)&&"singleColumn"!==t.dataLayout,c=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(e,l),u=l?n.column:n.row,d=(l?r:o)>=u,p=((e,t,n,r)=>e===t*n+r+n)(a,c,l?o:r,s),f=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(e,l),h=d&&!p&&c>=u-1||f||i.state.show;i.set(h)}const{StyledFixedSizeList:gg,StyledFixedSizeGrid:bg}=function(){const e=e=>({scrollbarColor:`${pg} ${fg}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:fg},"&::-webkit-scrollbar-thumb":{backgroundColor:pg,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:ur(dg,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${hg.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:ur(ug,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${hg.styledScrollbars}`]:e(t)}))}}();const yg=(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)},vg=e=>{const t=E.useMemo(()=>"text"in e?e:{},[e]);return E.useMemo(()=>yg(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function Sg(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function wg({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function xg({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:s}){const{layoutOptions:l={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:p,dataLayout:f}=l,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==s?void 0:s.content)||{},g=`${h} ${m}`,b=vg({text:Sg(e),font:g}),y=vg({text:Sg(5),font:g}),v=vg({text:Sg(8),font:g}),S=i?y:0,w=a?20:0;let x=56+S+w;!a&&x>=80&&(x+=20);let k,C,E,L,R=b+18+S+w;!a&&R>=80&&(R+=20),R=Math.min(150,Math.max(R,x));const P=wg({isGridMode:"grid"===f,dense:p}),T=null!=n?n:8*P;if(c){let e=t;"row"===c?(k={overflowX:"hidden"},e+=8,({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleColumns:e,listCount:t,containerWidth:n,columnAutoWidth:r,itemMinWidth:o}){const i=(null==e?void 0:e.maxColumns)||3,a=n-10;let s;const l=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));s=!1!==(null==e?void 0:e.auto)?l:Math.min(t,i,l),s=Math.max(s,1);const c=a/s;return{rowCount:Math.ceil(t/s),columnWidth:c,columnCount:s}}({maxVisibleColumns:d,listCount:r,containerWidth:e,columnAutoWidth:R,itemMinWidth:x}))):(k={overflowY:"hidden"},({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let s;const l=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);s=!1!==e.auto?c:Math.min(n,l,c),s=Math.max(s,1);const u=Math.ceil(n/s);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:s}}({maxVisibleRows:u,itemHeight:P,listCount:r,listHeight:T,columnAutoWidth:R,containerWidth:e,itemMinWidth:x})))}C=("singleColumn"===f?1:C)||1,L=("singleColumn"===f?o:L)||r;const O=l.dense?838e3:577e3;L=Math.min(L,O);const I=Math.floor(3355e4/E);C=Math.min(C,I)||1;const _=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:k,itemHeight:P,listHeight:T,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,_),maxCount:{row:O,column:I},itemPadding:4,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function kg({pages:e,minimumBatchSize:t,count:n,calculatePagesHeight:r=!1}){const o=null!=e&&e.length&&r?(({pages:e=[],minimumBatchSize:t,count:n})=>{const r=e.some(e=>e.qArea.qHeight<t),o=Math.max(...e.map(e=>e.qArea.qTop+e.qArea.qHeight));return r?o:n})({pages:e,minimumBatchSize:t,count:n}):n;return o||0}const[Cg]=Cc({});function Eg(e){const t=`${e.id}`,[n]=Cg();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Lg=Ns(Xc,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>c({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function Rg({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=E.useContext(wc);return mr.jsx(Sh,{title:r?o.get(t):"",children:mr.jsx(Lg,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var Pg=Xs(mr.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"}));const Tg=Ns(zc)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),Og=Ns("div")(()=>({paddingLeft:"6px",flexGrow:1})),Ig=Ns("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),_g=Ns(Pg)(()=>({fontSize:"14px"}));function qg({text:e,dismiss:t,dense:n,parentWidth:r=0}){const o="function"==typeof t,i=n?370:282,a=Math.max(r/2-i/2,0),s=Math.min(i,r)-42,l=n&&r<i;return mr.jsxs(Tg,{left:a,style:{maxWidth:i},children:[mr.jsx(Og,{children:mr.jsx(Rg,{text:e,dense:n,width:s,tooltip:l})}),mr.jsx(Ig,{dense:n,children:o&&mr.jsx(Uc,{"aria-label":"close",onClick:()=>t(),children:mr.jsx(_g,{})})})]})}function Mg({itemWidth:e,layout:t,frequencyMode:n}){const r=e>80,{frequencyEnabled:o=!1}=(null==t?void 0:t.qListObject)||{},i=!["N",void 0].includes(n);return!(!r||!i&&!o)}const Ng=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,Ag=e=>{const t=Ng(e);return`Max(AGGR(Count(${t}), ${t}))`},Dg=(e,t)=>{const n=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[r,o]=E.useState(),[i,a]=E.useState(n);return E.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 jg=["isLoadingData"],$g=Ns("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function zg({model:e,app:t,constraints:n,layout:r,selections:o,selectionState:i,direction:a,checkboxes:s,height:l,width:d,frequencyMode:p,update:f,fetchStart:h,postProcessPages:m,calculatePagesHeight:g=!1,keyboard:b={},showGray:y=!0,scrollState:v,keyScroll:S={state:{},reset:()=>{}},currentScrollIndex:w={set:()=>{}},renderedCallback:x,onCtrlF:k,showSearch:C,isModal:L,styles:R}){var P,T;const{translator:O}=E.useContext(wc),[I,_]=E.useState(!1),q=!(!r||!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:M=s,histogram:N}=null!=r?r:{},A=E.useRef(null),D=E.useRef({queue:[],validPages:!1,dataOffset:0}),j=E.useRef({pages:[]}),{frequencyMax:$,awaitingFrequencyMax:z}=Dg(t,r),F=function({local:e,loaderRef:t,model:n,fetchStart:r,scrollTimeout:o,postProcessPages:i,listData:a}){const[s,l]=E.useState(!1),[c,u]=E.useState([]);let[d]=E.useState(0);const p=(s,c)=>{const p=e.current.dataOffset;e.current.queue.push({start:s+p,stop:c+p});const f=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),l(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const o=e.current.queue.slice(-1)[0];if(!o)return l(!1),void t();const s=n.getListObjectData("/qListObjectDef",[{qTop:o.start>d?o.start-d:0,qHeight:d,qLeft:0,qWidth:1},{qTop:o.start,qHeight:d,qLeft:0,qWidth:1}]).then(n=>{const r=i?i(n):n;e.current.validPages=!0,a.current.pages=r,u(r),l(!1),t()});r&&r(s)},f?o:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(d=e),p)},pages:c,isLoading:s}}({local:D,loaderRef:A,model:e,fetchStart:h,scrollTimeout:0,postProcessPages:m,listData:j}),{isLoadingData:B}=F,W=u(F,jg),{getStoreValue:H,setStoreValue:U}=Eg(e),V=E.useCallback(W.loadMoreItems,[r]),[G,K]=E.useState({show:!1,dismissed:!1}),[J,Q]=E.useState([]);null!=W&&W.pages&&i.update({setPages:Q,pages:W.pages,isSingleSelect:q,layout:r});const X=null==r?void 0:r.qListObject.qDimensionInfo.qCardinal;(null!=W&&W.pages.length&&!z||0===X)&&(null==x||x());const Z=E.useCallback(e=>{if(null==J||!J.length||!D.current.validPages)return!1;D.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=J.filter(e=>t(e))[0];return n&&t(n)},[r,J]),{interactionEvents:Y,select:ee}=nm({selectionState:i,selections:o,checkboxes:M,doc:document,loaderRef:A}),{layoutOptions:te={}}=r||{};let ne=!0;te.dataLayout&&(ne="singleColumn"===te.dataLayout||"row"===(null==te?void 0:te.layoutOrder));const re="grid"===(null==te?void 0:te.dataLayout),oe=e=>{const t=c({},ne?{rowIndex:e}:{columnIndex:e}),n=re?t:e;A.current._listRef.scrollToItem(n)},ie=()=>{if(D.current.queue=[],D.current.validPages=!1,A.current){A.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===S.state.scrollPosition;if(r&&r.qSelectionInfo.qInSelections||e)return void(e&&S.reset());D.current.dataOffset=0,oe(0)}};f&&f.call(null,ie),E.useEffect(()=>{v&&!I&&A.current&&(A.current._listRef.scrollToItem(v.initScrollPos),_(!0))},[A.current]),E.useEffect(()=>{ie()},[r,D.current.dataOffset]);let ae=100;const se="grid"!==te.dataLayout,le=null==r||null===(P=r.qListObject.qSize)||void 0===P?void 0:P.qcy,ce=kg({pages:J,minimumBatchSize:ae,count:le,calculatePagesHeight:g});let ue=Mg({itemWidth:d,layout:r,frequencyMode:p});const de=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(J),pe=xg({layout:r,width:d,height:l,listCount:ce,count:le,freqIsAllowed:ue,checkboxes:M,styles:R});pe.columnWidth&&(ue=Mg({itemWidth:pe.columnWidth,layout:r,frequencyMode:p}));const{listCount:fe}=pe;U("listCount",fe);const he=H("inputText"),me=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=E.useContext(wc),o=[];if(null!=t&&t.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}(n),t=r.get(e,[n]);o.push(t)}const i=function({layout:e,translatorDynamic:t}){var n;const{qStateCounts:r={}}=(null==e||null===(n=e.qListObject)||void 0===n?void 0:n.qDimensionInfo)||{},o=r.qSelected+r.qSelectedExcluded+r.qLocked+r.qLockedExcluded;let i;switch(o){case 0:i="ScreenReader.ZeroSelected";break;case 1:i="ScreenReader.OneSelected";break;default:i="ScreenReader.ManySelected"}return t.get(i,[o])}({layout:e,translatorDynamic:r});o.push(i);const a=o.filter(e=>!(null==e||!e.length)).join(". ");return a}({layout:r,searchInputText:he,listCount:fe}),ge=e=>{const{scrollIndex:t,offset:n,triggerRerender:o}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,s=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":s=0,i=0,a=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:s,triggerRerender:a}}({position:e,isRow:ne,sizes:pe,layout:r,offset:D.current.dataOffset});D.current.dataOffset=n,o&&i.triggerStateChanged(),oe(t)};E.useEffect(()=>{const e=S.state;e.up?oe(w.state.start-e.up):e.down?oe(w.state.stop+e.down):e.scrollPosition&&ge(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&S.reset()},[S.state.up,S.state.down,S.state.scrollPosition]);const{textAlign:be}=(null==r?void 0:r.qListObject.qDimensionInfo)||{},[ye,ve]=E.useState({first:!1,last:!1}),{List:Se,Grid:we}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:s,deducedFrequencyMode:l,histogram:u,isSingleSelect:d,select:p,selectAll:f,onCtrlF:h,textAlign:m,selections:g,keyboard:b,showGray:y,scrollState:v,direction:S,sizes:w,listCount:x,overflowDisclaimer:k,setScrollPosition:C,focusListItems:E,setCurrentScrollIndex:L,constraints:R,frequencyMax:P,freqIsAllowed:T,translator:O,showSearch:I,isModal:_,styles:q}){const{layoutOptions:M={}}=e||{},{columnWidth:N,listHeight:A,itemHeight:D,rowCount:j,columnCount:$}=w||{},z=("grid"===M.dataLayout?N:t)>80,F={direction:"rtl"===S?"rtl":"ltr",useIsScrolling:!0,className:hg.styledScrollbars},B=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,W=A<=D,H=c(c({isLocked:B,column:!o,pages:i},B||a.selectDisabled()?{}:s),{},{checkboxes:n,layoutOptions:M,deducedFrequencyMode:l,freqIsAllowed:T,isSingleSelect:d,textAlign:m,sizes:w,actions:{select:p,confirm:()=>null==g?void 0:g.confirm.call(g),cancel:()=>null==g?void 0:g.cancel.call(g),setScrollPosition:C,selectAll:f,onCtrlF:h},frequencyMax:P,histogram:u,keyboard:b,showGray:y,showTick:z,dataOffset:r.current.dataOffset,focusListItems:E,direction:S,translator:O,showSearch:I,isModal:_,styles:q,fillHeight:W});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,mr.jsx(gg,c(c({},F),{},{dataTestid:"fixed-size-list",scrollDisabled:null==R?void 0:R.active,height:A,width:t,itemCount:x,itemData:c(c({},H),{},{listCount:x}),itemSize:D,onItemsRendered:t=>{var o;L({start:t.visibleStartIndex,stop:t.visibleStopIndex}),v&&v.setScrollPos(t.visibleStopIndex),mg({renderProps:t,layoutOptions:M,maxCount:w.maxCount,columnCount:$,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(c({},t))},ref:o,children:Vm}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=w,{layoutOrder:s}=M||{},l=Math.min(A,j*D+a);return r.current.listRef=o,mr.jsx(bg,c(c({},F),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==R?void 0:R.active,height:l,width:t,columnCount:$,columnWidth:N,rowCount:j,rowHeight:D,style:c({},i),itemData:c(c({},H),{},{column:void 0,columnCount:$,rowCount:j}),onItemsRendered:t=>{var o;const i="row"===s;L({start:i?t.visibleRowStartIndex:t.visibleColumnStartIndex,stop:i?t.visibleRowStopIndex:t.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:t,scrollState:v,layoutOrder:s,rowCount:j,columnCount:$});mg({renderProps:t,layoutOptions:M,maxCount:w.maxCount,columnCount:$,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(a)},ref:o,children:Vm}))}}}({direction:a,layout:r,width:d,checkboxes:M,deducedFrequencyMode:de,histogram:N,keyboard:b,showGray:y,interactionEvents:Y,select:ee,selectAll:()=>{i.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:k,textAlign:be,isVertical:se,pages:J,selectionState:i,isSingleSelect:q,selections:o,scrollState:v,local:D,sizes:pe,listCount:fe,overflowDisclaimer:{state:G,set:e=>K(t=>c(c({},t),{},{show:e}))},setScrollPosition:ge,focusListItems:{first:ye.first,setFirst:e=>ve(t=>c(c({},t),{},{first:e})),last:ye.last,setLast:e=>ve(t=>c(c({},t),{},{last:e}))},setCurrentScrollIndex:w.set,constraints:n,frequencyMax:$,freqIsAllowed:ue,translator:O,showSearch:C,isModal:L,styles:R}),{columnWidth:xe,listHeight:ke,itemHeight:Ce}=pe||{};return se||(ae=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:d,columnWidth:xe,listHeight:ke,itemHeight:Ce})),mr.jsxs($g,{children:[mr.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:me}),!fe&&X>0&&mr.jsx(Rg,{width:d,text:"Listbox.NoMatchesForYourTerms"}),mr.jsx(Gh,{isItemLoaded:Z,itemCount:fe||1,loadMoreItems:V.with({minimumBatchSize:ae}),threshold:0,minimumBatchSize:ae,ref:A,role:"grid",children:se?Se:we}),G.show&&!G.dismissed&&mr.jsx(qg,{text:"Listbox.ItemsOverflow",dismiss:()=>K(e=>c(c({},e),{},{dismissed:!0})),parentWidth:null==A||null===(T=A.current)||void 0===T||null===(T=T._listRef)||void 0===T||null===(T=T.props)||void 0===T?void 0:T.width,dense:null==te?void 0:te.dense})]})}const Fg=e=>c(c({},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"}}]}),Bg=e=>c(c({},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"}}]}),Wg=e=>c(c({},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"}}]}),Hg=e=>c(c({},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 Ug=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",s=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:Fg,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:Wg,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:Bg,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:Hg,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const Vg=e=>c(c({},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 Gg(e){const t=qs(),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 Kg={className:"njs-cell-action"},Jg=L.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=qs(),{hidden:o,disabled:i,style:a,hasSvgIconShape:s}=Gg(e);if(o)return null;const l=Number.parseInt(r.spacing(.5),10),c=e.keyboardAction||e.action,u=c?e=>["Enter"].includes(e.key)&&c():null,d=c?e=>[" ","Spacebar"].includes(e.key)&&c():null,p=`actions-toolbar-${e.key}`,f=e.ref||(t?null:n);return mr.jsxs(Uc,{ref:f,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[Kg.className,p].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":p,children:[s&&zh(e.getSvgIconShape()),t&&mr.jsx("div",{ref:n,style:{bottom:-l,right:0,position:"absolute",width:"100%",height:0}})]})}),Qg=e=>c(c({},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=>zh(Qg(e));const Zg=e=>c(c({},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 Yg=e=>zh(Zg(e));const eb="njs-action-toolbar-more",tb={icon:"More-icon"},nb=Ns($f)(({theme:e})=>({pointerEvents:"none",[`& .${tb.icon} *`]:{color:e.palette.text.primary}}));function rb({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=Gg(e);return r?null:mr.jsxs(Xf,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&mr.jsx(Ef,{className:tb.icon,children:zh(e.getSvgIconShape())}),mr.jsx(Xc,{noWrap:!0,children:e.label})]})}const ob=L.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},s)=>{const l=e.length>0,u=e.findIndex(e=>!e.disabled);return l&&mr.jsx(nb,c(c({},r),{},{onClose:i,ref:s,open:t,anchorEl:n.current,getContentAnchorEl:a?null:void 0,container:a?n.current:void 0,disablePortal:a,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:eb},paper:{style:c({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:mr.jsx(If,{id:"moreMenuList",children:e.map((e,t)=>mr.jsx(rb,{item:e,autoFocus:t===u,onActionClick:i},t))})}))});function ib({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:s}=i,{keyCode:l}=s;switch(l){case Nm.ARROW_LEFT:case Nm.ARROW_DOWN:case Nm.ARROW_RIGHT:case Nm.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(a);let t=[Nm.ARROW_LEFT,Nm.ARROW_DOWN].includes(l);t=o?!t:t,(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()})(t?e-1:e+1)}i.stopPropagation(),i.preventDefault();break;case Nm.SPACE:i.preventDefault();break;case Nm.TAB:if(e&&null!=t&&t.refocusContent){(i.shiftKey&&n(!1)===i.target||!i.shiftKey&&n(!0)===i.target)&&(i.preventDefault(),i.stopPropagation(),t.refocusContent())}break;case Nm.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const ab="ActionsToolbar",sb={item:`${ab}-item`,itemSpacing:`${ab}-itemSpacing`},lb=Ns($f)(({theme:e})=>({[`& .${sb.itemSpacing}`]:{padding:e.spacing(0,.25)}})),cb="njs-action-toolbar-popover",ub=L.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?mr.jsx(Qp,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>mr.jsx(Qp,{className:`${sb.itemSpacing} ${sb.item}`,children:mr.jsx(Jg,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),db={pointerEvents:"none"};function pb({show:e=!0,actions:t=[],maxItems:n=3,selections:r={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:o,more:i={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:a={show:!1,anchorEl:null},focusHandler:s=null,actionsRefMock:l=null,isRtl:u,autoConfirm:d=!1,layout:p}){var f,h;const m=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=E.useContext(wc);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:Zg},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:Qg},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:rm}]}(c(c({},r),{},{layout:p})),{translator:g,keyboardNavigation:b}=E.useContext(wc),[y,v]=E.useState(!1),S={vertical:12,horizontal:u?0:(null!==(f=null===(h=a.anchorEl)||void 0===h?void 0:h.clientWidth)&&void 0!==f?f:0)-7},w={vertical:"bottom",horizontal:u?-7:"right"},x=E.useRef(),k=E.useRef(),C=qs(),L=E.useMemo(()=>({margin:C.spacing(.5,0)})),R=e=>{const t=x.current||l;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},P=E.useMemo(()=>ib({keyboardNavigation:b,focusHandler:s,getEnabledButton:R,selections:r,isRtl:u}),[b,s,R,r,u]);if(E.useEffect(()=>()=>{v(!1)},[a.show,e,r.show]),E.useEffect(()=>{if(!s)return;s.on("focus_toolbar_first",()=>{const e=R(!1);null==e||e.focus()}),s.on("focus_toolbar_last",()=>{const e=R(!0);null==e||e.focus()})},[]),d)return;let T=i.enabled,O=i.actions;const I=i.alignTo||k,_=t.filter(e=>!e.hidden);if(_.length>n){const e=_.splice(-(_.length-n)-1);T=!0,O=[...e,...i.actions]}if(!r.show&&0===_.length&&!T)return null;const q={key:"more",label:g.get("Menu.More"),getSvgIconShape:Vg,hidden:!1,active:y,enabled:()=>T,action:()=>v(!y)},M=_.length>0,N=O.length>0,A=M&&r.show||N&&r.show,D=mr.jsxs(Qp,{ref:x,onKeyDown:P,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:u?"row-reverse":"row"},children:[(null==o?void 0:o.length)&&mr.jsx(ub,{className:"actions-toolbar-extra-actions",actions:o,isRtl:u}),M&&mr.jsx(ub,{actions:_}),N&&mr.jsx(ub,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:k,actions:[q],addAnchor:!0}),A&&mr.jsx(Qp,{className:sb.itemSpacing,style:L,children:mr.jsx(Hp,{orientation:"vertical"})}),r.show&&mr.jsx(ub,{className:"actions-toolbar-default-actions",actions:m,isRtl:u}),y&&mr.jsx(ob,{show:y,actions:O,alignTo:I,popoverProps:i.popoverProps,popoverPaperStyle:i.popoverPaperStyle,onCloseOrActionClick:()=>{v(!1)},disablePortal:i.disablePortal})]});return a.show?mr.jsx(lb,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:a.show,anchorEl:a.anchorEl,anchorOrigin:S,transformOrigin:w,hideBackdrop:!0,style:db,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:cb,style:{pointerEvents:"auto",padding:C.spacing(.5,.25)}}},children:D}):e&&D}var fb=e=>zh((e=>c(c({},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 hb="/qListObjectDef",mb=e=>null==e?void 0:e.substring(0,64e3),gb=Ns(Jf,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})(({styles:e,dense:t,isRtl:n})=>{let r={};return t&&(r={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:e.search.color,textAlign:n?"right":"left"}}),c({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:e.search.backgroundColor,backdropFilter:e.background.backgroundImage?e.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:n?"row-reverse":"row","& fieldset":{borderColor:`${e.search.borderColor}`,borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:`${e.search.highlightBorderColor} !important`},"& .MuiInputBase-root":c({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),bb=Ns(Uc)(()=>({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 yb=E.forwardRef(function({popoverOpen:e,selections:t,selectionState:n,model:r,keyboard:o,dense:i=!1,visible:a=!0,autoFocus:s=!0,beginSelectionOnFocus:l=!0,wildCardSearch:c=!1,searchEnabled:u,direction:d,hide:p,styles:f},h){const{translator:m}=E.useContext(wc),[g,b]=E.useState(""),[y,v]=E.useState(!1),S=E.useRef(),w=E.useRef(),x=m.get("Listbox.Clear.Search"),{getStoreValue:k,setStoreValue:C}=Eg(r),L="rtl"===d,R=async()=>{try{await r.abortListObjectSearch(hb)}finally{b("")}};E.useEffect(()=>a?()=>R():()=>{},[a]),E.useEffect(()=>(t.on("deactivated",R),()=>{t.removeListener&&t.removeListener("deactivated",R)}),[]),E.useEffect(()=>{if(y&&S.current){const e=g.length-1;S.current.setSelectionRange(e,e),v(!1)}},[y,S.current]),E.useEffect(()=>{C("inputText",g)},[g]);const P=async()=>{let e;const o=mb(g),i=await r.searchListObjectFor(hb,o);return n.selectDisabled()?i:(i&&o.length&&k("listCount")>0&&(e=r.acceptListObjectSearch(hb,!0),t.selectionsMade=!0,n.clearItemStates(!1),b("")),e)},T=()=>{var e;null===(e=S.current)||void 0===e||e.focus()},O=()=>{R(),T()};return E.useImperativeHandle(h,()=>({focus(){T()}})),a&&!1!==u?mr.jsxs(mr.Fragment,{children:[mr.jsx(gb,{styles:f,dense:i,isRtl:L,startAdornment:mr.jsx(cf,{position:"start",sx:{marginLeft:i?"8px":"9px"},children:mr.jsx(fb,{size:i?"small":"normal"})}),endAdornment:mr.jsx(cf,{position:"end",sx:{marginLeft:0},children:""!==g&&mr.jsx(bb,{tabIndex:0,ref:w,title:x,"aria-label":x,onClick:O,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":O();break;case"Tab":e.shiftKey?T():Fm(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:mr.jsx(Xg,{size:i?"small":"normal"})})}),className:"search",inputRef:S,size:"small",fullWidth:!0,placeholder:m.get("Listbox.Search"),value:g,onFocus:()=>{c&&(b("**"),v(!0)),l&&!n.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=mb(e.target.value);return b(t),t.length?r.searchListObjectFor(hb,t):R()},onKeyDown:async n=>{const{currentTarget:r}=n,i=r.closest(".listbox-container");switch(n.key){case"Enter":P();break;case"Escape":if(Fm(i),t.cancel(),e)return;break;case"Tab":n.shiftKey?Bm(i)||o.focusSelection():w.current?w.current.focus():Fm(i);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;p&&(p(),Fm(i));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:s,inputProps:{tabIndex:o.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":m.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),mr.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:m.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function vb(e){if(!e.session)return[];const{selectionStore:t}=E.useContext(wc),[n]=t.useAppSelectionsStore(),r=e?e.id:null;let o=n.get(r);return E.useEffect(()=>{e&&!o&&(o=function({app:e,selectionStore:t}){const n=`${e.id}`,{modalObjectStore:r,appModalStore:o}=t,i=async(e=!0)=>{const{model:t,objectSelections:o}=r.get(n)||{};t&&(await t.endSelections(e),r.clear(n),o.emit("deactivated"))},a={begin:async({model:t,paths:o,accept:a=!0,objectSelections:s})=>{var l;if(s===(null===(l=r.get(n))||void 0===l?void 0:l.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:s});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:s})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const s={model:e,isInModal:()=>!!r.get(n),isModal(e){var t;return e?(null===(t=r.get(n))||void 0===t?void 0:t.objectSelections)===e:!!r.get(n)},forward:()=>a.end().then(()=>e.forward()),back:()=>a.end().then(()=>e.back()),clear:()=>a.end().then(()=>e.clearAll()),clearField:(t,n="$")=>a.end().then(()=>e.getField(t,n).then(e=>e.clear()))};return s}({app:e,selectionStore:t}),n.set(r,o),n.dispatch(!0))},[e]),[o]}function Sb(e){return Object.keys(M.prototype).forEach(t=>{e[t]=M.prototype[t]}),M.init(e),e}const wb=({appSelections:e,appModal:t,model:n})=>{let r,o=!1,i=!1;const a={id:n.id,setLayout(e){r=e},begin(e){const r=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",r),r.isPrevented()?Promise.resolve():(o=!0,this.emit("activated"),t.begin({model:n,paths:e,accept:!0,objectSelections:a}))},clear(){return i=!1,this.emit("cleared"),r.qListObject?n.clearSelections("/qListObjectDef"):n.resetMadeSelections()},confirm(){return i=!1,o=!1,this.emit("confirmed"),this.emit("deactivated"),t.end(!0)},cancel(){return i=!1,o=!1,this.emit("canceled"),this.emit("deactivated"),t.end(!1)},async select(t){const r=this.begin([t.params[0]]);if(!e.isModal())return!1;await r;const o=await n[t.method](...t.params);return i="resetMadeSelections"!==t.method,!!o||(n.resetMadeSelections(),!1)},canClear:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked&&!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne:i,canConfirm:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked:i,canCancel:()=>!(r&&r.qListObject&&r.qListObject.qDimensionInfo)||!r.qListObject.qDimensionInfo.qLocked,isActive:()=>o,isModal:()=>e.isModal(a),goModal:e=>t.begin({model:n,paths:e,accept:!1,objectSelections:a}),noModal:(e=!1)=>t.end(e)};return Sb(a),a},xb=({elements:e,objectSelections:t,options:n={}})=>{const r=function({elements:e,handleClickOutside:t}){return n=>{if(!document.contains(n.target))return;const r=e.map(e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current).filter(e=>!!e&&!!document.contains(e));r.length&&!r.some(e=>e.contains(n.target))&&t(n)}}({elements:e,handleClickOutside:()=>t.confirm.call(t)});return{activateClickOut(){var e;document.addEventListener("mousedown",r),null==n||null===(e=n.onSelectionActivated)||void 0===e||e.call(n)},deactivateClickOut(){var e;document.removeEventListener("mousedown",r),null==n||null===(e=n.onSelectionDeactivated)||void 0===e||e.call(n)}}};function kb(e,t,n,r){const o=Array.isArray(n)?n:[n],[i]=vb(e),[a]=Rh(t),{appModalStore:s}=E.useContext(wc).selectionStore,l=s.get(e.id),[c,u]=E.useState();return E.useEffect(()=>{i&&t&&!c&&u(wb({appSelections:i,appModal:l,model:t}))},[i,t]),E.useEffect(()=>{if(!c)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=xb({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]),E.useEffect(()=>{c&&c.setLayout(a)},[c,a]),[c]}function Cb(e={}){const t=c(c({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},e),{},{update({setPages:e,pages:n,isSingleSelect:r,selectDisabled:o,layout:i}){var a,s;this.setPages=e;const l=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;l&&c||(this.lastRowCount=i.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=i.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),t.enginePages!==n&&void 0!==n&&(t.enginePages=null!=n?n:[],t.selectedInEngine=Qh(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(s=i.qListObject)||void 0===s||null===(s=s.qDimensionInfo)||void 0===s?void 0:s.qIsCalculated)&&void 0!==a&&a},allowedToSelect:()=>!t.selectDisabled()&&!(t.isDimCalculated&&t.selectableValuesUpdating),setSelectableValuesUpdating(){t.selectableValuesUpdating=!0},useClientItemState:e=>t.ignoreSelectionState||e in t.itemStates,isSelected:e=>t.useClientItemState(e)?!!t.itemStates[e]:t.selectedInEngine.includes(e),getState(e){const{qElemNumber:n,qState:r}=e;return t.useClientItemState(n)?t.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(e,n,r){const o=t.isSelected(e);o&&!n?t.itemStates[e]=!1:o||(null==r||r.push(e),t.itemStates[e]=!0)},triggerStateChanged(){if(this.setPages){const e=t.applySelectionsOnPages(t.enginePages);this.setPages(e)}},applySelectionsOnPages(e){const n=e.map(e=>{const n=e.qMatrix.map(e=>{const[n]=e,r=t.getState(n);return[c(c({},n),{},{qState:r}),...e.slice(1)]});return c(c({},e),{},{qMatrix:n})});return n},updateItem(e,n,r){t.updateItemNoEvents(e,n,r),t.triggerStateChanged()},updateItems(e,n,r){e.forEach(e=>{t.updateItemNoEvents(e,n,r)}),t.triggerStateChanged()},clearItemStates(e){t.itemStates={},t.ignoreSelectionState=e}});return t}const Eb=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Lb(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Eb(t,"qSelected",0)+Eb(t,"qSelectedExcluded",0)+Eb(t,"qLocked",0)+Eb(t,"qLockedExcluded",0)>0}function Rb(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 Pb(e){if("object"==typeof e&&Rb(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}},Ob="qcm-color";function Ib(...e){const t={type:Ob,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===Ob)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Rb(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 _b(e){let t,n,r;if(Rb(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?Pb(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 qb(e){let t,n,r=0;const o="string"==typeof e?Ib(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 Mb(e){let t,n,r=0;const o="string"==typeof e?Ib(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 Nb(e){if(Rb(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?Pb(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Ab(e,t){return Rb(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Ab(Ib(e))}function Db(e){return Rb(e)?1===e.a?Nb(e):Ab(e):Db(Ib(e))}const jb=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function $b(e){return.2126*jb(e.r)+.7152*jb(e.g)+.0722*jb(e.b)}function zb(...e){const t=Ib(...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=qb(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=Ib(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=Ib(...e);return t.invalid||$b(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=Nb(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Ab(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=Db(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=_b(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?Ib(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}=qb(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}=Mb(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=Mb(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)=>zb(o(18*e)),getDarkenedColor:(e=1)=>zb(o(18*-e))}}function Fb(e,t){if(!e||!t)return;const n=$b(e),r=$b(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const Bb="#FFFFFF";function Wb(e,t){const n=zb(Bb),r=zb(e),o=zb(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?Bb:"#000000"}function Hb(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 Ub,Vb,Gb,Kb="top",Jb="top-right",Qb="right",Xb="bottom-right",Zb="bottom",Yb="bottom-left",ey="left",ty="top-left";Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Ub={},"equal-equal",[Kb,Zb]),"equal-higher",[Zb,Xb]),"equal-lower",[Kb,Jb]),"equal-void",[Kb,Zb]),"higher-equal",[ey,Yb,Kb,Jb]),"higher-higher-acute",[Zb,Yb,ey,Jb]),"higher-higher-obtuse",[Zb,Kb]),"higher-lower-negative",[Kb,Jb,Qb]),"higher-lower-positive",[Zb,Yb,ey]),"higher-void",[Kb]),Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Hb(Ub,"lower-equal",[Kb]),"lower-higher-negative",[Kb,ty]),"lower-higher-positive",[Xb]),"lower-lower-acute",[Kb,ty,ey,Jb,Qb]),"lower-lower-obtuse",[Kb,Zb]),"lower-void",[Kb]),"void-equal",[Kb]),"void-higher",[Kb,Zb]),"void-lower",[Kb,Zb,ey]),"void-void",[Kb]),Hb(Ub,"unclassified",[Kb,Zb,Qb,ey,Jb,Xb,Yb,ty]);var ny=function(){if(Gb)return Vb;Gb=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 Vb=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},Vb}();function ry(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function oy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function iy(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(ny);var ay=.7,sy=1/ay,ly="\\s*([+-]?\\d+)\\s*",cy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dy=/^#([0-9a-f]{3,8})$/,py=new RegExp(`^rgb\\(${ly},${ly},${ly}\\)$`),fy=new RegExp(`^rgb\\(${uy},${uy},${uy}\\)$`),hy=new RegExp(`^rgba\\(${ly},${ly},${ly},${cy}\\)$`),my=new RegExp(`^rgba\\(${uy},${uy},${uy},${cy}\\)$`),gy=new RegExp(`^hsl\\(${cy},${uy},${uy}\\)$`),by=new RegExp(`^hsla\\(${cy},${uy},${uy},${cy}\\)$`),yy={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 vy(){return this.rgb().formatHex()}function Sy(){return this.rgb().formatRgb()}function wy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?xy(t):3===n?new Ly(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ky(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ky(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=py.exec(e))?new Ly(t[1],t[2],t[3],1):(t=fy.exec(e))?new Ly(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=hy.exec(e))?ky(t[1],t[2],t[3],t[4]):(t=my.exec(e))?ky(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=gy.exec(e))?_y(t[1],t[2]/100,t[3]/100,1):(t=by.exec(e))?_y(t[1],t[2]/100,t[3]/100,t[4]):yy.hasOwnProperty(e)?xy(yy[e]):"transparent"===e?new Ly(NaN,NaN,NaN,0):null}function xy(e){return new Ly(e>>16&255,e>>8&255,255&e,1)}function ky(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ly(e,t,n,r)}function Cy(e){return e instanceof iy||(e=wy(e)),e?new Ly((e=e.rgb()).r,e.g,e.b,e.opacity):new Ly}function Ey(e,t,n,r){return 1===arguments.length?Cy(e):new Ly(e,t,n,null==r?1:r)}function Ly(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ry(){return`#${Iy(this.r)}${Iy(this.g)}${Iy(this.b)}`}function Py(){const e=Ty(this.opacity);return`${1===e?"rgb(":"rgba("}${Oy(this.r)}, ${Oy(this.g)}, ${Oy(this.b)}${1===e?")":`, ${e})`}`}function Ty(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oy(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Iy(e){return((e=Oy(e))<16?"0":"")+e.toString(16)}function _y(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new My(e,t,n,r)}function qy(e){if(e instanceof My)return new My(e.h,e.s,e.l,e.opacity);if(e instanceof iy||(e=wy(e)),!e)return new My;if(e instanceof My)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 My(a,s,l,e.opacity)}function My(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ny(e){return(e=(e||0)%360)<0?e+360:e}function Ay(e){return Math.max(0,Math.min(1,e||0))}function Dy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ry(iy,wy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vy,formatHex:vy,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return qy(this).formatHsl()},formatRgb:Sy,toString:Sy}),ry(Ly,Ey,oy(iy,{brighter(e){return e=null==e?sy:Math.pow(sy,e),new Ly(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ay:Math.pow(ay,e),new Ly(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ly(Oy(this.r),Oy(this.g),Oy(this.b),Ty(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:Ry,formatHex:Ry,formatHex8:function(){return`#${Iy(this.r)}${Iy(this.g)}${Iy(this.b)}${Iy(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Py,toString:Py})),ry(My,function(e,t,n,r){return 1===arguments.length?qy(e):new My(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return e=null==e?sy:Math.pow(sy,e),new My(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ay:Math.pow(ay,e),new My(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 Ly(Dy(e>=240?e-240:e+120,o,r),Dy(e,o,r),Dy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new My(Ny(this.h),Ay(this.s),Ay(this.l),Ty(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=Ty(this.opacity);return`${1===e?"hsl(":"hsla("}${Ny(this.h)}, ${100*Ay(this.s)}%, ${100*Ay(this.l)}%${1===e?")":`, ${e})`}`}}));const jy=Math.PI/180,$y=180/Math.PI,zy=.96422,Fy=.82521,By=4/29,Wy=6/29,Hy=3*Wy*Wy,Uy=Wy*Wy*Wy;function Vy(e){if(e instanceof Gy)return new Gy(e.l,e.a,e.b,e.opacity);if(e instanceof Zy)return Yy(e);e instanceof Ly||(e=Cy(e));var t,n,r=Xy(e.r),o=Xy(e.g),i=Xy(e.b),a=Ky((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ky((.4360747*r+.3850649*o+.1430804*i)/zy),n=Ky((.0139322*r+.0971045*o+.7141733*i)/Fy)),new Gy(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Gy(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ky(e){return e>Uy?Math.pow(e,1/3):e/Hy+By}function Jy(e){return e>Wy?e*e*e:Hy*(e-By)}function Qy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Zy(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Yy(e){if(isNaN(e.h))return new Gy(e.l,0,0,e.opacity);var t=e.h*jy;return new Gy(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ry(Gy,function(e,t,n,r){return 1===arguments.length?Vy(e):new Gy(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return new Gy(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Gy(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 Ly(Qy(3.1338561*(t=zy*Jy(t))-1.6168667*(e=1*Jy(e))-.4906146*(n=Fy*Jy(n))),Qy(-.9787684*t+1.9161415*e+.033454*n),Qy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ry(Zy,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Zy)return new Zy(e.h,e.c,e.l,e.opacity);if(e instanceof Gy||(e=Vy(e)),0===e.a&&0===e.b)return new Zy(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*$y;return new Zy(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Zy(e,t,n,null==r?1:r)},oy(iy,{brighter(e){return new Zy(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Zy(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Yy(this).rgb()}}));var ev=e=>()=>e;function tv(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ev(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?tv: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):ev(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ey(e)).r,(t=Ey(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=tv(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 nv,rv="center",ov="bottom";function iv(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 av(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=lv)):void 0===t&&(t=sv);for(var n,r,o,i,a,s=new dv(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 dv(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(uv)}function sv(e){return e.children}function lv(e){return Array.isArray(e)?e[1]:null}function cv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function uv(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function dv(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:rv,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:rv,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:rv,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:rv},{key:"DataRangeIncludingZero",alignment:ov},{key:"LimitedData",alignment:ov},{key:"NegativeOrZeroValues",alignment:ov}].reduce(function(e,t){return e[t.key]=t,e},{}),dv.prototype=av.prototype={constructor:dv,count:function(){return this.eachAfter(iv)},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 av(this).eachBefore(cv)},[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)}},nv=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}},nv({exports:{}});const pv=/,(?![^(]*\))/,fv=/\s(?![^(]*\))/,hv=/^[0-9]+[a-zA-Z%]+?$/,mv=["none","inset","initial","inherit"],gv=e=>{if(!e)return;const t=e.split(fv).filter(e=>!mv.includes(e.toLowerCase())).at(-1),n=!t||(e=>"0"===e||hv.test(e))(t)||mv.includes(t.toLowerCase())?void 0:t;return n},bv=e=>e?e.split(pv).map(e=>e.trim()):[];function yv(e,t,n,r){return n&&r?n.getStyle(`object.${r}`,e,t):n?n.getStyle("",e,t):void 0}function vv(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:yv(t,n,r,o)}const Sv={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},wv={"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 xv(e,t,n){if(t)return n?n+t:function(e){var t;let n,r,o,i;if(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://";const t="/"===r.pathname?"":r.pathname.replace(/\/app\/.*$/,"");return o+r.host+t}return""}(e)+t}function kv(e,t,n,r){const o=null==e?void 0:e.bgImage;if(o){let i="";if("media"===o.mode||"media"===e.useImage){let e;const a=null==o?void 0:o.mediaUrl,{qUrl:s}=(null==a?void 0:a.qStaticContentUrl)||{};i=s?decodeURIComponent(s):void 0,i=xv(t,i,r),n&&(e=Object.entries(n).map(([e,t])=>`&${e}=${encodeURIComponent(t)}`).join("&"),i=`${i}?${e}`)}"expression"===o.mode&&(i=o.expressionUrl?decodeURIComponent(o.expressionUrl):void 0);const a=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=wv[e.bgImage.position]),n}(e),s=function(e){var t;let n=Sv.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=Sv[r]),n}(e);return i?{url:i,pos:a,size:s}:void 0}}function Cv(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):vv(null==r?void 0:r.color,"","backgroundColor",t,n)}function Ev(e,t,n){var r,o;const i=yv("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&mv.includes(e.toLowerCase()))return e.toLowerCase();const r=bv(e);if(1!==r.length)return e;let o=n;if(!o){const n=bv(t);if(1!==n.length)return e;o=gv(n[0])}if(!o)return e;const i=gv(r[0]);return i?e.replace(i,o):`${e} ${o}`})((null==e||null===(r=e.shadow)||void 0===r?void 0:r.boxShadow)||i,i,vv(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function Lv(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.${r}`,`title.${t}`,"fontFamily"),fontSize:i.fontSize||n.getStyle(`object.${r}`,`title.${t}`,"fontSize"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color):n.getStyle(`object.${r}`,`title.${t}`,"color"),backgroundColor:i.backgroundColor||n.getStyle(`object.${r}`,`title.${t}`,"backgroundColor"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const Rv={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},Pv=["theme","selections"];function Tv({app:e,themeApi:t,theme:n,queryParams:r,components:o=[],checkboxes:i=!1,hostConfig:a}){var s,l,u,d,p,f,h,m;const g=function(e=[]){const t={};return e.forEach(e=>{const n=null==e?void 0:e.key;Pv.includes(n)&&(t[n]=e)}),t}(o),b=(e,n)=>t.getStyle("object.listBox",e,n),y=e=>(null==e?void 0:e.index)>0||null!=e&&e.color?t.getColorPickerColor(e):void 0,v=function({getColorPickerColor:e,theme:t,getListboxStyle:n,overrides:r,checkboxes:o}){var i,a,s,l,u;const d=null===(i=r.theme)||void 0===i||null===(i=i.content)||void 0===i?void 0:i.fontColor,p=e(d)||n("content","color")||(null===(a=t.palette)||void 0===a?void 0:a.text.primary),f=!o&&(null===(s=null===(l=r.theme)||void 0===l||null===(l=l.content)||void 0===l?void 0:l.useContrastColor)||void 0===s||s),h=(null===(u=r.selections)||void 0===u?void 0:u.colors)||{},m=r=>{var o,i;const a="selected"===r?"main":r,s=`${r}Contrast`,l=e(h[r])||n("",`dataColors.${r}`)||"possible"===r&&n("","backgroundColor")||(null===(o=t.palette)||void 0===o||null===(o=o.selected)||void 0===o?void 0:o[a])||Rv[r],c=f?Wb(l,p):p||(null===(i=t.palette)||void 0===i?void 0:i.selected[`${s}Text}`]);return{[r]:l,[s]:c}};return c(c(c(c(c({},m("selected")),m("alternative")),m("excluded")),m("selectedExcluded")),m("possible"))}({getColorPickerColor:y,theme:n,getListboxStyle:b,overrides:g,checkboxes:i}),S=g.theme||{},w=y(null===(s=S.header)||void 0===s?void 0:s.fontColor)||b("title.main","color"),x=function({themeApi:e,themeOverrides:t}){let n;const r=null==t?void 0:t.background;return r?(n=null!=r&&r.useExpression?Cv({bgColor:r},e,"listBox"):e.getColorPickerColor(null==r?void 0:r.color),n):n}({themeApi:t,themeOverrides:S}),k=null!==(l=S.background)&&void 0!==l&&l.image?kv({bgImage:S.background.image},e,r,null==a?void 0:a.host):void 0,C=x||b("","backgroundColor")||n.palette.background.default,E=function(e,t){const n=zb(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(C,b),L=function(e){return Wb("#fff",e("content","color"))}(b),R=(null===(u=S.header)||void 0===u?void 0:u.fontStyle)||{},P=(null===(d=S.content)||void 0===d?void 0:d.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('${k.url}')`,backgroundRepeat:"no-repeat",backgroundSize:null==k?void 0:k.size,backgroundPosition:null==k?void 0:k.pos},header:{color:w,fontSize:(null===(p=S.header)||void 0===p?void 0:p.fontSize)||b("title.main","fontSize"),fontFamily:(null===(f=S.header)||void 0===f?void 0:f.fontFamily)||b("title.main","fontFamily"),fontWeight:T(R.bold,"bold","normal")||b("title.main","fontWeight")||"bold",textDecoration:R.underline?"underline":"initial",fontStyle:T(R.italic,"italic","normal")||b("title.main","fontStyle")||"initial"},content:{backgroundColor:i?void 0:v.possible,color:v.possibleContrast||b("content","color"),fontSize:(null===(h=S.content)||void 0===h?void 0:h.fontSize)||b("content","fontSize"),fontFamily:(null===(m=S.content)||void 0===m?void 0:m.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:L,borderColor:n.palette.divider,highlightBorderColor:n.palette.custom.focusBorder,backgroundColor:E,backdropFilter:"blur(8px)"},selections:v}}function Ov({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a}){return Tv({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a})}function Iv({alignTo:e,anchorOrigin:t={vertical:"bottom",horizontal:"center"},transformOrigin:n={vertical:"top",horizontal:"center"},show:r,close:o,app:i,fieldName:a,stateName:s="$",autoFocus:l,components:c,checkboxes:u,selectDisabled:d=()=>!1,sortCriteria:p=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:f="ltr"}){const h=Boolean(null==a?void 0:a.qLibraryId),m=r&&Boolean(e.current),[g,b]=E.useState(0),y=qs(),v=E.useRef(),[S]=xh({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:s,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:p,qFieldDefs:h?void 0:[a]},qLibraryId:h?a.qLibraryId:void 0}},i,a,s),w=E.useCallback(()=>{S.lock("/qListObjectDef")},[S]),x=E.useCallback(()=>{S.unlock("/qListObjectDef")},[S]),{translator:k,themeApi:C,keyboardNavigation:L,hostConfig:R}=E.useContext(wc),P=E.useRef(),T=E.useRef(),[O]=kb(i,S,T),[I]=Rh(S),[_]=E.useState(()=>Cb({selectDisabled:d})),q=jm({containerRef:T,enabled:L}),{checkboxes:M=u}=I||{},N=Ov({themeApi:C,theme:y,hostConfig:R,components:c,checkboxes:M});if(E.useEffect(()=>{O&&m&&(O.isModal(S)||O.goModal("/qListObjectDef"))},[O,m]),!(S&&I&&k&&N))return null;const A=!0===I.qListObject.qDimensionInfo.qLocked,D=(e,t)=>{const n="escapeKeyDown"!==t;O.noModal(n),o()},j=Ug({layout:I,model:S,translator:k,selectionState:_,selections:O}),$=Lb(I);return mr.jsx($f,{className:"listbox-container",open:m,onClose:D,anchorEl:e.current,anchorOrigin:t,transformOrigin:n,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?D():void 0,direction:f,children:mr.jsxs(Qp,{container:!0,direction:"column",gap:0,ref:T,children:[mr.jsxs(Qp,{container:!0,style:{direction:f,padding:y.spacing(1)},children:[mr.jsx(Qp,{children:A?mr.jsx(Uc,{onClick:x,disabled:!A,size:"large","aria-label":k.get("Listbox.Unlock"),title:k.get("Listbox.Unlock"),children:mr.jsx(Bh,{})}):mr.jsx(Uc,{onClick:w,disabled:!$,size:"large","aria-label":k.get("Listbox.Lock"),title:k.get("Listbox.Lock"),children:mr.jsx(Hh,{})})}),mr.jsx(Qp,{size:"grow"}),mr.jsx(Qp,{children:mr.jsx(pb,{layout:I,more:{enabled:!A,actions:j,alignTo:P,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:O,onConfirm:D,onCancel:()=>D(0,"escapeKeyDown")}})})]}),mr.jsxs(Qp,{size:"grow",role:"region","aria-label":k.get("Listbox.ResultFilterLabel"),children:[mr.jsx("div",{ref:P}),mr.jsx(Qp,{children:mr.jsx(yb,{ref:v,popoverOpen:m,styles:N,visible:!0,model:S,listCount:g,selections:O,selectionState:_,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:q.focusSelection},autoFocus:null==l||l,direction:f})}),mr.jsx(zg,{model:S,app:i,layout:I,selections:O,selectionState:_,direction:f,onSetListCount:e=>b(e),onCtrlF:()=>{v.current.focus()},styles:N,keyboard:q})]})]})})}function _v({displayName:e}){return mr.jsx(Xc,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600,marginTop:"8px"},children:e})}function qv({field:e,api:t,stateIx:n=0,skipHandleShowListBoxPopover:r=!1,moreAlignTo:o=null,onClose:i=()=>{}}){const{translator:a}=E.useContext(wc),s=o||E.useRef(),l=qs(),[c,u]=E.useState(!1);let d,p=null,f=null,h="";const m=!!e.isPinned,g=()=>{u(!1),i()};if(m)h=e.qName||e.qField,f=mr.jsx(_v,{displayName:h});else{d=e.selections[n],void 0===d.qTotal&&(d.qTotal=0);const r=d.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},i=(r.qSelected+r.qLocked)/d.qTotal,s=r.qAlternative/d.qTotal,c=(r.qExcluded+r.qLockedExcluded+r.qSelectedExcluded)/d.qTotal,u=r.qSelected+r.qSelectedExcluded+r.qLocked+r.qLockedExcluded,p=0===u&&0===d.qTotal;let h="";d.qTotal===u&&d.qTotal>1?h=a.get("CurrentSelections.All"):u>1&&d.qTotal?h=a.get("CurrentSelections.Of",[u,d.qTotal]):d.qSelectedFieldSelectionInfo&&(h=d.qSelectedFieldSelectionInfo.map(e=>e.qName).join(", ")),"$"!==e.states[n]&&(h=`${e.states[n]}: ${h}`);const m=[{color:l.palette.selected.main,ratio:i},{color:l.palette.selected.alternative,ratio:s},{color:l.palette.selected.excluded,ratio:c}];m.forEach((e,t)=>{e.offset=t?m[t-1].offset+m[t-1].ratio:0});let g=null,b=null,y=null;o||(g=mr.jsxs(Qp,{sx:{flex:1,minWidth:0,opacity:d.qLocked?"0.3":""},children:[mr.jsx(Xc,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label}),mr.jsx(Xc,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"},children:h})]}),d.qLocked?b=mr.jsx(Qp,{children:mr.jsx(Uc,{size:"large",children:mr.jsx(Bh,{})})}):d.qOneAndOnlyOne||(b=mr.jsx(Qp,{children:mr.jsx(Uc,{title:a.get("Selection.Clear"),onClick:r=>{r.stopPropagation(),t.clearField(d.qField,e.states[n])},size:"large",children:mr.jsx(Fh,{})})})),y=mr.jsx("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"},children:!1===p&&m.map(e=>mr.jsx("div",{style:{position:"absolute",background:e.color,height:"100%",top:0,width:100*e.ratio+"%",left:100*e.offset+"%"}},e.color))}),f=mr.jsxs(mr.Fragment,{children:[g,b,y]}))}return p=mr.jsxs(Qp,{container:!0,gap:1,ref:s,"data-testid":m?`pin-item-${h}`:`selection-item-${d.qField}`,sx:{backgroundColor:l.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px",height:"40px","&:hover":{backgroundColor:l.palette.action.hover}},onClick:!1===r&&(e=>{e.currentTarget.contains(e.target)&&u(!c)})||null,children:[f,c&&mr.jsx(Iv,{alignTo:s,show:c,close:g,app:t.model,fieldName:m?e.qField:d.qField,stateName:m?void 0:e.states[n]})]}),o?mr.jsx(Iv,{alignTo:s,show:!0,close:g,app:t.model,fieldName:m?e.qField:d.qField,stateName:m?void 0:e.states[n]}):p}var Mv=e=>zh((e=>c(c({},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 Nv={item:"MultiState-item"},Av=Ns(Qp)(({theme:e})=>({[`&.${Nv.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"}}));function Dv({field:e,api:t,moreAlignTo:n=null,onClose:r=()=>{}}){const[o,i]=E.useState(!!n),[a,s]=E.useState(-1),[l,c]=E.useState(n?n.current:null),u=n||E.useRef(),{translator:d}=E.useContext(wc),p=d.get("Selection.ClearAllStates"),f=()=>{s(-1),r()};let h=null;n||(h=mr.jsxs(mr.Fragment,{children:[mr.jsx(Qp,{sx:{minWidth:0,flexGrow:1},children:mr.jsx(op,{style:{padding:"0px 8px"},color:"secondary",badgeContent:e.states.length,children:mr.jsx(Xc,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label})})}),mr.jsx(Qp,{children:mr.jsx("div",{style:{width:"12px"}})}),mr.jsx(Qp,{children:mr.jsx(Uc,{size:"large",children:mr.jsx(Mv,{})})})]}));const m=mr.jsxs(ff,{dense:!0,children:[mr.jsx(wf,{title:p,onClick:()=>{e.states.forEach(n=>t.clearField(e.name,n))},children:mr.jsx(fc,{variant:"contained",fullWidth:!0,children:p})}),e.states.map((n,r)=>mr.jsx(wf,{title:e.label,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),s(t)})(e,r),children:mr.jsx(sp,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:mr.jsx(qv,{field:e,api:t,stateIx:r,skipHandleShowListBoxPopover:!0})})},r))]}),g=mr.jsx($f,{open:o,onClose:()=>{i(!1),r()},anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:m}),b=n?g:mr.jsxs(Av,{container:!0,gap:0,className:Nv.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))},children:[h,o&&g,a>-1&&mr.jsx(Iv,{alignTo:u,show:a>-1,close:f,app:t.model,fieldName:e.selections[a].qField,stateName:e.states[a]})]});return n&&a>-1?mr.jsx(Iv,{alignTo:u,show:a>-1,close:f,app:t.model,fieldName:e.selections[a].qField,stateName:e.states[a]}):b}const jv="More",$v={item:`${jv}-item`,badge:`${jv}-badge`},zv=Ns(Qp)(({theme:e})=>({[`&.${$v.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"},[`& .${$v.badge}`]:{padding:e.spacing(0,1)}}));function Fv({items:e=[],api:t}){const n=qs(),[r,o]=E.useState(!1),[i,a]=E.useState(-1),[s,l]=E.useState(null),c=E.useRef(),u=()=>{a(-1)};let d=null;return i>-1&&(d=e[i].states.length>1?mr.jsx(Dv,{field:e[i],api:t,moreAlignTo:c,onClose:u}):mr.jsx(qv,{field:e[i],api:t,skipHandleShowListBoxPopover:!0,moreAlignTo:c,onClose:u})),mr.jsxs(zv,{container:!0,gap:0,className:$v.item,onClick:e=>{e.currentTarget.contains(e.target)&&(l(e.currentTarget),c.current=e.currentTarget,o(!r))},children:[mr.jsx(Qp,{children:mr.jsx(sp,{borderRadius:n.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:n.palette.selected.main,color:n.palette.selected.mainContrastText},children:mr.jsxs(Xc,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit",children:["+",e.length]})})}),mr.jsx(Qp,{children:mr.jsx(Uc,{size:"large",children:mr.jsx(Mv,{})})}),r&&mr.jsx($f,{open:r,onClose:()=>{o(!1)},anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:mr.jsx(ff,{dense:!0,children:e.map((e,n)=>mr.jsx(wf,{title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),o(!1),a(t)})(e,n),children:mr.jsx(sp,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:e.states.length>1?mr.jsx(Dv,{field:e,api:t}):mr.jsx(qv,{field:e,api:t})})},n))})}),d]})}function Bv({api:e,app:t}){const n=qs(),[r]=Ch(t),[o]=Rh(r),[i]=(e=>{var t;const[n]=_h(e,"FieldList",qh),[r]=Lh(n,"getLayout"),o=(e=>{if(!e)return;const t=[];for(let n=0;n<e.length;++n){const r=e[n];if(t.push(r),r.qDerivedFieldData)for(let e=0;e<r.qDerivedFieldData.qDerivedFieldLists.length;++e){const n=r.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<n.qFieldDefs.length;++e){const o=n.qFieldDefs[e];t.push({qName:o.qName,qSrcTables:r.qSrcTables,qTags:o.qTags,isDerived:!0,sourceField:r.qName,derivedDefinitionName:n.qDerivedDefinitionName})}}}return t})(null==r||null===(t=r.qFieldList)||void 0===t?void 0:t.qItems);return[o]})(t),[a]=(e=>{var t;const[n]=_h(e,"DimensionList",Mh),[r]=Lh(n,"getLayout");return[null==r||null===(t=r.qDimensionList)||void 0===t?void 0:t.qItems]})(t),[s]=Ih(t),{modalObjectStore:l}=E.useContext(wc).selectionStore,[c,u]=Th(),d=E.useMemo(()=>{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))}(o).sort(Dh);return jh(i,s,e,a)},[o,i,s,a]),p=(e=>{if(!e)return 0;const{width:t}=e,n=Math.floor(t)-72;return Math.floor(n/120)})(u),{items:f,more:h}=(({currentItems:e,containerRef:t,maxItems:n,isInListboxPopover:r})=>{var o;if(!t)return{items:[],more:[]};const i=[...e],a=null!==(o=t.items)&&void 0!==o?o:[];if(r()&&i.length+1===a.length){const e=a.filter(e=>!1===i.some(t=>e.name===t.name))[0];if(e&&!e.isPinned){const{qField:t}=e.selections[0];e.selections=[{qField:t}];const n=a.indexOf(e);i.splice(n,0,e)}}let s=[];return n<i.length&&(s=i.splice(0,i.length-n)),t.items=i,{items:i,more:s}})({currentItems:d,containerRef:c,maxItems:p,isInListboxPopover:()=>{const{model:e}=l.get(t.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)}});return mr.jsxs(Qp,{ref:c,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"},children:[h.length>0&&mr.jsx(Qp,{style:{position:"relative",maxWidth:"98px",minWidth:"72px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:mr.jsx(Fv,{items:h,api:e})}),f.map((t,r)=>{var o;return mr.jsx(Qp,{style:{position:"relative",maxWidth:"240px",minWidth:"120px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:t.states.length>1?mr.jsx(Dv,{field:t,api:e}):mr.jsx(qv,{field:t,api:e})},`${t.states.join("::")}::${null!==(o=t.qField)&&void 0!==o?o:t.name}${r}`)})]})}var Wv=e=>zh((e=>c(c({},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 Hv=e=>zh((e=>c(c({},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));function Uv(e){const[t]=Ch(e),[n]=Rh(t),[r]=Ph(e),[o,i]=E.useState(null);return E.useEffect(()=>{r&&t&&n&&((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)})(t,n,r)},[r,t,n]),E.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]}function Vv({api:e,app:t}){const{translator:n}=E.useContext(wc),[r]=Uv(t);return mr.jsxs(Qp,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"},children:[mr.jsx(Qp,{children:mr.jsx(Uc,{style:{marginRight:"8px"},disabled:!r||!r.canGoBack,title:n.get("Navigate.Back"),onClick:()=>e.back(),size:"large",children:mr.jsx(Wv,{})})}),mr.jsx(Qp,{children:mr.jsx(Uc,{style:{marginRight:"8px"},disabled:!r||!r.canGoForward,title:n.get("Navigate.Forward"),onClick:()=>e.forward(),size:"large",children:mr.jsx(Hv,{})})}),mr.jsx(Qp,{children:mr.jsx(Uc,{disabled:!r||!r.canClear,title:n.get("Selection.ClearAll"),onClick:()=>e.clear(),size:"large",children:mr.jsx(Yg,{})})})]})}const Gv=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function Kv([e,t]){return(e+(Math.random()*(t-e)|0)).toString(32)}function Jv(){return Gv.map(Kv).join("")}function Qv({app:e}){const t=qs(),[n]=vb(e);return n?mr.jsxs(Qp,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:t.palette.background.paper,minHeight:"40px"},children:[mr.jsx(Qp,{style:{borderRight:`1px solid ${t.palette.divider}`},children:mr.jsx(Vv,{api:n,app:e})}),mr.jsx(Qp,{size:"grow",style:{backgroundColor:t.palette.background.darker,overflow:"hidden"},children:mr.jsx(Bv,{api:n,app:e})})]}):null}let Xv;Xv="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let Zv=null,Yv=null;const eS=Xv.clearTimeout,tS=Xv.setTimeout,nS=Xv.cancelAnimationFrame||Xv.mozCancelAnimationFrame||Xv.webkitCancelAnimationFrame,rS=Xv.requestAnimationFrame||Xv.mozRequestAnimationFrame||Xv.webkitRequestAnimationFrame;function oS(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__&&Zv(this.__resizeRAF__),this.__resizeRAF__=Yv(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=Xv.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==nS||null==rS?(Zv=eS,Yv=function(e){return tS(e,20)}):(Zv=function([e,t]){nS(e),eS(t)},Yv=function(e){const t=rS(function(){eS(n),e()}),n=tS(function(){nS(t),e()},20);return[t,n]});class iS extends E.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=oS(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),E.createElement(c,{ref:this._setRef,style:{...m,...l},...u},!b&&e(g))}}function aS({keyboard:e,hovering:t,updateKeyScroll:n,currentScrollIndex:r,isModal:o,constraints:i,selections:a}){return{handleKeyDown:t=>{const{keyCode:n,shiftKey:r=!1}=t.nativeEvent,i=()=>{t.stopPropagation(),t.preventDefault()};if(!e.enabled)return;const s=t.currentTarget.closest(".listbox-container"),l=o();switch(n){case Nm.TAB:if(document.activeElement===s||!l&&!s.contains(document.activeElement))return;if(r){Fm(s)||zm(s)||Wm(t,e)}else{if(!(Bm(s)||zm(s)||Fm(s)))break}i();break;case Nm.ENTER:case Nm.SPACE:if(!t.target.classList.contains("listbox-container"))break;e.focus(),i();break;case Nm.ESCAPE:Wm(t,e),a.isActive()&&a.cancel()}},handleOnMouseEnter:()=>{t.current=!0},handleOnMouseLeave:()=>{t.current&&(t.current=!1)},globalKeyDown:e=>{if(!t.current||(()=>{const e=(null==i?void 0:i.select)||(null==i?void 0:i.active),t=o();return e||t})())return;const{keyCode:a,ctrlKey:s=!1,shiftKey:l=!1}=e;switch(a){case Nm.ARROW_UP:n({up:1});break;case Nm.ARROW_DOWN:n({down:1});break;case Nm.PAGE_UP:n({up:r.stop-r.start});break;case Nm.PAGE_DOWN:n({down:r.stop-r.start});break;case Nm.HOME:n({scrollPosition:s&&l?"overflowStart":"start"});break;case Nm.END:n({scrollPosition:s&&l?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const sS=Ns("div")(()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}));function lS({text:e}){const{translator:t}=E.useContext(wc);return mr.jsx(sS,{children:t.get(e)})}const cS={fontSize:"12px"},uS=Ns(Wl)(({theme:e,isLoading:t})=>({position:"absolute",top:0,left:0,height:48,zIndex:2,background:e.palette.custom.disabledBackground,opacity:1,color:e.palette.custom.disabledContrastText,width:"100%",display:"flex",justifyContent:t?"center":"flex-start",paddingLeft:16,paddingRight:16,borderRadius:0,"& *, & p":{color:e.palette.custom.disabledContrastText},"& i":{padding:"7px"}})),dS=Ns(Qp,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})(({styles:e,isRtl:t})=>c(c({flexDirection:t?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},e.header),{},{"& *":{color:e.header.color}})),pS=Ns(Xc)(({styles:e})=>c(c({},e.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})),fS=L.forwardRef(({translator:e,toggleLock:t,keyboard:n,isLoading:r},o)=>{const i=e.get("SelectionToolbar.ClickToUnlock");return mr.jsxs(uS,{ref:o,title:i,tabIndex:n.enabled?0:-1,onClick:t,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:r,children:[r?mr.jsx(nc,{size:16,variant:"indeterminate",color:"primary"}):mr.jsx(Bh,{disableRipple:!0,style:cS}),!r&&mr.jsx(Xc,{fontSize:"14px",children:i})]})});var hS=e=>zh((e=>c(c({},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 mS=e=>zh((e=>c(c({},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 gS=e=>zh((e=>c(c({},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 bS="H",yS="C";var vS=({dimInfo:e,app:t,selections:n,isPopover:r,active:o,keyboard:i})=>{switch(e.qGrouping){case bS:return{icon:mS,tooltip:"Listbox.DrillDown",onClick:void 0};case yS:{const a=t&&o,s=()=>{r||n.confirm(),t.getDimension(e.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:a?gS:hS,tooltip:"Listbox.Cyclic",onClick:a?s:void 0,onKeyDown:a?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case Nm.SPACE:case Nm.ENTER:s();break;case Nm.TAB:{if(!i.enabled)return;let n;n=e.shiftKey?i.focusSelection():zm(t)||Fm(t),n||Wm(e,i)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}};const SS=Ns(fc)(()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0}));function wS({iconData:e,translator:t,iconStyle:n,disabled:r,keyboard:o}){if(!e)return;const{icon:i,tooltip:a,onClick:s,onKeyDown:l}=e,u=i,d=t.get(a);return s?mr.jsx(SS,{variant:"outlined",onClick:s,tabIndex:o.innerTabStops?0:-1,title:d,size:"large",disableRipple:!0,disabled:r,onKeyDown:l,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button",children:mr.jsx(u,{style:n})}):mr.jsx(u,{title:d,size:"large",style:c(c({},n),{},{padding:"7px"})})}let xS=0;function kS({layout:e,translator:t,styles:n,isRtl:r,showLock:o,showSearchIcon:i,constraints:a,onShowSearch:s,classes:l,containerRect:u,isPopover:d,showToolbar:p,toolbarMode:f="auto",containerRef:h,model:m,selectionState:g,isDirectQuery:b,selections:y,keyboard:v,autoConfirm:S,app:w,title:x,disablePortal:k}){var C,L,R;const P="detach"===f,T=!P&&!("attach"===f),[O,I]=E.useState(P),[_,q]=E.useState(null==e||null===(C=e.qListObject)||void 0===C||null===(C=C.qDimensionInfo)||void 0===C?void 0:C.qLocked),[M,N]=E.useState(!1);E.useEffect(()=>{var t;q(null==e||null===(t=e.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qLocked)},[null==e||null===(L=e.qListObject)||void 0===L||null===(L=L.qDimensionInfo)||void 0===L?void 0:L.qLocked]);const A=E.useRef(null),D=E.useRef(null),j=E.useRef(null),$=vS({dimInfo:null==e||null===(R=e.qListObject)||void 0===R?void 0:R.qDimensionInfo,app:w,selections:y,isPopover:d,active:!(null!=a&&a.active),keyboard:v}),z=o&&_,F=!o&&_,B=i||F||$,W=9-(B?7:0),H=r?9-(B?7:0):4,U=(i?28:0)+(F?28:0)+($?28:0),V=function({isLocked:e,setLocked:t,settingLockedState:n,model:r,setSettingLockedState:o,unlockButtonRef:i,lockButtonRef:a}){return()=>{const s=new Date;if(s-xS<500)return Promise.resolve();if(n)return()=>{};o(!0),xS=s;const l=e?r.unlock:r.lock;return t(!e),l.call(r,"/qListObjectDef").catch(()=>{t(e)}).finally(()=>{setTimeout(()=>{var t;o(!1),e?setTimeout(()=>{var e;null===(e=a.current)||void 0===e||e.focus()},0):null===(t=i.current)||void 0===t||t.focus()},0)})}}({isLocked:_,setLocked:q,settingLockedState:M,setSettingLockedState:N,model:m,unlockButtonRef:D,lockButtonRef:j}),G=Ug({layout:e,model:m,translator:t,selectionState:g,isDirectQuery:b,selections:y}),K=_||!o?void 0:[{key:"lock",type:void 0,label:t.get("SelectionToolbar.ClickToLock"),getSvgIconShape:Wh,enabled:()=>!M&&!g.selectDisabled()&&Lb(e),action:V,ref:j}],J=null!=a&&a.active?mr.jsx(fb,{title:t.get("Listbox.Search"),size:"large",style:c(c({},cS),{},{padding:"7px"})}):mr.jsx(Uc,{onClick:s,tabIndex:-1,title:t.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn",children:mr.jsx(fb,{style:cS})});E.useEffect(()=>{if(!T)return;if(!A.current||!u)return;const e=function({containerRect:e,titleRef:t,iconsWidth:n,paddingLeft:r,paddingRight:o}){var i,a,s,l;const c=r+o,u=e.width<(null!==(i=null==t||null===(a=t.current)||void 0===a?void 0:a.clientWidth)&&void 0!==i?i:0)+n+c+2+128,d=(null==t||null===(s=t.current)||void 0===s?void 0:s.scrollWidth)>(null==t||null===(l=t.current)||void 0===l?void 0:l.offsetWidth);return!(!u&&!d)}({containerRect:u,titleRef:A,iconsWidth:U,paddingLeft:W,paddingRight:H});I(e)},[T,U,W,H,A.current,null==u?void 0:u.width,null==u?void 0:u.height]);const Q=function({isDetached:e,showToolbar:t,containerRef:n,isLocked:r,listboxSelectionToolbarItems:o,extraItems:i,selections:a,keyboard:s,autoConfirm:l,disablePortal:c}){return{autoConfirm:l,isDetached:e,show:t&&!e,popover:{show:t&&e,anchorEl:n.current},extraItems:i,more:{enabled:!r,actions:o,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"},disablePortal:c},selections:{show:t,api:a,onConfirm:()=>{null==s||s.focus()},onCancel:()=>{null==s||s.focus()}}}}({isDetached:!d&&O,showToolbar:p,containerRef:h,isLocked:_,extraItems:K,listboxSelectionToolbarItems:G,selections:y,keyboard:v,autoConfirm:S,disablePortal:k}),X=mr.jsx(pb,c({isRtl:r,layout:e},Q));if(P)return X;const Z=F?mr.jsx(Bh,{size:"large",style:c(c({},cS),{},{padding:"7px"})}):void 0;return mr.jsxs(dS,{item:!0,container:!0,styles:n,isRtl:r,marginY:1,paddingLeft:`${W}px`,paddingRight:`${H}px`,className:"header-container",children:[z&&mr.jsx(fS,{isLoading:M,translator:t,toggleLock:V,keyboard:v,ref:D}),B&&mr.jsxs(Qp,{container:!0,alignItems:"center",width:U,className:"header-action-container",children:[Z||i&&J,mr.jsx(wS,{iconData:$,iconStyle:cS,disabled:y.isActive()&&d,translator:t,keyboard:v})]}),mr.jsx(Qp,{size:"grow",sx:{minWidth:0},justifyContent:r?"flex-end":"flex-start",className:l.listBoxHeader,children:mr.jsx(pS,{variant:"h6",noWrap:!0,ref:A,title:null!=x?x:e.title,styles:n,children:null!=x?x:e.title})}),mr.jsx(Qp,{display:"flex",children:X})]})}const CS=Ns("div")(({theme:e,width:t,height:n})=>({position:"absolute",pointerEvents:"none",zIndex:1,width:t,height:n,boxShadow:`inset 0 0 0 2px ${e.palette.custom.focusBorder}`}));function ES({width:e,height:t,disabled:n,childNode:r,containerNode:o}){const[i,a]=E.useState(!1),s=E.useCallback(()=>{const e=o&&o.contains(document.activeElement),t=r&&r.contains(document.activeElement);a(e&&!t)},[o,r]);E.useEffect(()=>{if(o)return o.addEventListener("focusin",s),o.addEventListener("focusout",s),s(),()=>{o.removeEventListener("focusin",s),o.removeEventListener("focusout",s)}},[s,o]);return!n&&i?mr.jsx(CS,{"aria-hidden":"true",width:e,height:t}):null}const LS="ListBoxInline",RS={listBoxHeader:`${LS}-listBoxHeader`,screenReaderOnly:`${LS}-screenReaderOnly`,listboxWrapper:`${LS}-listboxWrapper`},PS=Ns(Qp,{shouldForwardProp:e=>!["containerPadding","styles"].includes(e)})(({containerPadding:e,styles:t})=>c(c({},t.background),{},{[`& .${RS.listBoxHeader}`]:{alignSelf:"center",display:"flex"},[`& .${RS.screenReaderOnly}`]:{position:"absolute",height:0,width:0,overflow:"hidden"},[`& .${RS.listboxWrapper}`]:{padding:e},"&:focus-visible":{outline:"none"}}));const TS=L.memo(function({options:e,layout:t}){var n,r,o,i,a;const{app:s,direction:l,frequencyMode:u,checkboxes:d,search:p=!0,focusSearch:f=!1,rangeSelect:h=!0,model:m,selections:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:S,showGray:w=!0,scrollState:x,renderedCallback:k,toolbar:C=!0,toolbarMode:L="auto",isPopover:R=!1,showLock:P=!1,components:T,selectDisabled:O=()=>!1,disablePortal:I=!0,flags:_}=e,q=qs(),{translator:M,keyboardNavigation:N,themeApi:A,queryParams:D,constraints:j,hostConfig:$}=E.useContext(wc),{checkboxes:z=d}=t||{},F=Ov({app:s,themeApi:A,theme:q,queryParams:D,components:T,checkboxes:z,hostConfig:$}),B=function({appLayout:e}){return!(null==e||!e.qIsDirectQueryMode)}({appLayout:null==s?void 0:s.layout}),W=E.useRef(),H=E.useRef(),[U,V,G]=Th(),[K,J]=E.useState(!1),[Q,X]=E.useState(!1),Z=E.useRef(!1),[Y,ee]=E.useState({down:0,up:0,scrollPosition:""}),te=e=>ee(t=>c(c({},t),e)),[ne,re]=E.useState({start:0,stop:0}),[oe]=vb(s),[ie]=E.useState(()=>Cb({selectDisabled:O})),ae=jm({containerRef:W,enabled:N}),se=E.useCallback(()=>(({app:e,appSelections:t})=>{var n,r;return null!==(n=null===(r=e.isInModalSelection)||void 0===r?void 0:r.call(e))&&void 0!==n?n:t.isInModal()})({app:s,appSelections:oe}),[s,oe]),le=null==t?void 0:t.qListObject.qDimensionInfo.qError,ce=le&&j.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",[,ue]=E.useState(!1),[de,pe]=E.useState(null),fe=E.useCallback(e=>{pe(e)},[]),{handleKeyDown:he,handleOnMouseEnter:me,handleOnMouseLeave:ge,globalKeyDown:be}=E.useMemo(()=>aS({keyboard:ae,hovering:Z,updateKeyScroll:te,currentScrollIndex:ne,constraints:j,isModal:se,selections:g}),[ae,Z,te,W,ne,s,oe,j,se]);E.useEffect(()=>(document.addEventListener("keydown",be),()=>{document.removeEventListener("keydown",be)}),[be]),E.useEffect(()=>{!0===p&&X(!0);const e=()=>{J(!0)},t=()=>{J(!1),"toggle"===p&&X(!1)};return R&&(g.isActive()||(g.on("activated",e),g.on("deactivated",t)),J(R)),C&&g&&(g.isModal()||(g.on("activated",e),g.on("deactivated",t)),J(R||g.isActive())),()=>{g&&g.removeListener&&(g.removeListener("activated",e),g.removeListener("deactivated",t))}},[C,g,R]);const{wildCardSearch:ye,searchEnabled:ve,autoConfirm:Se=!1,layoutOptions:we={}}=null!=t?t:{},xe=null==t||null===(n=t.qListObject)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.qLocked,ke=!1!==ve&&"toggle"===p&&!xe,Ce=null==t||null===(r=t.qListObject)||void 0===r?void 0:r.qDimensionInfo,Ee=_.isEnabled("QCB-35224_FILTERPANE_TITLE_IMPROVEMENT")?null!==(o=null==t?void 0:t.title)&&void 0!==o?o:null==Ce?void 0:Ce.qFallbackTitle:null==t?void 0:t.title,Le=(null==Ee?void 0:Ee.length)&&!1!==(null==t?void 0:t.showTitle),Re=["attach","detach","auto"].includes(L)?L:"auto",Pe=C||R,Te=function({toolbarMode:e,canShowTitle:t,isPopover:n}){return"auto"!==e?e:t||n?"attach":"detach"}({toolbarMode:Re,canShowTitle:Le,isPopover:R}),Oe=Pe&&"detach"===Te,Ie="rtl"===l;if(!(m&&t&&M&&F))return null;const _e=!0===p||"toggle"===p&&Q&&!1!==ve,qe=null!==(i=we.dense)&&void 0!==i&&i,Me=()=>{var e;const t=!Q;X(t),t&&null!==(e=W.current)&&void 0!==e&&e.scrollIntoView&&W.current.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"})},Ne=()=>{"toggle"===p?Me():H.current.focus()},Ae=_e&&("toggle"===p||f),De=function({isGridMode:e,dense:t,height:n,layoutOrder:r}){let o;if(e){let i;i=wg({isGridMode:e,dense:t})>n?"0px":"2px",o="row"===r?`${i} 4px`:`${i} 6px ${i} 4px`}else o=void 0;return o}({isGridMode:"grid"===(null==we?void 0:we.dataLayout),dense:qe,height:null===(a=W.current)||void 0===a?void 0:a.clientHeight,layoutOrder:we.layoutOrder});le&&(null==k||k());const je=Pe&&!Oe?30:0,$e=mr.jsx(kS,{app:s,showSearchIcon:ke,onShowSearch:Me,isPopover:R,showToolbar:K,isDirectQuery:B,autoConfirm:Se,toolbarMode:Oe?"detach":Re,title:Ee,layout:t,translator:M,styles:F,isRtl:Ie,showLock:P,constraints:j,classes:RS,containerRect:V,containerRef:W,model:m,selectionState:ie,selections:g,keyboard:ae,disablePortal:I});return mr.jsxs(mr.Fragment,{children:[Oe&&$e,mr.jsxs(PS,{className:"listbox-container",container:!0,tabIndex:ae.enabled?-1:void 0,direction:"column",gap:0,containerPadding:De,styles:F,style:{height:"100%",width:"100%",flexFlow:"column nowrap"},onKeyDown:he,onMouseEnter:me,onMouseLeave:ge,ref:e=>{W.current=e,null==U||U(e)},"aria-label":ae.active?M.get("Listbox.ScreenReaderInstructions"):"",onFocus:()=>ue(!0),onBlur:()=>ue(!1),children:[mr.jsx(ES,{width:null==V?void 0:V.width,height:null==V?void 0:V.height,disabled:se()||R,childNode:de,containerNode:G}),Pe&&!Oe&&$e,mr.jsxs(Qp,{container:!0,direction:"column",height:"100%",minHeight:je,role:"region","aria-label":M.get("Listbox.ResultFilterLabel"),ref:fe,children:[mr.jsx(Qp,{children:mr.jsx(yb,{ref:H,selections:g,selectionState:ie,model:m,dense:qe,keyboard:ae,visible:_e,search:p,autoFocus:Ae,beginSelectionOnFocus:!R,wildCardSearch:ye,searchEnabled:ve,direction:l,hide:ke&&Me,styles:F})}),mr.jsx(Qp,{size:"grow",className:RS.listboxWrapper,children:le?mr.jsx(lS,{text:ce}):mr.jsx(iS,{children:({height:e,width:n})=>mr.jsx(zg,{model:m,app:s,constraints:j,layout:t,selections:g,selectionState:ie,direction:l,frequencyMode:u,rangeSelect:h,checkboxes:z,height:e,width:n,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:S,keyboard:ae,showGray:w,scrollState:x,keyScroll:{state:Y,reset:()=>ee({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:ne,set:re},renderedCallback:k,onCtrlF:Ne,isModal:se,styles:F})})})]})]})]})});function OS({options:e={}}){const{model:t}=e,[n]=Rh(t);return mr.jsx(TS,{options:e,layout:n})}function IS({app:e,qId:t,options:n={}}){const[r,o]=E.useState(),[i]=wh(),{sessionModel:a}=n,s=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],l=Object.keys(n).filter(e=>s.includes(e));if(l.length)throw new Error(`Option "${l.join(", ")}" is not applicable for existing objects.`);return E.useEffect(()=>{let n=!1,r=()=>{};return async function(){const s=await Promise.resolve(a||async function(t){return i.get(t)||await e.getObject(t)}(t));if(!n){if(!i.get(s.id)){i.set(s.id,s);const e=()=>{i.clear(s.id)};s.once("closed",e),r=()=>{s.removeListener("closed",e)}}o(s)}}(),()=>{n=!0,r()}},[]),r}const _S={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 qS(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 MS=["__DO_NOT_USE__"],NS=(e={})=>{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 c(c(c({},u(e,MS)),n),t)},AS=E.forwardRef(({app:e,fieldIdentifier:t,qId:n,stateName:r,element:o,initialOptions:i,renderedCallback:a,flags:s},l)=>{const[u,d]=E.useState(i),{isExistingObject:p,hasExternalSelectionsApi:f}=function({qId:e,options:t}){return{isExistingObject:!(!e&&!t.sessionModel),hasExternalSelectionsApi:!!t.selectionsApi}}({qId:n,options:u});p||Object.assign(u,{frequencyMode:qS(u.frequencyMode)});const[h,m]=E.useState(0);E.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?IS({app:e,qId:n,options:u}):function({app:e,fieldIdentifier:t,stateName:n,options:r={}}){var o;const[i,a]=E.useState(""),[s,l]=E.useState(!0),[c,u]=E.useState(),[d,p]=E.useState(),f=null!==(o=r.title)&&void 0!==o?o:d;let{histogram:h=!1,frequencyMode:m="N"}=r;i&&i.failedToFetchFieldDef&&(h=!1,m="N"),E.useEffect(()=>{const n=h||"N"!==m;t.qLibraryId&&n?async function(){try{const n=await e.getDimension(t.qLibraryId),r=await n.getLayout();p(r.qDim.title),"N"===r.qDim.qGrouping?a(r.qDim.qFieldDefs?r.qDim.qFieldDefs[0]:""):a({multiFieldDim:!0}),l(!1)}catch(e){throw l(!1),a({failedToFetchFieldDef:!0}),new Error(`Disabling frequency count and histogram: ${e&&e.message}`)}}():(l(!1),p(t))},[]);const{dense:g,checkboxes:b,listLayout:y,properties:v={}}=r,S={dense:g};"horizontal"===y&&(S.dataLayout="grid",S.layoutOrder="column",S.maxVisibleColumns={auto:!0},S.maxVisibleRows={auto:!1,maxRows:1});const w=E.useRef();w.current||(w.current=Jv());const x=ye(!0,{},_S,{qInfo:{qId:w.current},qListObjectDef:{qStateName:n,qFrequencyMode:h&&"N"===m?"V":m},histogram:h,checkboxes:b,layoutOptions:S,title:f});let k;if(ye(!0,x,v),t.qLibraryId?(x.qListObjectDef.qLibraryId=t.qLibraryId,k=t.qLibraryId):(x.qListObjectDef.qDef.qFieldDefs=[t],k=t),"P"!==m&&h)if(null!=i&&i.multiFieldDim)x.frequencyMax="fetch";else{const e=t.qLibraryId?i:k;x.frequencyMax={qValueExpression:Ag(e)}}const[C]=xh(x,s?null:e,k,n);return E.useEffect(()=>{C&&u(C)},[C]),c}({app:e,fieldIdentifier:t,stateName:r,options:u}),b=E.useRef(o),y=f?u.selectionsApi:kb(e,g,[b,".njs-action-toolbar-more",".njs-action-toolbar-popover"],u)[0],v=E.useMemo(()=>c(c({},u),{},{selections:y,model:g,app:e,renderedCallback:a,flags:s}),[u,y,g,e]);return E.useImperativeHandle(l,()=>({setOptions:e=>d(e)}),[]),y&&g?mr.jsx(OS,{options:v}):null});const DS={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function jS({app:e,fieldIdentifier:t,stateName:n,element:r,options:o={}}){const[i,a]=E.useState(!!o.show);return mr.jsx(Iv,{show:i,app:e,alignTo:{current:r},anchorOrigin:o.anchorOrigin,transformOrigin:o.transformOrigin,close:()=>{a(!1),o.onPopoverClose&&o.onPopoverClose()},fieldName:t,stateName:n,autoFocus:o.autoFocus,components:o.components,sortCriteria:o.sortCriteria,direction:o.direction})}function $S(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function zS(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}function FS({dc:e,def:t,properties:n}){e.qDimensions=e.qDimensions||[],e.qMeasures=e.qMeasures||[],e.qInterColumnSortOrder=e.qInterColumnSortOrder||[],e.qInitialDataFetch=e.qInitialDataFetch||[],e.qColumnOrder=e.qColumnOrder||[],e.qExpansionState=e.qExpansionState||[];const r=n,o={dimensions:()=>e.qDimensions,measures:()=>e.qMeasures,addDimension(n){const i="string"==typeof n?(e=>({qDef:{qFieldDefs:[e]}}))(n):c(c({},n),{},{qDef:n.qDef||{}});return i.qDef.cId=i.qDef.cId||Jv(),i.qDef.qSortCriterias=i.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],i.qOtherTotalSpec=i.qOtherTotalSpec||{},i.qAttributeExpressions=i.qAttributeExpressions||[],i.qAttributeDimensions=i.qAttributeDimensions||[],e.qDimensions.length<o.maxDimensions()?(e.qDimensions.push(i),$S(e.qInterColumnSortOrder,e.qDimensions.length-1),t.dimensions.added(i,r)):(e.qLayoutExclude=e.qLayoutExclude||{},e.qLayoutExclude.qHyperCubeDef=e.qLayoutExclude.qHyperCubeDef||{},e.qLayoutExclude.qHyperCubeDef.qDimensions=e.qLayoutExclude.qHyperCubeDef.qDimensions||[],e.qLayoutExclude.qHyperCubeDef.qMeasures=e.qLayoutExclude.qHyperCubeDef.qMeasures||[],e.qLayoutExclude.qHyperCubeDef.qDimensions.push(i)),i},removeDimension(n){const o=e.qDimensions.splice(n,1)[0];return zS(e.qInterColumnSortOrder,n),t.dimensions.removed(o,r,n),o},addMeasure(n){const i="string"==typeof n?(e=>({qDef:{qDef:e}}))(n):c(c({},n),{},{qDef:n.qDef||{}});i.qDef.cId=i.qDef.cId||Jv(),i.qSortBy=i.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},i.qAttributeDimensions=i.qAttributeDimensions||[],i.qAttributeExpressions=i.qAttributeExpressions||[],e.qMeasures.length<o.maxMeasures()?(e.qMeasures.push(i),$S(e.qInterColumnSortOrder,e.qDimensions.length+e.qMeasures.length-1),t.measures.added(i,r)):(e.qLayoutExclude=e.qLayoutExclude||{},e.qLayoutExclude.qHyperCubeDef=e.qLayoutExclude.qHyperCubeDef||{},e.qLayoutExclude.qHyperCubeDef.qDimensions=e.qLayoutExclude.qHyperCubeDef.qDimensions||[],e.qLayoutExclude.qHyperCubeDef.qMeasures=e.qLayoutExclude.qHyperCubeDef.qMeasures||[],e.qLayoutExclude.qHyperCubeDef.qMeasures.push(i))},removeMeasure(n){const o=e.qMeasures.splice(n,1)[0];zS(e.qInterColumnSortOrder,e.qDimensions.length+n),t.measures.removed(o,r,n)},maxDimensions:()=>t.dimensions.max(e.qMeasures.length),maxMeasures:()=>t.measures.max(e.qDimensions.length),canAddDimension:()=>e.qDimensions.length<o.maxDimensions(),canAddMeasure:()=>e.qMeasures.length<o.maxMeasures()};return o}function BS({dc:e,def:t,properties:n}){e.qInitialDataFetch=e.qInitialDataFetch||[];const r=n,o={dimensions:()=>e.qLibraryId||e.qDef&&e.qDef.qFieldDefs&&0!==e.qDef.qFieldDefs.length?[e]:[],measures:()=>[],addDimension(n){const o="string"==typeof n?(e=>({qDef:{qFieldDefs:[e]}}))(n):c(c({},n),{},{qDef:n.qDef||{}});return o.qDef.cId=o.qDef.cId||Jv(),o.qDef.qSortCriterias=e.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(o).forEach(t=>{e[t]=o[t]}),t.dimensions.added(o,r),o},removeDimension(n){const o=e;return delete e.qDef,delete e.qLibraryId,t.dimensions.removed(o,r,n),o},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===o.dimensions().length,canAddMeasure:()=>!1};return o}const WS=e=>({qDef:{qFieldDefs:[e]}});function HS({children:e,halo:t}){const n={async addDimension(n){const r=(e=>{let t;return t="string"==typeof e?ye(!0,{},_S,{qListObjectDef:WS(e)}):e.qListObjectDef?ye(!0,{},_S,e):ye(!0,{},_S,{qListObjectDef:e}),t})(n),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||Jv(),!r.title)if(t.public.galaxy.flags.isEnabled("QCB-35224_FILTERPANE_TITLE_IMPROVEMENT"))r.title=void 0;else if(o.qLibraryId){const e=await t.app.getDimension(o.qLibraryId),n=await e.getProperties();n.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:n.qDim.qLabelExpression}}:r.title=n.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])}e.push({qProperty:r,qChildren:[]})},addMeasure(){}};return n}function US(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 VS({sn:e,properties:t,fields:n,children:r},o){if(!n.length)return;const i=e.qae.data.targets[0];if(!i)return;const{propertyPath:a}=i,s=a.split("/");let l=t;for(let e=0;e<s.length;e++){const t=s[e];l=t?l[t]:l}const c=function(e){return e.match("/qListObjectDef")?BS:e.match("/qChildListDef")?HS:FS}(a),u=c({dc:l,def:i,properties:t,children:r,halo:o});for(let e=0;e<n.length;++e){const t=n[e];"measure"===US(t)?await u.addMeasure(t):await u.addDimension(t)}}const GS=e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e;var KS={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];if(!GS(t))return;void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}GS(o)&&(void 0!==n?i[o]=n:delete i[o])},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var JS={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 QS=2**53-1;function XS(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function ZS(e,t){const n=ye(!0,{},t,e);return KS.getValue(n,"qOtherTotalSpec.qOtherCounted")||KS.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),KS.getValue(n,"qOtherTotalSpec.qOtherLimit")||KS.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function YS(e,t){return ye(!0,{},t,e)}function ew(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var tw={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach(t=>{e.qLayoutExclude.changed[t].to===KS.getValue(e,t)&&KS.setValue(e,t,e.qLayoutExclude.changed[t].from)})},isMasterItemProperty:XS,importCommonProperties:function(e,t,n){const r="masterobject"===KS.getValue(t,"properties.qInfo.qType")?"masterobject":KS.getValue(n,"qInfo.qType");KS.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:ZS,createDefaultMeasure:YS,resolveValue:ew,getHypercubePath:function(e){const t=KS.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({exportFormat:e,newHyperCubeDef:t}){const n=e.data[0],r=t.qDimensions.length+t.qMeasures.length;t.qInterColumnSortOrder=n.interColumnSortOrder.concat();let o=t.qInterColumnSortOrder.length;if(o!==r)for(t.qLayoutExclude&&(t.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==r;)o<r?(JS.indexAdded(t.qInterColumnSortOrder,o),++o):(--o,JS.indexRemoved(t.qInterColumnSortOrder,o))},createNewProperties:function({exportFormat:e,initialProperties:t,hypercubePath:n}){let r={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(e.properties).forEach(o=>{"qLayoutExclude"===o?e.properties[o].quarantine&&(r.qLayoutExclude.quarantine=ye(!0,{},e.properties[o].quarantine)):"qHyperCubeDef"===o&&n?KS.setValue(r,`${n}.qHyperCubeDef`,e.properties.qHyperCubeDef):t.hasOwnProperty(o)||XS(o)?r[o]=e.properties[o]:r.qLayoutExclude.disabled[o]=e.properties[o]}),r=ye(!0,{},t,r),null===r.components&&(r.components=[]),r},getMaxMinDimensionMeasure:function({exportFormat:e,dataDefinition:t={}}){const n=e.data[0],r=t.dimensions||{max:0},o=t.measures||{max:0},i=ew(o.max,n.dimensions.length,QS),a=ew(o.min,n.dimensions.length,0);return{maxDimensions:ew(r.max,i,QS),minDimensions:ew(r.min,a,0),maxMeasures:i,minMeasures:a}},shouldInitLayoutExclude:function({exportFormat:e,maxDimensions:t,minDimensions:n,maxMeasures:r,minMeasures:o}){const i=e.data[0];return i.dimensions.length>t&&t>0||i.measures.length>r&&r>0||i.excludedDimensions.length>0&&i.dimensions.length+i.excludedDimensions.length>n||i.excludedMeasures.length>0&&i.measures.length+i.excludedMeasures.length>o||!r&&i.measures.length>0||!t&&i.dimensions.length>0},initLayoutExclude:function({exportFormat:e,maxDimensions:t,minDimensions:n,maxMeasures:r,minMeasures:o,newHyperCubeDef:i}){const a=e.data[0];i.qLayoutExclude||(i.qLayoutExclude={}),i.qLayoutExclude.qHyperCubeDef||(i.qLayoutExclude.qHyperCubeDef={}),(a.dimensions.length>t&&t>0||a.excludedDimensions&&a.excludedDimensions.length&&a.dimensions.length+a.excludedDimensions.length>n)&&(i.qLayoutExclude.qHyperCubeDef.qDimensions||(i.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(a.measures.length>r&&r>0||a.excludedMeasures&&a.excludedMeasures.length&&a.measures.length+a.excludedMeasures.length>o)&&(i.qLayoutExclude.qHyperCubeDef.qMeasures||(i.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&a.measures.length&&(i.qLayoutExclude.qHyperCubeDef.qMeasures||(i.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!t&&a.dimensions.length&&(i.qLayoutExclude.qHyperCubeDef.qDimensions||(i.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function({exportFormat:e,maxDimensions:t,minDimensions:n,newHyperCubeDef:r,defaultDimension:o}){const i=e.data[0];let a;if(t>0)for(a=0;a<i.dimensions.length;++a)r.qDimensions.length<t?r.qDimensions.push(ZS(i.dimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(ZS(i.dimensions[a],o));else if(i.dimensions.length)for(a=0;a<i.dimensions.length;++a)r.qLayoutExclude.qHyperCubeDef.qDimensions.push(ZS(i.dimensions[a],o));if(i.excludedDimensions.length)for(a=0;a<i.excludedDimensions.length;++a)r.qDimensions.length<n?r.qDimensions.push(ZS(i.excludedDimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(ZS(i.excludedDimensions[a],o))},addDefaultMeasures:function({exportFormat:e,maxMeasures:t,minMeasures:n,newHyperCubeDef:r,defaultMeasure:o}){const i=e.data[0];let a;if(t>0)for(a=0;a<i.measures.length;++a)r.qMeasures.length<t?r.qMeasures.push(YS(i.measures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(YS(i.measures[a],o));else if(i.measures.length)for(a=0;a<i.measures.length;++a)r.qLayoutExclude.qHyperCubeDef.qMeasures.push(YS(i.measures[a],o));if(i.excludedMeasures.length)for(a=0;a<i.excludedMeasures.length;++a)r.qMeasures.length<n?r.qMeasures.push(YS(i.excludedMeasures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(YS(i.excludedMeasures[a],o))},updateDimensionsOnAdded:function({newProperties:e,dataDefinition:t,hypercubePath:n}){if(t.dimensions&&"function"==typeof t.dimensions.added){const r=KS.getValue(e,n||"").qHyperCubeDef,o=[...r.qDimensions];r.qDimensions=[],o.forEach(n=>{r.qDimensions.push(n),t.dimensions.added(n,e)})}},updateMeasuresOnAdded:function({newProperties:e,dataDefinition:t,hypercubePath:n}){if(t.measures&&"function"==typeof t.measures.added){const r=KS.getValue(e,n||"").qHyperCubeDef,o=[...r.qMeasures];r.qMeasures=[],o.forEach(n=>{r.qMeasures.push(n),t.measures.added(n,e)})}}};var nw={exportProperties:e=>function({propertyTree:e,hypercubePath:t}){const n=function(e=1){const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),r=e.qProperty,o=KS.getValue(r,t||""),i=o.qHyperCubeDef,a=n.data[0];if(i.qInterColumnSortOrder||(i.qInterColumnSortOrder=[]),a.dimensions.push(...i.qDimensions),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qDimensions&&a.excludedDimensions.push(...i.qLayoutExclude.qHyperCubeDef.qDimensions),a.measures.push(...i.qMeasures),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qMeasures&&a.excludedMeasures.push(...i.qLayoutExclude.qHyperCubeDef.qMeasures),a.interColumnSortOrder=i.qInterColumnSortOrder.concat(),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=i.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();JS.isOrderedSubset(e,a.interColumnSortOrder)&&(a.interColumnSortOrder=e)}return delete i.qLayoutExclude,Object.keys(r).forEach(e=>{n.properties[e]=r[e]}),t&&(n.properties.qHyperCubeDef=o.qHyperCubeDef,delete o.qHyperCubeDef),r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach(e=>{n.properties.hasOwnProperty(e)||(n.properties[e]=r.qLayoutExclude.disabled[e])}),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(tw.restoreChangedProperties(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!KS.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude,n}(e),importProperties:e=>function({exportFormat:e,initialProperties:t={},dataDefinition:n={},defaultPropertyValues:r={},hypercubePath:o}){const i={qChildren:[]},a=tw.createNewProperties({exportFormat:e,initialProperties:t,hypercubePath:o}),s=KS.getValue(t,o||"").qHyperCubeDef,l=KS.getValue(a,o||"").qHyperCubeDef,{maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:p}=tw.getMaxMinDimensionMeasure({exportFormat:e,dataDefinition:n}),{defaultDimension:f=tw.getDefaultDimension(),defaultMeasure:h=tw.getDefaultMeasure()}=r;return l.qDimensions.length=0,l.qMeasures.length=0,tw.shouldInitLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:p})&&tw.initLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:p,newHyperCubeDef:l}),tw.addDefaultDimensions({exportFormat:e,maxDimensions:c,minDimensions:u,newHyperCubeDef:l,defaultDimension:f}),tw.addDefaultMeasures({exportFormat:e,maxMeasures:d,minMeasures:p,newHyperCubeDef:l,defaultMeasure:h}),tw.setInterColumnSortOrder({exportFormat:e,newHyperCubeDef:l}),tw.copyPropertyIfExist("qMaxStackedCells",s,l),tw.copyPropertyIfExist("qNoOfLeftDims",s,l),tw.copyPropertyOrSetDefault("qInitialDataFetch",s,l,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),tw.copyPropertyOrSetDefault("qMode",s,l,"S"),tw.copyPropertyOrSetDefault("qReductionMode",s,l,"N"),tw.copyPropertyOrSetDefault("qSortbyYValue",s,l),tw.copyPropertyOrSetDefault("qIndentMode",s,l),tw.copyPropertyOrSetDefault("qShowTotalsAbove",s,l),tw.importCommonProperties(a,e,t),tw.updateDimensionsOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),tw.updateMeasuresOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),i.qProperty=a,i}(e)};const rw=e=>KS.getValue(e,"data.targets.0.propertyPath"),ow=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return nw.exportProperties})(rw(e))},iw=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return nw.importProperties})(rw(e))},aw=async({halo:e,model:t,cellRef:n,newType:r,properties:o,viewDataMode:i=!1})=>{const a=o?{qProperty:o}:await t.getFullPropertyTree(),s=n.current.getQae(),l=ow(s);if(!l)throw new Error("Source chart does not support conversion");const u=await(async({halo:e,name:t,version:n})=>{const{types:r}=e;return await r.get({name:t,version:n}).supernova()})({halo:e,name:r}),d=u.qae,p=iw(d);if(!p)throw new Error("Target chart does not support conversion");return p({exportFormat:l({propertyTree:a,hypercubePath:tw.getHypercubePath(s),viewDataMode:i}),initialProperties:c({qInfo:{qType:r},visualization:r},KS.getValue(d,"properties.initial",{})),dataDefinition:KS.getValue(d,"data.targets.0.",{}),hypercubePath:tw.getHypercubePath(d),viewDataMode:i})},sw={hypercube:nw},lw=ye.bind(null,!0),cw={},{isArray:uw}=Array;function dw(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pw(e){return void 0===e}function fw(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function hw(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e}function mw(e,t){let n;return t.substring(1).split("/").slice(0,-1).forEach(t=>{if(!hw(t))throw new Error(`Unsafe key in path: ${t}`);n=+t;const r=isNaN(n)?{}:[];e[n||t]=pw(e[n||t])?r:e[t],e=e[n||t]}),e}function gw(e,t){let n=!0;if(dw(e)&&dw(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(r=>{gw(e[r],t[r])||(n=!1)}),n);if(uw(e)&&uw(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!gw(e[n],t[n]))return!1;return!0}return e===t}cw.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?lw({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;gw(i,a)||fw(t,o)||(pw(a)?r.push({op:"add",path:s,value:i}):dw(i)&&dw(a)?r=r.concat(cw.generate(a,i,s)):uw(i)&&uw(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]&&pw(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(gw(t,o))return r;if(!pw(t[0])&&pw(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:`${n}/${e}`}),o.splice(e,1)):r=r.concat(cw.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))}),Object.keys(e).forEach(o=>{pw(t[o])&&!fw(e,o)&&r.push({op:"remove",path:`${n}/${o}`})}),r},cw.apply=function(e,t){t.forEach(t=>{let n=mw(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(!hw(r)||null!==i&&!hw(i)){const e=hw(r)?i:r;throw new Error(`Unsafe key in patch path: ${e}`)}if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(uw(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(uw(o)&&uw(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(dw(o)&&dw(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!fw(a,e)&&hw(e)&&delete a[e]}),lw(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=mw(e,t.from);uw(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(uw(n)?n.splice(+r,1):delete n[r]);var a})},cw.clone=function(e){return lw({},e)},cw.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},cw.updateObject=function(e,t){Object.keys(e).length?cw.apply(e,cw.generate(e,t)):lw(e,t)};const bw=e=>t=>{const n=(r=c(c({},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(M.prototype).forEach(e=>{r[e]=M.prototype[e]}),M.init(r),r);var r;return n};let yw,vw;function Sw(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 ww(e,{explicitResize:t=!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 xw(e){Cw(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 kw(e){if(e.__hooks.obsolete)return Promise.resolve();vw=-1,yw=e,yw.__hooks.initiated&&yw.__hooks.list.length;try{yw.fn.call(null)}catch(e){console.error(e)}yw.__hooks.initiated=!0;const t=yw.__hooks;return Pw(yw),vw=void 0,yw=void 0,t.chain.promise||(t.chain.promise=new Promise(e=>{t.chain.resolve=e})),function(e){Cw(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame(()=>{!function(e){Cw(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 Cw(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 Ew(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 Lw(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 Rw(e){return e.__hooks.imperativeHandle}function Pw(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function Tw(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,Pw(e))}function Ow(e){if(void 0===yw)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=yw.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function Iw(e){Ow(++vw);return yw.context[e]}function _w(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function qw(e){return{__hooked:!0,fn:e,initiate:ww,run:kw,teardown:xw,runSnaps:Ew,runMenu:Lw,focus:$w,blur:zw,observeActions:Tw,getImperativeHandle:Rw,updateRectOnNextRun:_w}}function Mw(e){const t=Ow(++vw);if(!t.value){t.component=yw;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,kw(r)},0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function Nw(e,t){const n=Ow(++vw);Sw(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===yw.__hooks.pendingEffects.indexOf(n)&&yw.__hooks.pendingEffects.push(n))}function Aw(e,t){const n=Ow(++vw);Sw(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],yw.__hooks.pendingLayoutEffects.push(n))}function Dw(e,t){const n=Ow(++vw);return Sw(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function jw(){return Iw("element")}function $w(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 zw(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 Fw={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Bw=Object.keys(Fw);function Ww(e,t){const n=c({},Fw);var r;r=n,Object.keys(M.prototype).forEach(e=>{r[e]=M.prototype[e]}),M.init(r);const o={emit(...e){n.emit(...e)}};Object.keys(e.component||{}).forEach(t=>{-1!==Bw.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]});const i=function({sn:e,component:t}){const n={},r=[],o=bw(t);return((e.definition.selectionToolbar||{}).items||[]).forEach(e=>{const t=o(e);n[e.key]=t,r.push(t)}),(e.definition.actions||[]).forEach(e=>{const t=o(e);n[e.key]=t}),{actions:n,selectionToolbarItems:r,destroy(){r.length=0}}}({sn:e,component:o}),a=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(o,{model:t.model,app:t.app,global:a,selections:t.selections,actions:i.actions}),Object.assign(n,{actions:i.actions,model:t.model,app:t.app,selections:t.selections}),[n,i]}function Hw(e,t,n){"function"==typeof e.component&&(e.component=qw(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 u={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(u,{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(c(c({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(c(c({},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=u.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(u.context[e])}),i.themeName=u.context.theme?u.context.theme.name():void 0,i.language=u.context.translator?u.context.translator.language():void 0,Object.assign(u,{selections:t.selections}),[u,null]}(e,t,n):Ww(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(...n){try{e.qae.properties.onChange.call({model:t.model},...n)}catch(e){}return t.model.__snInterceptor.setProperties.call(this,...n)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then(o=>{const i=cw.clone(o),a=n.map(e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath}));cw.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const s=cw.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 Uw=1e3,Vw=1e3,Gw=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Kw=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map(([e,t])=>e+(Math.random()*(t-e)|0).toString(32)).join(""),Jw=(e,t)=>e&&e.find(e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t})||null,Qw=e=>{var t,n;return c(c({},e),{},{qDef:c(c({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:Kw()})})},Xw=e=>{var t;return c(c({},Qw(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},Zw=(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]})},Yw=new Error("Not supported in this object, need to implement in subclass."),ex=e=>{if(!e)return[];return[...e].map(e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?c(c({},e),{},{qDef:c(c({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e})},tx=(e,t)=>{if(e)return t&&KS.getValue(e,t)?KS.getValue(e,t).qHyperCube:e.qHyperCube};function nx(e,t){return e.filter((e,n)=>t.includes(n))}function rx(e,t,n=void 0){const r=e.getAlternativeDimensions(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function ox(e,t,n){JS.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function ix(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 ax(e,t){return e.getAlternativeDimensions().length+t.length>=Uw}function sx(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<Uw}async function lx(e,t,n,r,o,i){await e.autoSortDimension(t),JS.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 cx(e,t,n=void 0){const r=e.getAlternativeMeasures(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function ux(e,t){JS.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function dx(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<Vw}function px(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 fx{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=Jw(n,e))&&void 0!==t?t:Jw(r,e)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw Yw}addDimensions(){throw Yw}removeDimension(){throw Yw}removeDimensions(){throw Yw}autoSortDimension(){throw Yw}replaceDimension(){throw Yw}getSorting(){throw Yw}createLibraryDimension(e,t){let n=ye(!0,{},this.dimensionProperties||{},t||{});return n=Xw(n),n.qLibraryId=e,n.qDef.autoSort=!0,n.qDef.qSortCriterias=Gw,delete n.qDef.qFieldDefs,delete n.qDef.qFieldLabels,n}createFieldDimension(e,t,n){let r=ye(!0,{},this.dimensionProperties||{},n||{});return r=Xw(r),e||(r.qDef.qFieldDefs=[],r.qDef.qFieldLabels=[],r.qDef.qSortCriterias=[]),r.qDef.qFieldDefs=[e],r.qDef.qFieldLabels=t?[t]:[""],r.qDef.qSortCriterias=Gw,r.qDef.autoSort=!0,r}addFieldDimension(e,t,n){const r=this.createFieldDimension(e,t,n);return this.addDimension(r)}addFieldDimensions(e){const t=e.map(({field:e,label:t,defaults:n})=>this.createFieldDimension(e,t,n));return this.addDimensions(t)}addLibraryDimension(e,t){const n=this.createLibraryDimension(e,t);return this.addDimension(n)}addLibraryDimensions(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryDimension(e,t));return this.addDimensions(t)}async addAltLibraryDimensions(e){const t=e.map(({id:e})=>this.createLibraryDimension(e));return this.addDimensions(t,!0)}async addAltFieldDimensions(e){const t=e.map(({field:e})=>this.createFieldDimension(e));return this.addDimensions(t,!0)}addAlternativeFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t,!0)}addAlternativeLibraryDimension(e,t){const n=this.createLibraryDimension(e,t);return this.addDimension(n,!0)}minDimensions(){return"function"==typeof this.dimensionDefinition.min?this.dimensionDefinition.min.call(null,this.properties,this):this.dimensionDefinition.min||0}maxDimensions(e=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 Yw}addMeasures(){throw Yw}removeMeasure(){throw Yw}removeMeasures(){throw Yw}autoSortMeasure(){throw Yw}replaceMeasure(){throw Yw}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=Jw(n,e))&&void 0!==t?t:Jw(r,e)}createExpressionMeasure(e,t,n){var r,o;const i=ye(!0,{},this.measureProperties||{},n||{});return i.qDef=null!==(r=i.qDef)&&void 0!==r?r:{},i.qDef.qNumFormat=null!==(o=i.qDef.qNumFormat)&&void 0!==o?o:{},i.qDef.qDef=e,i.qDef.qLabel=t,i.qDef.autoSort=!0,i}addExpressionMeasure(e,t,n){const r=this.createExpressionMeasure(e,t,n);return this.addMeasure(r)}addExpressionMeasures(e){const t=e.map(({expression:e,label:t,defaults:n})=>this.createExpressionMeasure(e,t,n));return this.addMeasures(t,!1)}createLibraryMeasure(e,t){var n,r;const o=ye(!0,{},this.measureProperties||{},t||{});return o.qDef=null!==(n=o.qDef)&&void 0!==n?n:{},o.qDef.qNumFormat=null!==(r=o.qDef.qNumFormat)&&void 0!==r?r:{},(e=>{const t=e;t.quarantine={qNumFormat:t.qNumFormat||{},isCustomFormatted:t.isCustomFormatted||!1},t.qNumFormat=null,t.isCustomFormatted=void 0})(o.qDef),o.qLibraryId=e,o.qDef.autoSort=!0,delete o.qDef.qDef,delete o.qDef.qLabel,o}addLibraryMeasure(e,t){const n=this.createLibraryMeasure(e,t);return this.addMeasure(n)}addLibraryMeasures(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryMeasure(e,t));return this.addMeasures(t,!1)}addAltLibraryMeasures(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryMeasure(e,t));return this.addMeasures(t,!0)}addAltExpressionMeasures(e){const t=e.map(({expression:e})=>this.createExpressionMeasure({expression:e}));return this.addMeasures(t,!0)}addAlternativeExpressionMeasure(e,t,n){const r=this.createExpressionMeasure(e,t,n);return this.addMeasure(r,!0)}addAlternativeLibraryMeasure(e,t){const n=this.createLibraryMeasure(e,t);return this.addMeasure(n,!0)}minMeasures(){return"function"==typeof this.measureDefinition.min?this.measureDefinition.min.call(null,this.properties,this):this.measureDefinition.min||0}maxMeasures(e=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 hx(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then(async()=>(ox(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 mx(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(()=>(ux(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 gx(e,t){!function(e,t){JS.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 bx(e,t){!function(e,t){JS.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 yx(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 vx(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),ux(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 Sx extends fx{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?KS.getValue(e,`${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=ex(this.hcProperties.qDimensions),this.hcProperties.qMeasures=ex(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=tx(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e,t,n){const r=Xw(e);return sx(this,t)?rx(this,r,n):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?hx(e,t,o):Promise.resolve(t)}(this,r,n)}async addDimensions(e,t=!1){const n=this.getDimensions(),r=n.length,o=[];let a=0;var s,l=!1,c=!1;try{for(var u,d=i(e);l=!(u=await d.next()).done;l=!1){const e=u.value;{if(ax(this,n))return o;const i=Xw(e);if(sx(this,t)){const e=await rx(this,i);o.push(e)}else n.length<this.maxDimensions()&&(await lx(this,i,r,n,o,a),a++)}}}catch(e){c=!0,s=e}finally{try{l&&null!=d.return&&await d.return()}finally{if(c)throw s}}return o}removeDimension(e,t){return t?yx(this,e):gx(this,e)}async removeDimensions(e,t){const n=this.getAlternativeDimensions(),r=this.getDimensions();if(0===e.length)return[];let o=[];const a=[...e].sort((e,t)=>t-e);if(t&&n.length>0){o=nx(n,e);var s,l=!1,c=!1;try{for(var u,d=i(a);l=!(u=await d.next()).done;l=!1){const e=u.value;await yx(this,e)}}catch(e){c=!0,s=e}finally{try{l&&null!=d.return&&await d.return()}finally{if(c)throw s}}}else if(r.length>0){o=nx(r,e);var p,f=!1,h=!1;try{for(var m,g=i(a);f=!(m=await g.next()).done;f=!1){const e=m.value;await gx(this,e)}}catch(e){h=!0,p=e}finally{try{f&&null!=g.return&&await g.return()}finally{if(h)throw p}}}return o}replaceDimension(e,t){return this.autoSortDimension(t).then(()=>function(e,t,n){if(!n)return;const r=e.getDimensions(),o=r[t],i=c(c({},n),{},{qDef:c(c({},n.qDef),{},{cId:Kw()})});return r[t]=i,i&&"function"==typeof e.dimensionDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,e,t))}reinsertDimension(e,t,n){const r=Qw(e);return sx(this,t)?rx(this,r,n).then(()=>{ix(this,r)}):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?(r.splice(o,0,t),ox(e,r),ix(e,t)):Promise.resolve(t)}(this,r,n)}moveDimension(e,t){const n=this.getDimensions(),r=this.getAlternativeDimensions();return e<n.length&&t<n.length?Promise.resolve(JS.move(n,e,t)):e<n.length&&t>=n.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,t,n,r):e>=n.length&&t<n.length?Promise.resolve(px(e,t,n,r)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;JS.move(r,o,i)}(e,t,n,r))}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&&Zw(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&&Zw([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=tx(this.layout,this.path);return e?e.qMeasureInfo:[]}getMeasureLayout(e){return this.getMeasureLayouts().filter(t=>e===t.cId)[0]}addMeasure(e,t,n){const r=Qw(e);return dx(this,t)?cx(this,r,n):mx(this,r,n)}autoSortMeasure(e){const t=e;return t.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},Promise.resolve(t)}addMeasures(e,t=!1){const n=this.getMeasures(),r=[];let o=0;return e.forEach(async e=>{if(function(e,t){return e.getAlternativeMeasures().length+t.length>=Vw}(this,n))return!1;const i=Qw(e);return dx(this,t||!1)?(cx(this,i),r.push(i)):n.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=c({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},JS.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,n,r,o),o++),!0}),r}removeMeasure(e,t){return t?function(e,t){return e.getAlternativeMeasures().splice(t,1)}(this,e):bx(this,e)}async removeMeasures(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures();let o=[];if(0===e.length)return o;if(t&&r.length>0)o=nx(r,e),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);else if(n.length>0){o=nx(n,e);const t=[...e].sort((e,t)=>t-e);var a,s=!1,l=!1;try{for(var c,u=i(t);s=!(c=await u.next()).done;s=!1){const e=c.value;await bx(this,e)}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}}return o}replaceMeasure(e,t){return this.autoSortMeasure(t).then(()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=c(c({},n),{},{qDef:c(c({},n.qDef),{},{cId:Kw()})});return r[t]=i,i&&"function"==typeof e.measureDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,e,t))}reinsertMeasure(e,t,n){const r=Qw(e);return dx(this,t)?cx(this,r,n):vx(this,r,n)}moveMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures();return e<n.length&&t<n.length?Promise.resolve(JS.move(n,e,t)):e<n.length&&t>=n.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,t,n,r):e>=n.length&&t<n.length?px(e,t,n,r):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;JS.move(r,o,i)}(e,t,n,r))}setSorting(e){e&&e.length===this.hcProperties.qInterColumnSortOrder.length&&(this.hcProperties.qInterColumnSortOrder=e)}getSorting(){return this.hcProperties.qInterColumnSortOrder}changeSorting(e,t){KS.move(this.hcProperties.qInterColumnSortOrder,e,t)}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 wx=()=>{};function xx(e,t){return void 0===e?()=>t:()=>e}function kx(e){const t=e||{};return{min:"function"==typeof t.min?t.min:xx(t.min,0),max:"function"==typeof t.max?t.max:xx(t.max,1e3),added:t.added||t.add||wx,description:t.description||wx,moved:t.moved||t.move||wx,removed:t.removed||t.remove||wx,replaced:t.replaced||t.replace||wx,isDefined:()=>!!e}}function Cx(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 ${e} at ${t}. Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef`)}return{propertyPath:t,layoutPath:n,resolveLayout:e=>((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})(e,n,{}),dimensions:kx(e.dimensions),measures:kx(e.measures)}}function Ex(e={}){let t,n=e.properties||{};e.properties&&(e.properties.initial||e.properties.onChange)&&(n=e.properties.initial,t=e.properties.onChange);return{properties:{initial:n,onChange:t},data:{targets:((e.data||{}).targets||[]).map(Cx)},exportProperties:e.exportProperties,importProperties:e.importProperties}}function Lx(e,t){var n,r;let o;o="function"==typeof e?e(t):e;const i={qae:Ex(o.qae),component:o.component||{},create:e=>Hw(i,e,t),definition:t.flags.isEnabled("NEBULA_DATA_HANDLERS")?{dataHandler:null!==(n=null===(r=o)||void 0===r?void 0:r.dataHandler)&&void 0!==n?n:e=>new Sx(e)}:{}};return Object.keys(o).forEach(e=>{i[e]||(i.definition[e]=o[e])}),i}var Rx=e=>zh((e=>c(c({},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 Px({d:e}){const t=qs();let n="inherit",r=t.palette.success.main;e.missing?r=t.palette.warning.main:e.error&&(n="error",r=t.palette.error.main);const o={color:r},i=mr.jsx(Xc,{style:{lineHeight:"30px",paddingRight:t.spacing(1)},children:mr.jsx(rf,{children:e.missing||e.error?mr.jsx(Rx,{style:o}):mr.jsx(om,{style:o})})});return mr.jsxs(Qp,{container:!0,alignItems:"center",wrap:"nowrap",children:[mr.jsx(Qp,{children:i}),mr.jsx(Qp,{container:!0,sx:{minWidth:0},wrap:"nowrap",children:mr.jsxs(Xc,{noWrap:!0,component:"p",children:[mr.jsx(Xc,{component:"span",variant:"subtitle2",color:n,children:e.description}),mr.jsx(Xc,{component:"span",children:" "}),mr.jsx(Xc,{component:"span",variant:"subtitle2",color:e.error?"error":"inherit",style:{fontWeight:400},children:e.label})]})})]})}function Tx({data:e}){const t=qs();return mr.jsx(Qp,{container:!0,style:{maxWidth:"300px",overflow:"hidden"},children:e.map((e,n)=>{const r=e.descriptions.map((e,t)=>mr.jsx(Px,{d:e},t));return r.length>0&&mr.jsxs(Qp,{container:!0,direction:"column",style:{paddingBottom:t.spacing(2)},children:[mr.jsx(Xc,{noWrap:!0,variant:"subtitle1",align:"left",color:"textSecondary",children:e.title},n),r]},n)})})}function Ox({title:e="Error",message:t="",data:n=[]}){const[r,o]=Th(),[i,a]=Th(),[s,l]=Th(),c=n.some(e=>e.descriptions&&e.descriptions.length>0),u=!!o&&!!a&&!!l&&a.height+l.height>o.height,d=!!o&&!!a&&!!l&&a.width+l.width<=o.width,p=c&&(!!o&&!!a&&!!l)&&(!u||d);return mr.jsxs(Qp,{ref:r,container:!0,direction:"column",wrap:"wrap",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"},children:[mr.jsxs(Qp,{ref:i,container:!0,direction:"column",alignItems:"center",wrap:"nowrap",children:[mr.jsx(Qp,{children:mr.jsx(Rx,{style:{fontSize:"38px"}})}),mr.jsx(Qp,{children:mr.jsx(Xc,{variant:"h6",align:"center","data-tid":"error-title",children:e})}),mr.jsx(Qp,{children:mr.jsx(Xc,{variant:"subtitle1",align:"center","data-tid":"error-message",children:t})})]}),p?mr.jsx(Tx,{data:n}):null,c?mr.jsx(Qp,{ref:s,"aria-hidden":!0,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,top:0},children:mr.jsx(Tx,{data:n})}):null]})}const Ix=["size"],_x="Progress",qx={root:`${_x}-root`,front:`${_x}-front`,back:`${_x}-back`},Mx=Ns("div")(({theme:e})=>({[`&.${qx.root}`]:{position:"relative",display:"inline-block"},[`& .${qx.front}`]:{color:e.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},[`& .${qx.back}`]:{color:e.palette.divider}})),Nx={small:16,medium:32,large:64,xlarge:128};function Ax(e){let{size:t="medium"}=e,n=u(e,Ix);const r=Nx[t];return mr.jsxs(Mx,{className:qx.root,children:[mr.jsx(nc,c({variant:"determinate",value:100,className:qx.back,size:r,thickness:3},n)),mr.jsx(nc,c({variant:"indeterminate",disableShrink:!0,className:qx.front,size:r,thickness:3},n))]})}const Dx=["cancel","translator"],jx=["retry","translator"],$x={stripes:"LongRunningQuery-stripes"},zx=Ns(Qp)(()=>({[`& .${$x.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 Fx(e){let{cancel:t,translator:n}=e,r=u(e,Dx);return mr.jsxs(mr.Fragment,{children:[mr.jsxs(zx,{container:!0,direction:"column",alignItems:"center",gap:2,children:[mr.jsx(Qp,{children:mr.jsx(Ax,{})}),mr.jsx(Qp,{children:mr.jsx(Xc,{variant:"h6",align:"center","data-tid":"update-active",children:n.get("Object.Update.Active")})})]}),mr.jsx(Qp,c(c({},r),{},{children:mr.jsx(fc,{variant:"contained",onClick:t,children:n.get("Cancel")})}))]})}function Bx(e){let{retry:t,translator:n}=e,r=u(e,jx);return mr.jsxs(mr.Fragment,{children:[mr.jsx(Qp,{children:mr.jsx(Rx,{style:{fontSize:"38px"}})}),mr.jsx(Qp,{children:mr.jsx(Xc,{variant:"h6",align:"center","data-tid":"update-cancelled",children:n.get("Object.Update.Cancelled")})}),mr.jsx(Qp,{children:mr.jsx(fc,c(c({variant:"contained",onClick:t},r),{},{children:n.get("Retry")}))})]})}function Wx({canCancel:e,canRetry:t,api:n}){const{translator:r}=E.useContext(wc);return mr.jsxs(Qp,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:$x.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:[e&&mr.jsx(Fx,{cancel:n.cancel,translator:r,className:$x.cancel}),t&&mr.jsx(Bx,{retry:n.retry,translator:r,className:$x.retry})]})}function Hx(){return mr.jsx(Qp,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:mr.jsx(Ax,{size:"large"})})}const Ux={width:0,height:0},Vx="Header",Gx={containerStyle:`${Vx}-containerStyle`,containerTitleStyle:`${Vx}-containerTitleStyle`},Kx=Ns(Qp)(({theme:e})=>({[`&.${Gx.containerStyle}`]:{flexGrow:0},[`&.${Gx.containerTitleStyle}`]:{paddingBottom:e.spacing(1)}})),Jx="njs-cell-title",Qx="njs-cell-sub-title";function Xx({id:e,layout:t,sn:n,anchorEl:r,hovering:o,focusHandler:i,titleStyles:a={},isRtl:s,translator:l}){const c=t.showTitles&&!!t.title,u=t.showTitles&&!!t.subtitle,d=t.qSelectionInfo&&t.qSelectionInfo.qInSelections,[p,f]=E.useState([]);E.useEffect(()=>{n&&n.component&&n.component.isHooked&&n.component.observeActions(e=>{f([...e,...n&&n.selectionToolbar&&n.selectionToolbar.items||[]])})},[n]);const h=[Gx.containerStyle,...c||u?[Gx.containerTitleStyle]:[]],m=o||d,g=mr.jsx(pb,{show:!1,selections:{show:d,api:n.component.selections,onKeyDeactivate:i.refocusContent},actions:p,popover:{show:m,anchorEl:r},focusHandler:i,layout:t,isRtl:s});return mr.jsxs(Kx,{container:!0,wrap:"nowrap",className:h.join(" "),children:[mr.jsx(Qp,{size:"grow",sx:{minWidth:0},dir:s?"rtl":"ltr",children:mr.jsxs(Qp,{container:!0,wrap:"nowrap",direction:"column",children:[c?mr.jsx(Sh,{title:t.title,children:mr.jsx(Xc,{id:`${e}_title`,variant:"h6",noWrap:!0,className:Jx,style:a.main,children:t.title})}):mr.jsx("div",{id:`${e}_title`,style:Ux,"aria-label":l.get("Accessibility.Object.NoTitle")}),u&&mr.jsx(Sh,{title:t.subtitle,children:mr.jsx(Xc,{variant:"body2",noWrap:!0,className:Qx,style:a.subTitle,children:t.subtitle})})]})}),mr.jsx(Qp,{children:g})]})}const Zx="condition",Yx="search",ek="clear_selection",tk="matches_exactly",nk="starts_with",rk="ends_with",ok="beginning_of_word",ik="general",ak="fixed_value",sk=(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 Yx:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case ok:o="*^",i="*";break;case rk:o="*";break;case nk:i="*";break;case tk: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?`"${o}${a}${i}"`:""})(e);break;case Zx:o+=(e=>{var t,n,r,o,i,a,s;const{options:l}=e,c=(null==l?void 0:l.mode)===ik,u=(null==l||null===(t=l.modifier)||void 0===t?void 0:t.type)===ak,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=`${null===(m=l.conditionField)||void 0===m?void 0:m.aggregator}(${Ng(null===(g=l.conditionField)||void 0===g?void 0:g.field)})`,f=`${null===(b=l.firstValue)||void 0===b?void 0:b.fixedValue}`;else if(!c&&u){var y;p="",f=`${null===(y=l.firstValue)||void 0===y?void 0:y.fixedValue}`,h=""}else if(c||u){var v,S,w,x;p=`${null===(v=l.conditionField)||void 0===v?void 0:v.aggregator}(${Ng(null===(S=l.conditionField)||void 0===S?void 0:S.field)})`,f=`${null===(w=l.firstValue)||void 0===w?void 0:w.aggregator}(${Ng(null===(x=l.firstValue)||void 0===x?void 0:x.field)})`}else{var k,C;p=`${Ng(e.field)}`,f=`${null===(k=l.firstValue)||void 0===k?void 0:k.aggregator}(total ${Ng(null===(C=l.firstValue)||void 0===C?void 0:C.field)})`}const E=`${h}${p}${d[0]}${f}`;let L="";if(d.length>1){var R,P,T;if(!u&&(null===(R=l.secondValue)||void 0===R||!R.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 O;if(c&&u)e=`${null===(O=l.secondValue)||void 0===O?void 0:O.fixedValue}`,t=` and ${p}`;else if(!c&&u){var I;e=`${null===(I=l.secondValue)||void 0===I?void 0:I.fixedValue}`,t=""}else if(c||u){var _,q;e=`${null===(_=l.secondValue)||void 0===_?void 0:_.aggregator}(${Ng(null===(q=l.secondValue)||void 0===q?void 0:q.field)})`,t=` and ${p}`}else{var M,N;e=`${null===(M=l.secondValue)||void 0===M?void 0:M.aggregator}(total ${Ng(null===(N=l.secondValue)||void 0===N?void 0:N.field)})`,t=` and ${p}`}L=`${t}${d[1]}${e}`}return`"${E}${L}"`})(e);break;case ek: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=`${n} ${o}`)),{field:e.field,label:o}}).filter(e=>""!==e.label)},lk=(e,t)=>sk(e,t).map(e=>`${e.field}: ${e.label}`).join("; ");var ck=e=>zh((e=>c(c({},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 uk({styles:e,children:t}){return mr.jsx(Xc,{noWrap:!0,variant:"body2",style:c(c({},e),{},{fontStyle:"italic"}),children:t})}function dk({layout:e,translator:t,filtersFootnoteString:n,footerStyle:r,isRtl:o}){var i;const a=sk(null!==(i=null==e?void 0:e.filters)&&void 0!==i?i:[],t),s={color:null==r?void 0:r.color,fontFamily:null==r?void 0:r.fontFamily,fontSize:null==r?void 0:r.fontSize,fontWeight:null==r?void 0:r.fontWeight};return mr.jsx(Sh,{title:n,children:mr.jsxs(Qp,{container:!0,wrap:"nowrap",sx:{backgroundColor:null==r?void 0:r.backgroundColor,padding:null==r?void 0:r.padding,borderTop:null==r?void 0:r.borderTop},"data-testid":"filters-footnote",justifyContent:o?"flex-end":"flex-start",children:[mr.jsxs(Qp,{sx:{display:"flex"},children:[mr.jsx(ck,{style:{fontSize:"12px",color:r.color,margin:"auto"}}),mr.jsxs(uk,{styles:c(c({},s),{},{marginLeft:"2px"}),children:[t.get("Object.FiltersApplied"),"  "]})]}),mr.jsx(Qp,{sx:{display:"flex"},children:a.map(e=>mr.jsxs(Qp,{container:!0,wrap:"nowrap",children:[mr.jsx(uk,{styles:c(c({},s),{},{fontWeight:"bold"}),children:`${e.field}:`}),mr.jsxs(uk,{styles:s,children:["   ",e.label,"  "]})]},`${e.field}-${e.label}`))})]})})}const pk={itemStyle:"Footer-itemStyle"},fk=Ns(Qp)(()=>({[`& .${pk.itemStyle}`]:{minWidth:0,width:"100%"}})),hk="njs-cell-footer";function mk({layout:e,titleStyles:t={},translator:n,flags:r,isCardTheme:o,isRtl:i}){var a,s,l;const c=t.footer,u=(null==e||null===(a=e.filters)||void 0===a?void 0:a.length)>0&&(null==e||null===(s=e.qHyperCube)||void 0===s||null===(s=s.qMeasureInfo)||void 0===s?void 0:s.length)>0,d=lk(null!==(l=null==e?void 0:e.filters)&&void 0!==l?l:[],n),p=!(null!=e&&e.footnote)&&u&&d,f=null==r?void 0:r.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),h=o?"1px":"6px";return e&&e.showTitles&&(e.footnote||p)?mr.jsx(fk,{container:!0,children:mr.jsxs(Qp,{className:pk.itemStyle,"data-testid":hk,sx:{paddingTop:e=>f?h:e.spacing(1)},children:[e.footnote&&mr.jsx(Sh,{title:e.footnote,children:mr.jsx(Xc,{noWrap:!0,variant:"body2",className:hk,style:c,align:i?"right":"left",children:e.footnote})}),p&&mr.jsx(dk,{layout:e,translator:n,filtersFootnoteString:d,footerStyle:c,isRtl:i})]})}):null}class gk{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 bk="njs-viz";function yk({sn:e,snOptions:t,snPlugins:n,layout:r,appLayout:o,halo:i,cellId:a}){const{component:s}=e,{theme:l,language:u,constraints:d,interactions:p,keyboardNavigation:f}=E.useContext(wc),[h]=E.useState(()=>new gk),[m,g]=E.useState(!1),[b,y]=E.useState(0),[v,S,w]=Th(),[x,k]=E.useState(null),C=E.useCallback(e=>{e&&k(e)},[]);return E.useEffect(()=>{if(x)return s.created({options:t}),s.mounted(x),g(!0),()=>{h.stop(),s.willUnmount()}},[x,s]),E.useEffect(()=>{m&&x&&S&&(!s.isHooked&&r&&r.qSelectionInfo&&r.qSelectionInfo.qInSelections||h.schedule(()=>{const a=[];return d.passive||a.push("passive"),d.active||a.push("interact"),d.select||a.push("select"),d.edit||a.push("edit"),i.app&&i.app.session&&a.push("fetch"),Promise.resolve(s.render({layout:r,options:t,plugins:n,embed:i.public.nebbie,context:c({constraints:d,interactions:p,theme:i.public.theme,appLayout:o,keyboardNavigation:f},s.isHooked?{}:{logicalSize:e.logicalSize({layout:r}),localeInfo:(o||{}).qLocaleInfo,permissions:a})})).then(e=>{!1!==e&&(0===b&&"function"==typeof t.onInitialRender&&t.onInitialRender.call(null),y(b+1))})}))},[S,t,n,x,w,r,o,l,u,d,p,m,f]),mr.jsx("div",{ref:v,"data-render-count":b,style:{position:"relative",height:"100%"},className:bk,children:mr.jsx("div",{ref:C,id:`${a}_content`,style:{position:"absolute",width:"100%",height:"100%"}})})}const vk={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","sn-table":"straightTableV2",waterfallchart:"waterfallChart","sn-tabbed-container":"tabContainer","sn-slider":"slider"},Sk=({layout:e,theme:t,app:n,themeName:r,disableThemeBorder:o,queryParams:i})=>{const{hostConfig:a}=E.useContext(wc),s=E.useMemo(()=>{if(e&&t){const s=e.components?e.components.find(e=>"general"===e.key):null,l=(r=e.visualization,vk[r.toLowerCase()]?vk[r.toLowerCase()]:r),c={main:Lv(s,"main",t,l),footer:Lv(s,"footer",t,l),subTitle:Lv(s,"subTitle",t,l)},u=Cv(s,t,l),d=kv(s,n,i,null==a?void 0:a.host),p=function(e,t,n,r){const o=vv(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=yv("","borderWidth",t,n)),i&&o?`${i} solid ${o}`:void 0}(s,t,l,o),f=function(e,t,n){return(null==e?void 0:e.borderRadius)||yv("","borderRadius",t,n)}(s,t,l);return{titleStyles:c,bgColor:u,bgImage:d,border:p,borderRadius:f,boxShadow:Ev(s,t,l)}}var r;return{}},[e,t,n,r,o]);return s};class wk extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const xk=["action-button","sn-nav-menu","filterpane","sn-shape"],kk=[...xk,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],Ck=e=>-1===xk.indexOf(e),Ek=e=>Ck(e)?"10px 10px 0":"10px 0 0",Lk=({layout:e,isError:t,isCardTheme:n,titleStyles:r,translator:o})=>{if(n){var i,a,s;const n=(null==e?void 0:e.showTitles)&&!(null==e||!e.title),l=(null==e?void 0:e.showTitles)&&!(null==e||!e.subtitle),c=(null==e||null===(i=e.filters)||void 0===i?void 0:i.length)>0&&(null==e||null===(a=e.qHyperCube)||void 0===a||null===(a=a.qMeasureInfo)||void 0===a?void 0:a.length)>0,u=null==e?void 0:e.visualization,d=lk(null!==(s=null==e?void 0:e.filters)&&void 0!==s?s:[],o),p=!(null!=e&&e.footnote)&&c&&d,f=(null==e?void 0:e.showTitles)&&(!(null==e||!e.footnote)||p);let h;return n&&(r.main.padding=Ek(u)),l&&(r.subTitle.padding=((e,t)=>{const n=Ck(e);return t?n?"0 10px":"0":Ek(e)})(u,n)),f&&(-1===xk.indexOf(u)&&(r.footer.borderTop="1px solid #d9d9d9"),r.footer.padding="6px 10px"),(t||-1===kk.indexOf(u))&&(h=`${n||l?"0":"10px"} 10px ${f?"0":"5px"}`),h}},Rk=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,t])=>{Rk.set(e,t)});const Pk="njs-cell",Tk="njs-cell-body";const Ok=(e,t)=>{switch(t.type){case"LOADING":return c(c({},e),{},{loading:!0});case"LOADED":return c(c({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return c(c({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return c(c({},e),{},{longRunningQuery:!0});case"ERROR":return c(c({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error(`Unhandled type: ${t.type}`)}};function Ik({delay:e=750}){const[t,n]=E.useState(!1);return E.useEffect(()=>{const t=setTimeout(()=>n(!0),e);return()=>clearTimeout(t)},[]),t?mr.jsx(Hx,{}):null}const _k=e=>!e.qError||7005===e.qError.qErrorCode,qk=e=>e&&e.qError&&7005!==e.qError.qErrorCode,Mk=(e,t,n,r,o)=>[...Array(Math.max(e,t.length)).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=`${s?r:a?l||o:i&&t[e].qFallbackTitle||""}`,u=n(e);return{description:u?`${u}${c.length?":":""}`:null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}}),Nk=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=Mk(o,Nk(a.qDimensionInfo||a.qItems),e=>r.dimensions.description(n,e,{}),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),l=Mk(i,Nk(a.qMeasureInfo),e=>r.measures.description(n,e,{}),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:s,reqMeasErrors:l}},Dk=async(e,t,{targets:n},r)=>{const{hasUnfulfilledErrors:o,aggMinD:i,aggMinM:a,hasLayoutErrors:s,layoutErrors:l}=((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=Nk(f.qDimensionInfo||f.qItems),m=Nk(f.qMeasureInfo),g=h.filter(_k),b=m.filter(_k);if(o+=d,i+=p,(g.length<d||b.length<p)&&(r=!0),r=r||h.some(qk)||m.some(qk),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,n,t),c=[],u=[];let d=null;for(let i=0;i<n.length;++i){const a=n[i];if(!s&&o){const n=d||await r.getProperties();d=n;const o=Ak(e,t,n,a);c.push(...o.reqDimErrors),u.push(...o.reqMeasErrors)}}const p=c.filter(e=>!(e.missing||e.error)).length,f=e.get("Visualization.Incomplete.Dimensions",[p,i]),h=u.filter(e=>!(e.missing||e.error)).length,m=e.get("Visualization.Incomplete.Measures",[h,a]),g=[{title:f,descriptions:[...c]},{title:m,descriptions:[...u]}],b=s?l:g;return[s||o,{title:s?l[0].title:e.get("Visualization.Incomplete"),data:b}]};function jk(){return new M}const $k=E.forwardRef(({halo:e,model:t,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,currentId:a,emitter:s,navigation:l,onError:u},d)=>{var p,f;const{app:h,types:m}=e,{nebbie:g}=e.public,{theme:b,translator:y,language:v,keyboardNavigation:S,externalFocusManagement:w,disableCellPadding:x=!1,navigation:k,queryParams:C}=E.useContext(wc),[L]=E.useState(s||jk),R=qs(),[P,T,O]=Th(),[I,_]=E.useReducer(Ok,{loading:!1,loaded:!1,longRunningQuery:!1,error:(q=o)?{title:q.message}:null,sn:null,visualization:null});var q;const[M,N]=E.useState(t),[A,{validating:D,canCancel:j,canRetry:$},z]=Rh(M),[F]=Ph(h),[B,W,H]=Th(),[U,V]=E.useState(n),[G,K]=E.useState(r),J=`njs-cell-${a}`,[Q]=kb(h,M,[`#${J}`,".njs-action-toolbar-popover"]),[X,Z]=E.useState(!1),Y=E.useRef({enter:null,leave:null}),{titleStyles:ee,bgColor:te,bgImage:ne,border:re,borderRadius:oe,boxShadow:ie}=Sk({layout:A,theme:e.public.theme,app:e.app,themeName:b,disableThemeBorder:null==U?void 0:U.disableThemeBorder,queryParams:C}),ae=!("rtl"!==(null==U?void 0:U.direction)),se=E.useRef({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});E.useEffect(()=>{Sb(se.current),se.current.blurCallback=t=>{se.current.onBlurHandler?se.current.onBlurHandler(t):(e.root.toggleFocusOfCells(),t&&H&&H.focus())},se.current.refocusContent=()=>{I.sn.component&&"function"==typeof I.sn.component.focus&&I.sn.component.focus()}},[]);E.useEffect(()=>{if(o)return void i();if(!F||!A)return;if(I.visualization===A.visualization&&I.sn)return void(async e=>{const[t,n]=await Dk(y,A,e.generator.qae.data,M);_(t?{type:"ERROR",error:n}:{type:"RENDER"}),(({sn:e,layout:t,model:n})=>{const r=e&&e.component&&e.component.selections;if(r&&r.id&&n.id&&r.id===n.id){if(t&&t.qSelectionInfo&&t.qSelectionInfo.qInSelections&&!r.isModal()){const{targets:t}=e.generator.qae.data,n=t[0].propertyPath;r.goModal(n)}t.qSelectionInfo&&t.qSelectionInfo.qInSelections||r.isModal()&&r.noModal()}})({sn:I.sn,layout:A,model:M})})(I.sn);const e=m.getSupportedVersion(A.visualization,A.version);return(async(e,t)=>{_({type:"LOADING"}),await(async({dispatch:e,types:t,visualization:n,version:r,model:o,app:i,selections:a,nebbie:s,focusHandler:l,emitter:c,onMount:u,navigation:d})=>{try{const p=await(async({types:e,name:t,version:n})=>await e.get({name:t,version:n}).supernova())({types:t,name:n,version:r}),f=p.create({model:o,app:i,selections:a,nebbie:s,focusHandler:l,emitter:c,navigation:d});f&&(e({type:"LOADED",sn:f,visualization:n}),u())}catch(t){e(r?{type:"ERROR",error:{title:t.message,errorObject:t}}:{type:"ERROR",error:{title:`Could not find a version of '${n}' that supports current object version. Did you forget to register ${n}?`}}),u()}})({dispatch:_,types:m,visualization:e,version:t,model:M,app:h,selections:Q,nebbie:g,focusHandler:se.current,emitter:L,onMount:i,navigation:null!=l?l:k})})(A.visualization,e),()=>{}},[m,I.sn,M,Q,A,F,v]),E.useEffect(()=>{if(!D)return;const e=setTimeout(()=>_({type:"LONG_RUNNING_QUERY"}),2e3);return()=>clearTimeout(e)},[D]),E.useImperativeHandle(d,()=>({getQae:()=>I.sn.generator.qae,getExtensionDefinition:()=>I.sn.generator.definition.ext,support(e,t,n){if(A&&I.loaded&&!I.error){var r;const o=t||(null===(r=I.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||A)}return!1},toggleFocus(e){"function"==typeof I.sn.component.focus&&(e?I.sn.component.focus():I.sn.component.blur())},setOnBlurHandler(e){se.current.onBlurHandler=e},setSnOptions:V,setSnPlugins:K,setModel:N,getImperativeHandle(){var e;return null!==(e=I.sn)&&void 0!==e&&e.component&&"function"==typeof I.sn.component.getImperativeHandle?I.sn.component.getImperativeHandle():{}},onContextMenu(...e){var t;return null===(t=I.sn)||void 0===t?void 0:t.component.onContextMenu(...e)},async takeSnapshot(){const{width:e,height:t}=T;let n=JSON.parse(JSON.stringify(A));return"function"==typeof I.sn.component.setSnapshotData&&(n.snapshotData||(n.snapshotData={}),n=await I.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:y.language(),theme:R.name,appLayout:F,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof e.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const t=await this.takeSnapshot();return e.config.snapshot.capture(t)},getHypercubePath(){var e;return null===(e=I.sn.generator.definition.ext)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.hypercubePath}}),[I.sn,W,T,A,R.name,F]);let le=null;if(I.loading&&!I.longRunningQuery)le=mr.jsx(Ik,{});else if(I.error){if(u){u(I.error.errorObject?I.error.errorObject:new wk(I.error.title))}le=mr.jsx(Ox,c({},I.error))}else I.loaded&&(le=mr.jsx(yk,{sn:I.sn,halo:e,snOptions:U,snPlugins:G,layout:A,appLayout:F,cellId:a},A.visualization));const ce=!(null===(p=e.public.theme)||void 0===p||!p.getStyle("","","_cards")),ue=null===(f=e.public.galaxy)||void 0===f?void 0:f.flags;let de,pe;x?(de=!1,pe=void 0):null!=ue&&ue.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(de=!1,pe=Lk({layout:A,isError:I.error,isCardTheme:ce,titleStyles:ee,translator:y})):(de=!0,pe=void 0);const fe=Rk.get(null==A?void 0:A.visualization),he=y.get(fe);return mr.jsxs(zc,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:te||"unset",backgroundImage:ne&&ne.url?`url(${ne.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:ne&&ne.size,backgroundPosition:ne&&ne.pos,border:re,borderRadius:oe,boxShadow:ie,boxSizing:"border-box"},elevation:0,square:!0,className:Pk,ref:P,id:J,onMouseEnter:()=>{Y.current.leave&&clearTimeout(Y.current.leave),Y.enter||(Y.current.enter=setTimeout(()=>{Z(!0),Y.current.enter=null},250))},onMouseLeave:()=>{Y.current.enter&&clearTimeout(Y.current.enter),Y.current.leave||(Y.current.leave=setTimeout(()=>{Z(!1),Y.current.leave=null},750))},children:[mr.jsxs(Qp,{container:!0,direction:"column",gap:0,style:c(c({position:"relative",width:"100%",height:"100%"},de?{padding:R.spacing(1)}:{}),I.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":`${a}_title ${a}_type ${a}_content`,children:[A&&mr.jsx("div",{id:`${a}_type`,style:Ux,"aria-label":null!=he?he:A.visualization}),O&&A&&I.sn&&mr.jsx(Xx,{layout:A,sn:I.sn,anchorEl:O,hovering:X,focusHandler:se.current,titleStyles:ee,isRtl:ae,id:a,translator:y,children:" "}),mr.jsx(Qp,{tabIndex:S&&!w?0:-1,onKeyDown:S&&!w?t=>{["Enter"," ","Spacebar"].includes(t.key)&&e.root.toggleFocusOfCells(a)}:null,size:"grow",className:Tk,style:c({height:"100%"},pe?{padding:pe}:{}),ref:B,children:le}),O&&A&&I.sn&&mr.jsx(mk,{layout:A,titleStyles:ee,translator:y,flags:ue,isCardTheme:ce,isRtl:ae})]}),I.longRunningQuery&&mr.jsx(Wx,{canCancel:j,canRetry:$,api:z})]})});function zk(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Fk(e="/",t,n){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 zk(e)&&zk(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(...Fk(`${e}${o}/`,t[o],n[o]))}),r}function Bk(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 "${e.info.name}" has no "fn" function`)})}const Wk=(e,t,n)=>{if(!e)return Promise.resolve();let r=cw.generate(t,n);return ye(!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()},Hk=()=>{};function Uk({model:e,halo:t,navigation:n,initialError:r,onDestroy:o=async()=>{},onRender:i=()=>{},onError:a=()=>{}}={}){var s;let l,u,d,p=Hk,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(),i(),b=!0};let w={},x=[];const k=new M;let C={};null!==(s=t.context)&&void 0!==s&&s.enablePrivateExperimental&&(C={support(e){var t;return!(!h||!b)&&f.current.support(e,null===(t=u)||void 0===t?void 0:t.support,d)},getPropertyPanelDefinition:()=>!(!h||!b)&&(u?u.definition:f.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){await v;const t=f.current.getExtensionDefinition(),n=t.data,r=await e.getEffectiveProperties();if(n){var o,i;const a={app:e.app,dimensionDefinition:n.dimensions,measureDefinition:n.measures,dimensionProperties:(null===(o=r.qHyperCubeDef)||void 0===o||null===(o=o.qDimensions)||void 0===o?void 0:o[0])||tw.getDefaultDimension(),measureProperties:(null===(i=r.qHyperCubeDef)||void 0===i||null===(i=i.qMeasures)||void 0===i?void 0:i[0])||tw.getDefaultMeasure(),globalChangeListeners:void 0,path:f.current.getHypercubePath()};return"function"==typeof t.propertyHandler?t.propertyHandler(a):new Sx(a)}},toggleFocus(e){f.current.toggleFocus(e)},setOnBlurHandler(e){f.current.setOnBlurHandler(e)},onContextMenu:(...e)=>f.current.onContextMenu(...e)});const E=c(c({id:e.id,model:e,async destroy(){await o(),p(),p=Hk},async convertTo(n,r=!0,o=!1){if(r){if((e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))})(await e.getLayout())&&!o){const r=await aw({halo:t,model:e,cellRef:f,newType:n});return await((e,t)=>e.__snInterceptor?e.__snInterceptor.setProperties.call(e,t):e.setProperties(t))(e,r.qProperty),r}const r=await e.getEffectiveProperties(),i=await aw({halo:t,model:e,cellRef:f,newType:n,properties:r}),a=i.qProperty;return await Wk(e,r,a),i}return await aw({halo:t,model:e,cellRef:f,newType:n})},async toggleDataView(n){let r;if(l||!1===n)l&&!0!==n&&(r=e,await t.app.destroySessionObject(l),l=void 0,u=void 0,d=void 0);else{let n=t.context.dataViewType;const o=await e.getEffectiveProperties();if(!t.types.getSupportedVersion(n)){if(!t.types.getSupportedVersion("table"))throw new Error("No data view type registered");n="table"}const i=await aw({halo:t,model:e,cellRef:f,newType:n,properties:o,viewDataMode:!0});r=await t.app.createSessionObject(i.qProperty),l=r.id,u=f.current.getExtensionDefinition(),d=await e.getLayout()}r&&f.current.setModel(r)},get viewDataToggled(){return void 0!==l},addListener(e,t){k.addListener(e,t)},removeListener(e,t){k.removeListener(e,t)},getImperativeHandle:async()=>(await v,f.current.getImperativeHandle()),takeSnapshot:async()=>(await v,f.current.takeSnapshot())},C),{},{__DO_NOT_USE__:{mount(o){if(h)throw new Error("Already mounted");if(!(o instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return h=o,[p,f]=function({halo:e,element:t,model:n,initialSnOptions:r,initialSnPlugins:o,onMount:i,emitter:a,initialError:s,navigation:l,onError:c}){const{root:u}=e,d=L.createRef(),p=Jv(),f=hl.createPortal(mr.jsx($k,{ref:d,halo:e,model:n,currentId:p,initialSnOptions:r,initialSnPlugins:o,initialError:s,onMount:i,emitter:a,navigation:l,onError:c}),t,p),h=()=>{u.remove(f),n.removeListener("closed",h)};return n.on("closed",h),u.addCell(p,d),(async()=>{try{await u.add(f,h)}catch(e){h(),i(),c(e)}})(),[h,d]}({halo:t,element:o,model:e,initialSnOptions:w,initialSnPlugins:x,initialError:r,onMount:m,emitter:k,navigation:n,onError:a}),y},async applyProperties(t){const n=Fk("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;h?(async()=>{await y,f.current.setSnOptions(c(c(c({},w),e),{onInitialRender:S(t)}))})():w=c(c(c({},w),e),{onInitialRender:S(t)})})(e)},plugins(e){(async e=>{Bk(e),h?(async()=>{await y,f.current.setSnPlugins(e)})():x=e})(e)},exportImage:()=>f.current.exportImage(),takeSnapshot:()=>f.current.takeSnapshot(),getModel:()=>e,convert:{async toType(n){const r=await e.getEffectiveProperties(),o=await aw({halo:t,model:e,cellRef:f,newType:n,properties:r}),i=o.qProperty;return await Wk(e,r,i),o},async revert(){await e.clearSoftPatches()}}}});return E}async function Vk(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:s}=t,l=Uk({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return 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 Gk({type:e,version:t,fields:n,properties:r,extendProperties:o},i,a,s){let l={};const c=[],{modelStore:u}=s;try{const a=i.types.get({name:e,version:t});l=await a.initialProperties(r,o);const s=await a.supernova();n&&await VS({sn:s,properties:l,fields:n,children:c},i),r&&s&&s.qae.properties.onChange&&s.qae.properties.onChange.call({},l)}catch(t){l=a?null:{qInfo:{qType:e},visualization:e}}if(!a){const e=await i.app.createObject(l);return c.length>0&&await e.setFullPropertyTree({qProperty:l,qChildren:c}),u.set(e.id,e),e}return l}const Kk="njs-sheet";function Jk(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 Qk=E.forwardRef(({model:e,halo:t,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,unmount:a,navigation:s,onError:l},u)=>{var d;const{root:p}=t,[f,h]=E.useState(e),[m]=Rh(f),{theme:g,modelStore:b}=E.useContext(wc),[y,v]=E.useState([]),[S,w]=E.useState(void 0),[x,k]=E.useState(void 0),[C,R]=E.useState(""),P=E.useRef({cellCount:0,cellsRendered:0,initialRender:!1});null==s||null===(d=s.setCurrentSheetId)||void 0===d||d.call(s,f.id),E.useEffect(()=>{if(m){const e=JSON.stringify(m.cells);if(e===C)return;R(e);const r=async()=>{y.forEach(e=>{p.removeCell(e.currentId)});const e=m.cells;P.cellCount=e.length,P.cellsRendered=0;const r=()=>{P.cellsRendered++,P.cellsRendered!==P.cellCount||P.initialRender||(P.initialRender=!0,n.onInitialRender())},{columns:o,rows:i}=m,a=await Promise.all(e.map(async e=>{let a;const s=new Promise(e=>{a=e}),l=y.find(t=>t.id===e.name);if(l)return l.bounds=Jk(e,o,i),delete l.mountedPromise,l;const u=await async function({id:e,options:t,plugins:n,element:r},o,i){const{modelStore:a,rpcRequestModelStore:s}=i,l=`${e}`;let c=s.get(l);c||(c=o.app.getObject(e),s.set(l,c));const u=await c;return a.set(l,u),Vk(u,{options:t,plugins:n,element:r},o)}({id:e.name},t,b);return{model:u.model,id:e.name,bounds:Jk(e,o,i),cellRef:L.createRef(),currentId:Jv(),mounted:a,mountedPromise:s,options:c(c({},n),{onInitialRender:r})}}));a.forEach(e=>p.addCell(e.currentId,e.cellRef)),v(a)};r()}},[m]),E.useEffect(()=>{const e=()=>{f.removeListener("closed",e),a()};return f.on("closed",e),()=>f.removeListener("closed",e)},[f]);const T=E.useMemo(()=>y?y.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:`${c}%`,top:`${u}%`,width:`${d}%`,height:`${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"),mr.jsx("div",{style:f,children:mr.jsx($k,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,navigation:a,onError:s})},e.model.id)}(e,t,e.options,r,o,e.mounted,s,l)):[],[y]);E.useEffect(()=>{const e=null!=m&&m.components?m.components.find(e=>"general"===e.key):null;w(Cv(e,t.public.theme)),k(kv(e,t.app))},[m,t.public.theme,t.app,g]),E.useImperativeHandle(u,()=>({setModel:h}),[]);const O=!m||void 0===m.height||Number.isNaN(m.height)?"100%":`${Number(m.height)}%`,I=y.map(e=>e.mountedPromise),_=I.filter(e=>!!e);return _.length&&Promise.all(I).then(()=>{i()}),mr.jsx("div",{className:Kk,style:{width:"100%",height:O,position:"relative",backgroundColor:S,backgroundImage:x&&x.url?`url(${x.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:x&&x.size,backgroundPosition:x&&x.pos},children:T})});const Xk=()=>{};function Zk({model:e,halo:t,navigation:n,initialError:r,onDestroy:o=async()=>{},onRender:i=()=>{},onError:a=()=>{}}={}){let s=Xk,l=null,u=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=Xk},__DO_NOT_USE__:{mount(o){if(u)throw new Error("Already mounted");if(!(o instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return u=o,[s,l]=function({halo:e,element:t,model:n,initialSnOptions:r,initialSnPlugins:o,onMount:i,initialError:a,navigation:s,onError:l}){const{root:c}=e,u=L.createRef();let d;const p=()=>{c.remove(d)};return d=hl.createPortal(mr.jsx(Qk,{ref:u,halo:e,model:n,initialSnOptions:r,initialSnPlugins:o,initialError:a,onMount:i,unmount:p,navigation:s,onError:l}),t,n.id),s.setSheetRef(u),c.add(d,p),[p,u]}({halo:t,element:o,model:e,initialSnOptions:g,initialSnPlugins:b,initialError:r,onMount:d,navigation:n,onError:a}),f},async applyProperties(t){const n=Fk("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;u?(async()=>{await f,l.current.setSnOptions(c(c(c({},g),e),{onInitialRender:m(t)}))})():g=c(c(c({},g),e),{onInitialRender:m(t)})})(e)},plugins(e){(async e=>{Bk(e),u?(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 Yk({id:e,options:t,plugins:n,element:r,onRender:o,onError:i,navigation:a},s,l){const{modelStore:c,rpcRequestModelStore:u}=l,d=`${e}`;let p=u.get(d);p||(p=s.app.getObject(e),u.set(d,p));const f=await p;c.set(d,f);const h=a||("sheet"===f.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=`${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 Sb(s),s}(s,l,f):void 0);return"sheet"===f.genericType?async function(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:s}=t,l=Zk({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}(f,{options:t,plugins:n,element:r,onRender:o,onError:i},s,h):Vk(f,{options:t,plugins:n,element:r,onRender:o,onError:i},s,h)}function eC(e={}){return{isEnabled:t=>!0===e[t]}}var tC,nC,rC,oC;function iC(){if(oC)return rC;oC=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return rC=n=>n?"object"!=typeof n?e:n:t}var aC,sC,lC,cC,uC,dC,pC,fC,hC,mC,gC,bC,yC,vC,SC,wC,xC,kC,CC,EC,LC,RC,PC,TC,OC,IC,_C,qC,MC,NC,AC,DC={exports:{}};function jC(){if(sC)return aC;sC=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return aC={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 $C(){if(cC)return lC;cC=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return lC=e}function zC(){return uC||(uC=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=jC(),i=$C(),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(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${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-]${p}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(DC,DC.exports)),DC.exports}function FC(){if(hC)return fC;hC=1;const e=$C(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=jC(),{safeRe:r,t:o}=zC(),i=iC(),{compareIdentifiers:a}=function(){if(pC)return dC;pC=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;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 dC={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},dC}();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 "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${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: ${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=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${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)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}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=`-${t}`.match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${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 ${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];if(!1===n&&(r=[t]),((e,t)=>{const n=t.split(".");if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(0!==a(e[t],n[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return fC=s}function BC(){if(gC)return mC;gC=1;const e=FC();return mC=(t,n,r)=>new e(t,r).compare(new e(n,r)),mC}function WC(){if(OC)return TC;OC=1;const e=function(){if(yC)return bC;yC=1;const e=BC();return bC=(t,n,r)=>0===e(t,n,r),bC}(),t=function(){if(SC)return vC;SC=1;const e=BC();return vC=(t,n,r)=>0!==e(t,n,r),vC}(),n=function(){if(xC)return wC;xC=1;const e=BC();return wC=(t,n,r)=>e(t,n,r)>0,wC}(),r=function(){if(CC)return kC;CC=1;const e=BC();return kC=(t,n,r)=>e(t,n,r)>=0,kC}(),o=function(){if(LC)return EC;LC=1;const e=BC();return EC=(t,n,r)=>e(t,n,r)<0,EC}(),i=function(){if(PC)return RC;PC=1;const e=BC();return RC=(t,n,r)=>e(t,n,r)<=0,RC}();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: ${s}`)}},TC}function HC(){if(MC)return qC;MC=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: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(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&&b(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){e=e.replace(m,"");const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,l=a?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];e=e.replace(l,T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[c.COMPARATORTRIM],u),i("comparator trim",e),e=e.replace(s[c.TILDETRIM],d),i("tilde trim",e),e=e.replace(s[c.CARETTRIM],p),i("caret trim",e);let b=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>P(e,this.options));a&&(b=b.filter(e=>(i("loose invalid filter",e,this.options),!!e.match(s[c.COMPARATORLOOSE])))),i("range list",b);const y=new Map,S=b.map(e=>new o(e,this.options));for(const e of S){if(g(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return n.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>y(t,n)&&e.set.some(e=>y(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(O(this.set[t],e,this.options))return!0;return!1}}qC=t;const n=new(nC?tC:(nC=1,tC=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=iC(),o=function(){if(_C)return IC;_C=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: ${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(">")))}}IC=t;const n=iC(),{safeRe:r,t:o}=zC(),i=WC(),a=$C(),s=FC(),l=HC();return IC}(),i=$C(),a=FC(),{safeRe:s,src:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:p}=zC(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=jC(),m=new RegExp(l[c.BUILD],"g"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,y=(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},v=(e,t)=>(e=e.replace(s[c.BUILD],""),i("comp",e,t),e=k(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=E(e,t),i("xrange",e),e=R(e,t),i("stars",e),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const n=t.loose?s[c.TILDELOOSE]:s[c.TILDE],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,o,a,s)=>{let l;return i("tilde",e,t,n,o,a,s),S(n)?l="":S(o)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?l=`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:s?(i("replaceTilde pr",s),l=`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`):l=`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`,i("tilde return",l),l})},k=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{i("caret",e,t);const n=t.loose?s[c.CARETLOOSE]:s[c.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),S(n)?l="":S(o)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?l="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:s?(i("replaceCaret pr",s),l="0"===n?"0"===o?`>=${n}.${o}.${a}-${s} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a}-${s} <${+n+1}.0.0-0`):(i("no pr"),l="0"===n?"0"===o?`>=${n}.${o}.${a} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a} <${+n+1}.0.0-0`),i("caret return",l),l})},E=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map(e=>L(e,t)).join(" ")),L=(e,t)=>{e=e.trim();const n=t.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return e.replace(n,(n,r,o,a,s,l)=>{if(i("xRange",e,n,r,o,a,s,l),((e,t,n)=>S(e)&&!S(t)||S(t)&&n&&!S(n))(o,a,s))return e;const c=S(o),u=c||S(a),d=u||S(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=`${r+o}.${a}.${s}${l}`):u?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),i("xRange return",n),n})},R=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[c.STAR],"")),P=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,n,r,o,i,a,s,l,c,u,d,p)=>`${n=S(r)?"":S(o)?`>=${r}.0.0${e?"-0":""}`:S(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=S(c)?"":S(u)?`<${+c+1}.0.0-0`:S(d)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${d}-${p}`:e?`<${c}.${u}.${+d+1}-0`:`<=${l}`}`.trim(),O=(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 qC}var UC=function(){if(AC)return NC;AC=1;const e=HC();return NC=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},NC}(),VC=n(UC);const GC={};function KC(e,t,n={}){let r,o;const{meta:i}=n,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||VC(e,i.deps.properties),supernova:()=>async function(e,t,{config:n},r){const o=`${e}__${t}`;if(!GC[o]){const i=`${e}${t&&` v${t}`||""}`;if(r&&"function"!=typeof r)throw new Error(`load of visualization '${i}' is not a fuction, wrap load promise in function`);const a=(r||n.load)({name:e,version:t}),s=Promise.resolve(a);GC[o]=s.then(e=>{if(!e)throw new Error(`load() of visualization '${i}' resolved to an invalid object`);return e}).catch(e=>{throw new wk(`Failed to load visualization: '${i}'`,e)})}return GC[o]}(a.name,a.version,t,n.load).then(e=>(r=r||Lx(e,t.public.galaxy),o=JSON.stringify(r.qae.properties.initial),r)),initialProperties(e,t=!1){return this.supernova().then(()=>{const n=c({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(o));return t?(ye(!0,n,e),n):c(c({},n),e)})}};return a}function JC(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error(`Supernova '${e}@${o}' already registered.`);n[o]=KC({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 QC({halo:e,parent:t}){const n={},r=t||{get:()=>{}};return{register:(t,r)=>{n[t.name]||(n[t.name]=JC(t.name,e)),n[t.name].register(t.version,r)},getSupportedVersion:(e,t)=>{if(n[e])return n[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:o}=e;if(n[t]){if(!n[t].versions[o]){o=Object.keys(n[t].versions)[0]}}else this.register({name:t,version:o});return n[t].get(o)||r.get(e)},getList:()=>Object.keys(n).map(e=>({name:e,versions:Object.keys(n[e].versions).map(e=>"undefined"===e?void 0:e)})),clearFromCache:e=>{n[e]&&(n[e]=void 0),function(e){Object.keys(GC).forEach(t=>{t.split("__")[0]===e&&(GC[t]=void 0)})}(e)}}}const XC={context:{},load:()=>{},types:[],themes:[],anything:{},flags:{KPI_REACTCOLORPICKER:!0,CLIENT_IM_3365:!0},snapshot:{get:async e=>{const t=await fetch(`/njs/snapshot/${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())}},ZC={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};XC.context=ZC;const YC=(e={},t={})=>c(c({},e),t),eE=(e=[],t=[])=>[...e,...t].filter((e,t,n)=>n.indexOf(e)===t);var tE=function e(t={}){const n=_(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=c(c({},t.context),{},{translator:n.translator,hostConfig:t.hostConfig});const[a,s]=Lc({app:e,context:i}),l=function({themes:e=[],loadTheme:t,root:n}={}){const r=Ue();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),Ve(5e3,{__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 u={galaxy:{translator:n.translator,theme:l.externalAPI,flags:eC(t.flags),deviceType:Ge(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:u,context:i,types:null},p=QC({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&&S&&S.getWebResourceAuthParams){const{queryParams:e}=await S.getWebResourceAuthParams({hostConfig:t.hostConfig});i.queryParams=e,a.context(i)}})().then(e)}),h=null,m=null;const g={render:async e=>{var t;await f,null===(t=e.signal)||void 0===t||t.throwIfAborted();const n=e.id?Yk(e,d,s):async function({type:e,version:t,fields:n,properties:r,options:o,plugins:i,element:a,extendProperties:s,navigation:l,onRender:c,onError:u},d,p){let f={};const h=[],{modelStore:m,subscribe:g}=p;let b;try{const o=d.types.get({name:e,version:t});f=await o.initialProperties(r,s);const i=await o.supernova();n&&await VS({sn:i,properties:f,fields:n,children:h},d),r&&i&&i.qae.properties.onChange&&i.qae.properties.onChange.call({},f)}catch(t){b=t,f={qInfo:{qType:e},visualization:e}}const y=await d.app.createSessionObject(f);h.length>0&&await y.setFullPropertyTree({qProperty:f,qChildren:h}),m.set(y.id,y);const v=g(y);return Vk(y,{options:o,plugins:i,element:a,onRender:c,onError:u},d,l,b,async()=>{await d.app.destroySessionObject(y.id),v()})}(e,d,s);if(e.signal){const t=()=>{n.then(e=>null==e?void 0:e.destroy()).catch(()=>{})};return e.signal.addEventListener("abort",t,{once:!0}),function(e,t){if(!t)return e;let n;"function"==typeof t.throwIfAborted&&t.throwIfAborted();const r=new Promise((e,t)=>{n=t}),o=()=>{var e;return null===(e=n)||void 0===e?void 0:e(t.reason)};return t.addEventListener("abort",o,{once:!0}),Promise.race([e,r]).finally(()=>{t.removeEventListener("abort",o)})}(n,e.signal).finally(()=>{e.signal.removeEventListener("abort",t)})}return n},destroy:async()=>{a.destroy()},create:async e=>Gk(e,d,!1,s),generateProperties:async e=>Gk(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=c(c(c({},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){m||(m=function({element:e,app:t}){return hl.createPortal(mr.jsx(Qv,{app:t}),e,Jv())}({element:t,app:e}),a.add(m))},unmount(){m&&(a.remove(m),m=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,s={}){if(!i)throw new Error(`Element for ${r||n} not provided`);if(this._instance)throw new Error(`Field or object ${r||n} already mounted`);const l=()=>o.emit("selectionActivated"),u=()=>o.emit("selectionDeactivated");return new Promise(r=>{[this._instance,this._ref]=function({element:e,app:t,fieldIdentifier:n,qId:r,stateName:o="$",options:i={},renderedCallback:a,flags:s}){const l=L.createRef();return[hl.createPortal(mr.jsx(AS,{ref:l,app:t,element:e,fieldIdentifier:n,qId:r,stateName:o,initialOptions:i,renderedCallback:a,flags:s}),e,Jv()),l]}({element:i,app:e,fieldIdentifier:t,qId:n,options:NS(c({onSelectionActivated:l,onSelectionDeactivated:u},s)),stateName:s.stateName||"$",renderedCallback:r,flags:d.public.galaxy.flags}),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(c({onSelectionActivated:n,onSelectionDeactivated:r},e));o._ref.current.setOptions(t)}}}};return Sb(o),o},getRegisteredTypes:p.getList,__DO_NOT_USE__:{types:p,popover(t,n,r){g._popoverInstance&&(a.remove(g._popoverInstance),g._popoverInstance=null);const o=((e={})=>{const t=c({},DS);return ye(!0,t,e),t})(c({onPopoverClose:()=>g.emit("fieldPopoverClose")},r));g._popoverInstance=L.createElement(jS,{element:t,key:Jv(),app:e,fieldIdentifier:n,options:o,stateName:r.stateName||"$"}),a.add(g._popoverInstance)}}};return d.public.nebbie=g,d.types=p,Sb(g),g}return r.createConfiguration=n=>e(((e,t)=>({context:YC(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:c({},t.snapshot||e.snapshot),types:eE(e.types,t.types),themes:eE(e.themes,t.themes),flags:YC(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:YC(e.anything,t.anything)}))(t,n)),r.config=t,r}(XC);function nE(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - "+ +Date.now()})}}const rE=globalThis.crypto||{getRandomValues:()=>123456};function oE(e){return t=>{const n=ye({},t);n.qInfo=n.qInfo||{},n.qInfo.qId=n.qInfo.qId||`mock-${([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^rE.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}`;const r=n._mock;let o=n;return r&&(delete n._mock,o=ye({},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 iE=(e,{args:t=[],defaultValue:n}={})=>"function"==typeof e?e(...t):void 0!==e?e:n,aE=(e,{defaultValue:t,async:n=!0,delay:r=0}={})=>(...o)=>{const i=iE(e,{defaultValue:t,args:o});return n?new Promise(e=>{setTimeout(()=>e(i),r)}):i},sE=["id","session"],lE=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function cE(e){return!lE.includes(e)}function uE(e){const t=iE(e.getLayout);return t.qInfo&&t.qInfo.qId}function dE(e,t){return e.reduce((e,n)=>c(c({},e),function(e,t){let n=uE(e);const{delay:r}=t,{id:o,session:i}=e,a=u(e,sE);if(o&&n&&o!==n)throw new Error(`Generic object has multiple IDs, qInfo.qId: ${n}, id: ${o}`);n=n||o||"object - "+ +Date.now();const s=c(c({id:n,session:iE(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce((e,[t,n])=>c(c({},e),{},{[t]:aE(n,{async:cE(t),delay:r})}),{})),{},{genericType:e.type});return{[n]:s}}(n,t)),{})}function pE(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!uE(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function fE(e=[],t={}){if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(pE);const n=dE(e,t);return async e=>Promise.resolve(n[e])}function hE(e){return()=>Promise.resolve({id:"app-layout",qLocaleInfo:null==e?void 0:e.appLocaleInfo})}const mE={fromGenericObjects:(e,t={})=>function(e,t={}){const n=new nE,r=new oE(n),o=new fE(e,t),i=new hE(t),a=c(c({},t.appMethods||{}),{},{id:"app - "+ +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,t)},gE={generator:Lx,hook:qw,theme:Ue,locale:P};window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})})),window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise||(window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig=t=>{e(t)})})),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainJsUrlAndHostConfigPromise||!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),{url:t,hostConfig:n}=await Promise.race([window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise,window.__qlikMainPrivateResolvers.mainUrlPromise.then(e=>({url:e,hostConfig:window.__qlikMainPrivateResolvers?.forwardCompatibleHostConfig}))]);clearTimeout(e);const r=await async function(e,t){if("windowscookie"===t?.authType){if(t.getAccessToken){const n=await async function(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}(t.getAccessToken);return n&&await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},cache:"no-cache"}),!0}if(t.loginUri&&!(await fetch(e,{method:"GET",mode:"cors",credentials:"include",redirect:"manual"}).catch(()=>({ok:!1}))).ok)return window.location.replace(t.loginUri),new Promise(()=>{})}return!1}(t,n);return new Promise(e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),r&&(n.crossOrigin="use-credentials"),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 bE=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.resolveMainJsUrlAndHostConfig&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig({url:t,hostConfig:e}),t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&(window.__qlikMainPrivateResolvers.forwardCompatibleHostConfig=e,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))}});const yE=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],vE=["apikey","oauth2","cookie","windowscookie","reference","anonymous","pfx"],SE={};const wE=async({hostConfig:e,noCache:t}={})=>{const n=`${_R(e)}/resources/autogenerated/product-info.json`;try{if(!(n in SE)){const e={};globalThis.QlikMain?.resourceNeedsCredentials(n)&&(e.credentials="include");const t=fetch(n,e).then(async e=>e.ok?{data:await e.json(),status:e.status}:{data:void 0,status:e.status});SE[n]=t}const e=await SE[n];return(e.status>=400||!e.data)&&delete SE[n],e}catch{return delete SE[n],{data:void 0,status:500}}finally{t&&delete SE[n]}},xE=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}}},kE=e=>({isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,...e});function CE(e,t){const n=new Uint8Array(t);globalThis.crypto.getRandomValues(n);let r="";for(let o=0;o<t;o++)r+=e[n[o]%e.length];return r}function EE(e){return CE("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",e)}const LE={},RE=new Map;function PE(e){const t=h(e)||{};return t.host&&(t.host=_R(t)),d()&&_R(t)===window.location.origin&&delete t.host,t.authType&&vE.includes(t.authType)&&delete t.authType,t}function TE(e,t){if("function"!=typeof t)return t}function OE(e){const t=f(PE(GR(e)));return JSON.stringify(t,TE)}const IE=new Map;function _E(e,t){const n=t?.reference||null;if(n&&!IE.has(n))throw new vR(`Host config with reference "${n}" is not registered. Please register it before using it.`);IE.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),IE.set(e,t)}function qE(e){return IE.get(e)}function ME(){return qE("default")||{}}const NE=new Map;function AE(e){const t=OE(e);let n=NE.get(t);return n||(n={redirectRequestedListeners:new Set,redirectStartedListeners:new Set},NE.set(t,n)),n}function DE(e){const t=AE(e),n=t.redirectRequestedListeners.size>0||e.authRedirectUserConfirmation;return e.autoRedirect||!n?Promise.resolve():"function"==typeof e.authRedirectUserConfirmation?e.authRedirectUserConfirmation().catch(()=>{}):new Promise(e=>{const n=()=>{for(const e of t.redirectStartedListeners)try{e()}catch(e){console.warn(e)}e()};for(const e of t.redirectRequestedListeners)try{e({proceed:n})}catch(e){console.warn(e)}})}const jE="qlik-qmfe-api";function $E(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function zE(e){return`${e.accessCode}_${e.clientId}`}const FE={};function BE(e,t,n){localStorage.setItem(`${jE}-${e}-${t}`,n)}function WE(e,t,n){sessionStorage.setItem(`${jE}-${e}-${t}`,n)}function HE(e,t,n,r){return e.store(`${jE}-${t}-${n}`,r)}function UE(e,t){return localStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function VE(e,t){return sessionStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function GE(e,t,n){return e.get(`${jE}-${t}-${n}`)}function KE(e,t){t.forEach(t=>localStorage.removeItem(`${jE}-${e}-${t}`))}function JE(e,t){t.forEach(t=>sessionStorage.removeItem(`${jE}-${e}-${t}`))}function QE(e,t){const n=`${jE}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}function XE(e){return"object"==typeof e&&null!==e&&"function"==typeof e.store&&"function"==typeof e.get&&"function"==typeof e.delete}async function ZE(e,t){if(!e.clientId)throw new vR('A host config with authType set to "oauth2" has to also provide a clientId');return YE($E(e),t,e.noCache,e.accessTokenStorage)}async function YE(e,t,n,r){return n?t():(FE[e]=FE[e]||(async()=>{let n=await async function(e,t){let n,r;if("local"===t?(n=UE(e,"access-token"),r=UE(e,"refresh-token")):"session"===t?(n=VE(e,"access-token"),r=VE(e,"refresh-token")):XE(t)&&(n=await GE(t,e,"access-token"),r=await GE(t,e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r);return n||(n=await t(),"local"===r&&n?(n.accessToken&&BE(e,"access-token",n.accessToken),n.refreshToken&&BE(e,"refresh-token",n.refreshToken)):"session"===r&&n?(n.accessToken&&WE(e,"access-token",n.accessToken),n.refreshToken&&WE(e,"refresh-token",n.refreshToken)):XE(r)&&n&&(n.accessToken&&await HE(r,e,"access-token",n.accessToken),n.refreshToken&&await HE(r,e,"refresh-token",n.refreshToken)),n)})(),FE[e])}function eL(e){const t=$E(e);delete FE[t],d()&&(KE(t,["access-token","refresh-token"]),JE(t,["access-token","refresh-token"])),XE(e.accessTokenStorage)&&function(e,t,n){Promise.all(n.map(n=>e.delete(`${jE}-${t}-${n}`)))}(e.accessTokenStorage,t,["access-token","refresh-token"])}function tL(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function nL(e){return globalThis[e]}function rL(e){if(e.errors)throw new kR(e.errors)}function oL(e){const t=Object.keys(e);return t.sort(),t.map(t=>`${t}=${e[t]}`).join("&")}async function iL(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return function(e){let t;if(d()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!p())throw new Error("Environment not supported for oauth2 authentication");t=Buffer.from(e).toString("base64")}return t}(Array.from(new Uint8Array(n))).replaceAll(/\+/g,"-").replaceAll(/\//g,"_").replace(/=+$/,"")}async function aL(e){const t=e.clientId||"",n=_R(e),r=EE(128),o=EE(43),i=await iL(r),a=e.redirectUri||globalThis.location.href,s=$E(e);eL(e),WE(s,"state",o),WE(s,"verifier",r),WE(s,"href",globalThis.location.href),WE("","client-in-progress",s);const l=`${n}/oauth/authorize?${oL({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 sL(e,t,n,r){try{const o=await(await fetch(`${_R(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})})).json();return rL(o),{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}catch(e){return console.error(e),new Promise(()=>{})}}function lL(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 cL(e){const{clientId:t,clientSecret:n,performInteractiveLogin:r}=e;if(!t||!n&&!r)throw new vR('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret or a performInteractiveLogin function');return await ZE(e,async()=>{if(e.performInteractiveLogin)return uL(e);if(!e.clientId||!e.clientSecret)throw new vR('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(await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify(lL(t,n,r,o,i))})).json();return{accessToken:a.access_token,refreshToken:a.refresh_token,errors:a.errors}}(_R(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)})}async function uL(e){if(!e.performInteractiveLogin)return hL("No performInteractiveLogin function in hostConfig");let t;try{const n=EE(128),r=EE(43),{code:o,state:i}=function(e){if("string"==typeof e){let t;try{t=new URL(e)}catch{t=new URL(e,"http://localhost")}const n=new URLSearchParams(t.search);return{code:n.get("code")||"",state:n.get("state")||""}}return e}(await tL(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=_R(e),a=await iL(r);return`${i}/oauth/authorize?${oL({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))}));return t?r!==i?hL("State returned by custom interactive login function does not match original"):o?await sL(e,o,n,t):hL("No code found in response from custom interactive login function"):hL("No redirect uri provided")}catch(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:"Could not perform custom interactive login",detail:String(e)}]}}}!function(e,t){const n=globalThis.location?.hostname?.toLowerCase(),r="localhost"===n,o=n?.endsWith(".qlik-stage.com");(r||o)&&globalThis.QlikMain&&(void 0===globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix&&(globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix={}),globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix[e]=t)}("clearAllAccessTokens",()=>{console.log("Clearing tokens",FE),Object.keys(FE).forEach(e=>{console.log("Clearing access tokens for",e),KE(e,["access-token","refresh-token"]),JE(e,["access-token","refresh-token"])}),function(){for(const e in FE)delete FE[e]}()});let dL=Promise.resolve("");async function pL(e){if(p()){const t=await cL(e);return t?(rL(t),t.accessToken||""):""}return d()&&(dL=dL.then(async()=>{const t=await async function(e){const{clientId:t}=e;if(!t)throw new vR('A host config with authType set to "oauth2" has to also provide a clientId');const n=await ZE(e,async()=>{if(e.getAccessToken)try{return{accessToken:"string"==typeof e.getAccessToken?await nL(e.getAccessToken)():await e.getAccessToken(),refreshToken:void 0,errors:void 0}}catch{return hL("Could not fetch access token using custom function")}if(e.performInteractiveLogin)return uL(e);const t=$E(e),n=QE(t,"code"),r=QE(t,"verifier");if(n&&r){const t=await sL(e,n,r,e.redirectUri);if(t)return t}});return n||(e.performInteractiveLogin||(await DE(e),aL(e)),new Promise(()=>{}))}(e);return t?(rL(t),t.accessToken||""):""})),dL}async function fL(e){const t=await async function(e){return FE[$E(e)]}(e);if(eL(e),t&&t.refreshToken&&e.clientSecret){const n=await ZE(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(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})})).json();return{accessToken:r.access_token,refreshToken:r.refresh_token,errors:r.errors}}(_R(e),t.refreshToken,e.clientSecret)});n&&rL(n)}}function hL(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function mL(e,t,n){const r=await fetch(`${_R(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{return new kR(JSON.parse(t).errors)}catch{return new kR([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function gL(e,t){try{return await t()}catch(n){const{retry:r}=await vL({hostConfig:e});if(r)return t();throw n}}function bL(){const e=Math.floor(Date.now()/1e3).toString(16);return`${e}${t=40-e.length,CE("0123456789abcdef",t)}`;var t}async function yL(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new vR('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 vR('A host config with authType set to "anonymous" has to also provide an accessCode');return YE(zE(e),t,!1,void 0)}(e,async()=>{const r=_R(e),o=await async function(e){let t;if(d()){const n=zE(e);t=UE(n,"tracking-code"),t||(t=bL()),BE(n,"tracking-code",t)}else t=bL();return t}(e);return async function(e,t,n,r){const o=await(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})})).json();return{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}(r,t,n,o)});if(!r)return"";if(r.errors)throw new kR(r.errors);return r.accessToken?r.accessToken:""}async function vL({hostConfig:e}){return function(e){const t=zE(e);delete FE[t],d()&&(KE(t,["access-token","refresh-token"]),JE(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var SL={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await yL(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return p()?{headers:{Authorization:`Bearer ${await yL(e)}`}}:{queryParams:{accessToken:await gL(e,async()=>mL(e,await yL(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await gL(e,async()=>mL(e,await yL(e),"websocket"))}}},handleAuthenticationError:vL};var wL={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function({hostConfig:e}){if(d())throw new Error("Not supported in browser environment");return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`}})},handleAuthenticationError:function(){return Promise.resolve({})}},xL=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=LL(this.stack)}},kL=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=LL(this.stack)}};const CL=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,EL=e=>{const t=e.match(CL);return Boolean(t&&t.length>0)};function LL(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(EL(e))break;t.unshift(e)}return t.join("\n")}function RL(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("&"):""}const PL={};globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PL,globalThis.QlikMain?.INTERNAL__DO_NOT_USE&&(globalThis.QlikMain.INTERNAL__DO_NOT_USE.apiCache=PL);function TL(e,t,n){if(e?.noCache)return!1;if(!t||void 0===t.value)return!1;if(e?.useCacheIfAfter)return e.useCacheIfAfter.getTime()<=t.lastPulled;const r=Date.now()-t.lastPulled;return"number"==typeof e?.maxCacheAge?r<=e?.maxCacheAge:r<n}function OL({url:e,query:t,headers:n,serializedHostConfig:r}){let o=e;if(t&&Object.keys(t).length>0){const n=RL(t);o=e.includes("?")?o.concat(`&${n}`):o.concat(`?${n}`)}return n&&Object.keys(n).length>0&&(o=o.concat(`+headers=${JSON.stringify(n)}`)),r&&"{}"!==r&&(o=o.concat(`+host-config=${r}`)),o}function IL(e){const t=[];return PL[e]&&t.push(PL[e]),PL[".global"]&&t.push(PL[".global"]),t}function _L(e,t){const n=qL(t);for(const t in e){const r=qL(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}function qL(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 ML(e){return null==e||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 NL(e){return e.then(e=>{const t={data:ML(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t})}function AL(e,t){return"get"!==e&&"GET"!==e&&(!t.endsWith("/api/v1/licenses/allotments")||"post"!==e&&"POST"!==e)}function DL(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${DL(e.cause)}`:DL(e.cause):e.message:String(e)}async function jL(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;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 kL(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new kL(`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 kL(`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 kL(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new kL(`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,...WL()};!d["User-Agent"]&&s&&(d["User-Agent"]=s);const p={method:e,credentials:a,mode:"cors",headers:d,redirect:await IR(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}return 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 xL(DL(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 xL(DL(e),0,new Headers,{}))}}(t,p),f&&clearTimeout(f),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=HL(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=HL(await e.blob());break;case"text/event-stream":n=e.body;break;default:{let r;try{r=await e.text()}catch(n){throw new xL(`request to '${t}' failed while reading response body: ${n instanceof Error?n.message:String(n)}`,e.status,e.headers,void 0)}try{n=JSON.parse(r)}catch{n=r}break}}const{status:i,statusText:a,headers:s}=e,l=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new xL(l,i,s,n);if(0===i)throw new xL(l,302,s,n);return{status:i,headers:s,data:n}}(h,t)}async function $L({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=_R(o?.hostConfig),{headers:a,queryParams:s,credentials:l}=await DR({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,t){return""!==t?`${e}?${t}`:e}(c,RL({...r,...s})),d=BR(o?.hostConfig);return{completeUrl:u,authHeaders:a,credentials:l,cacheKey:OL({url:c,query:r,headers:o?.headers,serializedHostConfig:d})}}function zL(e,t){return FL(e,t,async()=>{const{authHeaders:n,credentials:r}=await $L(t);return FL(e,{...t,authHeaders:n,credentials:r,options:{...t.options,noCache:!0}},void 0)})}function FL(e,t,n){const{method:r,completeUrl:o,body:i,options:a,authHeaders:s,credentials:l,cacheKey:c,contentType:u,userAgent:d}=t,p={method:r,completeUrl:o,cacheKey:c,options:a},f=function(e,t){if(t?.options?.noCache)return;const{method:n,completeUrl:r,cacheKey:o}=t,i=IL(e);if(AL(n,r))return;let a;for(const e of i)if(o in e){if(a=e[o],a&&void 0!==a.value&&TL(t?.options,a,6e5))break;a=void 0}if(!a)return;return a.lastHit=new Date,a.hitCount+=1,a.accessedPaths.add(globalThis.location?globalThis.location.pathname:"node"),NL(a.value)}(e,p);if(f)return f;const h=jL(r,o,i,u,a,s,l,d),m=async function(e,t,n,r){try{return await n}catch(n){const o=n,i=o.data;if(401===o.status||403===o.status&&"CSRF-TOKEN-2"===i?.code||function(e,t){const n=new URL(e,"http://dummy"),r=n.pathname.endsWith("/qps/csrftoken")&&n.searchParams.has("xrfkey");return 301===t||302===t||r&&403===t}(t,o.status)&&await IR(e)){if(globalThis.loggingOut)return BL();const{retry:t,preventDefault:n}=await AR({hostConfig:e,status:o.status,headers:o.headers,errorBody:i,canRetry:!!r});if(t&&r)return r();if(n)return BL()}throw n}}(a?.hostConfig,o,h,n);return function(e,t,n){PL[e]||(PL[e]={});const{cacheKey:r}=t;if(AL(t.method,t.completeUrl))return n.then(t=>{const n=IL(e);for(const e of n)_L(e,r);return t});const o=PL[e],i=n.catch(e=>(delete o[r],Promise.reject(e)));return o[r]={lastPulled:Date.now(),value:i,lastHit:null,hitCount:0,accessedPaths:new Set},NL(i)}(e,p,function(e,{method:t,body:n,options:r,authHeaders:o,credentials:i,value:a}){return a.then(a=>{const s=a.data;if(!s)return a;const l=BR(r?.hostConfig),c=s.links?.prev?.href,u=s.links?.next?.href;return c&&(a.prev=a=>zL(e,{method:t,completeUrl:c,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:OL({url:c,headers:r?.headers,serializedHostConfig:l})})),u&&(a.next=a=>zL(e,{method:t,completeUrl:u,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:OL({url:u,headers:r?.headers,serializedHostConfig:l})})),a})}(e,{...t,value:m}))}function BL(){return new Promise(()=>{})}function WL(){if(!d())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function HL(e,t){const n=e;return n.download=t?n=>UL(e,n??t):t=>UL(e,t),n}async function UL(e,t){if(d()){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 tP}),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}const VL="qmfe-api/latest";async function GL(e,t,n){return(ZR.getInterceptors()||[]).reduce((e,t)=>n=>t(n,e),t=>async function(e,t){if("mock-backend-rest-recorder"===t.options?.hostConfig?.authType)return Promise.resolve(t.options?.hostConfig.recordInvokeFetch(t));if("mock-backend"===t.options?.hostConfig?.authType)return Promise.resolve(t.options?.hostConfig.mockInvokeFetch(t));if(function(e){const t=GR(e);if(OR(t)){if(0===Object.keys(t).length)throw new vR("a host config must be provided when making a cross domain request");if(!t.host)throw new vR("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:d()?`${window.navigator.userAgent} ${VL}`:VL;const{completeUrl:r,authHeaders:o,credentials:i,cacheKey:a}=await $L(t);return zL(e,{...t,method:t.method.toUpperCase(),completeUrl:r,authHeaders:o,credentials:i,cacheKey:a,userAgent:n})}(e,t))(t)}function KL(e){!function(e){PL[e]={}}(e)}async function JL(e,t){const n=_R(e);let r;r=await IR(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const n=(await GL("csrf-token",{method:"get",pathTemplate:r,options:{hostConfig:e,maxCacheAge:5e3,noCache:t}})).headers.get("qlik-csrf-token");return n||""}catch(e){if(404===e.status)return"";throw e}};return t?(QL[n]=o(),QL[n]):(QL[n]=QL[n]||o(),QL[n])}const QL={};function XL(e){return!1===e.crossSiteCookies?"same-origin":OR(e)?"include":"same-origin"}async function ZL(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}var YL={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 JL(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:XL(e)}},getWebSocketAuthParams:async function({hostConfig:e}){if(p()){const t={};return t["qlik-csrf-token"]=await JL(e),e.webIntegrationId&&(t["qlik-web-integration-id"]=e.webIntegrationId),{headers:t}}const t={"qlik-csrf-token":await JL(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=_R(e);delete QL[t],KL("csrf-token")}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=_R(e);return await DE(e),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var eR={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 tR={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 nR(e,t){try{return await t()}catch(n){const{retry:r}=await rR({hostConfig:e});if(r)return t();throw n}}async function rR({hostConfig:e}){return e.getAccessToken?(eL(e),{preventDefault:!1,retry:!0}):e.performInteractiveLogin?(eL(e),{retry:!0}):d()?(await DE(e),aL(e),{preventDefault:!0}):(await fL(e),{preventDefault:!1,retry:!0})}d()&&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=QE("","client-in-progress");if(r&&t&&n){const e=QE(r,"state"),o=QE(r,"href");e&&e===n&&o&&(WE(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var oR={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await pL(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return p()?{headers:{Authorization:`Bearer ${await pL(e)}`}}:{queryParams:{accessToken:await nR(e,async()=>mL(e,await pL(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await nR(e,async()=>mL(e,await pL(e),"webresource"))}}},handleAuthenticationError:rR};var iR={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 aR={};function sR(e){const t=_R(e);return aR[t]=aR[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}(),aR[t]}var lR={requiredProps:[],optionalProps:["loginUri","crossSiteCookies","getAccessToken"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":sR(e)},queryParams:{xrfkey:sR(e)},credentials:XL(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:sR(e),"qlik-csrf-token":await JL(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){if(e.loginUri)return await DE(e),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0};if(e.getAccessToken){const t=await ZL(e.getAccessToken);if(t)return await fetch(`${_R(e)}/qlik-embed/main.js`,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},cache:"no-cache"}),{retry:!0}}return{}}};const cR=new Map;async function uR(e){let t=function(e){const t=BR(e);return cR.get(t)}(e);if(!t){const n=await ZL(e.getAccessToken);if(!n)throw new Error("Failed to acquire access token");t=(await fetch(`${_R(e)}/qlik-embed/main.js`,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).headers.get("Set-Cookie")||void 0,t&&function(e,t){const n=BR(e);cR.set(n,t)}(e,t)}if(!t)throw new Error("Failed to exchange access token for cookie");return t}var dR={requiredProps:[],optionalProps:["loginUri","crossSiteCookies","getAccessToken"],validateHostConfig:e=>{if("function"==typeof e.getAccessToken)return!0;if("string"==typeof e.getAccessToken){if(!globalThis[e.getAccessToken])throw new vR('The "getAccessToken" function name provided does not exist on globalThis.');return!0}throw new vR('The "getAccessToken" property must be a function or the name of a globally defined function.')},getRestCallAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:sR(e)},headers:{Cookie:await uR(e),"X-Qlik-XrfKey":sR(e)},credentials:XL(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{"qlik-csrf-token":await JL(e,!0)},headers:{Cookie:await uR(e)}}},handleAuthenticationError:async function({hostConfig:e}){return function(e){const t=BR(e);cR.delete(t)}(e),{retry:!0}}};var pR={requiredProps:["pfx"],optionalProps:["passphrase","userHeader"],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{},queryParams:{},credentials:"omit",pfxOptions:{pfx:e?.pfx,passphrase:e?.passphrase}})},getWebSocketAuthParams:async function({hostConfig:e}){if(d())throw new Error("Not supported in browser environment");const t=e?.userHeader||"UserDirectory=INTERNAL; UserId=sa_engine";return Promise.resolve({headers:{"X-Qlik-User":t},pfxOptions:{pfx:e?.pfx,passphrase:e?.passphrase||""}})},handleAuthenticationError:function(){return Promise.resolve({})}};const fR={};let hR=Promise.resolve(),mR=!1;function gR(e,t){fR[e.toLowerCase()]=t}async function bR(e){const t=GR(e),n=await yR(t);hR&&await hR;let r=function(e){return fR[e.toLowerCase()]}(n);if(r||(hR=(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 wR(e)}return Promise.resolve(void 0)}(n),r&&gR(n,r)})(),await hR),!r)throw new wR(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 vR(`missing required properties in host config; '${r.join("', '")}'`);const o=[...yE,...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 yR(e){return e.authType?e.authType:e.apiKey?"apikey":e.accessCode?"anonymous":e.clientId?"oauth2":e.webIntegrationId?"cookie":e.reference?"reference":e.pfx?"pfx":await IR(e)?"windowscookie":"cookie"}mR||(gR("apikey",wL),gR("cookie",YL),gR("none",tR),gR("noauth",eR),gR("oauth2",oR),gR("anonymous",SL),gR("pfx",pR),d()?gR("windowscookie",lR):gR("windowscookie",dR),gR("reference",iR),mR=!0);var vR=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},SR=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"}},wR=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(fR).filter(e=>"qmfeembedframerauthmodule"!==e.toLowerCase()).join("', '")}'`),this.name="InvalidAuthTypeError"}};function xR({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var kR=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(xR).join(", ")),this.errors=t}};const CR=new Map;let ER,LR="";function RR(e){const t=OE(e);let n=CR.get(t);return n||(n={listeners:new Set},CR.set(t,n)),n}function PR(e,t){if(e===ER&&t.message===LR)return;ER=e,LR=t.message;let n=!1;const r=RR(e);for(const e of r.listeners)try{n=!0,e(t)}catch(e){console.warn("Error in auth error listener",e)}if(e.onAuthFailed)try{n=!0,e.onAuthFailed(t)}catch(e){console.warn("Error in onAuthFailed callback",e)}n||console.error(t.message)}function TR(e){return yR(e)}function OR(e){if(!globalThis.location?.origin)return!0;const t=GR(e);if(0===Object.keys(t).length)return!1;try{return new URL(_R(t)).origin!==globalThis.location.origin}catch{}return!1}async function IR(e){const t=GR(e);return"boolean"==typeof t.forceIsWindows?t.forceIsWindows:!(t.host?.endsWith(".qlik-stage.com")||t.host?.endsWith(".qlikcloud.com")||t.host?.endsWith(".qlikcloudgov.com"))&&("cookie"!==t.authType&&("windowscookie"===t.authType||(await(async(e={})=>{const t=GR(e.hostConfig);if("mock-backend-rest-recorder"===t.authType)return t.recordGetPlatform();if("mock-backend"===t?.authType)return t.mockGetPlatform();if("noauth"===t?.authType)return kE({isUnknown:!0});let n=d()?window.QlikMain?.PRODUCT_INFO:void 0;if(!n){const{data:t,status:r}=await wE(e);if(n=t,404===r)return kE({isUnknown:!0});if(!n||r<=399&&r>=300)return kE({isQSE:!0,isWindows:!0})}const r=(n.composition?.deploymentType||"").toLowerCase();return"qliksenseserver"===r?kE({isQSE:!0,isWindows:!0,meta:xE(n)}):"qliksensedesktop"===r?kE({isQSD:!0,isWindows:!0,meta:xE(n)}):"qliksensemobile"===r?kE({isQSE:!0,isWindows:!0,meta:xE(n)}):"cloud-console"===r?kE({isCloud:!0,isCloudConsole:!0,meta:xE(n)}):"fedramp"===n.composition?.provider?kE({isCloud:!0,isQCG:!0,meta:xE(n)}):kE({isCloud:!0,isQCS:!0,meta:xE(n)})})({hostConfig:e})).isWindows))}function _R(e){const t=GR(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 qR(e){const t=GR(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(UR,"ws")}async function MR(e){const t=GR(e.hostConfig);try{return await(await bR(t)).getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw PR(t,VR(e)),e}}async function NR(e){const t=GR(e.hostConfig);try{return await((await bR(t)).getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw PR(t,VR(e)),e}}async function AR(e){const t=GR(e.hostConfig),n=await(await bR(t)).handleAuthenticationError({...e,hostConfig:t}),r=e.canRetry&&n.retry,o=n.preventDefault;if(!r&&!o){const{status:n,errorBody:r}=e;PR(t,function({errorBody:e,status:t}){const n=e;return"object"==typeof n?.errors?{message:new kR(n?.errors).message}:{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return n}async function DR(e){const t=GR(e.hostConfig);try{return await(await bR(t)).getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw PR(t,VR(e)),e}}function jR(e,t){gR(e,t)}function $R(e){!function(e){_E("default",e||{})}(e)}function zR(e,t){_E(e,t)}function FR(e){!function(e){IE.has(e)?IE.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function BR(e){return OE(e)}function WR(e){return function(e){const t=e||LE,n=OE(t);let r=RE.get(n);return r||(r=PE(GR(t)),RE.set(n,r)),r}(e)}globalThis.loggingOut=!1;const HR=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},UR=/^http/;function VR(e){return{message:e.message||"Unknown error"}}function GR(e){if(e?.reference){const t=qE(e.reference);if(!t)throw new vR(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:ME()}function KR(){return ME()}function JR(e,t){return function(e,t){const n=RR(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}(e,t)}function QR(e,t){return function(e,t){const n=AE(e);return n.redirectRequestedListeners.add(t),()=>{n.redirectRequestedListeners.delete(t)}}(e,t)}function XR(e,t){return function(e,t){const n=AE(e);return n.redirectStartedListeners.add(t),()=>{n.redirectStartedListeners.delete(t)}}(e,t)}let ZR;ZR=function(){const e=[...ZR?.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 YR={determineAuthType:TR,getDefaultHostConfig:KR,getRestCallAuthParams:DR,getWebResourceAuthParams:NR,getWebSocketAuthParams:MR,handleAuthenticationError:AR,isHostCrossOrigin:OR,isWindows:IR,logout:HR,registerAuthModule:jR,registerHostConfig:zR,serializeHostConfig:BR,setDefaultHostConfig:$R,toValidLocationUrl:_R,toValidWebsocketLocationUrl:qR,unregisterHostConfig:FR,normalizeHostConfig:WR,onFatalAuthError:JR,onPageRedirectRequested:QR,onPageRedirectStarted:XR};var eP=Object.freeze({__proto__:null,AuthorizationError:kR,InvalidAuthTypeError:wR,InvalidHostConfigError:vR,UnexpectedAuthTypeError:SR,default:YR,determineAuthType:TR,getAccessToken:async function(e){const t=(await DR({method:"GET",...e})).headers?.Authorization;if(0===t.indexOf("Bearer "))return t.substring(7);throw new Error("Unknown format of authorization header returned by remote auth module")},getDefaultHostConfig:KR,getRestCallAuthParams:DR,getWebResourceAuthParams:NR,getWebSocketAuthParams:MR,handleAuthenticationError:AR,isHostCrossOrigin:OR,isWindows:IR,logout:HR,normalizeHostConfig:WR,onFatalAuthError:JR,onPageRedirectRequested:QR,onPageRedirectStarted:XR,registerAuthModule:jR,registerHostConfig:zR,serializeHostConfig:BR,setDefaultHostConfig:$R,toValidLocationUrl:_R,toValidWebsocketLocationUrl:qR,unregisterHostConfig:FR}),tP=Object.freeze({__proto__:null});e.DataPropertyHandler=fx,e.EnigmaMocker=mE,e.HyperCubeHandler=Sx,e.__DO_NOT_USE__=gE,e.conversion=sw,e.embed=tE,e.onContextMenu=function(e){const t=Ow(++vw);t.value||(t.value=1,yw.__hooks.menus.push(t)),t.fn=e},e.onTakeSnapshot=function(e){const t=Ow(++vw);t.value||(t.value=1,yw.__hooks.snaps.push(t)),t.fn=e},e.useAction=function(e,t){const[n]=Mw({action(){n._config.action.call(null)}});return n.component||(n.component=yw,yw.__hooks.actions.list.push(n)),Dw(()=>{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=Iw("app");return e&&e.session?e:void 0},e.useAppLayout=function(){return Iw("appLayout")},e.useConstraints=function(){return Iw("constraints")},e.useDeviceType=function(){return Iw("deviceType")},e.useEffect=Nw,e.useElement=jw,e.useEmbed=function(){return Iw("nebbie")},e.useEmitter=function(){return Iw("emitter")},e.useGlobal=function(){const e=Iw("global");return e&&e.session?e:void 0},e.useImperativeHandle=function(e,t){const n=Ow(++vw);if(n.imperative||(n.imperative=!0),Sw(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],yw.__hooks.imperativeHandle=r}},e.useInteractionState=function(){return Iw("interactions")},e.useKeyboard=function(){const e=Iw("keyboardNavigation"),t=Iw("focusHandler");if(!yw.__hooks.accessibility.exitFunction){const e=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&n.active&&(zw(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(yw);yw.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e&&e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),$w(this))}.bind(yw);yw.__hooks.accessibility.focusFunction=n;const r=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(yw);yw.__hooks.accessibility.focusSelectionFunction=r}const n=yw.__hooks.accessibility.focusFunction,r=yw.__hooks.accessibility.exitFunction,o=yw.__hooks.accessibility.focusSelectionFunction,[i,a]=Mw({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return yw.__hooks.accessibility.setter=a,yw.__hooks.accessibility.enabled=e,Nw(()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o}),[e]),i},e.useLayout=function(){return Iw("layout")},e.useMemo=Dw,e.useModel=function(){const e=Iw("model");return e&&e.session?e:void 0},e.useNavigation=function(){return Iw("navigation")},e.useOptions=function(){return Iw("options")},e.usePlugins=function(){return Iw("plugins")},e.usePromise=function(e,t){const[n,r]=Mw(()=>({resolved:void 0,rejected:void 0,state:"pending"})),o=Ow(++vw);return o.component||(o.component=yw),Aw(()=>{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=jw(),t=yw.__hooks.resizer,[n,r]=Mw(()=>{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()),Aw(()=>{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 Dw(()=>({current:e}),[])},e.useRenderState=function(){Ow(++vw);const e=yw.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}},e.useSelections=function(){return Iw("selections")},e.useStaleLayout=function(){const e=Iw("layout"),[t]=Mw({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current},e.useState=Mw,e.useTheme=function(){return Iw("theme")},e.useTranslator=function(){return Iw("translator")}});
126
126
  //# sourceMappingURL=stardust.js.map