@nebula.js/stardust 7.5.1 → 7.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/esm/dev.js +3 -3
- package/core/esm/index.js +2 -2
- package/dist/chunks/{auth-Cndp79dH-Bv9Wc26c.js → auth-Cndp79dH-LYlY6Rk8.js} +3 -3
- package/dist/chunks/{auth-Cndp79dH-Bv9Wc26c.js.map → auth-Cndp79dH-LYlY6Rk8.js.map} +1 -1
- package/dist/chunks/{auth-Cndp79dH-Bm44mhxi.js → auth-Cndp79dH-xoUlzOe9.js} +3 -3
- package/dist/chunks/{auth-Cndp79dH-Bm44mhxi.js.map → auth-Cndp79dH-xoUlzOe9.js.map} +1 -1
- package/dist/chunks/{dist-Df-Traut-BLm7VBJm.js → dist-Df-Traut-B2nHpqaK.js} +2 -2
- package/dist/chunks/{dist-Df-Traut-BLm7VBJm.js.map → dist-Df-Traut-B2nHpqaK.js.map} +1 -1
- package/dist/chunks/{dist-Df-Traut-BeI6uxXf.js → dist-Df-Traut-BNdb3J_v.js} +2 -2
- package/dist/chunks/{dist-Df-Traut-BeI6uxXf.js.map → dist-Df-Traut-BNdb3J_v.js.map} +1 -1
- package/dist/chunks/{index-eDxuhcej.js → index-BCzH_uD3.js} +6 -6
- package/dist/chunks/{index-eDxuhcej.js.map → index-BCzH_uD3.js.map} +1 -1
- package/dist/chunks/{index-L5HtNfzB.js → index-EMxkNo4T.js} +4 -4
- package/dist/chunks/{index-L5HtNfzB.js.map → index-EMxkNo4T.js.map} +1 -1
- package/dist/stardust.dev.js +3 -3
- package/dist/stardust.js +2 -2
- package/dist/stardust.systemjs.dev.js +2 -2
- package/dist/stardust.systemjs.js +2 -2
- package/package.json +9 -9
package/core/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v7.5.
|
|
2
|
+
* @nebula.js/stardust v7.5.2
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -20,7 +20,7 @@ import*as e from"react";import t,{useState as n,useEffect as r,forwardRef as o,u
|
|
|
20
20
|
* @license MIT
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/const fr=[];function pr(e){return fr[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Zt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Qt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Qt(n,t,e[a]),r&&(o+=i[a]);Xt.lastIndex=0;for(var l,s="";null!==(l=Xt.exec(o));)s+="-"+l[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:c,styles:o,next:Zt}}(fr)}var hr,mr,gr={exports:{}},br={};function yr(){if(hr)return br;hr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case o:case r:case s:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case l:case d:case u:case i:return p;default:return h}}case t:return h}}}return br.ContextConsumer=i,br.ContextProvider=a,br.Element=e,br.ForwardRef=l,br.Fragment=n,br.Lazy=d,br.Memo=u,br.Portal=t,br.Profiler=o,br.StrictMode=r,br.Suspense=s,br.SuspenseList=c,br.isContextConsumer=function(e){return h(e)===i},br.isContextProvider=function(e){return h(e)===a},br.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},br.isForwardRef=function(e){return h(e)===l},br.isFragment=function(e){return h(e)===n},br.isLazy=function(e){return h(e)===d},br.isMemo=function(e){return h(e)===u},br.isPortal=function(e){return h(e)===t},br.isProfiler=function(e){return h(e)===o},br.isStrictMode=function(e){return h(e)===r},br.isSuspense=function(e){return h(e)===s},br.isSuspenseList=function(e){return h(e)===c},br.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===s||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===l||e.$$typeof===p||void 0!==e.getModuleId)},br.typeOf=h,br}function vr(){return mr||(mr=1,gr.exports=yr()),gr.exports}var Sr=vr();function wr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function xr(t){if(e.isValidElement(t)||Sr.isValidElementType(t)||!wr(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=xr(t[e])}),n}function kr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return wr(t)&&wr(n)&&Object.keys(n).forEach(i=>{e.isValidElement(n[i])||Sr.isValidElementType(n[i])?o[i]=n[i]:wr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&wr(t[i])?o[i]=kr(t[i],n[i],r):r.clone?o[i]=wr(n[i])?xr(n[i]):n[i]:o[i]=n[i]}),o}function Cr(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(i);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:l,down:s,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}function Er(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const Lr={borderRadius:4};function Rr(e,t){return t?kr(e,t,{clone:!1}):e}const Tr={xs:0,sm:600,md:900,lg:1200,xl:1536},qr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Tr[e]}px)`},Pr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Tr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ir(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||qr;return t.reduce((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){const e=r.breakpoints||qr;return Object.keys(t).reduce((o,i)=>{if(a=e.keys,"@"===(l=i)||l.startsWith("@")&&(a.some(e=>l.startsWith(`@${e}`))||l.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Pr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Tr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,l;return o},{})}return n(t)}function _r(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Or(e){if("string"!=typeof e)throw new Error(zt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Dr(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function Nr(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Dr(e,n)||r,t&&(o=t(o,r,e)),o}function Ar(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Dr(e.theme,r)||{};return Ir(e,i,e=>{let r=Nr(a,o,e);return e===r&&"string"==typeof e&&(r=Nr(a,o,`${t}${"default"===e?"":Or(e)}`,e)),!1===n?r:{[n]:r}})};return i.propTypes={},i.filterProps=[t],i}const jr={m:"margin",p:"padding"},Mr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$r={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},zr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!$r[e])return[e];e=$r[e]}const[t,n]=e.split(""),r=jr[t],o=Mr[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]}),Fr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Br=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Wr(e,t,n,r){const o=Dr(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof o?o:()=>{}}function Ur(e){return Wr(e,"spacing",8)}function Hr(e,t){return"string"==typeof t||null==t?t:e(t)}function Vr(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Hr(t,n),e),{})}(zr(n),r);return Ir(e,e[n],o)}function Gr(e,t){const n=Ur(e.theme);return Object.keys(e).map(r=>Vr(e,t,r,n)).reduce(Rr,{})}function Kr(e){return Gr(e,Fr)}function Jr(e){return Gr(e,Br)}function Qr(e=8,t=Ur({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}function Zr(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Rr(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Xr(e){return"number"!=typeof e?e:`${e}px solid`}function Yr(e,t){return Ar({prop:e,themeKey:"borders",transform:t})}Kr.propTypes={},Kr.filterProps=Fr,Jr.propTypes={},Jr.filterProps=Br;const eo=Yr("border",Xr),to=Yr("borderTop",Xr),no=Yr("borderRight",Xr),ro=Yr("borderBottom",Xr),oo=Yr("borderLeft",Xr),io=Yr("borderColor"),ao=Yr("borderTopColor"),lo=Yr("borderRightColor"),so=Yr("borderBottomColor"),co=Yr("borderLeftColor"),uo=Yr("outline",Xr),fo=Yr("outlineColor"),po=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Wr(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Hr(t,e)});return Ir(e,e.borderRadius,n)}return null};po.propTypes={},po.filterProps=["borderRadius"],Zr(eo,to,no,ro,oo,io,ao,lo,so,co,po,uo,fo);const ho=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Wr(e.theme,"spacing",8),n=e=>({gap:Hr(t,e)});return Ir(e,e.gap,n)}return null};ho.propTypes={},ho.filterProps=["gap"];const mo=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Wr(e.theme,"spacing",8),n=e=>({columnGap:Hr(t,e)});return Ir(e,e.columnGap,n)}return null};mo.propTypes={},mo.filterProps=["columnGap"];const go=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Wr(e.theme,"spacing",8),n=e=>({rowGap:Hr(t,e)});return Ir(e,e.rowGap,n)}return null};go.propTypes={},go.filterProps=["rowGap"];function bo(e,t){return"grey"===t?t:e}Zr(ho,mo,go,Ar({prop:"gridColumn"}),Ar({prop:"gridRow"}),Ar({prop:"gridAutoFlow"}),Ar({prop:"gridAutoColumns"}),Ar({prop:"gridAutoRows"}),Ar({prop:"gridTemplateColumns"}),Ar({prop:"gridTemplateRows"}),Ar({prop:"gridTemplateAreas"}),Ar({prop:"gridArea"}));function yo(e){return e<=1&&0!==e?100*e+"%":e}Zr(Ar({prop:"color",themeKey:"palette",transform:bo}),Ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:bo}),Ar({prop:"backgroundColor",themeKey:"palette",transform:bo}));const vo=Ar({prop:"width",transform:yo}),So=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Tr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:yo(t)}};return Ir(e,e.maxWidth,t)}return null};So.filterProps=["maxWidth"];const wo=Ar({prop:"minWidth",transform:yo}),xo=Ar({prop:"height",transform:yo}),ko=Ar({prop:"maxHeight",transform:yo}),Co=Ar({prop:"minHeight",transform:yo});Ar({prop:"size",cssProperty:"width",transform:yo}),Ar({prop:"size",cssProperty:"height",transform:yo});Zr(vo,So,wo,xo,ko,Co,Ar({prop:"boxSizing"}));const Eo={border:{themeKey:"borders",transform:Xr},borderTop:{themeKey:"borders",transform:Xr},borderRight:{themeKey:"borders",transform:Xr},borderBottom:{themeKey:"borders",transform:Xr},borderLeft:{themeKey:"borders",transform:Xr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:po},color:{themeKey:"palette",transform:bo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:bo},backgroundColor:{themeKey:"palette",transform:bo},p:{style:Jr},pt:{style:Jr},pr:{style:Jr},pb:{style:Jr},pl:{style:Jr},px:{style:Jr},py:{style:Jr},padding:{style:Jr},paddingTop:{style:Jr},paddingRight:{style:Jr},paddingBottom:{style:Jr},paddingLeft:{style:Jr},paddingX:{style:Jr},paddingY:{style:Jr},paddingInline:{style:Jr},paddingInlineStart:{style:Jr},paddingInlineEnd:{style:Jr},paddingBlock:{style:Jr},paddingBlockStart:{style:Jr},paddingBlockEnd:{style:Jr},m:{style:Kr},mt:{style:Kr},mr:{style:Kr},mb:{style:Kr},ml:{style:Kr},mx:{style:Kr},my:{style:Kr},margin:{style:Kr},marginTop:{style:Kr},marginRight:{style:Kr},marginBottom:{style:Kr},marginLeft:{style:Kr},marginX:{style:Kr},marginY:{style:Kr},marginInline:{style:Kr},marginInlineStart:{style:Kr},marginInlineEnd:{style:Kr},marginBlock:{style:Kr},marginBlockStart:{style:Kr},marginBlockEnd:{style:Kr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ho},rowGap:{style:go},columnGap:{style:mo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:yo},maxWidth:{style:So},minWidth:{transform:yo},height:{transform:yo},maxHeight:{transform:yo},minHeight:{transform:yo},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Lo=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:l,transform:s,style:c}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const u=Dr(n,l)||{};if(c)return c(o);return Ir(o,t,t=>{let n=Nr(u,s,t);return t===n&&"string"==typeof t&&(n=Nr(u,s,`${e}${"default"===t?"":Or(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??Eo;function l(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const l=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),s=Object.keys(l);let c=l;return Object.keys(r).forEach(n=>{const i=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=i)if("object"==typeof i)if(a[n])c=Rr(c,e(n,i,o,a));else{const e=Ir({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=Rr(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=Rr(c,e(n,i,o,a))}),!i&&o.modularCssLayers?{"@layer sx":Er(o,_r(s,c))}:Er(o,_r(s,c))}return Array.isArray(r)?r.map(l):l(r)}}();function Ro(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function To(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let l=kr({breakpoints:Cr(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Qr(o),shape:{...Lr,...i}},a);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=Ro,l=t.reduce((e,t)=>kr(e,t),l),l.unstable_sxConfig={...Eo,...a?.unstable_sxConfig},l.unstable_sx=function(e){return Lo({sx:e,theme:this})},l}function qo(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}Lo.filterProps=["sx"];const Po=To();function Io(e=Po){return qo(e)}function _o(e){const t=pr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Oo({styles:e,themeId:t,defaultTheme:n={}}){const r=Io(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map(e=>_o("function"==typeof e?e(o):e)):_o(i)),ar.jsx(dr,{styles:i})}const Do=e=>e,No=(()=>{let e=Do;return{configure(t){e=t},generate:t=>e(t),reset(){e=Do}}})();function Ao(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ao(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ao(e))&&(r&&(r+=" "),r+=t);return r}const Mo={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function $o(e,t,n="Mui"){const r=Mo[t];return r?`${n}-${r}`:`${No.generate(e)}-${t}`}function zo(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=$o(e,t,n)}),r}function Fo(e){const{variants:t,...n}=e,r={variants:t,style:pr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=pr(e.style))}),r}const Bo=To();function Wo(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Uo(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ho(e){return e?(t,n)=>n[e]:null}function Vo(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Vo(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Uo(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Uo(pr(o),n):o}return Go(e,r.variants,[t],n)}return r?.isProcessed?n?Uo(pr(r.style),n):r.style:n?Uo(pr(r),n):r}function Go(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if("function"==typeof a.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const t in a.props)if(e[t]!==a.props[t]&&e.ownerState?.[t]!==a.props[t])continue e;"function"==typeof a.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Uo(pr(a.style(o)),r):a.style(o))):n.push(r?Uo(pr(a.style),r):a.style)}return n}function Ko(e,t){}function Jo(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Qo(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)r[i]={...e[i],...r[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){r[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;r[i][t]=Qo(o[t],a[t],n)}}else r[i]=a;else r[i]=o||{}}else"className"===i&&n&&t.className?r.className=jo(e?.className,t?.className):"style"===i&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[i]&&(r[i]=e[i])}return r}const Zo="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Xo(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function Yo(e){if(e.type)return e;if("#"===e.charAt(0))return Yo(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(zt(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(zt(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const ei=(e,t)=>{try{return(e=>{const t=Yo(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function ti(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function ni(e){e=Yo(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let l="rgb";const s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",s.push(t[3])),ti({type:l,values:s})}function ri(e){let t="hsl"===(e=Yo(e)).type||"hsla"===e.type?Yo(ni(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oi(e,t){return e=Yo(e),t=Xo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,ti(e)}function ii(e,t,n){try{return oi(e,t)}catch(t){return e}}function ai(e,t){if(e=Yo(e),t=Xo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ti(e)}function li(e,t,n){try{return ai(e,t)}catch(t){return e}}function si(e,t){if(e=Yo(e),t=Xo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ti(e)}function ci(e,t,n){try{return si(e,t)}catch(t){return e}}function ui(e,t,n){try{return function(e,t=.15){return ri(e)>.5?ai(e,t):si(e,t)}(e,t)}catch(t){return e}}const di=e.createContext(null);function fi(){return e.useContext(di)}var pi="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function hi(t){const{children:n,theme:r}=t,o=fi(),i=e.useMemo(()=>{const e=null===o?{...r}:function(e,t){if("function"==typeof t)return t(e);return{...e,...t}}(o,r);return null!=e&&(e[pi]=null!==o),e},[r,o]);return ar.jsx(di.Provider,{value:i,children:n})}const mi=e.createContext();function gi({value:e,...t}){return ar.jsx(mi.Provider,{value:e??!0,...t})}const bi=e.createContext(void 0);function yi({value:e,children:t}){return ar.jsx(bi.Provider,{value:e,children:t})}function vi({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Qo(o.defaultProps,r,t.components.mergeClassNameAndStyle):o.styleOverrides||o.variants?r:Qo(o,r,t.components.mergeClassNameAndStyle)}({props:t,name:n,theme:{components:e.useContext(bi)}})}let Si=0;const wi={...e}.useId;function xi(t){if(void 0!==wi){return wi()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect(()=>{null==n&&(Si+=1,r(`mui-${Si}`))},[n]),o}(t)}const ki={};function Ci(t,n,r,o=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const i=r(e),a=t?{...n,[t]:i}:i;return o?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,o])}function Ei(e){const{children:t,theme:n,themeId:r}=e,o=qo(ki),i=fi()||ki,a=Ci(r,o,n),l=Ci(r,i,n,!0),s="rtl"===(r?a[r]:a).direction,c=function(e){const t=qo(),n=xi()||"",{modularCssLayers:r}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return o=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",Zo(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o?ar.jsx(Oo,{styles:o}):null}(a);return ar.jsx(hi,{theme:l,children:ar.jsx(y.Provider,{value:a,children:ar.jsx(gi,{value:s,children:ar.jsxs(yi,{value:r?a[r].components:a.components,children:[c,t]})})})})}const Li={theme:void 0};const Ri="mode",Ti="color-scheme",qi="data-color-scheme";function Pi(){}const Ii=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Pi;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function _i(){}function Oi(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function Di(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function Ni(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=Ri,colorSchemeStorageKey:l=Ti,storageWindow:s=("undefined"==typeof window?void 0:window),storageManager:c=Ii,noSsr:u=!1}=t,d=i.join(","),f=i.length>1,p=e.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),h=e.useMemo(()=>c?.({key:`${l}-light`,storageWindow:s}),[c,l,s]),m=e.useMemo(()=>c?.({key:`${l}-dark`,storageWindow:s}),[c,l,s]),[g,b]=e.useState(()=>{const e=p?.get(n)||n,t=h?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:Oi(e),lightColorScheme:t,darkColorScheme:i}}),[y,v]=e.useState(u||!f);e.useEffect(()=>{v(!0)},[]);const S=function(e){return Di(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),w=e.useCallback(e=>{b(t=>{if(e===t.mode)return t;const r=e??n;return p?.set(r),{...t,mode:r,systemMode:Oi(r)}})},[p,n]),x=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):b(t=>{const n={...t};return Di(t,t=>{"light"===t&&(h?.set(e),n.lightColorScheme=e),"dark"===t&&(m?.set(e),n.darkColorScheme=e)}),n}):b(t=>{const n={...t},i=null===e.light?r:e.light,a=null===e.dark?o:e.dark;return i&&(d.includes(i)?(n.lightColorScheme=i,h?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,m?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):b(e=>(h?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o}))},[d,h,m,r,o]),k=e.useCallback(e=>{"system"===g.mode&&b(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),C=e.useRef(k);return C.current=k,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;const e=(...e)=>C.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),e.useEffect(()=>{if(f){const e=p?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||w(e||n)})||_i,t=h?.subscribe(e=>{e&&!d.match(e)||x({light:e})})||_i,r=m?.subscribe(e=>{e&&!d.match(e)||x({dark:e})})||_i;return()=>{e(),t(),r()}}},[x,w,d,n,s,f,p,h,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:x}}function Ai(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const ji=(e,t,n,r=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])})};function Mi(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var l,s;return l=(e,t,l)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,s=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:s}),ji(i,e,`var(${r})`,l),ji(a,e,`var(${r}, ${s})`,l)}},s=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,o])=>{(!s||s&&!s([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):l([...n,t],o,r))})}(e),{css:o,vars:i,varsWithDefaults:a}}const $i={black:"#000",white:"#fff"},zi={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Fi="#f3e5f5",Bi="#ce93d8",Wi="#ba68c8",Ui="#ab47bc",Hi="#9c27b0",Vi="#7b1fa2",Gi="#e57373",Ki="#ef5350",Ji="#f44336",Qi="#d32f2f",Zi="#c62828",Xi="#ffb74d",Yi="#ffa726",ea="#ff9800",ta="#f57c00",na="#e65100",ra="#e3f2fd",oa="#90caf9",ia="#42a5f5",aa="#1976d2",la="#1565c0",sa="#4fc3f7",ca="#29b6f6",ua="#03a9f4",da="#0288d1",fa="#01579b",pa="#81c784",ha="#66bb6a",ma="#4caf50",ga="#388e3c",ba="#2e7d32",ya="#1b5e20";function va(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$i.white,default:$i.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Sa=va();function wa(){return{text:{primary:$i.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:$i.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xa=wa();function ka(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=si(e.main,o):"dark"===t&&(e.dark=ai(e.main,i)))}function Ca(e,t,n,r,o){const i=o.light||o,a=o.dark||1.5*o;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*i).toFixed(0)}%)`:"dark"===n&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*a).toFixed(0)}%)`))}function Ea(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||function(e="light"){return"dark"===e?{main:oa,light:ra,dark:ia}:{main:aa,light:ia,dark:la}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:Bi,light:Fi,dark:Ui}:{main:Hi,light:Wi,dark:Vi}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Ji,light:Gi,dark:Qi}:{main:Qi,light:Ki,dark:Zi}}(t),c=e.info||function(e="light"){return"dark"===e?{main:ca,light:sa,dark:da}:{main:da,light:ua,dark:fa}}(t),u=e.success||function(e="light"){return"dark"===e?{main:ha,light:pa,dark:ga}:{main:ba,light:ma,dark:ya}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:Yi,light:Xi,dark:ta}:{main:"#ed6c02",light:ea,dark:na}}(t);function f(e){if(o)return function(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}(e);const t=function(e,t){const n=ri(e),r=ri(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,xa.text.primary)>=n?xa.text.primary:Sa.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(zt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(zt(12,t?` (${t})`:"",JSON.stringify(e.main)));return o?(Ca(o,e,"light",i,r),Ca(o,e,"dark",a,r)):(ka(e,"light",i,r),ka(e,"dark",a,r)),e.contrastText||(e.contrastText=f(e.main)),e};let h;"light"===t?h=va():"dark"===t&&(h=wa());return kr({common:{...$i},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:zi,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...h},i)}function La(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const Ra={textTransform:"uppercase"},Ta='"Roboto", "Helvetica", "Arial", sans-serif';function qa(e,t){const{fontFamily:n=Ta,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,f=r/14,p=u||(e=>e/s*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Ta?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,Ra),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,Ra),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return kr({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:l,...m},d,{clone:!1})}function Pa(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Ia=["none",Pa(0,2,1,-1,0,1,1,0,0,1,3,0),Pa(0,3,1,-2,0,2,2,0,0,1,5,0),Pa(0,3,3,-2,0,3,4,0,0,1,8,0),Pa(0,2,4,-1,0,4,5,0,0,1,10,0),Pa(0,3,5,-1,0,5,8,0,0,1,14,0),Pa(0,3,5,-1,0,6,10,0,0,1,18,0),Pa(0,4,5,-2,0,7,10,1,0,2,16,1),Pa(0,5,5,-3,0,8,10,1,0,3,14,2),Pa(0,5,6,-3,0,9,12,1,0,3,16,2),Pa(0,6,6,-3,0,10,14,1,0,4,18,3),Pa(0,6,7,-4,0,11,15,1,0,4,20,3),Pa(0,7,8,-4,0,12,17,2,0,5,22,4),Pa(0,7,8,-4,0,13,19,2,0,5,24,4),Pa(0,7,9,-4,0,14,21,2,0,5,26,4),Pa(0,8,9,-5,0,15,22,2,0,6,28,5),Pa(0,8,10,-5,0,16,24,2,0,6,30,5),Pa(0,8,11,-5,0,17,26,2,0,6,32,5),Pa(0,9,11,-5,0,18,28,2,0,7,34,6),Pa(0,9,12,-6,0,19,29,2,0,7,36,6),Pa(0,10,13,-6,0,20,31,3,0,8,38,7),Pa(0,10,13,-6,0,21,33,3,0,8,40,7),Pa(0,10,14,-6,0,22,35,3,0,8,42,7),Pa(0,11,14,-7,0,23,36,3,0,9,44,8),Pa(0,11,15,-7,0,24,38,3,0,9,46,8)],_a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Oa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Da(e){return`${Math.round(e)}ms`}function Na(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Aa(e){const t={..._a,...e.easing},n={...Oa,...e.duration};return{getAutoHeightDuration:Na,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...l}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:Da(o)} ${i} ${"string"==typeof a?a:Da(a)}`).join(",")},...e,easing:t,duration:n}}const ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ma(e){return wr(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function $a(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;r<n.length;r++){const[o,i]=n[r];!Ma(i)||o.startsWith("unstable_")?delete t[o]:wr(i)&&(t[o]={...i},e(t[o]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function za(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}function Fa(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof n?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof n?`calc(${n})`:n})`:oi(t,(e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n})(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${za(n)})`:si(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${za(n)})`:ai(t,n)}})}function Ba(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:l={},shape:s,colorSpace:c,...u}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(zt(20));const d=Ea({...i,colorSpace:c}),f=To(e);let p=kr(f,{mixins:(h=f.breakpoints,m=r,{toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}},...m}),palette:d,shadows:Ia.slice(),typography:qa(d,l),transitions:Aa(a),zIndex:{...ja}});var h,m;return p=kr(p,u),p=t.reduce((e,t)=>kr(e,t),p),p.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Lo({sx:e,theme:this})},p.toRuntimeSource=$a,Fa(p),p}const Wa=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ua(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function Ha(e){return"dark"===e?Wa:[]}function Va(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Ga=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{o[e]=n[e],delete n[e]}),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function Ka(e,t,n){!e[t]&&n&&(e[t]=n)}function Ja(e){return"string"==typeof e&&e.startsWith("hsl")?ni(e):e}function Qa(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ei(Ja(e[t])))}const Za=e=>{try{return e()}catch(e){}};function Xa(e,t,n,r,o){if(!n)return;n=!0===n?{}:n;const i="dark"===o?"dark":"light";if(!r)return void(t[o]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=Ea({...t,colorSpace:o});return{palette:a,opacity:{...Ua(a.mode),...n},overlays:r||Ha(a.mode),...i}}({...n,palette:{mode:i,...n?.palette},colorSpace:e}));const{palette:a,...l}=Ba({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...Ua(i),...n?.opacity},overlays:n?.overlays||Ha(i)},l}function Ya(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Va,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&"light"!==d?"light":d),p=((e="mui")=>Ai(e))(i),{[f]:h,light:m,dark:g,...b}=n,y={...b};let v,S=h;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(S=!0),!S)throw new Error(zt(21,f));a&&(v="oklch");const w=Xa(v,y,S,u,f);m&&!y.light&&Xa(v,y,m,void 0,"light"),g&&!y.dark&&Xa(v,y,g,void 0,"dark");let x={defaultColorScheme:f,...w,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:c,getCssVar:p,colorSchemes:y,font:{...La(w.typography),...w.font},spacing:(k=u.spacing,"number"==typeof k?`${k}px`:"string"==typeof k||"function"==typeof k||Array.isArray(k)?k:"8px")};var k;Object.keys(x.colorSchemes).forEach(e=>{const t=x.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return p(e,t[r][o])};function r(e,t,n){if(v){let r;return e===ii&&(r=`transparent ${(100*(1-n)).toFixed(0)}%`),e===li&&(r=`#000 ${(100*n).toFixed(0)}%`),e===ci&&(r=`#fff ${(100*n).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${r})`}return e(t,n)}var o;if("light"===t.mode&&(Ka(t.common,"background","#fff"),Ka(t.common,"onBackground","#000")),"dark"===t.mode&&(Ka(t.common,"background","#000"),Ka(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{o[e]||(o[e]={})}),"light"===t.mode){Ka(t.Alert,"errorColor",r(li,a?p("palette-error-light"):t.error.light,.6)),Ka(t.Alert,"infoColor",r(li,a?p("palette-info-light"):t.info.light,.6)),Ka(t.Alert,"successColor",r(li,a?p("palette-success-light"):t.success.light,.6)),Ka(t.Alert,"warningColor",r(li,a?p("palette-warning-light"):t.warning.light,.6)),Ka(t.Alert,"errorFilledBg",n("palette-error-main")),Ka(t.Alert,"infoFilledBg",n("palette-info-main")),Ka(t.Alert,"successFilledBg",n("palette-success-main")),Ka(t.Alert,"warningFilledBg",n("palette-warning-main")),Ka(t.Alert,"errorFilledColor",Za(()=>t.getContrastText(t.error.main))),Ka(t.Alert,"infoFilledColor",Za(()=>t.getContrastText(t.info.main))),Ka(t.Alert,"successFilledColor",Za(()=>t.getContrastText(t.success.main))),Ka(t.Alert,"warningFilledColor",Za(()=>t.getContrastText(t.warning.main))),Ka(t.Alert,"errorStandardBg",r(ci,a?p("palette-error-light"):t.error.light,.9)),Ka(t.Alert,"infoStandardBg",r(ci,a?p("palette-info-light"):t.info.light,.9)),Ka(t.Alert,"successStandardBg",r(ci,a?p("palette-success-light"):t.success.light,.9)),Ka(t.Alert,"warningStandardBg",r(ci,a?p("palette-warning-light"):t.warning.light,.9)),Ka(t.Alert,"errorIconColor",n("palette-error-main")),Ka(t.Alert,"infoIconColor",n("palette-info-main")),Ka(t.Alert,"successIconColor",n("palette-success-main")),Ka(t.Alert,"warningIconColor",n("palette-warning-main")),Ka(t.AppBar,"defaultBg",n("palette-grey-100")),Ka(t.Avatar,"defaultBg",n("palette-grey-400")),Ka(t.Button,"inheritContainedBg",n("palette-grey-300")),Ka(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Ka(t.Chip,"defaultBorder",n("palette-grey-400")),Ka(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Ka(t.Chip,"defaultIconColor",n("palette-grey-700")),Ka(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Ka(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Ka(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Ka(t.LinearProgress,"primaryBg",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.LinearProgress,"secondaryBg",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.LinearProgress,"errorBg",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.LinearProgress,"infoBg",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.LinearProgress,"successBg",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.LinearProgress,"warningBg",r(ci,a?p("palette-warning-light"):t.warning.main,.62)),Ka(t.Skeleton,"bg",v?r(ii,a?p("palette-text-primary"):t.text.primary,.11):`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Ka(t.Slider,"primaryTrack",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.Slider,"secondaryTrack",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.Slider,"errorTrack",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.Slider,"infoTrack",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.Slider,"successTrack",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.Slider,"warningTrack",r(ci,a?p("palette-warning-main"):t.warning.main,.62));const e=v?r(li,a?p("palette-background-default"):t.background.default,.6825):ui(t.background.default,.8);Ka(t.SnackbarContent,"bg",e),Ka(t.SnackbarContent,"color",Za(()=>v?xa.text.primary:t.getContrastText(e))),Ka(t.SpeedDialAction,"fabHoverBg",ui(t.background.paper,.15)),Ka(t.StepConnector,"border",n("palette-grey-400")),Ka(t.StepContent,"border",n("palette-grey-400")),Ka(t.Switch,"defaultColor",n("palette-common-white")),Ka(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Ka(t.Switch,"primaryDisabledColor",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.Switch,"secondaryDisabledColor",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.Switch,"errorDisabledColor",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.Switch,"infoDisabledColor",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.Switch,"successDisabledColor",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.Switch,"warningDisabledColor",r(ci,a?p("palette-warning-main"):t.warning.main,.62)),Ka(t.TableCell,"border",r(ci,ii(a?p("palette-divider"):t.divider,1),.88)),Ka(t.Tooltip,"bg",r(ii,a?p("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){Ka(t.Alert,"errorColor",r(ci,a?p("palette-error-light"):t.error.light,.6)),Ka(t.Alert,"infoColor",r(ci,a?p("palette-info-light"):t.info.light,.6)),Ka(t.Alert,"successColor",r(ci,a?p("palette-success-light"):t.success.light,.6)),Ka(t.Alert,"warningColor",r(ci,a?p("palette-warning-light"):t.warning.light,.6)),Ka(t.Alert,"errorFilledBg",n("palette-error-dark")),Ka(t.Alert,"infoFilledBg",n("palette-info-dark")),Ka(t.Alert,"successFilledBg",n("palette-success-dark")),Ka(t.Alert,"warningFilledBg",n("palette-warning-dark")),Ka(t.Alert,"errorFilledColor",Za(()=>t.getContrastText(t.error.dark))),Ka(t.Alert,"infoFilledColor",Za(()=>t.getContrastText(t.info.dark))),Ka(t.Alert,"successFilledColor",Za(()=>t.getContrastText(t.success.dark))),Ka(t.Alert,"warningFilledColor",Za(()=>t.getContrastText(t.warning.dark))),Ka(t.Alert,"errorStandardBg",r(li,a?p("palette-error-light"):t.error.light,.9)),Ka(t.Alert,"infoStandardBg",r(li,a?p("palette-info-light"):t.info.light,.9)),Ka(t.Alert,"successStandardBg",r(li,a?p("palette-success-light"):t.success.light,.9)),Ka(t.Alert,"warningStandardBg",r(li,a?p("palette-warning-light"):t.warning.light,.9)),Ka(t.Alert,"errorIconColor",n("palette-error-main")),Ka(t.Alert,"infoIconColor",n("palette-info-main")),Ka(t.Alert,"successIconColor",n("palette-success-main")),Ka(t.Alert,"warningIconColor",n("palette-warning-main")),Ka(t.AppBar,"defaultBg",n("palette-grey-900")),Ka(t.AppBar,"darkBg",n("palette-background-paper")),Ka(t.AppBar,"darkColor",n("palette-text-primary")),Ka(t.Avatar,"defaultBg",n("palette-grey-600")),Ka(t.Button,"inheritContainedBg",n("palette-grey-800")),Ka(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Ka(t.Chip,"defaultBorder",n("palette-grey-700")),Ka(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Ka(t.Chip,"defaultIconColor",n("palette-grey-300")),Ka(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Ka(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Ka(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Ka(t.LinearProgress,"primaryBg",r(li,a?p("palette-primary-main"):t.primary.main,.5)),Ka(t.LinearProgress,"secondaryBg",r(li,a?p("palette-secondary-main"):t.secondary.main,.5)),Ka(t.LinearProgress,"errorBg",r(li,a?p("palette-error-main"):t.error.main,.5)),Ka(t.LinearProgress,"infoBg",r(li,a?p("palette-info-main"):t.info.main,.5)),Ka(t.LinearProgress,"successBg",r(li,a?p("palette-success-main"):t.success.main,.5)),Ka(t.LinearProgress,"warningBg",r(li,a?p("palette-warning-main"):t.warning.main,.5)),Ka(t.Skeleton,"bg",v?r(ii,a?p("palette-text-primary"):t.text.primary,.13):`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Ka(t.Slider,"primaryTrack",r(li,a?p("palette-primary-main"):t.primary.main,.5)),Ka(t.Slider,"secondaryTrack",r(li,a?p("palette-secondary-main"):t.secondary.main,.5)),Ka(t.Slider,"errorTrack",r(li,a?p("palette-error-main"):t.error.main,.5)),Ka(t.Slider,"infoTrack",r(li,a?p("palette-info-main"):t.info.main,.5)),Ka(t.Slider,"successTrack",r(li,a?p("palette-success-main"):t.success.main,.5)),Ka(t.Slider,"warningTrack",r(li,a?p("palette-warning-light"):t.warning.main,.5));const e=v?r(ci,a?p("palette-background-default"):t.background.default,.985):ui(t.background.default,.98);Ka(t.SnackbarContent,"bg",e),Ka(t.SnackbarContent,"color",Za(()=>v?Sa.text.primary:t.getContrastText(e))),Ka(t.SpeedDialAction,"fabHoverBg",ui(t.background.paper,.15)),Ka(t.StepConnector,"border",n("palette-grey-600")),Ka(t.StepContent,"border",n("palette-grey-600")),Ka(t.Switch,"defaultColor",n("palette-grey-300")),Ka(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Ka(t.Switch,"primaryDisabledColor",r(li,a?p("palette-primary-main"):t.primary.main,.55)),Ka(t.Switch,"secondaryDisabledColor",r(li,a?p("palette-secondary-main"):t.secondary.main,.55)),Ka(t.Switch,"errorDisabledColor",r(li,a?p("palette-error-main"):t.error.main,.55)),Ka(t.Switch,"infoDisabledColor",r(li,a?p("palette-info-main"):t.info.main,.55)),Ka(t.Switch,"successDisabledColor",r(li,a?p("palette-success-main"):t.success.main,.55)),Ka(t.Switch,"warningDisabledColor",r(li,a?p("palette-warning-light"):t.warning.main,.55)),Ka(t.TableCell,"border",r(li,ii(a?p("palette-divider"):t.divider,1),.68)),Ka(t.Tooltip,"bg",r(ii,a?p("palette-grey-700"):t.grey[700],.92))}a||(Qa(t.background,"default"),Qa(t.background,"paper"),Qa(t.common,"background"),Qa(t.common,"onBackground"),Qa(t,"divider")),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&!a&&n&&"object"==typeof n&&(n.main&&Ka(t[e],"mainChannel",ei(Ja(n.main))),n.light&&Ka(t[e],"lightChannel",ei(Ja(n.light))),n.dark&&Ka(t[e],"darkChannel",ei(Ja(n.dark))),n.contrastText&&Ka(t[e],"contrastTextChannel",ei(Ja(n.contrastText))),"text"===e&&(Qa(t[e],"primary"),Qa(t[e],"secondary")),"action"===e&&(n.active&&Qa(t[e],"active"),n.selected&&Qa(t[e],"selected")))})}),x=t.reduce((e,t)=>kr(e,t),x);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:Ga(x),enableContrastVars:a},{vars:E,generateThemeVars:L,generateStyleSheets:R}=function(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:s="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=Mi(c,t);let p=f;const h={},{[s]:m,...g}=a;if(Object.entries(g||{}).forEach(([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=Mi(n,t);p=kr(p,i),h[e]={css:o,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=Mi(m,t);p=kr(p,r),h[s]={css:e,vars:n}}function b(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(h).forEach(([,{vars:t}])=>{e=kr(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function l(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}l(n(void 0,{...d}),d);const{[o]:s,...c}=h;if(s){const{css:e}=s,t=a[o]?.palette?.mode,i=!r&&t?{colorScheme:t,...e}:{...e};l(n(o,{...i}),i)}return Object.entries(c).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,i=!r&&o?{colorScheme:o,...t}:{...t};l(n(e,{...i}),i)}),i&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t}}}(x,C);return x.vars=E,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([e,t])=>{x[e]=t}),x.generateThemeVars=L,x.generateStyleSheets=R,x.generateSpacing=function(){return Qr(u.spacing,Ur(this))},x.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(s),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=l,x.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},x.unstable_sx=function(e){return Lo({sx:e,theme:this})},x.toRuntimeSource=$a,x}function el(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:Ea({...!0===n?{}:n.palette,mode:t})})}function tl(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,l=i||"light",s=o?.[l],c={...o,...n?{[l]:{..."boolean"!=typeof s&&s,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return Ba(e,...t);let r=n;"palette"in e||c[l]&&(!0!==c[l]?r=c[l].palette:"dark"===l&&(r={mode:"dark"}));const o=Ba({...e,palette:r},...t);return o.defaultColorScheme=l,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},el(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},el(o,"light",c.light)),o}return n||"light"in c||"light"!==l||(c.light=!0),Ya({...a,colorSchemes:c,defaultColorScheme:l,..."boolean"!=typeof r&&r},...t)}const nl=tl();function rl(){const e=Io(nl);return e[Ft]||e}const ol=function(e={}){const{themeId:t,defaultTheme:n=Bo,rootShouldForwardProp:r=Wo,slotShouldForwardProp:o=Wo}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,e=>e.filter(e=>e!==Lo));const{name:n,slot:a,skipVariantsResolver:l,skipSx:s,overridesResolver:c=Ho(Jo(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",f=void 0!==l?l:a&&"Root"!==a&&"root"!==a||!1,p=s||!1;let h=Wo;"Root"===a||"root"===a?h=r:a?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:h,label:Ko(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Vo(t,e,t.theme.modularCssLayers?d:void 0)};if(wr(e)){const t=Fo(e);return function(e){return t.variants?Vo(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Uo(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(i),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Vo(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)}),n&&!f&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Go(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),p||a.push(Lo),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const l=[...r,...o,...a],s=m(...l);return e.muiName&&(s.muiName=e.muiName),s};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:Ft,defaultTheme:nl,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function il({theme:e,...t}){const n=Ft in e?e[Ft]:void 0;return ar.jsx(Ei,{...t,themeId:n?Ft:void 0,theme:n||e})}const al="mui-color-scheme",ll="light",sl="dark",cl="mui-mode",{CssVarsProvider:ul}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=Ri,colorSchemeStorageKey:i=Ti,disableTransitionOnChange:a=!1,defaultColorScheme:l,resolveTheme:s}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},f={},p="string"==typeof l?l:l.light,h="string"==typeof l?l:l.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:h=o,colorSchemeStorageKey:m=i,disableTransitionOnChange:g=a,storageManager:b,storageWindow:y=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:S=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:w=!1,disableStyleSheetGeneration:x=!1,defaultMode:k="system",forceThemeRerender:C=!1,noSsr:E}=t,L=e.useRef(!1),R=fi(),T=e.useContext(u),q=!!T&&!w,P=e.useMemo(()=>p||("function"==typeof r?r():r),[p]),I=P[n],_=I||P,{colorSchemes:O=d,components:D=f,cssVarPrefix:N}=_,A=Object.keys(O).filter(e=>!!O[e]).join(","),j=e.useMemo(()=>A.split(","),[A]),M="string"==typeof l?l:l.light,$="string"==typeof l?l:l.dark,z=O[M]&&O[$]?k:O[_.defaultColorScheme]?.palette?.mode||_.palette?.mode,{mode:F,setMode:B,systemMode:W,lightColorScheme:U,darkColorScheme:H,colorScheme:V,setColorScheme:G}=Ni({supportedColorSchemes:j,defaultLightColorScheme:M,defaultDarkColorScheme:$,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let K=F,J=V;q&&(K=T.mode,J=T.colorScheme);let Q=J||_.defaultColorScheme;_.vars&&!C&&(Q=_.defaultColorScheme);const Z=e.useMemo(()=>{const e=_.generateThemeVars?.()||_.vars,t={..._,components:D,colorSchemes:O,cssVarPrefix:N,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),Q){const e=O[Q];e&&"object"==typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[_,Q,D,O,N]),X=_.colorSchemeSelector;Zo(()=>{if(J&&S&&X&&"media"!==X){const e=X;let t=X;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...j.map(e=>t.substring(1).replace("%s",e))),S.classList.add(t.substring(1).replace("%s",J));else{const e=t.replace("%s",J).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||j.forEach(e=>{S.removeAttribute(t.replace(J,e))}),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,J)}}},[J,X,S,j]),e.useEffect(()=>{let e;if(g&&L.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,g,v]),e.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Y=e.useMemo(()=>({allColorSchemes:j,colorScheme:J,darkColorScheme:H,lightColorScheme:U,mode:K,setColorScheme:G,setMode:B,systemMode:W}),[j,J,H,U,K,G,B,W,Z.colorSchemeSelector]);let ee=!0;(x||!1===_.cssVariables||q&&R?.cssVarPrefix===N)&&(ee=!1);const te=ar.jsxs(e.Fragment,{children:[ar.jsx(Ei,{themeId:I?n:void 0,theme:Z,children:c}),ee&&ar.jsx(dr,{styles:Z.generateStyleSheets?.()||[]})]});return q?te:ar.jsx(u.Provider,{value:Y,children:te})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Ri,colorSchemeStorageKey:i=Ti,attribute:a=qi,colorSchemeNode:l="document.documentElement",nonce:s}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${l}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${l}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^[\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${l}.removeAttribute('${e}'.replace('%s', light));\n ${l}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${l}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==u&&(c+=`${l}.setAttribute('${u}', colorScheme);`);return ar.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?s:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${o}') || '${t}';\n const dark = localStorage.getItem('${i}-dark') || '${r}';\n const light = localStorage.getItem('${i}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:h,modeStorageKey:o,...e})}}({themeId:Ft,theme:()=>tl({cssVariables:!0}),colorSchemeStorageKey:al,modeStorageKey:cl,defaultColorScheme:{light:ll,dark:sl},resolveTheme:e=>{const t={...e,typography:qa(e.palette,e.typography)};return t.unstable_sx=function(e){return Lo({sx:e,theme:this})},t}}),dl=ul;function fl({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=Ft in t?t[Ft]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?ar.jsx(il,{theme:r,...n}):ar.jsx(dl,{theme:t,...n})}const pl=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Li.theme=r.theme,o=Fo(e(Li)),t=o,n=r.theme),o}};function hl(e){return $o("MuiSvgIcon",e)}zo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ml=ol("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Or(n.color)}`],t[`fontSize${Or(n.fontSize)}`]]}})(pl(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{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}}]}))),gl=e.forwardRef(function(t,n){const r=vi({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return function(e,t,n){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${Or(t)}`,`fontSize${Or(n)}`]},hl,r)})(m);return ar.jsxs(ml,{as:l,className:jo(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?ar.jsx("title",{children:d}):null]})});function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bl.apply(null,arguments)}function yl(e,t){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yl(e,t)}function vl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yl(e,t)}function Sl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}gl.muiName="SvgIcon";const wl=zo("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"]);var xl={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 kl={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"},Cl={mode:"light",palette:{primary:{main:kl.grey25,contrastText:kl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:kl.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:kl.grey100,dark:kl.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:kl.grey100,default:kl.grey100,lightest:kl.grey100,lighter:kl.grey98,darker:kl.grey95,darkest:kl.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:kl.blueDark,focusBorder:kl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:kl.grey45,disabledContrastText:kl.grey100},selected:{main:kl.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:kl.grey100,selectedContrastText:kl.grey100,mainContrastText:kl.grey100,alternativeContrastText:kl.grey25,excludedContrastText:kl.grey25,selectedExcludedContrastText:kl.grey100,possibleContrastText:kl.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)"}}},El={mode:"dark",palette:{primary:{main:kl.grey20,contrastText:kl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:kl.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:kl.grey100,dark:kl.grey0},action:{active:kl.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:kl.grey25,lighter:kl.grey20,darker:kl.grey15,darkest:kl.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:kl.blueDark,focusBorder:kl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:kl.grey45,disabledContrastText:kl.grey100},selected:{main:kl.green,alternative:kl.grey20,excluded:kl.grey10,selectedExcluded:kl.grey10,possible:kl.grey80,selectedContrastText:kl.grey100,mainContrastText:kl.grey100,alternativeContrastText:kl.grey100,excludedContrastText:kl.grey100,selectedExcludedContrastText:kl.grey100,possibleContrastText:kl.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)"}}},Ll={},Rl=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",[`&.${wl.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",[`&.${wl.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",[`&.${wl.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${wl.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Tl(e){let t=Cl,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=El));const r=JSON.stringify(t);if(Ll[r])return Ll[r];const o={palette:Z(Z({type:t.mode},xl.palette),t.palette),typography:Z({},xl.typography),shadows:xl.shadows,shape:Z({},xl.shape)},i=Z(Z({},o),{},{components:Rl(o)});return Ll[r]=tl(i),Ll[r].name=n,Ll[r]}No.configure(e=>`njs-3df1-${e.replace("Mui","")}`);var ql=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Pl={active:!0,select:!0,passive:!0,edit:!1};function Il(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(Pl).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Pl[e],n[e]=!Pl[e])}),e.constraints=n,e.interactions=t}var _l=(e={},t=()=>{})=>{const o=e,i=[],a={},l={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return o[e]=n,a[e]=t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);o[e]=null},dispatch:e=>{i.forEach(t=>t(e?{}:o))},destroy:()=>{Object.keys(a).forEach(e=>{a[e]&&a[e]()})}};return[()=>{const[,e]=n(o);return r(()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)}),[e]),[l]},l]};const Ol=o(({initialContext:e,renderCallback:t,modelStore:o,selectionStore:l},s)=>{const[c,u]=n(e),[d,f]=n(),{theme:p}=i(()=>({theme:Tl(d)}),[d]),[h,m]=n([]);return r(()=>{t&&t()},[]),a(s,()=>({setComps(e){m([...e])},setMuiThemeName:f,setContext:e=>u(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),c&&(c.modelStore=o,c.selectionStore=l),ar.jsx(ur,{injectFirst:!0,children:ar.jsx(fl,{theme:p,children:ar.jsx(ql.Provider,{value:c,children:h})})})});function Dl({app:e,context:n}){let r,o=!1;const i=new Promise(e=>{r=e}),a=t.createRef(),l=document.createElement("div");l.style.display="none",l.setAttribute("data-nebulajs-version","7.5.1"),l.setAttribute("data-app-id",e.id),document.body.appendChild(l),n&&Il(n);const s=function(e){const[t,n]=_l({}),[r,o]=_l({}),[i,a]=_l({}),[l,s]=_l({}),[c,u]=_l({}),[,d]=_l({}),f=({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)},l=()=>{t.removeListener("closed",l),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),s.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",l))),l},[p,h]=_l({},f);return{subscribe:e=>{const t=f({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:p,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:l,rpcRequestModelStore:s,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(e.id),c=function(e){const[t,n]=_l({}),[r,o]=_l({}),[i,a]=_l({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),u=$t.createRoot(l);u.render(ar.jsx(Ol,{ref:a,initialContext:n,renderCallback:r,modelStore:s,selectionStore:c}));const d={},f=[],p=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach(t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async n=>{await i,p.push(e),f.push(t),null==a||null===(n=a.current)||void 0===n||n.setComps(p)})(),remove(e){o||(async t=>{await i;const n=p.indexOf(e);var r;-1!==n&&(null===(r=f[n])||void 0===r||r.call(f),p.splice(n,1),f.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await i,null==a||null===(t=a.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await i,e&&Il(e),null==a||null===(t=a.current)||void 0===t||t.setContext(e)})()},destroy(){o=!0,f.forEach(e=>{e&&e()}),s.destroy(),u.unmount(),document.body.removeChild(l)}},s,c,a,i]}function Nl(){const{useModelStore:e}=l(ql).modelStore;return e()}function Al(e,t,...o){const i=t?`${t.id}/${JSON.stringify(e)}`:null,[a]=Nl(),[s]=function(){const{useRpcRequestSessionModelStore:e}=l(ql).modelStore;return e()}(),[c,u]=n();return r(()=>{if(!t)return;(async()=>{let n=s.get(i);n||(n=t.createSessionObject(e),s.set(i,n));const r=await n;a.set(i,r),u(r)})()},[t,...o]),[c]}const jl={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ml(e){return Al(jl,e)}const $l=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Z(Z({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Z({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Z(Z({},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 zl(e,t){const n=e?`${e.id}`:null,[o]=function(){const{useRpcResultStore:e}=l(ql).modelStore;return e()}(),[i,a]=s($l,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=l(ql).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=l(ql).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const f=async r=>{let i=d[t];if(!i||i&&i.rpcRetry){i={rpc:e[t](),rpcRetry:!1},d[t]=i,a({type:"INVALID",method:t,key:n,model:e,rpcResultStore:o,canCancel:!0})}try{await(l=0,new Promise(e=>{setTimeout(e,l)}));const r=await i.rpc;a({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:o})}catch(e){15!==e.code||r||(i.rpcRetry||(i.rpcRetry=!0),f(!0))}var l},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(d[t].rpc.requestId),a({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:o})},retry:()=>{d[t].rpcRetry=!0,f()}};return r(()=>{e&&f()},[e,c.get(e&&e.id),n,t]),[i&&i.result,{validating:i&&i.validating,canCancel:i&&i.canCancel,canRetry:i&&i.canRetry},p]}function Fl(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=zl(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 Bl(e){return zl(e,"getAppLayout")}function Wl(){const[e,t]=n(),[r,o]=n(),i=c(e=>{e&&t(e)},[]),a=()=>{const{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();o({left:t,top:n,width:r,height:i})};return u(()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(a);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}}},[e]),[i,r,e]}const Ul="singlepublic-pinnedItems",Hl=e=>{var t;const[o]=(e=>{const[t,o]=n(null),[i,a]=n(null),[l]=Nl();return r(()=>{let t=!0,n=()=>{};if(e)return async function(){try{const r=`${e.id}-${Ul}`;let i=l.get(r);if(!i){if(i=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,Ul),!t)return;if(i){l.set(r,i);const e=()=>{l.clear(r)};i.once("closed",e),n=()=>{i.removeListener("closed",e)}}}t&&(a(null),o(i))}catch(e){t&&(a(e instanceof Error?e:new Error(String(e))),o(null))}}(),()=>{t=!1,n()}},[e,l]),[t,i]})(e),[i]=zl(o,"getLayout");return[null!==(t=null==i?void 0:i.pinnedItems)&&void 0!==t?t:[]]},Vl=(e,t,o)=>{const[i,a]=n(void 0),[l,s]=n(void 0),[c]=Nl();return r(()=>{let n=!0,r=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const i=`${e.id}-${t}`;let l=c.get(i);if(!l){try{l=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!o)throw t;l=await e.createSessionObject(o)}if(!n)return;c.set(i,l);const a=()=>{c.clear(i)};l.once("closed",a),r=()=>{l.removeListener("closed",a)}}n&&(s(void 0),a(l))}catch(e){n&&(s(e instanceof Error?e:new Error(String(e))),a(void 0))}}(),()=>{n=!1,r()}},[e,t,c]),[i,l]},Gl={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Kl={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Jl="qField",Ql="id",Zl=(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},Xl=(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=>Jl in n&&n[Jl]?e.some(e=>e.qName===n[Jl]):!(!(Ql in n)||!n[Ql])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ql]&&"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 l;const t=o[e],n=!(!(Ql in t)||!t[Ql]),s=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ql]}):null,c=n?null==s||null===(l=s.qData)||void 0===l||null===(l=l.info[0])||void 0===l?void 0:l.qName:t[Jl],u=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[Ql]||!n&&(e.selections[0].qField===c||e.selections[0].qReadableName===c)});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)===c&&!e.isPinned})))if(-1===u){const t=Z(Z({},o[e]),{},{isPinned:!0,states:["$"]});n&&s&&(t.qField=c,t.qName=s.qData.labelExpression||s.qData.title||c),i.push(t)}else i.push(a[u]),a.splice(u,1)}return[...i,...a]};function Yl(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function es({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=Z({fontSize:Yl(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return ar.jsx("i",{style:o,children:ar.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)=>ar.jsx(e,Z({},t),n))})})}var ts=e=>es((e=>Z(Z({},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 ns=e=>es((e=>Z(Z({},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 rs=e=>Z(Z({},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 os=e=>es(rs(e));var is=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}}(),as=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},ls=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=as(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[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},as(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)}(e,d),is(e,[{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,l=n.threshold,s=void 0===l?15:l,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],l=null,s=null,c=o;c<=i;c++)t(c)?null!==s&&(a.push(l,s),l=s=null):(s=c,null===l&&(l=c));if(null!==s){for(var u=Math.min(Math.max(s,l+r-1),n-1),d=s+1;d<=u&&!t(d);d++)s=d;a.push(l,s)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var f=a[0]-1;if(t(f))break;a[0]=f}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-s),stopIndex:Math.min(o-1,t+s)});(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)}}]),e}();const ss=["S","XS"],cs=e=>e.reduce((e,t)=>e.concat(t));function us(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!ss.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return cs(t)}async function ds({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 fs="RowColumn",ps={row:`${fs}-row`,rowBorderBottom:`${fs}-rowBorderBottom`,column:`${fs}-column`,fieldRoot:`${fs}-fieldRoot`,cell:`${fs}-cell`,labelText:`${fs}-labelText`,labelDense:`${fs}-labelDense`,highlighted:`${fs}-highlighted`,checkboxLabel:`${fs}-checkboxLabel`,icon:`${fs}-icon`,S:`${fs}-S`,XS:`${fs}-XS`,A:`${fs}-A`,X:`${fs}-X`,frequencyCount:`${fs}-frequencyCount`,barContainer:`${fs}-barContainer`,bar:`${fs}-bar`,barSelected:`${fs}-barSelected`,barWithCheckbox:`${fs}-barWithCheckbox`,barSelectedWithCheckbox:`${fs}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${fs}-excludedTextWithCheckbox`},hs=`.${ps.fieldRoot}`,ms=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function gs({selectionState:e,selections:t,checkboxes:n=!1,doc:o=document,loaderRef:i}){var a;const l=f({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r(()=>{var e;if(null===(e=i.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=i.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}},[null===(a=i.current)||void 0===a||null===(a=a._listRef)||void 0===a?void 0:a._outerRef]);const s=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),ds({selections:t,elemNumbers:l.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:l.current.toggle}))},u=(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 cs(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)},d=t=>{const{startElemNumber:n}=l.current;if(n===t)return;const r=u(l.current.startElemNumber,t);e.updateItems(r,!0,l.current.elemNumbers)},p=c(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&ms(t.nativeEvent);l.current.elemNumbers=[n],l.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),l.current.active=!1,s()},[]),h=c(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&ms(t);l.current.isRange=!1,l.current.startElemNumber=n,l.current.elemNumbers=[n],l.current.toggle=r,l.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(l.current.active=!1,s()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),m=c(e=>{if(0===e.button&&l.current.active){if(l.current.active=!1,l.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}s()}},[]),g=c(e=>{0===e.button&&l.current.active&&(l.current.active=!1,s())},[]),b=c(t=>{if(!l.current.active)return;l.current.isRange||(l.current.isRange=!0,e.isSelected(l.current.startElemNumber)||(e.updateItem(l.current.startElemNumber,!0),l.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");d(n)},[]),y=c(t=>{var n,r;if(l.current.active||l.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(hs))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(hs))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void s();l.current.active=!0;u(o,i).length<7&&(l.current.touchRangeSmall=!0),l.current.elemNumbers=[],l.current.touchElemNumbers=[o,i]},[]),v=c(()=>{if(2!==l.current.touchElemNumbers.length)return;if(l.current.touchRangeSmall)return l.current.touchRangeSmall=!1,l.current.touchElemNumbers=[],void(l.current.active=!1);const[e,t]=l.current.touchElemNumbers;l.current.startElemNumber=e,d(t),l.current.touchElemNumbers=[],l.current.active=!1,l.current.toggle=!0,s()},[]);r(()=>(o.addEventListener("mouseup",g),()=>{o.removeEventListener("mouseup",g)}),[g]),r(()=>{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 S={};return n?Object.assign(S,{onChange:p}):Object.assign(S,{onMouseUp:m,onMouseDown:h,onMouseEnter:b,onTouchStart:y,onTouchEnd:v}),{interactionEvents:S,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&&ms(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const l=[];return e.updateItems(n,r,l),e.setSelectableValuesUpdating(),ds({selections:t,elemNumbers:r?l:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const bs=e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ys=e=>es(bs(e));const vs=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,Ss=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||vs(e))&&t;const ws=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?ps.column:ps.row];t||o.push(ps.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?ps.XS:ps.S;break;case"S":case"L":n=ps.S;break;case"A":n=!!t&&ps.A;break;case"X":case"XL":n=!!t&&ps.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},xs=e=>e.filter(e=>!!e).join(" ").trim(),ks=e=>e||"-",Cs=["backgroundColor"],Es=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},Ls=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,Rs=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${ps.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${ps.labelText}`]:{color:i},[`& .${ps.icon}`]:{color:i}}},Ts={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},qs=ol("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:l,freqHitsValue:s,styles:c})=>{const u=c.content,{backgroundColor:d}=u,f=X(u,Cs),p=Rs({styles:c,checkboxes:t,selectionState:"selected"}),h=Rs({styles:c,checkboxes:t,selectionState:"excluded"}),m={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},g={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${ps.row}`]:Z({flexWrap:"nowrap"},c.content),[`& .${ps.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${ps.column}`]:Z({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},c.content),[`& .${ps.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${ps.labelText}`]:Z(Z({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Ts),f),[`& .${ps.labelDense}`]:{lineHeight:"18px"},[`& .${ps.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${ps.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Z(Z({},Ts),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${ps.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:f.color},[`& .${ps.S}`]:Z(Z({},p),{},{"&: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}),[`& .${ps.XS}`]:Z(Z({},Rs({styles:c,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${ps.A}`]:Z(Z({},Rs({styles:c,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${ps.X}`]:Z(Z({},h),{},{border:n?"none":void 0}),[`& .${ps.X}, & .${ps.XS}`]:{border:n?"none":void 0,[`& .${ps.barSelected} .bar-filled`]:Z({},m)},[`& .${ps.frequencyCount}`]:Z(Z({zIndex:3,justifyContent:"flex-end"},Ts),{},{flex:`0 0 ${Es({sizes:a,frequencyMode:l,isGridMode:n,freqHitsValue:s})}`,minWidth:!n&&"P"!==l&&s?a.freqMinWidth:"max-content",maxWidth:Ls({sizes:a,frequencyMode:l,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${ps.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${ps.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":Z({},m)},[`& .${ps.barSelected}`]:{"& .bar-filled":Z({},g)},[`& .${ps.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${ps.barSelectedWithCheckbox}`]:{"& .bar-filled":Z(Z({},g),{},{backgroundColor:c.selections.selected||"#BFE5D0",borderColor:c.selections.selected})},[`& .${ps.excludedTextWithCheckbox}`]:{color:c.content.color,fontStyle:"italic"}}});var Ps=t.memo(qs);const Is="ListBoxCheckbox",_s={cbIcon:`${Is}-cbIcon`,cbIconChecked:`${Is}-cbIconChecked`,cbIconExcluded:`${Is}-cbIconExcluded`,cbIconAlternative:`${Is}-cbIconAlternative`,checkbox:`${Is}-checkbox`,dense:`${Is}-dense`},Os=ol(S,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${_s.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"},[`& .${_s.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:'""'}},[`& .${_s.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${_s.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${_s.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${_s.dense}`]:{padding:"4px 8px"}})),Ds=(e,t=!0,n=!1)=>ar.jsx("span",{className:e.cbIcon,children:n&&ar.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function Ns({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:l}){return ar.jsx(Os,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[_s.checkbox,r&&_s.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":l},name:n,icon:Ds(_s,a,o),checkedIcon:ar.jsx("span",{className:_s.cbIconChecked}),styles:i})}const As={radioButton:"ListBoxRadioButton-radioButton"},js=ol(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${As.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Ms({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return ar.jsx(js,{checked:t,onChange:e,value:n,name:n,className:As.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function $s({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return ar.jsx(x,{component:"span",variant:"body2",className:xs([ps.labelText,t&&ps.labelDense,n&&Ss({cell:o,checkboxes:r})&&ps.excludedTextWithCheckbox]),align:i,dir:"auto",children:ar.jsx("span",{children:e})})}function zs({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?ar.jsx($s,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function Fs({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}){const f=ar.jsx(Ns,{onChange:e,label:t,checked:r,dense:o,excluded:vs(i),isGridCol:a,showGray:l,dataN:n,styles:d}),p=ar.jsx(Ms,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return ar.jsx(k,{control:s?p:f,className:ps.checkboxLabel,label:ar.jsx(zs,{label:t,dense:o,showGray:l,checkboxes:c,cell:i,valueTextAlign:u})},n)}function Bs({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>ar.jsx("span",{id:n,className:t?ps.highlighted:"",children:e}));return ar.jsx($s,{label:o,dense:t,showGray:n,checkboxes:r})}function Ws({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:l,isGridCol:s,isSingleSelect:c,valueTextAlign:u,styles:d}){const f=ar.jsx(Bs,{labels:t,dense:r,showGray:o,checkboxes:n});return n?ar.jsx(Fs,{onChange:e,label:f,qElemNumber:i,isSelected:a,dense:r,cell:l,isGridCol:s,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):f}var Us=t.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}){return c?ar.jsx(Fs,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}):ar.jsx($s,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});const Hs={top:"flex-start",center:"center",middle:"center",bottom:"flex-end"},Vs={left:"flex-start",center:"center",right:"flex-end"},Gs=e=>{var t,n;const{vertical:r,horizontal:o}=(e=>{const t=e||"top-center";if(t.includes("-")){const[e,n]=t.split("-");return{vertical:e,horizontal:n}}const n=t.match(/^(top|middle|center|bottom)(left|center|right)$/i);return n?{vertical:n[1].toLowerCase(),horizontal:n[2].toLowerCase()}:{vertical:"top",horizontal:"center"}})(e);return{vertical:null!==(t=Hs[r])&&void 0!==t?t:"flex-start",horizontal:null!==(n=Vs[o])&&void 0!==n?n:"center"}},Ks=e=>"fitHeight"===e?"auto":"100%",Js=e=>{let t="center",n="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?n="left":"flex-end"===(null==e?void 0:e.horizontal)&&(n="right"),`${n} ${t}`},Qs=e=>{switch(e){case"alwaysFit":case"fitHeight":return"contain";case"stretch":return"fill";case"alwaysFill":return"cover";default:return}};function Zs({representation:e,src:t,label:r,title:o,subtitle:i,cellBgColor:a,borderColor:l,placeholderBackground:s,textStyles:c,selected:u=!1,selectionColor:d="#009845",opacity:f=1}){var p,h,m,g,b,y,v,S,w,x,k;const{imageSize:C="alwaysFit",imagePosition:E,titlePosition:L="top-center",textOverlay:R=!0,titleBackground:T=!0,cornerRadius:q=4,borderWidth:P=0,borderColor:I}=e,_="fitHeight"===C,O="fitWidth"===C,D=Gs(E),N="200px",A=(e=>{if("string"!=typeof e||!e.trim())return!1;try{const t=new URL(e,window.location.origin);return"https:"===t.protocol||"http:"===t.protocol||"data:"===t.protocol&&/^data:image\//i.test(e.trim())}catch(e){return!1}})(t)?t:null,[j,M]=n(null),$=null!==A&&A===j,z=`${q}px`,F=null!==(p=null!=l?l:"string"==typeof I?I:null==I?void 0:I.color)&&void 0!==p?p:"#d9d9d9";let B;B=u?`2px solid ${d}`:P>0?`${P}px solid ${F}`:"2px solid transparent";const W=A&&!$?ar.jsx("img",{src:A,alt:r,onError:()=>M(A),style:{width:Ks(C),height:O?"auto":"100%",maxHeight:_&&!O?N:void 0,objectFit:Qs(C),objectPosition:Js(D),overflow:"hidden"}}):null,U=Gs(L),H=!1!==R&&(o||i),V=null!=c?c:{},G=Boolean(A),K=G&&!T&&null!==(h=V.shadowOnImage)&&void 0!==h?h:"none",J=H?ar.jsx("div",{"data-key":"image-title-overlay",style:{position:"absolute",inset:0,display:"flex",justifyContent:U.horizontal,alignItems:U.vertical,padding:"4px",pointerEvents:"none",boxSizing:"border-box"},children:ar.jsxs("div",{style:{maxWidth:"100%",padding:T&&G?"2px 6px":0,borderRadius:T&&G?"3px":0,backgroundColor:T&&G&&null!==(m=V.backdropColor)&&void 0!==m?m:"transparent",overflow:"hidden",textAlign:"center"===U.horizontal?"center":void 0},children:[o&&ar.jsx("div",{"data-key":"image-title",style:{fontFamily:V.fontFamily,fontSize:null!==(g=V.fontSize)&&void 0!==g?g:"13px",fontWeight:null!==(b=V.fontWeight)&&void 0!==b?b:"bold",fontStyle:null!==(y=V.fontStyle)&&void 0!==y?y:"normal",textDecoration:null!==(v=V.textDecoration)&&void 0!==v?v:"initial",color:null!==(S=V.color)&&void 0!==S?S:"#333333",textShadow:K,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),i&&ar.jsx("div",{"data-key":"image-subtitle",style:{fontFamily:V.fontFamily,fontSize:null!==(w=V.subtitleFontSize)&&void 0!==w?w:"11px",fontStyle:null!==(x=V.fontStyle)&&void 0!==x?x:"normal",color:null!==(k=V.color)&&void 0!==k?k:"#333333",opacity:.8,textShadow:K,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]})}):null;return ar.jsxs("div",{"data-key":"image-horizontal-container",style:{position:"relative",width:"100%",height:_?N:"100%",overflow:"hidden",display:"flex",justifyContent:_?null==D?void 0:D.horizontal:void 0,backgroundColor:a||s||void 0,borderRadius:z,border:B,opacity:f,boxSizing:"border-box"},children:[W,J]})}function Xs({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==ks(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 ar.jsx(C,{className:xs([ps.bar,n&&ps.barWithCheckbox,r&&(n?ps.barSelectedWithCheckbox:ps.barSelected)]),children:ar.jsx(C,{className:"bar-filled",width:i})})}function Ys({cell:e,checkboxes:t,dense:n,showGray:r}){const o=ks(null==e?void 0:e.qFrequency);return ar.jsx(E,{style:{display:"flex",alignItems:"center"},className:ps.frequencyCount,"aria-label":o,title:o,children:ar.jsx(x,{noWrap:!0,color:"inherit",variant:"body2",className:xs([n&&ps.labelDense,ps.labelText,r&&Ss({cell:e,checkboxes:t})&&ps.excludedTextWithCheckbox]),children:o})})}function ec({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r,isImage:o}){if("singleColumn"===e||o)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 tc=ol(E,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight","isImage"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i,isImage:a})=>{const l="padding"+("rtl"===o?"Left":"Right");let s;return!a&&r?s="8px":a&&(s=0),{[`&.${ps.fieldRoot}`]:Z(Z({},ec({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i,isImage:a})),{},{[l]:s})}});const nc=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===nc.ARROW_UP||e===nc.ARROW_DOWN||e===nc.ARROW_LEFT||e===nc.ARROW_RIGHT});function rc(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function oc(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 ic({containerRef:e,enabled:t}){const[r,o]=n(!1),i={enabled:t,active:r,innerTabStops:!t||r,blur(n){var r;if(!t)return;o(!1);const i=oc(e.current)||(null===(r=e.current)||void 0===r?void 0:r.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),rc(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;o(!0);const n=e.current,r=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"),l=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),s=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||r||i||a||s||l;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const ac=e=>+e.getAttribute("data-n"),lc=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},sc=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(),rc(e),o},cc=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},uc=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=oc(i),l=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||l)t.blur(!0);else{rc(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function dc({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:l,isModal:s,rowCount:c,columnCount:u,rowIndex:d,columnIndex:f,layoutOrder:p}){const h=(e,t,n=!1)=>{if(e===nc.ARROW_LEFT||e===nc.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const l=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let s=e,c=t;if(i===nc.ARROW_DOWN)if(e>=l(t)-1){if(t===r-1)return-1;s=0,c=t+1}else s=e+1;else if(0===e){if(0===t)return-1;s=l(t-1)-1,c=t-1}else s=e-1;if("row"===o)return s*r+c;const u=a%n;return 0===u||s<u?s*r+c:(s-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:f,rowCount:c,columnCount:u,layoutOrder:p,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:f}=c,{keyCode:p,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=f;switch(p){case nc.TAB:{const e=d.closest(".listbox-container"),t=void 0!==s?s():void 0;d.classList.add("last-focused");if(!(null!=l&&l.enabled)){if(!t)return;return l.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){lc(e)||cc(e)||(t?l.focusSelection():uc(c,l));break}l.focusSelection()||cc(e)||lc(e)||(d.blur(),uc(c,l));break}case nc.SHIFT:g(!0);break;case nc.SPACE:e([ac(d)],!1,c);break;case nc.ARROW_DOWN:case nc.ARROW_RIGHT:u=h(p,d,!0),b&&u&&(m&&(e([ac(d)],!0),g(!1)),e([ac(u)],!0));break;case nc.ARROW_UP:case nc.ARROW_LEFT:u=h(p,d,!1),b&&u&&(m&&(e([ac(d)],!0),g(!1)),e([ac(u)],!0));break;case nc.ENTER:if(r(),void 0===s)return;break;case nc.ESCAPE:if(void 0===s)return void o();if(!s())return;o();break;case nc.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case nc.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case nc.A:if(y||v){t();break}return;case nc.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const fc={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 pc(e){var t;return((null==e||null===(t=e.qListObject)||void 0===t?void 0:t.qExpressions)||[]).reduce((e,t,n)=>(e[t.qLabel]=n+1,e),{})}function hc(e,t,n,r){const o=e[t]||(e[t]={});return null!=r&&""!==r&&(o[n]=r),o[n]}function mc({index:e,rowIndex:t,columnIndex:o,style:a,data:l}){var s,u,d,f;const{onChange:p,onClick:h,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onTouchStart:y,onTouchEnd:v,pages:S,isLocked:w,column:x=!1,checkboxes:k=!1,textAlign:C,direction:L,layoutOptions:R={},freqIsAllowed:T,isSingleSelect:q,actions:P,frequencyMax:I="",histogram:_=!1,keyboard:O,showGray:D=!0,showTick:N=!0,columnCount:A=1,rowCount:j=1,dataOffset:M,deducedFrequencyMode:$,focusListItems:z,listCount:F,sizes:B,translator:W,showSearch:U,isModal:H,contentFontStyle:V,styles:G,fillHeight:K,representation:J,listExprIndex:Q={},exprCache:X={}}=l,{dense:Y=!1,dataLayout:ee="singleColumn",layoutOrder:te}=R,{itemPadding:ne,gridGap:re=0}=B,oe="image"===(null==J?void 0:J.type),ie=oe?"row":te;let ae,le;const se={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof o){"row"===ie?(ae=t*A+o,se.max=j,se.currentIndex=t):(ae=o*j+t,se.max=A,se.currentIndex=o);const e=0;le=Z(Z({},a),{},{height:K?"100%":a.height,left:e+(0===o?a.left:Number(a.left)+o*e),top:0===t?a.top:Number(a.top)+t*e}),oe&&re>0&&(le.width=Math.max(1,Number(a.width)-re),le.height=Math.max(1,Number(a.height)-re),le.left=Number(a.left)+re/2,le.top=Number(a.top)+re/2)}else ae=e,se.max=F,se.currentIndex=e,le=Z({},a);ae+=M;const[ce,ue]=n(null);r(()=>{null!==ce&&(0===se.currentIndex&&z.first&&(ce.focus(),z.setFirst(!1)),se.currentIndex===se.max-1&&z.last&&(ce.focus(),z.setLast(!1)))},[ce,z.first,z.last]);const de=c(dc(Z(Z({},P),{},{focusListItems:z,keyboard:O,isModal:H,rowCount:j,columnCount:A,rowIndex:t,columnIndex:o,layoutOrder:ie})),[P,null==O?void 0:O.innerTabStops,j,A,t,o,ie]),fe=i(()=>function({pages:e,cellIndex:t}){const n=null==e?void 0:e.find(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight);if(n){const e=n.qArea;if(t>=e.qTop&&t<e.qTop+e.qHeight)return n.qMatrix[t-e.qTop]}}({pages:S,cellIndex:ae}),[S,ae]),pe=null==fe?void 0:fe[0],he="S"===(null==pe?void 0:pe.qState)||"XS"===(null==pe?void 0:pe.qState)||"L"===(null==pe?void 0:pe.qState)||"XL"===(null==pe?void 0:pe.qState),me=i(()=>ws({column:x,histogram:_,cell:pe,showGray:D}),[null==pe?void 0:pe.qState,_,Y]),ge=c(e=>{e.preventDefault()},[k]),be=i(()=>pe&&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:L,cell:pe,textAlign:C}),[L,pe,C]);if(!pe)return null;const ye="grid"===ee&&"column"===te,ve=null!==(s=null==pe?void 0:pe.qText)&&void 0!==s?s:"",Se=oe;let we,xe,ke,Ce,Ee,Le,Re,Te,qe=1;if(Se){var Pe,Ie,_e,Oe;Le=(null==G||null===(Pe=G.selections)||void 0===Pe?void 0:Pe.selected)||"#009845","X"===pe.qState||"XS"===pe.qState||"XL"===pe.qState?qe=.3:"A"===pe.qState&&(qe=.4),Re="A"===pe.qState?"#e0e0e0":"#f0f0f0";const e=null!==(Ie=null==pe?void 0:pe.qElemNumber)&&void 0!==Ie?Ie:ve,t=t=>{var n;const r=Q[t];if(null!=r)return hc(X,t,e,null==fe||null===(n=fe[r])||void 0===n?void 0:n.qText)},n=null!==(_e=null==J?void 0:J.imageSetting)&&void 0!==_e?_e:"label",r=t("imageUrl"),o=t("imageLabel");ke=t("subtitle");if("expression"===(null!==(Oe=null==J?void 0:J.cellBgColorMode)&&void 0!==Oe?Oe:"single"))Ce=t("cellBgColor");else{const e=null==J?void 0:J.cellBgColor;Ce="string"==typeof e?e:null==e?void 0:e.color}Ee=t("tooltip")||ve,"url"===n?(we=r||ve,xe=ve):(we=ve,xe=o||ve)}if(null!==(u=pe.qHighlightRanges)&&void 0!==u&&null!==(u=u.qRanges)&&void 0!==u&&u.length){const e=pe.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];Te=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,l=t[o].qCharPos+t[o].qCharCount;return a&&l<e.length&&n.push([e.slice(l),!1]),n},[]);return n}(ve,e)}const De={alignItems:"center",display:"flex",fontSize:"8px"},Ne="rtl"===L,Ae={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:Se?0:Ne?8:k?0:void 0,paddingRight:Se||k?0:Ne?8:0,justifyContent:be,textAlign:be},je=0===e,Me=he&&w,$e=!k&&he&&!w,ze=!k&&N&&!Se,Fe=k||!N,Be=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const l=fc[n],s=e.get(l),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${s}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:W,label:Se?[ve,ke,Ee!==ve?Ee:null].filter(Boolean).join(", "):ve,qState:pe.qState,currentIndex:se.currentIndex,maxIndex:se.max,showSearch:U}),We=!Ne&&"right"===be||Ne&&"left"===be;return ar.jsx(Ps,{className:ps.barContainer,checkboxes:k,style:le,styles:G,isGridCol:ye,isGridMode:"grid"===ee,dense:Y,direction:L,sizes:B,frequencyMode:$,freqHitsValue:We,contentFontStyle:V,"data-testid":"listbox.item",children:ar.jsxs(tc,{role:"row","aria-label":Be,"aria-selected":he,"aria-setsize":se.max,"aria-rowindex":se.currentIndex,ref:ue,container:!0,dataLayout:ee,cellPaddingRight:Fe,layoutOrder:te,itemPadding:ne,isImage:Se,gap:0,className:xs(["value",ps.fieldRoot,...me]),onClick:h,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onKeyDown:de,onTouchStart:y,onTouchEnd:v,onContextMenu:ge,tabIndex:je&&O.innerTabStops?0:-1,"data-n":null==pe?void 0:pe.qElemNumber,direction:L,fillHeight:K,children:[(null==pe?void 0:pe.qFrequency)&&ar.jsx(Xs,{qFrequency:null==pe?void 0:pe.qFrequency,histogram:_,checkboxes:k,isSelected:he,frequencyMax:I}),ar.jsx(E,{style:Ae,className:xs([ps.cell,ps.selectedCell]),title:Se?`${Ee}`:`${ve}`,children:Se?ar.jsx(Zs,{representation:J,src:we,label:xe,title:ve,subtitle:ke,cellBgColor:Ce,borderColor:null==G||null===(d=G.image)||void 0===d?void 0:d.borderColor,textStyles:null==G||null===(f=G.image)||void 0===f?void 0:f.text,placeholderBackground:Re,selected:he,selectionColor:Le,opacity:qe}):Te?ar.jsx(Ws,{onChange:p,labels:Te,checkboxes:k,dense:Y,showGray:D,qElemNumber:pe.qElemNumber,isSelected:he,cell:pe,isGridCol:ye,isSingleSelect:q,valueTextAlign:be,styles:G}):ar.jsx(Us,{onChange:p,label:ve,qElemNumber:pe.qElemNumber,isSelected:he,dense:Y,cell:pe,isGridCol:ye,showGray:D,isSingleSelect:q,checkboxes:k,valueTextAlign:be,styles:G})}),T&&ar.jsx(Ys,{cell:pe,checkboxes:k,dense:Y,showGray:D}),ze&&ar.jsxs(E,{className:ps.icon,children:[Me&&ar.jsx(ns,{style:De,size:"small"}),$e&&ar.jsx(ys,{style:De,size:"small"})]})]})})}var gc=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function bc(e,t){return e===t||!(!gc(e)||!gc(t))}function yc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!bc(e[n],t[n]))return!1;return!0}function vc(e,t){var n;void 0===t&&(t=yc);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Sc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function wc(e){cancelAnimationFrame(e.id)}function xc(e,t){var n=Sc();var r={id:requestAnimationFrame(function o(){Sc()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var kc=-1;function Cc(e){if(void 0===e&&(e=!1),-1===kc||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),kc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return kc}var Ec=null;function Lc(e){if(void 0===e&&(e=!1),null===Ec||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?Ec="positive-descending":(t.scrollLeft=1,Ec=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ec}return Ec}var Rc=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Tc(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,f=e.getRowOffset,h=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,b=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,Sl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Sl(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=vc(function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})}),r._callOnScroll=void 0,r._callOnScroll=vc(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,l=a.columnWidth,s=a.direction,c=a.rowHeight,d=r._getItemStyleCache(b&&l,b&&s,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var h=n(r.props,t,r._instanceProps),m="rtl"===s;d[p]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f(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=vc(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,l=t.scrollHeight,s=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(Lc()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-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&&wc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=xc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}vl(t,e),t.getDerivedStateFromProps=function(e,t){return qc(e,t),y(e),null};var d=t.prototype;return d.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)},d.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,f=i.rowCount,p=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Cc();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,f-1)));var y=a(this.props,this._instanceProps),v=l(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?s(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},d.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()},d.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(Lc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&wc(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,f=e.itemKey,h=void 0===f?Rc:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,x=this._getHorizontalRangeToRender(),k=x[0],C=x[1],E=this._getVerticalRangeToRender(),L=E[0],R=E[1],T=[];if(r>0&&b)for(var q=L;q<=R;q++)for(var P=k;P<=C;P++)T.push(p(t,{columnIndex:P,data:d,isScrolling:v?w:void 0,key:h({columnIndex:P,data:d,rowIndex:q}),rowIndex:q,style:this._getItemStyle(q,P)}));var I=a(this.props,this._instanceProps),_=l(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:bl({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:T,ref:s,style:{height:I,pointerEvents:w?"none":void 0,width:_}}))},d._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],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,l,d,f,s,c,p,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)}},d._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,f=n||i||a||1;if(0===t||0===l)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},d._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),f=m(this.props,d,c,this._instanceProps),p=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,f+g)),d,f]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var qc=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Pc=function(e,t){return e};function Ic(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=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=s(r.props,Sl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Sl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=vc(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=vc(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,l=i.itemSize,s=i.layout,u=r._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),f=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===s,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=vc(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(Lc()){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&&wc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=xc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}vl(t,e),t.getDerivedStateFromProps=function(e,t){return _c(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 l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?Cc():0:s.scrollHeight>s.clientHeight?Cc():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},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(Lc()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&wc(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,f=void 0===d?Pc:d,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w="horizontal"===o||"horizontal"===h,x=w?this._onScrollHorizontal:this._onScrollVertical,k=this._getRangeToRender(),C=k[0],E=k[1],L=[];if(c>0)for(var R=C;R<=E;R++)L.push(p(t,{data:u,key:f(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var T=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:bl({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(l||s||"div",{children:L,ref:a,style:{height:w?"100%":T,pointerEvents:S?"none":void 0,width:w?T:"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,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),f=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var _c=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Oc=Tc({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,l=e.columnWidth,s=e.width,c=Math.max(0,a*l-s),u=Math.min(c,t*l),d=Math.max(0,t*l-s+i+l);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var f=Math.round(d+(u-d)/2);return f<Math.ceil(s/2)?0:f>c+Math.floor(s/2)?c:f;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,l=e.height,s=e.rowCount,c=Math.max(0,s*a-l),u=Math.min(c,t*a),d=Math.max(0,t*a-l+i+a);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var f=Math.round(d+(u-d)/2);return f<Math.ceil(l/2)?0:f>c+Math.floor(l/2)?c:f;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,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-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,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Dc=Ic({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,l=e.height,s=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,f="horizontal"===a||"horizontal"===u?d:l,p=Math.max(0,s*c-f),h=Math.min(p,t*c),m=Math.max(0,t*c-f+c+i);switch("smart"===n&&(n=r>=m-f&&r<=h+f?"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(f/2)?0:g>p+Math.floor(f/2)?p: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,l=e.layout,s=e.width,c=t*a,u="horizontal"===r||"horizontal"===l?s: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 Nc="#BBB",Ac="#f1f1f1",jc={styledScrollbars:"ListBox-styledScrollbars"};function Mc({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:l}){const s="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,s),u=s?n.column:n.row,d=(s?r:o)>=u,f=((e,t,n,r)=>e===t*n+r+n)(a,c,s?o:r,l),p=!!l&&((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,s),h=d&&!f&&c>=u-1||p||i.state.show;i.set(h)}const{StyledFixedSizeList:$c,StyledFixedSizeGrid:zc}=function(){const e=e=>({scrollbarColor:`${Nc} ${Ac}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ac},"&::-webkit-scrollbar-thumb":{backgroundColor:Nc,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(Dc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${jc.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:v(Oc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${jc.styledScrollbars}`]:e(t)}))}}();function Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let l;const s=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);l=!1!==e.auto?c:Math.min(n,s,c),l=Math.max(l,1);const u=Math.ceil(n/l);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:l}}const Bc=(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)},Wc=e=>{const t=i(()=>"text"in e?e:{},[e]);return i(()=>Bc(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function Uc(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Hc({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function Vc({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:l}){const{layoutOptions:s={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:f,dataLayout:p}=s,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==l?void 0:l.content)||{},g=`${h} ${m}`,b=Wc({text:Uc(e),font:g}),y=Wc({text:Uc(5),font:g}),v=Wc({text:Uc(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));let T=0;const q="grid"===p,P=null==e?void 0:e.representation,I="image"===(null==P?void 0:P.type);let _=Hc({isGridMode:q,dense:f});const O=null!=n?n:8*_;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 l;const s=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));l=!1!==(null==e?void 0:e.auto)?s:Math.min(t,i,s),l=Math.max(l,1);const c=a/l;return{rowCount:Math.ceil(t/l),columnWidth:c,columnCount:l}}({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}){const l=Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a});return l.columnWidth*l.columnCount-i>1?Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r-10,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}):l}({maxVisibleRows:u,itemHeight:_,listCount:r,listHeight:O,columnAutoWidth:R,containerWidth:e,itemMinWidth:x})))}if(I&&q){var D,N,A,j;const e=5,n=4,o=null===(D=null==d?void 0:d.auto)||void 0===D||D,i=null===(N=null==u?void 0:u.auto)||void 0===N||N,a=Math.max(1,null!==(A=o||null==d?void 0:d.maxColumns)&&void 0!==A?A:e),l=Math.max(1,null!==(j=i||null==u?void 0:u.maxRows)&&void 0!==j?j:n);C=a,E=Math.max(1,(t-10)/C),_=Math.max(36,Math.floor(O/l)),L=Math.ceil((r||1)/C),k={overflowX:"hidden"};const s=null==P?void 0:P.gridGap,c=Math.max(0,Number.isFinite(s)?s:.5);T=Math.min(Math.round(c/100*t),E-1,_-1),T=Math.max(0,T)}C=("singleColumn"===p?1:C)||1,L=("singleColumn"===p?o:L)||r;const M=s.dense?838e3:577e3;L=Math.min(L,M);const $=Math.floor(3355e4/E);C=Math.min(C,$)||1;const z=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:k,itemHeight:_,listHeight:O,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,z),maxCount:{row:M,column:$},itemPadding:4,gridGap:T,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function Gc({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[Kc]=_l({});function Jc(e){const t=`${e.id}`,[n]=Kc();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Qc=ol(x,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>Z({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function Zc({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=l(ql);return ar.jsx(L,{title:r?o.get(t):"",children:ar.jsx(Qc,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var Xc=function(t){function n(e,n){return ar.jsx(gl,{"data-testid":void 0,ref:n,...e,children:t})}return n.muiName=gl.muiName,e.memo(e.forwardRef(n))}(ar.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 Yc=ol(R)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),eu=ol("div")(()=>({paddingLeft:"6px",flexGrow:1})),tu=ol("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),nu=ol(Xc)(()=>({fontSize:"14px"}));function ru({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),l=Math.min(i,r)-42,s=n&&r<i;return ar.jsxs(Yc,{left:a,style:{maxWidth:i},children:[ar.jsx(eu,{children:ar.jsx(Zc,{text:e,dense:n,width:l,tooltip:s})}),ar.jsx(tu,{dense:n,children:o&&ar.jsx(T,{"aria-label":"close",onClick:()=>t(),children:ar.jsx(nu,{})})})]})}function ou({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 iu=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,au=e=>{const t=iu(e);return`Max(AGGR(Count(${t}), ${t}))`},lu=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[l,s]=n(o);return r(()=>{if(!o)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=au(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),s(!1)})()},[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:l}};const su={S:!0,L:!0};const cu=["isLoadingData"],uu=q("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function du({model:e,app:t,constraints:o,layout:a,selections:s,selectionState:u,direction:d,checkboxes:p,height:h,width:m,frequencyMode:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:S=!1,keyboard:w={},showGray:x=!0,scrollState:k,keyScroll:C={state:{},reset:()=>{}},currentScrollIndex:E={set:()=>{}},renderedCallback:L,onCtrlF:R,showSearch:T,isModal:q,styles:P}){var I,_,O,D,N,A,j;const{translator:M}=l(ql),[$,z]=n(!1),[F,B]=n(!1),W=!(!a||!a.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:U=p,histogram:H}=null!=a?a:{},V=f(null),G=f({queue:[],validPages:!1,dataOffset:0}),K=f({pages:[]}),J=f({}),Q=JSON.stringify(null==a||null===(I=a.qListObject)||void 0===I||null===(I=I.qDimensionInfo)||void 0===I?void 0:I.qGroupFieldDefs),Y=JSON.stringify(null==a||null===(_=a.qListObject)||void 0===_?void 0:_.qExpressions),ee=`${Q}|${Y}`,te=f(ee);te.current!==ee&&(te.current=ee,J.current={});const{frequencyMax:ne,awaitingFrequencyMax:re}=lu(t,a),oe=1+(null!==(O=null==a||null===(D=a.qListObject)||void 0===D||null===(D=D.qExpressions)||void 0===D?void 0:D.length)&&void 0!==O?O:0),ie=function({local:e,loaderRef:t,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:l,dataWidth:s=1}){const[c,u]=n(!1),[d,f]=n([]);let[p]=n(0);const h=(n,c)=>{const d=e.current.dataOffset;e.current.queue.push({start:n+d,stop:c+d});const h=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),u(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const n=e.current.queue.slice(-1)[0];if(!n)return u(!1),void t();const i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:s},{qTop:n.start,qHeight:p,qLeft:0,qWidth:s}]).then(n=>{const r=a?a(n):n;e.current.validPages=!0,l.current.pages=r,f(r),u(!1),t()});o&&o(i)},h?i:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(p=e),h)},pages:d,isLoading:c}}({local:G,loaderRef:V,model:e,fetchStart:y,scrollTimeout:0,postProcessPages:v,listData:K,dataWidth:oe}),{isLoadingData:ae}=ie,le=X(ie,cu),{getStoreValue:se,setStoreValue:ce}=Jc(e),ue=c(le.loadMoreItems,[a]),[de,fe]=n({show:!1,dismissed:!1}),pe=null==a?void 0:a.representation,he="image"===(null==pe?void 0:pe.type),me=null!==(N=null==pe?void 0:pe.showSelected)&&void 0!==N&&N,ge=function(e){var t;const[r]=n({current:e});return null!=e&&null!==(t=e.qSelectionInfo)&&void 0!==t&&t.qInSelections||(r.current=e),r.current}(a),[be,ye]=n([]),[ve,Se]=n(null),we=(()=>{const e=(null==ge?void 0:ge.qListObject.qDimensionInfo.qStateCounts)||{};return(e.qSelected||0)+(e.qLocked||0)})(),xe=he&&me&&we>0;null!=le&&le.pages&&u.update({setPages:ye,pages:le.pages,isSingleSelect:W,layout:a});const ke=null==a?void 0:a.qListObject.qDimensionInfo.qCardinal,Ce=!(he&&oe>1&&ke&&ke<=2e3)||F;(null!=le&&le.pages.length&&!re&&Ce||0===ke)&&(null==L||L()),r(()=>{if(!he||oe<=1||!ke||ke>2e3)return;let t=!1;const n=pc(a),r=Math.max(1,Math.floor(1e4/oe));return(async()=>{try{for(let o=0;o<ke&&!t;o+=r){const[i]=await e.getListObjectData("/qListObjectDef",[{qTop:o,qLeft:0,qWidth:oe,qHeight:Math.min(r,ke-o)}]);if(t)return;((null==i?void 0:i.qMatrix)||[]).forEach(e=>{var t,r,o;const i=null!==(t=null===(r=e[0])||void 0===r?void 0:r.qElemNumber)&&void 0!==t?t:null===(o=e[0])||void 0===o?void 0:o.qText;Object.entries(n).forEach(([t,n])=>{var r;hc(J.current,t,i,null===(r=e[n])||void 0===r?void 0:r.qText)})})}}catch(e){t||console.error("ListBox expression cache warm-up failed:",e)}t||B(!0)})(),()=>{t=!0}},[e,he,oe,ke,Q,Y]),r(()=>{if(!xe)return void Se(null);let t=!1;if(0!==we)return(async()=>{try{const[n]=await e.getListObjectData("/qListObjectDef",[{qTop:0,qLeft:0,qWidth:oe,qHeight:we}]);if(!t){const e=pc(ge);((null==n?void 0:n.qMatrix)||[]).forEach(t=>{var n,r,o;const i=null!==(n=null===(r=t[0])||void 0===r?void 0:r.qElemNumber)&&void 0!==n?n:null===(o=t[0])||void 0===o?void 0:o.qText;Object.entries(e).forEach(([e,n])=>{var r;hc(J.current,e,i,null===(r=t[n])||void 0===r?void 0:r.qText)})}),Se(n||null)}}catch(e){t||(console.error("ListBox selected values fetch failed:",e),Se(null))}})(),()=>{t=!0};Se(null)},[xe,ge,we,oe,e]),r(()=>{xe&&(G.current.dataOffset=0)},[xe]);const Ee=i(()=>{if(!xe)return be;return function(e,t){const n=[],r=new Set;return(e||[]).forEach(e=>{((null==e?void 0:e.qMatrix)||[]).forEach(e=>{var t;const o=null==e?void 0:e[0];if(!o||!su[o.qState])return;const i=null!==(t=o.qElemNumber)&&void 0!==t?t:o.qText;r.has(i)||(r.add(i),n.push(e))})}),[{qArea:{qLeft:0,qTop:0,qWidth:t,qHeight:n.length},qMatrix:n}]}(ve?[ve,...be]:be,oe)},[xe,be,ve,oe]),Le=xe?Ee[0].qMatrix.length:void 0,Re=c(e=>{if(null==Ee||!Ee.length||!G.current.validPages)return!1;G.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Ee.filter(e=>t(e))[0];return n&&t(n)},[a,Ee]),{interactionEvents:Te,select:qe}=gs({selectionState:u,selections:s,checkboxes:U,doc:document,loaderRef:V}),{layoutOptions:Pe={}}=a||{};let Ie=!0;Pe.dataLayout&&(Ie=!("singleColumn"!==Pe.dataLayout&&!he)||"row"===(null==Pe?void 0:Pe.layoutOrder));const _e="grid"===(null==Pe?void 0:Pe.dataLayout),Oe=e=>{const t=Z({},Ie?{rowIndex:e}:{columnIndex:e}),n=_e?t:e;V.current._listRef.scrollToItem(n)},De=()=>{if(G.current.queue=[],G.current.validPages=!1,V.current){V.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===C.state.scrollPosition;if(a&&a.qSelectionInfo.qInSelections||e)return void(e&&C.reset());G.current.dataOffset=0,Oe(0)}};b&&b.call(null,De),r(()=>{k&&!$&&V.current&&(V.current._listRef.scrollToItem(k.initScrollPos),z(!0))},[V.current]),r(()=>{De()},[a,G.current.dataOffset]);let Ne=100;const Ae="grid"!==Pe.dataLayout,je=xe?Le:null==a||null===(A=a.qListObject.qSize)||void 0===A?void 0:A.qcy,Me=xe?Le:Gc({pages:be,minimumBatchSize:Ne,count:je,calculatePagesHeight:S});let $e=ou({itemWidth:m,layout:a,frequencyMode:g});const ze=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(Ee),Fe=Vc({layout:a,width:m,height:h,listCount:Me,count:je,freqIsAllowed:$e,checkboxes:U,styles:P});Fe.columnWidth&&($e=ou({itemWidth:Fe.columnWidth,layout:a,frequencyMode:g}));const{listCount:Be}=Fe;ce("listCount",Be);const We=se("inputText"),Ue=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=l(ql),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:a,searchInputText:We,listCount:Be}),He=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,l=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":l=0,i=0,a=!0;break;case"overflowEnd":l=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:l,triggerRerender:a}}({position:e,isRow:Ie,sizes:Fe,layout:a,offset:G.current.dataOffset});G.current.dataOffset=n,r&&u.triggerStateChanged(),Oe(t)};r(()=>{const e=C.state;e.up?Oe(E.state.start-e.up):e.down?Oe(E.state.stop+e.down):e.scrollPosition&&He(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&C.reset()},[C.state.up,C.state.down,C.state.scrollPosition]);const{textAlign:Ve}=(null==a?void 0:a.qListObject.qDimensionInfo)||{},[Ge,Ke]=n({first:!1,last:!1}),{List:Je,Grid:Qe}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:l,deducedFrequencyMode:s,histogram:c,isSingleSelect:u,select:d,selectAll:f,onCtrlF:p,textAlign:h,selections:m,keyboard:g,showGray:b,scrollState:y,direction:v,sizes:S,listCount:w,overflowDisclaimer:x,setScrollPosition:k,focusListItems:C,setCurrentScrollIndex:E,constraints:L,frequencyMax:R,freqIsAllowed:T,translator:q,showSearch:P,isModal:I,styles:_,exprCache:O}){const{layoutOptions:D={}}=e||{},{columnWidth:N,listHeight:A,itemHeight:j,rowCount:M,columnCount:$}=S||{},z=null==e?void 0:e.representation,F=pc(e),B=("grid"===D.dataLayout?N:t)>80,W={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:jc.styledScrollbars},U=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,H=A<=j,V=Z(Z({isLocked:U,column:!o,pages:i},U||a.selectDisabled()?{}:l),{},{checkboxes:n,layoutOptions:D,deducedFrequencyMode:s,freqIsAllowed:T,isSingleSelect:u,textAlign:h,sizes:S,representation:z,listExprIndex:F,exprCache:O,actions:{select:d,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m),setScrollPosition:k,selectAll:f,onCtrlF:p},frequencyMax:R,histogram:c,keyboard:g,showGray:b,showTick:B,dataOffset:r.current.dataOffset,focusListItems:C,direction:v,translator:q,showSearch:P,isModal:I,styles:_,fillHeight:H});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,ar.jsx($c,Z(Z({},W),{},{dataTestid:"fixed-size-list",scrollDisabled:null==L?void 0:L.active,height:A,width:t,itemCount:w,itemData:Z(Z({},V),{},{listCount:w}),itemSize:j,onItemsRendered:t=>{var o;E({start:t.visibleStartIndex,stop:t.visibleStopIndex}),y&&y.setScrollPos(t.visibleStopIndex),Mc({renderProps:t,layoutOptions:D,maxCount:S.maxCount,columnCount:$,rowCount:M,overflowDisclaimer:x,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(Z({},t))},ref:o,children:mc}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=S,{layoutOrder:l}=D||{},s="image"===(null==z?void 0:z.type)?"row":l,c=Math.min(A,M*j+a);return r.current.listRef=o,ar.jsx(zc,Z(Z({},W),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==L?void 0:L.active,height:c,width:t,columnCount:$,columnWidth:N,rowCount:M,rowHeight:j,style:Z({},i),itemData:Z(Z({},V),{},{column:void 0,columnCount:$,rowCount:M}),onItemsRendered:t=>{var o;const i="row"===s;E({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:l,overscanColumnStartIndex:s,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,f,p,h;return n&&n.setScrollPos(u),"column"===r?(d=s*o,f=a,p=c*o,h=l):(d=s,f=a*i,p=c,h=l*i),{visibleStartIndex:d+f,visibleStopIndex:p+h}}({renderProps:t,scrollState:y,layoutOrder:s,rowCount:M,columnCount:$});Mc({renderProps:t,layoutOptions:D,maxCount:S.maxCount,columnCount:$,rowCount:M,overflowDisclaimer:x,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:mc}))}}}({direction:d,layout:a,width:m,checkboxes:U,deducedFrequencyMode:ze,histogram:H,keyboard:w,showGray:x,interactionEvents:Te,select:qe,selectAll:()=>{u.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:R,textAlign:Ve,isVertical:Ae,pages:Ee,selectionState:u,isSingleSelect:W,selections:s,scrollState:k,local:G,sizes:Fe,listCount:Be,overflowDisclaimer:{state:de,set:e=>fe(t=>Z(Z({},t),{},{show:e}))},setScrollPosition:He,focusListItems:{first:Ge.first,setFirst:e=>Ke(t=>Z(Z({},t),{},{first:e})),last:Ge.last,setLast:e=>Ke(t=>Z(Z({},t),{},{last:e}))},setCurrentScrollIndex:E.set,constraints:o,frequencyMax:ne,freqIsAllowed:$e,translator:M,showSearch:T,isModal:q,styles:P,exprCache:J.current}),{columnWidth:Ze,listHeight:Xe,itemHeight:Ye}=Fe||{};return Ae||(Ne=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:m,columnWidth:Ze,listHeight:Xe,itemHeight:Ye})),ar.jsxs(uu,{children:[ar.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:Ue}),!Be&&ke>0&&ar.jsx(Zc,{width:m,text:"Listbox.NoMatchesForYourTerms"}),ar.jsx(ls,{isItemLoaded:Re,itemCount:Be||1,loadMoreItems:ue.with({minimumBatchSize:Ne}),threshold:0,minimumBatchSize:Ne,ref:V,role:"grid",children:Ae?Je:Qe}),de.show&&!de.dismissed&&ar.jsx(ru,{text:"Listbox.ItemsOverflow",dismiss:()=>fe(e=>Z(Z({},e),{},{dismissed:!0})),parentWidth:null==V||null===(j=V.current)||void 0===j||null===(j=j._listRef)||void 0===j||null===(j=j.props)||void 0===j?void 0:j.width,dense:null==Pe?void 0:Pe.dense})]})}const fu=e=>Z(Z({},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"}}]}),pu=e=>Z(Z({},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"}}]}),hu=e=>Z(Z({},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"}}]}),mu=e=>Z(Z({},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 gu=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",l=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:fu,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:hu,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:pu,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:mu,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const bu=e=>Z(Z({},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 yu(e){const t=rl(),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 vu={className:"njs-cell-action"},Su=t.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=rl(),{hidden:o,disabled:i,style:a,hasSvgIconShape:l}=yu(e);if(o)return null;const s=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,f=`actions-toolbar-${e.key}`,p=e.ref||(t?null:n);return ar.jsxs(T,{ref:p,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[vu.className,f].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":f,children:[l&&es(e.getSvgIconShape()),t&&ar.jsx("div",{ref:n,style:{bottom:-s,right:0,position:"absolute",width:"100%",height:0}})]})}),wu=e=>Z(Z({},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 xu=e=>es(wu(e));const ku=e=>Z(Z({},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 Cu=e=>es(ku(e));const Eu="njs-action-toolbar-more",Lu={icon:"More-icon"},Ru=ol(P)(({theme:e})=>({pointerEvents:"none",[`& .${Lu.icon} *`]:{color:e.palette.text.primary}}));function Tu({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=yu(e);return r?null:ar.jsxs(_,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&ar.jsx(O,{className:Lu.icon,children:es(e.getSvgIconShape())}),ar.jsx(x,{noWrap:!0,children:e.label})]})}const qu=t.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},l)=>{const s=e.length>0,c=e.findIndex(e=>!e.disabled);return s&&ar.jsx(Ru,Z(Z({},r),{},{onClose:i,ref:l,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:Eu},paper:{style:Z({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:ar.jsx(I,{id:"moreMenuList",children:e.map((e,t)=>ar.jsx(Tu,{item:e,autoFocus:t===c,onActionClick:i},t))})}))});function Pu({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:l}=i,{keyCode:s}=l;switch(s){case nc.ARROW_LEFT:case nc.ARROW_DOWN:case nc.ARROW_RIGHT:case nc.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=[nc.ARROW_LEFT,nc.ARROW_DOWN].includes(s);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 nc.SPACE:i.preventDefault();break;case nc.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 nc.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const Iu="ActionsToolbar",_u={item:`${Iu}-item`,itemSpacing:`${Iu}-itemSpacing`},Ou=ol(P)(({theme:e})=>({[`& .${_u.itemSpacing}`]:{padding:e.spacing(0,.25)}})),Du="njs-action-toolbar-popover",Nu=t.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?ar.jsx(E,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>ar.jsx(E,{className:`${_u.itemSpacing} ${_u.item}`,children:ar.jsx(Su,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),Au={pointerEvents:"none"};function ju({show:e=!0,actions:t=[],maxItems:o=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:s,more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:h,autoConfirm:m=!1,layout:g}){var b,y;const v=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=l(ql);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:ku},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:wu},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:bs}]}(Z(Z({},a),{},{layout:g})),{translator:S,keyboardNavigation:w}=l(ql),[x,k]=n(!1),C={vertical:12,horizontal:h?0:(null!==(b=null===(y=u.anchorEl)||void 0===y?void 0:y.clientWidth)&&void 0!==b?b:0)-7},L={vertical:"bottom",horizontal:h?-7:"right"},R=f(),T=f(),q=rl(),P=i(()=>({margin:q.spacing(.5,0)})),I=e=>{const t=R.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},_=i(()=>Pu({keyboardNavigation:w,focusHandler:d,getEnabledButton:I,selections:a,isRtl:h}),[w,d,I,a,h]);if(r(()=>()=>{k(!1)},[u.show,e,a.show]),r(()=>{if(!d)return;d.on("focus_toolbar_first",()=>{const e=I(!1);null==e||e.focus()}),d.on("focus_toolbar_last",()=>{const e=I(!0);null==e||e.focus()})},[]),m)return;let O=c.enabled,N=c.actions;const A=c.alignTo||T,j=t.filter(e=>!e.hidden);if(j.length>o){const e=j.splice(-(j.length-o)-1);O=!0,N=[...e,...c.actions]}if(!a.show&&0===j.length&&!O)return null;const M={key:"more",label:S.get("Menu.More"),getSvgIconShape:bu,hidden:!1,active:x,enabled:()=>O,action:()=>k(!x)},$=j.length>0,z=N.length>0,F=$&&a.show||z&&a.show,B=ar.jsxs(E,{ref:R,onKeyDown:_,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:h?"row-reverse":"row"},children:[(null==s?void 0:s.length)&&ar.jsx(Nu,{className:"actions-toolbar-extra-actions",actions:s,isRtl:h}),$&&ar.jsx(Nu,{actions:j}),z&&ar.jsx(Nu,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,actions:[M],addAnchor:!0}),F&&ar.jsx(E,{className:_u.itemSpacing,style:P,children:ar.jsx(D,{orientation:"vertical"})}),a.show&&ar.jsx(Nu,{className:"actions-toolbar-default-actions",actions:v,isRtl:h}),x&&ar.jsx(qu,{show:x,actions:N,alignTo:A,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{k(!1)},disablePortal:c.disablePortal})]});return u.show?ar.jsx(Ou,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:C,transformOrigin:L,hideBackdrop:!0,style:Au,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Du,style:{pointerEvents:"auto",padding:q.spacing(.5,.25)}}},children:B}):e&&B}var Mu=e=>es((e=>Z(Z({},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 $u="/qListObjectDef",zu=e=>null==e?void 0:e.substring(0,64e3),Fu=ol(N,{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"}}),Z({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":Z({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),Bu=ol(T)(()=>({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 Wu=o(function({popoverOpen:e,selections:t,selectionState:o,model:i,keyboard:s,dense:c=!1,visible:u=!0,autoFocus:d=!0,beginSelectionOnFocus:p=!0,wildCardSearch:h=!1,searchEnabled:m,direction:g,hide:b,styles:y},v){const{translator:S}=l(ql),[w,x]=n(""),[k,C]=n(!1),E=f(),L=f(),R=S.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:q}=Jc(i),P="rtl"===g,I=async()=>{try{await i.abortListObjectSearch($u)}finally{x("")}};r(()=>u?()=>I():()=>{},[u]),r(()=>(t.on("deactivated",I),()=>{t.removeListener&&t.removeListener("deactivated",I)}),[]),r(()=>{if(k&&E.current){const e=w.length-1;E.current.setSelectionRange(e,e),C(!1)}},[k,E.current]),r(()=>{q("inputText",w)},[w]);const _=async()=>{let e;const n=zu(w),r=await i.searchListObjectFor($u,n);return o.selectDisabled()?r:(r&&n.length&&T("listCount")>0&&(e=i.acceptListObjectSearch($u,!0),t.selectionsMade=!0,o.clearItemStates(!1),x("")),e)},O=()=>{var e;null===(e=E.current)||void 0===e||e.focus()},D=()=>{I(),O()};return a(v,()=>({focus(){O()}})),u&&!1!==m?ar.jsxs(ar.Fragment,{children:[ar.jsx(Fu,{styles:y,dense:c,isRtl:P,startAdornment:ar.jsx(A,{position:"start",sx:{marginLeft:c?"8px":"9px"},children:ar.jsx(Mu,{size:c?"small":"normal"})}),endAdornment:ar.jsx(A,{position:"end",sx:{marginLeft:0},children:""!==w&&ar.jsx(Bu,{tabIndex:0,ref:L,title:R,"aria-label":R,onClick:D,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Tab":e.shiftKey?O():sc(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:ar.jsx(xu,{size:c?"small":"normal"})})}),className:"search",inputRef:E,size:"small",fullWidth:!0,placeholder:S.get("Listbox.Search"),value:w,onFocus:()=>{h&&(x("**"),C(!0)),p&&!o.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=zu(e.target.value);return x(t),t.length?i.searchListObjectFor($u,t):I()},onKeyDown:async n=>{const{currentTarget:r}=n,o=r.closest(".listbox-container");switch(n.key){case"Enter":_();break;case"Escape":if(sc(o),t.cancel(),e)return;break;case"Tab":n.shiftKey?cc(o)||s.focusSelection():L.current?L.current.focus():sc(o);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;b&&(b(),sc(o));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:d,inputProps:{tabIndex:s.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":S.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),ar.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:S.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function Uu(e){if(!e.session)return[];const{selectionStore:t}=l(ql),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r(()=>{e&&!i&&(i=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:l})=>{var s;if(l===(null===(s=r.get(n))||void 0===s?void 0:s.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:l});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:l})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const l={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 l}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))},[e]),[i]}function Hu(e){return Object.keys(me.prototype).forEach(t=>{e[t]=me.prototype[t]}),me.init(e),e}const Vu=({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 Hu(a),a},Gu=({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 Ku(e,t,o,i){const a=Array.isArray(o)?o:[o],[s]=Uu(e),[c]=Fl(t),{appModalStore:u}=l(ql).selectionStore,d=u.get(e.id),[f,p]=n();return r(()=>{s&&t&&!f&&p(Vu({appSelections:s,appModal:d,model:t}))},[s,t]),r(()=>{if(!f)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Gu({elements:a,objectSelections:f,options:i});return f.addListener("activated",e),f.addListener("deactivated",t),()=>{f.isActive()&&f.confirm(),f.removeListener("activated",e),f.removeListener("deactivated",t)}},[f]),r(()=>{f&&f.setLayout(c)},[f,c]),[f]}function Ju(e={}){const t=Z(Z({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,l;this.setPages=e;const s=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;s&&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=us(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(l=i.qListObject)||void 0===l||null===(l=l.qDimensionInfo)||void 0===l?void 0:l.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[Z(Z({},n),{},{qState:r}),...e.slice(1)]});return Z(Z({},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 Qu=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Zu(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Qu(t,"qSelected",0)+Qu(t,"qSelectedExcluded",0)+Qu(t,"qLocked",0)+Qu(t,"qLockedExcluded",0)>0}function Xu(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 Yu(e){if("object"==typeof e&&Xu(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 ed={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}},td="qcm-color";function nd(...e){const t={type:td,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===td)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Xu(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 l;if(l=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(l[1],10),r=parseInt(l[2],10),o=parseInt(l[3],10);else if(l=/^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(l[1],10),r=parseInt(l[2],10),o=parseInt(l[3],10),i=parseFloat(l[4]);else if(l=/^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(l[1],10)/255,n=parseInt(l[2],10),r=parseInt(l[3],10),o=parseInt(l[4],10);else if(l=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(l[1],16),r=parseInt(l[2],16),o=parseInt(l[3],16),i=1;else if(l=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(l[1]+l[1],16),r=parseInt(l[2]+l[2],16),o=parseInt(l[3]+l[3],16),i=1;else if(l=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[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 s=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-.5*s;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(l=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[5]);i=parseFloat(l[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 s=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-.5*s;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(l=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[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 s=a*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-s;n=d[0]+f,r=d[1]+f,o=d[2]+f,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 ed}(e)){const t=ed[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 rd(e){let t,n,r;if(Xu(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?Yu(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 od(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,{a:s}=o,c=Math.max(i,a,l),u=Math.min(i,a,l),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-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:s}}function id(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),c=Math.min(i,a,l),u=s;if(s===c)t=0,r=0;else{switch(n=s-c,t=0===n?0:n/u,s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function ad(e){if(Xu(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?Yu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function ld(e,t){return Xu(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:ld(nd(e))}function sd(e){return Xu(e)?1===e.a?ad(e):ld(e):sd(nd(e))}const cd=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function ud(e){return.2126*cd(e.r)+.7152*cd(e.g)+.0722*cd(e.b)}function dd(...e){const t=nd(...e);return t.invalid||ud(t)<.4}function fd(...e){const t=nd(...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=od(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=nd(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:()=>dd(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=ad(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=ld(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=sd(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=rd(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),c=Math.min(i,a,l),u=(s+c)/2;if(s===c)t=0,r=0;else{switch(n=s-c,t=u>.5?n/(2-s-c):n/(s+c),s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l: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}=od(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}=id(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=id(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)=>fd(o(18*e)),getDarkenedColor:(e=1)=>fd(o(18*-e))}}function pd(e,t){if(!e||!t)return;const n=ud(e),r=ud(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const hd="#FFFFFF";function md(e,t){const n=fd(hd),r=fd(e),o=fd(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=pd(n,r),a=pd(o,r),l=i>a||i>4.5;return!l&&a>3?o.getHex():l?hd:"#000000"}function gd(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 bd,yd,vd,Sd="top",wd="top-right",xd="right",kd="bottom-right",Cd="bottom",Ed="bottom-left",Ld="left",Rd="top-left";gd(gd(gd(gd(gd(gd(gd(gd(gd(gd(bd={},"equal-equal",[Sd,Cd]),"equal-higher",[Cd,kd]),"equal-lower",[Sd,wd]),"equal-void",[Sd,Cd]),"higher-equal",[Ld,Ed,Sd,wd]),"higher-higher-acute",[Cd,Ed,Ld,wd]),"higher-higher-obtuse",[Cd,Sd]),"higher-lower-negative",[Sd,wd,xd]),"higher-lower-positive",[Cd,Ed,Ld]),"higher-void",[Sd]),gd(gd(gd(gd(gd(gd(gd(gd(gd(gd(bd,"lower-equal",[Sd]),"lower-higher-negative",[Sd,Rd]),"lower-higher-positive",[kd]),"lower-lower-acute",[Sd,Rd,Ld,wd,xd]),"lower-lower-obtuse",[Sd,Cd]),"lower-void",[Sd]),"void-equal",[Sd]),"void-higher",[Sd,Cd]),"void-lower",[Sd,Cd,Ld]),"void-void",[Sd]),gd(bd,"unclassified",[Sd,Cd,xd,Ld,wd,kd,Ed,Rd]);var Td=function(){if(vd)return yd;vd=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return yd=function e(){var t,n,r,s,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},yd}();function qd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Id(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Td);var _d=.7,Od=1/_d,Dd="\\s*([+-]?\\d+)\\s*",Nd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ad="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jd=/^#([0-9a-f]{3,8})$/,Md=new RegExp(`^rgb\\(${Dd},${Dd},${Dd}\\)$`),$d=new RegExp(`^rgb\\(${Ad},${Ad},${Ad}\\)$`),zd=new RegExp(`^rgba\\(${Dd},${Dd},${Dd},${Nd}\\)$`),Fd=new RegExp(`^rgba\\(${Ad},${Ad},${Ad},${Nd}\\)$`),Bd=new RegExp(`^hsl\\(${Nd},${Ad},${Ad}\\)$`),Wd=new RegExp(`^hsla\\(${Nd},${Ad},${Ad},${Nd}\\)$`),Ud={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 Hd(){return this.rgb().formatHex()}function Vd(){return this.rgb().formatRgb()}function Gd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Kd(t):3===n?new Xd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Jd(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Jd(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=Md.exec(e))?new Xd(t[1],t[2],t[3],1):(t=$d.exec(e))?new Xd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=zd.exec(e))?Jd(t[1],t[2],t[3],t[4]):(t=Fd.exec(e))?Jd(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bd.exec(e))?of(t[1],t[2]/100,t[3]/100,1):(t=Wd.exec(e))?of(t[1],t[2]/100,t[3]/100,t[4]):Ud.hasOwnProperty(e)?Kd(Ud[e]):"transparent"===e?new Xd(NaN,NaN,NaN,0):null}function Kd(e){return new Xd(e>>16&255,e>>8&255,255&e,1)}function Jd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xd(e,t,n,r)}function Qd(e){return e instanceof Id||(e=Gd(e)),e?new Xd((e=e.rgb()).r,e.g,e.b,e.opacity):new Xd}function Zd(e,t,n,r){return 1===arguments.length?Qd(e):new Xd(e,t,n,null==r?1:r)}function Xd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Yd(){return`#${rf(this.r)}${rf(this.g)}${rf(this.b)}`}function ef(){const e=tf(this.opacity);return`${1===e?"rgb(":"rgba("}${nf(this.r)}, ${nf(this.g)}, ${nf(this.b)}${1===e?")":`, ${e})`}`}function tf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rf(e){return((e=nf(e))<16?"0":"")+e.toString(16)}function of(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lf(e,t,n,r)}function af(e){if(e instanceof lf)return new lf(e.h,e.s,e.l,e.opacity);if(e instanceof Id||(e=Gd(e)),!e)return new lf;if(e instanceof lf)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new lf(a,l,s,e.opacity)}function lf(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function sf(e){return(e=(e||0)%360)<0?e+360:e}function cf(e){return Math.max(0,Math.min(1,e||0))}function uf(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}qd(Id,Gd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hd,formatHex:Hd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return af(this).formatHsl()},formatRgb:Vd,toString:Vd}),qd(Xd,Zd,Pd(Id,{brighter(e){return e=null==e?Od:Math.pow(Od,e),new Xd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?_d:Math.pow(_d,e),new Xd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xd(nf(this.r),nf(this.g),nf(this.b),tf(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:Yd,formatHex:Yd,formatHex8:function(){return`#${rf(this.r)}${rf(this.g)}${rf(this.b)}${rf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ef,toString:ef})),qd(lf,function(e,t,n,r){return 1===arguments.length?af(e):new lf(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return e=null==e?Od:Math.pow(Od,e),new lf(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?_d:Math.pow(_d,e),new lf(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 Xd(uf(e>=240?e-240:e+120,o,r),uf(e,o,r),uf(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new lf(sf(this.h),cf(this.s),cf(this.l),tf(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=tf(this.opacity);return`${1===e?"hsl(":"hsla("}${sf(this.h)}, ${100*cf(this.s)}%, ${100*cf(this.l)}%${1===e?")":`, ${e})`}`}}));const df=Math.PI/180,ff=180/Math.PI,pf=.96422,hf=.82521,mf=4/29,gf=6/29,bf=3*gf*gf,yf=gf*gf*gf;function vf(e){if(e instanceof Sf)return new Sf(e.l,e.a,e.b,e.opacity);if(e instanceof Ef)return Lf(e);e instanceof Xd||(e=Qd(e));var t,n,r=Cf(e.r),o=Cf(e.g),i=Cf(e.b),a=wf((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=wf((.4360747*r+.3850649*o+.1430804*i)/pf),n=wf((.0139322*r+.0971045*o+.7141733*i)/hf)),new Sf(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Sf(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function wf(e){return e>yf?Math.pow(e,1/3):e/bf+mf}function xf(e){return e>gf?e*e*e:bf*(e-mf)}function kf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Cf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ef(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Lf(e){if(isNaN(e.h))return new Sf(e.l,0,0,e.opacity);var t=e.h*df;return new Sf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}qd(Sf,function(e,t,n,r){return 1===arguments.length?vf(e):new Sf(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return new Sf(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Sf(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 Xd(kf(3.1338561*(t=pf*xf(t))-1.6168667*(e=1*xf(e))-.4906146*(n=hf*xf(n))),kf(-.9787684*t+1.9161415*e+.033454*n),kf(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),qd(Ef,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ef)return new Ef(e.h,e.c,e.l,e.opacity);if(e instanceof Sf||(e=vf(e)),0===e.a&&0===e.b)return new Ef(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ff;return new Ef(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ef(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return new Ef(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ef(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Lf(this).rgb()}}));var Rf=e=>()=>e;function Tf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Rf(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?Tf: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):Rf(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Zd(e)).r,(t=Zd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Tf(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 qf,Pf="center",If="bottom";function _f(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 Of(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Nf)):void 0===t&&(t=Df);for(var n,r,o,i,a,l=new Mf(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new Mf(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(jf)}function Df(e){return e.children}function Nf(e){return Array.isArray(e)?e[1]:null}function Af(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function jf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Mf(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Pf,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:Pf,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:Pf,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:Pf},{key:"DataRangeIncludingZero",alignment:If},{key:"LimitedData",alignment:If},{key:"NegativeOrZeroValues",alignment:If}].reduce(function(e,t){return e[t.key]=t,e},{}),Mf.prototype=Of.prototype={constructor:Mf,count:function(){return this.eachAfter(_f)},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],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=l.pop();)e.call(t,i,++s,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 Of(this).eachBefore(Af)},[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)}},qf=function(e){
|
|
23
|
+
*/const fr=[];function pr(e){return fr[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Zt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Qt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Qt(n,t,e[a]),r&&(o+=i[a]);Xt.lastIndex=0;for(var l,s="";null!==(l=Xt.exec(o));)s+="-"+l[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:c,styles:o,next:Zt}}(fr)}var hr,mr,gr={exports:{}},br={};function yr(){if(hr)return br;hr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case o:case r:case s:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case l:case d:case u:case i:return p;default:return h}}case t:return h}}}return br.ContextConsumer=i,br.ContextProvider=a,br.Element=e,br.ForwardRef=l,br.Fragment=n,br.Lazy=d,br.Memo=u,br.Portal=t,br.Profiler=o,br.StrictMode=r,br.Suspense=s,br.SuspenseList=c,br.isContextConsumer=function(e){return h(e)===i},br.isContextProvider=function(e){return h(e)===a},br.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},br.isForwardRef=function(e){return h(e)===l},br.isFragment=function(e){return h(e)===n},br.isLazy=function(e){return h(e)===d},br.isMemo=function(e){return h(e)===u},br.isPortal=function(e){return h(e)===t},br.isProfiler=function(e){return h(e)===o},br.isStrictMode=function(e){return h(e)===r},br.isSuspense=function(e){return h(e)===s},br.isSuspenseList=function(e){return h(e)===c},br.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===s||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===l||e.$$typeof===p||void 0!==e.getModuleId)},br.typeOf=h,br}function vr(){return mr||(mr=1,gr.exports=yr()),gr.exports}var Sr=vr();function wr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function xr(t){if(e.isValidElement(t)||Sr.isValidElementType(t)||!wr(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=xr(t[e])}),n}function kr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return wr(t)&&wr(n)&&Object.keys(n).forEach(i=>{e.isValidElement(n[i])||Sr.isValidElementType(n[i])?o[i]=n[i]:wr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&wr(t[i])?o[i]=kr(t[i],n[i],r):r.clone?o[i]=wr(n[i])?xr(n[i]):n[i]:o[i]=n[i]}),o}function Cr(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(i);function l(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:l,down:s,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):l(e)},not:function(e){const t=a.indexOf(e);return 0===t?l(a[1]):t===a.length-1?s(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}function Er(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const Lr={borderRadius:4};function Rr(e,t){return t?kr(e,t,{clone:!1}):e}const Tr={xs:0,sm:600,md:900,lg:1200,xl:1536},qr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Tr[e]}px)`},Pr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Tr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ir(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||qr;return t.reduce((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){const e=r.breakpoints||qr;return Object.keys(t).reduce((o,i)=>{if(a=e.keys,"@"===(l=i)||l.startsWith("@")&&(a.some(e=>l.startsWith(`@${e}`))||l.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Pr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Tr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,l;return o},{})}return n(t)}function _r(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Or(e){if("string"!=typeof e)throw new Error(zt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Dr(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function Nr(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Dr(e,n)||r,t&&(o=t(o,r,e)),o}function Ar(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Dr(e.theme,r)||{};return Ir(e,i,e=>{let r=Nr(a,o,e);return e===r&&"string"==typeof e&&(r=Nr(a,o,`${t}${"default"===e?"":Or(e)}`,e)),!1===n?r:{[n]:r}})};return i.propTypes={},i.filterProps=[t],i}const jr={m:"margin",p:"padding"},Mr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$r={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},zr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!$r[e])return[e];e=$r[e]}const[t,n]=e.split(""),r=jr[t],o=Mr[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]}),Fr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Br=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Wr(e,t,n,r){const o=Dr(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof o?o:()=>{}}function Ur(e){return Wr(e,"spacing",8)}function Hr(e,t){return"string"==typeof t||null==t?t:e(t)}function Vr(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Hr(t,n),e),{})}(zr(n),r);return Ir(e,e[n],o)}function Gr(e,t){const n=Ur(e.theme);return Object.keys(e).map(r=>Vr(e,t,r,n)).reduce(Rr,{})}function Kr(e){return Gr(e,Fr)}function Jr(e){return Gr(e,Br)}function Qr(e=8,t=Ur({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}function Zr(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Rr(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Xr(e){return"number"!=typeof e?e:`${e}px solid`}function Yr(e,t){return Ar({prop:e,themeKey:"borders",transform:t})}Kr.propTypes={},Kr.filterProps=Fr,Jr.propTypes={},Jr.filterProps=Br;const eo=Yr("border",Xr),to=Yr("borderTop",Xr),no=Yr("borderRight",Xr),ro=Yr("borderBottom",Xr),oo=Yr("borderLeft",Xr),io=Yr("borderColor"),ao=Yr("borderTopColor"),lo=Yr("borderRightColor"),so=Yr("borderBottomColor"),co=Yr("borderLeftColor"),uo=Yr("outline",Xr),fo=Yr("outlineColor"),po=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Wr(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Hr(t,e)});return Ir(e,e.borderRadius,n)}return null};po.propTypes={},po.filterProps=["borderRadius"],Zr(eo,to,no,ro,oo,io,ao,lo,so,co,po,uo,fo);const ho=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Wr(e.theme,"spacing",8),n=e=>({gap:Hr(t,e)});return Ir(e,e.gap,n)}return null};ho.propTypes={},ho.filterProps=["gap"];const mo=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Wr(e.theme,"spacing",8),n=e=>({columnGap:Hr(t,e)});return Ir(e,e.columnGap,n)}return null};mo.propTypes={},mo.filterProps=["columnGap"];const go=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Wr(e.theme,"spacing",8),n=e=>({rowGap:Hr(t,e)});return Ir(e,e.rowGap,n)}return null};go.propTypes={},go.filterProps=["rowGap"];function bo(e,t){return"grey"===t?t:e}Zr(ho,mo,go,Ar({prop:"gridColumn"}),Ar({prop:"gridRow"}),Ar({prop:"gridAutoFlow"}),Ar({prop:"gridAutoColumns"}),Ar({prop:"gridAutoRows"}),Ar({prop:"gridTemplateColumns"}),Ar({prop:"gridTemplateRows"}),Ar({prop:"gridTemplateAreas"}),Ar({prop:"gridArea"}));function yo(e){return e<=1&&0!==e?100*e+"%":e}Zr(Ar({prop:"color",themeKey:"palette",transform:bo}),Ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:bo}),Ar({prop:"backgroundColor",themeKey:"palette",transform:bo}));const vo=Ar({prop:"width",transform:yo}),So=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Tr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:yo(t)}};return Ir(e,e.maxWidth,t)}return null};So.filterProps=["maxWidth"];const wo=Ar({prop:"minWidth",transform:yo}),xo=Ar({prop:"height",transform:yo}),ko=Ar({prop:"maxHeight",transform:yo}),Co=Ar({prop:"minHeight",transform:yo});Ar({prop:"size",cssProperty:"width",transform:yo}),Ar({prop:"size",cssProperty:"height",transform:yo});Zr(vo,So,wo,xo,ko,Co,Ar({prop:"boxSizing"}));const Eo={border:{themeKey:"borders",transform:Xr},borderTop:{themeKey:"borders",transform:Xr},borderRight:{themeKey:"borders",transform:Xr},borderBottom:{themeKey:"borders",transform:Xr},borderLeft:{themeKey:"borders",transform:Xr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:po},color:{themeKey:"palette",transform:bo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:bo},backgroundColor:{themeKey:"palette",transform:bo},p:{style:Jr},pt:{style:Jr},pr:{style:Jr},pb:{style:Jr},pl:{style:Jr},px:{style:Jr},py:{style:Jr},padding:{style:Jr},paddingTop:{style:Jr},paddingRight:{style:Jr},paddingBottom:{style:Jr},paddingLeft:{style:Jr},paddingX:{style:Jr},paddingY:{style:Jr},paddingInline:{style:Jr},paddingInlineStart:{style:Jr},paddingInlineEnd:{style:Jr},paddingBlock:{style:Jr},paddingBlockStart:{style:Jr},paddingBlockEnd:{style:Jr},m:{style:Kr},mt:{style:Kr},mr:{style:Kr},mb:{style:Kr},ml:{style:Kr},mx:{style:Kr},my:{style:Kr},margin:{style:Kr},marginTop:{style:Kr},marginRight:{style:Kr},marginBottom:{style:Kr},marginLeft:{style:Kr},marginX:{style:Kr},marginY:{style:Kr},marginInline:{style:Kr},marginInlineStart:{style:Kr},marginInlineEnd:{style:Kr},marginBlock:{style:Kr},marginBlockStart:{style:Kr},marginBlockEnd:{style:Kr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ho},rowGap:{style:go},columnGap:{style:mo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:yo},maxWidth:{style:So},minWidth:{transform:yo},height:{transform:yo},maxHeight:{transform:yo},minHeight:{transform:yo},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Lo=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:l,transform:s,style:c}=i;if(null==t)return null;if("typography"===l&&"inherit"===t)return{[e]:t};const u=Dr(n,l)||{};if(c)return c(o);return Ir(o,t,t=>{let n=Nr(u,s,t);return t===n&&"string"==typeof t&&(n=Nr(u,s,`${e}${"default"===t?"":Or(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??Eo;function l(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const l=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),s=Object.keys(l);let c=l;return Object.keys(r).forEach(n=>{const i=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=i)if("object"==typeof i)if(a[n])c=Rr(c,e(n,i,o,a));else{const e=Ir({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=Rr(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=Rr(c,e(n,i,o,a))}),!i&&o.modularCssLayers?{"@layer sx":Er(o,_r(s,c))}:Er(o,_r(s,c))}return Array.isArray(r)?r.map(l):l(r)}}();function Ro(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function To(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let l=kr({breakpoints:Cr(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Qr(o),shape:{...Lr,...i}},a);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=Ro,l=t.reduce((e,t)=>kr(e,t),l),l.unstable_sxConfig={...Eo,...a?.unstable_sxConfig},l.unstable_sx=function(e){return Lo({sx:e,theme:this})},l}function qo(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}Lo.filterProps=["sx"];const Po=To();function Io(e=Po){return qo(e)}function _o(e){const t=pr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Oo({styles:e,themeId:t,defaultTheme:n={}}){const r=Io(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map(e=>_o("function"==typeof e?e(o):e)):_o(i)),ar.jsx(dr,{styles:i})}const Do=e=>e,No=(()=>{let e=Do;return{configure(t){e=t},generate:t=>e(t),reset(){e=Do}}})();function Ao(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ao(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ao(e))&&(r&&(r+=" "),r+=t);return r}const Mo={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function $o(e,t,n="Mui"){const r=Mo[t];return r?`${n}-${r}`:`${No.generate(e)}-${t}`}function zo(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=$o(e,t,n)}),r}function Fo(e){const{variants:t,...n}=e,r={variants:t,style:pr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=pr(e.style))}),r}const Bo=To();function Wo(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Uo(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ho(e){return e?(t,n)=>n[e]:null}function Vo(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Vo(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Uo(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Uo(pr(o),n):o}return Go(e,r.variants,[t],n)}return r?.isProcessed?n?Uo(pr(r.style),n):r.style:n?Uo(pr(r),n):r}function Go(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if("function"==typeof a.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const t in a.props)if(e[t]!==a.props[t]&&e.ownerState?.[t]!==a.props[t])continue e;"function"==typeof a.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Uo(pr(a.style(o)),r):a.style(o))):n.push(r?Uo(pr(a.style),r):a.style)}return n}function Ko(e,t){}function Jo(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Qo(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)r[i]={...e[i],...r[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){r[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;r[i][t]=Qo(o[t],a[t],n)}}else r[i]=a;else r[i]=o||{}}else"className"===i&&n&&t.className?r.className=jo(e?.className,t?.className):"style"===i&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[i]&&(r[i]=e[i])}return r}const Zo="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Xo(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function Yo(e){if(e.type)return e;if("#"===e.charAt(0))return Yo(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(zt(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(zt(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const ei=(e,t)=>{try{return(e=>{const t=Yo(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function ti(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function ni(e){e=Yo(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let l="rgb";const s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",s.push(t[3])),ti({type:l,values:s})}function ri(e){let t="hsl"===(e=Yo(e)).type||"hsla"===e.type?Yo(ni(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oi(e,t){return e=Yo(e),t=Xo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,ti(e)}function ii(e,t,n){try{return oi(e,t)}catch(t){return e}}function ai(e,t){if(e=Yo(e),t=Xo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ti(e)}function li(e,t,n){try{return ai(e,t)}catch(t){return e}}function si(e,t){if(e=Yo(e),t=Xo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ti(e)}function ci(e,t,n){try{return si(e,t)}catch(t){return e}}function ui(e,t,n){try{return function(e,t=.15){return ri(e)>.5?ai(e,t):si(e,t)}(e,t)}catch(t){return e}}const di=e.createContext(null);function fi(){return e.useContext(di)}var pi="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function hi(t){const{children:n,theme:r}=t,o=fi(),i=e.useMemo(()=>{const e=null===o?{...r}:function(e,t){if("function"==typeof t)return t(e);return{...e,...t}}(o,r);return null!=e&&(e[pi]=null!==o),e},[r,o]);return ar.jsx(di.Provider,{value:i,children:n})}const mi=e.createContext();function gi({value:e,...t}){return ar.jsx(mi.Provider,{value:e??!0,...t})}const bi=e.createContext(void 0);function yi({value:e,children:t}){return ar.jsx(bi.Provider,{value:e,children:t})}function vi({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Qo(o.defaultProps,r,t.components.mergeClassNameAndStyle):o.styleOverrides||o.variants?r:Qo(o,r,t.components.mergeClassNameAndStyle)}({props:t,name:n,theme:{components:e.useContext(bi)}})}let Si=0;const wi={...e}.useId;function xi(t){if(void 0!==wi){return wi()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect(()=>{null==n&&(Si+=1,r(`mui-${Si}`))},[n]),o}(t)}const ki={};function Ci(t,n,r,o=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const i=r(e),a=t?{...n,[t]:i}:i;return o?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,o])}function Ei(e){const{children:t,theme:n,themeId:r}=e,o=qo(ki),i=fi()||ki,a=Ci(r,o,n),l=Ci(r,i,n,!0),s="rtl"===(r?a[r]:a).direction,c=function(e){const t=qo(),n=xi()||"",{modularCssLayers:r}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return o=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",Zo(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o?ar.jsx(Oo,{styles:o}):null}(a);return ar.jsx(hi,{theme:l,children:ar.jsx(y.Provider,{value:a,children:ar.jsx(gi,{value:s,children:ar.jsxs(yi,{value:r?a[r].components:a.components,children:[c,t]})})})})}const Li={theme:void 0};const Ri="mode",Ti="color-scheme",qi="data-color-scheme";function Pi(){}const Ii=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Pi;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function _i(){}function Oi(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function Di(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function Ni(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=Ri,colorSchemeStorageKey:l=Ti,storageWindow:s=("undefined"==typeof window?void 0:window),storageManager:c=Ii,noSsr:u=!1}=t,d=i.join(","),f=i.length>1,p=e.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),h=e.useMemo(()=>c?.({key:`${l}-light`,storageWindow:s}),[c,l,s]),m=e.useMemo(()=>c?.({key:`${l}-dark`,storageWindow:s}),[c,l,s]),[g,b]=e.useState(()=>{const e=p?.get(n)||n,t=h?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:Oi(e),lightColorScheme:t,darkColorScheme:i}}),[y,v]=e.useState(u||!f);e.useEffect(()=>{v(!0)},[]);const S=function(e){return Di(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),w=e.useCallback(e=>{b(t=>{if(e===t.mode)return t;const r=e??n;return p?.set(r),{...t,mode:r,systemMode:Oi(r)}})},[p,n]),x=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):b(t=>{const n={...t};return Di(t,t=>{"light"===t&&(h?.set(e),n.lightColorScheme=e),"dark"===t&&(m?.set(e),n.darkColorScheme=e)}),n}):b(t=>{const n={...t},i=null===e.light?r:e.light,a=null===e.dark?o:e.dark;return i&&(d.includes(i)?(n.lightColorScheme=i,h?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,m?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):b(e=>(h?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o}))},[d,h,m,r,o]),k=e.useCallback(e=>{"system"===g.mode&&b(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),C=e.useRef(k);return C.current=k,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;const e=(...e)=>C.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),e.useEffect(()=>{if(f){const e=p?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||w(e||n)})||_i,t=h?.subscribe(e=>{e&&!d.match(e)||x({light:e})})||_i,r=m?.subscribe(e=>{e&&!d.match(e)||x({dark:e})})||_i;return()=>{e(),t(),r()}}},[x,w,d,n,s,f,p,h,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:x}}function Ai(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const ji=(e,t,n,r=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])})};function Mi(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var l,s;return l=(e,t,l)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,s=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:s}),ji(i,e,`var(${r})`,l),ji(a,e,`var(${r}, ${s})`,l)}},s=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,o])=>{(!s||s&&!s([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):l([...n,t],o,r))})}(e),{css:o,vars:i,varsWithDefaults:a}}const $i={black:"#000",white:"#fff"},zi={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Fi="#f3e5f5",Bi="#ce93d8",Wi="#ba68c8",Ui="#ab47bc",Hi="#9c27b0",Vi="#7b1fa2",Gi="#e57373",Ki="#ef5350",Ji="#f44336",Qi="#d32f2f",Zi="#c62828",Xi="#ffb74d",Yi="#ffa726",ea="#ff9800",ta="#f57c00",na="#e65100",ra="#e3f2fd",oa="#90caf9",ia="#42a5f5",aa="#1976d2",la="#1565c0",sa="#4fc3f7",ca="#29b6f6",ua="#03a9f4",da="#0288d1",fa="#01579b",pa="#81c784",ha="#66bb6a",ma="#4caf50",ga="#388e3c",ba="#2e7d32",ya="#1b5e20";function va(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:$i.white,default:$i.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Sa=va();function wa(){return{text:{primary:$i.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:$i.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xa=wa();function ka(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=si(e.main,o):"dark"===t&&(e.dark=ai(e.main,i)))}function Ca(e,t,n,r,o){const i=o.light||o,a=o.dark||1.5*o;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*i).toFixed(0)}%)`:"dark"===n&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*a).toFixed(0)}%)`))}function Ea(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||function(e="light"){return"dark"===e?{main:oa,light:ra,dark:ia}:{main:aa,light:ia,dark:la}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:Bi,light:Fi,dark:Ui}:{main:Hi,light:Wi,dark:Vi}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Ji,light:Gi,dark:Qi}:{main:Qi,light:Ki,dark:Zi}}(t),c=e.info||function(e="light"){return"dark"===e?{main:ca,light:sa,dark:da}:{main:da,light:ua,dark:fa}}(t),u=e.success||function(e="light"){return"dark"===e?{main:ha,light:pa,dark:ga}:{main:ba,light:ma,dark:ya}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:Yi,light:Xi,dark:ta}:{main:"#ed6c02",light:ea,dark:na}}(t);function f(e){if(o)return function(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}(e);const t=function(e,t){const n=ri(e),r=ri(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,xa.text.primary)>=n?xa.text.primary:Sa.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(zt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(zt(12,t?` (${t})`:"",JSON.stringify(e.main)));return o?(Ca(o,e,"light",i,r),Ca(o,e,"dark",a,r)):(ka(e,"light",i,r),ka(e,"dark",a,r)),e.contrastText||(e.contrastText=f(e.main)),e};let h;"light"===t?h=va():"dark"===t&&(h=wa());return kr({common:{...$i},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:zi,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...h},i)}function La(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const Ra={textTransform:"uppercase"},Ta='"Roboto", "Helvetica", "Arial", sans-serif';function qa(e,t){const{fontFamily:n=Ta,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,f=r/14,p=u||(e=>e/s*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Ta?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,Ra),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,Ra),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return kr({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:l,...m},d,{clone:!1})}function Pa(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Ia=["none",Pa(0,2,1,-1,0,1,1,0,0,1,3,0),Pa(0,3,1,-2,0,2,2,0,0,1,5,0),Pa(0,3,3,-2,0,3,4,0,0,1,8,0),Pa(0,2,4,-1,0,4,5,0,0,1,10,0),Pa(0,3,5,-1,0,5,8,0,0,1,14,0),Pa(0,3,5,-1,0,6,10,0,0,1,18,0),Pa(0,4,5,-2,0,7,10,1,0,2,16,1),Pa(0,5,5,-3,0,8,10,1,0,3,14,2),Pa(0,5,6,-3,0,9,12,1,0,3,16,2),Pa(0,6,6,-3,0,10,14,1,0,4,18,3),Pa(0,6,7,-4,0,11,15,1,0,4,20,3),Pa(0,7,8,-4,0,12,17,2,0,5,22,4),Pa(0,7,8,-4,0,13,19,2,0,5,24,4),Pa(0,7,9,-4,0,14,21,2,0,5,26,4),Pa(0,8,9,-5,0,15,22,2,0,6,28,5),Pa(0,8,10,-5,0,16,24,2,0,6,30,5),Pa(0,8,11,-5,0,17,26,2,0,6,32,5),Pa(0,9,11,-5,0,18,28,2,0,7,34,6),Pa(0,9,12,-6,0,19,29,2,0,7,36,6),Pa(0,10,13,-6,0,20,31,3,0,8,38,7),Pa(0,10,13,-6,0,21,33,3,0,8,40,7),Pa(0,10,14,-6,0,22,35,3,0,8,42,7),Pa(0,11,14,-7,0,23,36,3,0,9,44,8),Pa(0,11,15,-7,0,24,38,3,0,9,46,8)],_a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Oa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Da(e){return`${Math.round(e)}ms`}function Na(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Aa(e){const t={..._a,...e.easing},n={...Oa,...e.duration};return{getAutoHeightDuration:Na,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...l}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:Da(o)} ${i} ${"string"==typeof a?a:Da(a)}`).join(",")},...e,easing:t,duration:n}}const ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ma(e){return wr(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function $a(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;r<n.length;r++){const[o,i]=n[r];!Ma(i)||o.startsWith("unstable_")?delete t[o]:wr(i)&&(t[o]={...i},e(t[o]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function za(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}function Fa(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof n?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof n?`calc(${n})`:n})`:oi(t,(e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n})(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${za(n)})`:si(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${za(n)})`:ai(t,n)}})}function Ba(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:l={},shape:s,colorSpace:c,...u}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(zt(20));const d=Ea({...i,colorSpace:c}),f=To(e);let p=kr(f,{mixins:(h=f.breakpoints,m=r,{toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}},...m}),palette:d,shadows:Ia.slice(),typography:qa(d,l),transitions:Aa(a),zIndex:{...ja}});var h,m;return p=kr(p,u),p=t.reduce((e,t)=>kr(e,t),p),p.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Lo({sx:e,theme:this})},p.toRuntimeSource=$a,Fa(p),p}const Wa=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ua(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function Ha(e){return"dark"===e?Wa:[]}function Va(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Ga=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{o[e]=n[e],delete n[e]}),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function Ka(e,t,n){!e[t]&&n&&(e[t]=n)}function Ja(e){return"string"==typeof e&&e.startsWith("hsl")?ni(e):e}function Qa(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ei(Ja(e[t])))}const Za=e=>{try{return e()}catch(e){}};function Xa(e,t,n,r,o){if(!n)return;n=!0===n?{}:n;const i="dark"===o?"dark":"light";if(!r)return void(t[o]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=Ea({...t,colorSpace:o});return{palette:a,opacity:{...Ua(a.mode),...n},overlays:r||Ha(a.mode),...i}}({...n,palette:{mode:i,...n?.palette},colorSpace:e}));const{palette:a,...l}=Ba({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...Ua(i),...n?.opacity},overlays:n?.overlays||Ha(i)},l}function Ya(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Va,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&"light"!==d?"light":d),p=((e="mui")=>Ai(e))(i),{[f]:h,light:m,dark:g,...b}=n,y={...b};let v,S=h;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(S=!0),!S)throw new Error(zt(21,f));a&&(v="oklch");const w=Xa(v,y,S,u,f);m&&!y.light&&Xa(v,y,m,void 0,"light"),g&&!y.dark&&Xa(v,y,g,void 0,"dark");let x={defaultColorScheme:f,...w,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:c,getCssVar:p,colorSchemes:y,font:{...La(w.typography),...w.font},spacing:(k=u.spacing,"number"==typeof k?`${k}px`:"string"==typeof k||"function"==typeof k||Array.isArray(k)?k:"8px")};var k;Object.keys(x.colorSchemes).forEach(e=>{const t=x.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return p(e,t[r][o])};function r(e,t,n){if(v){let r;return e===ii&&(r=`transparent ${(100*(1-n)).toFixed(0)}%`),e===li&&(r=`#000 ${(100*n).toFixed(0)}%`),e===ci&&(r=`#fff ${(100*n).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${r})`}return e(t,n)}var o;if("light"===t.mode&&(Ka(t.common,"background","#fff"),Ka(t.common,"onBackground","#000")),"dark"===t.mode&&(Ka(t.common,"background","#000"),Ka(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{o[e]||(o[e]={})}),"light"===t.mode){Ka(t.Alert,"errorColor",r(li,a?p("palette-error-light"):t.error.light,.6)),Ka(t.Alert,"infoColor",r(li,a?p("palette-info-light"):t.info.light,.6)),Ka(t.Alert,"successColor",r(li,a?p("palette-success-light"):t.success.light,.6)),Ka(t.Alert,"warningColor",r(li,a?p("palette-warning-light"):t.warning.light,.6)),Ka(t.Alert,"errorFilledBg",n("palette-error-main")),Ka(t.Alert,"infoFilledBg",n("palette-info-main")),Ka(t.Alert,"successFilledBg",n("palette-success-main")),Ka(t.Alert,"warningFilledBg",n("palette-warning-main")),Ka(t.Alert,"errorFilledColor",Za(()=>t.getContrastText(t.error.main))),Ka(t.Alert,"infoFilledColor",Za(()=>t.getContrastText(t.info.main))),Ka(t.Alert,"successFilledColor",Za(()=>t.getContrastText(t.success.main))),Ka(t.Alert,"warningFilledColor",Za(()=>t.getContrastText(t.warning.main))),Ka(t.Alert,"errorStandardBg",r(ci,a?p("palette-error-light"):t.error.light,.9)),Ka(t.Alert,"infoStandardBg",r(ci,a?p("palette-info-light"):t.info.light,.9)),Ka(t.Alert,"successStandardBg",r(ci,a?p("palette-success-light"):t.success.light,.9)),Ka(t.Alert,"warningStandardBg",r(ci,a?p("palette-warning-light"):t.warning.light,.9)),Ka(t.Alert,"errorIconColor",n("palette-error-main")),Ka(t.Alert,"infoIconColor",n("palette-info-main")),Ka(t.Alert,"successIconColor",n("palette-success-main")),Ka(t.Alert,"warningIconColor",n("palette-warning-main")),Ka(t.AppBar,"defaultBg",n("palette-grey-100")),Ka(t.Avatar,"defaultBg",n("palette-grey-400")),Ka(t.Button,"inheritContainedBg",n("palette-grey-300")),Ka(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Ka(t.Chip,"defaultBorder",n("palette-grey-400")),Ka(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Ka(t.Chip,"defaultIconColor",n("palette-grey-700")),Ka(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Ka(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Ka(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Ka(t.LinearProgress,"primaryBg",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.LinearProgress,"secondaryBg",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.LinearProgress,"errorBg",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.LinearProgress,"infoBg",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.LinearProgress,"successBg",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.LinearProgress,"warningBg",r(ci,a?p("palette-warning-light"):t.warning.main,.62)),Ka(t.Skeleton,"bg",v?r(ii,a?p("palette-text-primary"):t.text.primary,.11):`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Ka(t.Slider,"primaryTrack",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.Slider,"secondaryTrack",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.Slider,"errorTrack",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.Slider,"infoTrack",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.Slider,"successTrack",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.Slider,"warningTrack",r(ci,a?p("palette-warning-main"):t.warning.main,.62));const e=v?r(li,a?p("palette-background-default"):t.background.default,.6825):ui(t.background.default,.8);Ka(t.SnackbarContent,"bg",e),Ka(t.SnackbarContent,"color",Za(()=>v?xa.text.primary:t.getContrastText(e))),Ka(t.SpeedDialAction,"fabHoverBg",ui(t.background.paper,.15)),Ka(t.StepConnector,"border",n("palette-grey-400")),Ka(t.StepContent,"border",n("palette-grey-400")),Ka(t.Switch,"defaultColor",n("palette-common-white")),Ka(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Ka(t.Switch,"primaryDisabledColor",r(ci,a?p("palette-primary-main"):t.primary.main,.62)),Ka(t.Switch,"secondaryDisabledColor",r(ci,a?p("palette-secondary-main"):t.secondary.main,.62)),Ka(t.Switch,"errorDisabledColor",r(ci,a?p("palette-error-main"):t.error.main,.62)),Ka(t.Switch,"infoDisabledColor",r(ci,a?p("palette-info-main"):t.info.main,.62)),Ka(t.Switch,"successDisabledColor",r(ci,a?p("palette-success-main"):t.success.main,.62)),Ka(t.Switch,"warningDisabledColor",r(ci,a?p("palette-warning-main"):t.warning.main,.62)),Ka(t.TableCell,"border",r(ci,ii(a?p("palette-divider"):t.divider,1),.88)),Ka(t.Tooltip,"bg",r(ii,a?p("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){Ka(t.Alert,"errorColor",r(ci,a?p("palette-error-light"):t.error.light,.6)),Ka(t.Alert,"infoColor",r(ci,a?p("palette-info-light"):t.info.light,.6)),Ka(t.Alert,"successColor",r(ci,a?p("palette-success-light"):t.success.light,.6)),Ka(t.Alert,"warningColor",r(ci,a?p("palette-warning-light"):t.warning.light,.6)),Ka(t.Alert,"errorFilledBg",n("palette-error-dark")),Ka(t.Alert,"infoFilledBg",n("palette-info-dark")),Ka(t.Alert,"successFilledBg",n("palette-success-dark")),Ka(t.Alert,"warningFilledBg",n("palette-warning-dark")),Ka(t.Alert,"errorFilledColor",Za(()=>t.getContrastText(t.error.dark))),Ka(t.Alert,"infoFilledColor",Za(()=>t.getContrastText(t.info.dark))),Ka(t.Alert,"successFilledColor",Za(()=>t.getContrastText(t.success.dark))),Ka(t.Alert,"warningFilledColor",Za(()=>t.getContrastText(t.warning.dark))),Ka(t.Alert,"errorStandardBg",r(li,a?p("palette-error-light"):t.error.light,.9)),Ka(t.Alert,"infoStandardBg",r(li,a?p("palette-info-light"):t.info.light,.9)),Ka(t.Alert,"successStandardBg",r(li,a?p("palette-success-light"):t.success.light,.9)),Ka(t.Alert,"warningStandardBg",r(li,a?p("palette-warning-light"):t.warning.light,.9)),Ka(t.Alert,"errorIconColor",n("palette-error-main")),Ka(t.Alert,"infoIconColor",n("palette-info-main")),Ka(t.Alert,"successIconColor",n("palette-success-main")),Ka(t.Alert,"warningIconColor",n("palette-warning-main")),Ka(t.AppBar,"defaultBg",n("palette-grey-900")),Ka(t.AppBar,"darkBg",n("palette-background-paper")),Ka(t.AppBar,"darkColor",n("palette-text-primary")),Ka(t.Avatar,"defaultBg",n("palette-grey-600")),Ka(t.Button,"inheritContainedBg",n("palette-grey-800")),Ka(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Ka(t.Chip,"defaultBorder",n("palette-grey-700")),Ka(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Ka(t.Chip,"defaultIconColor",n("palette-grey-300")),Ka(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Ka(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Ka(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Ka(t.LinearProgress,"primaryBg",r(li,a?p("palette-primary-main"):t.primary.main,.5)),Ka(t.LinearProgress,"secondaryBg",r(li,a?p("palette-secondary-main"):t.secondary.main,.5)),Ka(t.LinearProgress,"errorBg",r(li,a?p("palette-error-main"):t.error.main,.5)),Ka(t.LinearProgress,"infoBg",r(li,a?p("palette-info-main"):t.info.main,.5)),Ka(t.LinearProgress,"successBg",r(li,a?p("palette-success-main"):t.success.main,.5)),Ka(t.LinearProgress,"warningBg",r(li,a?p("palette-warning-main"):t.warning.main,.5)),Ka(t.Skeleton,"bg",v?r(ii,a?p("palette-text-primary"):t.text.primary,.13):`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Ka(t.Slider,"primaryTrack",r(li,a?p("palette-primary-main"):t.primary.main,.5)),Ka(t.Slider,"secondaryTrack",r(li,a?p("palette-secondary-main"):t.secondary.main,.5)),Ka(t.Slider,"errorTrack",r(li,a?p("palette-error-main"):t.error.main,.5)),Ka(t.Slider,"infoTrack",r(li,a?p("palette-info-main"):t.info.main,.5)),Ka(t.Slider,"successTrack",r(li,a?p("palette-success-main"):t.success.main,.5)),Ka(t.Slider,"warningTrack",r(li,a?p("palette-warning-light"):t.warning.main,.5));const e=v?r(ci,a?p("palette-background-default"):t.background.default,.985):ui(t.background.default,.98);Ka(t.SnackbarContent,"bg",e),Ka(t.SnackbarContent,"color",Za(()=>v?Sa.text.primary:t.getContrastText(e))),Ka(t.SpeedDialAction,"fabHoverBg",ui(t.background.paper,.15)),Ka(t.StepConnector,"border",n("palette-grey-600")),Ka(t.StepContent,"border",n("palette-grey-600")),Ka(t.Switch,"defaultColor",n("palette-grey-300")),Ka(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Ka(t.Switch,"primaryDisabledColor",r(li,a?p("palette-primary-main"):t.primary.main,.55)),Ka(t.Switch,"secondaryDisabledColor",r(li,a?p("palette-secondary-main"):t.secondary.main,.55)),Ka(t.Switch,"errorDisabledColor",r(li,a?p("palette-error-main"):t.error.main,.55)),Ka(t.Switch,"infoDisabledColor",r(li,a?p("palette-info-main"):t.info.main,.55)),Ka(t.Switch,"successDisabledColor",r(li,a?p("palette-success-main"):t.success.main,.55)),Ka(t.Switch,"warningDisabledColor",r(li,a?p("palette-warning-light"):t.warning.main,.55)),Ka(t.TableCell,"border",r(li,ii(a?p("palette-divider"):t.divider,1),.68)),Ka(t.Tooltip,"bg",r(ii,a?p("palette-grey-700"):t.grey[700],.92))}a||(Qa(t.background,"default"),Qa(t.background,"paper"),Qa(t.common,"background"),Qa(t.common,"onBackground"),Qa(t,"divider")),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&!a&&n&&"object"==typeof n&&(n.main&&Ka(t[e],"mainChannel",ei(Ja(n.main))),n.light&&Ka(t[e],"lightChannel",ei(Ja(n.light))),n.dark&&Ka(t[e],"darkChannel",ei(Ja(n.dark))),n.contrastText&&Ka(t[e],"contrastTextChannel",ei(Ja(n.contrastText))),"text"===e&&(Qa(t[e],"primary"),Qa(t[e],"secondary")),"action"===e&&(n.active&&Qa(t[e],"active"),n.selected&&Qa(t[e],"selected")))})}),x=t.reduce((e,t)=>kr(e,t),x);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:Ga(x),enableContrastVars:a},{vars:E,generateThemeVars:L,generateStyleSheets:R}=function(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:s="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=Mi(c,t);let p=f;const h={},{[s]:m,...g}=a;if(Object.entries(g||{}).forEach(([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=Mi(n,t);p=kr(p,i),h[e]={css:o,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=Mi(m,t);p=kr(p,r),h[s]={css:e,vars:n}}function b(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(h).forEach(([,{vars:t}])=>{e=kr(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function l(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}l(n(void 0,{...d}),d);const{[o]:s,...c}=h;if(s){const{css:e}=s,t=a[o]?.palette?.mode,i=!r&&t?{colorScheme:t,...e}:{...e};l(n(o,{...i}),i)}return Object.entries(c).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,i=!r&&o?{colorScheme:o,...t}:{...t};l(n(e,{...i}),i)}),i&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t}}}(x,C);return x.vars=E,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([e,t])=>{x[e]=t}),x.generateThemeVars=L,x.generateStyleSheets=R,x.generateSpacing=function(){return Qr(u.spacing,Ur(this))},x.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(s),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=l,x.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},x.unstable_sx=function(e){return Lo({sx:e,theme:this})},x.toRuntimeSource=$a,x}function el(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:Ea({...!0===n?{}:n.palette,mode:t})})}function tl(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,l=i||"light",s=o?.[l],c={...o,...n?{[l]:{..."boolean"!=typeof s&&s,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return Ba(e,...t);let r=n;"palette"in e||c[l]&&(!0!==c[l]?r=c[l].palette:"dark"===l&&(r={mode:"dark"}));const o=Ba({...e,palette:r},...t);return o.defaultColorScheme=l,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},el(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},el(o,"light",c.light)),o}return n||"light"in c||"light"!==l||(c.light=!0),Ya({...a,colorSchemes:c,defaultColorScheme:l,..."boolean"!=typeof r&&r},...t)}const nl=tl();function rl(){const e=Io(nl);return e[Ft]||e}const ol=function(e={}){const{themeId:t,defaultTheme:n=Bo,rootShouldForwardProp:r=Wo,slotShouldForwardProp:o=Wo}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,e=>e.filter(e=>e!==Lo));const{name:n,slot:a,skipVariantsResolver:l,skipSx:s,overridesResolver:c=Ho(Jo(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",f=void 0!==l?l:a&&"Root"!==a&&"root"!==a||!1,p=s||!1;let h=Wo;"Root"===a||"root"===a?h=r:a?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:h,label:Ko(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Vo(t,e,t.theme.modularCssLayers?d:void 0)};if(wr(e)){const t=Fo(e);return function(e){return t.variants?Vo(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Uo(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(i),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Vo(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)}),n&&!f&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Go(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),p||a.push(Lo),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const l=[...r,...o,...a],s=m(...l);return e.muiName&&(s.muiName=e.muiName),s};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:Ft,defaultTheme:nl,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function il({theme:e,...t}){const n=Ft in e?e[Ft]:void 0;return ar.jsx(Ei,{...t,themeId:n?Ft:void 0,theme:n||e})}const al="mui-color-scheme",ll="light",sl="dark",cl="mui-mode",{CssVarsProvider:ul}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=Ri,colorSchemeStorageKey:i=Ti,disableTransitionOnChange:a=!1,defaultColorScheme:l,resolveTheme:s}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},f={},p="string"==typeof l?l:l.light,h="string"==typeof l?l:l.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:h=o,colorSchemeStorageKey:m=i,disableTransitionOnChange:g=a,storageManager:b,storageWindow:y=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:S=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:w=!1,disableStyleSheetGeneration:x=!1,defaultMode:k="system",forceThemeRerender:C=!1,noSsr:E}=t,L=e.useRef(!1),R=fi(),T=e.useContext(u),q=!!T&&!w,P=e.useMemo(()=>p||("function"==typeof r?r():r),[p]),I=P[n],_=I||P,{colorSchemes:O=d,components:D=f,cssVarPrefix:N}=_,A=Object.keys(O).filter(e=>!!O[e]).join(","),j=e.useMemo(()=>A.split(","),[A]),M="string"==typeof l?l:l.light,$="string"==typeof l?l:l.dark,z=O[M]&&O[$]?k:O[_.defaultColorScheme]?.palette?.mode||_.palette?.mode,{mode:F,setMode:B,systemMode:W,lightColorScheme:U,darkColorScheme:H,colorScheme:V,setColorScheme:G}=Ni({supportedColorSchemes:j,defaultLightColorScheme:M,defaultDarkColorScheme:$,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let K=F,J=V;q&&(K=T.mode,J=T.colorScheme);let Q=J||_.defaultColorScheme;_.vars&&!C&&(Q=_.defaultColorScheme);const Z=e.useMemo(()=>{const e=_.generateThemeVars?.()||_.vars,t={..._,components:D,colorSchemes:O,cssVarPrefix:N,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),Q){const e=O[Q];e&&"object"==typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[_,Q,D,O,N]),X=_.colorSchemeSelector;Zo(()=>{if(J&&S&&X&&"media"!==X){const e=X;let t=X;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...j.map(e=>t.substring(1).replace("%s",e))),S.classList.add(t.substring(1).replace("%s",J));else{const e=t.replace("%s",J).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||j.forEach(e=>{S.removeAttribute(t.replace(J,e))}),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,J)}}},[J,X,S,j]),e.useEffect(()=>{let e;if(g&&L.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,g,v]),e.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Y=e.useMemo(()=>({allColorSchemes:j,colorScheme:J,darkColorScheme:H,lightColorScheme:U,mode:K,setColorScheme:G,setMode:B,systemMode:W}),[j,J,H,U,K,G,B,W,Z.colorSchemeSelector]);let ee=!0;(x||!1===_.cssVariables||q&&R?.cssVarPrefix===N)&&(ee=!1);const te=ar.jsxs(e.Fragment,{children:[ar.jsx(Ei,{themeId:I?n:void 0,theme:Z,children:c}),ee&&ar.jsx(dr,{styles:Z.generateStyleSheets?.()||[]})]});return q?te:ar.jsx(u.Provider,{value:Y,children:te})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Ri,colorSchemeStorageKey:i=Ti,attribute:a=qi,colorSchemeNode:l="document.documentElement",nonce:s}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${l}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${l}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^[\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${l}.removeAttribute('${e}'.replace('%s', light));\n ${l}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${l}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==u&&(c+=`${l}.setAttribute('${u}', colorScheme);`);return ar.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?s:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${o}') || '${t}';\n const dark = localStorage.getItem('${i}-dark') || '${r}';\n const light = localStorage.getItem('${i}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:h,modeStorageKey:o,...e})}}({themeId:Ft,theme:()=>tl({cssVariables:!0}),colorSchemeStorageKey:al,modeStorageKey:cl,defaultColorScheme:{light:ll,dark:sl},resolveTheme:e=>{const t={...e,typography:qa(e.palette,e.typography)};return t.unstable_sx=function(e){return Lo({sx:e,theme:this})},t}}),dl=ul;function fl({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=Ft in t?t[Ft]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?ar.jsx(il,{theme:r,...n}):ar.jsx(dl,{theme:t,...n})}const pl=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Li.theme=r.theme,o=Fo(e(Li)),t=o,n=r.theme),o}};function hl(e){return $o("MuiSvgIcon",e)}zo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ml=ol("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Or(n.color)}`],t[`fontSize${Or(n.fontSize)}`]]}})(pl(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{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}}]}))),gl=e.forwardRef(function(t,n){const r=vi({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return function(e,t,n){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${Or(t)}`,`fontSize${Or(n)}`]},hl,r)})(m);return ar.jsxs(ml,{as:l,className:jo(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?ar.jsx("title",{children:d}):null]})});function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bl.apply(null,arguments)}function yl(e,t){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yl(e,t)}function vl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yl(e,t)}function Sl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}gl.muiName="SvgIcon";const wl=zo("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"]);var xl={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 kl={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"},Cl={mode:"light",palette:{primary:{main:kl.grey25,contrastText:kl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:kl.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:kl.grey100,dark:kl.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:kl.grey100,default:kl.grey100,lightest:kl.grey100,lighter:kl.grey98,darker:kl.grey95,darkest:kl.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:kl.blueDark,focusBorder:kl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:kl.grey45,disabledContrastText:kl.grey100},selected:{main:kl.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:kl.grey100,selectedContrastText:kl.grey100,mainContrastText:kl.grey100,alternativeContrastText:kl.grey25,excludedContrastText:kl.grey25,selectedExcludedContrastText:kl.grey100,possibleContrastText:kl.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)"}}},El={mode:"dark",palette:{primary:{main:kl.grey20,contrastText:kl.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:kl.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:kl.grey100,dark:kl.grey0},action:{active:kl.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:kl.grey25,lighter:kl.grey20,darker:kl.grey15,darkest:kl.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:kl.blueDark,focusBorder:kl.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:kl.grey45,disabledContrastText:kl.grey100},selected:{main:kl.green,alternative:kl.grey20,excluded:kl.grey10,selectedExcluded:kl.grey10,possible:kl.grey80,selectedContrastText:kl.grey100,mainContrastText:kl.grey100,alternativeContrastText:kl.grey100,excludedContrastText:kl.grey100,selectedExcludedContrastText:kl.grey100,possibleContrastText:kl.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)"}}},Ll={},Rl=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",[`&.${wl.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",[`&.${wl.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",[`&.${wl.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${wl.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Tl(e){let t=Cl,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=El));const r=JSON.stringify(t);if(Ll[r])return Ll[r];const o={palette:Z(Z({type:t.mode},xl.palette),t.palette),typography:Z({},xl.typography),shadows:xl.shadows,shape:Z({},xl.shape)},i=Z(Z({},o),{},{components:Rl(o)});return Ll[r]=tl(i),Ll[r].name=n,Ll[r]}No.configure(e=>`njs-b079-${e.replace("Mui","")}`);var ql=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Pl={active:!0,select:!0,passive:!0,edit:!1};function Il(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(Pl).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Pl[e],n[e]=!Pl[e])}),e.constraints=n,e.interactions=t}var _l=(e={},t=()=>{})=>{const o=e,i=[],a={},l={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return o[e]=n,a[e]=t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);o[e]=null},dispatch:e=>{i.forEach(t=>t(e?{}:o))},destroy:()=>{Object.keys(a).forEach(e=>{a[e]&&a[e]()})}};return[()=>{const[,e]=n(o);return r(()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)}),[e]),[l]},l]};const Ol=o(({initialContext:e,renderCallback:t,modelStore:o,selectionStore:l},s)=>{const[c,u]=n(e),[d,f]=n(),{theme:p}=i(()=>({theme:Tl(d)}),[d]),[h,m]=n([]);return r(()=>{t&&t()},[]),a(s,()=>({setComps(e){m([...e])},setMuiThemeName:f,setContext:e=>u(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),c&&(c.modelStore=o,c.selectionStore=l),ar.jsx(ur,{injectFirst:!0,children:ar.jsx(fl,{theme:p,children:ar.jsx(ql.Provider,{value:c,children:h})})})});function Dl({app:e,context:n}){let r,o=!1;const i=new Promise(e=>{r=e}),a=t.createRef(),l=document.createElement("div");l.style.display="none",l.setAttribute("data-nebulajs-version","7.5.2"),l.setAttribute("data-app-id",e.id),document.body.appendChild(l),n&&Il(n);const s=function(e){const[t,n]=_l({}),[r,o]=_l({}),[i,a]=_l({}),[l,s]=_l({}),[c,u]=_l({}),[,d]=_l({}),f=({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)},l=()=>{t.removeListener("closed",l),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),s.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",l))),l},[p,h]=_l({},f);return{subscribe:e=>{const t=f({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:p,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:l,rpcRequestModelStore:s,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(e.id),c=function(e){const[t,n]=_l({}),[r,o]=_l({}),[i,a]=_l({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),u=$t.createRoot(l);u.render(ar.jsx(Ol,{ref:a,initialContext:n,renderCallback:r,modelStore:s,selectionStore:c}));const d={},f=[],p=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach(t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async n=>{await i,p.push(e),f.push(t),null==a||null===(n=a.current)||void 0===n||n.setComps(p)})(),remove(e){o||(async t=>{await i;const n=p.indexOf(e);var r;-1!==n&&(null===(r=f[n])||void 0===r||r.call(f),p.splice(n,1),f.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await i,null==a||null===(t=a.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await i,e&&Il(e),null==a||null===(t=a.current)||void 0===t||t.setContext(e)})()},destroy(){o=!0,f.forEach(e=>{e&&e()}),s.destroy(),u.unmount(),document.body.removeChild(l)}},s,c,a,i]}function Nl(){const{useModelStore:e}=l(ql).modelStore;return e()}function Al(e,t,...o){const i=t?`${t.id}/${JSON.stringify(e)}`:null,[a]=Nl(),[s]=function(){const{useRpcRequestSessionModelStore:e}=l(ql).modelStore;return e()}(),[c,u]=n();return r(()=>{if(!t)return;(async()=>{let n=s.get(i);n||(n=t.createSessionObject(e),s.set(i,n));const r=await n;a.set(i,r),u(r)})()},[t,...o]),[c]}const jl={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ml(e){return Al(jl,e)}const $l=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Z(Z({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Z({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Z(Z({},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 zl(e,t){const n=e?`${e.id}`:null,[o]=function(){const{useRpcResultStore:e}=l(ql).modelStore;return e()}(),[i,a]=s($l,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=l(ql).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=l(ql).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const f=async r=>{let i=d[t];if(!i||i&&i.rpcRetry){i={rpc:e[t](),rpcRetry:!1},d[t]=i,a({type:"INVALID",method:t,key:n,model:e,rpcResultStore:o,canCancel:!0})}try{await(l=0,new Promise(e=>{setTimeout(e,l)}));const r=await i.rpc;a({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:o})}catch(e){15!==e.code||r||(i.rpcRetry||(i.rpcRetry=!0),f(!0))}var l},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(d[t].rpc.requestId),a({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:o})},retry:()=>{d[t].rpcRetry=!0,f()}};return r(()=>{e&&f()},[e,c.get(e&&e.id),n,t]),[i&&i.result,{validating:i&&i.validating,canCancel:i&&i.canCancel,canRetry:i&&i.canRetry},p]}function Fl(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=zl(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 Bl(e){return zl(e,"getAppLayout")}function Wl(){const[e,t]=n(),[r,o]=n(),i=c(e=>{e&&t(e)},[]),a=()=>{const{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();o({left:t,top:n,width:r,height:i})};return u(()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(a);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}}},[e]),[i,r,e]}const Ul="singlepublic-pinnedItems",Hl=e=>{var t;const[o]=(e=>{const[t,o]=n(null),[i,a]=n(null),[l]=Nl();return r(()=>{let t=!0,n=()=>{};if(e)return async function(){try{const r=`${e.id}-${Ul}`;let i=l.get(r);if(!i){if(i=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,Ul),!t)return;if(i){l.set(r,i);const e=()=>{l.clear(r)};i.once("closed",e),n=()=>{i.removeListener("closed",e)}}}t&&(a(null),o(i))}catch(e){t&&(a(e instanceof Error?e:new Error(String(e))),o(null))}}(),()=>{t=!1,n()}},[e,l]),[t,i]})(e),[i]=zl(o,"getLayout");return[null!==(t=null==i?void 0:i.pinnedItems)&&void 0!==t?t:[]]},Vl=(e,t,o)=>{const[i,a]=n(void 0),[l,s]=n(void 0),[c]=Nl();return r(()=>{let n=!0,r=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const i=`${e.id}-${t}`;let l=c.get(i);if(!l){try{l=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!o)throw t;l=await e.createSessionObject(o)}if(!n)return;c.set(i,l);const a=()=>{c.clear(i)};l.once("closed",a),r=()=>{l.removeListener("closed",a)}}n&&(s(void 0),a(l))}catch(e){n&&(s(e instanceof Error?e:new Error(String(e))),a(void 0))}}(),()=>{n=!1,r()}},[e,t,c]),[i,l]},Gl={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Kl={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Jl="qField",Ql="id",Zl=(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},Xl=(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=>Jl in n&&n[Jl]?e.some(e=>e.qName===n[Jl]):!(!(Ql in n)||!n[Ql])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ql]&&"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 l;const t=o[e],n=!(!(Ql in t)||!t[Ql]),s=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ql]}):null,c=n?null==s||null===(l=s.qData)||void 0===l||null===(l=l.info[0])||void 0===l?void 0:l.qName:t[Jl],u=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[Ql]||!n&&(e.selections[0].qField===c||e.selections[0].qReadableName===c)});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)===c&&!e.isPinned})))if(-1===u){const t=Z(Z({},o[e]),{},{isPinned:!0,states:["$"]});n&&s&&(t.qField=c,t.qName=s.qData.labelExpression||s.qData.title||c),i.push(t)}else i.push(a[u]),a.splice(u,1)}return[...i,...a]};function Yl(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function es({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=Z({fontSize:Yl(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return ar.jsx("i",{style:o,children:ar.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)=>ar.jsx(e,Z({},t),n))})})}var ts=e=>es((e=>Z(Z({},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 ns=e=>es((e=>Z(Z({},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 rs=e=>Z(Z({},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 os=e=>es(rs(e));var is=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}}(),as=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},ls=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=as(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[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},as(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)}(e,d),is(e,[{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,l=n.threshold,s=void 0===l?15:l,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],l=null,s=null,c=o;c<=i;c++)t(c)?null!==s&&(a.push(l,s),l=s=null):(s=c,null===l&&(l=c));if(null!==s){for(var u=Math.min(Math.max(s,l+r-1),n-1),d=s+1;d<=u&&!t(d);d++)s=d;a.push(l,s)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var f=a[0]-1;if(t(f))break;a[0]=f}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-s),stopIndex:Math.min(o-1,t+s)});(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)}}]),e}();const ss=["S","XS"],cs=e=>e.reduce((e,t)=>e.concat(t));function us(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!ss.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return cs(t)}async function ds({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 fs="RowColumn",ps={row:`${fs}-row`,rowBorderBottom:`${fs}-rowBorderBottom`,column:`${fs}-column`,fieldRoot:`${fs}-fieldRoot`,cell:`${fs}-cell`,labelText:`${fs}-labelText`,labelDense:`${fs}-labelDense`,highlighted:`${fs}-highlighted`,checkboxLabel:`${fs}-checkboxLabel`,icon:`${fs}-icon`,S:`${fs}-S`,XS:`${fs}-XS`,A:`${fs}-A`,X:`${fs}-X`,frequencyCount:`${fs}-frequencyCount`,barContainer:`${fs}-barContainer`,bar:`${fs}-bar`,barSelected:`${fs}-barSelected`,barWithCheckbox:`${fs}-barWithCheckbox`,barSelectedWithCheckbox:`${fs}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${fs}-excludedTextWithCheckbox`},hs=`.${ps.fieldRoot}`,ms=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function gs({selectionState:e,selections:t,checkboxes:n=!1,doc:o=document,loaderRef:i}){var a;const l=f({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r(()=>{var e;if(null===(e=i.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=i.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}},[null===(a=i.current)||void 0===a||null===(a=a._listRef)||void 0===a?void 0:a._outerRef]);const s=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),ds({selections:t,elemNumbers:l.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:l.current.toggle}))},u=(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 cs(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)},d=t=>{const{startElemNumber:n}=l.current;if(n===t)return;const r=u(l.current.startElemNumber,t);e.updateItems(r,!0,l.current.elemNumbers)},p=c(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&ms(t.nativeEvent);l.current.elemNumbers=[n],l.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),l.current.active=!1,s()},[]),h=c(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&ms(t);l.current.isRange=!1,l.current.startElemNumber=n,l.current.elemNumbers=[n],l.current.toggle=r,l.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(l.current.active=!1,s()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),m=c(e=>{if(0===e.button&&l.current.active){if(l.current.active=!1,l.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}s()}},[]),g=c(e=>{0===e.button&&l.current.active&&(l.current.active=!1,s())},[]),b=c(t=>{if(!l.current.active)return;l.current.isRange||(l.current.isRange=!0,e.isSelected(l.current.startElemNumber)||(e.updateItem(l.current.startElemNumber,!0),l.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");d(n)},[]),y=c(t=>{var n,r;if(l.current.active||l.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(hs))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(hs))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void s();l.current.active=!0;u(o,i).length<7&&(l.current.touchRangeSmall=!0),l.current.elemNumbers=[],l.current.touchElemNumbers=[o,i]},[]),v=c(()=>{if(2!==l.current.touchElemNumbers.length)return;if(l.current.touchRangeSmall)return l.current.touchRangeSmall=!1,l.current.touchElemNumbers=[],void(l.current.active=!1);const[e,t]=l.current.touchElemNumbers;l.current.startElemNumber=e,d(t),l.current.touchElemNumbers=[],l.current.active=!1,l.current.toggle=!0,s()},[]);r(()=>(o.addEventListener("mouseup",g),()=>{o.removeEventListener("mouseup",g)}),[g]),r(()=>{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 S={};return n?Object.assign(S,{onChange:p}):Object.assign(S,{onMouseUp:m,onMouseDown:h,onMouseEnter:b,onTouchStart:y,onTouchEnd:v}),{interactionEvents:S,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&&ms(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const l=[];return e.updateItems(n,r,l),e.setSelectableValuesUpdating(),ds({selections:t,elemNumbers:r?l:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const bs=e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ys=e=>es(bs(e));const vs=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,Ss=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||vs(e))&&t;const ws=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?ps.column:ps.row];t||o.push(ps.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?ps.XS:ps.S;break;case"S":case"L":n=ps.S;break;case"A":n=!!t&&ps.A;break;case"X":case"XL":n=!!t&&ps.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},xs=e=>e.filter(e=>!!e).join(" ").trim(),ks=e=>e||"-",Cs=["backgroundColor"],Es=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},Ls=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,Rs=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${ps.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${ps.labelText}`]:{color:i},[`& .${ps.icon}`]:{color:i}}},Ts={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},qs=ol("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:l,freqHitsValue:s,styles:c})=>{const u=c.content,{backgroundColor:d}=u,f=X(u,Cs),p=Rs({styles:c,checkboxes:t,selectionState:"selected"}),h=Rs({styles:c,checkboxes:t,selectionState:"excluded"}),m={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},g={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${ps.row}`]:Z({flexWrap:"nowrap"},c.content),[`& .${ps.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${ps.column}`]:Z({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},c.content),[`& .${ps.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${ps.labelText}`]:Z(Z({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Ts),f),[`& .${ps.labelDense}`]:{lineHeight:"18px"},[`& .${ps.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${ps.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Z(Z({},Ts),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${ps.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:f.color},[`& .${ps.S}`]:Z(Z({},p),{},{"&: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}),[`& .${ps.XS}`]:Z(Z({},Rs({styles:c,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${ps.A}`]:Z(Z({},Rs({styles:c,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${ps.X}`]:Z(Z({},h),{},{border:n?"none":void 0}),[`& .${ps.X}, & .${ps.XS}`]:{border:n?"none":void 0,[`& .${ps.barSelected} .bar-filled`]:Z({},m)},[`& .${ps.frequencyCount}`]:Z(Z({zIndex:3,justifyContent:"flex-end"},Ts),{},{flex:`0 0 ${Es({sizes:a,frequencyMode:l,isGridMode:n,freqHitsValue:s})}`,minWidth:!n&&"P"!==l&&s?a.freqMinWidth:"max-content",maxWidth:Ls({sizes:a,frequencyMode:l,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${ps.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${ps.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":Z({},m)},[`& .${ps.barSelected}`]:{"& .bar-filled":Z({},g)},[`& .${ps.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${ps.barSelectedWithCheckbox}`]:{"& .bar-filled":Z(Z({},g),{},{backgroundColor:c.selections.selected||"#BFE5D0",borderColor:c.selections.selected})},[`& .${ps.excludedTextWithCheckbox}`]:{color:c.content.color,fontStyle:"italic"}}});var Ps=t.memo(qs);const Is="ListBoxCheckbox",_s={cbIcon:`${Is}-cbIcon`,cbIconChecked:`${Is}-cbIconChecked`,cbIconExcluded:`${Is}-cbIconExcluded`,cbIconAlternative:`${Is}-cbIconAlternative`,checkbox:`${Is}-checkbox`,dense:`${Is}-dense`},Os=ol(S,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${_s.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"},[`& .${_s.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:'""'}},[`& .${_s.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${_s.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${_s.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${_s.dense}`]:{padding:"4px 8px"}})),Ds=(e,t=!0,n=!1)=>ar.jsx("span",{className:e.cbIcon,children:n&&ar.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function Ns({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:l}){return ar.jsx(Os,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[_s.checkbox,r&&_s.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":l},name:n,icon:Ds(_s,a,o),checkedIcon:ar.jsx("span",{className:_s.cbIconChecked}),styles:i})}const As={radioButton:"ListBoxRadioButton-radioButton"},js=ol(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${As.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Ms({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return ar.jsx(js,{checked:t,onChange:e,value:n,name:n,className:As.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function $s({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return ar.jsx(x,{component:"span",variant:"body2",className:xs([ps.labelText,t&&ps.labelDense,n&&Ss({cell:o,checkboxes:r})&&ps.excludedTextWithCheckbox]),align:i,dir:"auto",children:ar.jsx("span",{children:e})})}function zs({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?ar.jsx($s,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function Fs({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}){const f=ar.jsx(Ns,{onChange:e,label:t,checked:r,dense:o,excluded:vs(i),isGridCol:a,showGray:l,dataN:n,styles:d}),p=ar.jsx(Ms,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return ar.jsx(k,{control:s?p:f,className:ps.checkboxLabel,label:ar.jsx(zs,{label:t,dense:o,showGray:l,checkboxes:c,cell:i,valueTextAlign:u})},n)}function Bs({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>ar.jsx("span",{id:n,className:t?ps.highlighted:"",children:e}));return ar.jsx($s,{label:o,dense:t,showGray:n,checkboxes:r})}function Ws({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:l,isGridCol:s,isSingleSelect:c,valueTextAlign:u,styles:d}){const f=ar.jsx(Bs,{labels:t,dense:r,showGray:o,checkboxes:n});return n?ar.jsx(Fs,{onChange:e,label:f,qElemNumber:i,isSelected:a,dense:r,cell:l,isGridCol:s,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):f}var Us=t.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}){return c?ar.jsx(Fs,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:l,isSingleSelect:s,checkboxes:c,valueTextAlign:u,styles:d}):ar.jsx($s,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});const Hs={top:"flex-start",center:"center",middle:"center",bottom:"flex-end"},Vs={left:"flex-start",center:"center",right:"flex-end"},Gs=e=>{var t,n;const{vertical:r,horizontal:o}=(e=>{const t=e||"top-center";if(t.includes("-")){const[e,n]=t.split("-");return{vertical:e,horizontal:n}}const n=t.match(/^(top|middle|center|bottom)(left|center|right)$/i);return n?{vertical:n[1].toLowerCase(),horizontal:n[2].toLowerCase()}:{vertical:"top",horizontal:"center"}})(e);return{vertical:null!==(t=Hs[r])&&void 0!==t?t:"flex-start",horizontal:null!==(n=Vs[o])&&void 0!==n?n:"center"}},Ks=e=>"fitHeight"===e?"auto":"100%",Js=e=>{let t="center",n="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?n="left":"flex-end"===(null==e?void 0:e.horizontal)&&(n="right"),`${n} ${t}`},Qs=e=>{switch(e){case"alwaysFit":case"fitHeight":return"contain";case"stretch":return"fill";case"alwaysFill":return"cover";default:return}};function Zs({representation:e,src:t,label:r,title:o,subtitle:i,cellBgColor:a,borderColor:l,placeholderBackground:s,textStyles:c,selected:u=!1,selectionColor:d="#009845",opacity:f=1}){var p,h,m,g,b,y,v,S,w,x,k;const{imageSize:C="alwaysFit",imagePosition:E,titlePosition:L="top-center",textOverlay:R=!0,titleBackground:T=!0,cornerRadius:q=4,borderWidth:P=0,borderColor:I}=e,_="fitHeight"===C,O="fitWidth"===C,D=Gs(E),N="200px",A=(e=>{if("string"!=typeof e||!e.trim())return!1;try{const t=new URL(e,window.location.origin);return"https:"===t.protocol||"http:"===t.protocol||"data:"===t.protocol&&/^data:image\//i.test(e.trim())}catch(e){return!1}})(t)?t:null,[j,M]=n(null),$=null!==A&&A===j,z=`${q}px`,F=null!==(p=null!=l?l:"string"==typeof I?I:null==I?void 0:I.color)&&void 0!==p?p:"#d9d9d9";let B;B=u?`2px solid ${d}`:P>0?`${P}px solid ${F}`:"2px solid transparent";const W=A&&!$?ar.jsx("img",{src:A,alt:r,onError:()=>M(A),style:{width:Ks(C),height:O?"auto":"100%",maxHeight:_&&!O?N:void 0,objectFit:Qs(C),objectPosition:Js(D),overflow:"hidden"}}):null,U=Gs(L),H=!1!==R&&(o||i),V=null!=c?c:{},G=Boolean(A),K=G&&!T&&null!==(h=V.shadowOnImage)&&void 0!==h?h:"none",J=H?ar.jsx("div",{"data-key":"image-title-overlay",style:{position:"absolute",inset:0,display:"flex",justifyContent:U.horizontal,alignItems:U.vertical,padding:"4px",pointerEvents:"none",boxSizing:"border-box"},children:ar.jsxs("div",{style:{maxWidth:"100%",padding:T&&G?"2px 6px":0,borderRadius:T&&G?"3px":0,backgroundColor:T&&G&&null!==(m=V.backdropColor)&&void 0!==m?m:"transparent",overflow:"hidden",textAlign:"center"===U.horizontal?"center":void 0},children:[o&&ar.jsx("div",{"data-key":"image-title",style:{fontFamily:V.fontFamily,fontSize:null!==(g=V.fontSize)&&void 0!==g?g:"13px",fontWeight:null!==(b=V.fontWeight)&&void 0!==b?b:"bold",fontStyle:null!==(y=V.fontStyle)&&void 0!==y?y:"normal",textDecoration:null!==(v=V.textDecoration)&&void 0!==v?v:"initial",color:null!==(S=V.color)&&void 0!==S?S:"#333333",textShadow:K,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),i&&ar.jsx("div",{"data-key":"image-subtitle",style:{fontFamily:V.fontFamily,fontSize:null!==(w=V.subtitleFontSize)&&void 0!==w?w:"11px",fontStyle:null!==(x=V.fontStyle)&&void 0!==x?x:"normal",color:null!==(k=V.color)&&void 0!==k?k:"#333333",opacity:.8,textShadow:K,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]})}):null;return ar.jsxs("div",{"data-key":"image-horizontal-container",style:{position:"relative",width:"100%",height:_?N:"100%",overflow:"hidden",display:"flex",justifyContent:_?null==D?void 0:D.horizontal:void 0,backgroundColor:a||s||void 0,borderRadius:z,border:B,opacity:f,boxSizing:"border-box"},children:[W,J]})}function Xs({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==ks(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 ar.jsx(C,{className:xs([ps.bar,n&&ps.barWithCheckbox,r&&(n?ps.barSelectedWithCheckbox:ps.barSelected)]),children:ar.jsx(C,{className:"bar-filled",width:i})})}function Ys({cell:e,checkboxes:t,dense:n,showGray:r}){const o=ks(null==e?void 0:e.qFrequency);return ar.jsx(E,{style:{display:"flex",alignItems:"center"},className:ps.frequencyCount,"aria-label":o,title:o,children:ar.jsx(x,{noWrap:!0,color:"inherit",variant:"body2",className:xs([n&&ps.labelDense,ps.labelText,r&&Ss({cell:e,checkboxes:t})&&ps.excludedTextWithCheckbox]),children:o})})}function ec({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r,isImage:o}){if("singleColumn"===e||o)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 tc=ol(E,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight","isImage"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i,isImage:a})=>{const l="padding"+("rtl"===o?"Left":"Right");let s;return!a&&r?s="8px":a&&(s=0),{[`&.${ps.fieldRoot}`]:Z(Z({},ec({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i,isImage:a})),{},{[l]:s})}});const nc=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===nc.ARROW_UP||e===nc.ARROW_DOWN||e===nc.ARROW_LEFT||e===nc.ARROW_RIGHT});function rc(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function oc(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 ic({containerRef:e,enabled:t}){const[r,o]=n(!1),i={enabled:t,active:r,innerTabStops:!t||r,blur(n){var r;if(!t)return;o(!1);const i=oc(e.current)||(null===(r=e.current)||void 0===r?void 0:r.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),rc(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;o(!0);const n=e.current,r=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"),l=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),s=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||r||i||a||s||l;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const ac=e=>+e.getAttribute("data-n"),lc=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},sc=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(),rc(e),o},cc=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},uc=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=oc(i),l=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||l)t.blur(!0);else{rc(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function dc({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:l,isModal:s,rowCount:c,columnCount:u,rowIndex:d,columnIndex:f,layoutOrder:p}){const h=(e,t,n=!1)=>{if(e===nc.ARROW_LEFT||e===nc.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const l=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let s=e,c=t;if(i===nc.ARROW_DOWN)if(e>=l(t)-1){if(t===r-1)return-1;s=0,c=t+1}else s=e+1;else if(0===e){if(0===t)return-1;s=l(t-1)-1,c=t-1}else s=e-1;if("row"===o)return s*r+c;const u=a%n;return 0===u||s<u?s*r+c:(s-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:f,rowCount:c,columnCount:u,layoutOrder:p,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:f}=c,{keyCode:p,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=f;switch(p){case nc.TAB:{const e=d.closest(".listbox-container"),t=void 0!==s?s():void 0;d.classList.add("last-focused");if(!(null!=l&&l.enabled)){if(!t)return;return l.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){lc(e)||cc(e)||(t?l.focusSelection():uc(c,l));break}l.focusSelection()||cc(e)||lc(e)||(d.blur(),uc(c,l));break}case nc.SHIFT:g(!0);break;case nc.SPACE:e([ac(d)],!1,c);break;case nc.ARROW_DOWN:case nc.ARROW_RIGHT:u=h(p,d,!0),b&&u&&(m&&(e([ac(d)],!0),g(!1)),e([ac(u)],!0));break;case nc.ARROW_UP:case nc.ARROW_LEFT:u=h(p,d,!1),b&&u&&(m&&(e([ac(d)],!0),g(!1)),e([ac(u)],!0));break;case nc.ENTER:if(r(),void 0===s)return;break;case nc.ESCAPE:if(void 0===s)return void o();if(!s())return;o();break;case nc.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case nc.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case nc.A:if(y||v){t();break}return;case nc.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const fc={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 pc(e){var t;return((null==e||null===(t=e.qListObject)||void 0===t?void 0:t.qExpressions)||[]).reduce((e,t,n)=>(e[t.qLabel]=n+1,e),{})}function hc(e,t,n,r){const o=e[t]||(e[t]={});return null!=r&&""!==r&&(o[n]=r),o[n]}function mc({index:e,rowIndex:t,columnIndex:o,style:a,data:l}){var s,u,d,f;const{onChange:p,onClick:h,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onTouchStart:y,onTouchEnd:v,pages:S,isLocked:w,column:x=!1,checkboxes:k=!1,textAlign:C,direction:L,layoutOptions:R={},freqIsAllowed:T,isSingleSelect:q,actions:P,frequencyMax:I="",histogram:_=!1,keyboard:O,showGray:D=!0,showTick:N=!0,columnCount:A=1,rowCount:j=1,dataOffset:M,deducedFrequencyMode:$,focusListItems:z,listCount:F,sizes:B,translator:W,showSearch:U,isModal:H,contentFontStyle:V,styles:G,fillHeight:K,representation:J,listExprIndex:Q={},exprCache:X={}}=l,{dense:Y=!1,dataLayout:ee="singleColumn",layoutOrder:te}=R,{itemPadding:ne,gridGap:re=0}=B,oe="image"===(null==J?void 0:J.type),ie=oe?"row":te;let ae,le;const se={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof o){"row"===ie?(ae=t*A+o,se.max=j,se.currentIndex=t):(ae=o*j+t,se.max=A,se.currentIndex=o);const e=0;le=Z(Z({},a),{},{height:K?"100%":a.height,left:e+(0===o?a.left:Number(a.left)+o*e),top:0===t?a.top:Number(a.top)+t*e}),oe&&re>0&&(le.width=Math.max(1,Number(a.width)-re),le.height=Math.max(1,Number(a.height)-re),le.left=Number(a.left)+re/2,le.top=Number(a.top)+re/2)}else ae=e,se.max=F,se.currentIndex=e,le=Z({},a);ae+=M;const[ce,ue]=n(null);r(()=>{null!==ce&&(0===se.currentIndex&&z.first&&(ce.focus(),z.setFirst(!1)),se.currentIndex===se.max-1&&z.last&&(ce.focus(),z.setLast(!1)))},[ce,z.first,z.last]);const de=c(dc(Z(Z({},P),{},{focusListItems:z,keyboard:O,isModal:H,rowCount:j,columnCount:A,rowIndex:t,columnIndex:o,layoutOrder:ie})),[P,null==O?void 0:O.innerTabStops,j,A,t,o,ie]),fe=i(()=>function({pages:e,cellIndex:t}){const n=null==e?void 0:e.find(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight);if(n){const e=n.qArea;if(t>=e.qTop&&t<e.qTop+e.qHeight)return n.qMatrix[t-e.qTop]}}({pages:S,cellIndex:ae}),[S,ae]),pe=null==fe?void 0:fe[0],he="S"===(null==pe?void 0:pe.qState)||"XS"===(null==pe?void 0:pe.qState)||"L"===(null==pe?void 0:pe.qState)||"XL"===(null==pe?void 0:pe.qState),me=i(()=>ws({column:x,histogram:_,cell:pe,showGray:D}),[null==pe?void 0:pe.qState,_,Y]),ge=c(e=>{e.preventDefault()},[k]),be=i(()=>pe&&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:L,cell:pe,textAlign:C}),[L,pe,C]);if(!pe)return null;const ye="grid"===ee&&"column"===te,ve=null!==(s=null==pe?void 0:pe.qText)&&void 0!==s?s:"",Se=oe;let we,xe,ke,Ce,Ee,Le,Re,Te,qe=1;if(Se){var Pe,Ie,_e,Oe;Le=(null==G||null===(Pe=G.selections)||void 0===Pe?void 0:Pe.selected)||"#009845","X"===pe.qState||"XS"===pe.qState||"XL"===pe.qState?qe=.3:"A"===pe.qState&&(qe=.4),Re="A"===pe.qState?"#e0e0e0":"#f0f0f0";const e=null!==(Ie=null==pe?void 0:pe.qElemNumber)&&void 0!==Ie?Ie:ve,t=t=>{var n;const r=Q[t];if(null!=r)return hc(X,t,e,null==fe||null===(n=fe[r])||void 0===n?void 0:n.qText)},n=null!==(_e=null==J?void 0:J.imageSetting)&&void 0!==_e?_e:"label",r=t("imageUrl"),o=t("imageLabel");ke=t("subtitle");if("expression"===(null!==(Oe=null==J?void 0:J.cellBgColorMode)&&void 0!==Oe?Oe:"single"))Ce=t("cellBgColor");else{const e=null==J?void 0:J.cellBgColor;Ce="string"==typeof e?e:null==e?void 0:e.color}Ee=t("tooltip")||ve,"url"===n?(we=r||ve,xe=ve):(we=ve,xe=o||ve)}if(null!==(u=pe.qHighlightRanges)&&void 0!==u&&null!==(u=u.qRanges)&&void 0!==u&&u.length){const e=pe.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];Te=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,l=t[o].qCharPos+t[o].qCharCount;return a&&l<e.length&&n.push([e.slice(l),!1]),n},[]);return n}(ve,e)}const De={alignItems:"center",display:"flex",fontSize:"8px"},Ne="rtl"===L,Ae={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:Se?0:Ne?8:k?0:void 0,paddingRight:Se||k?0:Ne?8:0,justifyContent:be,textAlign:be},je=0===e,Me=he&&w,$e=!k&&he&&!w,ze=!k&&N&&!Se,Fe=k||!N,Be=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const l=fc[n],s=e.get(l),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${s}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:W,label:Se?[ve,ke,Ee!==ve?Ee:null].filter(Boolean).join(", "):ve,qState:pe.qState,currentIndex:se.currentIndex,maxIndex:se.max,showSearch:U}),We=!Ne&&"right"===be||Ne&&"left"===be;return ar.jsx(Ps,{className:ps.barContainer,checkboxes:k,style:le,styles:G,isGridCol:ye,isGridMode:"grid"===ee,dense:Y,direction:L,sizes:B,frequencyMode:$,freqHitsValue:We,contentFontStyle:V,"data-testid":"listbox.item",children:ar.jsxs(tc,{role:"row","aria-label":Be,"aria-selected":he,"aria-setsize":se.max,"aria-rowindex":se.currentIndex,ref:ue,container:!0,dataLayout:ee,cellPaddingRight:Fe,layoutOrder:te,itemPadding:ne,isImage:Se,gap:0,className:xs(["value",ps.fieldRoot,...me]),onClick:h,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onKeyDown:de,onTouchStart:y,onTouchEnd:v,onContextMenu:ge,tabIndex:je&&O.innerTabStops?0:-1,"data-n":null==pe?void 0:pe.qElemNumber,direction:L,fillHeight:K,children:[(null==pe?void 0:pe.qFrequency)&&ar.jsx(Xs,{qFrequency:null==pe?void 0:pe.qFrequency,histogram:_,checkboxes:k,isSelected:he,frequencyMax:I}),ar.jsx(E,{style:Ae,className:xs([ps.cell,ps.selectedCell]),title:Se?`${Ee}`:`${ve}`,children:Se?ar.jsx(Zs,{representation:J,src:we,label:xe,title:ve,subtitle:ke,cellBgColor:Ce,borderColor:null==G||null===(d=G.image)||void 0===d?void 0:d.borderColor,textStyles:null==G||null===(f=G.image)||void 0===f?void 0:f.text,placeholderBackground:Re,selected:he,selectionColor:Le,opacity:qe}):Te?ar.jsx(Ws,{onChange:p,labels:Te,checkboxes:k,dense:Y,showGray:D,qElemNumber:pe.qElemNumber,isSelected:he,cell:pe,isGridCol:ye,isSingleSelect:q,valueTextAlign:be,styles:G}):ar.jsx(Us,{onChange:p,label:ve,qElemNumber:pe.qElemNumber,isSelected:he,dense:Y,cell:pe,isGridCol:ye,showGray:D,isSingleSelect:q,checkboxes:k,valueTextAlign:be,styles:G})}),T&&ar.jsx(Ys,{cell:pe,checkboxes:k,dense:Y,showGray:D}),ze&&ar.jsxs(E,{className:ps.icon,children:[Me&&ar.jsx(ns,{style:De,size:"small"}),$e&&ar.jsx(ys,{style:De,size:"small"})]})]})})}var gc=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function bc(e,t){return e===t||!(!gc(e)||!gc(t))}function yc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!bc(e[n],t[n]))return!1;return!0}function vc(e,t){var n;void 0===t&&(t=yc);var r,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Sc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function wc(e){cancelAnimationFrame(e.id)}function xc(e,t){var n=Sc();var r={id:requestAnimationFrame(function o(){Sc()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var kc=-1;function Cc(e){if(void 0===e&&(e=!1),-1===kc||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),kc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return kc}var Ec=null;function Lc(e){if(void 0===e&&(e=!1),null===Ec||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?Ec="positive-descending":(t.scrollLeft=1,Ec=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ec}return Ec}var Rc=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Tc(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,f=e.getRowOffset,h=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,b=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,Sl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Sl(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=vc(function(e,t,n,o,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})}),r._callOnScroll=void 0,r._callOnScroll=vc(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,l=a.columnWidth,s=a.direction,c=a.rowHeight,d=r._getItemStyleCache(b&&l,b&&s,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var h=n(r.props,t,r._instanceProps),m="rtl"===s;d[p]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f(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=vc(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,l=t.scrollHeight,s=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(Lc()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-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&&wc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=xc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}vl(t,e),t.getDerivedStateFromProps=function(e,t){return qc(e,t),y(e),null};var d=t.prototype;return d.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)},d.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,f=i.rowCount,p=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=Cc();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,f-1)));var y=a(this.props,this._instanceProps),v=l(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?s(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},d.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()},d.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(Lc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&wc(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,f=e.itemKey,h=void 0===f?Rc:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,x=this._getHorizontalRangeToRender(),k=x[0],C=x[1],E=this._getVerticalRangeToRender(),L=E[0],R=E[1],T=[];if(r>0&&b)for(var q=L;q<=R;q++)for(var P=k;P<=C;P++)T.push(p(t,{columnIndex:P,data:d,isScrolling:v?w:void 0,key:h({columnIndex:P,data:d,rowIndex:q}),rowIndex:q,style:this._getItemStyle(q,P)}));var I=a(this.props,this._instanceProps),_=l(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:bl({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:T,ref:s,style:{height:I,pointerEvents:w?"none":void 0,width:_}}))},d._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],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,l,d,f,s,c,p,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)}},d._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,f=n||i||a||1;if(0===t||0===l)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},d._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),f=m(this.props,d,c,this._instanceProps),p=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,f+g)),d,f]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var qc=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Pc=function(e,t){return e};function Ic(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=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=s(r.props,Sl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Sl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=vc(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=vc(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,l=i.itemSize,s=i.layout,u=r._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),f=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===s,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=vc(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(Lc()){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&&wc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=xc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}vl(t,e),t.getDerivedStateFromProps=function(e,t){return _c(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 l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?Cc():0:s.scrollHeight>s.clientHeight?Cc():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},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(Lc()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&wc(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,f=void 0===d?Pc:d,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w="horizontal"===o||"horizontal"===h,x=w?this._onScrollHorizontal:this._onScrollVertical,k=this._getRangeToRender(),C=k[0],E=k[1],L=[];if(c>0)for(var R=C;R<=E;R++)L.push(p(t,{data:u,key:f(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var T=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:bl({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(l||s||"div",{children:L,ref:a,style:{height:w?"100%":T,pointerEvents:S?"none":void 0,width:w?T:"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,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),f=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var _c=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Oc=Tc({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,l=e.columnWidth,s=e.width,c=Math.max(0,a*l-s),u=Math.min(c,t*l),d=Math.max(0,t*l-s+i+l);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var f=Math.round(d+(u-d)/2);return f<Math.ceil(s/2)?0:f>c+Math.floor(s/2)?c:f;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,l=e.height,s=e.rowCount,c=Math.max(0,s*a-l),u=Math.min(c,t*a),d=Math.max(0,t*a-l+i+a);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var f=Math.round(d+(u-d)/2);return f<Math.ceil(l/2)?0:f>c+Math.floor(l/2)?c:f;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,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-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,l=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+l-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Dc=Ic({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,l=e.height,s=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,f="horizontal"===a||"horizontal"===u?d:l,p=Math.max(0,s*c-f),h=Math.min(p,t*c),m=Math.max(0,t*c-f+c+i);switch("smart"===n&&(n=r>=m-f&&r<=h+f?"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(f/2)?0:g>p+Math.floor(f/2)?p: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,l=e.layout,s=e.width,c=t*a,u="horizontal"===r||"horizontal"===l?s: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 Nc="#BBB",Ac="#f1f1f1",jc={styledScrollbars:"ListBox-styledScrollbars"};function Mc({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:l}){const s="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,s),u=s?n.column:n.row,d=(s?r:o)>=u,f=((e,t,n,r)=>e===t*n+r+n)(a,c,s?o:r,l),p=!!l&&((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,s),h=d&&!f&&c>=u-1||p||i.state.show;i.set(h)}const{StyledFixedSizeList:$c,StyledFixedSizeGrid:zc}=function(){const e=e=>({scrollbarColor:`${Nc} ${Ac}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ac},"&::-webkit-scrollbar-thumb":{backgroundColor:Nc,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(Dc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${jc.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:v(Oc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${jc.styledScrollbars}`]:e(t)}))}}();function Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let l;const s=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);l=!1!==e.auto?c:Math.min(n,s,c),l=Math.max(l,1);const u=Math.ceil(n/l);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:l}}const Bc=(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)},Wc=e=>{const t=i(()=>"text"in e?e:{},[e]);return i(()=>Bc(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function Uc(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Hc({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function Vc({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:l}){const{layoutOptions:s={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:f,dataLayout:p}=s,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==l?void 0:l.content)||{},g=`${h} ${m}`,b=Wc({text:Uc(e),font:g}),y=Wc({text:Uc(5),font:g}),v=Wc({text:Uc(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));let T=0;const q="grid"===p,P=null==e?void 0:e.representation,I="image"===(null==P?void 0:P.type);let _=Hc({isGridMode:q,dense:f});const O=null!=n?n:8*_;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 l;const s=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));l=!1!==(null==e?void 0:e.auto)?s:Math.min(t,i,s),l=Math.max(l,1);const c=a/l;return{rowCount:Math.ceil(t/l),columnWidth:c,columnCount:l}}({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}){const l=Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a});return l.columnWidth*l.columnCount-i>1?Fc({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r-10,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}):l}({maxVisibleRows:u,itemHeight:_,listCount:r,listHeight:O,columnAutoWidth:R,containerWidth:e,itemMinWidth:x})))}if(I&&q){var D,N,A,j;const e=5,n=4,o=null===(D=null==d?void 0:d.auto)||void 0===D||D,i=null===(N=null==u?void 0:u.auto)||void 0===N||N,a=Math.max(1,null!==(A=o||null==d?void 0:d.maxColumns)&&void 0!==A?A:e),l=Math.max(1,null!==(j=i||null==u?void 0:u.maxRows)&&void 0!==j?j:n);C=a,E=Math.max(1,(t-10)/C),_=Math.max(36,Math.floor(O/l)),L=Math.ceil((r||1)/C),k={overflowX:"hidden"};const s=null==P?void 0:P.gridGap,c=Math.max(0,Number.isFinite(s)?s:.5);T=Math.min(Math.round(c/100*t),E-1,_-1),T=Math.max(0,T)}C=("singleColumn"===p?1:C)||1,L=("singleColumn"===p?o:L)||r;const M=s.dense?838e3:577e3;L=Math.min(L,M);const $=Math.floor(3355e4/E);C=Math.min(C,$)||1;const z=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:k,itemHeight:_,listHeight:O,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,z),maxCount:{row:M,column:$},itemPadding:4,gridGap:T,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function Gc({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[Kc]=_l({});function Jc(e){const t=`${e.id}`,[n]=Kc();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Qc=ol(x,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>Z({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function Zc({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=l(ql);return ar.jsx(L,{title:r?o.get(t):"",children:ar.jsx(Qc,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var Xc=function(t){function n(e,n){return ar.jsx(gl,{"data-testid":void 0,ref:n,...e,children:t})}return n.muiName=gl.muiName,e.memo(e.forwardRef(n))}(ar.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 Yc=ol(R)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),eu=ol("div")(()=>({paddingLeft:"6px",flexGrow:1})),tu=ol("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),nu=ol(Xc)(()=>({fontSize:"14px"}));function ru({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),l=Math.min(i,r)-42,s=n&&r<i;return ar.jsxs(Yc,{left:a,style:{maxWidth:i},children:[ar.jsx(eu,{children:ar.jsx(Zc,{text:e,dense:n,width:l,tooltip:s})}),ar.jsx(tu,{dense:n,children:o&&ar.jsx(T,{"aria-label":"close",onClick:()=>t(),children:ar.jsx(nu,{})})})]})}function ou({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 iu=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,au=e=>{const t=iu(e);return`Max(AGGR(Count(${t}), ${t}))`},lu=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[l,s]=n(o);return r(()=>{if(!o)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=au(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),s(!1)})()},[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:l}};const su={S:!0,L:!0};const cu=["isLoadingData"],uu=q("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function du({model:e,app:t,constraints:o,layout:a,selections:s,selectionState:u,direction:d,checkboxes:p,height:h,width:m,frequencyMode:g,update:b,fetchStart:y,postProcessPages:v,calculatePagesHeight:S=!1,keyboard:w={},showGray:x=!0,scrollState:k,keyScroll:C={state:{},reset:()=>{}},currentScrollIndex:E={set:()=>{}},renderedCallback:L,onCtrlF:R,showSearch:T,isModal:q,styles:P}){var I,_,O,D,N,A,j;const{translator:M}=l(ql),[$,z]=n(!1),[F,B]=n(!1),W=!(!a||!a.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:U=p,histogram:H}=null!=a?a:{},V=f(null),G=f({queue:[],validPages:!1,dataOffset:0}),K=f({pages:[]}),J=f({}),Q=JSON.stringify(null==a||null===(I=a.qListObject)||void 0===I||null===(I=I.qDimensionInfo)||void 0===I?void 0:I.qGroupFieldDefs),Y=JSON.stringify(null==a||null===(_=a.qListObject)||void 0===_?void 0:_.qExpressions),ee=`${Q}|${Y}`,te=f(ee);te.current!==ee&&(te.current=ee,J.current={});const{frequencyMax:ne,awaitingFrequencyMax:re}=lu(t,a),oe=1+(null!==(O=null==a||null===(D=a.qListObject)||void 0===D||null===(D=D.qExpressions)||void 0===D?void 0:D.length)&&void 0!==O?O:0),ie=function({local:e,loaderRef:t,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:l,dataWidth:s=1}){const[c,u]=n(!1),[d,f]=n([]);let[p]=n(0);const h=(n,c)=>{const d=e.current.dataOffset;e.current.queue.push({start:n+d,stop:c+d});const h=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),u(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const n=e.current.queue.slice(-1)[0];if(!n)return u(!1),void t();const i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:s},{qTop:n.start,qHeight:p,qLeft:0,qWidth:s}]).then(n=>{const r=a?a(n):n;e.current.validPages=!0,l.current.pages=r,f(r),u(!1),t()});o&&o(i)},h?i:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(p=e),h)},pages:d,isLoading:c}}({local:G,loaderRef:V,model:e,fetchStart:y,scrollTimeout:0,postProcessPages:v,listData:K,dataWidth:oe}),{isLoadingData:ae}=ie,le=X(ie,cu),{getStoreValue:se,setStoreValue:ce}=Jc(e),ue=c(le.loadMoreItems,[a]),[de,fe]=n({show:!1,dismissed:!1}),pe=null==a?void 0:a.representation,he="image"===(null==pe?void 0:pe.type),me=null!==(N=null==pe?void 0:pe.showSelected)&&void 0!==N&&N,ge=function(e){var t;const[r]=n({current:e});return null!=e&&null!==(t=e.qSelectionInfo)&&void 0!==t&&t.qInSelections||(r.current=e),r.current}(a),[be,ye]=n([]),[ve,Se]=n(null),we=(()=>{const e=(null==ge?void 0:ge.qListObject.qDimensionInfo.qStateCounts)||{};return(e.qSelected||0)+(e.qLocked||0)})(),xe=he&&me&&we>0;null!=le&&le.pages&&u.update({setPages:ye,pages:le.pages,isSingleSelect:W,layout:a});const ke=null==a?void 0:a.qListObject.qDimensionInfo.qCardinal,Ce=!(he&&oe>1&&ke&&ke<=2e3)||F;(null!=le&&le.pages.length&&!re&&Ce||0===ke)&&(null==L||L()),r(()=>{if(!he||oe<=1||!ke||ke>2e3)return;let t=!1;const n=pc(a),r=Math.max(1,Math.floor(1e4/oe));return(async()=>{try{for(let o=0;o<ke&&!t;o+=r){const[i]=await e.getListObjectData("/qListObjectDef",[{qTop:o,qLeft:0,qWidth:oe,qHeight:Math.min(r,ke-o)}]);if(t)return;((null==i?void 0:i.qMatrix)||[]).forEach(e=>{var t,r,o;const i=null!==(t=null===(r=e[0])||void 0===r?void 0:r.qElemNumber)&&void 0!==t?t:null===(o=e[0])||void 0===o?void 0:o.qText;Object.entries(n).forEach(([t,n])=>{var r;hc(J.current,t,i,null===(r=e[n])||void 0===r?void 0:r.qText)})})}}catch(e){t||console.error("ListBox expression cache warm-up failed:",e)}t||B(!0)})(),()=>{t=!0}},[e,he,oe,ke,Q,Y]),r(()=>{if(!xe)return void Se(null);let t=!1;if(0!==we)return(async()=>{try{const[n]=await e.getListObjectData("/qListObjectDef",[{qTop:0,qLeft:0,qWidth:oe,qHeight:we}]);if(!t){const e=pc(ge);((null==n?void 0:n.qMatrix)||[]).forEach(t=>{var n,r,o;const i=null!==(n=null===(r=t[0])||void 0===r?void 0:r.qElemNumber)&&void 0!==n?n:null===(o=t[0])||void 0===o?void 0:o.qText;Object.entries(e).forEach(([e,n])=>{var r;hc(J.current,e,i,null===(r=t[n])||void 0===r?void 0:r.qText)})}),Se(n||null)}}catch(e){t||(console.error("ListBox selected values fetch failed:",e),Se(null))}})(),()=>{t=!0};Se(null)},[xe,ge,we,oe,e]),r(()=>{xe&&(G.current.dataOffset=0)},[xe]);const Ee=i(()=>{if(!xe)return be;return function(e,t){const n=[],r=new Set;return(e||[]).forEach(e=>{((null==e?void 0:e.qMatrix)||[]).forEach(e=>{var t;const o=null==e?void 0:e[0];if(!o||!su[o.qState])return;const i=null!==(t=o.qElemNumber)&&void 0!==t?t:o.qText;r.has(i)||(r.add(i),n.push(e))})}),[{qArea:{qLeft:0,qTop:0,qWidth:t,qHeight:n.length},qMatrix:n}]}(ve?[ve,...be]:be,oe)},[xe,be,ve,oe]),Le=xe?Ee[0].qMatrix.length:void 0,Re=c(e=>{if(null==Ee||!Ee.length||!G.current.validPages)return!1;G.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Ee.filter(e=>t(e))[0];return n&&t(n)},[a,Ee]),{interactionEvents:Te,select:qe}=gs({selectionState:u,selections:s,checkboxes:U,doc:document,loaderRef:V}),{layoutOptions:Pe={}}=a||{};let Ie=!0;Pe.dataLayout&&(Ie=!("singleColumn"!==Pe.dataLayout&&!he)||"row"===(null==Pe?void 0:Pe.layoutOrder));const _e="grid"===(null==Pe?void 0:Pe.dataLayout),Oe=e=>{const t=Z({},Ie?{rowIndex:e}:{columnIndex:e}),n=_e?t:e;V.current._listRef.scrollToItem(n)},De=()=>{if(G.current.queue=[],G.current.validPages=!1,V.current){V.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===C.state.scrollPosition;if(a&&a.qSelectionInfo.qInSelections||e)return void(e&&C.reset());G.current.dataOffset=0,Oe(0)}};b&&b.call(null,De),r(()=>{k&&!$&&V.current&&(V.current._listRef.scrollToItem(k.initScrollPos),z(!0))},[V.current]),r(()=>{De()},[a,G.current.dataOffset]);let Ne=100;const Ae="grid"!==Pe.dataLayout,je=xe?Le:null==a||null===(A=a.qListObject.qSize)||void 0===A?void 0:A.qcy,Me=xe?Le:Gc({pages:be,minimumBatchSize:Ne,count:je,calculatePagesHeight:S});let $e=ou({itemWidth:m,layout:a,frequencyMode:g});const ze=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(Ee),Fe=Vc({layout:a,width:m,height:h,listCount:Me,count:je,freqIsAllowed:$e,checkboxes:U,styles:P});Fe.columnWidth&&($e=ou({itemWidth:Fe.columnWidth,layout:a,frequencyMode:g}));const{listCount:Be}=Fe;ce("listCount",Be);const We=se("inputText"),Ue=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=l(ql),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:a,searchInputText:We,listCount:Be}),He=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,l=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":l=0,i=0,a=!0;break;case"overflowEnd":l=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:l,triggerRerender:a}}({position:e,isRow:Ie,sizes:Fe,layout:a,offset:G.current.dataOffset});G.current.dataOffset=n,r&&u.triggerStateChanged(),Oe(t)};r(()=>{const e=C.state;e.up?Oe(E.state.start-e.up):e.down?Oe(E.state.stop+e.down):e.scrollPosition&&He(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&C.reset()},[C.state.up,C.state.down,C.state.scrollPosition]);const{textAlign:Ve}=(null==a?void 0:a.qListObject.qDimensionInfo)||{},[Ge,Ke]=n({first:!1,last:!1}),{List:Je,Grid:Qe}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:l,deducedFrequencyMode:s,histogram:c,isSingleSelect:u,select:d,selectAll:f,onCtrlF:p,textAlign:h,selections:m,keyboard:g,showGray:b,scrollState:y,direction:v,sizes:S,listCount:w,overflowDisclaimer:x,setScrollPosition:k,focusListItems:C,setCurrentScrollIndex:E,constraints:L,frequencyMax:R,freqIsAllowed:T,translator:q,showSearch:P,isModal:I,styles:_,exprCache:O}){const{layoutOptions:D={}}=e||{},{columnWidth:N,listHeight:A,itemHeight:j,rowCount:M,columnCount:$}=S||{},z=null==e?void 0:e.representation,F=pc(e),B=("grid"===D.dataLayout?N:t)>80,W={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:jc.styledScrollbars},U=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,H=A<=j,V=Z(Z({isLocked:U,column:!o,pages:i},U||a.selectDisabled()?{}:l),{},{checkboxes:n,layoutOptions:D,deducedFrequencyMode:s,freqIsAllowed:T,isSingleSelect:u,textAlign:h,sizes:S,representation:z,listExprIndex:F,exprCache:O,actions:{select:d,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m),setScrollPosition:k,selectAll:f,onCtrlF:p},frequencyMax:R,histogram:c,keyboard:g,showGray:b,showTick:B,dataOffset:r.current.dataOffset,focusListItems:C,direction:v,translator:q,showSearch:P,isModal:I,styles:_,fillHeight:H});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,ar.jsx($c,Z(Z({},W),{},{dataTestid:"fixed-size-list",scrollDisabled:null==L?void 0:L.active,height:A,width:t,itemCount:w,itemData:Z(Z({},V),{},{listCount:w}),itemSize:j,onItemsRendered:t=>{var o;E({start:t.visibleStartIndex,stop:t.visibleStopIndex}),y&&y.setScrollPos(t.visibleStopIndex),Mc({renderProps:t,layoutOptions:D,maxCount:S.maxCount,columnCount:$,rowCount:M,overflowDisclaimer:x,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(Z({},t))},ref:o,children:mc}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=S,{layoutOrder:l}=D||{},s="image"===(null==z?void 0:z.type)?"row":l,c=Math.min(A,M*j+a);return r.current.listRef=o,ar.jsx(zc,Z(Z({},W),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==L?void 0:L.active,height:c,width:t,columnCount:$,columnWidth:N,rowCount:M,rowHeight:j,style:Z({},i),itemData:Z(Z({},V),{},{column:void 0,columnCount:$,rowCount:M}),onItemsRendered:t=>{var o;const i="row"===s;E({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:l,overscanColumnStartIndex:s,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,f,p,h;return n&&n.setScrollPos(u),"column"===r?(d=s*o,f=a,p=c*o,h=l):(d=s,f=a*i,p=c,h=l*i),{visibleStartIndex:d+f,visibleStopIndex:p+h}}({renderProps:t,scrollState:y,layoutOrder:s,rowCount:M,columnCount:$});Mc({renderProps:t,layoutOptions:D,maxCount:S.maxCount,columnCount:$,rowCount:M,overflowDisclaimer:x,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:mc}))}}}({direction:d,layout:a,width:m,checkboxes:U,deducedFrequencyMode:ze,histogram:H,keyboard:w,showGray:x,interactionEvents:Te,select:qe,selectAll:()=>{u.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:R,textAlign:Ve,isVertical:Ae,pages:Ee,selectionState:u,isSingleSelect:W,selections:s,scrollState:k,local:G,sizes:Fe,listCount:Be,overflowDisclaimer:{state:de,set:e=>fe(t=>Z(Z({},t),{},{show:e}))},setScrollPosition:He,focusListItems:{first:Ge.first,setFirst:e=>Ke(t=>Z(Z({},t),{},{first:e})),last:Ge.last,setLast:e=>Ke(t=>Z(Z({},t),{},{last:e}))},setCurrentScrollIndex:E.set,constraints:o,frequencyMax:ne,freqIsAllowed:$e,translator:M,showSearch:T,isModal:q,styles:P,exprCache:J.current}),{columnWidth:Ze,listHeight:Xe,itemHeight:Ye}=Fe||{};return Ae||(Ne=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:m,columnWidth:Ze,listHeight:Xe,itemHeight:Ye})),ar.jsxs(uu,{children:[ar.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:Ue}),!Be&&ke>0&&ar.jsx(Zc,{width:m,text:"Listbox.NoMatchesForYourTerms"}),ar.jsx(ls,{isItemLoaded:Re,itemCount:Be||1,loadMoreItems:ue.with({minimumBatchSize:Ne}),threshold:0,minimumBatchSize:Ne,ref:V,role:"grid",children:Ae?Je:Qe}),de.show&&!de.dismissed&&ar.jsx(ru,{text:"Listbox.ItemsOverflow",dismiss:()=>fe(e=>Z(Z({},e),{},{dismissed:!0})),parentWidth:null==V||null===(j=V.current)||void 0===j||null===(j=j._listRef)||void 0===j||null===(j=j.props)||void 0===j?void 0:j.width,dense:null==Pe?void 0:Pe.dense})]})}const fu=e=>Z(Z({},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"}}]}),pu=e=>Z(Z({},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"}}]}),hu=e=>Z(Z({},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"}}]}),mu=e=>Z(Z({},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 gu=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",l=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:fu,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:hu,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:pu,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:mu,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{l(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const bu=e=>Z(Z({},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 yu(e){const t=rl(),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 vu={className:"njs-cell-action"},Su=t.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=rl(),{hidden:o,disabled:i,style:a,hasSvgIconShape:l}=yu(e);if(o)return null;const s=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,f=`actions-toolbar-${e.key}`,p=e.ref||(t?null:n);return ar.jsxs(T,{ref:p,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[vu.className,f].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":f,children:[l&&es(e.getSvgIconShape()),t&&ar.jsx("div",{ref:n,style:{bottom:-s,right:0,position:"absolute",width:"100%",height:0}})]})}),wu=e=>Z(Z({},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 xu=e=>es(wu(e));const ku=e=>Z(Z({},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 Cu=e=>es(ku(e));const Eu="njs-action-toolbar-more",Lu={icon:"More-icon"},Ru=ol(P)(({theme:e})=>({pointerEvents:"none",[`& .${Lu.icon} *`]:{color:e.palette.text.primary}}));function Tu({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=yu(e);return r?null:ar.jsxs(_,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&ar.jsx(O,{className:Lu.icon,children:es(e.getSvgIconShape())}),ar.jsx(x,{noWrap:!0,children:e.label})]})}const qu=t.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},l)=>{const s=e.length>0,c=e.findIndex(e=>!e.disabled);return s&&ar.jsx(Ru,Z(Z({},r),{},{onClose:i,ref:l,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:Eu},paper:{style:Z({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:ar.jsx(I,{id:"moreMenuList",children:e.map((e,t)=>ar.jsx(Tu,{item:e,autoFocus:t===c,onActionClick:i},t))})}))});function Pu({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:l}=i,{keyCode:s}=l;switch(s){case nc.ARROW_LEFT:case nc.ARROW_DOWN:case nc.ARROW_RIGHT:case nc.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=[nc.ARROW_LEFT,nc.ARROW_DOWN].includes(s);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 nc.SPACE:i.preventDefault();break;case nc.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 nc.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const Iu="ActionsToolbar",_u={item:`${Iu}-item`,itemSpacing:`${Iu}-itemSpacing`},Ou=ol(P)(({theme:e})=>({[`& .${_u.itemSpacing}`]:{padding:e.spacing(0,.25)}})),Du="njs-action-toolbar-popover",Nu=t.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?ar.jsx(E,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>ar.jsx(E,{className:`${_u.itemSpacing} ${_u.item}`,children:ar.jsx(Su,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),Au={pointerEvents:"none"};function ju({show:e=!0,actions:t=[],maxItems:o=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:s,more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:h,autoConfirm:m=!1,layout:g}){var b,y;const v=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=l(ql);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:ku},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:wu},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:bs}]}(Z(Z({},a),{},{layout:g})),{translator:S,keyboardNavigation:w}=l(ql),[x,k]=n(!1),C={vertical:12,horizontal:h?0:(null!==(b=null===(y=u.anchorEl)||void 0===y?void 0:y.clientWidth)&&void 0!==b?b:0)-7},L={vertical:"bottom",horizontal:h?-7:"right"},R=f(),T=f(),q=rl(),P=i(()=>({margin:q.spacing(.5,0)})),I=e=>{const t=R.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},_=i(()=>Pu({keyboardNavigation:w,focusHandler:d,getEnabledButton:I,selections:a,isRtl:h}),[w,d,I,a,h]);if(r(()=>()=>{k(!1)},[u.show,e,a.show]),r(()=>{if(!d)return;d.on("focus_toolbar_first",()=>{const e=I(!1);null==e||e.focus()}),d.on("focus_toolbar_last",()=>{const e=I(!0);null==e||e.focus()})},[]),m)return;let O=c.enabled,N=c.actions;const A=c.alignTo||T,j=t.filter(e=>!e.hidden);if(j.length>o){const e=j.splice(-(j.length-o)-1);O=!0,N=[...e,...c.actions]}if(!a.show&&0===j.length&&!O)return null;const M={key:"more",label:S.get("Menu.More"),getSvgIconShape:bu,hidden:!1,active:x,enabled:()=>O,action:()=>k(!x)},$=j.length>0,z=N.length>0,F=$&&a.show||z&&a.show,B=ar.jsxs(E,{ref:R,onKeyDown:_,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:h?"row-reverse":"row"},children:[(null==s?void 0:s.length)&&ar.jsx(Nu,{className:"actions-toolbar-extra-actions",actions:s,isRtl:h}),$&&ar.jsx(Nu,{actions:j}),z&&ar.jsx(Nu,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,actions:[M],addAnchor:!0}),F&&ar.jsx(E,{className:_u.itemSpacing,style:P,children:ar.jsx(D,{orientation:"vertical"})}),a.show&&ar.jsx(Nu,{className:"actions-toolbar-default-actions",actions:v,isRtl:h}),x&&ar.jsx(qu,{show:x,actions:N,alignTo:A,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{k(!1)},disablePortal:c.disablePortal})]});return u.show?ar.jsx(Ou,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:C,transformOrigin:L,hideBackdrop:!0,style:Au,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Du,style:{pointerEvents:"auto",padding:q.spacing(.5,.25)}}},children:B}):e&&B}var Mu=e=>es((e=>Z(Z({},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 $u="/qListObjectDef",zu=e=>null==e?void 0:e.substring(0,64e3),Fu=ol(N,{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"}}),Z({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":Z({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),Bu=ol(T)(()=>({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 Wu=o(function({popoverOpen:e,selections:t,selectionState:o,model:i,keyboard:s,dense:c=!1,visible:u=!0,autoFocus:d=!0,beginSelectionOnFocus:p=!0,wildCardSearch:h=!1,searchEnabled:m,direction:g,hide:b,styles:y},v){const{translator:S}=l(ql),[w,x]=n(""),[k,C]=n(!1),E=f(),L=f(),R=S.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:q}=Jc(i),P="rtl"===g,I=async()=>{try{await i.abortListObjectSearch($u)}finally{x("")}};r(()=>u?()=>I():()=>{},[u]),r(()=>(t.on("deactivated",I),()=>{t.removeListener&&t.removeListener("deactivated",I)}),[]),r(()=>{if(k&&E.current){const e=w.length-1;E.current.setSelectionRange(e,e),C(!1)}},[k,E.current]),r(()=>{q("inputText",w)},[w]);const _=async()=>{let e;const n=zu(w),r=await i.searchListObjectFor($u,n);return o.selectDisabled()?r:(r&&n.length&&T("listCount")>0&&(e=i.acceptListObjectSearch($u,!0),t.selectionsMade=!0,o.clearItemStates(!1),x("")),e)},O=()=>{var e;null===(e=E.current)||void 0===e||e.focus()},D=()=>{I(),O()};return a(v,()=>({focus(){O()}})),u&&!1!==m?ar.jsxs(ar.Fragment,{children:[ar.jsx(Fu,{styles:y,dense:c,isRtl:P,startAdornment:ar.jsx(A,{position:"start",sx:{marginLeft:c?"8px":"9px"},children:ar.jsx(Mu,{size:c?"small":"normal"})}),endAdornment:ar.jsx(A,{position:"end",sx:{marginLeft:0},children:""!==w&&ar.jsx(Bu,{tabIndex:0,ref:L,title:R,"aria-label":R,onClick:D,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Tab":e.shiftKey?O():sc(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:ar.jsx(xu,{size:c?"small":"normal"})})}),className:"search",inputRef:E,size:"small",fullWidth:!0,placeholder:S.get("Listbox.Search"),value:w,onFocus:()=>{h&&(x("**"),C(!0)),p&&!o.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=zu(e.target.value);return x(t),t.length?i.searchListObjectFor($u,t):I()},onKeyDown:async n=>{const{currentTarget:r}=n,o=r.closest(".listbox-container");switch(n.key){case"Enter":_();break;case"Escape":if(sc(o),t.cancel(),e)return;break;case"Tab":n.shiftKey?cc(o)||s.focusSelection():L.current?L.current.focus():sc(o);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;b&&(b(),sc(o));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:d,inputProps:{tabIndex:s.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":S.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),ar.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:S.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function Uu(e){if(!e.session)return[];const{selectionStore:t}=l(ql),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r(()=>{e&&!i&&(i=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:l})=>{var s;if(l===(null===(s=r.get(n))||void 0===s?void 0:s.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:l});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:l})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const l={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 l}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))},[e]),[i]}function Hu(e){return Object.keys(me.prototype).forEach(t=>{e[t]=me.prototype[t]}),me.init(e),e}const Vu=({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 Hu(a),a},Gu=({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 Ku(e,t,o,i){const a=Array.isArray(o)?o:[o],[s]=Uu(e),[c]=Fl(t),{appModalStore:u}=l(ql).selectionStore,d=u.get(e.id),[f,p]=n();return r(()=>{s&&t&&!f&&p(Vu({appSelections:s,appModal:d,model:t}))},[s,t]),r(()=>{if(!f)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Gu({elements:a,objectSelections:f,options:i});return f.addListener("activated",e),f.addListener("deactivated",t),()=>{f.isActive()&&f.confirm(),f.removeListener("activated",e),f.removeListener("deactivated",t)}},[f]),r(()=>{f&&f.setLayout(c)},[f,c]),[f]}function Ju(e={}){const t=Z(Z({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,l;this.setPages=e;const s=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;s&&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=us(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(l=i.qListObject)||void 0===l||null===(l=l.qDimensionInfo)||void 0===l?void 0:l.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[Z(Z({},n),{},{qState:r}),...e.slice(1)]});return Z(Z({},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 Qu=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Zu(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Qu(t,"qSelected",0)+Qu(t,"qSelectedExcluded",0)+Qu(t,"qLocked",0)+Qu(t,"qLockedExcluded",0)>0}function Xu(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 Yu(e){if("object"==typeof e&&Xu(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 ed={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}},td="qcm-color";function nd(...e){const t={type:td,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===td)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Xu(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 l;if(l=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(l[1],10),r=parseInt(l[2],10),o=parseInt(l[3],10);else if(l=/^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(l[1],10),r=parseInt(l[2],10),o=parseInt(l[3],10),i=parseFloat(l[4]);else if(l=/^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(l[1],10)/255,n=parseInt(l[2],10),r=parseInt(l[3],10),o=parseInt(l[4],10);else if(l=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(l[1],16),r=parseInt(l[2],16),o=parseInt(l[3],16),i=1;else if(l=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(l[1]+l[1],16),r=parseInt(l[2]+l[2],16),o=parseInt(l[3]+l[3],16),i=1;else if(l=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[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 s=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-.5*s;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(l=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[5]);i=parseFloat(l[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 s=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-.5*s;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(l=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(l[1]),t=parseFloat(l[3]),a=parseFloat(l[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 s=a*t;let c=e/60;const u=s*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[s,u,0];break;case 1:d=[u,s,0];break;case 2:d=[0,s,u];break;case 3:d=[0,u,s];break;case 4:d=[u,0,s];break;case 5:d=[s,0,u];break;default:d=[0,0,0]}const f=a-s;n=d[0]+f,r=d[1]+f,o=d[2]+f,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 ed}(e)){const t=ed[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 rd(e){let t,n,r;if(Xu(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?Yu(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 od(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,{a:s}=o,c=Math.max(i,a,l),u=Math.min(i,a,l),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-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:s}}function id(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),c=Math.min(i,a,l),u=s;if(s===c)t=0,r=0;else{switch(n=s-c,t=0===n?0:n/u,s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function ad(e){if(Xu(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?Yu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function ld(e,t){return Xu(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:ld(nd(e))}function sd(e){return Xu(e)?1===e.a?ad(e):ld(e):sd(nd(e))}const cd=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function ud(e){return.2126*cd(e.r)+.7152*cd(e.g)+.0722*cd(e.b)}function dd(...e){const t=nd(...e);return t.invalid||ud(t)<.4}function fd(...e){const t=nd(...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=od(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=nd(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:()=>dd(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=ad(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=ld(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=sd(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=rd(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?nd(e):e,i=o.r/255,a=o.g/255,l=o.b/255,s=Math.max(i,a,l),c=Math.min(i,a,l),u=(s+c)/2;if(s===c)t=0,r=0;else{switch(n=s-c,t=u>.5?n/(2-s-c):n/(s+c),s){case i:r=(a-l)/n+(a<l?6:0);break;case a:r=(l-i)/n+2;break;case l: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}=od(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}=id(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=id(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)=>fd(o(18*e)),getDarkenedColor:(e=1)=>fd(o(18*-e))}}function pd(e,t){if(!e||!t)return;const n=ud(e),r=ud(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const hd="#FFFFFF";function md(e,t){const n=fd(hd),r=fd(e),o=fd(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=pd(n,r),a=pd(o,r),l=i>a||i>4.5;return!l&&a>3?o.getHex():l?hd:"#000000"}function gd(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 bd,yd,vd,Sd="top",wd="top-right",xd="right",kd="bottom-right",Cd="bottom",Ed="bottom-left",Ld="left",Rd="top-left";gd(gd(gd(gd(gd(gd(gd(gd(gd(gd(bd={},"equal-equal",[Sd,Cd]),"equal-higher",[Cd,kd]),"equal-lower",[Sd,wd]),"equal-void",[Sd,Cd]),"higher-equal",[Ld,Ed,Sd,wd]),"higher-higher-acute",[Cd,Ed,Ld,wd]),"higher-higher-obtuse",[Cd,Sd]),"higher-lower-negative",[Sd,wd,xd]),"higher-lower-positive",[Cd,Ed,Ld]),"higher-void",[Sd]),gd(gd(gd(gd(gd(gd(gd(gd(gd(gd(bd,"lower-equal",[Sd]),"lower-higher-negative",[Sd,Rd]),"lower-higher-positive",[kd]),"lower-lower-acute",[Sd,Rd,Ld,wd,xd]),"lower-lower-obtuse",[Sd,Cd]),"lower-void",[Sd]),"void-equal",[Sd]),"void-higher",[Sd,Cd]),"void-lower",[Sd,Cd,Ld]),"void-void",[Sd]),gd(bd,"unclassified",[Sd,Cd,xd,Ld,wd,kd,Ed,Rd]);var Td=function(){if(vd)return yd;vd=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return yd=function e(){var t,n,r,s,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},yd}();function qd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Id(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Td);var _d=.7,Od=1/_d,Dd="\\s*([+-]?\\d+)\\s*",Nd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ad="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jd=/^#([0-9a-f]{3,8})$/,Md=new RegExp(`^rgb\\(${Dd},${Dd},${Dd}\\)$`),$d=new RegExp(`^rgb\\(${Ad},${Ad},${Ad}\\)$`),zd=new RegExp(`^rgba\\(${Dd},${Dd},${Dd},${Nd}\\)$`),Fd=new RegExp(`^rgba\\(${Ad},${Ad},${Ad},${Nd}\\)$`),Bd=new RegExp(`^hsl\\(${Nd},${Ad},${Ad}\\)$`),Wd=new RegExp(`^hsla\\(${Nd},${Ad},${Ad},${Nd}\\)$`),Ud={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 Hd(){return this.rgb().formatHex()}function Vd(){return this.rgb().formatRgb()}function Gd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Kd(t):3===n?new Xd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Jd(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Jd(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=Md.exec(e))?new Xd(t[1],t[2],t[3],1):(t=$d.exec(e))?new Xd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=zd.exec(e))?Jd(t[1],t[2],t[3],t[4]):(t=Fd.exec(e))?Jd(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Bd.exec(e))?of(t[1],t[2]/100,t[3]/100,1):(t=Wd.exec(e))?of(t[1],t[2]/100,t[3]/100,t[4]):Ud.hasOwnProperty(e)?Kd(Ud[e]):"transparent"===e?new Xd(NaN,NaN,NaN,0):null}function Kd(e){return new Xd(e>>16&255,e>>8&255,255&e,1)}function Jd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xd(e,t,n,r)}function Qd(e){return e instanceof Id||(e=Gd(e)),e?new Xd((e=e.rgb()).r,e.g,e.b,e.opacity):new Xd}function Zd(e,t,n,r){return 1===arguments.length?Qd(e):new Xd(e,t,n,null==r?1:r)}function Xd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Yd(){return`#${rf(this.r)}${rf(this.g)}${rf(this.b)}`}function ef(){const e=tf(this.opacity);return`${1===e?"rgb(":"rgba("}${nf(this.r)}, ${nf(this.g)}, ${nf(this.b)}${1===e?")":`, ${e})`}`}function tf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rf(e){return((e=nf(e))<16?"0":"")+e.toString(16)}function of(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lf(e,t,n,r)}function af(e){if(e instanceof lf)return new lf(e.h,e.s,e.l,e.opacity);if(e instanceof Id||(e=Gd(e)),!e)return new lf;if(e instanceof lf)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new lf(a,l,s,e.opacity)}function lf(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function sf(e){return(e=(e||0)%360)<0?e+360:e}function cf(e){return Math.max(0,Math.min(1,e||0))}function uf(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}qd(Id,Gd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hd,formatHex:Hd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return af(this).formatHsl()},formatRgb:Vd,toString:Vd}),qd(Xd,Zd,Pd(Id,{brighter(e){return e=null==e?Od:Math.pow(Od,e),new Xd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?_d:Math.pow(_d,e),new Xd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xd(nf(this.r),nf(this.g),nf(this.b),tf(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:Yd,formatHex:Yd,formatHex8:function(){return`#${rf(this.r)}${rf(this.g)}${rf(this.b)}${rf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ef,toString:ef})),qd(lf,function(e,t,n,r){return 1===arguments.length?af(e):new lf(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return e=null==e?Od:Math.pow(Od,e),new lf(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?_d:Math.pow(_d,e),new lf(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 Xd(uf(e>=240?e-240:e+120,o,r),uf(e,o,r),uf(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new lf(sf(this.h),cf(this.s),cf(this.l),tf(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=tf(this.opacity);return`${1===e?"hsl(":"hsla("}${sf(this.h)}, ${100*cf(this.s)}%, ${100*cf(this.l)}%${1===e?")":`, ${e})`}`}}));const df=Math.PI/180,ff=180/Math.PI,pf=.96422,hf=.82521,mf=4/29,gf=6/29,bf=3*gf*gf,yf=gf*gf*gf;function vf(e){if(e instanceof Sf)return new Sf(e.l,e.a,e.b,e.opacity);if(e instanceof Ef)return Lf(e);e instanceof Xd||(e=Qd(e));var t,n,r=Cf(e.r),o=Cf(e.g),i=Cf(e.b),a=wf((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=wf((.4360747*r+.3850649*o+.1430804*i)/pf),n=wf((.0139322*r+.0971045*o+.7141733*i)/hf)),new Sf(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Sf(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function wf(e){return e>yf?Math.pow(e,1/3):e/bf+mf}function xf(e){return e>gf?e*e*e:bf*(e-mf)}function kf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Cf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ef(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Lf(e){if(isNaN(e.h))return new Sf(e.l,0,0,e.opacity);var t=e.h*df;return new Sf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}qd(Sf,function(e,t,n,r){return 1===arguments.length?vf(e):new Sf(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return new Sf(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Sf(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 Xd(kf(3.1338561*(t=pf*xf(t))-1.6168667*(e=1*xf(e))-.4906146*(n=hf*xf(n))),kf(-.9787684*t+1.9161415*e+.033454*n),kf(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),qd(Ef,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ef)return new Ef(e.h,e.c,e.l,e.opacity);if(e instanceof Sf||(e=vf(e)),0===e.a&&0===e.b)return new Ef(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ff;return new Ef(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ef(e,t,n,null==r?1:r)},Pd(Id,{brighter(e){return new Ef(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ef(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Lf(this).rgb()}}));var Rf=e=>()=>e;function Tf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Rf(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?Tf: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):Rf(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Zd(e)).r,(t=Zd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Tf(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 qf,Pf="center",If="bottom";function _f(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 Of(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Nf)):void 0===t&&(t=Df);for(var n,r,o,i,a,l=new Mf(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new Mf(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(jf)}function Df(e){return e.children}function Nf(e){return Array.isArray(e)?e[1]:null}function Af(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function jf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Mf(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Pf,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:Pf,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:Pf,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:Pf},{key:"DataRangeIncludingZero",alignment:If},{key:"LimitedData",alignment:If},{key:"NegativeOrZeroValues",alignment:If}].reduce(function(e,t){return e[t.key]=t,e},{}),Mf.prototype=Of.prototype={constructor:Mf,count:function(){return this.eachAfter(_f)},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],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=l.pop();)e.call(t,i,++s,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 Of(this).eachBefore(Af)},[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)}},qf=function(e){
|
|
24
24
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
25
25
|
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,l,s,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=f-g,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),S=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(p,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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+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],s=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%s,f=d.length,v=0;v<f;v++)m+=d.charAt(v),!((v-b+1)%s)&&v<f-s&&(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}},qf({exports:{}});const $f=/,(?![^(]*\))/,zf=/\s(?![^(]*\))/,Ff=/^[0-9]+[a-zA-Z%]+?$/,Bf=["none","inset","initial","inherit"],Wf=e=>{if(!e)return;const t=e.split(zf).filter(e=>!Bf.includes(e.toLowerCase())).at(-1),n=!t||(e=>"0"===e||Ff.test(e))(t)||Bf.includes(t.toLowerCase())?void 0:t;return n},Uf=e=>e?e.split($f).map(e=>e.trim()):[];function Hf(e,t,n,r){return n&&r?n.getStyle(`object.${r}`,e,t):n?n.getStyle("",e,t):void 0}function Vf(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:Hf(t,n,r,o)}const Gf={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},Kf={"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 Jf(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 Qf(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:l}=(null==a?void 0:a.qStaticContentUrl)||{};i=l?decodeURIComponent(l):void 0,i=Jf(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=Kf[e.bgImage.position]),n}(e),l=function(e){var t;let n=Gf.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=Gf[r]),n}(e);return i?{url:i,pos:a,size:l}:void 0}}function Zf(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):Vf(null==r?void 0:r.color,"","backgroundColor",t,n)}function Xf(e,t,n){var r,o;const i=Hf("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&Bf.includes(e.toLowerCase()))return e.toLowerCase();const r=Uf(e);if(1!==r.length)return e;let o=n;if(!o){const n=Uf(t);if(1!==n.length)return e;o=Wf(n[0])}if(!o)return e;const i=Wf(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,Vf(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function Yf(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 ep={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},tp=["theme","selections"];function np({app:e,themeApi:t,theme:n,queryParams:r,components:o=[],checkboxes:i=!1,hostConfig:a,layout:l}){var s,c,u,d,f,p,h,m;const g=function(e=[]){const t={};return e.forEach(e=>{const n=null==e?void 0:e.key;tp.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=null==l?void 0:l.representation,S=e=>"string"==typeof e?e:y(e),w="image"===(null==v?void 0:v.type)?{cellBgColor:"expression"===v.cellBgColorMode?void 0:S(v.cellBgColor),borderColor:S(v.borderColor)}:void 0,x=function({getColorPickerColor:e,theme:t,getListboxStyle:n,overrides:r,checkboxes:o}){var i,a,l,s,c;const u=null===(i=r.theme)||void 0===i||null===(i=i.content)||void 0===i?void 0:i.fontColor,d=e(u)||n("content","color")||(null===(a=t.palette)||void 0===a?void 0:a.text.primary),f=!o&&(null===(l=null===(s=r.theme)||void 0===s||null===(s=s.content)||void 0===s?void 0:s.useContrastColor)||void 0===l||l),p=(null===(c=r.selections)||void 0===c?void 0:c.colors)||{},h=r=>{var o,i;const a="selected"===r?"main":r,l=`${r}Contrast`,s=e(p[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])||ep[r],c=f?md(s,d):d||(null===(i=t.palette)||void 0===i?void 0:i.selected[`${l}Text}`]);return{[r]:s,[l]:c}};return Z(Z(Z(Z(Z({},h("selected")),h("alternative")),h("excluded")),h("selectedExcluded")),h("possible"))}({getColorPickerColor:y,theme:n,getListboxStyle:b,overrides:g,checkboxes:i}),k=g.theme||{},C=y(null===(s=k.header)||void 0===s?void 0:s.fontColor)||b("title.main","color"),E=function({themeApi:e,themeOverrides:t}){let n;const r=null==t?void 0:t.background;return r?(n=null!=r&&r.useExpression?Zf({bgColor:r},e,"listBox"):e.getColorPickerColor(null==r?void 0:r.color),n):n}({themeApi:t,themeOverrides:k}),L=null!==(c=k.background)&&void 0!==c&&c.image?Qf({bgImage:k.background.image},e,r,null==a?void 0:a.host):void 0,R=E||b("","backgroundColor")||n.palette.background.default,T=function(e,t){const n=fd(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(R,b),q=function(e){return md("#fff",e("content","color"))}(b),P=(null===(u=k.header)||void 0===u?void 0:u.fontStyle)||{},I=(null===(d=k.content)||void 0===d?void 0:d.fontStyle)||{},_=(e,t,n)=>!0===e&&t||!1===e&&n||void 0,O={backgroundColor:i?void 0:x.possible,color:x.possibleContrast||b("content","color"),fontSize:(null===(f=k.content)||void 0===f?void 0:f.fontSize)||b("content","fontSize"),fontFamily:(null===(p=k.content)||void 0===p?void 0:p.fontFamily)||b("content","fontFamily"),fontWeight:_(I.bold,"bold","normal")||b("content","fontWeight")||"normal",textDecoration:I.underline?"underline":"initial",fontStyle:_(I.italic,"italic","normal")||b("content","fontStyle")||"initial"};if(w){var D,N;const e=y(null===(D=k.content)||void 0===D?void 0:D.fontColor)||b("content","color")||(null===(N=n.palette)||void 0===N||null===(N=N.text)||void 0===N?void 0:N.primary);w.text=function(e,t){var n,r,o,i,a;const l=null!==(n=null!=t?t:null==e?void 0:e.color)&&void 0!==n?n:"#333333",s=null!==(r=null==e?void 0:e.fontSize)&&void 0!==r?r:"13px",c=!l||dd(l);return{color:l,fontFamily:null==e?void 0:e.fontFamily,fontSize:s,subtitleFontSize:`${Math.max(9,Math.round(.85*parseInt(String(s),10)))}px`,fontWeight:null!==(o=null==e?void 0:e.fontWeight)&&void 0!==o?o:"bold",fontStyle:null!==(i=null==e?void 0:e.fontStyle)&&void 0!==i?i:"normal",textDecoration:null!==(a=null==e?void 0:e.textDecoration)&&void 0!==a?a:"initial",backdropColor:c?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.5)",shadowOnImage:c?"0 0 3px rgba(255, 255, 255, 0.8)":"0 1px 2px rgba(0, 0, 0, 0.6)"}}(O,e)}return{background:{backgroundColor:R,backgroundImage:null==L||!L.url||null!=L&&L.url.startsWith("url(")?void 0:`url('${L.url}')`,backgroundRepeat:"no-repeat",backgroundSize:null==L?void 0:L.size,backgroundPosition:null==L?void 0:L.pos},header:{color:C,fontSize:(null===(h=k.header)||void 0===h?void 0:h.fontSize)||b("title.main","fontSize"),fontFamily:(null===(m=k.header)||void 0===m?void 0:m.fontFamily)||b("title.main","fontFamily"),fontWeight:_(P.bold,"bold","normal")||b("title.main","fontWeight")||"bold",textDecoration:P.underline?"underline":"initial",fontStyle:_(P.italic,"italic","normal")||b("title.main","fontStyle")||"initial"},content:O,search:{color:q,borderColor:n.palette.divider,highlightBorderColor:n.palette.custom.focusBorder,backgroundColor:T,backdropFilter:"blur(8px)"},selections:x,image:w}}function rp({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a,layout:l}){return np({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a,layout:l})}function op({alignTo:e,anchorOrigin:t={vertical:"bottom",horizontal:"center"},transformOrigin:o={vertical:"top",horizontal:"center"},show:i,close:a,app:s,fieldName:u,stateName:d="$",autoFocus:p,components:h,checkboxes:m,selectDisabled:g=()=>!1,sortCriteria:b=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:y="ltr"}){const v=Boolean(null==u?void 0:u.qLibraryId),S=i&&Boolean(e.current),[w,x]=n(0),k=rl(),C=f(),[L]=Al({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:d,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:b,qFieldDefs:v?void 0:[u]},qLibraryId:v?u.qLibraryId:void 0}},s,u,d),R=c(()=>{L.lock("/qListObjectDef")},[L]),q=c(()=>{L.unlock("/qListObjectDef")},[L]),{translator:I,themeApi:_,keyboardNavigation:O,hostConfig:D}=l(ql),N=f(),A=f(),[j]=Ku(s,L,A),[M]=Fl(L),[$]=n(()=>Ju({selectDisabled:g})),z=ic({containerRef:A,enabled:O}),{checkboxes:F=m}=M||{},B=rp({themeApi:_,theme:k,hostConfig:D,components:h,checkboxes:F,layout:M});if(r(()=>{j&&S&&(j.isModal(L)||j.goModal("/qListObjectDef"))},[j,S]),!(L&&M&&I&&B))return null;const W=!0===M.qListObject.qDimensionInfo.qLocked,U=(e,t)=>{const n="escapeKeyDown"!==t;j.noModal(n),a()},H=gu({layout:M,model:L,translator:I,selectionState:$,selections:j}),V=Zu(M);return ar.jsx(P,{className:"listbox-container",open:S,onClose:U,anchorEl:e.current,anchorOrigin:t,transformOrigin:o,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?U():void 0,direction:y,children:ar.jsxs(E,{container:!0,direction:"column",gap:0,ref:A,children:[ar.jsxs(E,{container:!0,style:{direction:y,padding:k.spacing(1)},children:[ar.jsx(E,{children:W?ar.jsx(T,{onClick:q,disabled:!W,size:"large","aria-label":I.get("Listbox.Unlock"),title:I.get("Listbox.Unlock"),children:ar.jsx(ns,{})}):ar.jsx(T,{onClick:R,disabled:!V,size:"large","aria-label":I.get("Listbox.Lock"),title:I.get("Listbox.Lock"),children:ar.jsx(os,{})})}),ar.jsx(E,{size:"grow"}),ar.jsx(E,{children:ar.jsx(ju,{layout:M,more:{enabled:!W,actions:H,alignTo:N,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:j,onConfirm:U,onCancel:()=>U(0,"escapeKeyDown")}})})]}),ar.jsxs(E,{size:"grow",role:"region","aria-label":I.get("Listbox.ResultFilterLabel"),children:[ar.jsx("div",{ref:N}),ar.jsx(E,{children:ar.jsx(Wu,{ref:C,popoverOpen:S,styles:B,visible:!0,model:L,listCount:w,selections:j,selectionState:$,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:z.focusSelection},autoFocus:null==p||p,direction:y})}),ar.jsx(du,{model:L,app:s,layout:M,selections:j,selectionState:$,direction:y,onSetListCount:e=>x(e),onCtrlF:()=>{C.current.focus()},styles:B,keyboard:z})]})]})})}function ip({displayName:e}){return ar.jsx(x,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600,marginTop:"8px"},children:e})}function ap({field:e,api:t,stateIx:r=0,skipHandleShowListBoxPopover:o=!1,moreAlignTo:i=null,onClose:a=()=>{}}){const{translator:s}=l(ql),c=i||f(),u=rl(),[d,p]=n(!1);let h,m=null,g=null,b="";const y=!!e.isPinned,v=()=>{p(!1),a()};if(y)b=e.qName||e.qField,g=ar.jsx(ip,{displayName:b});else{h=e.selections[r],void 0===h.qTotal&&(h.qTotal=0);const n=h.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},o=(n.qSelected+n.qLocked)/h.qTotal,a=n.qAlternative/h.qTotal,l=(n.qExcluded+n.qLockedExcluded+n.qSelectedExcluded)/h.qTotal,c=n.qSelected+n.qSelectedExcluded+n.qLocked+n.qLockedExcluded,d=0===c&&0===h.qTotal;let f="";h.qTotal===c&&h.qTotal>1?f=s.get("CurrentSelections.All"):c>1&&h.qTotal?f=s.get("CurrentSelections.Of",[c,h.qTotal]):h.qSelectedFieldSelectionInfo&&(f=h.qSelectedFieldSelectionInfo.map(e=>e.qName).join(", ")),"$"!==e.states[r]&&(f=`${e.states[r]}: ${f}`);const p=[{color:u.palette.selected.main,ratio:o},{color:u.palette.selected.alternative,ratio:a},{color:u.palette.selected.excluded,ratio:l}];p.forEach((e,t)=>{e.offset=t?p[t-1].offset+p[t-1].ratio:0});let m=null,b=null,y=null;i||(m=ar.jsxs(E,{sx:{flex:1,minWidth:0,opacity:h.qLocked?"0.3":""},children:[ar.jsx(x,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label}),ar.jsx(x,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"},children:f})]}),h.qLocked?b=ar.jsx(E,{children:ar.jsx(T,{size:"large",children:ar.jsx(ns,{})})}):h.qOneAndOnlyOne||(b=ar.jsx(E,{children:ar.jsx(T,{title:s.get("Selection.Clear"),onClick:n=>{n.stopPropagation(),t.clearField(h.qField,e.states[r])},size:"large",children:ar.jsx(ts,{})})})),y=ar.jsx("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"},children:!1===d&&p.map(e=>ar.jsx("div",{style:{position:"absolute",background:e.color,height:"100%",top:0,width:100*e.ratio+"%",left:100*e.offset+"%"}},e.color))}),g=ar.jsxs(ar.Fragment,{children:[m,b,y]}))}return m=ar.jsxs(E,{container:!0,gap:1,ref:c,"data-testid":y?`pin-item-${b}`:`selection-item-${h.qField}`,sx:{backgroundColor:u.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px",height:"40px","&:hover":{backgroundColor:u.palette.action.hover}},onClick:!1===o&&(e=>{e.currentTarget.contains(e.target)&&p(!d)})||null,children:[g,d&&ar.jsx(op,{alignTo:c,show:d,close:v,app:t.model,fieldName:y?e.qField:h.qField,stateName:y?void 0:e.states[r]})]}),i?ar.jsx(op,{alignTo:c,show:!0,close:v,app:t.model,fieldName:y?e.qField:h.qField,stateName:y?void 0:e.states[r]}):m}var lp=e=>es((e=>Z(Z({},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 sp={item:"MultiState-item"},cp=ol(E)(({theme:e})=>({[`&.${sp.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"}}));function up({field:e,api:t,moreAlignTo:r=null,onClose:o=()=>{}}){const[i,a]=n(!!r),[s,c]=n(-1),[u,d]=n(r?r.current:null),p=r||f(),{translator:h}=l(ql),m=h.get("Selection.ClearAllStates"),g=()=>{c(-1),o()};let b=null;r||(b=ar.jsxs(ar.Fragment,{children:[ar.jsx(E,{sx:{minWidth:0,flexGrow:1},children:ar.jsx(j,{style:{padding:"0px 8px"},color:"secondary",badgeContent:e.states.length,children:ar.jsx(x,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label})})}),ar.jsx(E,{children:ar.jsx("div",{style:{width:"12px"}})}),ar.jsx(E,{children:ar.jsx(T,{size:"large",children:ar.jsx(lp,{})})})]}));const y=ar.jsxs(M,{dense:!0,children:[ar.jsx($,{title:m,onClick:()=>{e.states.forEach(n=>t.clearField(e.name,n))},children:ar.jsx(z,{variant:"contained",fullWidth:!0,children:m})}),e.states.map((n,r)=>ar.jsx($,{title:e.label,onClick:e=>((e,t)=>{e.stopPropagation(),a(!1),c(t)})(e,r),children:ar.jsx(C,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:ar.jsx(ap,{field:e,api:t,stateIx:r,skipHandleShowListBoxPopover:!0})})},r))]}),v=ar.jsx(P,{open:i,onClose:()=>{a(!1),o()},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:y}),S=r?v:ar.jsxs(cp,{container:!0,gap:0,className:sp.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,a(!i))},children:[b,i&&v,s>-1&&ar.jsx(op,{alignTo:p,show:s>-1,close:g,app:t.model,fieldName:e.selections[s].qField,stateName:e.states[s]})]});return r&&s>-1?ar.jsx(op,{alignTo:p,show:s>-1,close:g,app:t.model,fieldName:e.selections[s].qField,stateName:e.states[s]}):S}const dp="More",fp={item:`${dp}-item`,badge:`${dp}-badge`},pp=ol(E)(({theme:e})=>({[`&.${fp.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"},[`& .${fp.badge}`]:{padding:e.spacing(0,1)}}));function hp({items:e=[],api:t}){const r=rl(),[o,i]=n(!1),[a,l]=n(-1),[s,c]=n(null),u=f(),d=()=>{l(-1)};let p=null;return a>-1&&(p=e[a].states.length>1?ar.jsx(up,{field:e[a],api:t,moreAlignTo:u,onClose:d}):ar.jsx(ap,{field:e[a],api:t,skipHandleShowListBoxPopover:!0,moreAlignTo:u,onClose:d})),ar.jsxs(pp,{container:!0,gap:0,className:fp.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))},children:[ar.jsx(E,{children:ar.jsx(C,{borderRadius:r.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:r.palette.selected.main,color:r.palette.selected.mainContrastText},children:ar.jsxs(x,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit",children:["+",e.length]})})}),ar.jsx(E,{children:ar.jsx(T,{size:"large",children:ar.jsx(lp,{})})}),o&&ar.jsx(P,{open:o,onClose:()=>{i(!1)},anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:ar.jsx(M,{dense:!0,children:e.map((e,n)=>ar.jsx($,{title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),l(t)})(e,n),children:ar.jsx(C,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:e.states.length>1?ar.jsx(up,{field:e,api:t}):ar.jsx(ap,{field:e,api:t})})},n))})}),p]})}function mp({api:e,app:t}){const n=rl(),[r]=Ml(t),[o]=Fl(r),[a]=(e=>{var t;const[n]=Vl(e,"FieldList",Gl),[r]=zl(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),[s]=(e=>{var t;const[n]=Vl(e,"DimensionList",Kl),[r]=zl(n,"getLayout");return[null==r||null===(t=r.qDimensionList)||void 0===t?void 0:t.qItems]})(t),[c]=Hl(t),{modalObjectStore:u}=l(ql).selectionStore,[d,f]=Wl(),p=i(()=>{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(Zl);return Xl(a,c,e,s)},[o,a,c,s]),h=(e=>{if(!e)return 0;const{width:t}=e,n=Math.floor(t)-72;return Math.floor(n/120)})(f),{items:m,more:g}=(({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 l=[];return n<i.length&&(l=i.splice(0,i.length-n)),t.items=i,{items:i,more:l}})({currentItems:p,containerRef:d,maxItems:h,isInListboxPopover:()=>{const{model:e}=u.get(t.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)}});return ar.jsxs(E,{ref:d,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"},children:[g.length>0&&ar.jsx(E,{style:{position:"relative",maxWidth:"98px",minWidth:"72px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:ar.jsx(hp,{items:g,api:e})}),m.map((t,r)=>{var o;return ar.jsx(E,{style:{position:"relative",maxWidth:"240px",minWidth:"120px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:t.states.length>1?ar.jsx(up,{field:t,api:e}):ar.jsx(ap,{field:t,api:e})},`${t.states.join("::")}::${null!==(o=t.qField)&&void 0!==o?o:t.name}${r}`)})]})}var gp=e=>es((e=>Z(Z({},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 bp=e=>es((e=>Z(Z({},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 yp(e){const[t]=Ml(e),[o]=Fl(t),[i]=Bl(e),[a,l]=n(null);return r(()=>{i&&t&&o&&((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,o,i)},[i,t,o]),r(()=>{if(!o)return;let e=!1,t=!1,n=!1;[o,...o.alternateStates||[]].forEach(r=>{e=e||r.qSelectionObject&&r.qSelectionObject.qBackCount>0,t=t||r.qSelectionObject&&r.qSelectionObject.qForwardCount>0,n=n||(r.qSelectionObject&&r.qSelectionObject.qSelections||[]).filter(e=>!0!==e.qLocked).length>0}),l({canGoBack:e,canGoForward:t,canClear:n})},[o]),[a,t,o]}function vp({api:e,app:t}){const{translator:n}=l(ql),[r]=yp(t);return ar.jsxs(E,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"},children:[ar.jsx(E,{children:ar.jsx(T,{style:{marginRight:"8px"},disabled:!r||!r.canGoBack,title:n.get("Navigate.Back"),onClick:()=>e.back(),size:"large",children:ar.jsx(gp,{})})}),ar.jsx(E,{children:ar.jsx(T,{style:{marginRight:"8px"},disabled:!r||!r.canGoForward,title:n.get("Navigate.Forward"),onClick:()=>e.forward(),size:"large",children:ar.jsx(bp,{})})}),ar.jsx(E,{children:ar.jsx(T,{disabled:!r||!r.canClear,title:n.get("Selection.ClearAll"),onClick:()=>e.clear(),size:"large",children:ar.jsx(Cu,{})})})]})}const Sp=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function wp([e,t]){return(e+(Math.random()*(t-e)|0)).toString(32)}function xp(){return Sp.map(wp).join("")}function kp({app:e}){const t=rl(),[n]=Uu(e);return n?ar.jsxs(E,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:t.palette.background.paper,minHeight:"40px"},children:[ar.jsx(E,{style:{borderRight:`1px solid ${t.palette.divider}`},children:ar.jsx(vp,{api:n,app:e})}),ar.jsx(E,{size:"grow",style:{backgroundColor:t.palette.background.darker,overflow:"hidden"},children:ar.jsx(mp,{api:n,app:e})})]}):null}let Cp;Cp="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let Ep=null,Lp=null;const Rp=Cp.clearTimeout,Tp=Cp.setTimeout,qp=Cp.cancelAnimationFrame||Cp.mozCancelAnimationFrame||Cp.webkitCancelAnimationFrame,Pp=Cp.requestAnimationFrame||Cp.mozRequestAnimationFrame||Cp.webkitRequestAnimationFrame;function Ip(e){let t,n,r,o,i,a,l;const s="undefined"!=typeof document&&document.attachEvent;if(!s){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},l=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__&&Ep(this.__resizeRAF__),this.__resizeRAF__=Lp(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,s="";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],s="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+s+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=s+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(s)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const s=i.ownerDocument,c=Cp.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)}}(s),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=s.createElement("div")).className="resize-triggers";const u=s.createElement("div");u.className="expand-trigger",u.appendChild(s.createElement("div"));const d=s.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",l,!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(s)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!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==qp||null==Pp?(Ep=Rp,Lp=function(e){return Tp(e,20)}):(Ep=function([e,t]){qp(e),Rp(t)},Lp=function(e){const t=Pp(function(){Rp(n),e()}),n=Tp(function(){qp(t),e()},20);return[t,n]});class _p extends h{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"),l=parseFloat(r.paddingBottom||"0"),s=this._parentNode.getBoundingClientRect(),c=s.height-a-l,u=s.width-o-i,d=this._parentNode.offsetHeight-a-l,f=this._parentNode.offsetWidth-o-i;(e||this.state.height===d&&this.state.scaledHeight===c)&&(t||this.state.width===f&&this.state.scaledWidth===u)||(this.setState({height:d,width:f,scaledHeight:c,scaledWidth:u}),"function"==typeof n&&n({height:d,scaledHeight:c,scaledWidth:u,width:f}))}},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=Ip(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:l,style:s={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:f,scaledWidth:h,width:m}=this.state,g={overflow:"visible"},b={};let y=!1;return r||(0===d&&(y=!0),g.height=0,b.height=d,b.scaledHeight=f),o||(0===m&&(y=!0),g.width=0,b.width=m,b.scaledWidth=h),i&&(y=!1),p(c,{ref:this._setRef,style:{...g,...s},...u},!y&&e(b))}}function Op({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 l=t.currentTarget.closest(".listbox-container"),s=o();switch(n){case nc.TAB:if(document.activeElement===l||!s&&!l.contains(document.activeElement))return;if(r){sc(l)||lc(l)||uc(t,e)}else{if(!(cc(l)||lc(l)||sc(l)))break}i();break;case nc.ENTER:case nc.SPACE:if(!t.target.classList.contains("listbox-container"))break;e.focus(),i();break;case nc.ESCAPE:uc(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:l=!1,shiftKey:s=!1}=e;switch(a){case nc.ARROW_UP:n({up:1});break;case nc.ARROW_DOWN:n({down:1});break;case nc.PAGE_UP:n({up:r.stop-r.start});break;case nc.PAGE_DOWN:n({down:r.stop-r.start});break;case nc.HOME:n({scrollPosition:l&&s?"overflowStart":"start"});break;case nc.END:n({scrollPosition:l&&s?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const Dp=ol("div")(()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}));function Np({text:e}){const{translator:t}=l(ql);return ar.jsx(Dp,{children:t.get(e)})}const Ap={fontSize:"12px"},jp=ol(F)(({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"}})),Mp=ol(E,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})(({styles:e,isRtl:t})=>Z(Z({flexDirection:t?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},e.header),{},{"& *":{color:e.header.color}})),$p=ol(x)(({styles:e})=>Z(Z({},e.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})),zp=t.forwardRef(({translator:e,toggleLock:t,keyboard:n,isLoading:r},o)=>{const i=e.get("SelectionToolbar.ClickToUnlock");return ar.jsxs(jp,{ref:o,title:i,tabIndex:n.enabled?0:-1,onClick:t,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:r,children:[r?ar.jsx(B,{size:16,variant:"indeterminate",color:"primary"}):ar.jsx(ns,{disableRipple:!0,style:Ap}),!r&&ar.jsx(x,{fontSize:"14px",children:i})]})});var Fp=e=>es((e=>Z(Z({},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 Bp=e=>es((e=>Z(Z({},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 Wp=e=>es((e=>Z(Z({},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 Up="H",Hp="C";var Vp=({dimInfo:e,app:t,selections:n,isPopover:r,active:o,keyboard:i})=>{switch(e.qGrouping){case Up:return{icon:Bp,tooltip:"Listbox.DrillDown",onClick:void 0};case Hp:{const a=t&&o,l=()=>{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?Wp:Fp,tooltip:"Listbox.Cyclic",onClick:a?l:void 0,onKeyDown:a?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case nc.SPACE:case nc.ENTER:l();break;case nc.TAB:{if(!i.enabled)return;let n;n=e.shiftKey?i.focusSelection():lc(t)||sc(t),n||uc(e,i)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}};const Gp=q(z)(()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0}));function Kp({iconData:e,translator:t,iconStyle:n,disabled:r,keyboard:o}){if(!e)return;const{icon:i,tooltip:a,onClick:l,onKeyDown:s}=e,c=i,u=t.get(a);return l?ar.jsx(Gp,{variant:"outlined",onClick:l,tabIndex:o.innerTabStops?0:-1,title:u,size:"large",disableRipple:!0,disabled:r,onKeyDown:s,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button",children:ar.jsx(c,{style:n})}):ar.jsx(c,{title:u,size:"large",style:Z(Z({},n),{},{padding:"7px"})})}let Jp=0;function Qp({layout:e,translator:t,styles:o,isRtl:i,showLock:a,showSearchIcon:l,constraints:s,onShowSearch:c,classes:u,containerRect:d,isPopover:p,showToolbar:h,toolbarMode:m="auto",containerRef:g,model:b,selectionState:y,isDirectQuery:v,selections:S,keyboard:w,autoConfirm:x,app:k,title:C,disablePortal:L}){var R,q,P;const I="detach"===m,_=!I&&!("attach"===m),[O,D]=n(I),[N,A]=n(null==e||null===(R=e.qListObject)||void 0===R||null===(R=R.qDimensionInfo)||void 0===R?void 0:R.qLocked),[j,M]=n(!1);r(()=>{var t;A(null==e||null===(t=e.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qLocked)},[null==e||null===(q=e.qListObject)||void 0===q||null===(q=q.qDimensionInfo)||void 0===q?void 0:q.qLocked]);const $=f(null),z=f(null),F=f(null),B=Vp({dimInfo:null==e||null===(P=e.qListObject)||void 0===P?void 0:P.qDimensionInfo,app:k,selections:S,isPopover:p,active:!(null!=s&&s.active),keyboard:w}),W=a&&N,U=!a&&N,H=l||U||B,V=9-(H?7:0),G=i?9-(H?7:0):4,K=(l?28:0)+(U?28:0)+(B?28:0),J=function({isLocked:e,setLocked:t,settingLockedState:n,model:r,setSettingLockedState:o,unlockButtonRef:i,lockButtonRef:a}){return()=>{const l=new Date;if(l-Jp<500)return Promise.resolve();if(n)return()=>{};o(!0),Jp=l;const s=e?r.unlock:r.lock;return t(!e),s.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:N,setLocked:A,settingLockedState:j,setSettingLockedState:M,model:b,unlockButtonRef:z,lockButtonRef:F}),Q=gu({layout:e,model:b,translator:t,selectionState:y,isDirectQuery:v,selections:S}),X=N||!a?void 0:[{key:"lock",type:void 0,label:t.get("SelectionToolbar.ClickToLock"),getSvgIconShape:rs,enabled:()=>!j&&!y.selectDisabled()&&Zu(e),action:J,ref:F}],Y=null!=s&&s.active?ar.jsx(Mu,{title:t.get("Listbox.Search"),size:"large",style:Z(Z({},Ap),{},{padding:"7px"})}):ar.jsx(T,{onClick:c,tabIndex:-1,title:t.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn",children:ar.jsx(Mu,{style:Ap})});r(()=>{if(!_)return;if(!$.current||!d)return;const e=function({containerRect:e,titleRef:t,iconsWidth:n,paddingLeft:r,paddingRight:o}){var i,a,l,s;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===(l=t.current)||void 0===l?void 0:l.scrollWidth)>(null==t||null===(s=t.current)||void 0===s?void 0:s.offsetWidth);return!(!u&&!d)}({containerRect:d,titleRef:$,iconsWidth:K,paddingLeft:V,paddingRight:G});D(e)},[_,K,V,G,$.current,null==d?void 0:d.width,null==d?void 0:d.height]);const ee=function({isDetached:e,showToolbar:t,containerRef:n,isLocked:r,listboxSelectionToolbarItems:o,extraItems:i,selections:a,keyboard:l,autoConfirm:s,disablePortal:c}){return{autoConfirm:s,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==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!p&&O,showToolbar:h,containerRef:g,isLocked:N,extraItems:X,listboxSelectionToolbarItems:Q,selections:S,keyboard:w,autoConfirm:x,disablePortal:L}),te=ar.jsx(ju,Z({isRtl:i,layout:e},ee));if(I)return te;const ne=U?ar.jsx(ns,{size:"large",style:Z(Z({},Ap),{},{padding:"7px"})}):void 0;return ar.jsxs(Mp,{item:!0,container:!0,styles:o,isRtl:i,marginY:1,paddingLeft:`${V}px`,paddingRight:`${G}px`,className:"header-container",children:[W&&ar.jsx(zp,{isLoading:j,translator:t,toggleLock:J,keyboard:w,ref:z}),H&&ar.jsxs(E,{container:!0,alignItems:"center",width:K,className:"header-action-container",children:[ne||l&&Y,ar.jsx(Kp,{iconData:B,iconStyle:Ap,disabled:S.isActive()&&p,translator:t,keyboard:w})]}),ar.jsx(E,{size:"grow",sx:{minWidth:0},justifyContent:i?"flex-end":"flex-start",className:u.listBoxHeader,children:ar.jsx($p,{variant:"h6",noWrap:!0,ref:$,title:null!=C?C:e.title,styles:o,children:null!=C?C:e.title})}),ar.jsx(E,{display:"flex",children:te})]})}const Zp=q("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 Xp({width:e,height:t,disabled:o,childNode:i,containerNode:a}){const[l,s]=n(!1),u=c(()=>{const e=a&&a.contains(document.activeElement),t=i&&i.contains(document.activeElement);s(e&&!t)},[a,i]);r(()=>{if(a)return a.addEventListener("focusin",u),a.addEventListener("focusout",u),u(),()=>{a.removeEventListener("focusin",u),a.removeEventListener("focusout",u)}},[u,a]);return!o&&l?ar.jsx(Zp,{"aria-hidden":"true",width:e,height:t}):null}const Yp="ListBoxInline",eh={listBoxHeader:`${Yp}-listBoxHeader`,screenReaderOnly:`${Yp}-screenReaderOnly`,listboxWrapper:`${Yp}-listboxWrapper`},th=ol(E,{shouldForwardProp:e=>!["containerPadding","styles"].includes(e)})(({containerPadding:e,styles:t})=>Z(Z({},t.background),{},{[`& .${eh.listBoxHeader}`]:{alignSelf:"center",display:"flex"},[`& .${eh.screenReaderOnly}`]:{position:"absolute",height:0,width:0,overflow:"hidden"},[`& .${eh.listboxWrapper}`]:{padding:e},"&:focus-visible":{outline:"none"}}));const nh=t.memo(function({options:e,layout:t}){var o,a,s,u,d;const{app:p,direction:h,frequencyMode:m,checkboxes:g,search:b=!0,focusSearch:y=!1,rangeSelect:v=!0,model:S,selections:w,update:x,fetchStart:k,postProcessPages:C,calculatePagesHeight:L,showGray:R=!0,scrollState:T,renderedCallback:q,toolbar:P=!0,toolbarMode:I="auto",isPopover:_=!1,showLock:O=!1,components:D,selectDisabled:N=()=>!1,disablePortal:A=!0,flags:j}=e,M=rl(),{translator:$,keyboardNavigation:z,themeApi:F,queryParams:B,constraints:W,hostConfig:U}=l(ql),{checkboxes:H=g}=t||{},V=rp({app:p,themeApi:F,theme:M,queryParams:B,components:D,checkboxes:H,hostConfig:U,layout:t}),G=function({appLayout:e}){return!(null==e||!e.qIsDirectQueryMode)}({appLayout:null==p?void 0:p.layout}),K=f(),J=f(),[Q,X,Y]=Wl(),[ee,te]=n(!1),[ne,re]=n(!1),oe=f(!1),[ie,ae]=n({down:0,up:0,scrollPosition:""}),le=e=>ae(t=>Z(Z({},t),e)),[se,ce]=n({start:0,stop:0}),[ue]=Uu(p),[de]=n(()=>Ju({selectDisabled:N})),fe=ic({containerRef:K,enabled:z}),pe=c(()=>(({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:p,appSelections:ue}),[p,ue]),he=null==t?void 0:t.qListObject.qDimensionInfo.qError,me=he&&W.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",[,ge]=n(!1),[be,ye]=n(null),ve=c(e=>{ye(e)},[]),{handleKeyDown:Se,handleOnMouseEnter:we,handleOnMouseLeave:xe,globalKeyDown:ke}=i(()=>Op({keyboard:fe,hovering:oe,updateKeyScroll:le,currentScrollIndex:se,constraints:W,isModal:pe,selections:w}),[fe,oe,le,K,se,p,ue,W,pe]);r(()=>(document.addEventListener("keydown",ke),()=>{document.removeEventListener("keydown",ke)}),[ke]),r(()=>{!0===b&&re(!0);const e=()=>{te(!0)},t=()=>{te(!1),"toggle"===b&&re(!1)};return _&&(w.isActive()||(w.on("activated",e),w.on("deactivated",t)),te(_)),P&&w&&(w.isModal()||(w.on("activated",e),w.on("deactivated",t)),te(_||w.isActive())),()=>{w&&w.removeListener&&(w.removeListener("activated",e),w.removeListener("deactivated",t))}},[P,w,_]);const{wildCardSearch:Ce,searchEnabled:Ee,autoConfirm:Le=!1,layoutOptions:Re={}}=null!=t?t:{},Te=null==t||null===(o=t.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked,qe=!1!==Ee&&"toggle"===b&&!Te,Pe=null==t||null===(a=t.qListObject)||void 0===a?void 0:a.qDimensionInfo,Ie=j.isEnabled("QCB-35224_FILTERPANE_TITLE_IMPROVEMENT")?null!==(s=null==t?void 0:t.title)&&void 0!==s?s:null==Pe?void 0:Pe.qFallbackTitle:null==t?void 0:t.title,_e=(null==Ie?void 0:Ie.length)&&!1!==(null==t?void 0:t.showTitle),Oe=["attach","detach","auto"].includes(I)?I:"auto",De=P||_,Ne=function({toolbarMode:e,canShowTitle:t,isPopover:n}){return"auto"!==e?e:t||n?"attach":"detach"}({toolbarMode:Oe,canShowTitle:_e,isPopover:_}),Ae=De&&"detach"===Ne,je="rtl"===h;if(!(S&&t&&$&&V))return null;const Me=!0===b||"toggle"===b&&ne&&!1!==Ee,$e=null!==(u=Re.dense)&&void 0!==u&&u,ze=()=>{var e;const t=!ne;re(t),t&&null!==(e=K.current)&&void 0!==e&&e.scrollIntoView&&K.current.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"})},Fe=()=>{"toggle"===b?ze():J.current.focus()},Be=Me&&("toggle"===b||y),We=function({isGridMode:e,dense:t,height:n,layoutOrder:r}){let o;if(e){let i;i=Hc({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==Re?void 0:Re.dataLayout),dense:$e,height:null===(d=K.current)||void 0===d?void 0:d.clientHeight,layoutOrder:Re.layoutOrder});he&&(null==q||q());const Ue=De&&!Ae?30:0,He=ar.jsx(Qp,{app:p,showSearchIcon:qe,onShowSearch:ze,isPopover:_,showToolbar:ee,isDirectQuery:G,autoConfirm:Le,toolbarMode:Ae?"detach":Oe,title:Ie,layout:t,translator:$,styles:V,isRtl:je,showLock:O,constraints:W,classes:eh,containerRect:X,containerRef:K,model:S,selectionState:de,selections:w,keyboard:fe,disablePortal:A});return ar.jsxs(ar.Fragment,{children:[Ae&&He,ar.jsxs(th,{className:"listbox-container",container:!0,tabIndex:fe.enabled?-1:void 0,direction:"column",gap:0,containerPadding:We,styles:V,style:{height:"100%",width:"100%",flexFlow:"column nowrap"},onKeyDown:Se,onMouseEnter:we,onMouseLeave:xe,ref:e=>{K.current=e,null==Q||Q(e)},"aria-label":fe.active?$.get("Listbox.ScreenReaderInstructions"):"",onFocus:()=>ge(!0),onBlur:()=>ge(!1),children:[ar.jsx(Xp,{width:null==X?void 0:X.width,height:null==X?void 0:X.height,disabled:pe()||_,childNode:be,containerNode:Y}),De&&!Ae&&He,ar.jsxs(E,{container:!0,direction:"column",height:"100%",minHeight:Ue,role:"region","aria-label":$.get("Listbox.ResultFilterLabel"),ref:ve,children:[ar.jsx(E,{children:ar.jsx(Wu,{ref:J,selections:w,selectionState:de,model:S,dense:$e,keyboard:fe,visible:Me,search:b,autoFocus:Be,beginSelectionOnFocus:!_,wildCardSearch:Ce,searchEnabled:Ee,direction:h,hide:qe&&ze,styles:V})}),ar.jsx(E,{size:"grow",className:eh.listboxWrapper,children:he?ar.jsx(Np,{text:me}):ar.jsx(_p,{children:({height:e,width:n})=>ar.jsx(du,{model:S,app:p,constraints:W,layout:t,selections:w,selectionState:de,direction:h,frequencyMode:m,rangeSelect:v,checkboxes:H,height:e,width:n,update:x,fetchStart:k,postProcessPages:C,calculatePagesHeight:L,keyboard:fe,showGray:R,scrollState:T,keyScroll:{state:ie,reset:()=>ae({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:se,set:ce},renderedCallback:q,onCtrlF:Fe,isModal:pe,styles:V})})})]})]})]})});function rh({options:e={}}){const{model:t}=e,[n]=Fl(t);return ar.jsx(nh,{options:e,layout:n})}function oh({app:e,qId:t,options:o={}}){const[i,a]=n(),[l]=Nl(),{sessionModel:s}=o,c=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],u=Object.keys(o).filter(e=>c.includes(e));if(u.length)throw new Error(`Option "${u.join(", ")}" is not applicable for existing objects.`);return r(()=>{let n=!1,r=()=>{};return async function(){const o=await Promise.resolve(s||async function(t){return l.get(t)||await e.getObject(t)}(t));if(!n){if(!l.get(o.id)){l.set(o.id,o);const e=()=>{l.clear(o.id)};o.once("closed",e),r=()=>{o.removeListener("closed",e)}}a(o)}}(),()=>{n=!0,r()}},[]),i}const ih={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}},representation:{type:"text",imageUrl:"",imageLabel:"",imageSetting:"label",imageSize:"alwaysFit",imagePosition:"top-center",titlePosition:"top-center",textOverlay:!0,titleBackground:!0,gridGap:.5,cornerRadius:4,borderWidth:0,borderColor:"#d9d9d9",cellBgColorMode:"single",cellBgColor:"#ffffff",subtitle:"",tooltip:"",showSelected:!0},title:""};function ah(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 lh=["__DO_NOT_USE__"],sh=(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 Z(Z(Z({},X(e,lh)),n),t)},ch=o(({app:e,fieldIdentifier:t,qId:o,stateName:l,element:s,initialOptions:c,renderedCallback:u,flags:d},p)=>{const[h,m]=n(c),{isExistingObject:g,hasExternalSelectionsApi:b}=function({qId:e,options:t}){return{isExistingObject:!(!e&&!t.sessionModel),hasExternalSelectionsApi:!!t.selectionsApi}}({qId:o,options:h});g||Object.assign(h,{frequencyMode:ah(h.frequencyMode)});const[y,v]=n(0);r(()=>{if(y)throw new Error("Source or selection Api can not change after a listbox has been mounted");v(y+1)},[g,b]);const S=g?oh({app:e,qId:o,options:h}):function({app:e,fieldIdentifier:t,stateName:o,options:i={}}){var a;const[l,s]=n(""),[c,u]=n(!0),[d,p]=n(),[h,m]=n(),g=null!==(a=i.title)&&void 0!==a?a:h;let{histogram:b=!1,frequencyMode:y="N"}=i;l&&l.failedToFetchFieldDef&&(b=!1,y="N"),r(()=>{const n=b||"N"!==y;t.qLibraryId&&n?async function(){try{const n=await e.getDimension(t.qLibraryId),r=await n.getLayout();m(r.qDim.title),"N"===r.qDim.qGrouping?s(r.qDim.qFieldDefs?r.qDim.qFieldDefs[0]:""):s({multiFieldDim:!0}),u(!1)}catch(e){throw u(!1),s({failedToFetchFieldDef:!0}),new Error(`Disabling frequency count and histogram: ${e&&e.message}`)}}():(u(!1),m(t))},[]);const{dense:v,checkboxes:S,listLayout:w,properties:x={}}=i,k={dense:v};"horizontal"===w&&(k.dataLayout="grid",k.layoutOrder="column",k.maxVisibleColumns={auto:!0},k.maxVisibleRows={auto:!1,maxRows:1});const C=f();C.current||(C.current=xp());const E=Ye(!0,{},ih,{qInfo:{qId:C.current},qListObjectDef:{qStateName:o,qFrequencyMode:b&&"N"===y?"V":y},histogram:b,checkboxes:S,layoutOptions:k,title:g});let L;if(Ye(!0,E,x),t.qLibraryId?(E.qListObjectDef.qLibraryId=t.qLibraryId,L=t.qLibraryId):(E.qListObjectDef.qDef.qFieldDefs=[t],L=t),"P"!==y&&b)if(null!=l&&l.multiFieldDim)E.frequencyMax="fetch";else{const e=t.qLibraryId?l:L;E.frequencyMax={qValueExpression:au(e)}}const[R]=Al(E,c?null:e,L,o);return r(()=>{R&&p(R)},[R]),d}({app:e,fieldIdentifier:t,stateName:l,options:h}),w=f(s),x=b?h.selectionsApi:Ku(e,S,[w,".njs-action-toolbar-more",".njs-action-toolbar-popover"],h)[0],k=i(()=>Z(Z({},h),{},{selections:x,model:S,app:e,renderedCallback:u,flags:d}),[h,x,S,e]);return a(p,()=>({setOptions:e=>m(e)}),[]),x&&S?ar.jsx(rh,{options:k}):null});const uh={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function dh({app:e,fieldIdentifier:t,stateName:r,element:o,options:i={}}){const[a,l]=n(!!i.show);return ar.jsx(op,{show:a,app:e,alignTo:{current:o},anchorOrigin:i.anchorOrigin,transformOrigin:i.transformOrigin,close:()=>{l(!1),i.onPopoverClose&&i.onPopoverClose()},fieldName:t,stateName:r,autoFocus:i.autoFocus,components:i.components,sortCriteria:i.sortCriteria,direction:i.direction})}function fh(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function ph(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 hh({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):Z(Z({},n),{},{qDef:n.qDef||{}});return i.qDef.cId=i.qDef.cId||xp(),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),fh(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 ph(e.qInterColumnSortOrder,n),t.dimensions.removed(o,r,n),o},addMeasure(n){const i="string"==typeof n?(e=>({qDef:{qDef:e}}))(n):Z(Z({},n),{},{qDef:n.qDef||{}});i.qDef.cId=i.qDef.cId||xp(),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),fh(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];ph(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 mh({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):Z(Z({},n),{},{qDef:n.qDef||{}});return o.qDef.cId=o.qDef.cId||xp(),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 gh=e=>({qDef:{qFieldDefs:[e]}});function bh({children:e,halo:t}){const n={async addDimension(n){const r=(e=>{let t;return t="string"==typeof e?Ye(!0,{},ih,{qListObjectDef:gh(e)}):e.qListObjectDef?Ye(!0,{},ih,e):Ye(!0,{},ih,{qListObjectDef:e}),t})(n),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||xp(),!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 yh(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 vh({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,l=a.split("/");let s=t;for(let e=0;e<l.length;e++){const t=l[e];s=t?s[t]:s}const c=function(e){return e.match("/qListObjectDef")?mh:e.match("/qChildListDef")?bh:hh}(a),u=c({dc:s,def:i,properties:t,children:r,halo:o});for(let e=0;e<n.length;++e){const t=n[e];"measure"===yh(t)?await u.addMeasure(t):await u.addDimension(t)}}const Sh=e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e;var wh={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(!Sh(t))return;void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}Sh(o)&&(void 0!==n?i[o]=n:delete i[o])},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var xh={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 kh=2**53-1;function Ch(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Eh(e,t){const n=Ye(!0,{},t,e);return wh.getValue(n,"qOtherTotalSpec.qOtherCounted")||wh.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),wh.getValue(n,"qOtherTotalSpec.qOtherLimit")||wh.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Lh(e,t){return Ye(!0,{},t,e)}function Rh(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var Th={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach(t=>{e.qLayoutExclude.changed[t].to===wh.getValue(e,t)&&wh.setValue(e,t,e.qLayoutExclude.changed[t].from)})},isMasterItemProperty:Ch,importCommonProperties:function(e,t,n){const r="masterobject"===wh.getValue(t,"properties.qInfo.qType")?"masterobject":wh.getValue(n,"qInfo.qType");wh.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:Eh,createDefaultMeasure:Lh,resolveValue:Rh,getHypercubePath:function(e){const t=wh.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?(xh.indexAdded(t.qInterColumnSortOrder,o),++o):(--o,xh.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?wh.setValue(r,`${n}.qHyperCubeDef`,e.properties.qHyperCubeDef):t.hasOwnProperty(o)||Ch(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=Rh(o.max,n.dimensions.length,kh),a=Rh(o.min,n.dimensions.length,0);return{maxDimensions:Rh(r.max,i,kh),minDimensions:Rh(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(Eh(i.dimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(Eh(i.dimensions[a],o));else if(i.dimensions.length)for(a=0;a<i.dimensions.length;++a)r.qLayoutExclude.qHyperCubeDef.qDimensions.push(Eh(i.dimensions[a],o));if(i.excludedDimensions.length)for(a=0;a<i.excludedDimensions.length;++a)r.qDimensions.length<n?r.qDimensions.push(Eh(i.excludedDimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(Eh(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(Lh(i.measures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(Lh(i.measures[a],o));else if(i.measures.length)for(a=0;a<i.measures.length;++a)r.qLayoutExclude.qHyperCubeDef.qMeasures.push(Lh(i.measures[a],o));if(i.excludedMeasures.length)for(a=0;a<i.excludedMeasures.length;++a)r.qMeasures.length<n?r.qMeasures.push(Lh(i.excludedMeasures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(Lh(i.excludedMeasures[a],o))},updateDimensionsOnAdded:function({newProperties:e,dataDefinition:t,hypercubePath:n}){if(t.dimensions&&"function"==typeof t.dimensions.added){const r=wh.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=wh.getValue(e,n||"").qHyperCubeDef,o=[...r.qMeasures];r.qMeasures=[],o.forEach(n=>{r.qMeasures.push(n),t.measures.added(n,e)})}}};var qh={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=wh.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();xh.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&&(Th.restoreChangedProperties(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!wh.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=Th.createNewProperties({exportFormat:e,initialProperties:t,hypercubePath:o}),l=wh.getValue(t,o||"").qHyperCubeDef,s=wh.getValue(a,o||"").qHyperCubeDef,{maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f}=Th.getMaxMinDimensionMeasure({exportFormat:e,dataDefinition:n}),{defaultDimension:p=Th.getDefaultDimension(),defaultMeasure:h=Th.getDefaultMeasure()}=r;return s.qDimensions.length=0,s.qMeasures.length=0,Th.shouldInitLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f})&&Th.initLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f,newHyperCubeDef:s}),Th.addDefaultDimensions({exportFormat:e,maxDimensions:c,minDimensions:u,newHyperCubeDef:s,defaultDimension:p}),Th.addDefaultMeasures({exportFormat:e,maxMeasures:d,minMeasures:f,newHyperCubeDef:s,defaultMeasure:h}),Th.setInterColumnSortOrder({exportFormat:e,newHyperCubeDef:s}),Th.copyPropertyIfExist("qMaxStackedCells",l,s),Th.copyPropertyIfExist("qNoOfLeftDims",l,s),Th.copyPropertyOrSetDefault("qInitialDataFetch",l,s,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),Th.copyPropertyOrSetDefault("qMode",l,s,"S"),Th.copyPropertyOrSetDefault("qReductionMode",l,s,"N"),Th.copyPropertyOrSetDefault("qSortbyYValue",l,s),Th.copyPropertyOrSetDefault("qIndentMode",l,s),Th.copyPropertyOrSetDefault("qShowTotalsAbove",l,s),Th.importCommonProperties(a,e,t),Th.updateDimensionsOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),Th.updateMeasuresOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),i.qProperty=a,i}(e)};const Ph=e=>wh.getValue(e,"data.targets.0.propertyPath"),Ih=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return qh.exportProperties})(Ph(e))},_h=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return qh.importProperties})(Ph(e))},Oh=async({halo:e,model:t,cellRef:n,newType:r,properties:o,viewDataMode:i=!1})=>{const a=o?{qProperty:o}:await t.getFullPropertyTree(),l=n.current.getQae(),s=Ih(l);if(!s)throw new Error("Source chart does not support conversion");const c=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}),u=c.qae,d=_h(u);if(!d)throw new Error("Target chart does not support conversion");return d({exportFormat:s({propertyTree:a,hypercubePath:Th.getHypercubePath(l),viewDataMode:i}),initialProperties:Z({qInfo:{qType:r},visualization:r},wh.getValue(u,"properties.initial",{})),dataDefinition:wh.getValue(u,"data.targets.0.",{}),hypercubePath:Th.getHypercubePath(u),viewDataMode:i})},Dh={hypercube:qh},Nh=Ye.bind(null,!0),Ah={},{isArray:jh}=Array;function Mh(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function $h(e){return void 0===e}function zh(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Fh(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e}function Bh(e,t){let n;return t.substring(1).split("/").slice(0,-1).forEach(t=>{if(!Fh(t))throw new Error(`Unsafe key in path: ${t}`);n=+t;const r=isNaN(n)?{}:[];e[n||t]=$h(e[n||t])?r:e[t],e=e[n||t]}),e}function Wh(e,t){let n=!0;if(Mh(e)&&Mh(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(r=>{Wh(e[r],t[r])||(n=!1)}),n);if(jh(e)&&jh(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Wh(e[n],t[n]))return!1;return!0}return e===t}Ah.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?Nh({},{val:e}).val:e}(t[o]),a=e[o],l=`${n}/${o}`;Wh(i,a)||zh(t,o)||($h(a)?r.push({op:"add",path:l,value:i}):Mh(i)&&Mh(a)?r=r.concat(Ah.generate(a,i,l)):jh(i)&&jh(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]&&$h(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(Wh(t,o))return r;if(!$h(t[0])&&$h(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(Ah.generate(o[e],t[i],`${n}/${e}`));for(let e=0,l=t.length;e<l;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,l)):r.push({op:"replace",path:`${n}/${o}`,value:i}))}),Object.keys(e).forEach(o=>{$h(t[o])&&!zh(e,o)&&r.push({op:"remove",path:`${n}/${o}`})}),r},Ah.apply=function(e,t){t.forEach(t=>{let n=Bh(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(!Fh(r)||null!==i&&!Fh(i)){const e=Fh(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(jh(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(jh(o)&&jh(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Mh(o)&&Mh(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!zh(a,e)&&Fh(e)&&delete a[e]}),Nh(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=Bh(e,t.from);jh(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(jh(n)?n.splice(+r,1):delete n[r]);var a})},Ah.clone=function(e){return Nh({},e)},Ah.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},Ah.updateObject=function(e,t){Object.keys(e).length?Ah.apply(e,Ah.generate(e,t)):Nh(e,t)};const Uh=e=>t=>{const n=(r=Z(Z({},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(me.prototype).forEach(e=>{r[e]=me.prototype[e]}),me.init(r),r);var r;return n};let Hh,Vh;function Gh(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 Kh(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 Jh(e){Zh(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 Qh(e){if(e.__hooks.obsolete)return Promise.resolve();Vh=-1,Hh=e,Hh.__hooks.initiated&&Hh.__hooks.list.length;try{Hh.fn.call(null)}catch(e){console.error(e)}Hh.__hooks.initiated=!0;const t=Hh.__hooks;return tm(Hh),Vh=void 0,Hh=void 0,t.chain.promise||(t.chain.promise=new Promise(e=>{t.chain.resolve=e})),function(e){Zh(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame(()=>{!function(e){Zh(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 Zh(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 Xh(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 Yh(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 em(e){return e.__hooks.imperativeHandle}function tm(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function nm(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,tm(e))}function rm(e){if(void 0===Hh)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=Hh.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function om(e){rm(++Vh);return Hh.context[e]}function im(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function am(e){return{__hooked:!0,fn:e,initiate:Kh,run:Qh,teardown:Jh,runSnaps:Xh,runMenu:Yh,focus:Mm,blur:$m,observeActions:nm,getImperativeHandle:em,updateRectOnNextRun:im}}function lm(e){const t=rm(++Vh);if(!t.value){t.component=Hh;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,Qh(r)},0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function sm(e,t){const n=rm(++Vh);Gh(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===Hh.__hooks.pendingEffects.indexOf(n)&&Hh.__hooks.pendingEffects.push(n))}function cm(e,t){const n=rm(++Vh);Gh(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],Hh.__hooks.pendingLayoutEffects.push(n))}function um(e,t){const n=rm(++Vh);return Gh(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function dm(e){return um(()=>({current:e}),[])}function fm(e,t){const[n,r]=lm(()=>({resolved:void 0,rejected:void 0,state:"pending"})),o=rm(++Vh);return o.component||(o.component=Hh),cm(()=>{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]}function pm(){return om("element")}function hm(){const e=pm(),t=Hh.__hooks.resizer,[n,r]=lm(()=>{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()),cm(()=>{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}function mm(){return om("layout")}function gm(){const e=om("layout"),[t]=lm({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function bm(){return om("appLayout")}function ym(){const e=om("model");return e&&e.session?e:void 0}function vm(){const e=om("app");return e&&e.session?e:void 0}function Sm(){const e=om("global");return e&&e.session?e:void 0}function wm(){return om("selections")}function xm(){return om("theme")}function km(){return om("nebbie")}function Cm(){return om("translator")}function Em(){return om("deviceType")}function Lm(){return om("navigation")}function Rm(){return om("plugins")}function Tm(e,t){const[n]=lm({action(){n._config.action.call(null)}});return n.component||(n.component=Hh,Hh.__hooks.actions.list.push(n)),um(()=>{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}function qm(){return om("constraints")}function Pm(){return om("interactions")}function Im(){return om("options")}function _m(e,t){const n=rm(++Vh);if(n.imperative||(n.imperative=!0),Gh(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],Hh.__hooks.imperativeHandle=r}}function Om(e){const t=rm(++Vh);t.value||(t.value=1,Hh.__hooks.snaps.push(t)),t.fn=e}function Dm(e){const t=rm(++Vh);t.value||(t.value=1,Hh.__hooks.menus.push(t)),t.fn=e}function Nm(){rm(++Vh);const e=Hh.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Am(){return om("emitter")}function jm(){const e=om("keyboardNavigation"),t=om("focusHandler");if(!Hh.__hooks.accessibility.exitFunction){const e=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&n.active&&($m(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(Hh);Hh.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e&&e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Mm(this))}.bind(Hh);Hh.__hooks.accessibility.focusFunction=n;const r=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(Hh);Hh.__hooks.accessibility.focusSelectionFunction=r}const n=Hh.__hooks.accessibility.focusFunction,r=Hh.__hooks.accessibility.exitFunction,o=Hh.__hooks.accessibility.focusSelectionFunction,[i,a]=lm({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return Hh.__hooks.accessibility.setter=a,Hh.__hooks.accessibility.enabled=e,sm(()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o}),[e]),i}function Mm(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 $m(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 zm={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Fm=Object.keys(zm);function Bm(e,t){const n=Z({},zm);var r;r=n,Object.keys(me.prototype).forEach(e=>{r[e]=me.prototype[e]}),me.init(r);const o={emit(...e){n.emit(...e)}};Object.keys(e.component||{}).forEach(t=>{-1!==Fm.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=Uh(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 Wm(e,t,n){"function"==typeof e.component&&(e.component=am(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"],l={},s={};t.model&&t.model.session||(l.select=!0,l.edit=!0,s.select=!1,s.edit=!1);const c={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,navigation:t.navigation,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,externalFocusManagement:t.externalFocusManagement||!1,focusHandler:t.focusHandler,constraints:l,interactions:s,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(c,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach(n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)}),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach((t,n)=>{this.context.plugins[n]!==t&&(e=!0)}),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach(e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(Z(Z({},r[e]),l))),"interactions"===e&&(t=JSON.stringify(Z(Z({},r[e]),s))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}})}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=c.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n,r){return e.component.runMenu(this,t,n,r)},focus(){const t=e.component.getImperativeHandle(this);t&&"function"==typeof t.focus?t.focus():e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach(e=>{i[e]=JSON.stringify(c.context[e])}),i.themeName=c.context.theme?c.context.theme.name():void 0,i.language=c.context.translator?c.context.translator.language():void 0,Object.assign(c,{selections:t.selections}),[c,null]}(e,t,n):Bm(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=Ah.clone(o),a=n.map(e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath}));Ah.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const l=Ah.generate(i,o).map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}));return t.model.__snInterceptor.applyPatches.call(this,l,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 Um=1e3,Hm=1e3,Vm=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Gm=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map(([e,t])=>e+(Math.random()*(t-e)|0).toString(32)).join(""),Km=(e,t)=>e&&e.find(e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t})||null,Jm=e=>{var t,n;return Z(Z({},e),{},{qDef:Z(Z({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:Gm()})})},Qm=e=>{var t;return Z(Z({},Jm(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},Zm=(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]})},Xm=new Error("Not supported in this object, need to implement in subclass."),Ym=e=>{if(!e)return[];return[...e].map(e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?Z(Z({},e),{},{qDef:Z(Z({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e})},eg=(e,t)=>{if(e)return t&&wh.getValue(e,t)?wh.getValue(e,t).qHyperCube:e.qHyperCube};function tg(e,t){return e.filter((e,n)=>t.includes(n))}function ng(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 rg(e,t,n){xh.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function og(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 ig(e,t){return e.getAlternativeDimensions().length+t.length>=Um}function ag(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<Um}async function lg(e,t,n,r,o,i){await e.autoSortDimension(t),xh.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 sg(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 cg(e,t){xh.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function ug(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<Hm}function dg(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 fg{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=Km(n,e))&&void 0!==t?t:Km(r,e)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw Xm}addDimensions(){throw Xm}removeDimension(){throw Xm}removeDimensions(){throw Xm}autoSortDimension(){throw Xm}replaceDimension(){throw Xm}getSorting(){throw Xm}createLibraryDimension(e,t){let n=Ye(!0,{},this.dimensionProperties||{},t||{});return n=Qm(n),n.qLibraryId=e,n.qDef.autoSort=!0,n.qDef.qSortCriterias=Vm,delete n.qDef.qFieldDefs,delete n.qDef.qFieldLabels,n}createFieldDimension(e,t,n){let r=Ye(!0,{},this.dimensionProperties||{},n||{});return r=Qm(r),e||(r.qDef.qFieldDefs=[],r.qDef.qFieldLabels=[],r.qDef.qSortCriterias=[]),r.qDef.qFieldDefs=[e],r.qDef.qFieldLabels=t?[t]:[""],r.qDef.qSortCriterias=Vm,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 Xm}addMeasures(){throw Xm}removeMeasure(){throw Xm}removeMeasures(){throw Xm}autoSortMeasure(){throw Xm}replaceMeasure(){throw Xm}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=Km(n,e))&&void 0!==t?t:Km(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 pg(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then(async()=>(rg(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 hg(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(()=>(cg(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 mg(e,t){!function(e,t){xh.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 gg(e,t){!function(e,t){xh.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 bg(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 yg(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),cg(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 vg extends fg{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?wh.getValue(e,`${this.path}.qHyperCubeDef`):e.qHyperCubeDef,this.hcProperties&&(!function(e){var t,n,r,o,i,a,l;const s=e;s.hcProperties.qDimensions=null!==(t=s.getDimensions())&&void 0!==t?t:[],s.hcProperties.qMeasures=null!==(n=s.getMeasures())&&void 0!==n?n:[],s.hcProperties.qInterColumnSortOrder=null!==(r=s.hcProperties.qInterColumnSortOrder)&&void 0!==r?r:[],s.hcProperties.qLayoutExclude=null!==(o=s.hcProperties.qLayoutExclude)&&void 0!==o?o:{qHyperCubeDef:{qDimensions:[],qMeasures:[]}},s.hcProperties.qLayoutExclude.qHyperCubeDef=null!==(i=s.hcProperties.qLayoutExclude.qHyperCubeDef)&&void 0!==i?i:{qDimensions:[],qMeasures:[]},s.hcProperties.qLayoutExclude.qHyperCubeDef.qDimensions=null!==(a=s.getAlternativeDimensions())&&void 0!==a?a:[],s.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=null!==(l=s.getAlternativeMeasures())&&void 0!==l?l:[]}(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=Ym(this.hcProperties.qDimensions),this.hcProperties.qMeasures=Ym(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=eg(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e,t,n){const r=Qm(e);return ag(this,t)?ng(this,r,n):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?pg(e,t,o):Promise.resolve(t)}(this,r,n)}async addDimensions(e,t=!1){const n=this.getDimensions(),r=n.length,o=[];let i=0;var a,l=!1,s=!1;try{for(var c,u=G(e);l=!(c=await u.next()).done;l=!1){const e=c.value;{if(ig(this,n))return o;const a=Qm(e);if(ag(this,t)){const e=await ng(this,a);o.push(e)}else n.length<this.maxDimensions()&&(await lg(this,a,r,n,o,i),i++)}}}catch(e){s=!0,a=e}finally{try{l&&null!=u.return&&await u.return()}finally{if(s)throw a}}return o}removeDimension(e,t){return t?bg(this,e):mg(this,e)}async removeDimensions(e,t){const n=this.getAlternativeDimensions(),r=this.getDimensions();if(0===e.length)return[];let o=[];const i=[...e].sort((e,t)=>t-e);if(t&&n.length>0){o=tg(n,e);var a,l=!1,s=!1;try{for(var c,u=G(i);l=!(c=await u.next()).done;l=!1){const e=c.value;await bg(this,e)}}catch(e){s=!0,a=e}finally{try{l&&null!=u.return&&await u.return()}finally{if(s)throw a}}}else if(r.length>0){o=tg(r,e);var d,f=!1,p=!1;try{for(var h,m=G(i);f=!(h=await m.next()).done;f=!1){const e=h.value;await mg(this,e)}}catch(e){p=!0,d=e}finally{try{f&&null!=m.return&&await m.return()}finally{if(p)throw d}}}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=Z(Z({},n),{},{qDef:Z(Z({},n.qDef),{},{cId:Gm()})});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=Jm(e);return ag(this,t)?ng(this,r,n).then(()=>{og(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),rg(e,r),og(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(xh.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(dg(e,t,n,r)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;xh.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&&Zm(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&&Zm([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=eg(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=Jm(e);return ug(this,t)?sg(this,r,n):hg(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>=Hm}(this,n))return!1;const i=Jm(e);return ug(this,t||!1)?(sg(this,i),r.push(i)):n.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=Z({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},xh.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):gg(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=tg(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=tg(n,e);const t=[...e].sort((e,t)=>t-e);var i,a=!1,l=!1;try{for(var s,c=G(t);a=!(s=await c.next()).done;a=!1){const e=s.value;await gg(this,e)}}catch(e){l=!0,i=e}finally{try{a&&null!=c.return&&await c.return()}finally{if(l)throw i}}}return o}replaceMeasure(e,t){return this.autoSortMeasure(t).then(()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=Z(Z({},n),{},{qDef:Z(Z({},n.qDef),{},{cId:Gm()})});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=Jm(e);return ug(this,t)?sg(this,r,n):yg(this,r,n)}moveMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures();return e<n.length&&t<n.length?Promise.resolve(xh.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?dg(e,t,n,r):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;xh.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){wh.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 Sg=()=>{};function wg(e,t){return void 0===e?()=>t:()=>e}function xg(e){const t=e||{};return{min:"function"==typeof t.min?t.min:wg(t.min,0),max:"function"==typeof t.max?t.max:wg(t.max,1e3),added:t.added||t.add||Sg,description:t.description||Sg,moved:t.moved||t.move||Sg,removed:t.removed||t.remove||Sg,replaced:t.replaced||t.replace||Sg,isDefined:()=>!!e}}function kg(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:xg(e.dimensions),measures:xg(e.measures)}}function Cg(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(kg)},exportProperties:e.exportProperties,importProperties:e.importProperties}}function Eg(e,t){var n,r;let o;o="function"==typeof e?e(t):e;const i={qae:Cg(o.qae),component:o.component||{},create:e=>Wm(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 vg(e)}:{}};return Object.keys(o).forEach(e=>{i[e]||(i.definition[e]=o[e])}),i}var Lg=e=>es((e=>Z(Z({},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 Rg({d:e}){const t=rl();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=ar.jsx(x,{style:{lineHeight:"30px",paddingRight:t.spacing(1)},children:ar.jsx(W,{children:e.missing||e.error?ar.jsx(Lg,{style:o}):ar.jsx(ys,{style:o})})});return ar.jsxs(E,{container:!0,alignItems:"center",wrap:"nowrap",children:[ar.jsx(E,{children:i}),ar.jsx(E,{container:!0,sx:{minWidth:0},wrap:"nowrap",children:ar.jsxs(x,{noWrap:!0,component:"p",children:[ar.jsx(x,{component:"span",variant:"subtitle2",color:n,children:e.description}),ar.jsx(x,{component:"span",children:" "}),ar.jsx(x,{component:"span",variant:"subtitle2",color:e.error?"error":"inherit",style:{fontWeight:400},children:e.label})]})})]})}function Tg({data:e}){const t=rl();return ar.jsx(E,{container:!0,style:{maxWidth:"300px",overflow:"hidden"},children:e.map((e,n)=>{const r=e.descriptions.map((e,t)=>ar.jsx(Rg,{d:e},t));return r.length>0&&ar.jsxs(E,{container:!0,direction:"column",style:{paddingBottom:t.spacing(2)},children:[ar.jsx(x,{noWrap:!0,variant:"subtitle1",align:"left",color:"textSecondary",children:e.title},n),r]},n)})})}function qg({title:e="Error",message:t="",data:n=[]}){const[r,o]=Wl(),[i,a]=Wl(),[l,s]=Wl(),c=n.some(e=>e.descriptions&&e.descriptions.length>0),u=!!o&&!!a&&!!s&&a.height+s.height>o.height,d=!!o&&!!a&&!!s&&a.width+s.width<=o.width,f=c&&(!!o&&!!a&&!!s)&&(!u||d);return ar.jsxs(E,{ref:r,container:!0,direction:"column",wrap:"wrap",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"},children:[ar.jsxs(E,{ref:i,container:!0,direction:"column",alignItems:"center",wrap:"nowrap",children:[ar.jsx(E,{children:ar.jsx(Lg,{style:{fontSize:"38px"}})}),ar.jsx(E,{children:ar.jsx(x,{variant:"h6",align:"center","data-tid":"error-title",children:e})}),ar.jsx(E,{children:ar.jsx(x,{variant:"subtitle1",align:"center","data-tid":"error-message",children:t})})]}),f?ar.jsx(Tg,{data:n}):null,c?ar.jsx(E,{ref:l,"aria-hidden":!0,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,top:0},children:ar.jsx(Tg,{data:n})}):null]})}const Pg=["size"],Ig="Progress",_g={root:`${Ig}-root`,front:`${Ig}-front`,back:`${Ig}-back`},Og=ol("div")(({theme:e})=>({[`&.${_g.root}`]:{position:"relative",display:"inline-block"},[`& .${_g.front}`]:{color:e.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},[`& .${_g.back}`]:{color:e.palette.divider}})),Dg={small:16,medium:32,large:64,xlarge:128};function Ng(e){let{size:t="medium"}=e,n=X(e,Pg);const r=Dg[t];return ar.jsxs(Og,{className:_g.root,children:[ar.jsx(B,Z({variant:"determinate",value:100,className:_g.back,size:r,thickness:3},n)),ar.jsx(B,Z({variant:"indeterminate",disableShrink:!0,className:_g.front,size:r,thickness:3},n))]})}const Ag=["cancel","translator"],jg=["retry","translator"],Mg={stripes:"LongRunningQuery-stripes"},$g=ol(E)(()=>({[`& .${Mg.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 zg(e){let{cancel:t,translator:n}=e,r=X(e,Ag);return ar.jsxs(ar.Fragment,{children:[ar.jsxs($g,{container:!0,direction:"column",alignItems:"center",gap:2,children:[ar.jsx(E,{children:ar.jsx(Ng,{})}),ar.jsx(E,{children:ar.jsx(x,{variant:"h6",align:"center","data-tid":"update-active",children:n.get("Object.Update.Active")})})]}),ar.jsx(E,Z(Z({},r),{},{children:ar.jsx(z,{variant:"contained",onClick:t,children:n.get("Cancel")})}))]})}function Fg(e){let{retry:t,translator:n}=e,r=X(e,jg);return ar.jsxs(ar.Fragment,{children:[ar.jsx(E,{children:ar.jsx(Lg,{style:{fontSize:"38px"}})}),ar.jsx(E,{children:ar.jsx(x,{variant:"h6",align:"center","data-tid":"update-cancelled",children:n.get("Object.Update.Cancelled")})}),ar.jsx(E,{children:ar.jsx(z,Z(Z({variant:"contained",onClick:t},r),{},{children:n.get("Retry")}))})]})}function Bg({canCancel:e,canRetry:t,api:n}){const{translator:r}=l(ql);return ar.jsxs(E,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:Mg.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:[e&&ar.jsx(zg,{cancel:n.cancel,translator:r,className:Mg.cancel}),t&&ar.jsx(Fg,{retry:n.retry,translator:r,className:Mg.retry})]})}function Wg(){return ar.jsx(E,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:ar.jsx(Ng,{size:"large"})})}const Ug={width:0,height:0},Hg="Header",Vg={containerStyle:`${Hg}-containerStyle`,containerTitleStyle:`${Hg}-containerTitleStyle`},Gg=ol(E)(({theme:e})=>({[`&.${Vg.containerStyle}`]:{flexGrow:0},[`&.${Vg.containerTitleStyle}`]:{paddingBottom:e.spacing(1)}})),Kg="njs-cell-title",Jg="njs-cell-sub-title";function Qg({id:e,layout:t,sn:o,anchorEl:i,hovering:a,focusHandler:l,titleStyles:s={},isRtl:c,translator:u}){const d=t.showTitles&&!!t.title,f=t.showTitles&&!!t.subtitle,p=t.qSelectionInfo&&t.qSelectionInfo.qInSelections,[h,m]=n([]);r(()=>{o&&o.component&&o.component.isHooked&&o.component.observeActions(e=>{m([...e,...o&&o.selectionToolbar&&o.selectionToolbar.items||[]])})},[o]);const g=[Vg.containerStyle,...d||f?[Vg.containerTitleStyle]:[]],b=a||p,y=ar.jsx(ju,{show:!1,selections:{show:p,api:o.component.selections,onKeyDeactivate:l.refocusContent},actions:h,popover:{show:b,anchorEl:i},focusHandler:l,layout:t,isRtl:c});return ar.jsxs(Gg,{container:!0,wrap:"nowrap",className:g.join(" "),children:[ar.jsx(E,{size:"grow",sx:{minWidth:0},dir:c?"rtl":"ltr",children:ar.jsxs(E,{container:!0,wrap:"nowrap",direction:"column",children:[d?ar.jsx(L,{title:t.title,children:ar.jsx(x,{id:`${e}_title`,variant:"h6",noWrap:!0,className:Kg,style:s.main,children:t.title})}):ar.jsx("div",{id:`${e}_title`,style:Ug,"aria-label":u.get("Accessibility.Object.NoTitle")}),f&&ar.jsx(L,{title:t.subtitle,children:ar.jsx(x,{variant:"body2",noWrap:!0,className:Jg,style:s.subTitle,children:t.subtitle})})]})}),ar.jsx(E,{children:y})]})}const Zg="condition",Xg="search",Yg="clear_selection",eb="matches_exactly",tb="starts_with",nb="ends_with",rb="beginning_of_word",ob="general",ib="fixed_value",ab=(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 Xg:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case rb:o="*^",i="*";break;case nb:o="*";break;case tb:i="*";break;case eb: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 Zg:o+=(e=>{var t,n,r,o,i,a,l;const{options:s}=e,c=(null==s?void 0:s.mode)===ob,u=(null==s||null===(t=s.modifier)||void 0===t?void 0:t.type)===ib,d=null!=s&&null!==(n=s.modifier)&&void 0!==n&&n.operator?s.modifier.operator.split(" "):[];if(0===d.length||!u&&(null===(r=s.firstValue)||void 0===r||!r.aggregator||null===(o=s.firstValue)||void 0===o||!o.field)||u&&(null===(i=s.firstValue)||void 0===i||!i.fixedValue)||c&&(null===(a=s.conditionField)||void 0===a||!a.aggregator||null===(l=s.conditionField)||void 0===l||!l.field))return"";let f,p,h="=";var m,g,b;if(c&&u)f=`${null===(m=s.conditionField)||void 0===m?void 0:m.aggregator}(${iu(null===(g=s.conditionField)||void 0===g?void 0:g.field)})`,p=`${null===(b=s.firstValue)||void 0===b?void 0:b.fixedValue}`;else if(!c&&u){var y;f="",p=`${null===(y=s.firstValue)||void 0===y?void 0:y.fixedValue}`,h=""}else if(c||u){var v,S,w,x;f=`${null===(v=s.conditionField)||void 0===v?void 0:v.aggregator}(${iu(null===(S=s.conditionField)||void 0===S?void 0:S.field)})`,p=`${null===(w=s.firstValue)||void 0===w?void 0:w.aggregator}(${iu(null===(x=s.firstValue)||void 0===x?void 0:x.field)})`}else{var k,C;f=`${iu(e.field)}`,p=`${null===(k=s.firstValue)||void 0===k?void 0:k.aggregator}(total ${iu(null===(C=s.firstValue)||void 0===C?void 0:C.field)})`}const E=`${h}${f}${d[0]}${p}`;let L="";if(d.length>1){var R,T,q;if(!u&&(null===(R=s.secondValue)||void 0===R||!R.aggregator||null===(T=s.secondValue)||void 0===T||!T.field)||u&&(null===(q=s.secondValue)||void 0===q||!q.fixedValue))return"";let e,t;var P;if(c&&u)e=`${null===(P=s.secondValue)||void 0===P?void 0:P.fixedValue}`,t=` and ${f}`;else if(!c&&u){var I;e=`${null===(I=s.secondValue)||void 0===I?void 0:I.fixedValue}`,t=""}else if(c||u){var _,O;e=`${null===(_=s.secondValue)||void 0===_?void 0:_.aggregator}(${iu(null===(O=s.secondValue)||void 0===O?void 0:O.field)})`,t=` and ${f}`}else{var D,N;e=`${null===(D=s.secondValue)||void 0===D?void 0:D.aggregator}(total ${iu(null===(N=s.secondValue)||void 0===N?void 0:N.field)})`,t=` and ${f}`}L=`${t}${d[1]}${e}`}return`"${E}${L}"`})(e);break;case Yg: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)},lb=(e,t)=>ab(e,t).map(e=>`${e.field}: ${e.label}`).join("; ");var sb=e=>es((e=>Z(Z({},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 cb({styles:e,children:t}){return ar.jsx(x,{noWrap:!0,variant:"body2",style:Z(Z({},e),{},{fontStyle:"italic"}),children:t})}function ub({layout:e,translator:t,filtersFootnoteString:n,footerStyle:r,isRtl:o}){var i;const a=ab(null!==(i=null==e?void 0:e.filters)&&void 0!==i?i:[],t),l={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 ar.jsx(L,{title:n,children:ar.jsxs(E,{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:[ar.jsxs(E,{sx:{display:"flex"},children:[ar.jsx(sb,{style:{fontSize:"12px",color:r.color,margin:"auto"}}),ar.jsxs(cb,{styles:Z(Z({},l),{},{marginLeft:"2px"}),children:[t.get("Object.FiltersApplied")," "]})]}),ar.jsx(E,{sx:{display:"flex"},children:a.map(e=>ar.jsxs(E,{container:!0,wrap:"nowrap",children:[ar.jsx(cb,{styles:Z(Z({},l),{},{fontWeight:"bold"}),children:`${e.field}:`}),ar.jsxs(cb,{styles:l,children:[" ",e.label," "]})]},`${e.field}-${e.label}`))})]})})}const db={itemStyle:"Footer-itemStyle"},fb=ol(E)(()=>({[`& .${db.itemStyle}`]:{minWidth:0,width:"100%"}})),pb="njs-cell-footer";function hb({layout:e,titleStyles:t={},translator:n,flags:r,isCardTheme:o,isRtl:i}){var a,l,s;const c=t.footer,u=(null==e||null===(a=e.filters)||void 0===a?void 0:a.length)>0&&(null==e||null===(l=e.qHyperCube)||void 0===l||null===(l=l.qMeasureInfo)||void 0===l?void 0:l.length)>0,d=lb(null!==(s=null==e?void 0:e.filters)&&void 0!==s?s:[],n),f=!(null!=e&&e.footnote)&&u&&d,p=null==r?void 0:r.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),h=o?"1px":"6px";return e&&e.showTitles&&(e.footnote||f)?ar.jsx(fb,{container:!0,children:ar.jsxs(E,{className:db.itemStyle,"data-testid":pb,sx:{paddingTop:e=>p?h:e.spacing(1)},children:[e.footnote&&ar.jsx(L,{title:e.footnote,children:ar.jsx(x,{noWrap:!0,variant:"body2",className:pb,style:c,align:i?"right":"left",children:e.footnote})}),f&&ar.jsx(ub,{layout:e,translator:n,filtersFootnoteString:d,footerStyle:c,isRtl:i})]})}):null}class mb{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 gb="njs-viz";function bb({sn:e,snOptions:t,snPlugins:o,layout:i,appLayout:a,halo:s,cellId:u,onMount:d}){const{component:f}=e,{theme:p,language:h,constraints:m,interactions:g,keyboardNavigation:b}=l(ql),[y]=n(()=>new mb),[v,S]=n(!1),[w,x]=n(0),[k,C,E]=Wl(),[L,R]=n(null),T=c(e=>{e&&R(e)},[]);return r(()=>{if(L)return f.created({options:t}),f.mounted(L),null==d||d(),S(!0),()=>{y.stop(),f.willUnmount()}},[L,f]),r(()=>{v&&L&&C&&(!f.isHooked&&i&&i.qSelectionInfo&&i.qSelectionInfo.qInSelections||y.schedule(()=>{const n=[];return m.passive||n.push("passive"),m.active||n.push("interact"),m.select||n.push("select"),m.edit||n.push("edit"),s.app&&s.app.session&&n.push("fetch"),Promise.resolve(f.render({layout:i,options:t,plugins:o,embed:s.public.nebbie,context:Z({constraints:m,interactions:g,theme:s.public.theme,appLayout:a,keyboardNavigation:b},f.isHooked?{}:{logicalSize:e.logicalSize({layout:i}),localeInfo:(a||{}).qLocaleInfo,permissions:n})})).then(e=>{!1!==e&&(0===w&&"function"==typeof t.onInitialRender&&t.onInitialRender.call(null),x(w+1))})}))},[C,t,o,L,E,i,a,p,h,m,g,v,b]),ar.jsx("div",{ref:k,"data-render-count":w,style:{position:"relative",height:"100%"},className:gb,children:ar.jsx("div",{ref:T,id:`${u}_content`,style:{position:"absolute",width:"100%",height:"100%"}})})}const yb={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"},vb=({layout:e,theme:t,app:n,themeName:r,disableThemeBorder:o,queryParams:a})=>{const{hostConfig:s}=l(ql),c=i(()=>{if(e&&t){const i=e.components?e.components.find(e=>"general"===e.key):null,l=(r=e.visualization,yb[r.toLowerCase()]?yb[r.toLowerCase()]:r),c={main:Yf(i,"main",t,l),footer:Yf(i,"footer",t,l),subTitle:Yf(i,"subTitle",t,l)},u=Zf(i,t,l),d=Qf(i,n,a,null==s?void 0:s.host),f=function(e,t,n,r){const o=Vf(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=Hf("","borderWidth",t,n)),i&&o?`${i} solid ${o}`:void 0}(i,t,l,o),p=function(e,t,n){return(null==e?void 0:e.borderRadius)||Hf("","borderRadius",t,n)}(i,t,l);return{titleStyles:c,bgColor:u,bgImage:d,border:f,borderRadius:p,boxShadow:Xf(i,t,l)}}var r;return{}},[e,t,n,r,o]);return c};class Sb extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const wb=["action-button","sn-nav-menu","filterpane","sn-shape"],xb=[...wb,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],kb=e=>-1===wb.indexOf(e),Cb=e=>kb(e)?"10px 10px 0":"10px 0 0",Eb=({layout:e,isError:t,isCardTheme:n,titleStyles:r,translator:o})=>{if(n){var i,a,l;const n=(null==e?void 0:e.showTitles)&&!(null==e||!e.title),s=(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=lb(null!==(l=null==e?void 0:e.filters)&&void 0!==l?l:[],o),f=!(null!=e&&e.footnote)&&c&&d,p=(null==e?void 0:e.showTitles)&&(!(null==e||!e.footnote)||f);let h;return n&&(r.main.padding=Cb(u)),s&&(r.subTitle.padding=((e,t)=>{const n=kb(e);return t?n?"0 10px":"0":Cb(e)})(u,n)),p&&(-1===wb.indexOf(u)&&(r.footer.borderTop="1px solid #d9d9d9"),r.footer.padding="6px 10px"),(t||-1===xb.indexOf(u))&&(h=`${n||s?"0":"10px"} 10px ${p?"0":"5px"}`),h}},Lb=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])=>{Lb.set(e,t)});const Rb="njs-cell",Tb="njs-cell-body";const qb=(e,t)=>{switch(t.type){case"LOADING":return Z(Z({},e),{},{loading:!0});case"LOADED":return Z(Z({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return Z(Z({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return Z(Z({},e),{},{longRunningQuery:!0});case"ERROR":return Z(Z({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error(`Unhandled type: ${t.type}`)}};function Pb({delay:e=750}){const[t,o]=n(!1);return r(()=>{const t=setTimeout(()=>o(!0),e);return()=>clearTimeout(t)},[]),t?ar.jsx(Wg,{}):null}const Ib=e=>!e.qError||7005===e.qError.qErrorCode,_b=e=>e&&e.qError&&7005!==e.qError.qErrorCode,Ob=(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,l=i&&!a&&t[e].qError,s=a&&t[e].qCalcCondMsg,c=`${l?r:a?s||o:i&&t[e].qFallbackTitle||""}`,u=n(e);return{description:u?`${u}${c.length?":":""}`:null,label:c,missing:t&&!i&&!l&&e>=t.length||a,error:l}}),Db=e=>e&&(Array.isArray(e)?e:[e])||[],Nb=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t),l=Ob(o,Db(a.qDimensionInfo||a.qItems),e=>r.dimensions.description(n,e,{}),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),s=Ob(i,Db(a.qMeasureInfo),e=>r.measures.description(n,e,{}),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:l,reqMeasErrors:s}},Ab=async(e,t,{targets:n},r)=>{const{hasUnfulfilledErrors:o,aggMinD:i,aggMinM:a,hasLayoutErrors:l,layoutErrors:s}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,l=!1;const s=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),f=u.measures.min(),p=u.resolveLayout(n),h=Db(p.qDimensionInfo||p.qItems),m=Db(p.qMeasureInfo),g=h.filter(Ib),b=m.filter(Ib);if(o+=d,i+=f,(g.length<d||b.length<f)&&(r=!0),r=r||h.some(_b)||m.some(_b),p.qError){a=!0,l=7005===p.qError.qErrorCode;const t=l&&p.qCalcCondMsg?p.qCalcCondMsg:l?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");s.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:s}})(e,n,t),c=[],u=[];let d=null;for(let i=0;i<n.length;++i){const a=n[i];if(!l&&o){const n=d||await r.getProperties();d=n;const o=Nb(e,t,n,a);c.push(...o.reqDimErrors),u.push(...o.reqMeasErrors)}}const f=c.filter(e=>!(e.missing||e.error)).length,p=e.get("Visualization.Incomplete.Dimensions",[f,i]),h=u.filter(e=>!(e.missing||e.error)).length,m=e.get("Visualization.Incomplete.Measures",[h,a]),g=[{title:p,descriptions:[...c]},{title:m,descriptions:[...u]}],b=l?s:g;return[l||o,{title:l?s[0].title:e.get("Visualization.Incomplete"),data:b}]};function jb(){return new me}const Mb=o(({halo:e,model:t,initialSnOptions:o,initialSnPlugins:i,initialError:c,onMount:u,currentId:d,emitter:p,navigation:h,onError:m},g)=>{var b,y;const{app:v,types:S}=e,{nebbie:w}=e.public,{theme:x,translator:k,language:C,keyboardNavigation:L,externalFocusManagement:T,disableCellPadding:q=!1,navigation:P,queryParams:I}=l(ql),[_]=n(p||jb),O=rl(),[D,N,A]=Wl(),[j,M]=s(qb,{loading:!1,loaded:!1,longRunningQuery:!1,error:($=c)?{title:$.message}:null,sn:null,visualization:null});var $;const[z,F]=n(t),[B,{validating:W,canCancel:U,canRetry:H},V]=Fl(z),[G]=Bl(v),[K,J,Q]=Wl(),[X,Y]=n(o),[ee,te]=n(i),ne=`njs-cell-${d}`,[re]=Ku(v,z,[`#${ne}`,".njs-action-toolbar-popover"]),[oe,ie]=n(!1),ae=f({enter:null,leave:null}),{titleStyles:le,bgColor:se,bgImage:ce,border:ue,borderRadius:de,boxShadow:fe}=vb({layout:B,theme:e.public.theme,app:e.app,themeName:x,disableThemeBorder:null==X?void 0:X.disableThemeBorder,queryParams:I}),pe=!("rtl"!==(null==X?void 0:X.direction)),he=f({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r(()=>{Hu(he.current),he.current.blurCallback=t=>{he.current.onBlurHandler?he.current.onBlurHandler(t):(e.root.toggleFocusOfCells(),t&&Q&&Q.focus())},he.current.refocusContent=()=>{j.sn.component&&"function"==typeof j.sn.component.focus&&j.sn.component.focus()}},[]);r(()=>{if(c)return void u();if(!G||!B)return;if(j.visualization===B.visualization&&j.sn)return void(async e=>{const[t,n]=await Ab(k,B,e.generator.qae.data,z);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:j.sn,layout:B,model:z})})(j.sn);const e=S.getSupportedVersion(B.visualization,B.version);return(async(e,t)=>{M({type:"LOADING"}),await(async({dispatch:e,types:t,visualization:n,version:r,model:o,app:i,selections:a,nebbie:l,focusHandler:s,emitter:c,onMount:u,navigation:d})=>{try{const u=await(async({types:e,name:t,version:n})=>await e.get({name:t,version:n}).supernova())({types:t,name:n,version:r}),f=u.create({model:o,app:i,selections:a,nebbie:l,focusHandler:s,emitter:c,navigation:d});f&&e({type:"LOADED",sn:f,visualization:n})}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:M,types:S,visualization:e,version:t,model:z,app:v,selections:re,nebbie:w,focusHandler:he.current,emitter:_,onMount:u,navigation:null!=h?h:P})})(B.visualization,e),()=>{}},[S,j.sn,z,re,B,G,C]),r(()=>{if(!W)return;const e=setTimeout(()=>M({type:"LONG_RUNNING_QUERY"}),2e3);return()=>clearTimeout(e)},[W]),a(g,()=>({getQae:()=>j.sn.generator.qae,getExtensionDefinition:()=>j.sn.generator.definition.ext,support(e,t,n){if(B&&j.loaded&&!j.error){var r;const o=t||(null===(r=j.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||B)}return!1},toggleFocus(e){"function"==typeof j.sn.component.focus&&(e?j.sn.component.focus():j.sn.component.blur())},setOnBlurHandler(e){he.current.onBlurHandler=e},setSnOptions:Y,setSnPlugins:te,setModel:F,getImperativeHandle(){var e;return null!==(e=j.sn)&&void 0!==e&&e.component&&"function"==typeof j.sn.component.getImperativeHandle?j.sn.component.getImperativeHandle():{}},onContextMenu(...e){var t;return null===(t=j.sn)||void 0===t?void 0:t.component.onContextMenu(...e)},async takeSnapshot(){const{width:e,height:t}=N;let n=JSON.parse(JSON.stringify(B));return"function"==typeof j.sn.component.setSnapshotData&&(n.snapshotData||(n.snapshotData={}),n=await j.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:k.language(),theme:O.name,appLayout:G,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=j.sn.generator.definition.ext)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.hypercubePath}}),[j.sn,J,N,B,O.name,G]);let me=null;if(j.loading&&!j.longRunningQuery)me=ar.jsx(Pb,{});else if(j.error){if(m){m(j.error.errorObject?j.error.errorObject:new Sb(j.error.title))}me=ar.jsx(qg,Z({},j.error))}else j.loaded&&(me=ar.jsx(bb,{sn:j.sn,halo:e,snOptions:X,snPlugins:ee,onMount:u,layout:B,appLayout:G,cellId:d},B.visualization));const ge=!(null===(b=e.public.theme)||void 0===b||!b.getStyle("","","_cards")),be=null===(y=e.public.galaxy)||void 0===y?void 0:y.flags;let ye,ve;q?(ye=!1,ve=void 0):null!=be&&be.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(ye=!1,ve=Eb({layout:B,isError:j.error,isCardTheme:ge,titleStyles:le,translator:k})):(ye=!0,ve=void 0);const Se=Lb.get(null==B?void 0:B.visualization),we=k.get(Se);return ar.jsxs(R,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:se||"unset",backgroundImage:ce&&ce.url?`url(${ce.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:ce&&ce.size,backgroundPosition:ce&&ce.pos,border:ue,borderRadius:de,boxShadow:fe,boxSizing:"border-box"},elevation:0,square:!0,className:Rb,ref:D,id:ne,onMouseEnter:()=>{ae.current.leave&&clearTimeout(ae.current.leave),ae.enter||(ae.current.enter=setTimeout(()=>{ie(!0),ae.current.enter=null},250))},onMouseLeave:()=>{ae.current.enter&&clearTimeout(ae.current.enter),ae.current.leave||(ae.current.leave=setTimeout(()=>{ie(!1),ae.current.leave=null},750))},children:[ar.jsxs(E,{container:!0,direction:"column",gap:0,style:Z(Z({position:"relative",width:"100%",height:"100%"},ye?{padding:O.spacing(1)}:{}),j.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":`${d}_title ${d}_type ${d}_content`,children:[B&&ar.jsx("div",{id:`${d}_type`,style:Ug,"aria-label":null!=we?we:B.visualization}),A&&B&&j.sn&&ar.jsx(Qg,{layout:B,sn:j.sn,anchorEl:A,hovering:oe,focusHandler:he.current,titleStyles:le,isRtl:pe,id:d,translator:k,children:" "}),ar.jsx(E,{tabIndex:L&&!T?0:-1,onKeyDown:L&&!T?t=>{["Enter"," ","Spacebar"].includes(t.key)&&e.root.toggleFocusOfCells(d)}:null,size:"grow",className:Tb,style:Z({height:"100%"},ve?{padding:ve}:{}),ref:K,children:me}),A&&B&&j.sn&&ar.jsx(hb,{layout:B,titleStyles:le,translator:k,flags:be,isCardTheme:ge,isRtl:pe})]}),j.longRunningQuery&&ar.jsx(Bg,{canCancel:U,canRetry:H,api:V})]})});function $b(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function zb(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 $b(e)&&$b(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(...zb(`${e}${o}/`,t[o],n[o]))}),r}function Fb(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 Bb=(e,t,n)=>{if(!e)return Promise.resolve();let r=Ah.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()},Wb=()=>{};function Ub({model:e,halo:n,navigation:r,initialError:o,onDestroy:i=async()=>{},onRender:a=()=>{},onError:l=()=>{}}={}){var s;let c,u,d,f=Wb,p=null,h=null,g=null,b=null,y=!1;const v=new Promise(e=>{g=e}),S=new Promise(e=>{b=e}),w=e=>()=>{null==e||e(),b(),a(),y=!0};let x={},k=[];const C=new me;let E={};null!==(s=n.context)&&void 0!==s&&s.enablePrivateExperimental&&(E={support(e){var t;return!(!h||!y)&&p.current.support(e,null===(t=u)||void 0===t?void 0:t.support,d)},getPropertyPanelDefinition:()=>!(!h||!y)&&(u?u.definition:p.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){await v;const t=p.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])||Th.getDefaultDimension(),measureProperties:(null===(i=r.qHyperCubeDef)||void 0===i||null===(i=i.qMeasures)||void 0===i?void 0:i[0])||Th.getDefaultMeasure(),globalChangeListeners:void 0,path:p.current.getHypercubePath()};return"function"==typeof t.propertyHandler?t.propertyHandler(a):new vg(a)}},toggleFocus(e){p.current.toggleFocus(e)},setOnBlurHandler(e){p.current.setOnBlurHandler(e)},onContextMenu:(...e)=>p.current.onContextMenu(...e)});const L=Z(Z({id:e.id,model:e,async destroy(){await i(),f(),f=Wb},async convertTo(t,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 Oh({halo:n,model:e,cellRef:p,newType:t});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 Oh({halo:n,model:e,cellRef:p,newType:t,properties:r}),a=i.qProperty;return await Bb(e,r,a),i}return await Oh({halo:n,model:e,cellRef:p,newType:t})},async toggleDataView(t){let r;if(c||!1===t)c&&!0!==t&&(r=e,await n.app.destroySessionObject(c),c=void 0,u=void 0,d=void 0);else{let t=n.context.dataViewType;const o=await e.getEffectiveProperties();if(!n.types.getSupportedVersion(t)){if(!n.types.getSupportedVersion("table"))throw new Error("No data view type registered");t="table"}const i=await Oh({halo:n,model:e,cellRef:p,newType:t,properties:o,viewDataMode:!0});r=await n.app.createSessionObject(i.qProperty),c=r.id,u=p.current.getExtensionDefinition(),d=await e.getLayout()}r&&p.current.setModel(r)},get viewDataToggled(){return void 0!==c},addListener(e,t){C.addListener(e,t)},removeListener(e,t){C.removeListener(e,t)},getImperativeHandle:async()=>(await S,p.current.getImperativeHandle()),takeSnapshot:async()=>(await S,p.current.takeSnapshot())},E),{},{__DO_NOT_USE__:{mount(i){if(h)throw new Error("Already mounted");if(!(i instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return h=i,[f,p]=function({halo:e,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,onReady:l,emitter:s,initialError:c,navigation:u,onError:d}){const{root:f}=e,p=t.createRef(),h=xp(),g=m.createPortal(ar.jsx(Mb,{ref:p,halo:e,model:r,currentId:h,initialSnOptions:o,initialSnPlugins:i,initialError:c,onMount:a,onReady:l,emitter:s,navigation:u,onError:d}),n,h),b=()=>{f.remove(g),r.removeListener("closed",b)};return r.on("closed",b),f.addCell(h,p),(async()=>{try{await f.add(g,b)}catch(e){b(),a(),d(e)}})(),[b,p]}({halo:n,element:i,model:e,initialSnOptions:x,initialSnPlugins:k,initialError:o,onMount:g,emitter:C,navigation:r,onError:l}),v},async applyProperties(t){const n=zb("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;h?(async()=>{await v,p.current.setSnOptions(Z(Z(Z({},x),e),{onInitialRender:w(t)}))})():x=Z(Z(Z({},x),e),{onInitialRender:w(t)})})(e)},plugins(e){(async e=>{Fb(e),h?(async()=>{await v,p.current.setSnPlugins(e)})():k=e})(e)},exportImage:()=>p.current.exportImage(),takeSnapshot:()=>p.current.takeSnapshot(),getModel:()=>e,convert:{async toType(t){const r=await e.getEffectiveProperties(),o=await Oh({halo:n,model:e,cellRef:p,newType:t,properties:r}),i=o.qProperty;return await Bb(e,r,i),o},async revert(){await e.clearSoftPatches()}}}});return L}async function Hb(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:l}=t,s=Ub({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:l});return s.__DO_NOT_USE__.options(t.options||{}),t.plugins&&s.__DO_NOT_USE__.plugins(t.plugins),t.element&&await s.__DO_NOT_USE__.mount(t.element),s}async function Vb({type:e,version:t,fields:n,properties:r,extendProperties:o},i,a,l){let s={};const c=[],{modelStore:u}=l;try{const a=i.types.get({name:e,version:t});s=await a.initialProperties(r,o);const l=await a.supernova();n&&await vh({sn:l,properties:s,fields:n,children:c},i),r&&l&&l.qae.properties.onChange&&l.qae.properties.onChange.call({},s)}catch(t){s=a?null:{qInfo:{qType:e},visualization:e}}if(!a){const e=await i.app.createObject(s);return c.length>0&&await e.setFullPropertyTree({qProperty:s,qChildren:c}),u.set(e.id,e),e}return s}const Gb="njs-sheet";function Kb(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 Jb=o(({model:e,halo:o,initialSnOptions:s,initialSnPlugins:c,initialError:u,onMount:d,unmount:p,navigation:h,onError:m},g)=>{var b;const{root:y}=o,[v,S]=n(e),[w]=Fl(v),{theme:x,modelStore:k}=l(ql),[C,E]=n([]),[L,R]=n(void 0),[T,q]=n(void 0),[P,I]=n(""),_=f({cellCount:0,cellsRendered:0,initialRender:!1});null==h||null===(b=h.setCurrentSheetId)||void 0===b||b.call(h,v.id),r(()=>{if(w){const e=JSON.stringify(w.cells);if(e===P)return;I(e);const n=async()=>{C.forEach(e=>{y.removeCell(e.currentId)});const e=w.cells.filter(e=>!1!==e.visible);_.cellCount=e.length,_.cellsRendered=0;const n=()=>{_.cellsRendered++,_.cellsRendered!==_.cellCount||_.initialRender||(_.initialRender=!0,s.onInitialRender())},{columns:r,rows:i}=w,a=await Promise.all(e.map(async e=>{let a;const l=new Promise(e=>{a=e}),c=C.find(t=>t.id===e.name);if(c)return c.bounds=Kb(e,r,i),delete c.mountedPromise,c;const u=await async function({id:e,options:t,plugins:n,element:r},o,i){const{modelStore:a,rpcRequestModelStore:l}=i,s=`${e}`;let c=l.get(s);c||(c=o.app.getObject(e),l.set(s,c));const u=await c;return a.set(s,u),Hb(u,{options:t,plugins:n,element:r},o)}({id:e.name},o,k);return{model:u.model,id:e.name,bounds:Kb(e,r,i),cellRef:t.createRef(),currentId:xp(),mounted:a,mountedPromise:l,options:Z(Z({},s),{onInitialRender:n})}}));a.forEach(e=>y.addCell(e.currentId,e.cellRef)),E(a)};n()}},[w]),r(()=>{const e=()=>{v.removeListener("closed",e),p()};return v.on("closed",e),()=>v.removeListener("closed",e)},[v]);const O=i(()=>C?C.map(e=>function(e,t,n,r,o,i,a,l){var s;const{x:c,y:u,width:d,height:f}=e.bounds,p={left:`${c}%`,top:`${u}%`,width:`${d}%`,height:`${f}%`,position:"absolute"},h=null===(s=t.public.galaxy)||void 0===s?void 0:s.flags;return null!=h&&h.isEnabled("VNA-13_CELLPADDING_FROM_THEME")&&(p.boxSizing="border-box",p.padding="4px"),ar.jsx("div",{style:p,children:ar.jsx(Mb,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,navigation:a,onError:l})},e.model.id)}(e,o,e.options,c,u,e.mounted,h,m)):[],[C]);r(()=>{const e=null!=w&&w.components?w.components.find(e=>"general"===e.key):null;R(Zf(e,o.public.theme)),q(Qf(e,o.app))},[w,o.public.theme,o.app,x]),a(g,()=>({setModel:S}),[]);const D=!w||void 0===w.height||Number.isNaN(w.height)?"100%":`${Number(w.height)}%`,N=C.map(e=>e.mountedPromise),A=N.filter(e=>!!e);return A.length&&Promise.all(N).then(()=>{d()}),ar.jsx("div",{className:Gb,style:{width:"100%",height:D,position:"relative",backgroundColor:L,backgroundImage:T&&T.url?`url(${T.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:T&&T.size,backgroundPosition:T&&T.pos},children:O})});const Qb=()=>{};function Zb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i=async()=>{},onRender:a=()=>{},onError:l=()=>{}}={}){let s=Qb,c=null,u=null,d=null,f=null;const p=new Promise(e=>{d=e}),h=new Promise(e=>{f=e}),g=e=>()=>{null==e||e(),f(),a()};let b={},y=[];const v={id:e.id,model:e,navigation:r,getImperativeHandle:async()=>(await h,c.current.getImperativeHandle()),async destroy(){await i(),s(),s=Qb},__DO_NOT_USE__:{mount(i){if(u)throw new Error("Already mounted");if(!(i instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return u=i,[s,c]=function({halo:e,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,initialError:l,navigation:s,onError:c}){const{root:u}=e,d=t.createRef();let f;const p=()=>{u.remove(f)};return f=m.createPortal(ar.jsx(Jb,{ref:d,halo:e,model:r,initialSnOptions:o,initialSnPlugins:i,initialError:l,onMount:a,unmount:p,navigation:s,onError:c}),n,r.id),s.setSheetRef(d),u.add(f,p),[p,d]}({halo:n,element:i,model:e,initialSnOptions:b,initialSnPlugins:y,initialError:o,onMount:d,navigation:r,onError:l}),p},async applyProperties(t){const n=zb("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;u?(async()=>{await p,c.current.setSnOptions(Z(Z(Z({},b),e),{onInitialRender:g(t)}))})():b=Z(Z(Z({},b),e),{onInitialRender:g(t)})})(e)},plugins(e){(async e=>{Fb(e),u?(async()=>{await p,c.current.setSnPlugins(e)})():y=e})(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return v}async function Xb({id:e,options:t,plugins:n,element:r,onRender:o,onError:i,navigation:a},l,s){const{modelStore:c,rpcRequestModelStore:u}=s,d=`${e}`;let f=u.get(d);f||(f=l.app.getObject(e),u.set(d,f));const p=await f;c.set(d,p);const h=a||("sheet"===p.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},l={goToSheet:async n=>{var r,o;if(!a.sheetRef)return;const{modelStore:i,rpcRequestModelStore:s}=t,c=`${n}`;let u,d=s.get(c);d||(d=e.app.getObject(n),s.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,l.emit("sheetChanged")},setSheetRef:e=>{a.sheetRef=e},getCurrentSheetId:()=>!!a.model&&a.model.id};return Hu(l),l}(l,s,p):void 0);return"sheet"===p.genericType?async function(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:l}=t,s=Zb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:l});return t.options&&s.__DO_NOT_USE__.options(t.options),t.plugins&&s.__DO_NOT_USE__.plugins(t.plugins),t.element&&await s.__DO_NOT_USE__.mount(t.element),s}(p,{options:t,plugins:n,element:r,onRender:o,onError:i},l,h):Hb(p,{options:t,plugins:n,element:r,onRender:o,onError:i},l,h)}function Yb(e={}){return{isEnabled:t=>!0===e[t]}}var ey,ty,ny,ry;function oy(){if(ry)return ny;ry=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ny=n=>n?"object"!=typeof n?e:n:t}var iy,ay,ly,sy,cy,uy,dy,fy,py,hy,my,gy,by,yy,vy,Sy,wy,xy,ky,Cy,Ey,Ly,Ry,Ty,qy,Py,Iy,_y,Oy,Dy,Ny,Ay={exports:{}};function jy(){if(ay)return iy;ay=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return iy={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 My(){if(sy)return ly;sy=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 ly=e}function $y(){return cy||(cy=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=jy(),i=My(),a=(t=e.exports={}).re=[],l=t.safeRe=[],s=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[f,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)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,s[o]=t,c[o]=r,a[o]=new RegExp(t,n?"g":void 0),l[o]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${s[u.NUMERICIDENTIFIER]})\\.(${s[u.NUMERICIDENTIFIER]})\\.(${s[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${s[u.NUMERICIDENTIFIERLOOSE]})\\.(${s[u.NUMERICIDENTIFIERLOOSE]})\\.(${s[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${s[u.NONNUMERICIDENTIFIER]}|${s[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${s[u.NONNUMERICIDENTIFIER]}|${s[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${s[u.PRERELEASEIDENTIFIER]}(?:\\.${s[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${s[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${s[u.BUILDIDENTIFIER]}(?:\\.${s[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${s[u.MAINVERSION]}${s[u.PRERELEASE]}?${s[u.BUILD]}?`),h("FULL",`^${s[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${s[u.MAINVERSIONLOOSE]}${s[u.PRERELEASELOOSE]}?${s[u.BUILD]}?`),h("LOOSE",`^${s[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${s[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${s[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${s[u.XRANGEIDENTIFIER]})(?:\\.(${s[u.XRANGEIDENTIFIER]})(?:\\.(${s[u.XRANGEIDENTIFIER]})(?:${s[u.PRERELEASE]})?${s[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${s[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[u.XRANGEIDENTIFIERLOOSE]})(?:${s[u.PRERELEASELOOSE]})?${s[u.BUILD]}?)?)?`),h("XRANGE",`^${s[u.GTLT]}\\s*${s[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${s[u.GTLT]}\\s*${s[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${s[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",s[u.COERCEPLAIN]+`(?:${s[u.PRERELEASE]})?`+`(?:${s[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",s[u.COERCE],!0),h("COERCERTLFULL",s[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${s[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${s[u.LONETILDE]}${s[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${s[u.LONETILDE]}${s[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${s[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${s[u.LONECARET]}${s[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${s[u.LONECARET]}${s[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${s[u.GTLT]}\\s*(${s[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${s[u.GTLT]}\\s*(${s[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${s[u.GTLT]}\\s*(${s[u.LOOSEPLAIN]}|${s[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${s[u.XRANGEPLAIN]})\\s+-\\s+(${s[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${s[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ay,Ay.exports)),Ay.exports}function zy(){if(py)return fy;py=1;const e=My(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=jy(),{safeRe:r,t:o}=$y(),i=oy(),{compareIdentifiers:a}=function(){if(dy)return uy;dy=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 uy={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},uy}();class l{constructor(a,s){if(s=i(s),a instanceof l){if(a.loose===!!s.loose&&a.includePrerelease===!!s.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,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const c=a.trim().match(s.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 l)){if("string"==typeof t&&t===this.version)return 0;t=new l(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof l||(e=new l(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 l||(t=new l(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 l||(t=new l(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 fy=l}function Fy(){if(my)return hy;my=1;const e=zy();return hy=(t,n,r)=>new e(t,r).compare(new e(n,r)),hy}function By(){if(qy)return Ty;qy=1;const e=function(){if(by)return gy;by=1;const e=Fy();return gy=(t,n,r)=>0===e(t,n,r),gy}(),t=function(){if(vy)return yy;vy=1;const e=Fy();return yy=(t,n,r)=>0!==e(t,n,r),yy}(),n=function(){if(wy)return Sy;wy=1;const e=Fy();return Sy=(t,n,r)=>e(t,n,r)>0,Sy}(),r=function(){if(ky)return xy;ky=1;const e=Fy();return xy=(t,n,r)=>e(t,n,r)>=0,xy}(),o=function(){if(Ey)return Cy;Ey=1;const e=Fy();return Cy=(t,n,r)=>e(t,n,r)<0,Cy}(),i=function(){if(Ry)return Ly;Ry=1;const e=Fy();return Ly=(t,n,r)=>e(t,n,r)<=0,Ly}();return Ty=(a,l,s,c)=>{switch(l){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof s&&(s=s.version),a===s;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof s&&(s=s.version),a!==s;case"":case"=":case"==":return e(a,s,c);case"!=":return t(a,s,c);case">":return n(a,s,c);case">=":return r(a,s,c);case"<":return o(a,s,c);case"<=":return i(a,s,c);default:throw new TypeError(`Invalid operator: ${l}`)}},Ty}function Wy(){if(Oy)return _y;Oy=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&&p)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,s=a?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];e=e.replace(s,q(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(l[c.COMPARATORTRIM],u),i("comparator trim",e),e=e.replace(l[c.TILDETRIM],d),i("tilde trim",e),e=e.replace(l[c.CARETTRIM],f),i("caret trim",e);let b=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));a&&(b=b.filter(e=>(i("loose invalid filter",e,this.options),!!e.match(l[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(P(this.set[t],e,this.options))return!0;return!1}}_y=t;const n=new(ty?ey:(ty=1,ey=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=oy(),o=function(){if(Iy)return Py;Iy=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 l(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 l(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 s(e.value,r).test(this.value):""===e.operator?""===e.value||new s(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(">")))}}Py=t;const n=oy(),{safeRe:r,t:o}=$y(),i=By(),a=My(),l=zy(),s=Wy();return Py}(),i=My(),a=zy(),{safeRe:l,src:s,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=$y(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:h}=jy(),m=new RegExp(s[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(l[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?l[c.TILDELOOSE]:l[c.TILDE],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,o,a,l)=>{let s;return i("tilde",e,t,n,o,a,l),S(n)?s="":S(o)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?s=`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:l?(i("replaceTilde pr",l),s=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`):s=`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`,i("tilde return",s),s})},k=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{i("caret",e,t);const n=t.loose?l[c.CARETLOOSE]:l[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,o,a,l)=>{let s;return i("caret",e,t,n,o,a,l),S(n)?s="":S(o)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?s="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:l?(i("replaceCaret pr",l),s="0"===n?"0"===o?`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(i("no pr"),s="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",s),s})},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?l[c.XRANGELOOSE]:l[c.XRANGE];return e.replace(n,(n,r,o,a,l,s)=>{if(i("xRange",e,n,r,o,a,l,s),((e,t,n)=>S(e)&&!S(t)||S(t)&&n&&!S(n))(o,a,l))return e;const c=S(o),u=c||S(a),d=u||S(l),f=d;return"="===r&&f&&(r=""),s=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(a=0),l=0,">"===r?(r=">=",u?(o=+o+1,a=0,l=0):(a=+a+1,l=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(s="-0"),n=`${r+o}.${a}.${l}${s}`):u?n=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${a}.0${s} <${o}.${+a+1}.0-0`),i("xRange return",n),n})},R=(e,t)=>(i("replaceStars",e,t),e.trim().replace(l[c.STAR],"")),T=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),q=e=>(t,n,r,o,i,a,l,s,c,u,d,f)=>`${n=S(r)?"":S(o)?`>=${r}.0.0${e?"-0":""}`:S(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${s=S(c)?"":S(u)?`<${+c+1}.0.0-0`:S(d)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${d}-${f}`:e?`<${c}.${u}.${+d+1}-0`:`<=${s}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return _y}var Uy=function(){if(Ny)return Dy;Ny=1;const e=Wy();return Dy=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Dy}(),Hy=U(Uy);const Vy={};function Gy(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)||Hy(e,i.deps.properties),supernova:()=>async function(e,t,{config:n},r){const o=`${e}__${t}`;if(!Vy[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}),l=Promise.resolve(a);Vy[o]=l.then(e=>{if(!e)throw new Error(`load() of visualization '${i}' resolved to an invalid object`);return e}).catch(e=>{throw new Sb(`Failed to load visualization: '${i}'`,e)})}return Vy[o]}(a.name,a.version,t,n.load).then(e=>(r=r||Eg(e,t.public.galaxy),o=JSON.stringify(r.qae.properties.initial),r)),initialProperties(e,t=!1){return this.supernova().then(()=>{const n=Z({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(o));return t?(Ye(!0,n,e),n):Z(Z({},n),e)})}};return a}function Ky(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]=Gy({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 Jy({halo:e,parent:t}){const n={},r=t||{get:()=>{}};return{register:(t,r)=>{n[t.name]||(n[t.name]=Ky(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(Vy).forEach(t=>{t.split("__")[0]===e&&(Vy[t]=void 0)})}(e)}}}const Qy={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())}},Zy={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};Qy.context=Zy;const Xy=(e={},t={})=>Z(Z({},e),t),Yy=(e=[],t=[])=>[...e,...t].filter((e,t,n)=>n.indexOf(e)===t);var ev=function e(n={}){const r=pe(n.context.language);function o(e,i){if(i)return o.createConfiguration(i)(e);let a=Z(Z({},n.context),{},{translator:r.translator,hostConfig:n.hostConfig});const[l,s]=Dl({app:e,context:a}),c=function({themes:e=[],loadTheme:t,root:n}={}){const r=Lt();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),Rt(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:n.themes,loadTheme:n.loadTheme,root:l});a.themeApi=c.externalAPI;const u={galaxy:{translator:r.translator,theme:c.externalAPI,flags:Yb(n.flags),deviceType:Tt(n.context.deviceType),hostConfig:n.hostConfig,anything:n.anything},theme:c.externalAPI,translator:r.translator,nebbie:null},d={app:e,root:l,config:n,public:u,context:a,types:null},f=Jy({halo:d});n.types.forEach(e=>f.register({name:e.name,version:e.version},{meta:e.meta,load:e.load}));let p=new Promise(e=>{(async()=>{if(await c.setTheme(n.context.theme),n.hostConfig&&ae&&ae.getWebResourceAuthParams){const{queryParams:e}=await ae.getWebResourceAuthParams({hostConfig:n.hostConfig});a.queryParams=e,l.context(a)}})().then(e)}),h=null,g=null;const b={render:async e=>{var t;await p,null===(t=e.signal)||void 0===t||t.throwIfAborted();const n=e.id?Xb(e,d,s):async function({type:e,version:t,fields:n,properties:r,options:o,plugins:i,element:a,extendProperties:l,navigation:s,onRender:c,onError:u},d,f){let p={};const h=[],{modelStore:m,subscribe:g}=f;let b;try{const o=d.types.get({name:e,version:t});p=await o.initialProperties(r,l);const i=await o.supernova();n&&await vh({sn:i,properties:p,fields:n,children:h},d),r&&i&&i.qae.properties.onChange&&i.qae.properties.onChange.call({},p)}catch(t){b=t,p={qInfo:{qType:e},visualization:e}}const y=await d.app.createSessionObject(p);h.length>0&&await y.setFullPropertyTree({qProperty:p,qChildren:h}),m.set(y.id,y);const v=g(y);return Hb(y,{options:o,plugins:i,element:a,onRender:c,onError:u},d,s,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()=>{l.destroy()},create:async e=>Vb(e,d,!1,s),generateProperties:async e=>Vb(e,d,!0,s),context:async e=>{let t;["theme","language","constraints","interactions","keyboardNavigation"].forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==a[n]&&(t||(t={}),t[n]=e[n])}),t&&(a=Z(Z(Z({},a),t),{},{translator:r.translator}),t.theme&&(await p,p=c.setTheme(t.theme),await p),t.language&&d.public.translator.language(t.language),l.context(a))},selections:async()=>(h||(h={mount(t){g||(g=function({element:e,app:t}){return m.createPortal(ar.jsx(kp,{app:t}),e,xp())}({element:t,app:e}),l.add(g))},unmount(){g&&(l.remove(g),g=null)}}),h),field:async n=>{let r;const o="string"==typeof n?n:n.qLibraryId;if(n.qId)r=n.qId;else if(!o)throw new Error("Field identifier or object id must be provided");const i={fieldName:o,async mount(a,s={}){if(!a)throw new Error(`Element for ${o||r} not provided`);if(this._instance)throw new Error(`Field or object ${o||r} already mounted`);const c=()=>i.emit("selectionActivated"),u=()=>i.emit("selectionDeactivated");return new Promise(o=>{[this._instance,this._ref]=function({element:e,app:n,fieldIdentifier:r,qId:o,stateName:i="$",options:a={},renderedCallback:l,flags:s}){const c=t.createRef();return[m.createPortal(ar.jsx(ch,{ref:c,app:n,element:e,fieldIdentifier:r,qId:o,stateName:i,initialOptions:a,renderedCallback:l,flags:s}),e,xp()),c]}({element:a,app:e,fieldIdentifier:n,qId:r,options:sh(Z({onSelectionActivated:c,onSelectionDeactivated:u},s)),stateName:s.stateName||"$",renderedCallback:o,flags:d.public.galaxy.flags}),l.add(this._instance)})},unmount(){this._instance&&(l.remove(this._instance),this._instance=null,this._ref=null)},__DO_NOT_USE__:{options(e){var t;const n=()=>i.emit("selectionActivated"),r=()=>i.emit("selectionDeactivated");if(null!==(t=i._ref)&&void 0!==t&&t.current){const t=sh(Z({onSelectionActivated:n,onSelectionDeactivated:r},e));i._ref.current.setOptions(t)}}}};return Hu(i),i},getRegisteredTypes:f.getList,__DO_NOT_USE__:{types:f,popover(n,r,o){b._popoverInstance&&(l.remove(b._popoverInstance),b._popoverInstance=null);const i=((e={})=>{const t=Z({},uh);return Ye(!0,t,e),t})(Z({onPopoverClose:()=>b.emit("fieldPopoverClose")},o));b._popoverInstance=t.createElement(dh,{element:n,key:xp(),app:e,fieldIdentifier:r,options:i,stateName:o.stateName||"$"}),l.add(b._popoverInstance)}}};return d.public.nebbie=b,d.types=f,Hu(b),b}return o.createConfiguration=t=>e(((e,t)=>({context:Xy(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:Z({},t.snapshot||e.snapshot),types:Yy(e.types,t.types),themes:Yy(e.themes,t.themes),flags:Xy(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:Xy(e.anything,t.anything)}))(n,t)),o.config=n,o}(Qy);function tv(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - "+ +Date.now()})}}const nv=globalThis.crypto||{getRandomValues:()=>123456};function rv(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^nv.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 ov=(e,{args:t=[],defaultValue:n}={})=>"function"==typeof e?e(...t):void 0!==e?e:n,iv=(e,{defaultValue:t,async:n=!0,delay:r=0}={})=>(...o)=>{const i=ov(e,{defaultValue:t,args:o});return n?new Promise(e=>{setTimeout(()=>e(i),r)}):i},av=["id","session"],lv=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function sv(e){return!lv.includes(e)}function cv(e){const t=ov(e.getLayout);return t.qInfo&&t.qInfo.qId}function uv(e,t){return e.reduce((e,n)=>Z(Z({},e),function(e,t){let n=cv(e);const{delay:r}=t,{id:o,session:i}=e,a=X(e,av);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 l=Z(Z({id:n,session:ov(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce((e,[t,n])=>Z(Z({},e),{},{[t]:iv(n,{async:sv(t),delay:r})}),{})),{},{genericType:e.type});return{[n]:l}}(n,t)),{})}function dv(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!cv(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function fv(e=[],t={}){if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(dv);const n=uv(e,t);return async e=>Promise.resolve(n[e])}function pv(e){return()=>Promise.resolve({id:"app-layout",qLocaleInfo:null==e?void 0:e.appLocaleInfo})}const hv={fromGenericObjects:(e,t={})=>function(e,t={}){const n=new tv,r=new rv(n),o=new fv(e,t),i=new pv(t),a=Z(Z({},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)},mv={generator:Eg,hook:am,theme:Lt,locale:ce};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 gv=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 bv=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],yv=["apikey","oauth2","cookie","windowscookie","reference","anonymous","pfx"],vv={};const Sv=async({hostConfig:e,noCache:t}={})=>{const n=`${Iw(e)}/resources/autogenerated/product-info.json`;try{if(!(n in vv)){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});vv[n]=t}const e=await vv[n];return(e.status>=400||!e.data)&&delete vv[n],e}catch{return delete vv[n],{data:void 0,status:500}}finally{t&&delete vv[n]}},wv=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}}},xv=e=>({isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,...e});function kv(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 Cv(e){return kv("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",e)}const Ev={},Lv=new Map;function Rv(e){const t=ne(e)||{};return t.host&&(t.host=Iw(t)),Y()&&Iw(t)===window.location.origin&&delete t.host,t.authType&&yv.includes(t.authType)&&delete t.authType,t}function Tv(e,t){if("function"!=typeof t)return t}function qv(e){const t=te(Rv(Vw(e)));return JSON.stringify(t,Tv)}const Pv=new Map;function Iv(e,t){const n=t?.reference||null;if(n&&!Pv.has(n))throw new yw(`Host config with reference "${n}" is not registered. Please register it before using it.`);Pv.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),Pv.set(e,t)}function _v(e){return Pv.get(e)}function Ov(){return _v("default")||{}}const Dv=new Map;function Nv(e){const t=qv(e);let n=Dv.get(t);return n||(n={redirectRequestedListeners:new Set,redirectStartedListeners:new Set},Dv.set(t,n)),n}function Av(e){const t=Nv(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 jv="qlik-qmfe-api";function Mv(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function $v(e){return`${e.accessCode}_${e.clientId}`}const zv={};function Fv(e,t,n){localStorage.setItem(`${jv}-${e}-${t}`,n)}function Bv(e,t,n){sessionStorage.setItem(`${jv}-${e}-${t}`,n)}function Wv(e,t,n,r){return e.store(`${jv}-${t}-${n}`,r)}function Uv(e,t){return localStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function Hv(e,t){return sessionStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function Vv(e,t,n){return e.get(`${jv}-${t}-${n}`)}function Gv(e,t){t.forEach(t=>localStorage.removeItem(`${jv}-${e}-${t}`))}function Kv(e,t){t.forEach(t=>sessionStorage.removeItem(`${jv}-${e}-${t}`))}function Jv(e,t){const n=`${jv}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}function Qv(e){return"object"==typeof e&&null!==e&&"function"==typeof e.store&&"function"==typeof e.get&&"function"==typeof e.delete}async function Zv(e,t){if(!e.clientId)throw new yw('A host config with authType set to "oauth2" has to also provide a clientId');return Xv(Mv(e),t,e.noCache,e.accessTokenStorage)}async function Xv(e,t,n,r){return n?t():(zv[e]=zv[e]||(async()=>{let n=await async function(e,t){let n,r;if("local"===t?(n=Uv(e,"access-token"),r=Uv(e,"refresh-token")):"session"===t?(n=Hv(e,"access-token"),r=Hv(e,"refresh-token")):Qv(t)&&(n=await Vv(t,e,"access-token"),r=await Vv(t,e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r);return n||(n=await t(),"local"===r&&n?(n.accessToken&&Fv(e,"access-token",n.accessToken),n.refreshToken&&Fv(e,"refresh-token",n.refreshToken)):"session"===r&&n?(n.accessToken&&Bv(e,"access-token",n.accessToken),n.refreshToken&&Bv(e,"refresh-token",n.refreshToken)):Qv(r)&&n&&(n.accessToken&&await Wv(r,e,"access-token",n.accessToken),n.refreshToken&&await Wv(r,e,"refresh-token",n.refreshToken)),n)})(),zv[e])}function Yv(e){const t=Mv(e);delete zv[t],Y()&&(Gv(t,["access-token","refresh-token"]),Kv(t,["access-token","refresh-token"])),Qv(e.accessTokenStorage)&&function(e,t,n){Promise.all(n.map(n=>e.delete(`${jv}-${t}-${n}`)))}(e.accessTokenStorage,t,["access-token","refresh-token"])}function eS(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function tS(e){return globalThis[e]}function nS(e){if(e.errors)throw new xw(e.errors)}function rS(e){const t=Object.keys(e);return t.sort(),t.map(t=>`${t}=${e[t]}`).join("&")}async function oS(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return function(e){let t;if(Y()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!ee())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 iS(e){const t=e.clientId||"",n=Iw(e),r=Cv(128),o=Cv(43),i=await oS(r),a=e.redirectUri||globalThis.location.href,l=Mv(e);Yv(e),Bv(l,"state",o),Bv(l,"verifier",r),Bv(l,"href",globalThis.location.href),Bv("","client-in-progress",l);const s=`${n}/oauth/authorize?${rS({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(s)}async function aS(e,t,n,r){try{const o=await(await fetch(`${Iw(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 nS(o),{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}catch(e){return console.error(e),new Promise(()=>{})}}function lS(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 sS(e){const{clientId:t,clientSecret:n,performInteractiveLogin:r}=e;if(!t||!n&&!r)throw new yw('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret or a performInteractiveLogin function');return await Zv(e,async()=>{if(e.performInteractiveLogin)return cS(e);if(!e.clientId||!e.clientSecret)throw new yw('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(lS(t,n,r,o,i))})).json();return{accessToken:a.access_token,refreshToken:a.refresh_token,errors:a.errors}}(Iw(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)})}async function cS(e){if(!e.performInteractiveLogin)return pS("No performInteractiveLogin function in hostConfig");let t;try{const n=Cv(128),r=Cv(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 eS(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=Iw(e),a=await oS(r);return`${i}/oauth/authorize?${rS({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?pS("State returned by custom interactive login function does not match original"):o?await aS(e,o,n,t):pS("No code found in response from custom interactive login function"):pS("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",zv),Object.keys(zv).forEach(e=>{console.log("Clearing access tokens for",e),Gv(e,["access-token","refresh-token"]),Kv(e,["access-token","refresh-token"])}),function(){for(const e in zv)delete zv[e]}()});let uS=Promise.resolve("");async function dS(e){if(ee()){const t=await sS(e);return t?(nS(t),t.accessToken||""):""}return Y()&&(uS=uS.then(async()=>{const t=await async function(e){const{clientId:t}=e;if(!t)throw new yw('A host config with authType set to "oauth2" has to also provide a clientId');const n=await Zv(e,async()=>{if(e.getAccessToken)try{return{accessToken:"string"==typeof e.getAccessToken?await tS(e.getAccessToken)():await e.getAccessToken(),refreshToken:void 0,errors:void 0}}catch{return pS("Could not fetch access token using custom function")}if(e.performInteractiveLogin)return cS(e);const t=Mv(e),n=Jv(t,"code"),r=Jv(t,"verifier");if(n&&r){const t=await aS(e,n,r,e.redirectUri);if(t)return t}});return n||(e.performInteractiveLogin||(await Av(e),iS(e)),new Promise(()=>{}))}(e);return t?(nS(t),t.accessToken||""):""})),uS}async function fS(e){const t=await async function(e){return zv[Mv(e)]}(e);if(Yv(e),t&&t.refreshToken&&e.clientSecret){const n=await Zv(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}}(Iw(e),t.refreshToken,e.clientSecret)});n&&nS(n)}}function pS(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function hS(e,t,n){const r=await fetch(`${Iw(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 xw(JSON.parse(t).errors)}catch{return new xw([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function mS(e,t){try{return await t()}catch(n){const{retry:r}=await yS({hostConfig:e});if(r)return t();throw n}}function gS(){const e=Math.floor(Date.now()/1e3).toString(16);return`${e}${t=40-e.length,kv("0123456789abcdef",t)}`;var t}async function bS(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new yw('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 yw('A host config with authType set to "anonymous" has to also provide an accessCode');return Xv($v(e),t,!1,void 0)}(e,async()=>{const r=Iw(e),o=await async function(e){let t;if(Y()){const n=$v(e);t=Uv(n,"tracking-code"),t||(t=gS()),Fv(n,"tracking-code",t)}else t=gS();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 xw(r.errors);return r.accessToken?r.accessToken:""}async function yS({hostConfig:e}){return function(e){const t=$v(e);delete zv[t],Y()&&(Gv(t,["access-token","refresh-token"]),Kv(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var vS={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await bS(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return ee()?{headers:{Authorization:`Bearer ${await bS(e)}`}}:{queryParams:{accessToken:await mS(e,async()=>hS(e,await bS(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await mS(e,async()=>hS(e,await bS(e),"websocket"))}}},handleAuthenticationError:yS};var SS={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function({hostConfig:e}){if(Y())throw new Error("Not supported in browser environment");return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`}})},handleAuthenticationError:function(){return Promise.resolve({})}},wS=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=ES(this.stack)}},xS=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=ES(this.stack)}};const kS=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,CS=e=>{const t=e.match(kS);return Boolean(t&&t.length>0)};function ES(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(CS(e))break;t.unshift(e)}return t.join("\n")}function LS(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 RS={};globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RS,globalThis.QlikMain?.INTERNAL__DO_NOT_USE&&(globalThis.QlikMain.INTERNAL__DO_NOT_USE.apiCache=RS);function TS(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 qS({url:e,query:t,headers:n,serializedHostConfig:r}){let o=e;if(t&&Object.keys(t).length>0){const n=LS(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 PS(e){const t=[];return RS[e]&&t.push(RS[e]),RS[".global"]&&t.push(RS[".global"]),t}function IS(e,t){const n=_S(t);for(const t in e){const r=_S(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}function _S(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 OS(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 DS(e){return e.then(e=>{const t={data:OS(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t})}function NS(e,t){return"get"!==e&&"GET"!==e&&(!t.endsWith("/api/v1/licenses/allotments")||"post"!==e&&"POST"!==e)}function AS(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${AS(e.cause)}`:AS(e.cause):e.message:String(e)}async function jS(e,t,n,r,o,i,a,l){const{body:s,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 xS(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new xS(`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 xS(`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 xS(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new xS(`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,...BS()};!d["User-Agent"]&&l&&(d["User-Agent"]=l);const f={method:e,credentials:a,mode:"cors",headers:d,redirect:await Pw(o?.hostConfig)?"manual":"follow",keepalive:o?.keepalive,progress:o?.progress,body:s,...u};let p,h;if(o?.signal)f.signal=o.signal;else if(o?.timeoutMs&&o.timeoutMs>0){const e=new AbortController;p=setTimeout(()=>{e.abort()},o.timeoutMs),f.signal=e.signal}return h=o?.progress?await async function(e,{method:t,headers:n,credentials:r,keepalive:o,body:i,signal:a,progress:l}){const s=new XMLHttpRequest;let c,u;const d=new Promise((e,t)=>{c=e,u=t});if(s.open(t||"GET",e),"object"!=typeof n)throw Error("malformed headers",n);for(const[e,t]of Object.entries(n))s.setRequestHeader(e,t);o&&s.setRequestHeader("Connection","keep-alive"),a&&a.addEventListener("abort",()=>{s.abort(),u()}),s.withCredentials="include"===r,l?.onUpload&&(s.upload.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;l.onUpload?.({loaded:t,total:r?n:void 0})}),l?.onDownload&&(s.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;l.onDownload?.({loaded:t,total:r?n:void 0})}),s.onloadend=()=>{const{status:e}=s,t={};for(const e of s.getAllResponseHeaders().split("\r\n")){const[n,r]=e.split(":",2);n&&r&&(t[n]=r)}s.response?c(new Response(s.response,{status:e,headers:t})):c(new Response(void 0,{status:e,headers:t}))};try{const e=i;s.send(e)}catch(e){return Promise.reject(new wS(AS(e),0,new Headers,{}))}return d}(t,f):await async function(e,t){try{return await fetch(e,t)}catch(e){return Promise.reject(new wS(AS(e),0,new Headers,{}))}}(t,f),p&&clearTimeout(p),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=WS(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=WS(await e.blob());break;case"text/event-stream":n=e.body;break;default:{let r;try{r=await e.text()}catch(n){throw new wS(`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:l}=e,s=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new wS(s,i,l,n);if(0===i)throw new wS(s,302,l,n);return{status:i,headers:l,data:n}}(h,t)}async function MS({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=Iw(o?.hostConfig),{headers:a,queryParams:l,credentials:s}=await Aw({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,LS({...r,...l})),d=Fw(o?.hostConfig);return{completeUrl:u,authHeaders:a,credentials:s,cacheKey:qS({url:c,query:r,headers:o?.headers,serializedHostConfig:d})}}function $S(e,t){return zS(e,t,async()=>{const{authHeaders:n,credentials:r}=await MS(t);return zS(e,{...t,authHeaders:n,credentials:r,options:{...t.options,noCache:!0}},void 0)})}function zS(e,t,n){const{method:r,completeUrl:o,body:i,options:a,authHeaders:l,credentials:s,cacheKey:c,contentType:u,userAgent:d}=t,f={method:r,completeUrl:o,cacheKey:c,options:a},p=function(e,t){if(t?.options?.noCache)return;const{method:n,completeUrl:r,cacheKey:o}=t,i=PS(e);if(NS(n,r))return;let a;for(const e of i)if(o in e){if(a=e[o],a&&void 0!==a.value&&TS(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"),DS(a.value)}(e,f);if(p)return p;const h=jS(r,o,i,u,a,l,s,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 Pw(e)){if(globalThis.loggingOut)return FS();const{retry:t,preventDefault:n}=await Nw({hostConfig:e,status:o.status,headers:o.headers,errorBody:i,canRetry:!!r});if(t&&r)return r();if(n)return FS()}throw n}}(a?.hostConfig,o,h,n);return function(e,t,n){RS[e]||(RS[e]={});const{cacheKey:r}=t;if(NS(t.method,t.completeUrl))return n.then(t=>{const n=PS(e);for(const e of n)IS(e,r);return t});const o=RS[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},DS(i)}(e,f,function(e,{method:t,body:n,options:r,authHeaders:o,credentials:i,value:a}){return a.then(a=>{const l=a.data;if(!l)return a;const s=Fw(r?.hostConfig),c=l.links?.prev?.href,u=l.links?.next?.href;return c&&(a.prev=a=>$S(e,{method:t,completeUrl:c,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:qS({url:c,headers:r?.headers,serializedHostConfig:s})})),u&&(a.next=a=>$S(e,{method:t,completeUrl:u,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:qS({url:u,headers:r?.headers,serializedHostConfig:s})})),a})}(e,{...t,value:m}))}function FS(){return new Promise(()=>{})}function BS(){if(!Y())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function WS(e,t){const n=e;return n.download=t?n=>US(e,n??t):t=>US(e,t),n}async function US(e,t){if(Y()){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 ex}),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}const HS="qmfe-api/latest";async function VS(e,t,n){return(Zw.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=Vw(e);if(qw(t)){if(0===Object.keys(t).length)throw new yw("a host config must be provided when making a cross domain request");if(!t.host)throw new yw("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:Y()?`${window.navigator.userAgent} ${HS}`:HS;const{completeUrl:r,authHeaders:o,credentials:i,cacheKey:a}=await MS(t);return $S(e,{...t,method:t.method.toUpperCase(),completeUrl:r,authHeaders:o,credentials:i,cacheKey:a,userAgent:n})}(e,t))(t)}function GS(e){!function(e){RS[e]={}}(e)}async function KS(e,t){const n=Iw(e);let r;r=await Pw(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const n=(await VS("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?(JS[n]=o(),JS[n]):(JS[n]=JS[n]||o(),JS[n])}const JS={};function QS(e){return!1===e.crossSiteCookies?"same-origin":qw(e)?"include":"same-origin"}async function ZS(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 XS={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 KS(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:QS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){if(ee()){const t={};return t["qlik-csrf-token"]=await KS(e),e.webIntegrationId&&(t["qlik-web-integration-id"]=e.webIntegrationId),{headers:t}}const t={"qlik-csrf-token":await KS(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=Iw(e);delete JS[t],GS("csrf-token")}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=Iw(e);return await Av(e),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var YS={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 ew={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 tw(e,t){try{return await t()}catch(n){const{retry:r}=await nw({hostConfig:e});if(r)return t();throw n}}async function nw({hostConfig:e}){return e.getAccessToken?(Yv(e),{preventDefault:!1,retry:!0}):e.performInteractiveLogin?(Yv(e),{retry:!0}):Y()?(await Av(e),iS(e),{preventDefault:!0}):(await fS(e),{preventDefault:!1,retry:!0})}Y()&&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=Jv("","client-in-progress");if(r&&t&&n){const e=Jv(r,"state"),o=Jv(r,"href");e&&e===n&&o&&(Bv(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var rw={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await dS(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return ee()?{headers:{Authorization:`Bearer ${await dS(e)}`}}:{queryParams:{accessToken:await tw(e,async()=>hS(e,await dS(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await tw(e,async()=>hS(e,await dS(e),"webresource"))}}},handleAuthenticationError:nw};var ow={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 iw={};function aw(e){const t=Iw(e);return iw[t]=iw[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}(),iw[t]}var lw={requiredProps:[],optionalProps:["loginUri","crossSiteCookies","getAccessToken"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":aw(e)},queryParams:{xrfkey:aw(e)},credentials:QS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:aw(e),"qlik-csrf-token":await KS(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){if(e.loginUri)return await Av(e),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0};if(e.getAccessToken){const t=await ZS(e.getAccessToken);if(t)return await fetch(`${Iw(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 sw=new Map;async function cw(e){let t=function(e){const t=Fw(e);return sw.get(t)}(e);if(!t){const n=await ZS(e.getAccessToken);if(!n)throw new Error("Failed to acquire access token");t=(await fetch(`${Iw(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=Fw(e);sw.set(n,t)}(e,t)}if(!t)throw new Error("Failed to exchange access token for cookie");return t}var uw={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 yw('The "getAccessToken" function name provided does not exist on globalThis.');return!0}throw new yw('The "getAccessToken" property must be a function or the name of a globally defined function.')},getRestCallAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:aw(e)},headers:{Cookie:await cw(e),"X-Qlik-XrfKey":aw(e)},credentials:QS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{"qlik-csrf-token":await KS(e,!0)},headers:{Cookie:await cw(e)}}},handleAuthenticationError:async function({hostConfig:e}){return function(e){const t=Fw(e);sw.delete(t)}(e),{retry:!0}}};var dw={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(Y())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 fw={};let pw=Promise.resolve(),hw=!1;function mw(e,t){fw[e.toLowerCase()]=t}async function gw(e){const t=Vw(e),n=await bw(t);pw&&await pw;let r=function(e){return fw[e.toLowerCase()]}(n);if(r||(pw=(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 Sw(e)}return Promise.resolve(void 0)}(n),r&&mw(n,r)})(),await pw),!r)throw new Sw(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 yw(`missing required properties in host config; '${r.join("', '")}'`);const o=[...bv,...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 bw(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 Pw(e)?"windowscookie":"cookie"}hw||(mw("apikey",SS),mw("cookie",XS),mw("none",ew),mw("noauth",YS),mw("oauth2",rw),mw("anonymous",vS),mw("pfx",dw),Y()?mw("windowscookie",lw):mw("windowscookie",uw),mw("reference",ow),hw=!0);var yw=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},vw=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"}},Sw=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(fw).filter(e=>"qmfeembedframerauthmodule"!==e.toLowerCase()).join("', '")}'`),this.name="InvalidAuthTypeError"}};function ww({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var xw=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(ww).join(", ")),this.errors=t}};const kw=new Map;let Cw,Ew="";function Lw(e){const t=qv(e);let n=kw.get(t);return n||(n={listeners:new Set},kw.set(t,n)),n}function Rw(e,t){if(e===Cw&&t.message===Ew)return;Cw=e,Ew=t.message;let n=!1;const r=Lw(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 Tw(e){return bw(e)}function qw(e){if(!globalThis.location?.origin)return!0;const t=Vw(e);if(0===Object.keys(t).length)return!1;try{return new URL(Iw(t)).origin!==globalThis.location.origin}catch{}return!1}async function Pw(e){const t=Vw(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=Vw(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 xv({isUnknown:!0});let n=Y()?window.QlikMain?.PRODUCT_INFO:void 0;if(!n){const{data:t,status:r}=await Sv(e);if(n=t,404===r)return xv({isUnknown:!0});if(!n||r<=399&&r>=300)return xv({isQSE:!0,isWindows:!0})}const r=(n.composition?.deploymentType||"").toLowerCase();return"qliksenseserver"===r?xv({isQSE:!0,isWindows:!0,meta:wv(n)}):"qliksensedesktop"===r?xv({isQSD:!0,isWindows:!0,meta:wv(n)}):"qliksensemobile"===r?xv({isQSE:!0,isWindows:!0,meta:wv(n)}):"cloud-console"===r?xv({isCloud:!0,isCloudConsole:!0,meta:wv(n)}):"fedramp"===n.composition?.provider?xv({isCloud:!0,isQCG:!0,meta:wv(n)}):xv({isCloud:!0,isQCS:!0,meta:wv(n)})})({hostConfig:e})).isWindows))}function Iw(e){const t=Vw(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 _w(e){const t=Vw(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(Uw,"ws")}async function Ow(e){const t=Vw(e.hostConfig);try{return await(await gw(t)).getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw Rw(t,Hw(e)),e}}async function Dw(e){const t=Vw(e.hostConfig);try{return await((await gw(t)).getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw Rw(t,Hw(e)),e}}async function Nw(e){const t=Vw(e.hostConfig),n=await(await gw(t)).handleAuthenticationError({...e,hostConfig:t}),r=e.canRetry&&n.retry,o=n.preventDefault;if(!r&&!o){const{status:n,errorBody:r}=e;Rw(t,function({errorBody:e,status:t}){const n=e;return"object"==typeof n?.errors?{message:new xw(n?.errors).message}:{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return n}async function Aw(e){const t=Vw(e.hostConfig);try{return await(await gw(t)).getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw Rw(t,Hw(e)),e}}function jw(e,t){mw(e,t)}function Mw(e){!function(e){Iv("default",e||{})}(e)}function $w(e,t){Iv(e,t)}function zw(e){!function(e){Pv.has(e)?Pv.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function Fw(e){return qv(e)}function Bw(e){return function(e){const t=e||Ev,n=qv(t);let r=Lv.get(n);return r||(r=Rv(Vw(t)),Lv.set(n,r)),r}(e)}globalThis.loggingOut=!1;const Ww=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},Uw=/^http/;function Hw(e){return{message:e.message||"Unknown error"}}function Vw(e){if(e?.reference){const t=_v(e.reference);if(!t)throw new yw(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:Ov()}function Gw(){return Ov()}function Kw(e,t){return function(e,t){const n=Lw(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}(e,t)}function Jw(e,t){return function(e,t){const n=Nv(e);return n.redirectRequestedListeners.add(t),()=>{n.redirectRequestedListeners.delete(t)}}(e,t)}function Qw(e,t){return function(e,t){const n=Nv(e);return n.redirectStartedListeners.add(t),()=>{n.redirectStartedListeners.delete(t)}}(e,t)}let Zw;Zw=function(){const e=[...Zw?.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 Xw={determineAuthType:Tw,getDefaultHostConfig:Gw,getRestCallAuthParams:Aw,getWebResourceAuthParams:Dw,getWebSocketAuthParams:Ow,handleAuthenticationError:Nw,isHostCrossOrigin:qw,isWindows:Pw,logout:Ww,registerAuthModule:jw,registerHostConfig:$w,serializeHostConfig:Fw,setDefaultHostConfig:Mw,toValidLocationUrl:Iw,toValidWebsocketLocationUrl:_w,unregisterHostConfig:zw,normalizeHostConfig:Bw,onFatalAuthError:Kw,onPageRedirectRequested:Jw,onPageRedirectStarted:Qw};var Yw=Object.freeze({__proto__:null,AuthorizationError:xw,InvalidAuthTypeError:Sw,InvalidHostConfigError:yw,UnexpectedAuthTypeError:vw,default:Xw,determineAuthType:Tw,getAccessToken:async function(e){const t=(await Aw({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:Gw,getRestCallAuthParams:Aw,getWebResourceAuthParams:Dw,getWebSocketAuthParams:Ow,handleAuthenticationError:Nw,isHostCrossOrigin:qw,isWindows:Pw,logout:Ww,normalizeHostConfig:Bw,onFatalAuthError:Kw,onPageRedirectRequested:Jw,onPageRedirectStarted:Qw,registerAuthModule:jw,registerHostConfig:$w,serializeHostConfig:Fw,setDefaultHostConfig:Mw,toValidLocationUrl:Iw,toValidWebsocketLocationUrl:_w,unregisterHostConfig:zw}),ex=Object.freeze({__proto__:null});export{fg as DataPropertyHandler,hv as EnigmaMocker,vg as HyperCubeHandler,mv as __DO_NOT_USE__,Dh as conversion,ev as embed,Dm as onContextMenu,Om as onTakeSnapshot,Tm as useAction,vm as useApp,bm as useAppLayout,qm as useConstraints,Em as useDeviceType,sm as useEffect,pm as useElement,km as useEmbed,Am as useEmitter,Sm as useGlobal,_m as useImperativeHandle,Pm as useInteractionState,jm as useKeyboard,mm as useLayout,um as useMemo,ym as useModel,Lm as useNavigation,Im as useOptions,Rm as usePlugins,fm as usePromise,hm as useRect,dm as useRef,Nm as useRenderState,wm as useSelections,gm as useStaleLayout,lm as useState,xm as useTheme,Cm as useTranslator};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|