@nebula.js/stardust 6.0.0-alpha.6 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/esm/dev.js +5 -4
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +5 -4
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +3 -3
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
package/core/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v6.0.0
|
|
2
|
+
* @nebula.js/stardust v6.0.0
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -11,7 +11,7 @@ import*as e from"react";import t,{useState as n,useEffect as r,forwardRef as o,u
|
|
|
11
11
|
* @license MIT
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/const er=[];function tr(e){return er[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+=jt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=jt(n,t,e[a]),r&&(o+=i[a]);Ft.lastIndex=0;for(var s,l="";null!==(s=Ft.exec(o));)l+="-"+s[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)+l;return{name:c,styles:o,next:zt}}(er)}var nr,rr,or={exports:{}},ir={};var ar=(rr||(rr=1,or.exports=function(){if(nr)return ir;nr=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case r:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case p:case h:case a:return e;default:return f}}case n:return f}}}return e=Symbol.for("react.module.reference"),ir.ContextConsumer=s,ir.ContextProvider=a,ir.Element=t,ir.ForwardRef=c,ir.Fragment=r,ir.Lazy=p,ir.Memo=h,ir.Portal=n,ir.Profiler=i,ir.StrictMode=o,ir.Suspense=u,ir.SuspenseList=d,ir.isAsyncMode=function(){return!1},ir.isConcurrentMode=function(){return!1},ir.isContextConsumer=function(e){return m(e)===s},ir.isContextProvider=function(e){return m(e)===a},ir.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ir.isForwardRef=function(e){return m(e)===c},ir.isFragment=function(e){return m(e)===r},ir.isLazy=function(e){return m(e)===p},ir.isMemo=function(e){return m(e)===h},ir.isPortal=function(e){return m(e)===n},ir.isProfiler=function(e){return m(e)===i},ir.isStrictMode=function(e){return m(e)===o},ir.isSuspense=function(e){return m(e)===u},ir.isSuspenseList=function(e){return m(e)===d},ir.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ir.typeOf=m,ir}()),or.exports);function sr(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 lr(t){if(e.isValidElement(t)||ar.isValidElementType(t)||!sr(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=lr(t[e])})),n}function cr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return sr(t)&&sr(n)&&Object.keys(n).forEach((i=>{e.isValidElement(n[i])||ar.isValidElementType(n[i])?o[i]=n[i]:sr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&sr(t[i])?o[i]=cr(t[i],n[i],r):r.clone?o[i]=sr(n[i])?lr(n[i]):n[i]:o[i]=n[i]})),o}const ur=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})),{})};function dr(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 hr={borderRadius:4};function pr(e,t){return t?cr(e,t,{clone:!1}):e}const fr={xs:0,sm:600,md:900,lg:1200,xl:1536},mr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${fr[e]}px)`},gr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:fr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function br(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||mr;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||mr;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some((e=>s.startsWith(`@${e}`)))||s.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:gr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||fr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o}),{})}return n(t)}function yr(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function vr(e){if("string"!=typeof e)throw new Error(qt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Sr(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 wr(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Sr(e,n)||r,t&&(o=t(o,r,e)),o}function Cr(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=Sr(e.theme,r)||{};return br(e,i,(e=>{let r=wr(a,o,e);return e===r&&"string"==typeof e&&(r=wr(a,o,`${t}${"default"===e?"":vr(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const xr={m:"margin",p:"padding"},Er={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},kr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Lr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!kr[e])return[e];e=kr[e]}const[t,n]=e.split(""),r=xr[t],o=Er[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Rr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Ir(e,t,n,r){const o=Sr(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof 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:`-${n}`}:"function"==typeof o?o:()=>{}}function Tr(e){return Ir(e,"spacing",8)}function Or(e,t){return"string"==typeof t||null==t?t:e(t)}function _r(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=Or(t,n),e)),{})}(Lr(n),r);return br(e,e[n],o)}function Pr(e,t){const n=Tr(e.theme);return Object.keys(e).map((r=>_r(e,t,r,n))).reduce(pr,{})}function Dr(e){return Pr(e,Rr)}function Ar(e){return Pr(e,qr)}function Mr(e=8,t=Tr({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 Nr(...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]?pr(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function jr(e){return"number"!=typeof e?e:`${e}px solid`}function zr(e,t){return Cr({prop:e,themeKey:"borders",transform:t})}Dr.propTypes={},Dr.filterProps=Rr,Ar.propTypes={},Ar.filterProps=qr;const Fr=zr("border",jr),$r=zr("borderTop",jr),Br=zr("borderRight",jr),Wr=zr("borderBottom",jr),Hr=zr("borderLeft",jr),Ur=zr("borderColor"),Gr=zr("borderTopColor"),Vr=zr("borderRightColor"),Kr=zr("borderBottomColor"),Jr=zr("borderLeftColor"),Zr=zr("outline",jr),Xr=zr("outlineColor"),Qr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Ir(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Or(t,e)});return br(e,e.borderRadius,n)}return null};Qr.propTypes={},Qr.filterProps=["borderRadius"],Nr(Fr,$r,Br,Wr,Hr,Ur,Gr,Vr,Kr,Jr,Qr,Zr,Xr);const Yr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Ir(e.theme,"spacing",8),n=e=>({gap:Or(t,e)});return br(e,e.gap,n)}return null};Yr.propTypes={},Yr.filterProps=["gap"];const eo=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Ir(e.theme,"spacing",8),n=e=>({columnGap:Or(t,e)});return br(e,e.columnGap,n)}return null};eo.propTypes={},eo.filterProps=["columnGap"];const to=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Ir(e.theme,"spacing",8),n=e=>({rowGap:Or(t,e)});return br(e,e.rowGap,n)}return null};to.propTypes={},to.filterProps=["rowGap"];function no(e,t){return"grey"===t?t:e}Nr(Yr,eo,to,Cr({prop:"gridColumn"}),Cr({prop:"gridRow"}),Cr({prop:"gridAutoFlow"}),Cr({prop:"gridAutoColumns"}),Cr({prop:"gridAutoRows"}),Cr({prop:"gridTemplateColumns"}),Cr({prop:"gridTemplateRows"}),Cr({prop:"gridTemplateAreas"}),Cr({prop:"gridArea"}));function ro(e){return e<=1&&0!==e?100*e+"%":e}Nr(Cr({prop:"color",themeKey:"palette",transform:no}),Cr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:no}),Cr({prop:"backgroundColor",themeKey:"palette",transform:no}));const oo=Cr({prop:"width",transform:ro}),io=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||fr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ro(t)}};return br(e,e.maxWidth,t)}return null};io.filterProps=["maxWidth"];const ao=Cr({prop:"minWidth",transform:ro}),so=Cr({prop:"height",transform:ro}),lo=Cr({prop:"maxHeight",transform:ro}),co=Cr({prop:"minHeight",transform:ro});Cr({prop:"size",cssProperty:"width",transform:ro}),Cr({prop:"size",cssProperty:"height",transform:ro});Nr(oo,io,ao,so,lo,co,Cr({prop:"boxSizing"}));const uo={border:{themeKey:"borders",transform:jr},borderTop:{themeKey:"borders",transform:jr},borderRight:{themeKey:"borders",transform:jr},borderBottom:{themeKey:"borders",transform:jr},borderLeft:{themeKey:"borders",transform:jr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:jr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Qr},color:{themeKey:"palette",transform:no},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:no},backgroundColor:{themeKey:"palette",transform:no},p:{style:Ar},pt:{style:Ar},pr:{style:Ar},pb:{style:Ar},pl:{style:Ar},px:{style:Ar},py:{style:Ar},padding:{style:Ar},paddingTop:{style:Ar},paddingRight:{style:Ar},paddingBottom:{style:Ar},paddingLeft:{style:Ar},paddingX:{style:Ar},paddingY:{style:Ar},paddingInline:{style:Ar},paddingInlineStart:{style:Ar},paddingInlineEnd:{style:Ar},paddingBlock:{style:Ar},paddingBlockStart:{style:Ar},paddingBlockEnd:{style:Ar},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},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:Yr},rowGap:{style:to},columnGap:{style:eo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ro},maxWidth:{style:io},minWidth:{transform:ro},height:{transform:ro},maxHeight:{transform:ro},minHeight:{transform:ro},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 ho=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:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Sr(n,s)||{};if(c)return c(o);return br(o,t,(t=>{let n=wr(u,l,t);return t===n&&"string"==typeof t&&(n=wr(u,l,`${e}${"default"===t?"":vr(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??uo;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}(o.breakpoints),l=Object.keys(s);let c=s;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=pr(c,e(n,i,o,a));else{const e=br({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=pr(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=pr(c,e(n,i,o,a))})),!i&&o.modularCssLayers?{"@layer sx":dr(o,yr(l,c))}:dr(o,yr(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();function po(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 fo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=ur(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(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:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n);let l=cr({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Mr(o),shape:{...hr,...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=po,l=t.reduce(((e,t)=>cr(e,t)),l),l.unstable_sxConfig={...uo,...a?.unstable_sxConfig},l.unstable_sx=function(e){return ho({sx:e,theme:this})},l}function mo(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}ho.filterProps=["sx"];const go=fo();function bo(e=go){return mo(e)}function yo(e){const t=tr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function vo({styles:e,themeId:t,defaultTheme:n={}}){const r=bo(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map((e=>yo("function"==typeof e?e(o):e))):yo(i)),Kn.jsx(Yn,{styles:i})}const So=e=>e,wo=(()=>{let e=So;return{configure(t){e=t},generate:t=>e(t),reset(){e=So}}})();function Co(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=Co(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Co(e))&&(r&&(r+=" "),r+=t);return r}const Eo={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 ko(e,t,n="Mui"){const r=Eo[t];return r?`${n}-${r}`:`${wo.generate(e)}-${t}`}function Lo(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=ko(e,t,n)})),r}function Ro(e){const{variants:t,...n}=e,r={variants:t,style:tr(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=tr(e.style))})),r}const qo=fo();function Io(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function To(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Oo(e){return e?(t,n)=>n[e]:null}function _o(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap((t=>_o(e,t,n)));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?To(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?To(tr(o),n):o}return Po(e,r.variants,[t],n)}return r?.isProcessed?n?To(tr(r.style),n):r.style:n?To(tr(r),n):r}function Po(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?To(tr(a.style(o)),r):a.style(o))):n.push(r?To(tr(a.style),r):a.style)}return n}function Do(e,t){}function Ao(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Mo(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=Mo(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}const No="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function jo(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 zo(e){if(e.type)return e;if("#"===e.charAt(0))return zo(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(qt(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(qt(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const Fo=(e,t)=>{try{return(e=>{const t=zo(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 $o(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 Bo(e){e=zo(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 s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),$o({type:s,values:l})}function Wo(e){let t="hsl"===(e=zo(e)).type||"hsla"===e.type?zo(Bo(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 Ho(e,t,n){try{return function(e,t){return e=zo(e),t=jo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,$o(e)}(e,t)}catch(t){return e}}function Uo(e,t){if(e=zo(e),t=jo(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 $o(e)}function Go(e,t,n){try{return Uo(e,t)}catch(t){return e}}function Vo(e,t){if(e=zo(e),t=jo(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 $o(e)}function Ko(e,t,n){try{return Vo(e,t)}catch(t){return e}}function Jo(e,t,n){try{return function(e,t=.15){return Wo(e)>.5?Uo(e,t):Vo(e,t)}(e,t)}catch(t){return e}}let Zo=0;const Xo={...e}.useId;function Qo(t){if(void 0!==Xo){return Xo()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect((()=>{null==n&&(Zo+=1,r(`mui-${Zo}`))}),[n]),o}(t)}const Yo=e.createContext(null);function ei(){return e.useContext(Yo)}var ti="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ni(t){const{children:n,theme:r}=t,o=ei(),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[ti]=null!==o),e}),[r,o]);return Kn.jsx(Yo.Provider,{value:i,children:n})}const ri=e.createContext();function oi({value:e,...t}){return Kn.jsx(ri.Provider,{value:e??!0,...t})}const ii=e.createContext(void 0);function ai({value:e,children:t}){return Kn.jsx(ii.Provider,{value:e,children:t})}function si({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?Mo(o.defaultProps,r):o.styleOverrides||o.variants?r:Mo(o,r)}({props:t,name:n,theme:{components:e.useContext(ii)}})}const li={};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 ui(e){const{children:t,theme:n,themeId:r}=e,o=mo(li),i=ei()||li,a=ci(r,o,n),s=ci(r,i,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=mo(),n=Qo()||"",{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};`:"",No((()=>{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?Kn.jsx(vo,{styles:o}):null}(a);return Kn.jsx(ni,{theme:s,children:Kn.jsx(y.Provider,{value:a,children:Kn.jsx(oi,{value:l,children:Kn.jsxs(ai,{value:r?a[r].components:a.components,children:[c,t]})})})})}const di={theme:void 0};const hi="mode",pi="color-scheme",fi="data-color-scheme";function mi(){}const gi=({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 mi;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function bi(){}function yi(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function vi(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 Si(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=hi,colorSchemeStorageKey:s=pi,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=gi,noSsr:u=!1}=t,d=i.join(","),h=i.length>1,p=e.useMemo((()=>c?.({key:a,storageWindow:l})),[c,a,l]),f=e.useMemo((()=>c?.({key:`${s}-light`,storageWindow:l})),[c,s,l]),m=e.useMemo((()=>c?.({key:`${s}-dark`,storageWindow:l})),[c,s,l]),[g,b]=e.useState((()=>{const e=p?.get(n)||n,t=f?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:yi(e),lightColorScheme:t,darkColorScheme:i}})),[y,v]=e.useState(u||!h);e.useEffect((()=>{v(!0)}),[]);const S=function(e){return vi(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:yi(r)}}))}),[p,n]),C=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 vi(t,(t=>{"light"===t&&(f?.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,f?.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=>(f?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o})))}),[d,f,m,r,o]),x=e.useCallback((e=>{"system"===g.mode&&b((t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}}))}),[g.mode]),E=e.useRef(x);return E.current=x,e.useEffect((()=>{if("function"!=typeof window.matchMedia||!h)return;const e=(...e)=>E.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}}),[h]),e.useEffect((()=>{if(h){const e=p?.subscribe((e=>{e&&!["light","dark","system"].includes(e)||w(e||n)}))||bi,t=f?.subscribe((e=>{e&&!d.match(e)||C({light:e})}))||bi,r=m?.subscribe((e=>{e&&!d.match(e)||C({dark:e})}))||bi;return()=>{e(),t(),r()}}}),[C,w,d,n,l,h,p,f,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:C}}function wi(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 Ci=(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])}))},xi=(e,t,n)=>{!function e(r,o=[],i=[]){Object.entries(r).forEach((([r,a])=>{(!n||n&&!n([...o,r]))&&null!=a&&("object"==typeof a&&Object.keys(a).length>0?e(a,[...o,r],Array.isArray(a)?[...i,r]:i):t([...o,r],a,i))}))}(e)},Ei=(e,t)=>{if("number"==typeof t){if(["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t))))return t;return e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`}return t};function ki(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return xi(e,((e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=Ei(e,t);Object.assign(o,{[r]:l}),Ci(i,e,`var(${r})`,s),Ci(a,e,`var(${r}, ${l})`,s)}}),(e=>"vars"===e[0])),{css:o,vars:i,varsWithDefaults:a}}const Li={black:"#000",white:"#fff"},Ri={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"},qi={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ii={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ti={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Oi={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},_i={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Pi={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Di(){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:Li.white,default:Li.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 Ai=Di();function Mi(){return{text:{primary:Li.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:Li.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 Ni=Mi();function ji(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=Vo(e.main,o):"dark"===t&&(e.dark=Uo(e.main,i)))}function zi(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(e="light"){return"dark"===e?{main:Oi[200],light:Oi[50],dark:Oi[400]}:{main:Oi[700],light:Oi[400],dark:Oi[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:qi[200],light:qi[50],dark:qi[400]}:{main:qi[500],light:qi[300],dark:qi[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Ii[500],light:Ii[300],dark:Ii[700]}:{main:Ii[700],light:Ii[400],dark:Ii[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:_i[400],light:_i[300],dark:_i[700]}:{main:_i[700],light:_i[500],dark:_i[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Pi[400],light:Pi[300],dark:Pi[700]}:{main:Pi[800],light:Pi[500],dark:Pi[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Ti[400],light:Ti[300],dark:Ti[700]}:{main:"#ed6c02",light:Ti[500],dark:Ti[900]}}(t);function d(e){const t=function(e,t){const n=Wo(e),r=Wo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ni.text.primary)>=n?Ni.text.primary:Ai.text.primary;return t}const h=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(qt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(qt(12,t?` (${t})`:"",JSON.stringify(e.main)));return ji(e,"light",o,r),ji(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e};let p;"light"===t?p=Di():"dark"===t&&(p=Mi());return cr({common:{...Li},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Ri,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...p},o)}function Fi(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 $i={textTransform:"uppercase"},Bi='"Roboto", "Helvetica", "Arial", sans-serif';function Wi(e,t){const{fontFamily:n=Bi,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,h=r/14,p=u||(e=>e/l*h+"rem"),f=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Bi?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(i,48,1.167,0),h4:f(i,34,1.235,.25),h5:f(i,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(i,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(i,16,1.5,.15),body2:f(i,14,1.43,.15),button:f(a,14,1.75,.4,$i),caption:f(i,12,1.66,.4),overline:f(i,12,2.66,1,$i),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return cr({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function Hi(...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 Ui=["none",Hi(0,2,1,-1,0,1,1,0,0,1,3,0),Hi(0,3,1,-2,0,2,2,0,0,1,5,0),Hi(0,3,3,-2,0,3,4,0,0,1,8,0),Hi(0,2,4,-1,0,4,5,0,0,1,10,0),Hi(0,3,5,-1,0,5,8,0,0,1,14,0),Hi(0,3,5,-1,0,6,10,0,0,1,18,0),Hi(0,4,5,-2,0,7,10,1,0,2,16,1),Hi(0,5,5,-3,0,8,10,1,0,3,14,2),Hi(0,5,6,-3,0,9,12,1,0,3,16,2),Hi(0,6,6,-3,0,10,14,1,0,4,18,3),Hi(0,6,7,-4,0,11,15,1,0,4,20,3),Hi(0,7,8,-4,0,12,17,2,0,5,22,4),Hi(0,7,8,-4,0,13,19,2,0,5,24,4),Hi(0,7,9,-4,0,14,21,2,0,5,26,4),Hi(0,8,9,-5,0,15,22,2,0,6,28,5),Hi(0,8,10,-5,0,16,24,2,0,6,30,5),Hi(0,8,11,-5,0,17,26,2,0,6,32,5),Hi(0,9,11,-5,0,18,28,2,0,7,34,6),Hi(0,9,12,-6,0,19,29,2,0,7,36,6),Hi(0,10,13,-6,0,20,31,3,0,8,38,7),Hi(0,10,13,-6,0,21,33,3,0,8,40,7),Hi(0,10,14,-6,0,22,35,3,0,8,42,7),Hi(0,11,14,-7,0,23,36,3,0,9,44,8),Hi(0,11,15,-7,0,24,38,3,0,9,46,8)],Gi={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)"},Vi={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ki(e){return`${Math.round(e)}ms`}function Ji(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Zi(e){const t={...Gi,...e.easing},n={...Vi,...e.duration};return{getAutoHeightDuration:Ji,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:Ki(o)} ${i} ${"string"==typeof a?a:Ki(a)}`)).join(",")},...e,easing:t,duration:n}}const Xi={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Qi(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let o=0;o<n.length;o++){const[i,a]=n[o];!sr(r=a)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||i.startsWith("unstable_")?delete t[i]:sr(a)&&(t[i]={...a},e(t[i]))}var r}(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 Yi(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(qt(20));const u=zi(i),d=fo(e);let h=cr(d,{mixins:(p=d.breakpoints,f=r,{toolbar:{minHeight:56,[p.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[p.up("sm")]:{minHeight:64}},...f}),palette:u,shadows:Ui.slice(),typography:Wi(u,s),transitions:Zi(a),zIndex:{...Xi}});var p,f;return h=cr(h,c),h=t.reduce(((e,t)=>cr(e,t)),h),h.unstable_sxConfig={...uo,...c?.unstable_sxConfig},h.unstable_sx=function(e){return ho({sx:e,theme:this})},h.toRuntimeSource=Qi,h}const ea=[...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 ta(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function na(e){return"dark"===e?ea:[]}function ra(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 oa=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 ia(e,t,n){!e[t]&&n&&(e[t]=n)}function aa(e){return"string"==typeof e&&e.startsWith("hsl")?Bo(e):e}function sa(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Fo(aa(e[t])))}const la=e=>{try{return e()}catch(e){}},ca=(e="mui")=>wi(e);function ua(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=zi(t);return{palette:i,opacity:{...ta(i.mode),...n},overlays:r||na(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=Yi({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...ta(o),...t?.opacity},overlays:t?.overlays||na(o)},a}function da(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=ra,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),h=ca(i),{[d]:p,light:f,dark:m,...g}=n,b={...g};let y=p;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(y=!0),!y)throw new Error(qt(21,d));const v=ua(b,y,c,d);f&&!b.light&&ua(b,f,void 0,"light"),m&&!b.dark&&ua(b,m,void 0,"dark");let S={defaultColorScheme:d,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:b,font:{...Fi(v.typography),...v.font},spacing:(w=c.spacing,"number"==typeof w?`${w}px`:"string"==typeof w||"function"==typeof w||Array.isArray(w)?w:"8px")};var w;Object.keys(S.colorSchemes).forEach((e=>{const t=S.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return h(e,t[r][o])};var r;if("light"===t.mode&&(ia(t.common,"background","#fff"),ia(t.common,"onBackground","#000")),"dark"===t.mode&&(ia(t.common,"background","#000"),ia(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){ia(t.Alert,"errorColor",Go(t.error.light,.6)),ia(t.Alert,"infoColor",Go(t.info.light,.6)),ia(t.Alert,"successColor",Go(t.success.light,.6)),ia(t.Alert,"warningColor",Go(t.warning.light,.6)),ia(t.Alert,"errorFilledBg",n("palette-error-main")),ia(t.Alert,"infoFilledBg",n("palette-info-main")),ia(t.Alert,"successFilledBg",n("palette-success-main")),ia(t.Alert,"warningFilledBg",n("palette-warning-main")),ia(t.Alert,"errorFilledColor",la((()=>t.getContrastText(t.error.main)))),ia(t.Alert,"infoFilledColor",la((()=>t.getContrastText(t.info.main)))),ia(t.Alert,"successFilledColor",la((()=>t.getContrastText(t.success.main)))),ia(t.Alert,"warningFilledColor",la((()=>t.getContrastText(t.warning.main)))),ia(t.Alert,"errorStandardBg",Ko(t.error.light,.9)),ia(t.Alert,"infoStandardBg",Ko(t.info.light,.9)),ia(t.Alert,"successStandardBg",Ko(t.success.light,.9)),ia(t.Alert,"warningStandardBg",Ko(t.warning.light,.9)),ia(t.Alert,"errorIconColor",n("palette-error-main")),ia(t.Alert,"infoIconColor",n("palette-info-main")),ia(t.Alert,"successIconColor",n("palette-success-main")),ia(t.Alert,"warningIconColor",n("palette-warning-main")),ia(t.AppBar,"defaultBg",n("palette-grey-100")),ia(t.Avatar,"defaultBg",n("palette-grey-400")),ia(t.Button,"inheritContainedBg",n("palette-grey-300")),ia(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),ia(t.Chip,"defaultBorder",n("palette-grey-400")),ia(t.Chip,"defaultAvatarColor",n("palette-grey-700")),ia(t.Chip,"defaultIconColor",n("palette-grey-700")),ia(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ia(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ia(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ia(t.LinearProgress,"primaryBg",Ko(t.primary.main,.62)),ia(t.LinearProgress,"secondaryBg",Ko(t.secondary.main,.62)),ia(t.LinearProgress,"errorBg",Ko(t.error.main,.62)),ia(t.LinearProgress,"infoBg",Ko(t.info.main,.62)),ia(t.LinearProgress,"successBg",Ko(t.success.main,.62)),ia(t.LinearProgress,"warningBg",Ko(t.warning.main,.62)),ia(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),ia(t.Slider,"primaryTrack",Ko(t.primary.main,.62)),ia(t.Slider,"secondaryTrack",Ko(t.secondary.main,.62)),ia(t.Slider,"errorTrack",Ko(t.error.main,.62)),ia(t.Slider,"infoTrack",Ko(t.info.main,.62)),ia(t.Slider,"successTrack",Ko(t.success.main,.62)),ia(t.Slider,"warningTrack",Ko(t.warning.main,.62));const e=Jo(t.background.default,.8);ia(t.SnackbarContent,"bg",e),ia(t.SnackbarContent,"color",la((()=>t.getContrastText(e)))),ia(t.SpeedDialAction,"fabHoverBg",Jo(t.background.paper,.15)),ia(t.StepConnector,"border",n("palette-grey-400")),ia(t.StepContent,"border",n("palette-grey-400")),ia(t.Switch,"defaultColor",n("palette-common-white")),ia(t.Switch,"defaultDisabledColor",n("palette-grey-100")),ia(t.Switch,"primaryDisabledColor",Ko(t.primary.main,.62)),ia(t.Switch,"secondaryDisabledColor",Ko(t.secondary.main,.62)),ia(t.Switch,"errorDisabledColor",Ko(t.error.main,.62)),ia(t.Switch,"infoDisabledColor",Ko(t.info.main,.62)),ia(t.Switch,"successDisabledColor",Ko(t.success.main,.62)),ia(t.Switch,"warningDisabledColor",Ko(t.warning.main,.62)),ia(t.TableCell,"border",Ko(Ho(t.divider,1),.88)),ia(t.Tooltip,"bg",Ho(t.grey[700],.92))}if("dark"===t.mode){ia(t.Alert,"errorColor",Ko(t.error.light,.6)),ia(t.Alert,"infoColor",Ko(t.info.light,.6)),ia(t.Alert,"successColor",Ko(t.success.light,.6)),ia(t.Alert,"warningColor",Ko(t.warning.light,.6)),ia(t.Alert,"errorFilledBg",n("palette-error-dark")),ia(t.Alert,"infoFilledBg",n("palette-info-dark")),ia(t.Alert,"successFilledBg",n("palette-success-dark")),ia(t.Alert,"warningFilledBg",n("palette-warning-dark")),ia(t.Alert,"errorFilledColor",la((()=>t.getContrastText(t.error.dark)))),ia(t.Alert,"infoFilledColor",la((()=>t.getContrastText(t.info.dark)))),ia(t.Alert,"successFilledColor",la((()=>t.getContrastText(t.success.dark)))),ia(t.Alert,"warningFilledColor",la((()=>t.getContrastText(t.warning.dark)))),ia(t.Alert,"errorStandardBg",Go(t.error.light,.9)),ia(t.Alert,"infoStandardBg",Go(t.info.light,.9)),ia(t.Alert,"successStandardBg",Go(t.success.light,.9)),ia(t.Alert,"warningStandardBg",Go(t.warning.light,.9)),ia(t.Alert,"errorIconColor",n("palette-error-main")),ia(t.Alert,"infoIconColor",n("palette-info-main")),ia(t.Alert,"successIconColor",n("palette-success-main")),ia(t.Alert,"warningIconColor",n("palette-warning-main")),ia(t.AppBar,"defaultBg",n("palette-grey-900")),ia(t.AppBar,"darkBg",n("palette-background-paper")),ia(t.AppBar,"darkColor",n("palette-text-primary")),ia(t.Avatar,"defaultBg",n("palette-grey-600")),ia(t.Button,"inheritContainedBg",n("palette-grey-800")),ia(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),ia(t.Chip,"defaultBorder",n("palette-grey-700")),ia(t.Chip,"defaultAvatarColor",n("palette-grey-300")),ia(t.Chip,"defaultIconColor",n("palette-grey-300")),ia(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ia(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ia(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ia(t.LinearProgress,"primaryBg",Go(t.primary.main,.5)),ia(t.LinearProgress,"secondaryBg",Go(t.secondary.main,.5)),ia(t.LinearProgress,"errorBg",Go(t.error.main,.5)),ia(t.LinearProgress,"infoBg",Go(t.info.main,.5)),ia(t.LinearProgress,"successBg",Go(t.success.main,.5)),ia(t.LinearProgress,"warningBg",Go(t.warning.main,.5)),ia(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),ia(t.Slider,"primaryTrack",Go(t.primary.main,.5)),ia(t.Slider,"secondaryTrack",Go(t.secondary.main,.5)),ia(t.Slider,"errorTrack",Go(t.error.main,.5)),ia(t.Slider,"infoTrack",Go(t.info.main,.5)),ia(t.Slider,"successTrack",Go(t.success.main,.5)),ia(t.Slider,"warningTrack",Go(t.warning.main,.5));const e=Jo(t.background.default,.98);ia(t.SnackbarContent,"bg",e),ia(t.SnackbarContent,"color",la((()=>t.getContrastText(e)))),ia(t.SpeedDialAction,"fabHoverBg",Jo(t.background.paper,.15)),ia(t.StepConnector,"border",n("palette-grey-600")),ia(t.StepContent,"border",n("palette-grey-600")),ia(t.Switch,"defaultColor",n("palette-grey-300")),ia(t.Switch,"defaultDisabledColor",n("palette-grey-600")),ia(t.Switch,"primaryDisabledColor",Go(t.primary.main,.55)),ia(t.Switch,"secondaryDisabledColor",Go(t.secondary.main,.55)),ia(t.Switch,"errorDisabledColor",Go(t.error.main,.55)),ia(t.Switch,"infoDisabledColor",Go(t.info.main,.55)),ia(t.Switch,"successDisabledColor",Go(t.success.main,.55)),ia(t.Switch,"warningDisabledColor",Go(t.warning.main,.55)),ia(t.TableCell,"border",Go(Ho(t.divider,1),.68)),ia(t.Tooltip,"bg",Ho(t.grey[700],.92))}sa(t.background,"default"),sa(t.background,"paper"),sa(t.common,"background"),sa(t.common,"onBackground"),sa(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&ia(t[e],"mainChannel",Fo(aa(n.main))),n.light&&ia(t[e],"lightChannel",Fo(aa(n.light))),n.dark&&ia(t[e],"darkChannel",Fo(aa(n.dark))),n.contrastText&&ia(t[e],"contrastTextChannel",Fo(aa(n.contrastText))),"text"===e&&(sa(t[e],"primary"),sa(t[e],"secondary")),"action"===e&&(n.active&&sa(t[e],"active"),n.selected&&sa(t[e],"selected")))}))})),S=t.reduce(((e,t)=>cr(e,t)),S);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:oa(S)},{vars:x,generateThemeVars:E,generateStyleSheets:k}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ki(l,t);let h=d;const p={},{[s]:f,...m}=i;if(Object.entries(m||{}).forEach((([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=ki(n,t);h=cr(h,i),p[e]={css:o,vars:r}})),f){const{css:e,vars:n,varsWithDefaults:r}=ki(f,t);h=cr(h,r),p[s]={css:e,vars:n}}function g(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)return e.defaultColorScheme===t?":root":{[`@media (prefers-color-scheme: ${i[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:h,generateThemeVars:()=>{let e={...c};return Object.entries(p).forEach((([,{vars:t}])=>{e=cr(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=p;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=i[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};a(n(e,{...s}),s)})),t}}}(S,C);return S.vars=x,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach((([e,t])=>{S[e]=t})),S.generateThemeVars=E,S.generateStyleSheets=k,S.generateSpacing=function(){return Mr(c.spacing,Tr(this))},S.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),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=a,S.unstable_sxConfig={...uo,...c?.unstable_sxConfig},S.unstable_sx=function(e){return ho({sx:e,theme:this})},S.toRuntimeSource=Qi,S}function ha(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:zi({...!0===n?{}:n.palette,mode:t})})}function pa(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return Yi(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=Yi({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},ha(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},ha(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),da({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const fa=pa();function ma(){const e=bo(fa);return e[It]||e}const ga=function(e={}){const{themeId:t,defaultTheme:n=qo,rootShouldForwardProp:r=Io,slotShouldForwardProp:o=Io}=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!==ho))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=Oo(Ao(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",h=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,p=l||!1;let f=Io;"Root"===a||"root"===a?f=r:a?f=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:f,label:Do(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return _o(t,e,t.theme.modularCssLayers?d:void 0)};if(sr(e)){const t=Ro(e);return function(e){return t.variants?_o(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?To(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]=_o(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)})),n&&!h&&a.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Po(e,r,[],e.theme.modularCssLayers?"theme":void 0):null})),p||a.push(ho),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 s=[...r,...o,...a],l=m(...s);return e.muiName&&(l.muiName=e.muiName),l};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:It,defaultTheme:fa,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function ba({theme:e,...t}){const n=It in e?e[It]:void 0;return Kn.jsx(ui,{...t,themeId:n?It:void 0,theme:n||e})}const ya="mui-color-scheme",va="light",Sa="dark",wa="mui-mode",{CssVarsProvider:Ca}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=hi,colorSchemeStorageKey:i=pi,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=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={},h={},p="string"==typeof s?s:s.light,f="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:f=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:C=!1,defaultMode:x="system",noSsr:E}=t,k=e.useRef(!1),L=ei(),R=e.useContext(u),q=!!R&&!w,I=e.useMemo((()=>p||("function"==typeof r?r():r)),[p]),T=I[n],O=T||I,{colorSchemes:_=d,components:P=h,cssVarPrefix:D}=O,A=Object.keys(_).filter((e=>!!_[e])).join(","),M=e.useMemo((()=>A.split(",")),[A]),N="string"==typeof s?s:s.light,j="string"==typeof s?s:s.dark,z=_[N]&&_[j]?x:_[O.defaultColorScheme]?.palette?.mode||O.palette?.mode,{mode:F,setMode:$,systemMode:B,lightColorScheme:W,darkColorScheme:H,colorScheme:U,setColorScheme:G}=Si({supportedColorSchemes:M,defaultLightColorScheme:N,defaultDarkColorScheme:j,modeStorageKey:f,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let V=F,K=U;q&&(V=R.mode,K=R.colorScheme);const J=e.useMemo((()=>{const e=K||O.defaultColorScheme,t=O.generateThemeVars?.()||O.vars,n={...O,components:P,colorSchemes:_,cssVarPrefix:D,vars:t};if("function"==typeof n.generateSpacing&&(n.spacing=n.generateSpacing()),e){const t=_[e];t&&"object"==typeof t&&Object.keys(t).forEach((e=>{t[e]&&"object"==typeof t[e]?n[e]={...n[e],...t[e]}:n[e]=t[e]}))}return l?l(n):n}),[O,K,P,_,D]),Z=O.colorSchemeSelector;No((()=>{if(K&&S&&Z&&"media"!==Z){const e=Z;let t=Z;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...M.map((e=>t.substring(1).replace("%s",e)))),S.classList.add(t.substring(1).replace("%s",K));else{const e=t.replace("%s",K).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||M.forEach((e=>{S.removeAttribute(t.replace(K,e))})),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,K)}}}),[K,Z,S,M]),e.useEffect((()=>{let e;if(g&&k.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)}}),[K,g,v]),e.useEffect((()=>(k.current=!0,()=>{k.current=!1})),[]);const X=e.useMemo((()=>({allColorSchemes:M,colorScheme:K,darkColorScheme:H,lightColorScheme:W,mode:V,setColorScheme:G,setMode:$,systemMode:B})),[M,K,H,W,V,G,$,B,J.colorSchemeSelector]);let Q=!0;(C||!1===O.cssVariables||q&&L?.cssVarPrefix===D)&&(Q=!1);const Y=Kn.jsxs(e.Fragment,{children:[Kn.jsx(ui,{themeId:T?n:void 0,theme:J,children:c}),Q&&Kn.jsx(Yn,{styles:J.generateStyleSheets?.()||[]})]});return q?Y:Kn.jsx(u.Provider,{value:X,children:Y})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=hi,colorSchemeStorageKey:i=pi,attribute:a=fi,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return Kn.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",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:f,modeStorageKey:o,...e})}}({themeId:It,theme:()=>pa({cssVariables:!0}),colorSchemeStorageKey:ya,modeStorageKey:wa,defaultColorScheme:{light:va,dark:Sa},resolveTheme:e=>{const t={...e,typography:Wi(e.palette,e.typography)};return t.unstable_sx=function(e){return ho({sx:e,theme:this})},t}}),xa=Ca;function Ea({theme:t,...n}){const r=e.useMemo((()=>{if("function"==typeof t)return t;const e=It in t?t[It]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}}),[t]);return r?Kn.jsx(ba,{theme:r,...n}):Kn.jsx(xa,{theme:t,...n})}const ka=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(di.theme=r.theme,o=Ro(e(di)),t=o,n=r.theme),o}};function La(e){return ko("MuiSvgIcon",e)}Lo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ra=ga("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${vr(n.color)}`],t[`fontSize${vr(n.fontSize)}`]]}})(ka((({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}}]})))),qa=e.forwardRef((function(t,n){const r=si({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=r,f=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},g={};u||(g.viewBox=h);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="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${vr(t)}`,`fontSize${vr(n)}`]},La,r)})(m);return Kn.jsxs(Ra,{as:s,className:xo(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?Kn.jsx("title",{children:d}):null]})}));function Ia(){return Ia=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},Ia.apply(null,arguments)}function Ta(e,t){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ta(e,t)}function Oa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ta(e,t)}function _a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}qa.muiName="SvgIcon";const Pa=Lo("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 Da={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 Aa={green:"#00873D",blue:"#3F8AB3",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},Ma={mode:"light",palette:{primary:{main:Aa.grey25,contrastText:Aa.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Aa.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:Aa.grey100,dark:Aa.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:Aa.grey100,default:Aa.grey100,lightest:Aa.grey100,lighter:Aa.grey98,darker:Aa.grey95,darkest:Aa.grey90},custom:{focusBorder:Aa.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:Aa.grey45,disabledContrastText:Aa.grey100},selected:{main:Aa.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:Aa.grey100,selectedContrastText:Aa.grey100,mainContrastText:Aa.grey100,alternativeContrastText:Aa.grey25,excludedContrastText:Aa.grey25,selectedExcludedContrastText:Aa.grey100,possibleContrastText:Aa.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)"}}},Na={mode:"dark",palette:{primary:{main:Aa.grey20,contrastText:Aa.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Aa.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:Aa.grey100,dark:Aa.grey0},action:{active:Aa.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:Aa.grey25,lighter:Aa.grey20,darker:Aa.grey15,darkest:Aa.grey10},custom:{focusBorder:Aa.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:Aa.grey45,disabledContrastText:Aa.grey100},selected:{main:Aa.green,alternative:Aa.grey20,excluded:Aa.grey10,selectedExcluded:Aa.grey10,possible:Aa.grey80,selectedContrastText:Aa.grey100,mainContrastText:Aa.grey100,alternativeContrastText:Aa.grey100,excludedContrastText:Aa.grey100,selectedExcludedContrastText:Aa.grey100,possibleContrastText:Aa.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)"}}},ja={},za=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}}},MuiButton:{styleOverrides:{outlined:{padding:"3px 11px",["&.".concat(Pa.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(Pa.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(Pa.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(Pa.disabled)]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Fa(e){let t=Ma,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=Na));const r=JSON.stringify(t);if(ja[r])return ja[r];const o={palette:Q(Q({type:t.mode},Da.palette),t.palette),typography:Q({},Da.typography),shadows:Da.shadows,shape:Q({},Da.shape)},i=Q(Q({},o),{},{components:za(o)});return ja[r]=pa(i),ja[r].name=n,ja[r]}wo.configure((e=>"njs-".concat("a18a","-").concat(e.replace("Mui",""))));var $a=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Ba={active:!0,select:!0,passive:!0,edit:!1};function Wa(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(Ba).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Ba[e],n[e]=!Ba[e])})),e.constraints=n,e.interactions=t}var Ha=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=[],i={},a={get:e=>t[e],set:(n,r)=>{if(void 0===n||"object"==typeof n)throw new Error("Invalid key: ".concat(JSON.stringify(n)));return t[n]=r,i[n]=e({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));t[e]=null},dispatch:e=>{o.forEach((n=>n(e?{}:t)))},destroy:()=>{Object.keys(i).forEach((e=>{i[e]&&i[e]()}))}};return[()=>{const[,e]=n(t);return r((()=>(o.push(e),()=>{const t=o.indexOf(e);o.splice(t,1)})),[e]),[a]},a]};const Ua=o(((e,o)=>{let{initialContext:s,renderCallback:l,modelStore:c,selectionStore:u}=e;const[d,h]=n(s),[p,f]=n(),{theme:m}=i((()=>({theme:Fa(p)})),[p]),[g,b]=n([]);return r((()=>{l&&l()}),[]),a(o,(()=>({setComps(e){b([...e])},setMuiThemeName:f,setContext:e=>h((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t))})),[]),d&&(d.modelStore=c,d.selectionStore=u),t.createElement(Qn,{injectFirst:!0},t.createElement(Ea,{theme:m},t.createElement($a.Provider,{value:d},g)))}));function Ga(e){let n,{app:r,context:o}=e,i=!1;const a=new Promise((e=>{n=e})),s=t.createRef(),l=document.createElement("div");l.style.display="none",l.setAttribute("data-nebulajs-version","6.0.0-alpha.6"),l.setAttribute("data-app-id",r.id),document.body.appendChild(l),o&&Wa(o);const c=function(e){const[t,n]=Ha({}),[r,o]=Ha({}),[i,a]=Ha({}),[s,l]=Ha({}),[c,u]=Ha({}),[,d]=Ha({}),h=e=>{let{type:t,value:r}=e;const i=d.get(r.id);d.set(r.id,{});const s=()=>{o.clear(r.id),u.set(r.id,{}),u.dispatch(!0)},c=()=>{r.removeListener("closed",c),r.removeListener("changed",s),n.clear(r.id),o.clear(r.id),a.clear(r.id),l.clear(r.id),u.clear(r.id),d.clear(r.id)};return"SET"===t&&(i||(r.on("changed",s),r.once("closed",c))),c},[p,f]=Ha({},h);return{subscribe:e=>{const t=h({type:"SET",value:e});return()=>{t(),f.clear(e.id)}},destroy:()=>{f.destroy()},useModelStore:p,modelStore:f,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(r.id),u=function(e){const[t,n]=Ha({}),[r,o]=Ha({}),[i,a]=Ha({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(r.id),d=Rt.createRoot(l);d.render(t.createElement(Ua,{ref:s,initialContext:o,renderCallback:n,modelStore:c,selectionStore:u}));const h={},p=[],f=[];return[{toggleFocusOfCells(e){Object.keys(h).forEach((t=>{var n;null===(n=h[t].current)||void 0===n||n.toggleFocus(t===e)}))},cells:h,addCell(e,t){h[e]=t},removeCell(e){delete h[e]},add:(e,t)=>(async()=>{await a,f.push(e),p.push(t),s.current.setComps(f)})(),remove(e){i||(async t=>{await a;const n=f.indexOf(e);var r;-1!==n&&(null===(r=p[n])||void 0===r||r.call(p),f.splice(n,1),p.splice(n,1));null==s||null===(t=s.current)||void 0===t||t.setComps(f)})()},setMuiThemeName(e){(async()=>{await a,s.current.setMuiThemeName(e)})()},context(e){(async()=>{await a,e&&Wa(e),s.current.setContext(e)})()},destroy(){i=!0,p.forEach((e=>{e&&e()})),c.destroy(),d.unmount(),document.body.removeChild(l)}},c,u,s,a]}function Va(){const{useModelStore:e}=s($a).modelStore;return e()}function Ka(e,t){const o=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[i]=Va(),[a]=function(){const{useRpcRequestSessionModelStore:e}=s($a).modelStore;return e()}(),[l,c]=n();for(var u=arguments.length,d=new Array(u>2?u-2:0),h=2;h<u;h++)d[h-2]=arguments[h];return r((()=>{if(!t)return;(async()=>{let n=a.get(o);n||(n=t.createSessionObject(e),a.set(o,n));const r=await n;i.set(o,r),c(r)})()}),[t,...d]),[l]}const Ja={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Za(e){return Ka(Ja,e)}const Xa=e=>new Promise((t=>{setTimeout(t,e)})),Qa=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Q(Q({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Q({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Q(Q({},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 Ya(e,t){const n=e?"".concat(e.id):null,[o]=function(){const{useRpcResultStore:e}=s($a).modelStore;return e()}(),[i,a]=l(Qa,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=s($a).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=s($a).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const h=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 Xa(0);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),h(!0))}},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,h()}};return r((()=>{e&&h()}),[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 es(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ya(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 ts(e){return Ya(e,"getAppLayout")}function ns(){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]}function rs(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function os(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=Q({fontSize:rs(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},r);return t.createElement("i",{style:a},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},i.map(((e,n)=>{let{type:r,attrs:o}=e;return t.createElement(r,Z({key:n},o))}))))}var is=e=>os((e=>Q(Q({},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 as=e=>os((e=>Q(Q({},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 ss=e=>Q(Q({},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 ls=e=>os(ss(e));var cs=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}}(),us=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},ds=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=us(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},us(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d),cs(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var h=a[0]-1;if(t(h))break;a[0]=h}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}();const hs=["S","XS"],ps=e=>e.reduce(((e,t)=>e.concat(t)));function fs(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!hs.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return ps(t)}async function ms(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const gs="RowColumn",bs={row:"".concat(gs,"-row"),rowBorderBottom:"".concat(gs,"-rowBorderBottom"),column:"".concat(gs,"-column"),fieldRoot:"".concat(gs,"-fieldRoot"),cell:"".concat(gs,"-cell"),labelText:"".concat(gs,"-labelText"),labelDense:"".concat(gs,"-labelDense"),highlighted:"".concat(gs,"-highlighted"),checkboxLabel:"".concat(gs,"-checkboxLabel"),icon:"".concat(gs,"-icon"),S:"".concat(gs,"-S"),XS:"".concat(gs,"-XS"),A:"".concat(gs,"-A"),X:"".concat(gs,"-X"),frequencyCount:"".concat(gs,"-frequencyCount"),barContainer:"".concat(gs,"-barContainer"),bar:"".concat(gs,"-bar"),barSelected:"".concat(gs,"-barSelected"),barWithCheckbox:"".concat(gs,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(gs,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(gs,"-excludedTextWithCheckbox")},ys=".".concat(bs.fieldRoot),vs=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function Ss(e){var t;let{selectionState:n,selections:o,checkboxes:i=!1,doc:a=document,loaderRef:s}=e;const l=h({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r((()=>{var e;if(null===(e=s.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=s.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}}),[null===(t=s.current)||void 0===t||null===(t=t._listRef)||void 0===t?void 0:t._outerRef]);const u=async()=>{var e;return(null===(e=n.selectDisabled)||void 0===e||!e.call(n))&&(n.setSelectableValuesUpdating(),ms({selections:o,elemNumbers:l.current.elemNumbers,isSingleSelect:n.isSingleSelect,toggle:l.current.toggle}))},d=(e,t)=>{const r=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return ps(t)}(n.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],r)},p=e=>{const{startElemNumber:t}=l.current;if(t===e)return;const r=d(l.current.startElemNumber,e);n.updateItems(r,!0,l.current.elemNumbers)},f=c((e=>{if(n.selectDisabled())return;const t=+e.target.getAttribute("data-n"),r=!n.isSingleSelect&&vs(e.nativeEvent);l.current.elemNumbers=[t],l.current.toggle=r,r||n.clearItemStates(!0),n.updateItem(t),l.current.active=!1,u()}),[]),m=c((e=>{if(0!==e.button||n.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),r=!n.isSingleSelect&&vs(e);l.current.isRange=!1,l.current.startElemNumber=t,l.current.elemNumbers=[t],l.current.toggle=r,l.current.active=!0,r||n.clearItemStates(!0),n.updateItem(t),n.isSingleSelect&&(l.current.active=!1,u()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),g=c((e=>{if(0===e.button&&l.current.active){if(l.current.active=!1,l.current.isRange){const t=+e.currentTarget.getAttribute("data-n");p(t)}u()}}),[]),b=c((e=>{0===e.button&&l.current.active&&(l.current.active=!1,u())}),[]),y=c((e=>{if(!l.current.active)return;l.current.isRange||(l.current.isRange=!0,n.isSelected(l.current.startElemNumber)||(n.updateItem(l.current.startElemNumber,!0),l.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");p(t)}),[]),v=c((e=>{var t,r;if(l.current.active||l.current.isRange||n.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void u();const o=Number(null===(t=e.touches[0].target)||void 0===t||null===(t=t.closest(ys))||void 0===t?void 0:t.getAttribute("data-n")),i=Number(null===(r=e.touches[1].target)||void 0===r||null===(r=r.closest(ys))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void u();l.current.active=!0;d(o,i).length<7&&(l.current.touchRangeSmall=!0),l.current.elemNumbers=[],l.current.touchElemNumbers=[o,i]}),[]),S=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,p(t),l.current.touchElemNumbers=[],l.current.active=!1,l.current.toggle=!0,u()}),[]);r((()=>(a.addEventListener("mouseup",b),()=>{a.removeEventListener("mouseup",b)})),[b]),r((()=>{const e=()=>{n.clearItemStates(!1)},t=()=>{n.clearItemStates(!0),n.triggerStateChanged()};return o.on("clearItemStates",e),o.on("deactivated",e),o.on("cleared",t),()=>{o.removeListener("clearItemStates",e),o.removeListener("deactivated",e),o.removeListener("cleared",t)}}),[o]);const w={};return i?Object.assign(w,{onChange:f}):Object.assign(w,{onMouseUp:g,onMouseDown:m,onMouseEnter:y,onTouchStart:v,onTouchEnd:S}),{interactionEvents:w,select:async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null!==(e=n.selectDisabled)&&void 0!==e&&e.call(n))return!1;const a=!n.isSingleSelect&&vs(null==i?void 0:i.nativeEvent);a||n.clearItemStates(!0);const s=[];return n.updateItems(t,r,s),n.setSelectableValuesUpdating(),ms({selections:o,elemNumbers:r?s:t,isSingleSelect:n.isSingleSelect,toggle:a})}}}const ws=e=>Q(Q({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var Cs=e=>os(ws(e));const xs=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,Es=e=>{let{cell:t,checkboxes:n}=e;return((e=>e?"A"===e.qState:null)(t)||xs(t))&&n};const ks=e=>{let{column:t,histogram:n,cell:r,showGray:o}=e;if(!r)return[];const i=[t?bs.column:bs.row];n||i.push(bs.rowBorderBottom);const a=function(e){let t,{cell:n,showGray:r}=e;switch(n.qState){case"XS":t=r?bs.XS:bs.S;break;case"S":case"L":t=bs.S;break;case"A":t=!!r&&bs.A;break;case"X":case"XL":t=!!r&&bs.X;break;default:t=!1}return t}({cell:r,showGray:o});return a&&i.push(a),i},Ls=9,Rs=4,qs=7,Is=12+2*(qs+1),Ts=80,Os=10,_s=150,Ps=56,Ds=20,As="-",Ms=32,Ns=29,js=20,zs=4,Fs=e=>e.filter((e=>!!e)).join(" ").trim(),$s=e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")},Bs=e=>e||As,Ws=["backgroundColor"],Hs=e=>{let{sizes:t,frequencyMode:n,isGridMode:r,freqHitsValue:o}=e;if("P"===n)return"".concat(t.freqMinWidth,"px");return r&&!o?"max-content":"25%"},Us=e=>{let{sizes:t,frequencyMode:n,isGridMode:r}=e;return r?"max-content":"P"===n?t.freqMinWidth:t.freqMaxWidth},Gs=e=>{let{theme:t,checkboxes:n,styles:r,selectionState:o}=e;if(n)return"selected"===o?{["& .".concat(bs.labelText)]:{color:r.selections.selected}}:{};const i=r.selections,a=i[o],s=i["".concat(o,"Contrast")];return{background:a,color:s,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0},["& .".concat(bs.labelText)]:{color:s},["& .".concat(bs.icon)]:{color:s}}},Vs={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Ks=ga("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})((e=>{let{theme:t,checkboxes:n,isGridMode:r,isGridCol:o,dense:i,direction:a,sizes:s,frequencyMode:l,freqHitsValue:c,styles:u}=e;const d=u.content,{backgroundColor:h}=d,p=Y(d,Ws),f=Gs({theme:t,styles:u,checkboxes:n,selectionState:"selected"}),m=Gs({theme:t,styles:u,checkboxes:n,selectionState:"excluded"}),g={height:"100%",transition:"width 0.2s",border:"".concat(1,"px solid"),borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},b={opacity:"30%"};return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(bs.row)]:Q({flexWrap:"nowrap"},u.content),["& .".concat(bs.rowBorderBottom)]:{borderBottom:o?"none":"1px solid ".concat(t.palette.divider),borderLeft:o?"1px solid ".concat(t.palette.divider):"none"},["& .".concat(bs.column)]:Q({flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider)},u.content),["& .".concat(bs.cell)]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:n?"52px":"26px",flexBasis:n?"auto":"max-content",paddingLeft:"".concat(Ls,"px"),paddingRight:0},["& .".concat(bs.labelText)]:Q(Q({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Vs),p),["& .".concat(bs.labelDense)]:{lineHeight:"18px"},["& .".concat(bs.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(bs.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Q(Q({},Vs),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(bs.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:p.color},["& .".concat(bs.S)]:Q(Q({},f),{},{border:r?"none":void 0}),["& .".concat(bs.XS)]:Q(Q({},Gs({theme:t,styles:u,checkboxes:n,selectionState:"selectedExcluded"})),{},{border:r?"none":void 0}),["& .".concat(bs.A)]:Q(Q({},Gs({theme:t,styles:u,checkboxes:n,selectionState:"alternative"})),{},{border:r?"none":void 0}),["& .".concat(bs.X)]:Q(Q({},m),{},{border:r?"none":void 0}),["& .".concat(bs.X,", & .").concat(bs.XS)]:{border:r?"none":void 0,["& .".concat(bs.barSelected," .bar-filled")]:Q({},g)},["& .".concat(bs.frequencyCount)]:Q(Q({zIndex:3,justifyContent:"flex-end"},Vs),{},{flex:"0 0 ".concat(Hs({sizes:s,frequencyMode:l,isGridMode:r,freqHitsValue:c})),minWidth:!r&&"P"!==l&&c?s.freqMinWidth:"max-content",maxWidth:Us({sizes:s,frequencyMode:l,isGridMode:r}),textAlign:"rtl"===a?"left":"right",paddingLeft:"rtl"!==a?"8px":0}),["&.".concat(bs.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(bs.bar)]:{height:i?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":Q({},g)},["& .".concat(bs.barSelected)]:{"& .bar-filled":Q({},b)},["& .".concat(bs.barWithCheckbox)]:{left:"rtl"===a?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(bs.barSelectedWithCheckbox)]:{"& .bar-filled":Q(Q({},b),{},{backgroundColor:u.selections.selected||"#BFE5D0",borderColor:u.selections.selected})},["& .".concat(bs.excludedTextWithCheckbox)]:{color:u.content.color,fontStyle:"italic"}}}));var Js=t.memo(Ks);const Zs="ListBoxCheckbox",Xs={cbIcon:"".concat(Zs,"-cbIcon"),cbIconChecked:"".concat(Zs,"-cbIconChecked"),cbIconExcluded:"".concat(Zs,"-cbIconExcluded"),cbIconAlternative:"".concat(Zs,"-cbIconAlternative"),checkbox:"".concat(Zs,"-checkbox"),dense:"".concat(Zs,"-dense")},Qs=ga(S,{shouldForwardProp:e=>"styles"!==e})((e=>{let{styles:t}=e;return{["& .".concat(Xs.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(Xs.cbIconChecked)]:{borderRadius:3,backgroundColor:t.selections.selected,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(Xs.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.excluded},["& .".concat(Xs.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.alternative},["&.".concat(Xs.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(Xs.dense)]:{padding:"4px 8px"}}})),Ys=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.createElement("span",{className:e.cbIcon},r&&t.createElement("span",{className:n&&r?e.cbIconExcluded:""}))};function el(e){let{onChange:n,checked:r,label:o,dense:i,excluded:a,styles:s,showGray:l=!0,dataN:c}=e;return t.createElement(Qs,{edge:"start",onChange:n,checked:r,disableRipple:!0,className:[Xs.checkbox,i&&Xs.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":o,"data-n":c},name:o,icon:Ys(Xs,l,a),checkedIcon:t.createElement("span",{className:Xs.cbIconChecked}),styles:s})}const tl={radioButton:"".concat("ListBoxRadioButton","-radioButton")},nl=ga(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})((e=>{let{checked:t,styles:n,dense:r}=e;return{["&.".concat(tl.radioButton)]:{right:"5px",color:t?n.selections.selected:n.content.color,padding:r?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}}));function rl(e){let{onChange:n,checked:r,label:o,dense:i,dataN:a,styles:s}=e;return t.createElement(nl,{checked:r,onChange:n,value:o,name:o,className:tl.radioButton,inputProps:{"data-n":a},disableRipple:!0,size:i?"small":"medium",dense:i,styles:s})}function ol(e){let{label:n,dense:r,showGray:o=!0,checkboxes:i,cell:a,valueTextAlign:s}=e;return t.createElement(C,{component:"span",variant:"body2",className:Fs([bs.labelText,r&&bs.labelDense,o&&Es({cell:a,checkboxes:i})&&bs.excludedTextWithCheckbox]),align:s,dir:"auto"},t.createElement("span",null,n))}function il(e){let{label:n,color:r,dense:o,showGray:i,checkboxes:a,cell:s,valueTextAlign:l}=e;return"string"==typeof n?t.createElement(ol,{label:n,color:r,dense:o,showGray:i,checkboxes:a,cell:s,valueTextAlign:l}):n}function al(e){let{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}=e;const f=t.createElement(el,{onChange:n,label:r,checked:i,dense:a,excluded:xs(s),isGridCol:l,showGray:c,dataN:o,styles:p}),m=t.createElement(rl,{onChange:n,label:r,checked:i,dense:a,dataN:o,styles:p});return t.createElement(x,{control:u?m:f,className:bs.checkboxLabel,label:t.createElement(il,{label:r,dense:a,showGray:c,checkboxes:d,cell:s,valueTextAlign:h}),key:o})}function sl(e){let{labels:n,dense:r,showGray:o,checkboxes:i}=e;const a=n.map(((e,n)=>{let[r,o]=e;return t.createElement("span",{id:n,className:o?bs.highlighted:""},r)}));return t.createElement(ol,{label:a,dense:r,showGray:o,checkboxes:i})}function ll(e){let{onChange:n,labels:r,checkboxes:o,dense:i,showGray:a,qElemNumber:s,isSelected:l,cell:c,isGridCol:u,isSingleSelect:d,valueTextAlign:h,styles:p}=e;const f=t.createElement(sl,{labels:r,dense:i,showGray:a,checkboxes:o});return o?t.createElement(al,{onChange:n,label:f,qElemNumber:s,isSelected:l,dense:i,cell:c,isGridCol:u,showGray:a,isSingleSelect:d,checkboxes:o,valueTextAlign:h,styles:p}):f}var cl=t.memo((function(e){let{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}=e;return d?t.createElement(al,{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}):t.createElement(ol,{label:r,dense:a,showGray:!0,checkboxes:d,cell:s,valueTextAlign:h})}));function ul(e){let{qFrequency:n,histogram:r,checkboxes:o,isSelected:i,frequencyMax:a}=e;if(!(n&&r&&Bs(n)!==As))return;const s=$s({qFrequency:n,frequencyMax:a});return t.createElement(E,{className:Fs([bs.bar,o&&bs.barWithCheckbox,i&&(o?bs.barSelectedWithCheckbox:bs.barSelected)])},t.createElement(E,{className:"bar-filled",width:s}))}function dl(e){let{cell:n,checkboxes:r,dense:o,showGray:i}=e;const a=Bs(null==n?void 0:n.qFrequency);return t.createElement(k,{item:!0,style:{display:"flex",alignItems:"center"},className:bs.frequencyCount,"aria-label":a,title:a},t.createElement(C,{noWrap:!0,color:"inherit",variant:"body2",className:Fs([o&&bs.labelDense,bs.labelText,i&&Es({cell:n,checkboxes:r})&&bs.excludedTextWithCheckbox])},a))}function hl(e){let{dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:o}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:o?"100%":"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const pl=ga(k,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:i,fillHeight:a}=e;const s="padding".concat("rtl"===i?"Left":"Right");return{["&.".concat(bs.fieldRoot)]:Q(Q({},hl({dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:a})),{},{[s]:o?"8px":void 0})}}));const fl=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===fl.ARROW_UP||e===fl.ARROW_DOWN||e===fl.ARROW_LEFT||e===fl.ARROW_RIGHT});function ml(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function gl(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 bl(e){let{containerRef:t,enabled:r}=e;const[o,i]=n(!1),a={enabled:r,active:o,innerTabStops:!r||o,blur(e){var n;if(!r)return;i(!1);const o=gl(t.current)||(null===(n=t.current)||void 0===n?void 0:n.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),ml(t.current),e&&o&&(o.setAttribute("tabIndex",0),t.current.setAttribute("tabIndex",-1),o.focus())},focus(){if(!r)return;i(!0);const e=t.current,n=null==e?void 0:e.querySelector(".search input"),o=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),s=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==e?void 0:e.querySelector("#listbox-unlock-button"),c=(null==e?void 0:e.querySelector(".listbox-cyclic-button"))||n||o||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return a}const yl=e=>+e.getAttribute("data-n"),vl=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Sl=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(),ml(e),o},wl=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},Cl=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=gl(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{ml(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}},xl=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:s}=e;const l=e=>{let t;return"row"===i?(t=s%o,e<t?r:r-1):(t=s%r,e<o-1?r:t)};let c=t,u=n;if(a===fl.ARROW_DOWN)if(t>=l(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=l(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=s%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};const El={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 kl(e){var o,a;let{index:s,rowIndex:l,columnIndex:u,style:d,data:h}=e;const{onChange:p,onClick:f,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onTouchStart:y,onTouchEnd:v,pages:S,isLocked:w,column:C=!1,checkboxes:x=!1,textAlign:E,direction:L,layoutOptions:R={},freqIsAllowed:q,isSingleSelect:I,actions:T,frequencyMax:O="",histogram:_=!1,keyboard:P,showGray:D=!0,showTick:A=!0,columnCount:M=1,rowCount:N=1,dataOffset:j,deducedFrequencyMode:z,focusListItems:F,listCount:$,sizes:B,translator:W,showSearch:H,isModal:U,contentFontStyle:G,styles:V,fillHeight:K}=h,{dense:J=!1,dataLayout:Z="singleColumn",layoutOrder:X}=R,{itemPadding:Y}=B;let ee,te;const ne={max:null,currentIndex:null};if("number"==typeof l&&"number"==typeof u){"row"===X?(ee=l*M+u,ne.max=N,ne.currentIndex=l):(ee=u*N+l,ne.max=M,ne.currentIndex=u);const e=0;te=Q(Q({},d),{},{height:K?"100%":d.height,left:e+(0===u?d.left:Number(d.left)+u*e),top:0===l?d.top:Number(d.top)+l*e})}else ee=s,ne.max=$,ne.currentIndex=s,te=Q({},d);ee+=j;const[re,oe]=n(null);r((()=>{null!==re&&(0===ne.currentIndex&&F.first&&(re.focus(),F.setFirst(!1)),ne.currentIndex===ne.max-1&&F.last&&(re.focus(),F.setLast(!1)))}),[re,F.first,F.last]);const ie=c(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:s,keyboard:l,isModal:c,rowCount:u,columnCount:d,rowIndex:h,columnIndex:p,layoutOrder:f}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===fl.ARROW_LEFT||e===fl.ARROW_RIGHT||"number"!=typeof h||"number"!=typeof p){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=xl({rowIndex:h,columnIndex:p,rowCount:u,columnCount:d,layoutOrder:f,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const b=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:h}=e,{keyCode:p,shiftKey:f=!1,ctrlKey:y=!1,metaKey:v=!1}=h;switch(p){case fl.TAB:{const t=d.closest(".listbox-container"),n=void 0!==c?c():void 0;if(d.classList.add("last-focused"),null==l||!l.enabled){if(!n)return;return l.focusSelection(),e.preventDefault(),void e.stopPropagation()}if(f){vl(t)||wl(t)||(n?l.focusSelection():Cl(e,l));break}l.focusSelection()||wl(t)||vl(t)||(d.blur(),Cl(e,l));break}case fl.SHIFT:b(!0);break;case fl.SPACE:t([yl(d)],!1,e);break;case fl.ARROW_DOWN:case fl.ARROW_RIGHT:u=m(p,d,!0),f&&u&&(g&&(t([yl(d)],!0),b(!1)),t([yl(u)],!0));break;case fl.ARROW_UP:case fl.ARROW_LEFT:u=m(p,d,!1),f&&u&&(g&&(t([yl(d)],!0),b(!1)),t([yl(u)],!0));break;case fl.ENTER:if(o(),void 0===c)return;break;case fl.ESCAPE:if(void 0===c)return void i();if(!c())return;i();break;case fl.HOME:if(s.setFirst(!0),y){null==a||a("overflowStart");break}null==a||a("start");break;case fl.END:if(s.setLast(!0),y){null==a||a("overflowEnd");break}null==a||a("end");break;case fl.A:if(y||v){n();break}return;case fl.F:if(y||v){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(Q(Q({},T),{},{focusListItems:F,keyboard:P,isModal:U,rowCount:N,columnCount:M,rowIndex:l,columnIndex:u,layoutOrder:X})),[T,null==P?void 0:P.innerTabStops,N,M,l,u,X]),ae=i((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:S,cellIndex:ee})),[S,ee]),se="S"===(null==ae?void 0:ae.qState)||"XS"===(null==ae?void 0:ae.qState)||"L"===(null==ae?void 0:ae.qState)||"XL"===(null==ae?void 0:ae.qState),le=i((()=>ks({column:C,histogram:_,cell:ae,showGray:D})),[null==ae?void 0:ae.qState,_,J]),ce=c((e=>{e.preventDefault()}),[x]),ue=i((()=>ae&&function(e){let{direction:t,cell:n,textAlign:r}=e;const o=!["NaN",void 0].includes(null==n?void 0:n.qNum);let i;return i=!r||r.auto?o?"rtl"===t?"left":"right":{rtl:"right",ltr:"left"}[t]:(null==r?void 0:r.align)||"left",["left","center","right"].includes(i)?i:"left"}({direction:L,cell:ae,textAlign:E})),[L,ae,E]);if(!ae)return null;const de="grid"===Z&&"column"===X,he=null!==(o=null==ae?void 0:ae.qText)&&void 0!==o?o:"";let pe;if(null!==(a=ae.qHighlightRanges)&&void 0!==a&&null!==(a=a.qRanges)&&void 0!==a&&a.length){const e=ae.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];pe=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(he,e)}const fe={alignItems:"center",display:"flex",fontSize:"8px"},me="rtl"===L,ge={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:me?8:x?0:void 0,paddingRight:x?0:me?8:0,justifyContent:ue,textAlign:ue},be=0===s,ye=se&&w,ve=!x&&se&&!w,Se=!x&&A,we=x||!A,Ce=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:s}=e;const l=El[r],c=t.get(l),u=[];if(o){const e=s?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),h=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,h),u.join(". ").trim()}({translator:W,label:he,qState:ae.qState,currentIndex:ne.currentIndex,maxIndex:ne.max,showSearch:H}),xe=!me&&"right"===ue||me&&"left"===ue;return t.createElement(Js,{className:bs.barContainer,checkboxes:x,style:te,styles:V,isGridCol:de,isGridMode:"grid"===Z,dense:J,direction:L,sizes:B,frequencyMode:z,freqHitsValue:xe,contentFontStyle:G,"data-testid":"listbox.item"},t.createElement(pl,{role:"row","aria-label":Ce,"aria-selected":se,"aria-setsize":ne.max,"aria-rowindex":ne.currentIndex,ref:oe,container:!0,dataLayout:Z,cellPaddingRight:we,layoutOrder:X,itemPadding:Y,gap:0,className:Fs(["value",...le]),classes:{root:bs.fieldRoot},onClick:f,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onKeyDown:ie,onTouchStart:y,onTouchEnd:v,onContextMenu:ce,tabIndex:be&&P.innerTabStops?0:-1,"data-n":null==ae?void 0:ae.qElemNumber,direction:L,fillHeight:K},(null==ae?void 0:ae.qFrequency)&&t.createElement(ul,{qFrequency:null==ae?void 0:ae.qFrequency,histogram:_,checkboxes:x,isSelected:se,frequencyMax:O}),t.createElement(k,{item:!0,style:ge,className:Fs([bs.cell,bs.selectedCell]),title:"".concat(he)},pe?t.createElement(ll,{onChange:p,labels:pe,checkboxes:x,dense:J,showGray:D,qElemNumber:ae.qElemNumber,isSelected:se,cell:ae,isGridCol:de,isSingleSelect:I,valueTextAlign:ue,styles:V}):t.createElement(cl,{onChange:p,label:he,qElemNumber:ae.qElemNumber,isSelected:se,dense:J,cell:ae,isGridCol:de,showGray:D,isSingleSelect:I,checkboxes:x,valueTextAlign:ue,styles:V})),q&&t.createElement(dl,{cell:ae,checkboxes:x,dense:J,showGray:D}),Se&&t.createElement(k,{item:!0,className:bs.icon},ye&&t.createElement(as,{style:fe,size:"small"}),ve&&t.createElement(Cs,{style:fe,size:"small"}))))}var Ll=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Rl(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Ll(r)&&Ll(o)))return!1;var r,o;return!0}function ql(e,t){var n;void 0===t&&(t=Rl);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Il="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Tl(e){cancelAnimationFrame(e.id)}function Ol(e,t){var n=Il();var r={id:requestAnimationFrame((function o(){Il()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var _l=-1;function Pl(e){if(void 0===e&&(e=!1),-1===_l||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),_l=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return _l}var Dl=null;function Al(e){if(void 0===e&&(e=!1),null===Dl||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?Dl="positive-descending":(t.scrollLeft=1,Dl=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Dl}return Dl}var Ml=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Nl(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,h=e.getRowOffset,f=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,_a(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:_a(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=ql((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=ql((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,d=r._getItemStyleCache(b&&s,b&&l,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;d[p]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:h(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=ql((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Al()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Tl(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ol(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Oa(t,e),t.getDerivedStateFromProps=function(e,t){return jl(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,h=i.rowCount,p=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,b=Pl();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,h-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},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(Al()){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&&Tl(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,h=e.itemKey,f=void 0===h?Ml:h,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,C=this._getHorizontalRangeToRender(),x=C[0],E=C[1],k=this._getVerticalRangeToRender(),L=k[0],R=k[1],q=[];if(r>0&&b)for(var I=L;I<=R;I++)for(var T=x;T<=E;T++)q.push(p(t,{columnIndex:T,data:d,isScrolling:v?w:void 0,key:f({columnIndex:T,data:d,rowIndex:I}),rowIndex:I,style:this._getItemStyle(I,T)}));var O=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Ia({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:q,ref:l,style:{height:O,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],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],h=u[1],p=u[2],f=u[3];this._callOnItemsRendered(a,s,d,h,l,c,p,f)}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,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,h=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),f=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,h),g=u&&"forward"!==c?1:Math.max(1,h);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,f+g)),p,f]},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,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),h=m(this.props,d,c,this._instanceProps),p=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var jl=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},zl=function(e,t){return e};function Fl(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,_a(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:_a(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=ql((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=ql((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),h=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,f="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:p?0:d,height:p?"100%":h,width:p?h:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=ql((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(Al()){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&&Tl(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ol(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Oa(t,e),t.getDerivedStateFromProps=function(e,t){return $l(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Pl():0:l.scrollHeight>l.clientHeight?Pl():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Al()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Tl(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,h=void 0===d?zl:d,f=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"===f,C=w?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),E=x[0],k=x[1],L=[];if(c>0)for(var R=E;R<=k;R++)L.push(p(t,{data:u,key:h(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var q=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:C,ref:this._outerRefSetter,style:Ia({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(s||l||"div",{children:L,ref:a,style:{height:w?"100%":q,pointerEvents:S?"none":void 0,width:w?q:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),h=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+h)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var $l=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Bl=Nl({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return h<Math.ceil(l/2)?0:h>c+Math.floor(l/2)?c:h;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return h<Math.ceil(s/2)?0:h>c+Math.floor(s/2)?c:h;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Wl=Fl({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,h="horizontal"===a||"horizontal"===u?d:s,p=Math.max(0,l*c-h),f=Math.min(p,t*c),m=Math.max(0,t*c-h+c+i);switch("smart"===n&&(n=r>=m-h&&r<=f+h?"auto":"center"),n){case"start":return f;case"end":return m;case"center":var g=Math.round(m+(f-m)/2);return g<Math.ceil(h/2)?0:g>p+Math.floor(h/2)?p:g;default:return r>=m&&r<=f?r:r<m?m:f}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Hl="#BBB",Ul="#f1f1f1",Gl={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const Vl=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex,Kl=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex,Jl=(e,t,n,r)=>e===t*n+r+n;function Zl(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:s,dataOffset:l}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=Vl(t,c),d=c?r.column:r.row,h=(c?o:i)>=d,p=Jl(s,u,c?i:o,l),f=!!l&&Kl(t,c),m=h&&!p&&u>=d-1||f||a.state.show;a.set(m)}const{StyledFixedSizeList:Xl,StyledFixedSizeGrid:Ql}=function(){const e=e=>({scrollbarColor:"".concat(Hl," ").concat(Ul),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ul},"&::-webkit-scrollbar-thumb":{backgroundColor:Hl,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(Wl,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Gl.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:v(Bl,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Gl.styledScrollbars)]:e(n)}}))}}();const Yl=(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)},ec=e=>{const t=i((()=>"text"in e?e:{}),[e]);return i((()=>Yl(t.text,t.font||"12px Source Sans Pro")),[t.text,t.font])};function tc(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function nc(e){let{isGridMode:t,dense:n}=e;let r=n?js:t?Ms:Ns;return t&&(r+=zs),r}function rc(e){let{layout:t,width:n,height:r,listCount:o,count:i,freqIsAllowed:a,checkboxes:s,styles:l}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:h,dense:p,dataLayout:f}=c,{fontSize:m="12px",fontFamily:g="Source sans pro"}=(null==l?void 0:l.content)||{},b="".concat(m," ").concat(g),y=ec({text:tc(t),font:b}),v=ec({text:tc(5),font:b}),S=ec({text:tc(8),font:b}),w=a?v:0,C=s?Ds:0;let x=Ps+w+C;!s&&x>=Ts&&(x+=Ds);let E,k,L,R,q=y+18+w+C;!s&&q>=Ts&&(q+=Ds),q=Math.min(_s,Math.max(q,x));const I=nc({isGridMode:"grid"===f,dense:p}),T=null!=r?r:8*I;if(u){let e=n;"row"===u?(E={overflowX:"hidden"},e+=2*zs,({rowCount:R,columnWidth:L,columnCount:k}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,s=r-Os;let l;const c=Math.min(n,Math.max(1,Math.round(s/Math.max(i,o))));l=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c),l=Math.max(l,1);const u=s/l;return{rowCount:Math.ceil(n/l),columnWidth:u,columnCount:l}}({maxVisibleColumns:h,listCount:o,containerWidth:e,columnAutoWidth:q,itemMinWidth:x}))):(E={overflowY:"hidden"},({rowCount:R,columnWidth:L,columnCount:k}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:s,itemMinWidth:l}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u),t=Math.max(t,1);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,s/d,l),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:I,listCount:o,listHeight:T,columnAutoWidth:q,containerWidth:e,itemMinWidth:x})))}k=("singleColumn"===f?1:k)||1,R=("singleColumn"===f?i:R)||o;const O=c.dense?838e3:577e3;R=Math.min(R,O);const _=Math.floor(3355e4/L);k=Math.min(k,_)||1;const P=R*k,D=Math.min(o,P);return{columnCount:k,columnWidth:L,rowCount:R,overflowStyling:E,itemHeight:I,listHeight:T,listWidth:n,scrollBarWidth:Os,count:i,listCount:D,maxCount:{row:O,column:_},itemPadding:zs,textWidth:y,freqMinWidth:v,freqMaxWidth:S}}const oc=e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r};const[ic]=Ha({});function ac(e){const t="".concat(e.id),[n]=ic();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const sc=ga(C,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return Q({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px"),whiteSpace:"normal"},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function lc(e){let{width:n,text:r,dense:o,tooltip:i}=e;const{translator:a}=s($a);return t.createElement(L,{title:i?a.get(r):""},t.createElement(sc,{width:n,dense:o,component:"div",variant:"body1",py:"12px"},a.get(r)))}var cc=function(t,n){function r(e,r){return Kn.jsx(qa,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return r.muiName=qa.muiName,e.memo(e.forwardRef(r))}(Kn.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const uc=ga(R)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),dc=ga("div")((()=>({paddingLeft:"6px",flexGrow:1}))),hc=ga("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),pc=ga(cc)((()=>({fontSize:"14px"})));function fc(e){let{text:n,dismiss:r,dense:o,parentWidth:i=0}=e;const a="function"==typeof r,s=o?370:282,l=Math.max(i/2-s/2,0),c=Math.min(s,i)-42,u=o&&i<s;return t.createElement(uc,{left:l,style:{maxWidth:s}},t.createElement(dc,null,t.createElement(lc,{text:n,dense:o,width:c,tooltip:u})),t.createElement(hc,{dense:o},a&&t.createElement(q,{"aria-label":"close",onClick:()=>r()},t.createElement(pc,null))))}const mc=(e,t)=>e.qListObject.qDimensionInfo.qCardinal-t;const gc=80;function bc(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>gc,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["N",void 0].includes(r);return!(!o||!a&&!i)}const yc=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e,vc=e=>{const t=yc(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},Sc=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[s,l]=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=vc(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),l(!1)})()}),[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:s}};const wc=["isLoadingData"],Cc=100,xc=I("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function Ec(e){var o,i;let{model:a,app:l,constraints:u,layout:d,selections:p,selectionState:f,direction:m,checkboxes:g,height:b,width:y,frequencyMode:v,update:S,fetchStart:w,postProcessPages:C,calculatePagesHeight:x=!1,keyboard:E={},showGray:k=!0,scrollState:L,keyScroll:R={state:{},reset:()=>{}},currentScrollIndex:q={set:()=>{}},renderedCallback:I,onCtrlF:T,showSearch:O,isModal:_,styles:P}=e;const{translator:D}=s($a),[A,M]=n(!1),N=!(!d||!d.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:j=g,histogram:z}=null!=d?d:{},F=h(null),$=h({queue:[],validPages:!1,dataOffset:0}),B=h({pages:[]}),{frequencyMax:W,awaitingFrequencyMax:H}=Sc(l,d),U=function(e){let{local:t,loaderRef:r,model:o,fetchStart:i,scrollTimeout:a,postProcessPages:s,listData:l}=e;const[c,u]=n(!1),[d,h]=n([]);let[p]=n(0);const f=(e,n)=>{const c=t.current.dataOffset;t.current.queue.push({start:e+c,stop:n+c});const d=!!r.current&&r.current._listRef&&r.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),u(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],r=o.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=s?s(n):n;t.current.validPages=!0,l.current.pages=r,h(r),u(!1),e()}));i&&i(r)}),d?a:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:d,isLoading:c}}({local:$,loaderRef:F,model:a,fetchStart:w,scrollTimeout:0,postProcessPages:C,listData:B}),{isLoadingData:G}=U,V=Y(U,wc),{getStoreValue:K,setStoreValue:J}=ac(a),X=c(V.loadMoreItems,[d]),[ee,te]=n({show:!1,dismissed:!1}),[ne,re]=n([]);null!=V&&V.pages&&f.update({setPages:re,pages:V.pages,isSingleSelect:N,layout:d});const oe=null==d?void 0:d.qListObject.qDimensionInfo.qCardinal;(null!=V&&V.pages.length&&!H||0===oe)&&(null==I||I());const ie=c((e=>{if(null==ne||!ne.length||!$.current.validPages)return!1;$.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=ne.filter((e=>t(e)))[0];return n&&t(n)}),[d,ne]),{interactionEvents:ae,select:se}=Ss({selectionState:f,selections:p,checkboxes:j,doc:document,loaderRef:F}),{layoutOptions:le={}}=d||{};let ce=!0;le.dataLayout&&(ce="singleColumn"===le.dataLayout||"row"===(null==le?void 0:le.layoutOrder));const ue="grid"===(null==le?void 0:le.dataLayout),de=e=>{const t=Q({},ce?{rowIndex:e}:{columnIndex:e}),n=ue?t:e;F.current._listRef.scrollToItem(n)},he=()=>{if($.current.queue=[],$.current.validPages=!1,F.current){F.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===R.state.scrollPosition;if(d&&d.qSelectionInfo.qInSelections||e)return void(e&&R.reset());$.current.dataOffset=0,de(0)}};S&&S.call(null,he),r((()=>{L&&!A&&F.current&&(F.current._listRef.scrollToItem(L.initScrollPos),M(!0))}),[F.current]),r((()=>{he()}),[d,$.current.dataOffset]);let pe=Cc;const fe="grid"!==le.dataLayout,me=null==d||null===(o=d.qListObject.qSize)||void 0===o?void 0:o.qcy,ge=function(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;return(null!=t&&t.length&&o?oc({pages:t,minimumBatchSize:n,count:r}):r)||0}({pages:ne,minimumBatchSize:pe,count:me,calculatePagesHeight:x});let be=bc({itemWidth:y,layout:d,frequencyMode:v});const ye=function(e){return e.some((e=>{let{qMatrix:t}=e;return t.some((e=>{var t;let[n]=e;return!(null===(t=n.qFrequency)||void 0===t||!t.match("%"))}))}))?"P":"-"}(ne),ve=rc({layout:d,width:y,height:b,listCount:ge,count:me,freqIsAllowed:be,checkboxes:j,styles:P});ve.columnWidth&&(be=bc({itemWidth:ve.columnWidth,layout:d,frequencyMode:v}));const{listCount:Se}=ve;J("listCount",Se);const we=K("inputText"),Ce=function(e){let{layout:t,searchInputText:n,listCount:r}=e;const{translator:o}=s($a),i=[];if(null!=n&&n.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(r),t=o.get(e,[r]);i.push(t)}const a=function(e){var t;let{layout:n,translatorDynamic:r}=e;const{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}return r.get(a,[i])}({layout:t,translatorDynamic:o});i.push(a);const l=i.filter((e=>!(null==e||!e.length))).join(". ");return l}({layout:d,searchInputText:we,listCount:Se}),xe=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,s=!1,l=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":l=0,t=0,s=!0;break;case"overflowEnd":l=mc(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,s=!0}return{scrollIndex:t,offset:l,triggerRerender:s}}({position:e,isRow:ce,sizes:ve,layout:d,offset:$.current.dataOffset});$.current.dataOffset=n,r&&f.triggerStateChanged(),de(t)};r((()=>{const e=R.state;e.up?de(q.state.start-e.up):e.down?de(q.state.stop+e.down):e.scrollPosition&&xe(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&R.reset()}),[R.state.up,R.state.down,R.state.scrollPosition]);const{textAlign:Ee}=(null==d?void 0:d.qListObject.qDimensionInfo)||{},[ke,Le]=n({first:!1,last:!1}),{List:Re,Grid:qe}=function(e){let{layout:n,width:r,checkboxes:o,local:i,isVertical:a,pages:s,selectionState:l,interactionEvents:c,deducedFrequencyMode:u,histogram:d,isSingleSelect:h,select:p,selectAll:f,onCtrlF:m,textAlign:g,selections:b,keyboard:y,showGray:v,scrollState:S,direction:w,sizes:C,listCount:x,overflowDisclaimer:E,setScrollPosition:k,focusListItems:L,setCurrentScrollIndex:R,constraints:q,frequencyMax:I,freqIsAllowed:T,translator:O,showSearch:_,isModal:P,styles:D}=e;const{layoutOptions:A={}}=n||{},{columnWidth:M,listHeight:N,itemHeight:j,rowCount:z,columnCount:F}=C||{},$=("grid"===A.dataLayout?M:r)>Ts,B={direction:"rtl"===w?"rtl":"ltr",useIsScrolling:!0,className:Gl.styledScrollbars},W=null==n?void 0:n.qListObject.qDimensionInfo.qLocked,H=N<=j,U=Q(Q({isLocked:W,column:!a,pages:s},W||l.selectDisabled()?{}:c),{},{checkboxes:o,layoutOptions:A,deducedFrequencyMode:u,freqIsAllowed:T,isSingleSelect:h,textAlign:g,sizes:C,actions:{select:p,confirm:()=>null==b?void 0:b.confirm.call(b),cancel:()=>null==b?void 0:b.cancel.call(b),setScrollPosition:k,selectAll:f,onCtrlF:m},frequencyMax:I,histogram:d,keyboard:y,showGray:v,showTick:$,dataOffset:i.current.dataOffset,focusListItems:L,direction:w,translator:O,showSearch:_,isModal:P,styles:D,fillHeight:H});return{List:e=>{let{onItemsRendered:o,ref:a}=e;return i.current.listRef=a,t.createElement(Xl,Z({},B,{dataTestid:"fixed-size-list",scrollDisabled:null==q?void 0:q.active,height:N,width:r,itemCount:x,itemData:Q(Q({},U),{},{listCount:x}),itemSize:j,onItemsRendered:e=>{var t;R({start:e.visibleStartIndex,stop:e.visibleStopIndex}),S&&S.setScrollPos(e.visibleStopIndex),Zl({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:F,rowCount:z,overflowDisclaimer:E,qCardinal:null==n||null===(t=n.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qCardinal,dataOffset:i.current.dataOffset}),o(Q({},e))},ref:a}),kl)},Grid:e=>{let{onItemsRendered:o,ref:a}=e;const{overflowStyling:s,scrollBarWidth:l}=C,{layoutOrder:c}=A||{},u=Math.min(N,z*j+l);return i.current.listRef=a,t.createElement(Ql,Z({},B,{dataTestid:"fixed-size-grid",scrollDisabled:null==q?void 0:q.active,height:u,width:r,columnCount:F,columnWidth:M,rowCount:z,rowHeight:j,style:Q({},s),itemData:Q(Q({},U),{},{column:void 0,columnCount:F,rowCount:z}),onItemsRendered:e=>{var t;const r="row"===c;R({start:r?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:r?e.visibleRowStopIndex:e.visibleColumnStopIndex});const a=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,h,p,f;return n&&n.setScrollPos(u),"column"===r?(d=l*o,h=a,p=c*o,f=s):(d=l,h=a*i,p=c,f=s*i),{visibleStartIndex:d+h,visibleStopIndex:p+f}}({renderProps:e,scrollState:S,layoutOrder:c,rowCount:z,columnCount:F});Zl({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:F,rowCount:z,overflowDisclaimer:E,qCardinal:null==n||null===(t=n.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qCardinal,dataOffset:i.current.dataOffset}),o(a)},ref:a}),kl)}}}({direction:m,layout:d,width:y,checkboxes:j,deducedFrequencyMode:ye,histogram:z,keyboard:E,showGray:k,interactionEvents:ae,select:se,selectAll:()=>{f.clearItemStates(!1),a.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:Ee,isVertical:fe,pages:ne,selectionState:f,isSingleSelect:N,selections:p,scrollState:L,local:$,sizes:ve,listCount:Se,overflowDisclaimer:{state:ee,set:e=>te((t=>Q(Q({},t),{},{show:e})))},setScrollPosition:xe,focusListItems:{first:ke.first,setFirst:e=>Le((t=>Q(Q({},t),{},{first:e}))),last:ke.last,setLast:e=>Le((t=>Q(Q({},t),{},{last:e})))},setCurrentScrollIndex:q.set,constraints:u,frequencyMax:W,freqIsAllowed:be,translator:D,showSearch:O,isModal:_,styles:P}),{columnWidth:Ie,listHeight:Te,itemHeight:Oe}=ve||{};return fe||(pe=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:y,columnWidth:Ie,listHeight:Te,itemHeight:Oe})),t.createElement(xc,null,t.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},Ce),!Se&&oe>0&&t.createElement(lc,{width:y,text:"Listbox.NoMatchesForYourTerms"}),t.createElement(ds,{isItemLoaded:ie,itemCount:Se||1,loadMoreItems:X.with({minimumBatchSize:pe}),threshold:0,minimumBatchSize:pe,ref:F,role:"grid"},fe?Re:qe),ee.show&&!ee.dismissed&&t.createElement(fc,{text:"Listbox.ItemsOverflow",dismiss:()=>te((e=>Q(Q({},e),{},{dismissed:!0}))),parentWidth:null==F||null===(i=F.current)||void 0===i||null===(i=i._listRef)||void 0===i||null===(i=i.props)||void 0===i?void 0:i.width,dense:null==le?void 0:le.dense}))}const kc=e=>Q(Q({},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"}}]}),Lc=e=>Q(Q({},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"}}]}),Rc=e=>Q(Q({},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"}}]}),qc=e=>Q(Q({},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 Ic=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1,selections:a}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const s="/qListObjectDef",l=()=>{a.isActive()||a.begin(s)};return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:kc,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAll(s)}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:Rc,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectPossible(s)}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:Lc,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAlternative(s)}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:qc,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectExcluded(s)}}].filter(Boolean)};const Tc=e=>Q(Q({},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 Oc(e){const t=ma(),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 _c={className:"njs-cell-action"},Pc=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,item:o,addAnchor:i=!1}=e;const a=ma(),{hidden:s,disabled:l,style:c,hasSvgIconShape:u}=Oc(o);if(s)return null;const d=Number.parseInt(a.spacing(.5),10),h=o.keyboardAction||o.action,p=h?e=>["Enter"].includes(e.key)&&h():null,f=h?e=>[" ","Spacebar"].includes(e.key)&&h():null,m="actions-toolbar-".concat(o.key);return t.createElement(q,{ref:i?null:n,title:o.label,onClick:o.action,onKeyDown:p,onKeyUp:f,disabled:l,style:c,className:[_c.className,m].join(" "),size:"large",disableRipple:!0,"aria-label":o.label,"aria-expanded":r,"aria-controls":"moreMenuList","data-testid":m},u&&os(o.getSvgIconShape()),i&&t.createElement("div",{ref:n,style:{bottom:-d,right:0,position:"absolute",width:"100%",height:0}}))})),Dc=e=>Q(Q({},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 Ac=e=>os(Dc(e));const Mc=e=>Q(Q({},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 Nc=e=>os(Mc(e));const jc="njs-action-toolbar-more",zc={icon:"".concat("More","-icon")},Fc=ga(T)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(zc.icon," *")]:{color:t.palette.text.primary}}}));function $c(e){let{item:n,autoFocus:r,onActionClick:o=(()=>{})}=e;const{hidden:i,disabled:a,hasSvgIconShape:s}=Oc(n);return i?null:t.createElement(_,{autoFocus:r,title:n.label,onClick:()=>{n.action(),o()},disabled:a,tabindex:"0"},s&&t.createElement(P,{className:zc.icon},os(n.getSvgIconShape())),t.createElement(C,{noWrap:!0},n.label))}const Bc=t.forwardRef(((e,n)=>{let{actions:r=[],show:o=!0,alignTo:i,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:l=(()=>{}),disablePortal:c=!0}=e;const u=r.length>0,d=r.findIndex((e=>!e.disabled));return u&&t.createElement(Fc,Z({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:c?null:void 0,container:c?i.current:void 0,disablePortal:c,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:jc},paper:{style:Q({pointerEvents:"auto",maxWidth:"250px"},s)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}),t.createElement(O,{id:"moreMenuList"},r.map(((e,n)=>t.createElement($c,{key:n,item:e,autoFocus:n===d,onActionClick:l})))))})),Wc=e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)},Hc=e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()};const Uc="ActionsToolbar",Gc={item:"".concat(Uc,"-item"),itemSpacing:"".concat(Uc,"-itemSpacing")},Vc=ga(T)((e=>{let{theme:t}=e;return{["& .".concat(Gc.itemSpacing)]:{padding:t.spacing(0,.25)}}})),Kc={className:"njs-action-toolbar-popover"},Jc=t.forwardRef(((e,n)=>{let{className:r,ariaExpanded:o=!1,actions:i=[],addAnchor:a=!1,isRtl:s=!1}=e;return i.length>0?t.createElement(k,{item:!0,container:!0,gap:0,flexDirection:s?"row-reverse":"row",wrap:"nowrap",className:r},i.map(((e,r)=>t.createElement(k,{item:!0,key:e.key,className:"".concat(Gc.itemSpacing," ").concat(Gc.item)},t.createElement(Pc,{ariaExpanded:o,key:e.key,item:e,ref:0===r?n:null,addAnchor:a}))))):null})),Zc={pointerEvents:"none"};function Xc(e){var o,a;let{show:l=!0,actions:c=[],maxItems:u=3,selections:d={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:p,more:f={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:m={show:!1,anchorEl:null},focusHandler:g=null,actionsRefMock:b=null,isRtl:y,autoConfirm:v=!1,layout:S}=e;const w=function(e){let{api:t,layout:n,onConfirm:r=(()=>{}),onCancel:o=(()=>{}),onKeyDeactivate:i=(()=>{})}=e;const{translator:a}=s($a);return[{key:"clear",type:"icon-button",label:a.get("Selection.Clear"),enabled:()=>t.canClear(n),action:()=>t.clear(),getSvgIconShape:Mc},{key:"cancel",type:"icon-button",label:a.get("Selection.Cancel"),enabled:()=>t.canCancel(n),action:()=>{o(),t.cancel()},keyboardAction:()=>{i(),o(),t.cancel()},getSvgIconShape:Dc},{key:"confirm",type:"icon-button",label:a.get("Selection.Confirm"),enabled:()=>t.canConfirm(n),action:()=>{r(),t.confirm()},keyboardAction:()=>{i(),r(),t.confirm()},getSvgIconShape:ws}]}(Q(Q({},d),{},{layout:S})),{translator:C,keyboardNavigation:x}=s($a),[E,L]=n(!1),R={vertical:12,horizontal:y?0:(null!==(o=null===(a=m.anchorEl)||void 0===a?void 0:a.clientWidth)&&void 0!==o?o:0)-7},q={vertical:"bottom",horizontal:y?-7:"right"},I=h(),T=h(),O=ma(),_=i((()=>({margin:O.spacing(.5,0)}))),P=e=>{const t=I.current||b;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},A=i((()=>function(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o,isRtl:i}=e;return e=>{const{target:a,nativeEvent:s}=e,{keyCode:l}=s;switch(l){case fl.ARROW_LEFT:case fl.ARROW_DOWN:case fl.ARROW_RIGHT:case fl.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=Wc(a);let t=[fl.ARROW_LEFT,fl.ARROW_DOWN].includes(l);t=i?!t:t,Hc(t?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case fl.SPACE:e.preventDefault();break;case fl.TAB:t&&null!=n&&n.refocusContent&&(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent());break;case fl.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}({keyboardNavigation:x,focusHandler:g,getEnabledButton:P,selections:d,isRtl:y})),[x,g,P,d,y]);if(r((()=>()=>{L(!1)}),[m.show,l,d.show]),r((()=>{if(!g)return;g.on("focus_toolbar_first",(()=>{const e=P(!1);null==e||e.focus()})),g.on("focus_toolbar_last",(()=>{const e=P(!0);null==e||e.focus()}))}),[]),v)return;let M=f.enabled,N=f.actions;const j=f.alignTo||T,z=c.filter((e=>!e.hidden));if(z.length>u){const e=z.splice(-(z.length-u)-1);M=!0,N=[...e,...f.actions]}if(!d.show&&0===z.length&&!M)return null;const F={key:"more",label:C.get("Menu.More"),getSvgIconShape:Tc,hidden:!1,active:E,enabled:()=>M,action:()=>L(!E)},$=z.length>0,B=N.length>0,W=$&&d.show||B&&d.show,H=t.createElement(k,{ref:I,onKeyDown:A,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:y?"row-reverse":"row"}},(null==p?void 0:p.length)&&t.createElement(Jc,{className:"actions-toolbar-extra-actions",actions:p,isRtl:y}),$&&t.createElement(Jc,{actions:z}),B&&t.createElement(Jc,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,ariaExpanded:E,actions:[F],addAnchor:!0}),W&&t.createElement(k,{item:!0,className:Gc.itemSpacing,style:_},t.createElement(D,{orientation:"vertical"})),d.show&&t.createElement(Jc,{className:"actions-toolbar-default-actions",actions:w,isRtl:y}),E&&t.createElement(Bc,{show:E,actions:N,alignTo:j,popoverProps:f.popoverProps,popoverPaperStyle:f.popoverPaperStyle,onCloseOrActionClick:()=>{L(!1)},disablePortal:f.disablePortal}));return m.show?t.createElement(Vc,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:m.show,anchorEl:m.anchorEl,anchorOrigin:R,transformOrigin:q,hideBackdrop:!0,style:Zc,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Kc.className,style:{pointerEvents:"auto",padding:O.spacing(.5,.25)}}}},H):l&&H}var Qc=e=>os((e=>Q(Q({},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 Yc="/qListObjectDef",eu=e=>null==e?void 0:e.substring(0,64e3),tu=ga(A,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})((e=>{let{styles:t,dense:n,isRtl:r}=e,o={};return n&&(o={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:t.search.color,textAlign:r?"right":"left"}}),Q({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:t.search.backgroundColor,backdropFilter:t.background.backgroundImage?t.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:r?"row-reverse":"row","& fieldset":{borderColor:"".concat(t.search.borderColor),borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:"".concat(t.search.highlightBorderColor," !important")},"& .MuiInputBase-root":Q({},t.search),"& *":{color:t.search.color},"& input":{color:t.search.color,textAlign:r?"right":"left"}},o)})),nu=ga(q)((()=>({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 ru=o((function(e,o){let{popoverOpen:i,selections:l,selectionState:c,model:u,keyboard:d,dense:p=!1,visible:f=!0,autoFocus:m=!0,beginSelectionOnFocus:g=!0,wildCardSearch:b=!1,searchEnabled:y,direction:v,hide:S,styles:w}=e;const{translator:C}=s($a),[x,E]=n(""),[k,L]=n(!1),R=h(),q=h(),I=C.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:O}=ac(u),_="rtl"===v,P=async()=>{try{await u.abortListObjectSearch(Yc)}finally{E("")}};r((()=>f?()=>P():()=>{}),[f]),r((()=>(l.on("deactivated",P),()=>{l.removeListener&&l.removeListener("deactivated",P)})),[]),r((()=>{if(k&&R.current){const e=x.length-1;R.current.setSelectionRange(e,e),L(!1)}}),[k,R.current]),r((()=>{O("inputText",x)}),[x]);const D=async()=>{let e;const t=eu(x),n=await u.searchListObjectFor(Yc,t);return c.selectDisabled()?n:(n&&t.length&&T("listCount")>0&&(e=u.acceptListObjectSearch(Yc,!0),l.selectionsMade=!0,c.clearItemStates(!1),E("")),e)},A=()=>{var e;null===(e=R.current)||void 0===e||e.focus()},N=()=>{P(),A()};return a(o,(()=>({focus(){A()}}))),f&&!1!==y?t.createElement(tu,{styles:w,dense:p,isRtl:_,startAdornment:t.createElement(M,{position:"start",sx:{marginLeft:p?"8px":"".concat(Ls,"px")}},t.createElement(Qc,{size:p?"small":"normal"})),endAdornment:t.createElement(M,{position:"end",sx:{marginLeft:0}},""!==x&&t.createElement(nu,{tabIndex:0,ref:q,title:I,"aria-label":I,onClick:N,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":N();break;case"Tab":e.shiftKey?A():Sl(t);break;default:return}e.preventDefault(),e.stopPropagation()}},t.createElement(Ac,{size:p?"small":"normal"}))),className:"search",inputRef:R,size:"small",fullWidth:!0,placeholder:C.get("Listbox.Search"),value:x,onFocus:()=>{b&&(E("**"),L(!0)),g&&!c.selectDisabled()&&!l.isModal()&&l.begin("/qListObjectDef")},onChange:async e=>{const t=eu(e.target.value);return E(t),t.length?u.searchListObjectFor(Yc,t):P()},onKeyDown:async e=>{const{currentTarget:t}=e,n=t.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Escape":if(Sl(n),l.cancel(),i)return;break;case"Tab":e.shiftKey?wl(n)||d.focusSelection():q.current?q.current.focus():Sl(n);break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;S&&(S(),Sl(n));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:m,inputProps:{tabIndex:d.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":C.get("Listbox.Search.ScreenReaderInstructions")}}):null}));function ou(e){if(!e.session)return[];const{selectionStore:t}=s($a),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r((()=>{e&&!i&&(i=function(e){let{app:t,selectionStore:n}=e;const r="".concat(t.id),{modalObjectStore:o,appModalStore:i}=n,a=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{model:t,objectSelections:n}=o.get(r)||{};t&&(await t.endSelections(e),o.clear(r),n.emit("deactivated"))},s={begin:async e=>{var n;let{model:i,paths:s,accept:l=!0,objectSelections:c}=e;if(c===(null===(n=o.get(r))||void 0===n?void 0:n.objectSelections))return;a(l),o.set(r,{model:i,objectSelections:c});const u=Array.isArray(s)?s:[s],d=async e=>{try{await i.beginSelections(u),o.set(r,{model:i,objectSelections:c})}catch(n){6003!==n.code||e?o.clear(r):(await t.abortModal(l),d(!0))}};await d()},end:a};i.set(r,s);const l={model:t,isInModal:()=>!!o.get(r),isModal(e){var t;return e?(null===(t=o.get(r))||void 0===t?void 0:t.objectSelections)===e:!!o.get(r)},forward:()=>s.end().then((()=>t.forward())),back:()=>s.end().then((()=>t.back())),clear:()=>s.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return s.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return l}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))}),[e]),[i]}function iu(e){return Object.keys(le.prototype).forEach((t=>{e[t]=le.prototype[t]})),le.init(e),e}const au=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin({model:o,paths:e,accept:!0,objectSelections:s}))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(s),goModal:e=>r.begin({model:o,paths:e,accept:!1,objectSelections:s}),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return iu(s),s},su=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function lu(e,t,o,i){const a=Array.isArray(o)?o:[o],[l]=ou(e),[c]=es(t),{appModalStore:u}=s($a).selectionStore,d=u.get(e.id),[h,p]=n();return r((()=>{l&&t&&!h&&p(au({appSelections:l,appModal:d,model:t}))}),[l,t]),r((()=>{if(!h)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=su({elements:a,objectSelections:h,options:i});return h.addListener("activated",e),h.addListener("deactivated",t),()=>{h.isActive()&&h.confirm(),h.removeListener("activated",e),h.removeListener("deactivated",t)}}),[h]),r((()=>{h&&h.setLayout(c)}),[h,c]),[h]}function cu(){const e=Q(Q({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{update(t){var n,r;let{setPages:o,pages:i,isSingleSelect:a,selectDisabled:s,layout:l}=t;this.setPages=o;const c=this.lastRowCount===l.qListObject.qSize.qcy,u=this.lastApprMaxGlyphCount===l.qListObject.qDimensionInfo.qApprMaxGlyphCount;c&&u||(this.lastRowCount=l.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=l.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==i&&void 0!==i&&(e.enginePages=null!=i?i:[],e.selectedInEngine=fs(i),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=a,e.selectDisabled=s||e.selectDisabled,e.isDimCalculated=null!==(n=null==l||null===(r=l.qListObject)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r?void 0:r.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[Q(Q({},n),{},{qState:r}),...t.slice(1)]}));return Q(Q({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}});return e}const uu=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function du(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return uu(t,"qSelected",0)+uu(t,"qSelectedExcluded",0)+uu(t,"qLocked",0)+uu(t,"qLockedExcluded",0)>0}function hu(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 pu(e){if("object"==typeof e&&hu(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 fu={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function mu(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(hu(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-.5*l;n=d[0]+h,r=d[1]+h,o=d[2]+h,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-.5*l;n=d[0]+h,r=d[1]+h,o=d[2]+h,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-l;n=d[0]+h,r=d[1]+h,o=d[2]+h,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 fu}(e)){const t=fu[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 gu(e){let t,n,r;if(hu(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?pu(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 bu(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function yu(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function vu(e){if(hu(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?pu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Su(e,t){return hu(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Su(mu(e))}function wu(e){return hu(e)?1===e.a?vu(e):Su(e):wu(mu(e))}const Cu=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function xu(e){return.2126*Cu(e.r)+.7152*Cu(e.g)+.0722*Cu(e.b)}function Eu(...e){const t=mu(...e);return t.invalid||xu(t)<.4}function ku(...e){const t=mu(...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=bu(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=mu(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:()=>Eu(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=vu(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Su(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=wu(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=gu(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=bu(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}=yu(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=yu(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)=>ku(o(18*e)),getDarkenedColor:(e=1)=>ku(o(18*-e))}}function Lu(e,t){if(!e||!t)return;const n=xu(e),r=xu(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function Ru(e,t){const n=ku("#FFFFFF"),r=ku(e),o=ku(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=Lu(n,r),a=Lu(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}function qu(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 Iu,Tu,Ou,_u="top",Pu="top-right",Du="right",Au="bottom-right",Mu="bottom",Nu="bottom-left",ju="left",zu="top-left";qu(qu(qu(qu(qu(qu(qu(qu(qu(qu(Iu={},"equal-equal",[_u,Mu]),"equal-higher",[Mu,Au]),"equal-lower",[_u,Pu]),"equal-void",[_u,Mu]),"higher-equal",[ju,Nu,_u,Pu]),"higher-higher-acute",[Mu,Nu,ju,Pu]),"higher-higher-obtuse",[Mu,_u]),"higher-lower-negative",[_u,Pu,Du]),"higher-lower-positive",[Mu,Nu,ju]),"higher-void",[_u]),qu(qu(qu(qu(qu(qu(qu(qu(qu(qu(Iu,"lower-equal",[_u]),"lower-higher-negative",[_u,zu]),"lower-higher-positive",[Au]),"lower-lower-acute",[_u,zu,ju,Pu,Du]),"lower-lower-obtuse",[_u,Mu]),"lower-void",[_u]),"void-equal",[_u]),"void-higher",[_u,Mu]),"void-lower",[_u,Mu,ju]),"void-void",[_u]),qu(Iu,"unclassified",[_u,Mu,Du,ju,Pu,Au,Nu,zu]);var Fu=function(){if(Ou)return Tu;Ou=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Tu=function e(){var t,n,r,l,c,u,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(f&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(f,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},Tu}();function $u(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Bu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wu(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Fu);var Hu=1/.7,Uu="\\s*([+-]?\\d+)\\s*",Gu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ku=/^#([0-9a-f]{3,8})$/,Ju=new RegExp(`^rgb\\(${Uu},${Uu},${Uu}\\)$`),Zu=new RegExp(`^rgb\\(${Vu},${Vu},${Vu}\\)$`),Xu=new RegExp(`^rgba\\(${Uu},${Uu},${Uu},${Gu}\\)$`),Qu=new RegExp(`^rgba\\(${Vu},${Vu},${Vu},${Gu}\\)$`),Yu=new RegExp(`^hsl\\(${Gu},${Vu},${Vu}\\)$`),ed=new RegExp(`^hsla\\(${Gu},${Vu},${Vu},${Gu}\\)$`),td={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 nd(){return this.rgb().formatHex()}function rd(){return this.rgb().formatRgb()}function od(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ku.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?id(t):3===n?new cd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ad(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ad(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=Ju.exec(e))?new cd(t[1],t[2],t[3],1):(t=Zu.exec(e))?new cd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xu.exec(e))?ad(t[1],t[2],t[3],t[4]):(t=Qu.exec(e))?ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Yu.exec(e))?md(t[1],t[2]/100,t[3]/100,1):(t=ed.exec(e))?md(t[1],t[2]/100,t[3]/100,t[4]):td.hasOwnProperty(e)?id(td[e]):"transparent"===e?new cd(NaN,NaN,NaN,0):null}function id(e){return new cd(e>>16&255,e>>8&255,255&e,1)}function ad(e,t,n,r){return r<=0&&(e=t=n=NaN),new cd(e,t,n,r)}function sd(e){return e instanceof Wu||(e=od(e)),e?new cd((e=e.rgb()).r,e.g,e.b,e.opacity):new cd}function ld(e,t,n,r){return 1===arguments.length?sd(e):new cd(e,t,n,null==r?1:r)}function cd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ud(){return`#${fd(this.r)}${fd(this.g)}${fd(this.b)}`}function dd(){const e=hd(this.opacity);return`${1===e?"rgb(":"rgba("}${pd(this.r)}, ${pd(this.g)}, ${pd(this.b)}${1===e?")":`, ${e})`}`}function hd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fd(e){return((e=pd(e))<16?"0":"")+e.toString(16)}function md(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bd(e,t,n,r)}function gd(e){if(e instanceof bd)return new bd(e.h,e.s,e.l,e.opacity);if(e instanceof Wu||(e=od(e)),!e)return new bd;if(e instanceof bd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new bd(a,s,l,e.opacity)}function bd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yd(e){return(e=(e||0)%360)<0?e+360:e}function vd(e){return Math.max(0,Math.min(1,e||0))}function Sd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$u(Wu,od,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nd,formatHex:nd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gd(this).formatHsl()},formatRgb:rd,toString:rd}),$u(cd,ld,Bu(Wu,{brighter(e){return e=null==e?Hu:Math.pow(Hu,e),new cd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new cd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cd(pd(this.r),pd(this.g),pd(this.b),hd(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:ud,formatHex:ud,formatHex8:function(){return`#${fd(this.r)}${fd(this.g)}${fd(this.b)}${fd(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dd,toString:dd})),$u(bd,(function(e,t,n,r){return 1===arguments.length?gd(e):new bd(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return e=null==e?Hu:Math.pow(Hu,e),new bd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new bd(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 cd(Sd(e>=240?e-240:e+120,o,r),Sd(e,o,r),Sd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new bd(yd(this.h),vd(this.s),vd(this.l),hd(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=hd(this.opacity);return`${1===e?"hsl(":"hsla("}${yd(this.h)}, ${100*vd(this.s)}%, ${100*vd(this.l)}%${1===e?")":`, ${e})`}`}}));const wd=Math.PI/180,Cd=180/Math.PI,xd=4/29,Ed=6/29,kd=3*Ed*Ed;function Ld(e){if(e instanceof Rd)return new Rd(e.l,e.a,e.b,e.opacity);if(e instanceof _d)return Pd(e);e instanceof cd||(e=sd(e));var t,n,r=Od(e.r),o=Od(e.g),i=Od(e.b),a=qd((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=qd((.4360747*r+.3850649*o+.1430804*i)/.96422),n=qd((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Rd(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Rd(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function qd(e){return e>.008856451679035631?Math.pow(e,1/3):e/kd+xd}function Id(e){return e>Ed?e*e*e:kd*(e-xd)}function Td(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Od(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _d(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Pd(e){if(isNaN(e.h))return new Rd(e.l,0,0,e.opacity);var t=e.h*wd;return new Rd(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}$u(Rd,(function(e,t,n,r){return 1===arguments.length?Ld(e):new Rd(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return new Rd(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Rd(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 cd(Td(3.1338561*(t=.96422*Id(t))-1.6168667*(e=1*Id(e))-.4906146*(n=.82521*Id(n))),Td(-.9787684*t+1.9161415*e+.033454*n),Td(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),$u(_d,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof _d)return new _d(e.h,e.c,e.l,e.opacity);if(e instanceof Rd||(e=Ld(e)),0===e.a&&0===e.b)return new _d(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Cd;return new _d(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new _d(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return new _d(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new _d(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Pd(this).rgb()}}));var Dd=e=>()=>e;function Ad(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Dd(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?Ad: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):Dd(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ld(e)).r,(t=ld(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Ad(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 Md,Nd="center",jd="bottom";function zd(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 Fd(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Bd)):void 0===t&&(t=$d);for(var n,r,o,i,a,s=new Ud(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Ud(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Hd)}function $d(e){return e.children}function Bd(e){return Array.isArray(e)?e[1]:null}function Wd(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Hd(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ud(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Nd,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:Nd,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:Nd,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:Nd},{key:"DataRangeIncludingZero",alignment:jd},{key:"LimitedData",alignment:jd},{key:"NegativeOrZeroValues",alignment:jd}].reduce((function(e,t){return e[t.key]=t,e}),{}),Ud.prototype=Fd.prototype={constructor:Ud,count:function(){return this.eachAfter(zd)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Fd(this).eachBefore(Wd)},[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)}},Md=function(e){
|
|
14
|
+
*/const er=[];function tr(e){return er[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+=jt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=jt(n,t,e[a]),r&&(o+=i[a]);Ft.lastIndex=0;for(var s,l="";null!==(s=Ft.exec(o));)l+="-"+s[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)+l;return{name:c,styles:o,next:zt}}(er)}var nr,rr,or={exports:{}},ir={};var ar=(rr||(rr=1,or.exports=function(){if(nr)return ir;nr=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case r:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case p:case h:case a:return e;default:return f}}case n:return f}}}return e=Symbol.for("react.module.reference"),ir.ContextConsumer=s,ir.ContextProvider=a,ir.Element=t,ir.ForwardRef=c,ir.Fragment=r,ir.Lazy=p,ir.Memo=h,ir.Portal=n,ir.Profiler=i,ir.StrictMode=o,ir.Suspense=u,ir.SuspenseList=d,ir.isAsyncMode=function(){return!1},ir.isConcurrentMode=function(){return!1},ir.isContextConsumer=function(e){return m(e)===s},ir.isContextProvider=function(e){return m(e)===a},ir.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ir.isForwardRef=function(e){return m(e)===c},ir.isFragment=function(e){return m(e)===r},ir.isLazy=function(e){return m(e)===p},ir.isMemo=function(e){return m(e)===h},ir.isPortal=function(e){return m(e)===n},ir.isProfiler=function(e){return m(e)===i},ir.isStrictMode=function(e){return m(e)===o},ir.isSuspense=function(e){return m(e)===u},ir.isSuspenseList=function(e){return m(e)===d},ir.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ir.typeOf=m,ir}()),or.exports);function sr(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 lr(t){if(e.isValidElement(t)||ar.isValidElementType(t)||!sr(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=lr(t[e])})),n}function cr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return sr(t)&&sr(n)&&Object.keys(n).forEach((i=>{e.isValidElement(n[i])||ar.isValidElementType(n[i])?o[i]=n[i]:sr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&sr(t[i])?o[i]=cr(t[i],n[i],r):r.clone?o[i]=sr(n[i])?lr(n[i]):n[i]:o[i]=n[i]})),o}const ur=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})),{})};function dr(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 hr={borderRadius:4};function pr(e,t){return t?cr(e,t,{clone:!1}):e}const fr={xs:0,sm:600,md:900,lg:1200,xl:1536},mr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${fr[e]}px)`},gr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:fr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function br(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||mr;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||mr;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some((e=>s.startsWith(`@${e}`)))||s.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:gr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||fr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o}),{})}return n(t)}function yr(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function vr(e){if("string"!=typeof e)throw new Error(qt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Sr(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 wr(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Sr(e,n)||r,t&&(o=t(o,r,e)),o}function Cr(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=Sr(e.theme,r)||{};return br(e,i,(e=>{let r=wr(a,o,e);return e===r&&"string"==typeof e&&(r=wr(a,o,`${t}${"default"===e?"":vr(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}const xr={m:"margin",p:"padding"},Er={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},kr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Lr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!kr[e])return[e];e=kr[e]}const[t,n]=e.split(""),r=xr[t],o=Er[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Rr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Ir(e,t,n,r){const o=Sr(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof 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:`-${n}`}:"function"==typeof o?o:()=>{}}function Tr(e){return Ir(e,"spacing",8)}function Or(e,t){return"string"==typeof t||null==t?t:e(t)}function _r(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=Or(t,n),e)),{})}(Lr(n),r);return br(e,e[n],o)}function Pr(e,t){const n=Tr(e.theme);return Object.keys(e).map((r=>_r(e,t,r,n))).reduce(pr,{})}function Dr(e){return Pr(e,Rr)}function Ar(e){return Pr(e,qr)}function Mr(e=8,t=Tr({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 Nr(...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]?pr(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function jr(e){return"number"!=typeof e?e:`${e}px solid`}function zr(e,t){return Cr({prop:e,themeKey:"borders",transform:t})}Dr.propTypes={},Dr.filterProps=Rr,Ar.propTypes={},Ar.filterProps=qr;const Fr=zr("border",jr),$r=zr("borderTop",jr),Br=zr("borderRight",jr),Wr=zr("borderBottom",jr),Hr=zr("borderLeft",jr),Ur=zr("borderColor"),Gr=zr("borderTopColor"),Vr=zr("borderRightColor"),Kr=zr("borderBottomColor"),Jr=zr("borderLeftColor"),Zr=zr("outline",jr),Xr=zr("outlineColor"),Qr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Ir(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Or(t,e)});return br(e,e.borderRadius,n)}return null};Qr.propTypes={},Qr.filterProps=["borderRadius"],Nr(Fr,$r,Br,Wr,Hr,Ur,Gr,Vr,Kr,Jr,Qr,Zr,Xr);const Yr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Ir(e.theme,"spacing",8),n=e=>({gap:Or(t,e)});return br(e,e.gap,n)}return null};Yr.propTypes={},Yr.filterProps=["gap"];const eo=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Ir(e.theme,"spacing",8),n=e=>({columnGap:Or(t,e)});return br(e,e.columnGap,n)}return null};eo.propTypes={},eo.filterProps=["columnGap"];const to=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Ir(e.theme,"spacing",8),n=e=>({rowGap:Or(t,e)});return br(e,e.rowGap,n)}return null};to.propTypes={},to.filterProps=["rowGap"];function no(e,t){return"grey"===t?t:e}Nr(Yr,eo,to,Cr({prop:"gridColumn"}),Cr({prop:"gridRow"}),Cr({prop:"gridAutoFlow"}),Cr({prop:"gridAutoColumns"}),Cr({prop:"gridAutoRows"}),Cr({prop:"gridTemplateColumns"}),Cr({prop:"gridTemplateRows"}),Cr({prop:"gridTemplateAreas"}),Cr({prop:"gridArea"}));function ro(e){return e<=1&&0!==e?100*e+"%":e}Nr(Cr({prop:"color",themeKey:"palette",transform:no}),Cr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:no}),Cr({prop:"backgroundColor",themeKey:"palette",transform:no}));const oo=Cr({prop:"width",transform:ro}),io=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||fr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ro(t)}};return br(e,e.maxWidth,t)}return null};io.filterProps=["maxWidth"];const ao=Cr({prop:"minWidth",transform:ro}),so=Cr({prop:"height",transform:ro}),lo=Cr({prop:"maxHeight",transform:ro}),co=Cr({prop:"minHeight",transform:ro});Cr({prop:"size",cssProperty:"width",transform:ro}),Cr({prop:"size",cssProperty:"height",transform:ro});Nr(oo,io,ao,so,lo,co,Cr({prop:"boxSizing"}));const uo={border:{themeKey:"borders",transform:jr},borderTop:{themeKey:"borders",transform:jr},borderRight:{themeKey:"borders",transform:jr},borderBottom:{themeKey:"borders",transform:jr},borderLeft:{themeKey:"borders",transform:jr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:jr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Qr},color:{themeKey:"palette",transform:no},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:no},backgroundColor:{themeKey:"palette",transform:no},p:{style:Ar},pt:{style:Ar},pr:{style:Ar},pb:{style:Ar},pl:{style:Ar},px:{style:Ar},py:{style:Ar},padding:{style:Ar},paddingTop:{style:Ar},paddingRight:{style:Ar},paddingBottom:{style:Ar},paddingLeft:{style:Ar},paddingX:{style:Ar},paddingY:{style:Ar},paddingInline:{style:Ar},paddingInlineStart:{style:Ar},paddingInlineEnd:{style:Ar},paddingBlock:{style:Ar},paddingBlockStart:{style:Ar},paddingBlockEnd:{style:Ar},m:{style:Dr},mt:{style:Dr},mr:{style:Dr},mb:{style:Dr},ml:{style:Dr},mx:{style:Dr},my:{style:Dr},margin:{style:Dr},marginTop:{style:Dr},marginRight:{style:Dr},marginBottom:{style:Dr},marginLeft:{style:Dr},marginX:{style:Dr},marginY:{style:Dr},marginInline:{style:Dr},marginInlineStart:{style:Dr},marginInlineEnd:{style:Dr},marginBlock:{style:Dr},marginBlockStart:{style:Dr},marginBlockEnd:{style:Dr},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:Yr},rowGap:{style:to},columnGap:{style:eo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ro},maxWidth:{style:io},minWidth:{transform:ro},height:{transform:ro},maxHeight:{transform:ro},minHeight:{transform:ro},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 ho=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:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Sr(n,s)||{};if(c)return c(o);return br(o,t,(t=>{let n=wr(u,l,t);return t===n&&"string"==typeof t&&(n=wr(u,l,`${e}${"default"===t?"":vr(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??uo;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}(o.breakpoints),l=Object.keys(s);let c=s;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=pr(c,e(n,i,o,a));else{const e=br({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=pr(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=pr(c,e(n,i,o,a))})),!i&&o.modularCssLayers?{"@layer sx":dr(o,yr(l,c))}:dr(o,yr(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();function po(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 fo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=ur(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(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:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n);let l=cr({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Mr(o),shape:{...hr,...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=po,l=t.reduce(((e,t)=>cr(e,t)),l),l.unstable_sxConfig={...uo,...a?.unstable_sxConfig},l.unstable_sx=function(e){return ho({sx:e,theme:this})},l}function mo(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}ho.filterProps=["sx"];const go=fo();function bo(e=go){return mo(e)}function yo(e){const t=tr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function vo({styles:e,themeId:t,defaultTheme:n={}}){const r=bo(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map((e=>yo("function"==typeof e?e(o):e))):yo(i)),Kn.jsx(Yn,{styles:i})}const So=e=>e,wo=(()=>{let e=So;return{configure(t){e=t},generate:t=>e(t),reset(){e=So}}})();function Co(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=Co(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Co(e))&&(r&&(r+=" "),r+=t);return r}const Eo={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 ko(e,t,n="Mui"){const r=Eo[t];return r?`${n}-${r}`:`${wo.generate(e)}-${t}`}function Lo(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=ko(e,t,n)})),r}function Ro(e){const{variants:t,...n}=e,r={variants:t,style:tr(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=tr(e.style))})),r}const qo=fo();function Io(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function To(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Oo(e){return e?(t,n)=>n[e]:null}function _o(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap((t=>_o(e,t,n)));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?To(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?To(tr(o),n):o}return Po(e,r.variants,[t],n)}return r?.isProcessed?n?To(tr(r.style),n):r.style:n?To(tr(r),n):r}function Po(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?To(tr(a.style(o)),r):a.style(o))):n.push(r?To(tr(a.style),r):a.style)}return n}function Do(e,t){}function Ao(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Mo(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=Mo(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}const No="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function jo(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 zo(e){if(e.type)return e;if("#"===e.charAt(0))return zo(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(qt(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(qt(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const Fo=(e,t)=>{try{return(e=>{const t=zo(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 $o(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 Bo(e){e=zo(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 s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),$o({type:s,values:l})}function Wo(e){let t="hsl"===(e=zo(e)).type||"hsla"===e.type?zo(Bo(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 Ho(e,t,n){try{return function(e,t){return e=zo(e),t=jo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,$o(e)}(e,t)}catch(t){return e}}function Uo(e,t){if(e=zo(e),t=jo(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 $o(e)}function Go(e,t,n){try{return Uo(e,t)}catch(t){return e}}function Vo(e,t){if(e=zo(e),t=jo(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 $o(e)}function Ko(e,t,n){try{return Vo(e,t)}catch(t){return e}}function Jo(e,t,n){try{return function(e,t=.15){return Wo(e)>.5?Uo(e,t):Vo(e,t)}(e,t)}catch(t){return e}}let Zo=0;const Xo={...e}.useId;function Qo(t){if(void 0!==Xo){return Xo()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect((()=>{null==n&&(Zo+=1,r(`mui-${Zo}`))}),[n]),o}(t)}const Yo=e.createContext(null);function ei(){return e.useContext(Yo)}var ti="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ni(t){const{children:n,theme:r}=t,o=ei(),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[ti]=null!==o),e}),[r,o]);return Kn.jsx(Yo.Provider,{value:i,children:n})}const ri=e.createContext();function oi({value:e,...t}){return Kn.jsx(ri.Provider,{value:e??!0,...t})}const ii=e.createContext(void 0);function ai({value:e,children:t}){return Kn.jsx(ii.Provider,{value:e,children:t})}function si({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?Mo(o.defaultProps,r):o.styleOverrides||o.variants?r:Mo(o,r)}({props:t,name:n,theme:{components:e.useContext(ii)}})}const li={};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 ui(e){const{children:t,theme:n,themeId:r}=e,o=mo(li),i=ei()||li,a=ci(r,o,n),s=ci(r,i,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=mo(),n=Qo()||"",{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};`:"",No((()=>{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?Kn.jsx(vo,{styles:o}):null}(a);return Kn.jsx(ni,{theme:s,children:Kn.jsx(y.Provider,{value:a,children:Kn.jsx(oi,{value:l,children:Kn.jsxs(ai,{value:r?a[r].components:a.components,children:[c,t]})})})})}const di={theme:void 0};const hi="mode",pi="color-scheme",fi="data-color-scheme";function mi(){}const gi=({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 mi;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function bi(){}function yi(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function vi(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 Si(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=hi,colorSchemeStorageKey:s=pi,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=gi,noSsr:u=!1}=t,d=i.join(","),h=i.length>1,p=e.useMemo((()=>c?.({key:a,storageWindow:l})),[c,a,l]),f=e.useMemo((()=>c?.({key:`${s}-light`,storageWindow:l})),[c,s,l]),m=e.useMemo((()=>c?.({key:`${s}-dark`,storageWindow:l})),[c,s,l]),[g,b]=e.useState((()=>{const e=p?.get(n)||n,t=f?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:yi(e),lightColorScheme:t,darkColorScheme:i}})),[y,v]=e.useState(u||!h);e.useEffect((()=>{v(!0)}),[]);const S=function(e){return vi(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:yi(r)}}))}),[p,n]),C=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 vi(t,(t=>{"light"===t&&(f?.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,f?.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=>(f?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o})))}),[d,f,m,r,o]),x=e.useCallback((e=>{"system"===g.mode&&b((t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}}))}),[g.mode]),E=e.useRef(x);return E.current=x,e.useEffect((()=>{if("function"!=typeof window.matchMedia||!h)return;const e=(...e)=>E.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}}),[h]),e.useEffect((()=>{if(h){const e=p?.subscribe((e=>{e&&!["light","dark","system"].includes(e)||w(e||n)}))||bi,t=f?.subscribe((e=>{e&&!d.match(e)||C({light:e})}))||bi,r=m?.subscribe((e=>{e&&!d.match(e)||C({dark:e})}))||bi;return()=>{e(),t(),r()}}}),[C,w,d,n,l,h,p,f,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:C}}function wi(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 Ci=(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])}))},xi=(e,t,n)=>{!function e(r,o=[],i=[]){Object.entries(r).forEach((([r,a])=>{(!n||n&&!n([...o,r]))&&null!=a&&("object"==typeof a&&Object.keys(a).length>0?e(a,[...o,r],Array.isArray(a)?[...i,r]:i):t([...o,r],a,i))}))}(e)},Ei=(e,t)=>{if("number"==typeof t){if(["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t))))return t;return e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`}return t};function ki(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return xi(e,((e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=Ei(e,t);Object.assign(o,{[r]:l}),Ci(i,e,`var(${r})`,s),Ci(a,e,`var(${r}, ${l})`,s)}}),(e=>"vars"===e[0])),{css:o,vars:i,varsWithDefaults:a}}const Li={black:"#000",white:"#fff"},Ri={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"},qi={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ii={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ti={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Oi={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},_i={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Pi={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Di(){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:Li.white,default:Li.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 Ai=Di();function Mi(){return{text:{primary:Li.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:Li.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 Ni=Mi();function ji(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=Vo(e.main,o):"dark"===t&&(e.dark=Uo(e.main,i)))}function zi(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(e="light"){return"dark"===e?{main:Oi[200],light:Oi[50],dark:Oi[400]}:{main:Oi[700],light:Oi[400],dark:Oi[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:qi[200],light:qi[50],dark:qi[400]}:{main:qi[500],light:qi[300],dark:qi[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:Ii[500],light:Ii[300],dark:Ii[700]}:{main:Ii[700],light:Ii[400],dark:Ii[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:_i[400],light:_i[300],dark:_i[700]}:{main:_i[700],light:_i[500],dark:_i[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Pi[400],light:Pi[300],dark:Pi[700]}:{main:Pi[800],light:Pi[500],dark:Pi[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Ti[400],light:Ti[300],dark:Ti[700]}:{main:"#ed6c02",light:Ti[500],dark:Ti[900]}}(t);function d(e){const t=function(e,t){const n=Wo(e),r=Wo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ni.text.primary)>=n?Ni.text.primary:Ai.text.primary;return t}const h=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(qt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(qt(12,t?` (${t})`:"",JSON.stringify(e.main)));return ji(e,"light",o,r),ji(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e};let p;"light"===t?p=Di():"dark"===t&&(p=Mi());return cr({common:{...Li},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Ri,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...p},o)}function Fi(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 $i={textTransform:"uppercase"},Bi='"Roboto", "Helvetica", "Arial", sans-serif';function Wi(e,t){const{fontFamily:n=Bi,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,h=r/14,p=u||(e=>e/l*h+"rem"),f=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Bi?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(i,48,1.167,0),h4:f(i,34,1.235,.25),h5:f(i,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(i,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(i,16,1.5,.15),body2:f(i,14,1.43,.15),button:f(a,14,1.75,.4,$i),caption:f(i,12,1.66,.4),overline:f(i,12,2.66,1,$i),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return cr({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function Hi(...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 Ui=["none",Hi(0,2,1,-1,0,1,1,0,0,1,3,0),Hi(0,3,1,-2,0,2,2,0,0,1,5,0),Hi(0,3,3,-2,0,3,4,0,0,1,8,0),Hi(0,2,4,-1,0,4,5,0,0,1,10,0),Hi(0,3,5,-1,0,5,8,0,0,1,14,0),Hi(0,3,5,-1,0,6,10,0,0,1,18,0),Hi(0,4,5,-2,0,7,10,1,0,2,16,1),Hi(0,5,5,-3,0,8,10,1,0,3,14,2),Hi(0,5,6,-3,0,9,12,1,0,3,16,2),Hi(0,6,6,-3,0,10,14,1,0,4,18,3),Hi(0,6,7,-4,0,11,15,1,0,4,20,3),Hi(0,7,8,-4,0,12,17,2,0,5,22,4),Hi(0,7,8,-4,0,13,19,2,0,5,24,4),Hi(0,7,9,-4,0,14,21,2,0,5,26,4),Hi(0,8,9,-5,0,15,22,2,0,6,28,5),Hi(0,8,10,-5,0,16,24,2,0,6,30,5),Hi(0,8,11,-5,0,17,26,2,0,6,32,5),Hi(0,9,11,-5,0,18,28,2,0,7,34,6),Hi(0,9,12,-6,0,19,29,2,0,7,36,6),Hi(0,10,13,-6,0,20,31,3,0,8,38,7),Hi(0,10,13,-6,0,21,33,3,0,8,40,7),Hi(0,10,14,-6,0,22,35,3,0,8,42,7),Hi(0,11,14,-7,0,23,36,3,0,9,44,8),Hi(0,11,15,-7,0,24,38,3,0,9,46,8)],Gi={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)"},Vi={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ki(e){return`${Math.round(e)}ms`}function Ji(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Zi(e){const t={...Gi,...e.easing},n={...Vi,...e.duration};return{getAutoHeightDuration:Ji,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:Ki(o)} ${i} ${"string"==typeof a?a:Ki(a)}`)).join(",")},...e,easing:t,duration:n}}const Xi={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Qi(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let o=0;o<n.length;o++){const[i,a]=n[o];!sr(r=a)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||i.startsWith("unstable_")?delete t[i]:sr(a)&&(t[i]={...a},e(t[i]))}var r}(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 Yi(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(qt(20));const u=zi(i),d=fo(e);let h=cr(d,{mixins:(p=d.breakpoints,f=r,{toolbar:{minHeight:56,[p.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[p.up("sm")]:{minHeight:64}},...f}),palette:u,shadows:Ui.slice(),typography:Wi(u,s),transitions:Zi(a),zIndex:{...Xi}});var p,f;return h=cr(h,c),h=t.reduce(((e,t)=>cr(e,t)),h),h.unstable_sxConfig={...uo,...c?.unstable_sxConfig},h.unstable_sx=function(e){return ho({sx:e,theme:this})},h.toRuntimeSource=Qi,h}const ea=[...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 ta(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function na(e){return"dark"===e?ea:[]}function ra(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 oa=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 ia(e,t,n){!e[t]&&n&&(e[t]=n)}function aa(e){return"string"==typeof e&&e.startsWith("hsl")?Bo(e):e}function sa(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Fo(aa(e[t])))}const la=e=>{try{return e()}catch(e){}},ca=(e="mui")=>wi(e);function ua(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=zi(t);return{palette:i,opacity:{...ta(i.mode),...n},overlays:r||na(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=Yi({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...ta(o),...t?.opacity},overlays:t?.overlays||na(o)},a}function da(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=ra,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),h=ca(i),{[d]:p,light:f,dark:m,...g}=n,b={...g};let y=p;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(y=!0),!y)throw new Error(qt(21,d));const v=ua(b,y,c,d);f&&!b.light&&ua(b,f,void 0,"light"),m&&!b.dark&&ua(b,m,void 0,"dark");let S={defaultColorScheme:d,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:b,font:{...Fi(v.typography),...v.font},spacing:(w=c.spacing,"number"==typeof w?`${w}px`:"string"==typeof w||"function"==typeof w||Array.isArray(w)?w:"8px")};var w;Object.keys(S.colorSchemes).forEach((e=>{const t=S.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return h(e,t[r][o])};var r;if("light"===t.mode&&(ia(t.common,"background","#fff"),ia(t.common,"onBackground","#000")),"dark"===t.mode&&(ia(t.common,"background","#000"),ia(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){ia(t.Alert,"errorColor",Go(t.error.light,.6)),ia(t.Alert,"infoColor",Go(t.info.light,.6)),ia(t.Alert,"successColor",Go(t.success.light,.6)),ia(t.Alert,"warningColor",Go(t.warning.light,.6)),ia(t.Alert,"errorFilledBg",n("palette-error-main")),ia(t.Alert,"infoFilledBg",n("palette-info-main")),ia(t.Alert,"successFilledBg",n("palette-success-main")),ia(t.Alert,"warningFilledBg",n("palette-warning-main")),ia(t.Alert,"errorFilledColor",la((()=>t.getContrastText(t.error.main)))),ia(t.Alert,"infoFilledColor",la((()=>t.getContrastText(t.info.main)))),ia(t.Alert,"successFilledColor",la((()=>t.getContrastText(t.success.main)))),ia(t.Alert,"warningFilledColor",la((()=>t.getContrastText(t.warning.main)))),ia(t.Alert,"errorStandardBg",Ko(t.error.light,.9)),ia(t.Alert,"infoStandardBg",Ko(t.info.light,.9)),ia(t.Alert,"successStandardBg",Ko(t.success.light,.9)),ia(t.Alert,"warningStandardBg",Ko(t.warning.light,.9)),ia(t.Alert,"errorIconColor",n("palette-error-main")),ia(t.Alert,"infoIconColor",n("palette-info-main")),ia(t.Alert,"successIconColor",n("palette-success-main")),ia(t.Alert,"warningIconColor",n("palette-warning-main")),ia(t.AppBar,"defaultBg",n("palette-grey-100")),ia(t.Avatar,"defaultBg",n("palette-grey-400")),ia(t.Button,"inheritContainedBg",n("palette-grey-300")),ia(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),ia(t.Chip,"defaultBorder",n("palette-grey-400")),ia(t.Chip,"defaultAvatarColor",n("palette-grey-700")),ia(t.Chip,"defaultIconColor",n("palette-grey-700")),ia(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ia(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ia(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ia(t.LinearProgress,"primaryBg",Ko(t.primary.main,.62)),ia(t.LinearProgress,"secondaryBg",Ko(t.secondary.main,.62)),ia(t.LinearProgress,"errorBg",Ko(t.error.main,.62)),ia(t.LinearProgress,"infoBg",Ko(t.info.main,.62)),ia(t.LinearProgress,"successBg",Ko(t.success.main,.62)),ia(t.LinearProgress,"warningBg",Ko(t.warning.main,.62)),ia(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),ia(t.Slider,"primaryTrack",Ko(t.primary.main,.62)),ia(t.Slider,"secondaryTrack",Ko(t.secondary.main,.62)),ia(t.Slider,"errorTrack",Ko(t.error.main,.62)),ia(t.Slider,"infoTrack",Ko(t.info.main,.62)),ia(t.Slider,"successTrack",Ko(t.success.main,.62)),ia(t.Slider,"warningTrack",Ko(t.warning.main,.62));const e=Jo(t.background.default,.8);ia(t.SnackbarContent,"bg",e),ia(t.SnackbarContent,"color",la((()=>t.getContrastText(e)))),ia(t.SpeedDialAction,"fabHoverBg",Jo(t.background.paper,.15)),ia(t.StepConnector,"border",n("palette-grey-400")),ia(t.StepContent,"border",n("palette-grey-400")),ia(t.Switch,"defaultColor",n("palette-common-white")),ia(t.Switch,"defaultDisabledColor",n("palette-grey-100")),ia(t.Switch,"primaryDisabledColor",Ko(t.primary.main,.62)),ia(t.Switch,"secondaryDisabledColor",Ko(t.secondary.main,.62)),ia(t.Switch,"errorDisabledColor",Ko(t.error.main,.62)),ia(t.Switch,"infoDisabledColor",Ko(t.info.main,.62)),ia(t.Switch,"successDisabledColor",Ko(t.success.main,.62)),ia(t.Switch,"warningDisabledColor",Ko(t.warning.main,.62)),ia(t.TableCell,"border",Ko(Ho(t.divider,1),.88)),ia(t.Tooltip,"bg",Ho(t.grey[700],.92))}if("dark"===t.mode){ia(t.Alert,"errorColor",Ko(t.error.light,.6)),ia(t.Alert,"infoColor",Ko(t.info.light,.6)),ia(t.Alert,"successColor",Ko(t.success.light,.6)),ia(t.Alert,"warningColor",Ko(t.warning.light,.6)),ia(t.Alert,"errorFilledBg",n("palette-error-dark")),ia(t.Alert,"infoFilledBg",n("palette-info-dark")),ia(t.Alert,"successFilledBg",n("palette-success-dark")),ia(t.Alert,"warningFilledBg",n("palette-warning-dark")),ia(t.Alert,"errorFilledColor",la((()=>t.getContrastText(t.error.dark)))),ia(t.Alert,"infoFilledColor",la((()=>t.getContrastText(t.info.dark)))),ia(t.Alert,"successFilledColor",la((()=>t.getContrastText(t.success.dark)))),ia(t.Alert,"warningFilledColor",la((()=>t.getContrastText(t.warning.dark)))),ia(t.Alert,"errorStandardBg",Go(t.error.light,.9)),ia(t.Alert,"infoStandardBg",Go(t.info.light,.9)),ia(t.Alert,"successStandardBg",Go(t.success.light,.9)),ia(t.Alert,"warningStandardBg",Go(t.warning.light,.9)),ia(t.Alert,"errorIconColor",n("palette-error-main")),ia(t.Alert,"infoIconColor",n("palette-info-main")),ia(t.Alert,"successIconColor",n("palette-success-main")),ia(t.Alert,"warningIconColor",n("palette-warning-main")),ia(t.AppBar,"defaultBg",n("palette-grey-900")),ia(t.AppBar,"darkBg",n("palette-background-paper")),ia(t.AppBar,"darkColor",n("palette-text-primary")),ia(t.Avatar,"defaultBg",n("palette-grey-600")),ia(t.Button,"inheritContainedBg",n("palette-grey-800")),ia(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),ia(t.Chip,"defaultBorder",n("palette-grey-700")),ia(t.Chip,"defaultAvatarColor",n("palette-grey-300")),ia(t.Chip,"defaultIconColor",n("palette-grey-300")),ia(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ia(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ia(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ia(t.LinearProgress,"primaryBg",Go(t.primary.main,.5)),ia(t.LinearProgress,"secondaryBg",Go(t.secondary.main,.5)),ia(t.LinearProgress,"errorBg",Go(t.error.main,.5)),ia(t.LinearProgress,"infoBg",Go(t.info.main,.5)),ia(t.LinearProgress,"successBg",Go(t.success.main,.5)),ia(t.LinearProgress,"warningBg",Go(t.warning.main,.5)),ia(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),ia(t.Slider,"primaryTrack",Go(t.primary.main,.5)),ia(t.Slider,"secondaryTrack",Go(t.secondary.main,.5)),ia(t.Slider,"errorTrack",Go(t.error.main,.5)),ia(t.Slider,"infoTrack",Go(t.info.main,.5)),ia(t.Slider,"successTrack",Go(t.success.main,.5)),ia(t.Slider,"warningTrack",Go(t.warning.main,.5));const e=Jo(t.background.default,.98);ia(t.SnackbarContent,"bg",e),ia(t.SnackbarContent,"color",la((()=>t.getContrastText(e)))),ia(t.SpeedDialAction,"fabHoverBg",Jo(t.background.paper,.15)),ia(t.StepConnector,"border",n("palette-grey-600")),ia(t.StepContent,"border",n("palette-grey-600")),ia(t.Switch,"defaultColor",n("palette-grey-300")),ia(t.Switch,"defaultDisabledColor",n("palette-grey-600")),ia(t.Switch,"primaryDisabledColor",Go(t.primary.main,.55)),ia(t.Switch,"secondaryDisabledColor",Go(t.secondary.main,.55)),ia(t.Switch,"errorDisabledColor",Go(t.error.main,.55)),ia(t.Switch,"infoDisabledColor",Go(t.info.main,.55)),ia(t.Switch,"successDisabledColor",Go(t.success.main,.55)),ia(t.Switch,"warningDisabledColor",Go(t.warning.main,.55)),ia(t.TableCell,"border",Go(Ho(t.divider,1),.68)),ia(t.Tooltip,"bg",Ho(t.grey[700],.92))}sa(t.background,"default"),sa(t.background,"paper"),sa(t.common,"background"),sa(t.common,"onBackground"),sa(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&ia(t[e],"mainChannel",Fo(aa(n.main))),n.light&&ia(t[e],"lightChannel",Fo(aa(n.light))),n.dark&&ia(t[e],"darkChannel",Fo(aa(n.dark))),n.contrastText&&ia(t[e],"contrastTextChannel",Fo(aa(n.contrastText))),"text"===e&&(sa(t[e],"primary"),sa(t[e],"secondary")),"action"===e&&(n.active&&sa(t[e],"active"),n.selected&&sa(t[e],"selected")))}))})),S=t.reduce(((e,t)=>cr(e,t)),S);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:oa(S)},{vars:x,generateThemeVars:E,generateStyleSheets:k}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ki(l,t);let h=d;const p={},{[s]:f,...m}=i;if(Object.entries(m||{}).forEach((([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=ki(n,t);h=cr(h,i),p[e]={css:o,vars:r}})),f){const{css:e,vars:n,varsWithDefaults:r}=ki(f,t);h=cr(h,r),p[s]={css:e,vars:n}}function g(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)return e.defaultColorScheme===t?":root":{[`@media (prefers-color-scheme: ${i[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:h,generateThemeVars:()=>{let e={...c};return Object.entries(p).forEach((([,{vars:t}])=>{e=cr(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=p;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=i[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};a(n(e,{...s}),s)})),t}}}(S,C);return S.vars=x,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach((([e,t])=>{S[e]=t})),S.generateThemeVars=E,S.generateStyleSheets=k,S.generateSpacing=function(){return Mr(c.spacing,Tr(this))},S.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),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=a,S.unstable_sxConfig={...uo,...c?.unstable_sxConfig},S.unstable_sx=function(e){return ho({sx:e,theme:this})},S.toRuntimeSource=Qi,S}function ha(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:zi({...!0===n?{}:n.palette,mode:t})})}function pa(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return Yi(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=Yi({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},ha(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},ha(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),da({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const fa=pa();function ma(){const e=bo(fa);return e[It]||e}const ga=function(e={}){const{themeId:t,defaultTheme:n=qo,rootShouldForwardProp:r=Io,slotShouldForwardProp:o=Io}=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!==ho))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=Oo(Ao(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",h=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,p=l||!1;let f=Io;"Root"===a||"root"===a?f=r:a?f=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:f,label:Do(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return _o(t,e,t.theme.modularCssLayers?d:void 0)};if(sr(e)){const t=Ro(e);return function(e){return t.variants?_o(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?To(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]=_o(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)})),n&&!h&&a.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Po(e,r,[],e.theme.modularCssLayers?"theme":void 0):null})),p||a.push(ho),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 s=[...r,...o,...a],l=m(...s);return e.muiName&&(l.muiName=e.muiName),l};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:It,defaultTheme:fa,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function ba({theme:e,...t}){const n=It in e?e[It]:void 0;return Kn.jsx(ui,{...t,themeId:n?It:void 0,theme:n||e})}const ya="mui-color-scheme",va="light",Sa="dark",wa="mui-mode",{CssVarsProvider:Ca}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=hi,colorSchemeStorageKey:i=pi,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=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={},h={},p="string"==typeof s?s:s.light,f="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:f=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:C=!1,defaultMode:x="system",noSsr:E}=t,k=e.useRef(!1),L=ei(),R=e.useContext(u),q=!!R&&!w,I=e.useMemo((()=>p||("function"==typeof r?r():r)),[p]),T=I[n],O=T||I,{colorSchemes:_=d,components:P=h,cssVarPrefix:D}=O,A=Object.keys(_).filter((e=>!!_[e])).join(","),M=e.useMemo((()=>A.split(",")),[A]),N="string"==typeof s?s:s.light,j="string"==typeof s?s:s.dark,z=_[N]&&_[j]?x:_[O.defaultColorScheme]?.palette?.mode||O.palette?.mode,{mode:F,setMode:$,systemMode:B,lightColorScheme:W,darkColorScheme:H,colorScheme:U,setColorScheme:G}=Si({supportedColorSchemes:M,defaultLightColorScheme:N,defaultDarkColorScheme:j,modeStorageKey:f,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let V=F,K=U;q&&(V=R.mode,K=R.colorScheme);const J=e.useMemo((()=>{const e=K||O.defaultColorScheme,t=O.generateThemeVars?.()||O.vars,n={...O,components:P,colorSchemes:_,cssVarPrefix:D,vars:t};if("function"==typeof n.generateSpacing&&(n.spacing=n.generateSpacing()),e){const t=_[e];t&&"object"==typeof t&&Object.keys(t).forEach((e=>{t[e]&&"object"==typeof t[e]?n[e]={...n[e],...t[e]}:n[e]=t[e]}))}return l?l(n):n}),[O,K,P,_,D]),Z=O.colorSchemeSelector;No((()=>{if(K&&S&&Z&&"media"!==Z){const e=Z;let t=Z;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...M.map((e=>t.substring(1).replace("%s",e)))),S.classList.add(t.substring(1).replace("%s",K));else{const e=t.replace("%s",K).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||M.forEach((e=>{S.removeAttribute(t.replace(K,e))})),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,K)}}}),[K,Z,S,M]),e.useEffect((()=>{let e;if(g&&k.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)}}),[K,g,v]),e.useEffect((()=>(k.current=!0,()=>{k.current=!1})),[]);const X=e.useMemo((()=>({allColorSchemes:M,colorScheme:K,darkColorScheme:H,lightColorScheme:W,mode:V,setColorScheme:G,setMode:$,systemMode:B})),[M,K,H,W,V,G,$,B,J.colorSchemeSelector]);let Q=!0;(C||!1===O.cssVariables||q&&L?.cssVarPrefix===D)&&(Q=!1);const Y=Kn.jsxs(e.Fragment,{children:[Kn.jsx(ui,{themeId:T?n:void 0,theme:J,children:c}),Q&&Kn.jsx(Yn,{styles:J.generateStyleSheets?.()||[]})]});return q?Y:Kn.jsx(u.Provider,{value:X,children:Y})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=hi,colorSchemeStorageKey:i=pi,attribute:a=fi,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return Kn.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",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:f,modeStorageKey:o,...e})}}({themeId:It,theme:()=>pa({cssVariables:!0}),colorSchemeStorageKey:ya,modeStorageKey:wa,defaultColorScheme:{light:va,dark:Sa},resolveTheme:e=>{const t={...e,typography:Wi(e.palette,e.typography)};return t.unstable_sx=function(e){return ho({sx:e,theme:this})},t}}),xa=Ca;function Ea({theme:t,...n}){const r=e.useMemo((()=>{if("function"==typeof t)return t;const e=It in t?t[It]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}}),[t]);return r?Kn.jsx(ba,{theme:r,...n}):Kn.jsx(xa,{theme:t,...n})}const ka=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(di.theme=r.theme,o=Ro(e(di)),t=o,n=r.theme),o}};function La(e){return ko("MuiSvgIcon",e)}Lo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ra=ga("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${vr(n.color)}`],t[`fontSize${vr(n.fontSize)}`]]}})(ka((({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}}]})))),qa=e.forwardRef((function(t,n){const r=si({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=r,f=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},g={};u||(g.viewBox=h);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="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${vr(t)}`,`fontSize${vr(n)}`]},La,r)})(m);return Kn.jsxs(Ra,{as:s,className:xo(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?Kn.jsx("title",{children:d}):null]})}));function Ia(){return Ia=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},Ia.apply(null,arguments)}function Ta(e,t){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ta(e,t)}function Oa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ta(e,t)}function _a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}qa.muiName="SvgIcon";const Pa=Lo("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 Da={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 Aa={green:"#00873D",blue:"#3F8AB3",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},Ma={mode:"light",palette:{primary:{main:Aa.grey25,contrastText:Aa.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Aa.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:Aa.grey100,dark:Aa.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:Aa.grey100,default:Aa.grey100,lightest:Aa.grey100,lighter:Aa.grey98,darker:Aa.grey95,darkest:Aa.grey90},custom:{focusBorder:Aa.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:Aa.grey45,disabledContrastText:Aa.grey100},selected:{main:Aa.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:Aa.grey100,selectedContrastText:Aa.grey100,mainContrastText:Aa.grey100,alternativeContrastText:Aa.grey25,excludedContrastText:Aa.grey25,selectedExcludedContrastText:Aa.grey100,possibleContrastText:Aa.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)"}}},Na={mode:"dark",palette:{primary:{main:Aa.grey20,contrastText:Aa.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Aa.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:Aa.grey100,dark:Aa.grey0},action:{active:Aa.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:Aa.grey25,lighter:Aa.grey20,darker:Aa.grey15,darkest:Aa.grey10},custom:{focusBorder:Aa.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:Aa.grey45,disabledContrastText:Aa.grey100},selected:{main:Aa.green,alternative:Aa.grey20,excluded:Aa.grey10,selectedExcluded:Aa.grey10,possible:Aa.grey80,selectedContrastText:Aa.grey100,mainContrastText:Aa.grey100,alternativeContrastText:Aa.grey100,excludedContrastText:Aa.grey100,selectedExcludedContrastText:Aa.grey100,possibleContrastText:Aa.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)"}}},ja={},za=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}}},MuiButton:{styleOverrides:{outlined:{padding:"3px 11px",["&.".concat(Pa.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(Pa.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(Pa.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(Pa.disabled)]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Fa(e){let t=Ma,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=Na));const r=JSON.stringify(t);if(ja[r])return ja[r];const o={palette:Q(Q({type:t.mode},Da.palette),t.palette),typography:Q({},Da.typography),shadows:Da.shadows,shape:Q({},Da.shape)},i=Q(Q({},o),{},{components:za(o)});return ja[r]=pa(i),ja[r].name=n,ja[r]}wo.configure((e=>"njs-".concat("0e56","-").concat(e.replace("Mui",""))));var $a=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Ba={active:!0,select:!0,passive:!0,edit:!1};function Wa(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(Ba).forEach((e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Ba[e],n[e]=!Ba[e])})),e.constraints=n,e.interactions=t}var Ha=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=[],i={},a={get:e=>t[e],set:(n,r)=>{if(void 0===n||"object"==typeof n)throw new Error("Invalid key: ".concat(JSON.stringify(n)));return t[n]=r,i[n]=e({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));t[e]=null},dispatch:e=>{o.forEach((n=>n(e?{}:t)))},destroy:()=>{Object.keys(i).forEach((e=>{i[e]&&i[e]()}))}};return[()=>{const[,e]=n(t);return r((()=>(o.push(e),()=>{const t=o.indexOf(e);o.splice(t,1)})),[e]),[a]},a]};const Ua=o(((e,o)=>{let{initialContext:s,renderCallback:l,modelStore:c,selectionStore:u}=e;const[d,h]=n(s),[p,f]=n(),{theme:m}=i((()=>({theme:Fa(p)})),[p]),[g,b]=n([]);return r((()=>{l&&l()}),[]),a(o,(()=>({setComps(e){b([...e])},setMuiThemeName:f,setContext:e=>h((t=>JSON.stringify(t)!==JSON.stringify(e)?e:t))})),[]),d&&(d.modelStore=c,d.selectionStore=u),t.createElement(Qn,{injectFirst:!0},t.createElement(Ea,{theme:m},t.createElement($a.Provider,{value:d},g)))}));function Ga(e){let n,{app:r,context:o}=e,i=!1;const a=new Promise((e=>{n=e})),s=t.createRef(),l=document.createElement("div");l.style.display="none",l.setAttribute("data-nebulajs-version","6.0.0"),l.setAttribute("data-app-id",r.id),document.body.appendChild(l),o&&Wa(o);const c=function(e){const[t,n]=Ha({}),[r,o]=Ha({}),[i,a]=Ha({}),[s,l]=Ha({}),[c,u]=Ha({}),[,d]=Ha({}),h=e=>{let{type:t,value:r}=e;const i=d.get(r.id);d.set(r.id,{});const s=()=>{o.clear(r.id),u.set(r.id,{}),u.dispatch(!0)},c=()=>{r.removeListener("closed",c),r.removeListener("changed",s),n.clear(r.id),o.clear(r.id),a.clear(r.id),l.clear(r.id),u.clear(r.id),d.clear(r.id)};return"SET"===t&&(i||(r.on("changed",s),r.once("closed",c))),c},[p,f]=Ha({},h);return{subscribe:e=>{const t=h({type:"SET",value:e});return()=>{t(),f.clear(e.id)}},destroy:()=>{f.destroy()},useModelStore:p,modelStore:f,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(r.id),u=function(e){const[t,n]=Ha({}),[r,o]=Ha({}),[i,a]=Ha({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(r.id),d=Rt.createRoot(l);d.render(t.createElement(Ua,{ref:s,initialContext:o,renderCallback:n,modelStore:c,selectionStore:u}));const h={},p=[],f=[];return[{toggleFocusOfCells(e){Object.keys(h).forEach((t=>{var n;null===(n=h[t].current)||void 0===n||n.toggleFocus(t===e)}))},cells:h,addCell(e,t){h[e]=t},removeCell(e){delete h[e]},add:(e,t)=>(async()=>{await a,f.push(e),p.push(t),s.current.setComps(f)})(),remove(e){i||(async t=>{await a;const n=f.indexOf(e);var r;-1!==n&&(null===(r=p[n])||void 0===r||r.call(p),f.splice(n,1),p.splice(n,1));null==s||null===(t=s.current)||void 0===t||t.setComps(f)})()},setMuiThemeName(e){(async()=>{await a,s.current.setMuiThemeName(e)})()},context(e){(async()=>{await a,e&&Wa(e),s.current.setContext(e)})()},destroy(){i=!0,p.forEach((e=>{e&&e()})),c.destroy(),d.unmount(),document.body.removeChild(l)}},c,u,s,a]}function Va(){const{useModelStore:e}=s($a).modelStore;return e()}function Ka(e,t){const o=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[i]=Va(),[a]=function(){const{useRpcRequestSessionModelStore:e}=s($a).modelStore;return e()}(),[l,c]=n();for(var u=arguments.length,d=new Array(u>2?u-2:0),h=2;h<u;h++)d[h-2]=arguments[h];return r((()=>{if(!t)return;(async()=>{let n=a.get(o);n||(n=t.createSessionObject(e),a.set(o,n));const r=await n;i.set(o,r),c(r)})()}),[t,...d]),[l]}const Ja={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Za(e){return Ka(Ja,e)}const Xa=e=>new Promise((t=>{setTimeout(t,e)})),Qa=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Q(Q({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Q({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Q(Q({},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 Ya(e,t){const n=e?"".concat(e.id):null,[o]=function(){const{useRpcResultStore:e}=s($a).modelStore;return e()}(),[i,a]=l(Qa,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=s($a).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=s($a).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const h=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 Xa(0);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),h(!0))}},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,h()}};return r((()=>{e&&h()}),[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 es(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ya(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 ts(e){return Ya(e,"getAppLayout")}function ns(){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]}function rs(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function os(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=Q({fontSize:rs(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},r);return t.createElement("i",{style:a},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},i.map(((e,n)=>{let{type:r,attrs:o}=e;return t.createElement(r,Z({key:n},o))}))))}var is=e=>os((e=>Q(Q({},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 as=e=>os((e=>Q(Q({},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 ss=e=>Q(Q({},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 ls=e=>os(ss(e));var cs=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}}(),us=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},ds=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=us(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},us(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d),cs(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var h=a[0]-1;if(t(h))break;a[0]=h}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}();const hs=["S","XS"],ps=e=>e.reduce(((e,t)=>e.concat(t)));function fs(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return n=t.qState,!!hs.includes(n)&&t.qElemNumber;var n}));return t.filter((e=>!1!==e))}));return ps(t)}async function ms(e){let{selections:t,elemNumbers:n,toggle:r,isSingleSelect:o}=e;if(0===n.length)return!1;let i=!1;if(!n.some((e=>Number.isNaN(e)))){const e=n;try{i=!1!==await t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,r]})}catch(e){i=!1}i||(o?t.cancel():t.clear())}return i}const gs="RowColumn",bs={row:"".concat(gs,"-row"),rowBorderBottom:"".concat(gs,"-rowBorderBottom"),column:"".concat(gs,"-column"),fieldRoot:"".concat(gs,"-fieldRoot"),cell:"".concat(gs,"-cell"),labelText:"".concat(gs,"-labelText"),labelDense:"".concat(gs,"-labelDense"),highlighted:"".concat(gs,"-highlighted"),checkboxLabel:"".concat(gs,"-checkboxLabel"),icon:"".concat(gs,"-icon"),S:"".concat(gs,"-S"),XS:"".concat(gs,"-XS"),A:"".concat(gs,"-A"),X:"".concat(gs,"-X"),frequencyCount:"".concat(gs,"-frequencyCount"),barContainer:"".concat(gs,"-barContainer"),bar:"".concat(gs,"-bar"),barSelected:"".concat(gs,"-barSelected"),barWithCheckbox:"".concat(gs,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(gs,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(gs,"-excludedTextWithCheckbox")},ys=".".concat(bs.fieldRoot),vs=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function Ss(e){var t;let{selectionState:n,selections:o,checkboxes:i=!1,doc:a=document,loaderRef:s}=e;const l=h({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r((()=>{var e;if(null===(e=s.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=s.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}}),[null===(t=s.current)||void 0===t||null===(t=t._listRef)||void 0===t?void 0:t._outerRef]);const u=async()=>{var e;return(null===(e=n.selectDisabled)||void 0===e||!e.call(n))&&(n.setSelectableValuesUpdating(),ms({selections:o,elemNumbers:l.current.elemNumbers,isSingleSelect:n.isSingleSelect,toggle:l.current.toggle}))},d=(e,t)=>{const r=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return ps(t)}(n.enginePages);return function(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}([e,t],r)},p=e=>{const{startElemNumber:t}=l.current;if(t===e)return;const r=d(l.current.startElemNumber,e);n.updateItems(r,!0,l.current.elemNumbers)},f=c((e=>{if(n.selectDisabled())return;const t=+e.target.getAttribute("data-n"),r=!n.isSingleSelect&&vs(e.nativeEvent);l.current.elemNumbers=[t],l.current.toggle=r,r||n.clearItemStates(!0),n.updateItem(t),l.current.active=!1,u()}),[]),m=c((e=>{if(0!==e.button||n.selectDisabled())return;const t=+e.currentTarget.getAttribute("data-n"),r=!n.isSingleSelect&&vs(e);l.current.isRange=!1,l.current.startElemNumber=t,l.current.elemNumbers=[t],l.current.toggle=r,l.current.active=!0,r||n.clearItemStates(!0),n.updateItem(t),n.isSingleSelect&&(l.current.active=!1,u()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(e,e.currentTarget)}),[]),g=c((e=>{if(0===e.button&&l.current.active){if(l.current.active=!1,l.current.isRange){const t=+e.currentTarget.getAttribute("data-n");p(t)}u()}}),[]),b=c((e=>{0===e.button&&l.current.active&&(l.current.active=!1,u())}),[]),y=c((e=>{if(!l.current.active)return;l.current.isRange||(l.current.isRange=!0,n.isSelected(l.current.startElemNumber)||(n.updateItem(l.current.startElemNumber,!0),l.current.elemNumbers=[]));const t=+e.currentTarget.getAttribute("data-n");p(t)}),[]),v=c((e=>{var t,r;if(l.current.active||l.current.isRange||n.isSingleSelect||e.touches.length<=1)return;if(e.touches.length>2)return void u();const o=Number(null===(t=e.touches[0].target)||void 0===t||null===(t=t.closest(ys))||void 0===t?void 0:t.getAttribute("data-n")),i=Number(null===(r=e.touches[1].target)||void 0===r||null===(r=r.closest(ys))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void u();l.current.active=!0;d(o,i).length<7&&(l.current.touchRangeSmall=!0),l.current.elemNumbers=[],l.current.touchElemNumbers=[o,i]}),[]),S=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,p(t),l.current.touchElemNumbers=[],l.current.active=!1,l.current.toggle=!0,u()}),[]);r((()=>(a.addEventListener("mouseup",b),()=>{a.removeEventListener("mouseup",b)})),[b]),r((()=>{const e=()=>{n.clearItemStates(!1)},t=()=>{n.clearItemStates(!0),n.triggerStateChanged()};return o.on("clearItemStates",e),o.on("deactivated",e),o.on("cleared",t),()=>{o.removeListener("clearItemStates",e),o.removeListener("deactivated",e),o.removeListener("cleared",t)}}),[o]);const w={};return i?Object.assign(w,{onChange:f}):Object.assign(w,{onMouseUp:g,onMouseDown:m,onMouseEnter:y,onTouchStart:v,onTouchEnd:S}),{interactionEvents:w,select:async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(null!==(e=n.selectDisabled)&&void 0!==e&&e.call(n))return!1;const a=!n.isSingleSelect&&vs(null==i?void 0:i.nativeEvent);a||n.clearItemStates(!0);const s=[];return n.updateItems(t,r,s),n.setSelectableValuesUpdating(),ms({selections:o,elemNumbers:r?s:t,isSingleSelect:n.isSingleSelect,toggle:a})}}}const ws=e=>Q(Q({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var Cs=e=>os(ws(e));const xs=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,Es=e=>{let{cell:t,checkboxes:n}=e;return((e=>e?"A"===e.qState:null)(t)||xs(t))&&n};const ks=e=>{let{column:t,histogram:n,cell:r,showGray:o}=e;if(!r)return[];const i=[t?bs.column:bs.row];n||i.push(bs.rowBorderBottom);const a=function(e){let t,{cell:n,showGray:r}=e;switch(n.qState){case"XS":t=r?bs.XS:bs.S;break;case"S":case"L":t=bs.S;break;case"A":t=!!r&&bs.A;break;case"X":case"XL":t=!!r&&bs.X;break;default:t=!1}return t}({cell:r,showGray:o});return a&&i.push(a),i},Ls=9,Rs=4,qs=7,Is=12+2*(qs+1),Ts=80,Os=10,_s=150,Ps=56,Ds=20,As="-",Ms=32,Ns=29,js=20,zs=4,Fs=e=>e.filter((e=>!!e)).join(" ").trim(),$s=e=>{let{qFrequency:t,frequencyMax:n}=e;const r=String(t),o="%"===r.substring(r.length-1),i=parseFloat(o?r:t);return"".concat(o?i:i/n*100,"%")},Bs=e=>e||As,Ws=["backgroundColor"],Hs=e=>{let{sizes:t,frequencyMode:n,isGridMode:r,freqHitsValue:o}=e;if("P"===n)return"".concat(t.freqMinWidth,"px");return r&&!o?"max-content":"25%"},Us=e=>{let{sizes:t,frequencyMode:n,isGridMode:r}=e;return r?"max-content":"P"===n?t.freqMinWidth:t.freqMaxWidth},Gs=e=>{let{theme:t,checkboxes:n,styles:r,selectionState:o}=e;if(n)return"selected"===o?{["& .".concat(bs.labelText)]:{color:r.selections.selected}}:{};const i=r.selections,a=i[o],s=i["".concat(o,"Contrast")];return{background:a,color:s,"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder),outline:"none"},"& $cell":{paddingRight:0},["& .".concat(bs.labelText)]:{color:s},["& .".concat(bs.icon)]:{color:s}}},Vs={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Ks=ga("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})((e=>{let{theme:t,checkboxes:n,isGridMode:r,isGridCol:o,dense:i,direction:a,sizes:s,frequencyMode:l,freqHitsValue:c,styles:u}=e;const d=u.content,{backgroundColor:h}=d,p=Y(d,Ws),f=Gs({theme:t,styles:u,checkboxes:n,selectionState:"selected"}),m=Gs({theme:t,styles:u,checkboxes:n,selectionState:"excluded"}),g={height:"100%",transition:"width 0.2s",border:"".concat(1,"px solid"),borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},b={opacity:"30%"};return{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"},"& .value":{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(bs.row)]:Q({flexWrap:"nowrap"},u.content),["& .".concat(bs.rowBorderBottom)]:{borderBottom:o?"none":"1px solid ".concat(t.palette.divider),borderLeft:o?"1px solid ".concat(t.palette.divider):"none"},["& .".concat(bs.column)]:Q({flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider)},u.content),["& .".concat(bs.cell)]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:n?"52px":"26px",flexBasis:n?"auto":"max-content",paddingLeft:"".concat(Ls,"px"),paddingRight:0},["& .".concat(bs.labelText)]:Q(Q({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Vs),p),["& .".concat(bs.labelDense)]:{lineHeight:"18px"},["& .".concat(bs.highlighted)]:{backgroundColor:"#FFC72A"},["& .".concat(bs.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Q(Q({},Vs),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(bs.icon)]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:p.color},["& .".concat(bs.S)]:Q(Q({},f),{},{border:r?"none":void 0}),["& .".concat(bs.XS)]:Q(Q({},Gs({theme:t,styles:u,checkboxes:n,selectionState:"selectedExcluded"})),{},{border:r?"none":void 0}),["& .".concat(bs.A)]:Q(Q({},Gs({theme:t,styles:u,checkboxes:n,selectionState:"alternative"})),{},{border:r?"none":void 0}),["& .".concat(bs.X)]:Q(Q({},m),{},{border:r?"none":void 0}),["& .".concat(bs.X,", & .").concat(bs.XS)]:{border:r?"none":void 0,["& .".concat(bs.barSelected," .bar-filled")]:Q({},g)},["& .".concat(bs.frequencyCount)]:Q(Q({zIndex:3,justifyContent:"flex-end"},Vs),{},{flex:"0 0 ".concat(Hs({sizes:s,frequencyMode:l,isGridMode:r,freqHitsValue:c})),minWidth:!r&&"P"!==l&&c?s.freqMinWidth:"max-content",maxWidth:Us({sizes:s,frequencyMode:l,isGridMode:r}),textAlign:"rtl"===a?"left":"right",paddingLeft:"rtl"!==a?"8px":0}),["&.".concat(bs.barContainer)]:{height:"100%",display:"flex",alignItems:"center"},["& .".concat(bs.bar)]:{height:i?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - ".concat(8,"px)"),display:"flex",alignItems:"center","& .bar-filled":Q({},g)},["& .".concat(bs.barSelected)]:{"& .bar-filled":Q({},b)},["& .".concat(bs.barWithCheckbox)]:{left:"rtl"===a?4:29,width:"calc(100% - ".concat(33,"px)")},["& .".concat(bs.barSelectedWithCheckbox)]:{"& .bar-filled":Q(Q({},b),{},{backgroundColor:u.selections.selected||"#BFE5D0",borderColor:u.selections.selected})},["& .".concat(bs.excludedTextWithCheckbox)]:{color:u.content.color,fontStyle:"italic"}}}));var Js=t.memo(Ks);const Zs="ListBoxCheckbox",Xs={cbIcon:"".concat(Zs,"-cbIcon"),cbIconChecked:"".concat(Zs,"-cbIconChecked"),cbIconExcluded:"".concat(Zs,"-cbIconExcluded"),cbIconAlternative:"".concat(Zs,"-cbIconAlternative"),checkbox:"".concat(Zs,"-checkbox"),dense:"".concat(Zs,"-dense")},Qs=ga(S,{shouldForwardProp:e=>"styles"!==e})((e=>{let{styles:t}=e;return{["& .".concat(Xs.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(Xs.cbIconChecked)]:{borderRadius:3,backgroundColor:t.selections.selected,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(Xs.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.excluded},["& .".concat(Xs.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.selections.alternative},["&.".concat(Xs.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(Xs.dense)]:{padding:"4px 8px"}}})),Ys=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.createElement("span",{className:e.cbIcon},r&&t.createElement("span",{className:n&&r?e.cbIconExcluded:""}))};function el(e){let{onChange:n,checked:r,label:o,dense:i,excluded:a,styles:s,showGray:l=!0,dataN:c}=e;return t.createElement(Qs,{edge:"start",onChange:n,checked:r,disableRipple:!0,className:[Xs.checkbox,i&&Xs.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":o,"data-n":c},name:o,icon:Ys(Xs,l,a),checkedIcon:t.createElement("span",{className:Xs.cbIconChecked}),styles:s})}const tl={radioButton:"".concat("ListBoxRadioButton","-radioButton")},nl=ga(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})((e=>{let{checked:t,styles:n,dense:r}=e;return{["&.".concat(tl.radioButton)]:{right:"5px",color:t?n.selections.selected:n.content.color,padding:r?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}}));function rl(e){let{onChange:n,checked:r,label:o,dense:i,dataN:a,styles:s}=e;return t.createElement(nl,{checked:r,onChange:n,value:o,name:o,className:tl.radioButton,inputProps:{"data-n":a},disableRipple:!0,size:i?"small":"medium",dense:i,styles:s})}function ol(e){let{label:n,dense:r,showGray:o=!0,checkboxes:i,cell:a,valueTextAlign:s}=e;return t.createElement(C,{component:"span",variant:"body2",className:Fs([bs.labelText,r&&bs.labelDense,o&&Es({cell:a,checkboxes:i})&&bs.excludedTextWithCheckbox]),align:s,dir:"auto"},t.createElement("span",null,n))}function il(e){let{label:n,color:r,dense:o,showGray:i,checkboxes:a,cell:s,valueTextAlign:l}=e;return"string"==typeof n?t.createElement(ol,{label:n,color:r,dense:o,showGray:i,checkboxes:a,cell:s,valueTextAlign:l}):n}function al(e){let{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}=e;const f=t.createElement(el,{onChange:n,label:r,checked:i,dense:a,excluded:xs(s),isGridCol:l,showGray:c,dataN:o,styles:p}),m=t.createElement(rl,{onChange:n,label:r,checked:i,dense:a,dataN:o,styles:p});return t.createElement(x,{control:u?m:f,className:bs.checkboxLabel,label:t.createElement(il,{label:r,dense:a,showGray:c,checkboxes:d,cell:s,valueTextAlign:h}),key:o})}function sl(e){let{labels:n,dense:r,showGray:o,checkboxes:i}=e;const a=n.map(((e,n)=>{let[r,o]=e;return t.createElement("span",{id:n,className:o?bs.highlighted:""},r)}));return t.createElement(ol,{label:a,dense:r,showGray:o,checkboxes:i})}function ll(e){let{onChange:n,labels:r,checkboxes:o,dense:i,showGray:a,qElemNumber:s,isSelected:l,cell:c,isGridCol:u,isSingleSelect:d,valueTextAlign:h,styles:p}=e;const f=t.createElement(sl,{labels:r,dense:i,showGray:a,checkboxes:o});return o?t.createElement(al,{onChange:n,label:f,qElemNumber:s,isSelected:l,dense:i,cell:c,isGridCol:u,showGray:a,isSingleSelect:d,checkboxes:o,valueTextAlign:h,styles:p}):f}var cl=t.memo((function(e){let{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}=e;return d?t.createElement(al,{onChange:n,label:r,qElemNumber:o,isSelected:i,dense:a,cell:s,isGridCol:l,showGray:c,isSingleSelect:u,checkboxes:d,valueTextAlign:h,styles:p}):t.createElement(ol,{label:r,dense:a,showGray:!0,checkboxes:d,cell:s,valueTextAlign:h})}));function ul(e){let{qFrequency:n,histogram:r,checkboxes:o,isSelected:i,frequencyMax:a}=e;if(!(n&&r&&Bs(n)!==As))return;const s=$s({qFrequency:n,frequencyMax:a});return t.createElement(E,{className:Fs([bs.bar,o&&bs.barWithCheckbox,i&&(o?bs.barSelectedWithCheckbox:bs.barSelected)])},t.createElement(E,{className:"bar-filled",width:s}))}function dl(e){let{cell:n,checkboxes:r,dense:o,showGray:i}=e;const a=Bs(null==n?void 0:n.qFrequency);return t.createElement(k,{item:!0,style:{display:"flex",alignItems:"center"},className:bs.frequencyCount,"aria-label":a,title:a},t.createElement(C,{noWrap:!0,color:"inherit",variant:"body2",className:Fs([o&&bs.labelDense,bs.labelText,i&&Es({cell:n,checkboxes:r})&&bs.excludedTextWithCheckbox])},a))}function hl(e){let{dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:o}=e;if("singleColumn"===t)return{height:"100%",width:"100%"};switch(n){case"row":case"column":return{height:o?"100%":"calc(100% - ".concat(r,"px)"),width:"calc(100% - ".concat(2*r,"px)"),position:"absolute",left:4};default:return{}}}const pl=ga(k,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})((e=>{let{dataLayout:t,layoutOrder:n,itemPadding:r,cellPaddingRight:o,direction:i,fillHeight:a}=e;const s="padding".concat("rtl"===i?"Left":"Right");return{["&.".concat(bs.fieldRoot)]:Q(Q({},hl({dataLayout:t,layoutOrder:n,itemPadding:r,fillHeight:a})),{},{[s]:o?"8px":void 0})}}));const fl=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===fl.ARROW_UP||e===fl.ARROW_DOWN||e===fl.ARROW_LEFT||e===fl.ARROW_RIGHT});function ml(e){null==e||e.querySelectorAll(".last-focused").forEach((e=>{e.classList.remove("last-focused")}))}function gl(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 bl(e){let{containerRef:t,enabled:r}=e;const[o,i]=n(!1),a={enabled:r,active:o,innerTabStops:!r||o,blur(e){var n;if(!r)return;i(!1);const o=gl(t.current)||(null===(n=t.current)||void 0===n?void 0:n.parentElement);var a;null==(a=t.current)||a.querySelectorAll('[tabIndex="0"]').forEach((e=>{e.setAttribute("tabIndex",-1)})),ml(t.current),e&&o&&(o.setAttribute("tabIndex",0),t.current.setAttribute("tabIndex",-1),o.focus())},focus(){if(!r)return;i(!0);const e=t.current,n=null==e?void 0:e.querySelector(".search input"),o=null==e?void 0:e.querySelector(".value.last-focused"),a=null==e?void 0:e.querySelector(".value.selector, .value"),s=null==e?void 0:e.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==e?void 0:e.querySelector("#listbox-unlock-button"),c=(null==e?void 0:e.querySelector(".listbox-cyclic-button"))||n||o||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return a}const yl=e=>+e.getAttribute("data-n"),vl=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Sl=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(),ml(e),o},wl=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},Cl=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=gl(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{ml(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}},xl=e=>{let{rowIndex:t,columnIndex:n,rowCount:r,columnCount:o,layoutOrder:i,keyCode:a,numCells:s}=e;const l=e=>{let t;return"row"===i?(t=s%o,e<t?r:r-1):(t=s%r,e<o-1?r:t)};let c=t,u=n;if(a===fl.ARROW_DOWN)if(t>=l(n)-1){if(n===o-1)return-1;c=0,u=n+1}else c=t+1;else if(0===t){if(0===n)return-1;c=l(n-1)-1,u=n-1}else c=t-1;if("row"===i)return c*o+u;const d=s%r;return 0===d||c<d?c*o+u:(c-d)*(o-1)+u+d*o};const El={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 kl(e){var o,a;let{index:s,rowIndex:l,columnIndex:u,style:d,data:h}=e;const{onChange:p,onClick:f,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onTouchStart:y,onTouchEnd:v,pages:S,isLocked:w,column:C=!1,checkboxes:x=!1,textAlign:E,direction:L,layoutOptions:R={},freqIsAllowed:q,isSingleSelect:I,actions:T,frequencyMax:O="",histogram:_=!1,keyboard:P,showGray:D=!0,showTick:A=!0,columnCount:M=1,rowCount:N=1,dataOffset:j,deducedFrequencyMode:z,focusListItems:F,listCount:$,sizes:B,translator:W,showSearch:H,isModal:U,contentFontStyle:G,styles:V,fillHeight:K}=h,{dense:J=!1,dataLayout:Z="singleColumn",layoutOrder:X}=R,{itemPadding:Y}=B;let ee,te;const ne={max:null,currentIndex:null};if("number"==typeof l&&"number"==typeof u){"row"===X?(ee=l*M+u,ne.max=N,ne.currentIndex=l):(ee=u*N+l,ne.max=M,ne.currentIndex=u);const e=0;te=Q(Q({},d),{},{height:K?"100%":d.height,left:e+(0===u?d.left:Number(d.left)+u*e),top:0===l?d.top:Number(d.top)+l*e})}else ee=s,ne.max=$,ne.currentIndex=s,te=Q({},d);ee+=j;const[re,oe]=n(null);r((()=>{null!==re&&(0===ne.currentIndex&&F.first&&(re.focus(),F.setFirst(!1)),ne.currentIndex===ne.max-1&&F.last&&(re.focus(),F.setLast(!1)))}),[re,F.first,F.last]);const ie=c(function(e){let{select:t,selectAll:n,onCtrlF:r,confirm:o,cancel:i,setScrollPosition:a,focusListItems:s,keyboard:l,isModal:c,rowCount:u,columnCount:d,rowIndex:h,columnIndex:p,layoutOrder:f}=e;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e===fl.ARROW_LEFT||e===fl.ARROW_RIGHT||"number"!=typeof h||"number"!=typeof p){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=xl({rowIndex:h,columnIndex:p,rowCount:u,columnCount:d,layoutOrder:f,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let g=!1;const b=e=>{g=e};return e=>{let u;const{currentTarget:d,nativeEvent:h}=e,{keyCode:p,shiftKey:f=!1,ctrlKey:y=!1,metaKey:v=!1}=h;switch(p){case fl.TAB:{const t=d.closest(".listbox-container"),n=void 0!==c?c():void 0;if(d.classList.add("last-focused"),null==l||!l.enabled){if(!n)return;return l.focusSelection(),e.preventDefault(),void e.stopPropagation()}if(f){vl(t)||wl(t)||(n?l.focusSelection():Cl(e,l));break}l.focusSelection()||wl(t)||vl(t)||(d.blur(),Cl(e,l));break}case fl.SHIFT:b(!0);break;case fl.SPACE:t([yl(d)],!1,e);break;case fl.ARROW_DOWN:case fl.ARROW_RIGHT:u=m(p,d,!0),f&&u&&(g&&(t([yl(d)],!0),b(!1)),t([yl(u)],!0));break;case fl.ARROW_UP:case fl.ARROW_LEFT:u=m(p,d,!1),f&&u&&(g&&(t([yl(d)],!0),b(!1)),t([yl(u)],!0));break;case fl.ENTER:if(o(),void 0===c)return;break;case fl.ESCAPE:if(void 0===c)return void i();if(!c())return;i();break;case fl.HOME:if(s.setFirst(!0),y){null==a||a("overflowStart");break}null==a||a("start");break;case fl.END:if(s.setLast(!0),y){null==a||a("overflowEnd");break}null==a||a("end");break;case fl.A:if(y||v){n();break}return;case fl.F:if(y||v){r();break}return;default:return}u&&u.focus(),e.preventDefault(),e.stopPropagation()}}(Q(Q({},T),{},{focusListItems:F,keyboard:P,isModal:U,rowCount:N,columnCount:M,rowIndex:l,columnIndex:u,layoutOrder:X})),[T,null==P?void 0:P.innerTabStops,N,M,l,u,X]),ae=i((()=>function(e){let t,{pages:n,cellIndex:r}=e;const o=n.filter((e=>e.qArea.qTop<=r&&r<e.qArea.qTop+e.qArea.qHeight))[0];if(o){const e=o.qArea;r>=e.qTop&&r<e.qTop+e.qHeight&&([t]=o.qMatrix[r-e.qTop])}return t}({pages:S,cellIndex:ee})),[S,ee]),se="S"===(null==ae?void 0:ae.qState)||"XS"===(null==ae?void 0:ae.qState)||"L"===(null==ae?void 0:ae.qState)||"XL"===(null==ae?void 0:ae.qState),le=i((()=>ks({column:C,histogram:_,cell:ae,showGray:D})),[null==ae?void 0:ae.qState,_,J]),ce=c((e=>{e.preventDefault()}),[x]),ue=i((()=>ae&&function(e){let{direction:t,cell:n,textAlign:r}=e;const o=!["NaN",void 0].includes(null==n?void 0:n.qNum);let i;return i=!r||r.auto?o?"rtl"===t?"left":"right":{rtl:"right",ltr:"left"}[t]:(null==r?void 0:r.align)||"left",["left","center","right"].includes(i)?i:"left"}({direction:L,cell:ae,textAlign:E})),[L,ae,E]);if(!ae)return null;const de="grid"===Z&&"column"===X,he=null!==(o=null==ae?void 0:ae.qText)&&void 0!==o?o:"";let pe;if(null!==(a=ae.qHighlightRanges)&&void 0!==a&&null!==(a=a.qRanges)&&void 0!==a&&a.length){const e=ae.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[];pe=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(he,e)}const fe={alignItems:"center",display:"flex",fontSize:"8px"},me="rtl"===L,ge={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:me?8:x?0:void 0,paddingRight:x?0:me?8:0,justifyContent:ue,textAlign:ue},be=0===s,ye=se&&w,ve=!x&&se&&!w,Se=!x&&A,we=x||!A,Ce=function(e){let{translator:t,label:n,qState:r,isSelected:o,currentIndex:i,maxIndex:a,showSearch:s}=e;const l=El[r],c=t.get(l),u=[];if(o){const e=s?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=t.get(e);u.push(n)}const d="".concat(n," ").concat(c),h=t.get("CurrentSelections.Of",[i+1,a+1]);return u.unshift(d,h),u.join(". ").trim()}({translator:W,label:he,qState:ae.qState,currentIndex:ne.currentIndex,maxIndex:ne.max,showSearch:H}),xe=!me&&"right"===ue||me&&"left"===ue;return t.createElement(Js,{className:bs.barContainer,checkboxes:x,style:te,styles:V,isGridCol:de,isGridMode:"grid"===Z,dense:J,direction:L,sizes:B,frequencyMode:z,freqHitsValue:xe,contentFontStyle:G,"data-testid":"listbox.item"},t.createElement(pl,{role:"row","aria-label":Ce,"aria-selected":se,"aria-setsize":ne.max,"aria-rowindex":ne.currentIndex,ref:oe,container:!0,dataLayout:Z,cellPaddingRight:we,layoutOrder:X,itemPadding:Y,gap:0,className:Fs(["value",...le]),classes:{root:bs.fieldRoot},onClick:f,onMouseDown:m,onMouseUp:g,onMouseEnter:b,onKeyDown:ie,onTouchStart:y,onTouchEnd:v,onContextMenu:ce,tabIndex:be&&P.innerTabStops?0:-1,"data-n":null==ae?void 0:ae.qElemNumber,direction:L,fillHeight:K},(null==ae?void 0:ae.qFrequency)&&t.createElement(ul,{qFrequency:null==ae?void 0:ae.qFrequency,histogram:_,checkboxes:x,isSelected:se,frequencyMax:O}),t.createElement(k,{item:!0,style:ge,className:Fs([bs.cell,bs.selectedCell]),title:"".concat(he)},pe?t.createElement(ll,{onChange:p,labels:pe,checkboxes:x,dense:J,showGray:D,qElemNumber:ae.qElemNumber,isSelected:se,cell:ae,isGridCol:de,isSingleSelect:I,valueTextAlign:ue,styles:V}):t.createElement(cl,{onChange:p,label:he,qElemNumber:ae.qElemNumber,isSelected:se,dense:J,cell:ae,isGridCol:de,showGray:D,isSingleSelect:I,checkboxes:x,valueTextAlign:ue,styles:V})),q&&t.createElement(dl,{cell:ae,checkboxes:x,dense:J,showGray:D}),Se&&t.createElement(k,{item:!0,className:bs.icon},ye&&t.createElement(as,{style:fe,size:"small"}),ve&&t.createElement(Cs,{style:fe,size:"small"}))))}var Ll=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Rl(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Ll(r)&&Ll(o)))return!1;var r,o;return!0}function ql(e,t){var n;void 0===t&&(t=Rl);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var Il="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Tl(e){cancelAnimationFrame(e.id)}function Ol(e,t){var n=Il();var r={id:requestAnimationFrame((function o(){Il()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var _l=-1;function Pl(e){if(void 0===e&&(e=!1),-1===_l||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),_l=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return _l}var Dl=null;function Al(e){if(void 0===e&&(e=!1),null===Dl||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?Dl="positive-descending":(t.scrollLeft=1,Dl=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Dl}return Dl}var Ml=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Nl(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,h=e.getRowOffset,f=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,_a(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:_a(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=ql((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=ql((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,d=r._getItemStyleCache(b&&s,b&&l,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;d[p]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:h(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=ql((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Al()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Tl(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ol(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Oa(t,e),t.getDerivedStateFromProps=function(e,t){return jl(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,h=i.rowCount,p=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,b=Pl();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,h-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},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(Al()){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&&Tl(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,h=e.itemKey,f=void 0===h?Ml:h,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,C=this._getHorizontalRangeToRender(),x=C[0],E=C[1],k=this._getVerticalRangeToRender(),L=k[0],R=k[1],q=[];if(r>0&&b)for(var I=L;I<=R;I++)for(var T=x;T<=E;T++)q.push(p(t,{columnIndex:T,data:d,isScrolling:v?w:void 0,key:f({columnIndex:T,data:d,rowIndex:I}),rowIndex:I,style:this._getItemStyle(I,T)}));var O=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Ia({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:q,ref:l,style:{height:O,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],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],h=u[1],p=u[2],f=u[3];this._callOnItemsRendered(a,s,d,h,l,c,p,f)}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,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,h=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),f=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,h),g=u&&"forward"!==c?1:Math.max(1,h);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,f+g)),p,f]},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,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),h=m(this.props,d,c,this._instanceProps),p=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var jl=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},zl=function(e,t){return e};function Fl(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,_a(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:_a(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=ql((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=ql((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),h=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,f="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:p?0:d,height:p?"100%":h,width:p?h:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=ql((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(Al()){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&&Tl(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Ol(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Oa(t,e),t.getDerivedStateFromProps=function(e,t){return $l(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?Pl():0:l.scrollHeight>l.clientHeight?Pl():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(Al()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Tl(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,h=void 0===d?zl:d,f=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"===f,C=w?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),E=x[0],k=x[1],L=[];if(c>0)for(var R=E;R<=k;R++)L.push(p(t,{data:u,key:h(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var q=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:C,ref:this._outerRefSetter,style:Ia({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(s||l||"div",{children:L,ref:a,style:{height:w?"100%":q,pointerEvents:S?"none":void 0,width:w?q:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),h=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+h)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var $l=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Bl=Nl({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return h<Math.ceil(l/2)?0:h>c+Math.floor(l/2)?c:h;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return h<Math.ceil(s/2)?0:h>c+Math.floor(s/2)?c:h;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Wl=Fl({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,h="horizontal"===a||"horizontal"===u?d:s,p=Math.max(0,l*c-h),f=Math.min(p,t*c),m=Math.max(0,t*c-h+c+i);switch("smart"===n&&(n=r>=m-h&&r<=f+h?"auto":"center"),n){case"start":return f;case"end":return m;case"center":var g=Math.round(m+(f-m)/2);return g<Math.ceil(h/2)?0:g>p+Math.floor(h/2)?p:g;default:return r>=m&&r<=f?r:r<m?m:f}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Hl="#BBB",Ul="#f1f1f1",Gl={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const Vl=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex,Kl=(e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex,Jl=(e,t,n,r)=>e===t*n+r+n;function Zl(e){let{renderProps:t,layoutOptions:n,maxCount:r,columnCount:o,rowCount:i,overflowDisclaimer:a,qCardinal:s,dataOffset:l}=e;const c="column"===(null==n?void 0:n.layoutOrder)&&"singleColumn"!==n.dataLayout,u=Vl(t,c),d=c?r.column:r.row,h=(c?o:i)>=d,p=Jl(s,u,c?i:o,l),f=!!l&&Kl(t,c),m=h&&!p&&u>=d-1||f||a.state.show;a.set(m)}const{StyledFixedSizeList:Xl,StyledFixedSizeGrid:Ql}=function(){const e=e=>({scrollbarColor:"".concat(Hl," ").concat(Ul),overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ul},"&::-webkit-scrollbar-thumb":{backgroundColor:Hl,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(Wl,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Gl.styledScrollbars)]:e(n)}})),StyledFixedSizeGrid:v(Bl,{shouldForwardProp:e=>"scrollDisabled"!==e})((t=>{let{scrollDisabled:n}=t;return{["&.".concat(Gl.styledScrollbars)]:e(n)}}))}}();const Yl=(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)},ec=e=>{const t=i((()=>"text"in e?e:{}),[e]);return i((()=>Yl(t.text,t.font||"12px Source Sans Pro")),[t.text,t.font])};function tc(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function nc(e){let{isGridMode:t,dense:n}=e;let r=n?js:t?Ms:Ns;return t&&(r+=zs),r}function rc(e){let{layout:t,width:n,height:r,listCount:o,count:i,freqIsAllowed:a,checkboxes:s,styles:l}=e;const{layoutOptions:c={}}=t||{},{layoutOrder:u,maxVisibleRows:d={},maxVisibleColumns:h,dense:p,dataLayout:f}=c,{fontSize:m="12px",fontFamily:g="Source sans pro"}=(null==l?void 0:l.content)||{},b="".concat(m," ").concat(g),y=ec({text:tc(t),font:b}),v=ec({text:tc(5),font:b}),S=ec({text:tc(8),font:b}),w=a?v:0,C=s?Ds:0;let x=Ps+w+C;!s&&x>=Ts&&(x+=Ds);let E,k,L,R,q=y+18+w+C;!s&&q>=Ts&&(q+=Ds),q=Math.min(_s,Math.max(q,x));const I=nc({isGridMode:"grid"===f,dense:p}),T=null!=r?r:8*I;if(u){let e=n;"row"===u?(E={overflowX:"hidden"},e+=2*zs,({rowCount:R,columnWidth:L,columnCount:k}=function(e){let{maxVisibleColumns:t,listCount:n,containerWidth:r,columnAutoWidth:o,itemMinWidth:i}=e;const a=(null==t?void 0:t.maxColumns)||3,s=r-Os;let l;const c=Math.min(n,Math.max(1,Math.round(s/Math.max(i,o))));l=!1!==(null==t?void 0:t.auto)?c:Math.min(n,a,c),l=Math.max(l,1);const u=s/l;return{rowCount:Math.ceil(n/l),columnWidth:u,columnCount:l}}({maxVisibleColumns:h,listCount:o,containerWidth:e,columnAutoWidth:q,itemMinWidth:x}))):(E={overflowY:"hidden"},({rowCount:R,columnWidth:L,columnCount:k}=function(e){let t,{maxVisibleRows:n,itemHeight:r,listCount:o,listHeight:i,columnAutoWidth:a,containerWidth:s,itemMinWidth:l}=e;const c=(null==n?void 0:n.maxRows)||3,u=Math.floor(i/r);t=!1!==n.auto?u:Math.min(o,c,u),t=Math.max(t,1);const d=Math.ceil(o/t);return{columnWidth:Math.max(a,s/d,l),columnCount:d,rowCount:t}}({maxVisibleRows:d,itemHeight:I,listCount:o,listHeight:T,columnAutoWidth:q,containerWidth:e,itemMinWidth:x})))}k=("singleColumn"===f?1:k)||1,R=("singleColumn"===f?i:R)||o;const O=c.dense?838e3:577e3;R=Math.min(R,O);const _=Math.floor(3355e4/L);k=Math.min(k,_)||1;const P=R*k,D=Math.min(o,P);return{columnCount:k,columnWidth:L,rowCount:R,overflowStyling:E,itemHeight:I,listHeight:T,listWidth:n,scrollBarWidth:Os,count:i,listCount:D,maxCount:{row:O,column:_},itemPadding:zs,textWidth:y,freqMinWidth:v,freqMaxWidth:S}}const oc=e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r};const[ic]=Ha({});function ac(e){const t="".concat(e.id),[n]=ic();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}const sc=ga(C,{shouldForwardProp:e=>!["width","dense"].includes(e)})((e=>{let{width:t,dense:n}=e;return Q({minWidth:"".concat(t,"px"),textAlign:"center",fontSize:"".concat(n?"12px":"14px"),whiteSpace:"normal"},n&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:t})}));function lc(e){let{width:n,text:r,dense:o,tooltip:i}=e;const{translator:a}=s($a);return t.createElement(L,{title:i?a.get(r):""},t.createElement(sc,{width:n,dense:o,component:"div",variant:"body1",py:"12px"},a.get(r)))}var cc=function(t,n){function r(e,r){return Kn.jsx(qa,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return r.muiName=qa.muiName,e.memo(e.forwardRef(r))}(Kn.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const uc=ga(R)((e=>{let{theme:t,left:n}=e;return{position:"absolute",bottom:"12px",display:"flex",border:"1px solid ".concat(t.palette.divider),width:"calc(100% - 11px)",left:n}})),dc=ga("div")((()=>({paddingLeft:"6px",flexGrow:1}))),hc=ga("div")((e=>{let{dense:t}=e;return{display:"flex",alignItems:"".concat(t?"center":"flex-start")}})),pc=ga(cc)((()=>({fontSize:"14px"})));function fc(e){let{text:n,dismiss:r,dense:o,parentWidth:i=0}=e;const a="function"==typeof r,s=o?370:282,l=Math.max(i/2-s/2,0),c=Math.min(s,i)-42,u=o&&i<s;return t.createElement(uc,{left:l,style:{maxWidth:s}},t.createElement(dc,null,t.createElement(lc,{text:n,dense:o,width:c,tooltip:u})),t.createElement(hc,{dense:o},a&&t.createElement(q,{"aria-label":"close",onClick:()=>r()},t.createElement(pc,null))))}const mc=(e,t)=>e.qListObject.qDimensionInfo.qCardinal-t;const gc=80;function bc(e){let{itemWidth:t,layout:n,frequencyMode:r}=e;const o=t>gc,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["N",void 0].includes(r);return!(!o||!a&&!i)}const yc=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:"[".concat(e.replace(/\]/g,"]]"),"]"):e,vc=e=>{const t=yc(e);return"Max(AGGR(Count(".concat(t,"), ").concat(t,"))")},Sc=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[s,l]=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=vc(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),l(!1)})()}),[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:s}};const wc=["isLoadingData"],Cc=100,xc=I("div")((()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}})));function Ec(e){var o,i;let{model:a,app:l,constraints:u,layout:d,selections:p,selectionState:f,direction:m,checkboxes:g,height:b,width:y,frequencyMode:v,update:S,fetchStart:w,postProcessPages:C,calculatePagesHeight:x=!1,keyboard:E={},showGray:k=!0,scrollState:L,keyScroll:R={state:{},reset:()=>{}},currentScrollIndex:q={set:()=>{}},renderedCallback:I,onCtrlF:T,showSearch:O,isModal:_,styles:P}=e;const{translator:D}=s($a),[A,M]=n(!1),N=!(!d||!d.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:j=g,histogram:z}=null!=d?d:{},F=h(null),$=h({queue:[],validPages:!1,dataOffset:0}),B=h({pages:[]}),{frequencyMax:W,awaitingFrequencyMax:H}=Sc(l,d),U=function(e){let{local:t,loaderRef:r,model:o,fetchStart:i,scrollTimeout:a,postProcessPages:s,listData:l}=e;const[c,u]=n(!1),[d,h]=n([]);let[p]=n(0);const f=(e,n)=>{const c=t.current.dataOffset;t.current.queue.push({start:e+c,stop:n+c});const d=!!r.current&&r.current._listRef&&r.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),u(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],r=o.getListObjectData("/qListObjectDef",[{qTop:n.start>p?n.start-p:0,qHeight:p,qLeft:0,qWidth:1},{qTop:n.start,qHeight:p,qLeft:0,qWidth:1}]).then((n=>{const r=s?s(n):n;t.current.validPages=!0,l.current.pages=r,h(r),u(!1),e()}));i&&i(r)}),d?a:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(p=t),f}},pages:d,isLoading:c}}({local:$,loaderRef:F,model:a,fetchStart:w,scrollTimeout:0,postProcessPages:C,listData:B}),{isLoadingData:G}=U,V=Y(U,wc),{getStoreValue:K,setStoreValue:J}=ac(a),X=c(V.loadMoreItems,[d]),[ee,te]=n({show:!1,dismissed:!1}),[ne,re]=n([]);null!=V&&V.pages&&f.update({setPages:re,pages:V.pages,isSingleSelect:N,layout:d});const oe=null==d?void 0:d.qListObject.qDimensionInfo.qCardinal;(null!=V&&V.pages.length&&!H||0===oe)&&(null==I||I());const ie=c((e=>{if(null==ne||!ne.length||!$.current.validPages)return!1;$.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=ne.filter((e=>t(e)))[0];return n&&t(n)}),[d,ne]),{interactionEvents:ae,select:se}=Ss({selectionState:f,selections:p,checkboxes:j,doc:document,loaderRef:F}),{layoutOptions:le={}}=d||{};let ce=!0;le.dataLayout&&(ce="singleColumn"===le.dataLayout||"row"===(null==le?void 0:le.layoutOrder));const ue="grid"===(null==le?void 0:le.dataLayout),de=e=>{const t=Q({},ce?{rowIndex:e}:{columnIndex:e}),n=ue?t:e;F.current._listRef.scrollToItem(n)},he=()=>{if($.current.queue=[],$.current.validPages=!1,F.current){F.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===R.state.scrollPosition;if(d&&d.qSelectionInfo.qInSelections||e)return void(e&&R.reset());$.current.dataOffset=0,de(0)}};S&&S.call(null,he),r((()=>{L&&!A&&F.current&&(F.current._listRef.scrollToItem(L.initScrollPos),M(!0))}),[F.current]),r((()=>{he()}),[d,$.current.dataOffset]);let pe=Cc;const fe="grid"!==le.dataLayout,me=null==d||null===(o=d.qListObject.qSize)||void 0===o?void 0:o.qcy,ge=function(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;return(null!=t&&t.length&&o?oc({pages:t,minimumBatchSize:n,count:r}):r)||0}({pages:ne,minimumBatchSize:pe,count:me,calculatePagesHeight:x});let be=bc({itemWidth:y,layout:d,frequencyMode:v});const ye=function(e){return e.some((e=>{let{qMatrix:t}=e;return t.some((e=>{var t;let[n]=e;return!(null===(t=n.qFrequency)||void 0===t||!t.match("%"))}))}))?"P":"-"}(ne),ve=rc({layout:d,width:y,height:b,listCount:ge,count:me,freqIsAllowed:be,checkboxes:j,styles:P});ve.columnWidth&&(be=bc({itemWidth:ve.columnWidth,layout:d,frequencyMode:v}));const{listCount:Se}=ve;J("listCount",Se);const we=K("inputText"),Ce=function(e){let{layout:t,searchInputText:n,listCount:r}=e;const{translator:o}=s($a),i=[];if(null!=n&&n.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(r),t=o.get(e,[r]);i.push(t)}const a=function(e){var t;let{layout:n,translatorDynamic:r}=e;const{qStateCounts:o={}}=(null==n||null===(t=n.qListObject)||void 0===t?void 0:t.qDimensionInfo)||{},i=o.qSelected+o.qSelectedExcluded+o.qLocked+o.qLockedExcluded;let a;switch(i){case 0:a="ScreenReader.ZeroSelected";break;case 1:a="ScreenReader.OneSelected";break;default:a="ScreenReader.ManySelected"}return r.get(a,[i])}({layout:t,translatorDynamic:o});i.push(a);const l=i.filter((e=>!(null==e||!e.length))).join(". ");return l}({layout:d,searchInputText:we,listCount:Se}),xe=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function(e){let t,{position:n,isRow:r,sizes:o,layout:i,offset:a}=e,s=!1,l=null!=a?a:0;switch(n){case"start":t=0;break;case"end":t=r?o.rowCount:o.columnCount;break;case"overflowStart":l=0,t=0,s=!0;break;case"overflowEnd":l=mc(i,o.listCount),t=i.qListObject.qDimensionInfo.qCardinal,s=!0}return{scrollIndex:t,offset:l,triggerRerender:s}}({position:e,isRow:ce,sizes:ve,layout:d,offset:$.current.dataOffset});$.current.dataOffset=n,r&&f.triggerStateChanged(),de(t)};r((()=>{const e=R.state;e.up?de(q.state.start-e.up):e.down?de(q.state.stop+e.down):e.scrollPosition&&xe(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&R.reset()}),[R.state.up,R.state.down,R.state.scrollPosition]);const{textAlign:Ee}=(null==d?void 0:d.qListObject.qDimensionInfo)||{},[ke,Le]=n({first:!1,last:!1}),{List:Re,Grid:qe}=function(e){let{layout:n,width:r,checkboxes:o,local:i,isVertical:a,pages:s,selectionState:l,interactionEvents:c,deducedFrequencyMode:u,histogram:d,isSingleSelect:h,select:p,selectAll:f,onCtrlF:m,textAlign:g,selections:b,keyboard:y,showGray:v,scrollState:S,direction:w,sizes:C,listCount:x,overflowDisclaimer:E,setScrollPosition:k,focusListItems:L,setCurrentScrollIndex:R,constraints:q,frequencyMax:I,freqIsAllowed:T,translator:O,showSearch:_,isModal:P,styles:D}=e;const{layoutOptions:A={}}=n||{},{columnWidth:M,listHeight:N,itemHeight:j,rowCount:z,columnCount:F}=C||{},$=("grid"===A.dataLayout?M:r)>Ts,B={direction:"rtl"===w?"rtl":"ltr",useIsScrolling:!0,className:Gl.styledScrollbars},W=null==n?void 0:n.qListObject.qDimensionInfo.qLocked,H=N<=j,U=Q(Q({isLocked:W,column:!a,pages:s},W||l.selectDisabled()?{}:c),{},{checkboxes:o,layoutOptions:A,deducedFrequencyMode:u,freqIsAllowed:T,isSingleSelect:h,textAlign:g,sizes:C,actions:{select:p,confirm:()=>null==b?void 0:b.confirm.call(b),cancel:()=>null==b?void 0:b.cancel.call(b),setScrollPosition:k,selectAll:f,onCtrlF:m},frequencyMax:I,histogram:d,keyboard:y,showGray:v,showTick:$,dataOffset:i.current.dataOffset,focusListItems:L,direction:w,translator:O,showSearch:_,isModal:P,styles:D,fillHeight:H});return{List:e=>{let{onItemsRendered:o,ref:a}=e;return i.current.listRef=a,t.createElement(Xl,Z({},B,{dataTestid:"fixed-size-list",scrollDisabled:null==q?void 0:q.active,height:N,width:r,itemCount:x,itemData:Q(Q({},U),{},{listCount:x}),itemSize:j,onItemsRendered:e=>{var t;R({start:e.visibleStartIndex,stop:e.visibleStopIndex}),S&&S.setScrollPos(e.visibleStopIndex),Zl({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:F,rowCount:z,overflowDisclaimer:E,qCardinal:null==n||null===(t=n.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qCardinal,dataOffset:i.current.dataOffset}),o(Q({},e))},ref:a}),kl)},Grid:e=>{let{onItemsRendered:o,ref:a}=e;const{overflowStyling:s,scrollBarWidth:l}=C,{layoutOrder:c}=A||{},u=Math.min(N,z*j+l);return i.current.listRef=a,t.createElement(Ql,Z({},B,{dataTestid:"fixed-size-grid",scrollDisabled:null==q?void 0:q.active,height:u,width:r,columnCount:F,columnWidth:M,rowCount:z,rowHeight:j,style:Q({},s),itemData:Q(Q({},U),{},{column:void 0,columnCount:F,rowCount:z}),onItemsRendered:e=>{var t;const r="row"===c;R({start:r?e.visibleRowStartIndex:e.visibleColumnStartIndex,stop:r?e.visibleRowStopIndex:e.visibleColumnStopIndex});const a=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,h,p,f;return n&&n.setScrollPos(u),"column"===r?(d=l*o,h=a,p=c*o,f=s):(d=l,h=a*i,p=c,f=s*i),{visibleStartIndex:d+h,visibleStopIndex:p+f}}({renderProps:e,scrollState:S,layoutOrder:c,rowCount:z,columnCount:F});Zl({renderProps:e,layoutOptions:A,maxCount:C.maxCount,columnCount:F,rowCount:z,overflowDisclaimer:E,qCardinal:null==n||null===(t=n.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qCardinal,dataOffset:i.current.dataOffset}),o(a)},ref:a}),kl)}}}({direction:m,layout:d,width:y,checkboxes:j,deducedFrequencyMode:ye,histogram:z,keyboard:E,showGray:k,interactionEvents:ae,select:se,selectAll:()=>{f.clearItemStates(!1),a.selectListObjectAll("/qListObjectDef")},onCtrlF:T,textAlign:Ee,isVertical:fe,pages:ne,selectionState:f,isSingleSelect:N,selections:p,scrollState:L,local:$,sizes:ve,listCount:Se,overflowDisclaimer:{state:ee,set:e=>te((t=>Q(Q({},t),{},{show:e})))},setScrollPosition:xe,focusListItems:{first:ke.first,setFirst:e=>Le((t=>Q(Q({},t),{},{first:e}))),last:ke.last,setLast:e=>Le((t=>Q(Q({},t),{},{last:e})))},setCurrentScrollIndex:q.set,constraints:u,frequencyMax:W,freqIsAllowed:be,translator:D,showSearch:O,isModal:_,styles:P}),{columnWidth:Ie,listHeight:Te,itemHeight:Oe}=ve||{};return fe||(pe=function(e){let{width:t,columnWidth:n,listHeight:r,itemHeight:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:y,columnWidth:Ie,listHeight:Te,itemHeight:Oe})),t.createElement(xc,null,t.createElement("div",{className:"screenReaderOnly","aria-live":"assertive"},Ce),!Se&&oe>0&&t.createElement(lc,{width:y,text:"Listbox.NoMatchesForYourTerms"}),t.createElement(ds,{isItemLoaded:ie,itemCount:Se||1,loadMoreItems:X.with({minimumBatchSize:pe}),threshold:0,minimumBatchSize:pe,ref:F,role:"grid"},fe?Re:qe),ee.show&&!ee.dismissed&&t.createElement(fc,{text:"Listbox.ItemsOverflow",dismiss:()=>te((e=>Q(Q({},e),{},{dismissed:!0}))),parentWidth:null==F||null===(i=F.current)||void 0===i||null===(i=i._listRef)||void 0===i||null===(i=i.props)||void 0===i?void 0:i.width,dense:null==le?void 0:le.dense}))}const kc=e=>Q(Q({},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"}}]}),Lc=e=>Q(Q({},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"}}]}),Rc=e=>Q(Q({},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"}}]}),qc=e=>Q(Q({},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 Ic=e=>{let{layout:t,model:n,translator:r,selectionState:o,isDirectQuery:i=!1,selections:a}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const s="/qListObjectDef",l=()=>{a.isActive()||a.begin(s)};return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:kc,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAll(s)}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:Rc,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectPossible(s)}},!i&&{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:Lc,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectAlternative(s)}},!i&&{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:qc,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{l(),o.clearItemStates(!1),n.selectListObjectExcluded(s)}}].filter(Boolean)};const Tc=e=>Q(Q({},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 Oc(e){const t=ma(),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 _c={className:"njs-cell-action"},Pc=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,item:o,addAnchor:i=!1}=e;const a=ma(),{hidden:s,disabled:l,style:c,hasSvgIconShape:u}=Oc(o);if(s)return null;const d=Number.parseInt(a.spacing(.5),10),h=o.keyboardAction||o.action,p=h?e=>["Enter"].includes(e.key)&&h():null,f=h?e=>[" ","Spacebar"].includes(e.key)&&h():null,m="actions-toolbar-".concat(o.key);return t.createElement(q,{ref:i?null:n,title:o.label,onClick:o.action,onKeyDown:p,onKeyUp:f,disabled:l,style:c,className:[_c.className,m].join(" "),size:"large",disableRipple:!0,"aria-label":o.label,"aria-expanded":r,"aria-controls":"moreMenuList","data-testid":m},u&&os(o.getSvgIconShape()),i&&t.createElement("div",{ref:n,style:{bottom:-d,right:0,position:"absolute",width:"100%",height:0}}))})),Dc=e=>Q(Q({},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 Ac=e=>os(Dc(e));const Mc=e=>Q(Q({},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 Nc=e=>os(Mc(e));const jc="njs-action-toolbar-more",zc={icon:"".concat("More","-icon")},Fc=ga(T)((e=>{let{theme:t}=e;return{pointerEvents:"none",["& .".concat(zc.icon," *")]:{color:t.palette.text.primary}}}));function $c(e){let{item:n,autoFocus:r,onActionClick:o=(()=>{})}=e;const{hidden:i,disabled:a,hasSvgIconShape:s}=Oc(n);return i?null:t.createElement(_,{autoFocus:r,title:n.label,onClick:()=>{n.action(),o()},disabled:a,tabindex:"0"},s&&t.createElement(P,{className:zc.icon},os(n.getSvgIconShape())),t.createElement(C,{noWrap:!0},n.label))}const Bc=t.forwardRef(((e,n)=>{let{actions:r=[],show:o=!0,alignTo:i,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:l=(()=>{}),disablePortal:c=!0}=e;const u=r.length>0,d=r.findIndex((e=>!e.disabled));return u&&t.createElement(Fc,Z({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:c?null:void 0,container:c?i.current:void 0,disablePortal:c,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:jc},paper:{style:Q({pointerEvents:"auto",maxWidth:"250px"},s)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}),t.createElement(O,{id:"moreMenuList"},r.map(((e,n)=>t.createElement($c,{key:n,item:e,autoFocus:n===d,onActionClick:l})))))})),Wc=e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)},Hc=e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()};const Uc="ActionsToolbar",Gc={item:"".concat(Uc,"-item"),itemSpacing:"".concat(Uc,"-itemSpacing")},Vc=ga(T)((e=>{let{theme:t}=e;return{["& .".concat(Gc.itemSpacing)]:{padding:t.spacing(0,.25)}}})),Kc={className:"njs-action-toolbar-popover"},Jc=t.forwardRef(((e,n)=>{let{className:r,ariaExpanded:o=!1,actions:i=[],addAnchor:a=!1,isRtl:s=!1}=e;return i.length>0?t.createElement(k,{item:!0,container:!0,gap:0,flexDirection:s?"row-reverse":"row",wrap:"nowrap",className:r},i.map(((e,r)=>t.createElement(k,{item:!0,key:e.key,className:"".concat(Gc.itemSpacing," ").concat(Gc.item)},t.createElement(Pc,{ariaExpanded:o,key:e.key,item:e,ref:0===r?n:null,addAnchor:a}))))):null})),Zc={pointerEvents:"none"};function Xc(e){var o,a;let{show:l=!0,actions:c=[],maxItems:u=3,selections:d={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:p,more:f={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:m={show:!1,anchorEl:null},focusHandler:g=null,actionsRefMock:b=null,isRtl:y,autoConfirm:v=!1,layout:S}=e;const w=function(e){let{api:t,layout:n,onConfirm:r=(()=>{}),onCancel:o=(()=>{}),onKeyDeactivate:i=(()=>{})}=e;const{translator:a}=s($a);return[{key:"clear",type:"icon-button",label:a.get("Selection.Clear"),enabled:()=>t.canClear(n),action:()=>t.clear(),getSvgIconShape:Mc},{key:"cancel",type:"icon-button",label:a.get("Selection.Cancel"),enabled:()=>t.canCancel(n),action:()=>{o(),t.cancel()},keyboardAction:()=>{i(),o(),t.cancel()},getSvgIconShape:Dc},{key:"confirm",type:"icon-button",label:a.get("Selection.Confirm"),enabled:()=>t.canConfirm(n),action:()=>{r(),t.confirm()},keyboardAction:()=>{i(),r(),t.confirm()},getSvgIconShape:ws}]}(Q(Q({},d),{},{layout:S})),{translator:C,keyboardNavigation:x}=s($a),[E,L]=n(!1),R={vertical:12,horizontal:y?0:(null!==(o=null===(a=m.anchorEl)||void 0===a?void 0:a.clientWidth)&&void 0!==o?o:0)-7},q={vertical:"bottom",horizontal:y?-7:"right"},I=h(),T=h(),O=ma(),_=i((()=>({margin:O.spacing(.5,0)}))),P=e=>{const t=I.current||b;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},A=i((()=>function(e){let{keyboardNavigation:t,focusHandler:n,getEnabledButton:r,selections:o,isRtl:i}=e;return e=>{const{target:a,nativeEvent:s}=e,{keyCode:l}=s;switch(l){case fl.ARROW_LEFT:case fl.ARROW_DOWN:case fl.ARROW_RIGHT:case fl.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=Wc(a);let t=[fl.ARROW_LEFT,fl.ARROW_DOWN].includes(l);t=i?!t:t,Hc(t?e-1:e+1)}e.stopPropagation(),e.preventDefault();break;case fl.SPACE:e.preventDefault();break;case fl.TAB:t&&null!=n&&n.refocusContent&&(e.shiftKey&&r(!1)===e.target||!e.shiftKey&&r(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),n.refocusContent());break;case fl.ESCAPE:o&&(o.onCancel(),o.api.cancel(),e.preventDefault(),e.stopPropagation())}}}({keyboardNavigation:x,focusHandler:g,getEnabledButton:P,selections:d,isRtl:y})),[x,g,P,d,y]);if(r((()=>()=>{L(!1)}),[m.show,l,d.show]),r((()=>{if(!g)return;g.on("focus_toolbar_first",(()=>{const e=P(!1);null==e||e.focus()})),g.on("focus_toolbar_last",(()=>{const e=P(!0);null==e||e.focus()}))}),[]),v)return;let M=f.enabled,N=f.actions;const j=f.alignTo||T,z=c.filter((e=>!e.hidden));if(z.length>u){const e=z.splice(-(z.length-u)-1);M=!0,N=[...e,...f.actions]}if(!d.show&&0===z.length&&!M)return null;const F={key:"more",label:C.get("Menu.More"),getSvgIconShape:Tc,hidden:!1,active:E,enabled:()=>M,action:()=>L(!E)},$=z.length>0,B=N.length>0,W=$&&d.show||B&&d.show,H=t.createElement(k,{ref:I,onKeyDown:A,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:y?"row-reverse":"row"}},(null==p?void 0:p.length)&&t.createElement(Jc,{className:"actions-toolbar-extra-actions",actions:p,isRtl:y}),$&&t.createElement(Jc,{actions:z}),B&&t.createElement(Jc,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,ariaExpanded:E,actions:[F],addAnchor:!0}),W&&t.createElement(k,{item:!0,className:Gc.itemSpacing,style:_},t.createElement(D,{orientation:"vertical"})),d.show&&t.createElement(Jc,{className:"actions-toolbar-default-actions",actions:w,isRtl:y}),E&&t.createElement(Bc,{show:E,actions:N,alignTo:j,popoverProps:f.popoverProps,popoverPaperStyle:f.popoverPaperStyle,onCloseOrActionClick:()=>{L(!1)},disablePortal:f.disablePortal}));return m.show?t.createElement(Vc,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:m.show,anchorEl:m.anchorEl,anchorOrigin:R,transformOrigin:q,hideBackdrop:!0,style:Zc,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:Kc.className,style:{pointerEvents:"auto",padding:O.spacing(.5,.25)}}}},H):l&&H}var Qc=e=>os((e=>Q(Q({},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 Yc="/qListObjectDef",eu=e=>null==e?void 0:e.substring(0,64e3),tu=ga(A,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})((e=>{let{styles:t,dense:n,isRtl:r}=e,o={};return n&&(o={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:t.search.color,textAlign:r?"right":"left"}}),Q({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:t.search.backgroundColor,backdropFilter:t.background.backgroundImage?t.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:r?"row-reverse":"row","& fieldset":{borderColor:"".concat(t.search.borderColor),borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:"".concat(t.search.highlightBorderColor," !important")},"& .MuiInputBase-root":Q({},t.search),"& *":{color:t.search.color},"& input":{color:t.search.color,textAlign:r?"right":"left"}},o)})),nu=ga(q)((()=>({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 ru=o((function(e,o){let{popoverOpen:i,selections:l,selectionState:c,model:u,keyboard:d,dense:p=!1,visible:f=!0,autoFocus:m=!0,beginSelectionOnFocus:g=!0,wildCardSearch:b=!1,searchEnabled:y,direction:v,hide:S,styles:w}=e;const{translator:C}=s($a),[x,E]=n(""),[k,L]=n(!1),R=h(),q=h(),I=C.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:O}=ac(u),_="rtl"===v,P=async()=>{try{await u.abortListObjectSearch(Yc)}finally{E("")}};r((()=>f?()=>P():()=>{}),[f]),r((()=>(l.on("deactivated",P),()=>{l.removeListener&&l.removeListener("deactivated",P)})),[]),r((()=>{if(k&&R.current){const e=x.length-1;R.current.setSelectionRange(e,e),L(!1)}}),[k,R.current]),r((()=>{O("inputText",x)}),[x]);const D=async()=>{let e;const t=eu(x),n=await u.searchListObjectFor(Yc,t);return c.selectDisabled()?n:(n&&t.length&&T("listCount")>0&&(e=u.acceptListObjectSearch(Yc,!0),l.selectionsMade=!0,c.clearItemStates(!1),E("")),e)},A=()=>{var e;null===(e=R.current)||void 0===e||e.focus()},N=()=>{P(),A()};return a(o,(()=>({focus(){A()}}))),f&&!1!==y?t.createElement(tu,{styles:w,dense:p,isRtl:_,startAdornment:t.createElement(M,{position:"start",sx:{marginLeft:p?"8px":"".concat(Ls,"px")}},t.createElement(Qc,{size:p?"small":"normal"})),endAdornment:t.createElement(M,{position:"end",sx:{marginLeft:0}},""!==x&&t.createElement(nu,{tabIndex:0,ref:q,title:I,"aria-label":I,onClick:N,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":N();break;case"Tab":e.shiftKey?A():Sl(t);break;default:return}e.preventDefault(),e.stopPropagation()}},t.createElement(Ac,{size:p?"small":"normal"}))),className:"search",inputRef:R,size:"small",fullWidth:!0,placeholder:C.get("Listbox.Search"),value:x,onFocus:()=>{b&&(E("**"),L(!0)),g&&!c.selectDisabled()&&!l.isModal()&&l.begin("/qListObjectDef")},onChange:async e=>{const t=eu(e.target.value);return E(t),t.length?u.searchListObjectFor(Yc,t):P()},onKeyDown:async e=>{const{currentTarget:t}=e,n=t.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Escape":if(Sl(n),l.cancel(),i)return;break;case"Tab":e.shiftKey?wl(n)||d.focusSelection():q.current?q.current.focus():Sl(n);break;case"f":case"F":if(!e.ctrlKey&&!e.metaKey)return;S&&(S(),Sl(n));break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:m,inputProps:{tabIndex:d.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":C.get("Listbox.Search.ScreenReaderInstructions")}}):null}));function ou(e){if(!e.session)return[];const{selectionStore:t}=s($a),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r((()=>{e&&!i&&(i=function(e){let{app:t,selectionStore:n}=e;const r="".concat(t.id),{modalObjectStore:o,appModalStore:i}=n,a=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{model:t,objectSelections:n}=o.get(r)||{};t&&(await t.endSelections(e),o.clear(r),n.emit("deactivated"))},s={begin:async e=>{var n;let{model:i,paths:s,accept:l=!0,objectSelections:c}=e;if(c===(null===(n=o.get(r))||void 0===n?void 0:n.objectSelections))return;a(l),o.set(r,{model:i,objectSelections:c});const u=Array.isArray(s)?s:[s],d=async e=>{try{await i.beginSelections(u),o.set(r,{model:i,objectSelections:c})}catch(n){6003!==n.code||e?o.clear(r):(await t.abortModal(l),d(!0))}};await d()},end:a};i.set(r,s);const l={model:t,isInModal:()=>!!o.get(r),isModal(e){var t;return e?(null===(t=o.get(r))||void 0===t?void 0:t.objectSelections)===e:!!o.get(r)},forward:()=>s.end().then((()=>t.forward())),back:()=>s.end().then((()=>t.back())),clear:()=>s.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return s.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return l}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))}),[e]),[i]}function iu(e){return Object.keys(le.prototype).forEach((t=>{e[t]=le.prototype[t]})),le.init(e),e}const au=e=>{let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin({model:o,paths:e,accept:!0,objectSelections:s}))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo)||!t.qListObject.qDimensionInfo.qLocked,isActive:()=>i,isModal:()=>n.isModal(s),goModal:e=>r.begin({model:o,paths:e,accept:!1,objectSelections:s}),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return iu(s),s},su=e=>{let{elements:t,objectSelections:n,options:r={}}=e;const o=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){var e;document.addEventListener("mousedown",o),null==r||null===(e=r.onSelectionActivated)||void 0===e||e.call(r)},deactivateClickOut(){var e;document.removeEventListener("mousedown",o),null==r||null===(e=r.onSelectionDeactivated)||void 0===e||e.call(r)}}};function lu(e,t,o,i){const a=Array.isArray(o)?o:[o],[l]=ou(e),[c]=es(t),{appModalStore:u}=s($a).selectionStore,d=u.get(e.id),[h,p]=n();return r((()=>{l&&t&&!h&&p(au({appSelections:l,appModal:d,model:t}))}),[l,t]),r((()=>{if(!h)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=su({elements:a,objectSelections:h,options:i});return h.addListener("activated",e),h.addListener("deactivated",t),()=>{h.isActive()&&h.confirm(),h.removeListener("activated",e),h.removeListener("deactivated",t)}}),[h]),r((()=>{h&&h.setLayout(c)}),[h,c]),[h]}function cu(){const e=Q(Q({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{update(t){var n,r;let{setPages:o,pages:i,isSingleSelect:a,selectDisabled:s,layout:l}=t;this.setPages=o;const c=this.lastRowCount===l.qListObject.qSize.qcy,u=this.lastApprMaxGlyphCount===l.qListObject.qDimensionInfo.qApprMaxGlyphCount;c&&u||(this.lastRowCount=l.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=l.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),e.enginePages!==i&&void 0!==i&&(e.enginePages=null!=i?i:[],e.selectedInEngine=fs(i),e.selectableValuesUpdating=!1,e.triggerStateChanged()),e.isSingleSelect=a,e.selectDisabled=s||e.selectDisabled,e.isDimCalculated=null!==(n=null==l||null===(r=l.qListObject)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r?void 0:r.qIsCalculated)&&void 0!==n&&n},allowedToSelect:()=>!e.selectDisabled()&&!(e.isDimCalculated&&e.selectableValuesUpdating),setSelectableValuesUpdating(){e.selectableValuesUpdating=!0},useClientItemState:t=>e.ignoreSelectionState||t in e.itemStates,isSelected:t=>e.useClientItemState(t)?!!e.itemStates[t]:e.selectedInEngine.includes(t),getState(t){const{qElemNumber:n,qState:r}=t;return e.useClientItemState(n)?e.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(t,n,r){const o=e.isSelected(t);o&&!n?e.itemStates[t]=!1:o||(null==r||r.push(t),e.itemStates[t]=!0)},triggerStateChanged(){if(this.setPages){const t=e.applySelectionsOnPages(e.enginePages);this.setPages(t)}},applySelectionsOnPages(t){const n=t.map((t=>{const n=t.qMatrix.map((t=>{const[n]=t,r=e.getState(n);return[Q(Q({},n),{},{qState:r}),...t.slice(1)]}));return Q(Q({},t),{},{qMatrix:n})}));return n},updateItem(t,n,r){e.updateItemNoEvents(t,n,r),e.triggerStateChanged()},updateItems(t,n,r){t.forEach((t=>{e.updateItemNoEvents(t,n,r)})),e.triggerStateChanged()},clearItemStates(t){e.itemStates={},e.ignoreSelectionState=t}});return e}const uu=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function du(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return uu(t,"qSelected",0)+uu(t,"qSelectedExcluded",0)+uu(t,"qLocked",0)+uu(t,"qLockedExcluded",0)>0}function hu(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 pu(e){if("object"==typeof e&&hu(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 fu={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function mu(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(hu(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-.5*l;n=d[0]+h,r=d[1]+h,o=d[2]+h,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-.5*l;n=d[0]+h,r=d[1]+h,o=d[2]+h,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const h=a-l;n=d[0]+h,r=d[1]+h,o=d[2]+h,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 fu}(e)){const t=fu[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 gu(e){let t,n,r;if(hu(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?pu(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 bu(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function yu(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function vu(e){if(hu(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?pu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Su(e,t){return hu(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Su(mu(e))}function wu(e){return hu(e)?1===e.a?vu(e):Su(e):wu(mu(e))}const Cu=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function xu(e){return.2126*Cu(e.r)+.7152*Cu(e.g)+.0722*Cu(e.b)}function Eu(...e){const t=mu(...e);return t.invalid||xu(t)<.4}function ku(...e){const t=mu(...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=bu(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=mu(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:()=>Eu(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=vu(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Su(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=wu(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=gu(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?mu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=bu(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}=yu(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=yu(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)=>ku(o(18*e)),getDarkenedColor:(e=1)=>ku(o(18*-e))}}function Lu(e,t){if(!e||!t)return;const n=xu(e),r=xu(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function Ru(e,t){const n=ku("#FFFFFF"),r=ku(e),o=ku(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=Lu(n,r),a=Lu(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}function qu(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 Iu,Tu,Ou,_u="top",Pu="top-right",Du="right",Au="bottom-right",Mu="bottom",Nu="bottom-left",ju="left",zu="top-left";qu(qu(qu(qu(qu(qu(qu(qu(qu(qu(Iu={},"equal-equal",[_u,Mu]),"equal-higher",[Mu,Au]),"equal-lower",[_u,Pu]),"equal-void",[_u,Mu]),"higher-equal",[ju,Nu,_u,Pu]),"higher-higher-acute",[Mu,Nu,ju,Pu]),"higher-higher-obtuse",[Mu,_u]),"higher-lower-negative",[_u,Pu,Du]),"higher-lower-positive",[Mu,Nu,ju]),"higher-void",[_u]),qu(qu(qu(qu(qu(qu(qu(qu(qu(qu(Iu,"lower-equal",[_u]),"lower-higher-negative",[_u,zu]),"lower-higher-positive",[Au]),"lower-lower-acute",[_u,zu,ju,Pu,Du]),"lower-lower-obtuse",[_u,Mu]),"lower-void",[_u]),"void-equal",[_u]),"void-higher",[_u,Mu]),"void-lower",[_u,Mu,ju]),"void-void",[_u]),qu(Iu,"unclassified",[_u,Mu,Du,ju,Pu,Au,Nu,zu]);var Fu=function(){if(Ou)return Tu;Ou=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Tu=function e(){var t,n,r,l,c,u,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(f&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(f,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},Tu}();function $u(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Bu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wu(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(Fu);var Hu=1/.7,Uu="\\s*([+-]?\\d+)\\s*",Gu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ku=/^#([0-9a-f]{3,8})$/,Ju=new RegExp(`^rgb\\(${Uu},${Uu},${Uu}\\)$`),Zu=new RegExp(`^rgb\\(${Vu},${Vu},${Vu}\\)$`),Xu=new RegExp(`^rgba\\(${Uu},${Uu},${Uu},${Gu}\\)$`),Qu=new RegExp(`^rgba\\(${Vu},${Vu},${Vu},${Gu}\\)$`),Yu=new RegExp(`^hsl\\(${Gu},${Vu},${Vu}\\)$`),ed=new RegExp(`^hsla\\(${Gu},${Vu},${Vu},${Gu}\\)$`),td={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 nd(){return this.rgb().formatHex()}function rd(){return this.rgb().formatRgb()}function od(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ku.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?id(t):3===n?new cd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ad(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ad(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=Ju.exec(e))?new cd(t[1],t[2],t[3],1):(t=Zu.exec(e))?new cd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xu.exec(e))?ad(t[1],t[2],t[3],t[4]):(t=Qu.exec(e))?ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Yu.exec(e))?md(t[1],t[2]/100,t[3]/100,1):(t=ed.exec(e))?md(t[1],t[2]/100,t[3]/100,t[4]):td.hasOwnProperty(e)?id(td[e]):"transparent"===e?new cd(NaN,NaN,NaN,0):null}function id(e){return new cd(e>>16&255,e>>8&255,255&e,1)}function ad(e,t,n,r){return r<=0&&(e=t=n=NaN),new cd(e,t,n,r)}function sd(e){return e instanceof Wu||(e=od(e)),e?new cd((e=e.rgb()).r,e.g,e.b,e.opacity):new cd}function ld(e,t,n,r){return 1===arguments.length?sd(e):new cd(e,t,n,null==r?1:r)}function cd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ud(){return`#${fd(this.r)}${fd(this.g)}${fd(this.b)}`}function dd(){const e=hd(this.opacity);return`${1===e?"rgb(":"rgba("}${pd(this.r)}, ${pd(this.g)}, ${pd(this.b)}${1===e?")":`, ${e})`}`}function hd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fd(e){return((e=pd(e))<16?"0":"")+e.toString(16)}function md(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bd(e,t,n,r)}function gd(e){if(e instanceof bd)return new bd(e.h,e.s,e.l,e.opacity);if(e instanceof Wu||(e=od(e)),!e)return new bd;if(e instanceof bd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new bd(a,s,l,e.opacity)}function bd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yd(e){return(e=(e||0)%360)<0?e+360:e}function vd(e){return Math.max(0,Math.min(1,e||0))}function Sd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$u(Wu,od,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nd,formatHex:nd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gd(this).formatHsl()},formatRgb:rd,toString:rd}),$u(cd,ld,Bu(Wu,{brighter(e){return e=null==e?Hu:Math.pow(Hu,e),new cd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new cd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cd(pd(this.r),pd(this.g),pd(this.b),hd(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:ud,formatHex:ud,formatHex8:function(){return`#${fd(this.r)}${fd(this.g)}${fd(this.b)}${fd(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dd,toString:dd})),$u(bd,(function(e,t,n,r){return 1===arguments.length?gd(e):new bd(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return e=null==e?Hu:Math.pow(Hu,e),new bd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new bd(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 cd(Sd(e>=240?e-240:e+120,o,r),Sd(e,o,r),Sd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new bd(yd(this.h),vd(this.s),vd(this.l),hd(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=hd(this.opacity);return`${1===e?"hsl(":"hsla("}${yd(this.h)}, ${100*vd(this.s)}%, ${100*vd(this.l)}%${1===e?")":`, ${e})`}`}}));const wd=Math.PI/180,Cd=180/Math.PI,xd=4/29,Ed=6/29,kd=3*Ed*Ed;function Ld(e){if(e instanceof Rd)return new Rd(e.l,e.a,e.b,e.opacity);if(e instanceof _d)return Pd(e);e instanceof cd||(e=sd(e));var t,n,r=Od(e.r),o=Od(e.g),i=Od(e.b),a=qd((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=qd((.4360747*r+.3850649*o+.1430804*i)/.96422),n=qd((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Rd(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Rd(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function qd(e){return e>.008856451679035631?Math.pow(e,1/3):e/kd+xd}function Id(e){return e>Ed?e*e*e:kd*(e-xd)}function Td(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Od(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _d(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Pd(e){if(isNaN(e.h))return new Rd(e.l,0,0,e.opacity);var t=e.h*wd;return new Rd(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}$u(Rd,(function(e,t,n,r){return 1===arguments.length?Ld(e):new Rd(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return new Rd(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Rd(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 cd(Td(3.1338561*(t=.96422*Id(t))-1.6168667*(e=1*Id(e))-.4906146*(n=.82521*Id(n))),Td(-.9787684*t+1.9161415*e+.033454*n),Td(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),$u(_d,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof _d)return new _d(e.h,e.c,e.l,e.opacity);if(e instanceof Rd||(e=Ld(e)),0===e.a&&0===e.b)return new _d(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Cd;return new _d(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new _d(e,t,n,null==r?1:r)}),Bu(Wu,{brighter(e){return new _d(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new _d(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Pd(this).rgb()}}));var Dd=e=>()=>e;function Ad(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Dd(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?Ad: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):Dd(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ld(e)).r,(t=ld(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Ad(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 Md,Nd="center",jd="bottom";function zd(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 Fd(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Bd)):void 0===t&&(t=$d);for(var n,r,o,i,a,s=new Ud(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Ud(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Hd)}function $d(e){return e.children}function Bd(e){return Array.isArray(e)?e[1]:null}function Wd(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Hd(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ud(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:Nd,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:Nd,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:Nd,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:Nd},{key:"DataRangeIncludingZero",alignment:jd},{key:"LimitedData",alignment:jd},{key:"NegativeOrZeroValues",alignment:jd}].reduce((function(e,t){return e[t.key]=t,e}),{}),Ud.prototype=Fd.prototype={constructor:Ud,count:function(){return this.eachAfter(zd)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Fd(this).eachBefore(Wd)},[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)}},Md=function(e){
|
|
15
15
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
16
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,h=e.length,p=e.search(/[0-9\-\+#]/),f=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=h-g,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),S=g>0?e.substring(v,h):"";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))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,h=d.length,v=0;v<h;v++)m+=d.charAt(v),!((v-b+1)%l)&&v<h-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+S}},Md({exports:{}});const Gd=/,(?![^(]*\))/,Vd=/\s(?![^(]*\))/,Kd=/^[0-9]+[a-zA-Z%]+?$/,Jd=["none","inset","initial","inherit"],Zd=e=>{if(!e)return;const t=e.split(Vd).filter((e=>!Jd.includes(e.toLowerCase()))).at(-1),n=!t||(e=>"0"===e||Kd.test(e))(t)||Jd.includes(t.toLowerCase())?void 0:t;return n},Xd=e=>e?e.split(Gd).map((e=>e.trim())):[];function Qd(e,t,n,r){return n&&r?n.getStyle("object.".concat(r),e,t):n?n.getStyle("",e,t):void 0}function Yd(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:Qd(t,n,r,o)}const eh={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},th={"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 nh(e,t){return t?function(e){var t;let n,r,o,i;return null!=e&&null!==(t=e.session)&&void 0!==t&&t.config?(n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host):""}(e)+t:void 0}function rh(e,t,n){const r=null==e?void 0:e.bgImage;if(r){let o="";if("media"===r.mode||"media"===e.useImage){let e;const i=null==r?void 0:r.mediaUrl,{qUrl:a}=(null==i?void 0:i.qStaticContentUrl)||{};o=a?decodeURIComponent(a):void 0,o=nh(t,o),n&&(e=Object.entries(n).map((e=>{let[t,n]=e;return"&".concat(t,"=").concat(encodeURIComponent(n))})).join("&"),o="".concat(o,"?").concat(e))}"expression"===r.mode&&(o=r.expressionUrl?decodeURIComponent(r.expressionUrl):void 0);const i=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=th[e.bgImage.position]),n}(e),a=function(e){var t;let n=eh.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=eh[r]),n}(e);return o?{url:o,pos:i,size:a}:void 0}}function oh(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):Yd(null==r?void 0:r.color,"","backgroundColor",t,n)}function ih(e,t,n){var r,o;const i=Qd("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&Jd.includes(e.toLowerCase()))return e.toLowerCase();const r=Xd(e);if(1!==r.length)return e;let o=n;if(!o){const n=Xd(t);if(1!==n.length)return e;o=Zd(n[0])}if(!o)return e;const i=Zd(r[0]);return i?e.replace(i,o):"".concat(e," ").concat(o)})((null==e||null===(r=e.shadow)||void 0===r?void 0:r.boxShadow)||i,i,Yd(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function ah(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle("object.".concat(r),"title.".concat(t),"fontFamily"),fontSize:i.fontSize||n.getStyle("object.".concat(r),"title.".concat(t),"fontSize"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color):n.getStyle("object.".concat(r),"title.".concat(t),"color"),backgroundColor:i.backgroundColor||n.getStyle("object.".concat(r),"title.".concat(t),"backgroundColor"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const sh={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},lh=["theme","selections"];function ch(e){var t,n,r,o,i,a,s,l;let{app:c,themeApi:u,theme:d,queryParams:h,components:p=[],checkboxes:f=!1}=e;const m=function(){const e={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const n=null==t?void 0:t.key;lh.includes(n)&&(e[n]=t)})),e}(p),g=(e,t)=>u.getStyle("object.listBox",e,t),b=e=>(null==e?void 0:e.index)>0||null!=e&&e.color?u.getColorPickerColor(e):void 0,y=function(e){var t,n,r,o,i;let{getColorPickerColor:a,theme:s,getListboxStyle:l,overrides:c,checkboxes:u}=e;const d=null===(t=c.theme)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.fontColor,h=a(d)||l("content","color")||(null===(n=s.palette)||void 0===n?void 0:n.text.primary),p=!u&&(null===(r=null===(o=c.theme)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.useContrastColor)||void 0===r||r),f=(null===(i=c.selections)||void 0===i?void 0:i.colors)||{},m=e=>{var t,n;const r="selected"===e?"main":e,o="".concat(e,"Contrast"),i=a(f[e])||l("","dataColors.".concat(e))||"possible"===e&&l("","backgroundColor")||(null===(t=s.palette)||void 0===t||null===(t=t.selected)||void 0===t?void 0:t[r])||sh[e];return{[e]:i,[o]:p?Ru(i,h):h||(null===(n=s.palette)||void 0===n?void 0:n.selected["".concat(o,"Text}")])}};return Q(Q(Q(Q(Q({},m("selected")),m("alternative")),m("excluded")),m("selectedExcluded")),m("possible"))}({getColorPickerColor:b,theme:d,getListboxStyle:g,overrides:m,checkboxes:f}),v=m.theme||{},S=b(null===(t=v.header)||void 0===t?void 0:t.fontColor)||g("title.main","color"),w=function(e){let t,{themeApi:n,themeOverrides:r}=e;const o=null==r?void 0:r.background;return o?(t=null!=o&&o.useExpression?oh({bgColor:o},n,"listBox"):n.getColorPickerColor(null==o?void 0:o.color),t):t}({themeApi:u,themeOverrides:v}),C=null!==(n=v.background)&&void 0!==n&&n.image?rh({bgImage:v.background.image},c,h):void 0,x=w||g("","backgroundColor")||d.palette.background.default,E=function(e,t){const n=ku(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(x,g),k=function(e){return Ru("#fff",e("content","color"))}(g),L=(null===(r=v.header)||void 0===r?void 0:r.fontStyle)||{},R=(null===(o=v.content)||void 0===o?void 0:o.fontStyle)||{},q=(e,t,n)=>!0===e&&t||!1===e&&n||void 0;return{background:{backgroundColor:x,backgroundImage:null==C||!C.url||null!=C&&C.url.startsWith("url(")?void 0:"url('".concat(C.url,"')"),backgroundRepeat:"no-repeat",backgroundSize:null==C?void 0:C.size,backgroundPosition:null==C?void 0:C.pos},header:{color:S,fontSize:(null===(i=v.header)||void 0===i?void 0:i.fontSize)||g("title.main","fontSize"),fontFamily:(null===(a=v.header)||void 0===a?void 0:a.fontFamily)||g("title.main","fontFamily"),fontWeight:q(L.bold,"bold","normal")||g("title.main","fontWeight")||"bold",textDecoration:L.underline?"underline":"initial",fontStyle:q(L.italic,"italic","normal")||g("title.main","fontStyle")||"initial"},content:{backgroundColor:f?void 0:y.possible,color:y.possibleContrast||g("content","color"),fontSize:(null===(s=v.content)||void 0===s?void 0:s.fontSize)||g("content","fontSize"),fontFamily:(null===(l=v.content)||void 0===l?void 0:l.fontFamily)||g("content","fontFamily"),fontWeight:q(R.bold,"bold","normal")||g("content","fontWeight")||"normal",textDecoration:R.underline?"underline":"initial",fontStyle:q(R.italic,"italic","normal")||g("content","fontStyle")||"initial"},search:{color:k,borderColor:d.palette.divider,highlightBorderColor:d.palette.custom.focusBorder,backgroundColor:E,backdropFilter:"blur(8px)"},selections:y}}function uh(e){let{app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a}=e;return ch({app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a})}function dh(e){let{alignTo:o,anchorOrigin:i={vertical:"bottom",horizontal:"center"},transformOrigin:a={vertical:"top",horizontal:"center"},show:l,close:u,app:d,fieldName:p,stateName:f="$",autoFocus:m,components:g,checkboxes:b,selectDisabled:y=(()=>!1),sortCriteria:v=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:S="ltr"}=e;const w=Boolean(null==p?void 0:p.qLibraryId),C=l&&Boolean(o.current),[x,E]=n(0),L=ma(),R=h(),[I]=Ka({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:f,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:v,qFieldDefs:w?void 0:[p]},qLibraryId:w?p.qLibraryId:void 0}},d,p,f),O=c((()=>{I.lock("/qListObjectDef")}),[I]),_=c((()=>{I.unlock("/qListObjectDef")}),[I]),{translator:P,themeApi:D,keyboardNavigation:A,hostConfig:M}=s($a),N=h(),j=h(),[z]=lu(d,I,j),[F]=es(I),[$]=n((()=>cu({selectDisabled:y}))),B=bl({containerRef:j,enabled:A}),{checkboxes:W=b}=F||{},H=uh({themeApi:D,theme:L,components:g,checkboxes:W});if(r((()=>{z&&C&&(z.isModal(I)||z.goModal("/qListObjectDef"))}),[z,C]),!(I&&F&&P&&H))return null;const U=!0===F.qListObject.qDimensionInfo.qLocked,G=(e,t)=>{const n="escapeKeyDown"!==t;z.noModal(n),u()},V=Ic({layout:F,model:I,translator:P,selectionState:$,selections:z}),K=du(F);return t.createElement(T,{className:"listbox-container",open:C,onClose:G,anchorEl:o.current,anchorOrigin:i,transformOrigin:a,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?G():void 0,direction:S},t.createElement(k,{container:!0,direction:"column",gap:0,ref:j},t.createElement(k,{item:!0,container:!0,style:{direction:S,padding:L.spacing(1)}},t.createElement(k,{item:!0},U?t.createElement(q,{onClick:_,disabled:!U,size:"large"},t.createElement(as,{title:P.get("Listbox.Unlock")})):t.createElement(q,{onClick:O,disabled:!K,size:"large"},t.createElement(ls,{title:P.get("Listbox.Lock")}))),t.createElement(k,{item:!0,xs:!0}),t.createElement(k,{item:!0},t.createElement(Xc,{layout:F,more:{enabled:!U,actions:V,alignTo:N,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:z,onConfirm:G,onCancel:()=>G(0,"escapeKeyDown")}}))),t.createElement(k,{item:!0,xs:!0},t.createElement("div",{ref:N}),t.createElement(k,{item:!0},t.createElement(ru,{ref:R,popoverOpen:C,styles:H,visible:!0,model:I,listCount:x,selections:z,selectionState:$,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:B.focusSelection},autoFocus:null==m||m,direction:S})),t.createElement(Ec,{model:I,app:d,layout:F,selections:z,selectionState:$,direction:S,onSetListCount:e=>E(e),onCtrlF:()=>{R.current.focus()},styles:H,keyboard:B}))))}function hh(e){let{field:r,api:o,stateIx:i=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:l=null,onClose:c=(()=>{})}=e;const{translator:u}=s($a),d=l||h(),p=ma(),[f,m]=n(!1),g=e=>{e.currentTarget.contains(e.target)&&m(!f)},b=()=>{m(!1),c()},y=r.selections[i];void 0===y.qTotal&&(y.qTotal=0);const v=y.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},S=(v.qSelected+v.qLocked)/y.qTotal,w=v.qAlternative/y.qTotal,x=(v.qExcluded+v.qLockedExcluded+v.qSelectedExcluded)/y.qTotal,E=v.qSelected+v.qSelectedExcluded+v.qLocked+v.qLockedExcluded,L=0===E&&0===y.qTotal;let R="";y.qTotal===E&&y.qTotal>1?R=u.get("CurrentSelections.All"):E>1&&y.qTotal?R=u.get("CurrentSelections.Of",[E,y.qTotal]):y.qSelectedFieldSelectionInfo&&(R=y.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==r.states[i]&&(R="".concat(r.states[i],": ").concat(R));const I=[{color:p.palette.selected.main,ratio:S},{color:p.palette.selected.alternative,ratio:w},{color:p.palette.selected.excluded,ratio:x}];I.forEach(((e,t)=>{e.offset=t?I[t-1].offset+I[t-1].ratio:0}));let T=null,O=null,_=null,P=null;return l||(T=t.createElement(k,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:y.qLocked?"0.3":""}},t.createElement(C,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.label),t.createElement(C,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},R)),y.qLocked?O=t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(as,null))):y.qOneAndOnlyOne||(O=t.createElement(k,{item:!0},t.createElement(q,{title:u.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),o.clearField(y.qField,r.states[i])},size:"large"},t.createElement(is,null)))),_=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===L&&I.map((e=>t.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),P=t.createElement(k,{container:!0,gap:1,ref:d,sx:{backgroundColor:p.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:p.palette.action.hover}},onClick:!1===a&&g||null},T,O,_,f&&t.createElement(dh,{alignTo:d,show:f,close:b,app:o.model,fieldName:y.qField,stateName:r.states[i]}))),l?t.createElement(dh,{alignTo:d,show:!0,close:b,app:o.model,fieldName:y.qField,stateName:r.states[i]}):P}var ph=e=>os((e=>Q(Q({},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 fh={item:"".concat("MultiState","-item")},mh=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(fh.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function gh(e){let{field:r,api:o,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const[l,c]=n(!!i),[u,d]=n(-1),[p,f]=n(i?i.current:null),m=i||h(),{translator:g}=s($a),b=g.get("Selection.ClearAllStates"),y=()=>{d(-1),a()};let v=null;i||(v=t.createElement(t.Fragment,null,t.createElement(k,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(N,{style:{padding:"0px 8px"},color:"secondary",badgeContent:r.states.length},t.createElement(C,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.label))),t.createElement(k,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(ph,null)))));const S=t.createElement(j,{dense:!0},t.createElement(z,{title:b,onClick:()=>{r.states.forEach((e=>o.clearField(r.name,e)))}},t.createElement(F,{variant:"contained",fullWidth:!0},b)),r.states.map(((e,n)=>t.createElement(z,{key:n,title:r.label,onClick:e=>((e,t)=>{e.stopPropagation(),c(!1),d(t)})(e,n)},t.createElement(E,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(hh,{field:r,api:o,stateIx:n,skipHandleShowListBoxPopover:!0})))))),w=t.createElement(T,{open:l,onClose:()=>{c(!1),a()},anchorEl:p,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},S),x=i?w:t.createElement(mh,{container:!0,gap:0,className:fh.item,onClick:e=>{e.currentTarget.contains(e.target)&&(f(e.currentTarget),m.current=e.currentTarget,c(!l))}},v,l&&w,u>-1&&t.createElement(dh,{alignTo:m,show:u>-1,close:y,app:o.model,fieldName:r.selections[u].qField,stateName:r.states[u]}));return i&&u>-1?t.createElement(dh,{alignTo:m,show:u>-1,close:y,app:o.model,fieldName:r.selections[u].qField,stateName:r.states[u]}):x}const bh="More",yh={item:"".concat(bh,"-item"),badge:"".concat(bh,"-badge")},vh=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(yh.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(yh.badge)]:{padding:t.spacing(0,1)}}}));function Sh(e){let{items:r=[],api:o}=e;const i=ma(),[a,s]=n(!1),[l,c]=n(-1),[u,d]=n(null),p=h(),f=()=>{c(-1)};let m=null;return l>-1&&(m=r[l].states.length>1?t.createElement(gh,{field:r[l],api:o,moreAlignTo:p,onClose:f}):t.createElement(hh,{field:r[l],api:o,skipHandleShowListBoxPopover:!0,moreAlignTo:p,onClose:f})),t.createElement(vh,{container:!0,gap:0,className:yh.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,s(!a))}},t.createElement(k,{item:!0},t.createElement(E,{borderRadius:i.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:i.palette.selected.main,color:i.palette.selected.mainContrastText}},t.createElement(C,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",r.length))),t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(ph,null))),a&&t.createElement(T,{open:a,onClose:()=>{s(!1)},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},t.createElement(j,{dense:!0},r.map(((e,n)=>t.createElement(z,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(E,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(gh,{field:e,api:o}):t.createElement(hh,{field:e,api:o}))))))),m)}const wh=120,Ch=72;function xh(e){let{api:o,app:i}=e;const a=ma(),[l]=Za(i),[c]=es(l),[u,d]=n({items:[],more:[]}),{modalObjectStore:h}=s($a).selectionStore,[p,f]=ns(),[m,g]=n(0);return r((()=>{if(!f)return;const{width:e}=f,t=Math.floor(e)-Ch,n=Math.floor(t/wh);g(n)}),[f]),r((()=>{if(!(i&&l&&c&&m))return;const e=function(e){if(!e)return[];const t={};function n(e,n){e.qSelections.forEach((e=>{const r=e.qField;let o=t[r];var i;void 0===o&&(o={name:r,label:(null===(i=e.qDimensionReferences)||void 0===i||null===(i=i.find((e=>e.qLabel)))||void 0===i?void 0:i.qLabel)||e.qReadableName||r,states:[],selections:[]},t[r]=o),o.states.push(n),o.selections.push(e)}))}return e.qSelectionObject&&n(e.qSelectionObject,"$"),e.alternateStates&&e.alternateStates.forEach((e=>n(e.qSelectionObject,e.stateName))),Object.keys(t).map((e=>t[e])).filter((e=>!e.selections.some((e=>e.qIsHidden))))}(c);d((t=>{const n=e;if((()=>{const{model:e}=h.get(i.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)})()&&n.length+1===t.items.length){const e=t.items.filter((e=>!1===n.some((t=>e.name===t.name))))[0],{qField:r}=e.selections[0];e.selections=[{qField:r}];const o=t.items.indexOf(e);n.splice(o,0,e)}let r=[];return m<n.length&&(r=n.splice(m-n.length)),{items:n,more:r}}))}),[i,l,c,o.isInModal(),m]),t.createElement(k,{ref:p,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},u.items.map((e=>t.createElement(k,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(wh,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},e.states.length>1?t.createElement(gh,{field:e,api:o}):t.createElement(hh,{field:e,api:o})))),u.more.length>0&&t.createElement(k,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(Ch,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},t.createElement(Sh,{items:u.more,api:o})))}var Eh=e=>os((e=>Q(Q({},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 kh=e=>os((e=>Q(Q({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));const Lh=(e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}}))),o=(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::"),i=(n.qStateNames||[]).map((e=>e)).join("::");o!==i&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)};function Rh(e){let{api:o,app:i}=e;const{translator:a}=s($a),[l]=function(e){const[t]=Za(e),[o]=es(t),[i]=ts(e),[a,s]=n(null);return r((()=>{i&&t&&o&&Lh(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})),s({canGoBack:e,canGoForward:t,canClear:n})}),[o]),[a,t,o]}(i);return t.createElement(k,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(k,{item:!0},t.createElement(q,{style:{marginRight:"8px"},disabled:!l||!l.canGoBack,title:a.get("Navigate.Back"),onClick:()=>o.back(),size:"large"},t.createElement(Eh,null))),t.createElement(k,{item:!0},t.createElement(q,{style:{marginRight:"8px"},disabled:!l||!l.canGoForward,title:a.get("Navigate.Forward"),onClick:()=>o.forward(),size:"large"},t.createElement(kh,null))),t.createElement(k,{item:!0},t.createElement(q,{disabled:!l||!l.canClear,title:a.get("Selection.ClearAll"),onClick:()=>o.clear(),size:"large"},t.createElement(Nc,null))))}const qh=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function Ih(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function Th(){return qh.map(Ih).join("")}function Oh(e){let{app:n}=e;const r=ma(),[o]=ou(n);return o?t.createElement(k,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(k,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(Rh,{api:o,app:n})),t.createElement(k,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(xh,{api:o,app:n}))):null}let _h;_h="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let Ph=null,Dh=null;const Ah=_h.clearTimeout,Mh=_h.setTimeout,Nh=_h.cancelAnimationFrame||_h.mozCancelAnimationFrame||_h.webkitCancelAnimationFrame,jh=_h.requestAnimationFrame||_h.mozRequestAnimationFrame||_h.webkitRequestAnimationFrame;function zh(e){let t,n,r,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&Ph(this.__resizeRAF__),this.__resizeRAF__=Dh((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,l="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],l="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+l+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=_h.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const d=l.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==Nh||null==jh?(Ph=Ah,Dh=function(e){return Mh(e,20)}):(Ph=function([e,t]){Nh(e),Ah(t)},Dh=function(e){const t=jh((function(){Ah(n),e()})),n=Mh((function(){Nh(t),e()}),20);return[t,n]});class Fh extends f{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},o=parseFloat(r.paddingLeft||"0"),i=parseFloat(r.paddingRight||"0"),a=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),c=l.height-a-s,u=l.width-o-i,d=this._parentNode.offsetHeight-a-s,h=this._parentNode.offsetWidth-o-i;(e||this.state.height===d&&this.state.scaledHeight===c)&&(t||this.state.width===h&&this.state.scaledWidth===u)||(this.setState({height:d,width:h,scaledHeight:c,scaledWidth:u}),"function"==typeof n&&n({height:d,scaledHeight:c,scaledWidth:u,width:h}))}},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=zh(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:i=!1,nonce:a,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:h,scaledWidth:f,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=h),o||(0===m&&(y=!0),g.width=0,b.width=m,b.scaledWidth=f),i&&(y=!1),p(c,{ref:this._setRef,style:{...g,...l},...u},!y&&e(b))}}function $h(e){let{keyboard:t,hovering:n,updateKeyScroll:r,currentScrollIndex:o,isModal:i,constraints:a,selections:s}=e;return{handleKeyDown:e=>{const{keyCode:n,shiftKey:r=!1}=e.nativeEvent,o=()=>{e.stopPropagation(),e.preventDefault()};if(!t.enabled)return;const a=e.currentTarget.closest(".listbox-container"),l=i();switch(n){case fl.TAB:if(document.activeElement===a||!l&&!a.contains(document.activeElement))return;if(r){Sl(a)||vl(a)||Cl(e,t)}else{if(!(wl(a)||vl(a)||Sl(a)))break}o();break;case fl.ENTER:case fl.SPACE:if(!e.target.classList.contains("listbox-container"))break;t.focus(),o();break;case fl.ESCAPE:Cl(e,t),s.isActive()&&s.cancel()}},handleOnMouseEnter:()=>{n.current=!0},handleOnMouseLeave:()=>{n.current&&(n.current=!1)},globalKeyDown:e=>{if(!n.current||(()=>{const e=(null==a?void 0:a.select)||(null==a?void 0:a.active),t=i();return e||t})())return;const{keyCode:t,ctrlKey:s=!1,shiftKey:l=!1}=e;switch(t){case fl.ARROW_UP:r({up:1});break;case fl.ARROW_DOWN:r({down:1});break;case fl.PAGE_UP:r({up:o.stop-o.start});break;case fl.PAGE_DOWN:r({down:o.stop-o.start});break;case fl.HOME:r({scrollPosition:s&&l?"overflowStart":"start"});break;case fl.END:r({scrollPosition:s&&l?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const Bh=ga("div")((()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"})));function Wh(e){let{text:n}=e;const{translator:r}=s($a);return t.createElement(Bh,null,r.get(n))}const Hh={fontSize:"12px"},Uh=ga($)((e=>{let{theme:t,isLoading:n}=e;return{position:"absolute",top:0,left:0,height:48,zIndex:2,background:t.palette.custom.disabledBackground,opacity:1,color:t.palette.custom.disabledContrastText,width:"100%",display:"flex",justifyContent:n?"center":"flex-start",paddingLeft:16,paddingRight:16,borderRadius:0,"& *, & p":{color:t.palette.custom.disabledContrastText},"& i":{padding:"".concat(qs,"px")}}})),Gh=ga(k,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})((e=>{let{styles:t,isRtl:n}=e;return Q(Q({flexDirection:n?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},t.header),{},{"& *":{color:t.header.color}})})),Vh=ga(C)((e=>{let{styles:t}=e;return Q(Q({},t.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})}));function Kh(e){let{translator:n,toggleLock:r,keyboard:o,isLoading:i}=e;const a=n.get("SelectionToolbar.ClickToUnlock");return t.createElement(Uh,{title:a,tabIndex:o.enabled?0:-1,onClick:r,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:i},i?t.createElement(B,{size:16,variant:"indeterminate",color:"primary"}):t.createElement(as,{disableRipple:!0,style:Hh}),!i&&t.createElement(C,{fontSize:"14px"},a))}var Jh=e=>os((e=>Q(Q({},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 Zh=e=>os((e=>Q(Q({},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 Xh=e=>os((e=>Q(Q({},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 Qh="H",Yh="C";var ep={createDimensionIconData:e=>{let{dimInfo:t,app:n,selections:r,isPopover:o,active:i,keyboard:a}=e;switch(t.qGrouping){case Qh:return{icon:Zh,tooltip:"Listbox.DrillDown",onClick:void 0};case Yh:{const e=n&&i,s=()=>{o||r.confirm(),n.getDimension(t.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):console.log("engine api spec version doesn't have support for function stepCycle")})).catch((()=>null))};return{icon:e?Xh:Jh,tooltip:"Listbox.Cyclic",onClick:e?s:void 0,onKeyDown:e?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case fl.SPACE:case fl.ENTER:s();break;case fl.TAB:{if(!a.enabled)return;let n;n=e.shiftKey?a.focusSelection():vl(t)||Sl(t),n||Cl(e,a)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}}};const tp=I(F)((()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0})));function np(e){let{iconData:n,translator:r,iconStyle:o,disabled:i,keyboard:a}=e;if(!n)return;const{icon:s,tooltip:l,onClick:c,onKeyDown:u}=n,d=s,h=r.get(l);return c?t.createElement(tp,{variant:"outlined",onClick:c,tabIndex:a.innerTabStops?0:-1,title:h,size:"large",disableRipple:!0,disabled:i,onKeyDown:u,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button"},t.createElement(d,{style:o})):t.createElement(d,{title:h,size:"large",style:Q(Q({},o),{},{padding:"".concat(qs,"px")})})}const rp=500;let op=0;function ip(e){var o,i,a;let{layout:s,translator:l,styles:c,isRtl:u,showLock:d,showSearchIcon:p,constraints:f,onShowSearch:m,classes:g,containerRect:b,isPopover:y,showToolbar:v,showDetachedToolbarOnly:S,containerRef:w,model:C,selectionState:x,isDirectQuery:E,selections:L,keyboard:R,autoConfirm:I,app:T,disablePortal:O}=e;const[_,P]=n(S),[D,A]=n(null==s||null===(o=s.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked),[M,N]=n(!1);r((()=>{var e;A(null==s||null===(e=s.qListObject)||void 0===e||null===(e=e.qDimensionInfo)||void 0===e?void 0:e.qLocked)}),[null==s||null===(i=s.qListObject)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i?void 0:i.qLocked]);const j=h(null),z=ep.createDimensionIconData({dimInfo:null==s||null===(a=s.qListObject)||void 0===a?void 0:a.qDimensionInfo,app:T,selections:L,isPopover:y,active:!(null!=f&&f.active),keyboard:R}),F=d&&D,$=!d&&D,B=p||$||z,W=Ls-(B?qs:0),H=u?Ls-(B?qs:0):Rs,U=(p?Is:0)+($?Is:0)+(z?Is:0),G=function(e){let{isLocked:t,setLocked:n,settingLockedState:r,model:o,setSettingLockedState:i}=e;return()=>{const e=new Date;if(e-op<rp)return Promise.resolve();if(r)return()=>{};i(!0),op=e;const a=t?o.unlock:o.lock;return n(!t),a.call(o,"/qListObjectDef").catch((()=>{n(t)})).finally((()=>{setTimeout((()=>{i(!1)}),0)}))}}({isLocked:D,setLocked:A,settingLockedState:M,setSettingLockedState:N,model:C}),V=Ic({layout:s,model:C,translator:l,selectionState:x,isDirectQuery:E,selections:L}),K=D||!d?void 0:[{key:"lock",type:void 0,label:l.get("SelectionToolbar.ClickToLock"),getSvgIconShape:ss,enabled:()=>!M&&!x.selectDisabled()&&du(s),action:G}],J=null!=f&&f.active?t.createElement(Qc,{title:l.get("Listbox.Search"),size:"large",style:Q(Q({},Hh),{},{padding:"".concat(qs,"px")})}):t.createElement(q,{onClick:m,tabIndex:-1,title:l.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn"},t.createElement(Qc,{style:Hh}));r((()=>{if(!j.current||!b)return;const e=function(e){var t,n,r,o;let{containerRect:i,titleRef:a,iconsWidth:s,paddingLeft:l,paddingRight:c}=e;const u=l+c,d=i.width<(null!==(t=null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)+s+u+2+128,h=(null==a||null===(r=a.current)||void 0===r?void 0:r.scrollWidth)>(null==a||null===(o=a.current)||void 0===o?void 0:o.offsetWidth);return!(!d&&!h)}({containerRect:b,titleRef:j,iconsWidth:U,paddingLeft:W,paddingRight:H});P(S||e)}),[U,W,H,j.current,S,Object.entries(b||{}).sort().join(",")]);const X=function(e){let{isDetached:t,showToolbar:n,containerRef:r,isLocked:o,listboxSelectionToolbarItems:i,extraItems:a,selections:s,keyboard:l,autoConfirm:c,disablePortal:u}=e;return{autoConfirm:c,isDetached:t,show:n&&!t,popover:{show:n&&t,anchorEl:r.current},extraItems:a,more:{enabled:!o,actions:i,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"},disablePortal:u},selections:{show:n,api:s,onConfirm:()=>{null==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!y&&_,showToolbar:v,containerRef:w,isLocked:D,extraItems:K,listboxSelectionToolbarItems:V,selections:L,keyboard:R,autoConfirm:I,disablePortal:O}),Y=t.createElement(Xc,Z({isRtl:u,layout:s},X));if(S)return Y;const ee=$?t.createElement(as,{size:"large",style:Q(Q({},Hh),{},{padding:"".concat(qs,"px")})}):void 0;return t.createElement(Gh,{item:!0,container:!0,styles:c,isRtl:u,marginY:1,paddingLeft:"".concat(W,"px"),paddingRight:"".concat(H,"px"),className:"header-container"},F&&t.createElement(Kh,{isLoading:M,translator:l,toggleLock:G,keyboard:R}),B&&t.createElement(k,{item:!0,container:!0,alignItems:"center",width:U,className:"header-action-container"},ee||p&&J,t.createElement(np,{iconData:z,iconStyle:Hh,disabled:L.isActive()&&y,translator:l,keyboard:R})),t.createElement(k,{item:!0,xs:!0,minWidth:0,justifyContent:u?"flex-end":"flex-start",className:g.listBoxHeader},t.createElement(Vh,{variant:"h6",noWrap:!0,ref:j,title:s.title,styles:c},s.title)),t.createElement(k,{item:!0,display:"flex"},Y))}const ap="ListBoxInline",sp={listBoxHeader:"".concat(ap,"-listBoxHeader"),screenReaderOnly:"".concat(ap,"-screenReaderOnly"),listboxWrapper:"".concat(ap,"-listboxWrapper")},lp=ga(k,{shouldForwardProp:e=>!["containerPadding","isGridMode","styles"].includes(e)})((e=>{let{theme:t,containerPadding:n,isGridMode:r,styles:o}=e;return Q(Q({},o.background),{},{["& .".concat(sp.listBoxHeader)]:{alignSelf:"center",display:"flex"},["& .".concat(sp.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"},["& .".concat(sp.listboxWrapper)]:{padding:n},"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus ::-webkit-scrollbar-track":{boxShadow:r?void 0:"inset -2px -2px 0px #3F8AB3"},"&:focus-visible":{outline:"none"}})}));const cp=t.memo((function(e){var o,a,l,u;let{options:d,layout:p}=e;const{app:f,direction:m,frequencyMode:g,checkboxes:b,search:y=!0,focusSearch:v=!1,rangeSelect:S=!0,model:w,selections:C,update:x,fetchStart:E,postProcessPages:L,calculatePagesHeight:R,showGray:q=!0,scrollState:I,renderedCallback:T,toolbar:O=!0,isPopover:_=!1,showLock:P=!1,components:D,selectDisabled:A=(()=>!1),disablePortal:M=!0}=d,N=ma(),{translator:j,keyboardNavigation:z,themeApi:F,queryParams:$,constraints:B}=s($a),{checkboxes:W=b}=p||{},H=uh({app:f,themeApi:F,theme:N,queryParams:$,components:D,checkboxes:W}),U=function(e){let{appLayout:t}=e;return!(null==t||!t.qIsDirectQueryMode)}({appLayout:null==f?void 0:f.layout}),G=h(),V=h(),[K,J]=ns(),[Z,X]=n(!1),[Y,ee]=n(!1),te=h(!1),[ne,re]=n({down:0,up:0,scrollPosition:""}),oe=e=>re((t=>Q(Q({},t),e))),[ie,ae]=n({start:0,stop:0}),[se]=ou(f),[le]=n((()=>cu({selectDisabled:A}))),ce=bl({containerRef:G,enabled:z}),ue=c((()=>(e=>{var t,n;let{app:r,appSelections:o}=e;return null!==(t=null===(n=r.isInModalSelection)||void 0===n?void 0:n.call(r))&&void 0!==t?t:o.isInModal()})({app:f,appSelections:se})),[f,se]),de=null==p?void 0:p.qListObject.qDimensionInfo.qError,he=de&&B.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",{handleKeyDown:pe,handleOnMouseEnter:fe,handleOnMouseLeave:me,globalKeyDown:ge}=i((()=>$h({keyboard:ce,hovering:te,updateKeyScroll:oe,currentScrollIndex:ie,constraints:B,isModal:ue,selections:C})),[ce,te,oe,G,ie,f,se,B,ue]);r((()=>(document.addEventListener("keydown",ge),()=>{document.removeEventListener("keydown",ge)})),[ge]),r((()=>{!0===y&&ee(!0);const e=()=>{X(!0)},t=()=>{X(!1),"toggle"===y&&ee(!1)};return _&&(C.isActive()||(C.on("activated",e),C.on("deactivated",t)),X(_)),O&&C&&(C.isModal()||(C.on("activated",e),C.on("deactivated",t)),X(_||C.isActive())),()=>{C&&C.removeListener&&(C.removeListener("activated",e),C.removeListener("deactivated",t))}}),[O,C,_]);const{wildCardSearch:be,searchEnabled:ye,autoConfirm:ve=!1,layoutOptions:Se={}}=null!=p?p:{},we=null==p||null===(o=p.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked,Ce=!1!==ye&&"toggle"===y&&!we,xe=(null==p||null===(a=p.title)||void 0===a?void 0:a.length)&&!1!==(null==p?void 0:p.showTitle),Ee=O&&!xe&&!_,ke=O&&xe||_,Le="rtl"===m;if(!(w&&p&&j&&H))return null;const Re=!0===y||"toggle"===y&&Y&&!1!==ye,qe=null!==(l=Se.dense)&&void 0!==l&&l,Ie=()=>{ee(!Y)},Te=()=>{"toggle"===y?Ie():V.current.focus()},Oe=Re&&("toggle"===y||v),_e="grid"===(null==Se?void 0:Se.dataLayout),Pe=function(e){let t,{isGridMode:n,dense:r,height:o,layoutOrder:i}=e;if(n){let e;e=nc({isGridMode:n,dense:r})>o?"0px":"2px",t="row"===i?"".concat(e," 4px"):"".concat(e," 6px ").concat(e," 4px")}else t=void 0;return t}({isGridMode:_e,dense:qe,height:null===(u=G.current)||void 0===u?void 0:u.clientHeight,layoutOrder:Se.layoutOrder});de&&(null==T||T());const De=ke?js+Os:0,Ae=t.createElement(ip,{app:f,showSearchIcon:Ce,onShowSearch:Ie,isPopover:_,showToolbar:Z,isDirectQuery:U,autoConfirm:ve,showDetachedToolbarOnly:Ee,layout:p,translator:j,styles:H,isRtl:Le,showLock:P,constraints:B,classes:sp,containerRect:J,containerRef:G,model:w,selectionState:le,selections:C,keyboard:ce,disablePortal:M});return t.createElement(t.Fragment,null,Ee&&Ae,t.createElement(lp,{className:"listbox-container",container:!0,tabIndex:ce.enabled?-1:void 0,direction:"column",gap:0,containerPadding:Pe,styles:H,style:{height:"100%",flexFlow:"column nowrap"},onKeyDown:pe,onMouseEnter:fe,onMouseLeave:me,ref:e=>{G.current=e,K(e)},isGridMode:_e,"aria-label":ce.active?j.get("Listbox.ScreenReaderInstructions"):""},ke&&Ae,t.createElement(k,{item:!0,container:!0,direction:"column",height:"100%",minHeight:De,role:"region","aria-label":j.get("Listbox.ResultFilterLabel")},t.createElement(k,{item:!0},t.createElement(ru,{ref:V,selections:C,selectionState:le,model:w,dense:qe,keyboard:ce,visible:Re,search:y,autoFocus:Oe,beginSelectionOnFocus:!_,wildCardSearch:be,searchEnabled:ye,direction:m,hide:Ce&&Ie,styles:H})),t.createElement(k,{item:!0,xs:!0,className:sp.listboxWrapper},de?t.createElement(Wh,{text:he}):t.createElement(Fh,null,(e=>{let{height:n,width:r}=e;return t.createElement(Ec,{model:w,app:f,constraints:B,layout:p,selections:C,selectionState:le,direction:m,frequencyMode:g,rangeSelect:S,checkboxes:W,height:n,width:r,update:x,fetchStart:E,postProcessPages:L,calculatePagesHeight:R,keyboard:ce,showGray:q,scrollState:I,keyScroll:{state:ne,reset:()=>re({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:ie,set:ae},renderedCallback:T,onCtrlF:Te,isModal:ue,styles:H})}))))))}));function up(e){let{options:n={}}=e;const{model:r}=n,[o]=es(r);return t.createElement(cp,{options:n,layout:o})}function dp(e){let{app:t,qId:o,options:i={}}=e;const[a,s]=n(),[l]=Va(),{sessionModel:c}=i,u=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],d=Object.keys(i).filter((e=>u.includes(e)));if(d.length)throw new Error('Option "'.concat(d.join(", "),'" is not applicable for existing objects.'));return r((()=>{let e=!1,n=()=>{};return async function(){const r=await Promise.resolve(c||async function(e){return l.get(e)||await t.getObject(e)}(o));if(!e){if(!l.get(r.id)){l.set(r.id,r);const e=()=>{l.clear(r.id)};r.once("closed",e),n=()=>{r.removeListener("closed",e)}}s(r)}}(),()=>{e=!0,n()}}),[]),a}const hp={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,autoConfirm:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};function pp(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 fp=["__DO_NOT_USE__"],mp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1};return Q(Q(Q({},Y(e,fp)),n),t)},gp=o(((e,o)=>{let{app:s,fieldIdentifier:l,qId:c,stateName:u,element:d,initialOptions:p,renderedCallback:f}=e;const[m,g]=n(p),{isExistingObject:b,hasExternalSelectionsApi:y}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:c,options:m});b||Object.assign(m,{frequencyMode:pp(m.frequencyMode)});const[v,S]=n(0);r((()=>{if(v)throw new Error("Source or selection Api can not change after a listbox has been mounted");S(v+1)}),[b,y]);const w=b?dp({app:s,qId:c,options:m}):function(e){var t;let{app:o,fieldIdentifier:i,stateName:a,options:s={}}=e;const[l,c]=n(""),[u,d]=n(!0),[p,f]=n(),[m,g]=n(),b=null!==(t=s.title)&&void 0!==t?t:m;let{histogram:y=!1,frequencyMode:v="N"}=s;l&&l.failedToFetchFieldDef&&(y=!1,v="N"),r((()=>{const e=y||"N"!==v;i.qLibraryId&&e?async function(){try{const e=await o.getDimension(i.qLibraryId),t=await e.getLayout();g(t.qDim.title),"N"===t.qDim.qGrouping?c(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""):c({multiFieldDim:!0}),d(!1)}catch(e){throw d(!1),c({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():(d(!1),g(i))}),[]);const{dense:S,checkboxes:w,listLayout:C,properties:x={}}=s,E={dense:S};"horizontal"===C&&(E.dataLayout="grid",E.layoutOrder="column",E.maxVisibleColumns={auto:!0},E.maxVisibleRows={auto:!1,maxRows:1});const k=h();k.current||(k.current=Th());const L=Ge(!0,{},hp,{qInfo:{qId:k.current},qListObjectDef:{qStateName:a,qFrequencyMode:y&&"N"===v?"V":v},histogram:y,checkboxes:w,layoutOptions:E,title:b});let R;if(Ge(!0,L,x),i.qLibraryId?(L.qListObjectDef.qLibraryId=i.qLibraryId,R=i.qLibraryId):(L.qListObjectDef.qDef.qFieldDefs=[i],R=i),"P"!==v&&y)if(null!=l&&l.multiFieldDim)L.frequencyMax="fetch";else{const e=i.qLibraryId?l:R;L.frequencyMax={qValueExpression:vc(e)}}const[q]=Ka(L,u?null:o,R,a);return r((()=>{q&&f(q)}),[q]),p}({app:s,fieldIdentifier:l,stateName:u,options:m}),C=h(d),x=y?m.selectionsApi:lu(s,w,[C,".njs-action-toolbar-more",".njs-action-toolbar-popover"],m)[0],E=i((()=>Q(Q({},m),{},{selections:x,model:w,app:s,renderedCallback:f})),[m,x,w,s]);return a(o,(()=>({setOptions:e=>g(e)})),[]),x&&w?t.createElement(up,{options:E}):null}));const bp={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function yp(e){let{app:r,fieldIdentifier:o,stateName:i,element:a,options:s={}}=e;const[l,c]=n(!!s.show);return t.createElement(dh,{show:l,app:r,alignTo:{current:a},anchorOrigin:s.anchorOrigin,transformOrigin:s.transformOrigin,close:()=>{c(!1),s.onPopoverClose&&s.onPopoverClose()},fieldName:o,stateName:i,autoFocus:s.autoFocus,components:s.components,sortCriteria:s.sortCriteria,direction:s.direction})}function vp(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Sp(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}const wp=e=>({qDef:{qFieldDefs:[e]}}),Cp=e=>({qDef:{qDef:e}});function xp(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,i={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r="string"==typeof e?wp(e):Q(Q({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||Th(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<i.maxDimensions()?(t.qDimensions.push(r),vp(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return Sp(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?Cp(e):Q(Q({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Th(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<i.maxMeasures()?(t.qMeasures.push(r),vp(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];Sp(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<i.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<i.maxMeasures()};return i}const Ep=e=>({qDef:{qFieldDefs:[e]}});function kp(e){let{dc:t,def:n,properties:r}=e;t.qInitialDataFetch=t.qInitialDataFetch||[];const o=r,i={dimensions:()=>t.qLibraryId||t.qDef&&t.qDef.qFieldDefs&&0!==t.qDef.qFieldDefs.length?[t]:[],measures:()=>[],addDimension(e){const r="string"==typeof e?Ep(e):Q(Q({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||Th(),r.qDef.qSortCriterias=t.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(r).forEach((e=>{t[e]=r[e]})),n.dimensions.added(r,o),r},removeDimension(e){const r=t;return delete t.qDef,delete t.qLibraryId,n.dimensions.removed(r,o,e),r},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===i.dimensions().length,canAddMeasure:()=>!1};return i}const Lp=e=>({qDef:{qFieldDefs:[e]}}),Rp=e=>{let t;return t="string"==typeof e?Ge(!0,{},hp,{qListObjectDef:Lp(e)}):e.qListObjectDef?Ge(!0,{},hp,e):Ge(!0,{},hp,{qListObjectDef:e}),t};function qp(e){let{children:t,halo:n}=e;const r={async addDimension(e){const r=Rp(e),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||Th(),!r.title)if(o.qLibraryId){const e=await n.app.getDimension(o.qLibraryId),t=await e.getProperties();t.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:t.qDim.qLabelExpression}}:r.title=t.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}t.push({qProperty:r,qChildren:[]})},addMeasure(){}};return r}function Ip(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 Tp(e,t){let{sn:n,properties:r,fields:o,children:i}=e;if(!o.length)return;const a=n.qae.data.targets[0];if(!a)return;const{propertyPath:s}=a,l=s.split("/");let c=r;for(let e=0;e<l.length;e++){const t=l[e];c=t?c[t]:c}const u=function(e){return e.match("/qListObjectDef")?kp:e.match("/qChildListDef")?qp:xp}(s),d=u({dc:c,def:a,properties:r,children:i,halo:t});for(let e=0;e<o.length;++e){const t=o[e];"measure"===Ip(t)?await d.addMeasure(t):await d.addDimension(t)}}var Op={getValue:(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},setValue:(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var _p={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 Pp=2**53-1;function Dp(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Ap(e,t){const n=Ge(!0,{},t,e);return Op.getValue(n,"qOtherTotalSpec.qOtherCounted")||Op.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),Op.getValue(n,"qOtherTotalSpec.qOtherLimit")||Op.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Mp(e,t){return Ge(!0,{},t,e)}function Np(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var jp={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===Op.getValue(e,t)&&Op.setValue(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Dp,importCommonProperties:function(e,t,n){const r="masterobject"===Op.getValue(t,"properties.qInfo.qType")?"masterobject":Op.getValue(n,"qInfo.qType");Op.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:Ap,createDefaultMeasure:Mp,resolveValue:Np,getHypercubePath:function(e){const t=Op.getValue(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(_p.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,_p.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=Ge(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?Op.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Dp(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=Ge(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=Np(i.max,r.dimensions.length,Pp),s=Np(i.min,r.dimensions.length,0);return{maxDimensions:Np(o.max,a,Pp),minDimensions:Np(o.min,s,0),maxMeasures:a,minMeasures:s}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.dimensions.length;++s)o.qDimensions.length<n?o.qDimensions.push(Ap(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Ap(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.excludedDimensions[s],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.measures.length;++s)o.qMeasures.length<n?o.qMeasures.push(Mp(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Mp(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.excludedMeasures[s],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=Op.getValue(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=Op.getValue(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var zp={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=Op.getValue(o,n||""),a=i.qHyperCubeDef,s=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),s.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&s.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),s.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&s.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),s.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();_p.isOrderedSubset(e,s.interColumnSortOrder)&&(s.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(jp.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!Op.isEmpty(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},s=jp.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=Op.getValue(n,i||"").qHyperCubeDef,c=Op.getValue(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p}=jp.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=jp.getDefaultDimension(),defaultMeasure:m=jp.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,jp.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p})&&jp.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p,newHyperCubeDef:c}),jp.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:f}),jp.addDefaultMeasures({exportFormat:t,maxMeasures:h,minMeasures:p,newHyperCubeDef:c,defaultMeasure:m}),jp.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),jp.copyPropertyIfExist("qMaxStackedCells",l,c),jp.copyPropertyIfExist("qNoOfLeftDims",l,c),jp.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),jp.copyPropertyOrSetDefault("qMode",l,c,"S"),jp.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),jp.copyPropertyOrSetDefault("qSortbyYValue",l,c),jp.copyPropertyOrSetDefault("qIndentMode",l,c),jp.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),jp.importCommonProperties(s,t,n),jp.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),jp.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const Fp=e=>Op.getValue(e,"data.targets.0.propertyPath"),$p=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zp.exportProperties})(Fp(e))},Bp=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zp.importProperties})(Fp(e))},Wp=async e=>{let{halo:t,model:n,cellRef:r,newType:o,properties:i,viewDataMode:a=!1}=e;const s=i?{qProperty:i}:await n.getFullPropertyTree(),l=r.current.getQae(),c=$p(l);if(!c)throw new Error("Source chart does not support conversion");const u=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),d=u.qae,h=Bp(d);if(!h)throw new Error("Target chart does not support conversion");return h({exportFormat:c({propertyTree:s,hypercubePath:jp.getHypercubePath(l),viewDataMode:a}),initialProperties:Q({qInfo:{qType:o},visualization:o},Op.getValue(d,"properties.initial",{})),dataDefinition:Op.getValue(d,"data.targets.0.",{}),hypercubePath:jp.getHypercubePath(d),viewDataMode:a})},Hp={hypercube:zp},Up=Ge.bind(null,!0),Gp={},{isArray:Vp}=Array;function Kp(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Jp(e){return void 0===e}function Zp(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Xp(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Jp(e[r||t])?i:e[t],e=e[r||t]})),e}function Qp(e,t){let n=!0;if(Kp(e)&&Kp(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Qp(e[r],t[r])||(n=!1)})),n);if(Vp(e)&&Vp(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Qp(e[n],t[n]))return!1;return!0}return e===t}Gp.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Up({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);Qp(i,a)||Zp(t,o)||(Jp(a)?r.push({op:"add",path:s,value:i}):Kp(i)&&Kp(a)?r=r.concat(Gp.generate(a,i,s)):Vp(i)&&Vp(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]&&Jp(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(Qp(t,o))return r;if(!Jp(t[0])&&Jp(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(Gp.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((o=>{Jp(t[o])&&!Zp(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Gp.apply=function(e,t){t.forEach((t=>{let n=Xp(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Vp(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Vp(o)&&Vp(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Kp(o)&&Kp(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Zp(a,e)&&delete a[e]})),Up(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=Xp(e,t.from);Vp(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Vp(n)?n.splice(+r,1):delete n[r]);var a}))},Gp.clone=function(e){return Up({},e)},Gp.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},Gp.updateObject=function(e,t){Object.keys(e).length?Gp.apply(e,Gp.generate(e,t)):Up(e,t)};const Yp=e=>t=>{const n=(r=Q(Q({},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(le.prototype).forEach((e=>{r[e]=le.prototype[e]})),le.init(r),r);var r;return n};let ef,tf;function nf(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 rf(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null},contraintsWarning:!0}}function of(e){sf(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 af(e){if(e.__hooks.obsolete)return Promise.resolve();tf=-1,ef=e,ef.__hooks.initiated&&ef.__hooks.list.length;try{ef.fn.call(null)}catch(e){console.error(e)}ef.__hooks.initiated=!0;const t=ef.__hooks;return df(ef),tf=void 0,ef=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){sf(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){sf(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 sf(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 lf(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 cf(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 uf(e){return e.__hooks.imperativeHandle}function df(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function hf(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,df(e))}function pf(e){if(void 0===ef)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=ef.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function ff(e){pf(++tf);return ef.context[e]}function mf(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function gf(e){return{__hooked:!0,fn:e,initiate:rf,run:af,teardown:of,runSnaps:lf,runMenu:cf,focus:Kf,blur:Jf,observeActions:hf,getImperativeHandle:uf,updateRectOnNextRun:mf}}function bf(e){const t=pf(++tf);if(!t.value){t.component=ef;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,af(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function yf(e,t){const n=pf(++tf);nf(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===ef.__hooks.pendingEffects.indexOf(n)&&ef.__hooks.pendingEffects.push(n))}function vf(e,t){const n=pf(++tf);nf(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],ef.__hooks.pendingLayoutEffects.push(n))}function Sf(e,t){const n=pf(++tf);return nf(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function wf(e){return Sf((()=>({current:e})),[])}function Cf(e,t){const[n,r]=bf((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=pf(++tf);return o.component||(o.component=ef),vf((()=>{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 xf(){return ff("element")}function Ef(){const e=xf(),t=ef.__hooks.resizer,[n,r]=bf((()=>{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()),vf((()=>{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 kf(){return ff("layout")}function Lf(){const e=ff("layout"),[t]=bf({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function Rf(){return ff("appLayout")}function qf(){const e=ff("model");return e&&e.session?e:void 0}function If(){const e=ff("app");return e&&e.session?e:void 0}function Tf(){const e=ff("global");return e&&e.session?e:void 0}function Of(){return ff("selections")}function _f(){return ff("theme")}function Pf(){return ff("nebbie")}function Df(){return ff("translator")}function Af(){return ff("deviceType")}function Mf(){return ff("navigation")}function Nf(){return ff("plugins")}function jf(e,t){const[n]=bf({action(){n._config.action.call(null)}});return n.component||(n.component=ef,ef.__hooks.actions.list.push(n)),Sf((()=>{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 zf(){return ff("constraints")}function Ff(){return ff("interactions")}function $f(){return ff("options")}function Bf(e,t){const n=pf(++tf);if(n.imperative||(n.imperative=!0),nf(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],ef.__hooks.imperativeHandle=r}}function Wf(e){const t=pf(++tf);t.value||(t.value=1,ef.__hooks.snaps.push(t)),t.fn=e}function Hf(e){const t=pf(++tf);t.value||(t.value=1,ef.__hooks.menus.push(t)),t.fn=e}function Uf(){pf(++tf);const e=ef.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Gf(){return ff("emitter")}function Vf(){const e=ff("keyboardNavigation"),t=ff("focusHandler");if(!ef.__hooks.accessibility.exitFunction){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&n.active&&(Jf(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(ef);ef.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Kf(this))}.bind(ef);ef.__hooks.accessibility.focusFunction=n;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(ef);ef.__hooks.accessibility.focusSelectionFunction=r}const n=ef.__hooks.accessibility.focusFunction,r=ef.__hooks.accessibility.exitFunction,o=ef.__hooks.accessibility.focusSelectionFunction,[i,a]=bf({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return ef.__hooks.accessibility.setter=a,ef.__hooks.accessibility.enabled=e,yf((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Kf(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 Jf(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 Zf={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Xf=Object.keys(Zf),Qf=e=>(Object.keys(le.prototype).forEach((t=>{e[t]=le.prototype[t]})),le.init(e),e);function Yf(e,t){const n=Q({},Zf);Qf(n);const r={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==Xf.indexOf(t)?n[t]=e.component[t].bind(r):r[t]=e.component[t]}));const o=function(e){let{sn:t,component:n}=e;const r={},o=[],i=Yp(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:r}),i=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(r,{model:t.model,app:t.app,global:i,selections:t.selections,actions:o.actions}),Object.assign(n,{actions:o.actions,model:t.model,app:t.app,selections:t.selections}),[n,o]}function em(e,t,n){"function"==typeof e.component&&(e.component=gf(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const i={},a=["appLayout","constraints","interactions"],s={},l={};t.model&&t.model.session||(s.select=!0,s.edit=!0,l.select=!1,l.edit=!1);const c={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,navigation:t.navigation,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,externalFocusManagement:t.externalFocusManagement||!1,focusHandler:t.focusHandler,constraints:s,interactions:l,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(c,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(Q(Q({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(Q(Q({},r[e]),l))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=c.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n,r){return e.component.runMenu(this,t,n,r)},focus(){const t=e.component.getImperativeHandle(this);t&&"function"==typeof t.focus?t.focus():e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach((e=>{i[e]=JSON.stringify(c.context[e])})),i.themeName=c.context.theme?c.context.theme.name():void 0,i.language=c.context.translator?c.context.translator.language():void 0,Object.assign(c,{selections:t.selections}),[c,null]}(e,t,n):Yf(e,t),i=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];try{e.qae.properties.onChange.call({model:t.model},...r)}catch(e){}return t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=Gp.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Gp.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const s=Gp.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,s,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.__snInterceptor&&(t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor)},i.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){i.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const tm=1e3,nm=1e3,rm=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],om=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map((e=>{let[t,n]=e;return t+(Math.random()*(n-t)|0).toString(32)})).join(""),im=(e,t)=>e&&e.find((e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t}))||null,am=e=>{var t,n;return Q(Q({},e),{},{qDef:Q(Q({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:om()})})},sm=e=>{var t;return Q(Q({},am(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},lm=(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]}))},cm=new Error("Not supported in this object, need to implement in subclass."),um=e=>{if(!e)return[];return[...e].map((e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?Q(Q({},e),{},{qDef:Q(Q({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e}))},dm=(e,t)=>{if(e)return t&&Op.getValue(e,t)?Op.getValue(e,t).qHyperCube:e.qHyperCube};function hm(e,t){return e.filter(((e,n)=>t.includes(n)))}function pm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeDimensions(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function fm(e,t,n){_p.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function mm(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 gm(e,t){return e.getAlternativeDimensions().length+t.length>=tm}function bm(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<tm}async function ym(e,t,n,r,o,i){await e.autoSortDimension(t),_p.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 vm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeMeasures(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function Sm(e,t){_p.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function wm(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<nm}function Cm(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 xm{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=im(n,e.id))&&void 0!==t?t:im(r,e.id)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw cm}addDimensions(){throw cm}removeDimension(){throw cm}removeDimensions(){throw cm}autoSortDimension(){throw cm}replaceDimension(){throw cm}getSorting(){throw cm}createLibraryDimension(e){let t=Ge(!0,{},this.dimensionProperties||{},e.defaults||{});return t=sm(t),t.qLibraryId=e.id,t.qDef.autoSort=!0,t.qDef.qSortCriterias=rm,delete t.qDef.qFieldDefs,delete t.qDef.qFieldLabels,t}createFieldDimension(e){let t=Ge(!0,{},this.dimensionProperties||{},e.defaults||{});return t=sm(t),e.field||(t.qDef.qFieldDefs=[],t.qDef.qFieldLabels=[],t.qDef.qSortCriterias=[]),t.qDef.qFieldDefs=[e.field],t.qDef.qFieldLabels=e.label?[e.label]:[""],t.qDef.qSortCriterias=rm,t.qDef.autoSort=!0,t}addFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t)}addFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t)}addLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t)}addLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t)}async addAltLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t,!0)}async addAltFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t,!0)}addAlternativeFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t,!0)}addAlternativeLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t,!0)}minDimensions(){return"function"==typeof this.dimensionDefinition.min?this.dimensionDefinition.min.call(null,this.properties,this):this.dimensionDefinition.min||0}maxDimensions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.getMeasures().length-e;if("function"==typeof this.dimensionDefinition.max){var n;const e=[t];return null===(n=this.dimensionDefinition.max)||void 0===n?void 0:n.apply(null,e)}return Number.isNaN(+this.dimensionDefinition.max)?1e4:this.dimensionDefinition.max}canAddDimension(){return this.getDimensions().length<this.maxDimensions()}getMeasures(){return[]}getAlternativeMeasures(){throw new Error("Method not implemented.")}addMeasure(){throw cm}addMeasures(){throw cm}removeMeasure(){throw cm}removeMeasures(){throw cm}autoSortMeasure(){throw cm}replaceMeasure(){throw cm}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=im(n,e.id))&&void 0!==t?t:im(r,e.id)}createExpressionMeasure(e){var t,n;const r=Ge(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},r.qDef.qDef=e.expression,r.qDef.qLabel=e.label,r.qDef.autoSort=!0,r}addExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t)}addExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t)}createLibraryMeasure(e){var t,n;const r=Ge(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},(e=>{const t=e;t.quarantine={qNumFormat:t.qNumFormat||{},isCustomFormatted:t.isCustomFormatted||!1},t.qNumFormat=null,t.isCustomFormatted=void 0})(r.qDef),r.qLibraryId=e.id,r.qDef.autoSort=!0,delete r.qDef.qDef,delete r.qDef.qLabel,r}addLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t)}addLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t)}addAltLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t,!0)}addAltExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t,!0)}addAlternativeExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t,!0)}addAlternativeLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t,!0)}minMeasures(){return"function"==typeof this.measureDefinition.min?this.measureDefinition.min.call(null,this.properties,this):this.measureDefinition.min||0}maxMeasures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("function"==typeof this.measureDefinition.max){const t=[this.getDimensions().length-e];return this.measureDefinition.max.apply(null,t)}return Number.isNaN(+this.measureDefinition.max)?1e4:this.measureDefinition.max}canAddMeasure(){return this.getMeasures().length<this.maxMeasures()}updateGlobalChangeListeners(e){this.globalChangeListeners&&(this.globalChangeListeners||[]).forEach((t=>{t&&"function"==typeof t&&t(this.properties,this,{layout:e})}))}}function Em(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then((async()=>(fm(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 km(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((()=>(Sm(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 Lm(e,t){!function(e,t){_p.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 Rm(e,t){!function(e,t){_p.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 qm(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 Im(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),Sm(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 Tm extends xm{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?Op.getValue(e,"".concat(this.path,".qHyperCubeDef")):e.qHyperCubeDef,this.hcProperties&&(!function(e){var t,n,r,o,i,a,s;const l=e;l.hcProperties.qDimensions=null!==(t=l.getDimensions())&&void 0!==t?t:[],l.hcProperties.qMeasures=null!==(n=l.getMeasures())&&void 0!==n?n:[],l.hcProperties.qInterColumnSortOrder=null!==(r=l.hcProperties.qInterColumnSortOrder)&&void 0!==r?r:[],l.hcProperties.qLayoutExclude=null!==(o=l.hcProperties.qLayoutExclude)&&void 0!==o?o:{qHyperCubeDef:{qDimensions:[],qMeasures:[]}},l.hcProperties.qLayoutExclude.qHyperCubeDef=null!==(i=l.hcProperties.qLayoutExclude.qHyperCubeDef)&&void 0!==i?i:{qDimensions:[],qMeasures:[]},l.hcProperties.qLayoutExclude.qHyperCubeDef.qDimensions=null!==(a=l.getAlternativeDimensions())&&void 0!==a?a:[],l.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=null!==(s=l.getAlternativeMeasures())&&void 0!==s?s:[]}(this),function(e){const t=e;t.hcProperties.isHCEnabled&&0===t.hcProperties.qDynamicScript.length&&"S"===t.hcProperties.qMode&&(t.hcProperties.qDynamicScript=[])}(this),this.hcProperties.qDimensions=um(this.hcProperties.qDimensions),this.hcProperties.qMeasures=um(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=dm(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e){const t=sm(e.dimension);return bm(this,e.alternative)?pm(this,t,e.index):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?Em(e,t,o):Promise.resolve(t)}(this,t,e.index)}async addDimensions(e){const t=this.getDimensions(),n=t.length,r=[];let o=0;const{dimensions:i}=e;var a,s=!1,l=!1;try{for(var c,u=V(i);s=!(c=await u.next()).done;s=!1){const i=c.value;{if(gm(this,t))return r;const a=sm(i);if(bm(this,e.alternative||!1)){const e=await pm(this,a);r.push(e)}else t.length<this.maxDimensions()&&(await ym(this,a,n,t,r,o),o++)}}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}return r}removeDimension(e){const{alternative:t,index:n}=e;t&&qm(this,n),Lm(this,n)}async removeDimensions(e){const t=this.getAlternativeDimensions(),n=this.getDimensions();if(0===e.indexes.length)return[];let r=[];const o=[...e.indexes].sort(((e,t)=>t-e));if(e.alternative&&t.length>0){r=hm(t,e.indexes);var i,a=!1,s=!1;try{for(var l,c=V(o);a=!(l=await c.next()).done;a=!1){const e=l.value;await qm(this,e)}}catch(e){s=!0,i=e}finally{try{a&&null!=c.return&&await c.return()}finally{if(s)throw i}}}else if(n.length>0){r=hm(n,e.indexes);var u,d=!1,h=!1;try{for(var p,f=V(o);d=!(p=await f.next()).done;d=!1){const e=p.value;await Lm(this,e)}}catch(e){h=!0,u=e}finally{try{d&&null!=f.return&&await f.return()}finally{if(h)throw u}}}return r}replaceDimension(e){const{index:t,dimension:n}=e;return this.autoSortDimension(n).then((()=>function(e,t,n){if(!n)return;const r=e.getDimensions(),o=r[t],i=Q(Q({},n),{},{qDef:Q(Q({},n.qDef),{},{cId:om()})});return r[t]=i,i&&"function"==typeof e.dimensionDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertDimension(e){const t=am(e.dimension);return bm(this,e.alternative)?pm(this,t,e.index).then((()=>{mm(this,t)})):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?(r.splice(o,0,t),fm(e,r),mm(e,t)):Promise.resolve(t)}(this,t,e.index)}moveDimension(e){const t=this.getDimensions(),n=this.getAlternativeDimensions();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(_p.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Promise.resolve(Cm(e.fromIndex,e.toIndex,t,n)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;_p.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}autoSortDimension(e){return e.qLibraryId?function(e,t){return e.app.getDimensionList().then((n=>{const r=(null==t?void 0:t.qLibraryId)&&(o=t.qLibraryId,(i=n)&&i.find((e=>e.qInfo.qId===o))||null);var o,i;return r&&lm(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&&lm([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=dm(this.layout,this.path);return e?e.qMeasureInfo:[]}getMeasureLayout(e){return this.getMeasureLayouts().filter((t=>e===t.cId))[0]}addMeasure(e){const t=am(e.measure);if(wm(this,e.alternative)){return vm(t,this.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures,e.index)}return km(this,t,e.index)}autoSortMeasure(e){const t=e;return t.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},Promise.resolve(t)}addMeasures(e){const t=this.getMeasures(),n=[];let r=0;return e.measures.forEach((async o=>{if(function(e,t){return e.getAlternativeMeasures().length+t.length>=nm}(this,t))return!1;const i=am(o);return wm(this,e.alternative||!1)?(vm(this,i),n.push(i)):t.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=Q({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},_p.indexAdded(e.hcProperties.qInterColumnSortOrder,i.length+n.length+o),n.push(a),r.push(a),"function"==typeof e.measureDefinition.add&&e.measureDefinition.add.call(null,a,e.properties,e),Promise.resolve(r)}(this,i,t,n,r),r++),!0})),n}removeMeasure(e){const{index:t,alternative:n}=e;n&&function(e,t){e.getAlternativeMeasures().splice(t,1)}(this,t),Rm(this,t)}async removeMeasures(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();let r=[];if(0===e.length)return r;if(e.alternative&&n.length>0)r=hm(n,e.indexes),function(e,t){const n=e,r=function(e,t){return e.filter(((e,n)=>!t.includes(n)))}(n.getAlternativeMeasures(),t);n.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=r}(this,e.indexes);else if(t.length>0){r=hm(t,e.indexes);const n=[...e.indexes].sort(((e,t)=>t-e));var o,i=!1,a=!1;try{for(var s,l=V(n);i=!(s=await l.next()).done;i=!1){const e=s.value;await Rm(this,e)}}catch(e){a=!0,o=e}finally{try{i&&null!=l.return&&await l.return()}finally{if(a)throw o}}}return r}replaceMeasure(e){const{index:t,measure:n}=e;return this.autoSortMeasure(n).then((()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=Q(Q({},n),{},{qDef:Q(Q({},n.qDef),{},{cId:om()})});return r[t]=i,i&&"function"==typeof e.measureDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertMeasure(e){const t=am(e.measure);return wm(this,e.alternative)?vm(this,t,e.index):Im(this,t,e.index)}moveMeasure(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(_p.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Cm(e.fromIndex,e.toIndex,t,n):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;_p.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}setSorting(e){e&&e.length===this.hcProperties.qInterColumnSortOrder.length&&(this.hcProperties.qInterColumnSortOrder=e)}getSorting(){return this.hcProperties.qInterColumnSortOrder}changeSorting(e){Op.move(this.hcProperties.qInterColumnSortOrder,e.fromIndex,e.toIndex)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}setHCEnabled(e){this.hcProperties&&(this.hcProperties.isHCEnabled=e)}getDynamicScripts(){var e;return(null===(e=this.hcProperties)||void 0===e?void 0:e.qDynamicScript)||[]}}const Om=()=>{};function _m(e,t){return void 0===e?()=>t:()=>e}function Pm(e){const t=e||{};return{min:"function"==typeof t.min?t.min:_m(t.min,0),max:"function"==typeof t.max?t.max:_m(t.max,1e3),added:t.added||t.add||Om,description:t.description||Om,moved:t.moved||t.move||Om,removed:t.removed||t.remove||Om,replaced:t.replaced||t.replace||Om,isDefined:()=>!!e}}const Dm=(e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o};function Am(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>Dm(e,n,{}),dimensions:Pm(e.dimensions),measures:Pm(e.measures)}}function Mm(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);return{properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(Am)},exportProperties:t.exportProperties,importProperties:t.importProperties}}function Nm(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:Mm(n.qae),component:n.component||{},create:e=>em(r,e,t),definition:t.flags.isEnabled("NEBULA_DATA_HANDLERS")?{dataHandler:e=>new Tm(e)}:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var jm=e=>os((e=>Q(Q({},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 zm(e){let{d:n}=e;const r=ma();let o="inherit",i=r.palette.success.main;n.missing?i=r.palette.warning.main:n.error&&(o="error",i=r.palette.error.main);const a={color:i},s=t.createElement(C,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(W,null,n.missing||n.error?t.createElement(jm,{style:a}):t.createElement(Cs,{style:a})));return t.createElement(k,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(k,{item:!0},s),t.createElement(k,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(C,{noWrap:!0,component:"p"},t.createElement(C,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(C,{component:"span"}," "),t.createElement(C,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Fm(e){let{data:n}=e;const r=ma();return t.createElement(k,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(zm,{d:e,key:n})));return o.length>0&&t.createElement(k,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(C,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function $m(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(k,{item:!0},t.createElement(jm,{style:{fontSize:"38px"}})),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(k,{item:!0},t.createElement(C,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Fm,{data:o}))}const Bm=["size"],Wm="Progress",Hm={root:"".concat(Wm,"-root"),front:"".concat(Wm,"-front"),back:"".concat(Wm,"-back")},Um=ga("div")((e=>{let{theme:t}=e;return{["&.".concat(Hm.root)]:{position:"relative",display:"inline-block"},["& .".concat(Hm.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Hm.back)]:{color:t.palette.divider}}})),Gm={small:16,medium:32,large:64,xlarge:128};function Vm(e){let{size:n="medium"}=e,r=Y(e,Bm);const o=Gm[n];return t.createElement(Um,{className:Hm.root},t.createElement(B,Z({variant:"determinate",value:100,className:Hm.back,size:o,thickness:3},r)),t.createElement(B,Z({variant:"indeterminate",disableShrink:!0,className:Hm.front,size:o,thickness:3},r)))}const Km=["cancel","translator"],Jm=["retry","translator"],Zm={stripes:"".concat("LongRunningQuery","-stripes")},Xm=ga(k)((()=>({["& .".concat(Zm.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 Qm(e){let{cancel:n,translator:r}=e,o=Y(e,Km);return t.createElement(t.Fragment,null,t.createElement(Xm,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(k,{item:!0},t.createElement(Vm,null)),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(k,Z({item:!0},o),t.createElement(F,{variant:"contained",onClick:n},r.get("Cancel"))))}function Ym(e){let{retry:n,translator:r}=e,o=Y(e,Jm);return t.createElement(t.Fragment,null,t.createElement(k,{item:!0},t.createElement(jm,{style:{fontSize:"38px"}})),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(k,{item:!0},t.createElement(F,Z({variant:"contained",onClick:n},o),r.get("Retry"))))}function eg(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=s($a);return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:Zm.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(Qm,{cancel:o.cancel,translator:i,className:Zm.cancel}),r&&t.createElement(Ym,{retry:o.retry,translator:i,className:Zm.retry}))}function tg(){return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(Vm,{size:"large"}))}const ng={width:0,height:0},rg="Header",og={containerStyle:"".concat(rg,"-containerStyle"),containerTitleStyle:"".concat(rg,"-containerTitleStyle")},ig=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(og.containerStyle)]:{flexGrow:0},["&.".concat(og.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),ag="njs-cell-title",sg="njs-cell-sub-title";function lg(e){let{id:o,layout:i,sn:a,anchorEl:s,hovering:l,focusHandler:c,titleStyles:u={},isRtl:d,translator:h}=e;const p=i.showTitles&&!!i.title,f=i.showTitles&&!!i.subtitle,m=i.qSelectionInfo&&i.qSelectionInfo.qInSelections,[g,b]=n([]);r((()=>{a&&a.component&&a.component.isHooked&&a.component.observeActions((e=>{b([...e,...a&&a.selectionToolbar&&a.selectionToolbar.items||[]])}))}),[a]);const y=[og.containerStyle,...p||f?[og.containerTitleStyle]:[]],v=l||m,S=t.createElement(Xc,{show:!1,selections:{show:m,api:a.component.selections,onKeyDeactivate:c.refocusContent},actions:g,popover:{show:v,anchorEl:s},focusHandler:c,layout:i,isRtl:d});return t.createElement(ig,{item:!0,container:!0,wrap:"nowrap",className:y.join(" ")},t.createElement(k,{item:!0,zeroMinWidth:!0,xs:!0,dir:d?"rtl":"ltr"},t.createElement(k,{container:!0,wrap:"nowrap",direction:"column"},p?t.createElement(L,{title:i.title},t.createElement(C,{id:"".concat(o,"_title"),variant:"h6",noWrap:!0,className:ag,style:u.main},i.title)):t.createElement("div",{id:"".concat(o,"_title"),style:ng,"aria-label":h.get("Accessibility.Object.NoTitle")}),f&&t.createElement(L,{title:i.subtitle},t.createElement(C,{variant:"body2",noWrap:!0,className:sg,style:u.subTitle},i.subtitle)))),t.createElement(k,{item:!0},S))}const cg="condition",ug="search",dg="clear_selection",hg="matches_exactly",pg="starts_with",fg="ends_with",mg="beginning_of_word",gg="general",bg="fixed_value",yg=(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 ug:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case mg:o="*^",i="*";break;case fg:o="*";break;case pg:i="*";break;case hg:break;default:o="*",i="*"}const a=null!==(n=null===(r=e.options.values)||void 0===r?void 0:r[0])&&void 0!==n?n:"";return""!==a?'"'.concat(o).concat(a).concat(i,'"'):""})(e);break;case cg:o+=(e=>{var t,n,r,o,i,a,s;const{options:l}=e,c=(null==l?void 0:l.mode)===gg,u=(null==l||null===(t=l.modifier)||void 0===t?void 0:t.type)===bg,d=null!=l&&null!==(n=l.modifier)&&void 0!==n&&n.operator?l.modifier.operator.split(" "):[];if(0===d.length||!u&&(null===(r=l.firstValue)||void 0===r||!r.aggregator||null===(o=l.firstValue)||void 0===o||!o.field)||u&&(null===(i=l.firstValue)||void 0===i||!i.fixedValue)||c&&(null===(a=l.conditionField)||void 0===a||!a.aggregator||null===(s=l.conditionField)||void 0===s||!s.field))return"";let h,p,f="=";var m,g,b;if(c&&u)h="".concat(null===(m=l.conditionField)||void 0===m?void 0:m.aggregator,"(").concat(yc(null===(g=l.conditionField)||void 0===g?void 0:g.field),")"),p="".concat(null===(b=l.firstValue)||void 0===b?void 0:b.fixedValue);else if(!c&&u){var y;h="",p="".concat(null===(y=l.firstValue)||void 0===y?void 0:y.fixedValue),f=""}else if(c||u){var v,S,w,C;h="".concat(null===(v=l.conditionField)||void 0===v?void 0:v.aggregator,"(").concat(yc(null===(S=l.conditionField)||void 0===S?void 0:S.field),")"),p="".concat(null===(w=l.firstValue)||void 0===w?void 0:w.aggregator,"(").concat(yc(null===(C=l.firstValue)||void 0===C?void 0:C.field),")")}else{var x,E;h="".concat(yc(e.field)),p="".concat(null===(x=l.firstValue)||void 0===x?void 0:x.aggregator,"(total ").concat(yc(null===(E=l.firstValue)||void 0===E?void 0:E.field),")")}const k="".concat(f).concat(h).concat(d[0]).concat(p);let L="";if(d.length>1){var R,q,I;if(!u&&(null===(R=l.secondValue)||void 0===R||!R.aggregator||null===(q=l.secondValue)||void 0===q||!q.field)||u&&(null===(I=l.secondValue)||void 0===I||!I.fixedValue))return"";let e,t;var T;if(c&&u)e="".concat(null===(T=l.secondValue)||void 0===T?void 0:T.fixedValue),t=" and ".concat(h);else if(!c&&u){var O;e="".concat(null===(O=l.secondValue)||void 0===O?void 0:O.fixedValue),t=""}else if(c||u){var _,P;e="".concat(null===(_=l.secondValue)||void 0===_?void 0:_.aggregator,"(").concat(yc(null===(P=l.secondValue)||void 0===P?void 0:P.field),")"),t=" and ".concat(h)}else{var D,A;e="".concat(null===(D=l.secondValue)||void 0===D?void 0:D.aggregator,"(total ").concat(yc(null===(A=l.secondValue)||void 0===A?void 0:A.field),")"),t=" and ".concat(h)}L="".concat(t).concat(d[1]).concat(e)}return'"'.concat(k).concat(L,'"')})(e);break;case dg:o+=t.get("Object.FilterLabel.All");break;default:o+=null!==(r=e.options)&&void 0!==r&&r.values?e.options.values.join(", "):t.get("Object.FilterLabel.Unknown")}return""!==o&&(o=o.replace(/^"|"$/g,""),e.exclude&&(o="".concat(n," ").concat(o))),{field:e.field,label:o}})).filter((e=>""!==e.label))},vg=(e,t)=>yg(e,t).map((e=>"".concat(e.field,": ").concat(e.label))).join("; ");var Sg=e=>os((e=>Q(Q({},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 wg(e){let{styles:n,children:r}=e;return t.createElement(C,{noWrap:!0,variant:"body2",style:Q(Q({},n),{},{fontStyle:"italic"})},r)}function Cg(e){var n;let{layout:r,translator:o,filtersFootnoteString:i,footerStyle:a,isRtl:s}=e;const l=yg(null!==(n=null==r?void 0:r.filters)&&void 0!==n?n:[],o),c={color:null==a?void 0:a.color,fontFamily:null==a?void 0:a.fontFamily,fontSize:null==a?void 0:a.fontSize,fontWeight:null==a?void 0:a.fontWeight};return t.createElement(L,{title:i},t.createElement(k,{container:!0,wrap:"nowrap",sx:{backgroundColor:null==a?void 0:a.backgroundColor,padding:null==a?void 0:a.padding,borderTop:null==a?void 0:a.borderTop},"data-testid":"filters-footnote",justifyContent:s?"flex-end":"flex-start"},t.createElement(k,{item:!0,display:"flex"},t.createElement(Sg,{style:{fontSize:"12px",color:a.color,margin:"auto"}}),t.createElement(wg,{styles:Q(Q({},c),{},{marginLeft:"2px"})},o.get("Object.FiltersApplied")," ")),t.createElement(k,{item:!0,display:"flex"},l.map((e=>t.createElement(k,{container:!0,wrap:"nowrap",key:"".concat(e.field,"-").concat(e.label)},t.createElement(wg,{styles:Q(Q({},c),{},{fontWeight:"bold"})},"".concat(e.field,":")),t.createElement(wg,{styles:c}," ",e.label," ")))))))}const xg={itemStyle:"".concat("Footer","-itemStyle")},Eg=ga(k)((()=>({["& .".concat(xg.itemStyle)]:{minWidth:0,width:"100%"}}))),kg="njs-cell-footer";function Lg(e){var n,r,o;let{layout:i,titleStyles:a={},translator:s,flags:l,isCardTheme:c,isRtl:u}=e;const d=a.footer,h=(null==i||null===(n=i.filters)||void 0===n?void 0:n.length)>0&&(null==i||null===(r=i.qHyperCube)||void 0===r||null===(r=r.qMeasureInfo)||void 0===r?void 0:r.length)>0,p=vg(null!==(o=null==i?void 0:i.filters)&&void 0!==o?o:[],s),f=!(null!=i&&i.footnote)&&h&&p,m=null==l?void 0:l.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),g=c?"1px":"6px";return i&&i.showTitles&&(i.footnote||f)?t.createElement(Eg,{container:!0},t.createElement(k,{item:!0,className:xg.itemStyle,"data-testid":kg,sx:{paddingTop:e=>m?g:e.spacing(1)}},i.footnote&&t.createElement(L,{title:i.footnote},t.createElement(C,{noWrap:!0,variant:"body2",className:kg,style:d,align:u?"right":"left"},i.footnote)),f&&t.createElement(Cg,{layout:i,translator:s,filtersFootnoteString:p,footerStyle:d,isRtl:u}))):null}class Rg{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 qg="njs-viz";function Ig(e){let{sn:o,snOptions:i,snPlugins:a,layout:l,appLayout:u,halo:d,cellId:h}=e;const{component:p}=o,{theme:f,language:m,constraints:g,interactions:b,keyboardNavigation:y}=s($a),[v]=n((()=>new Rg)),[S,w]=n(!1),[C,x]=n(0),[E,k,L]=ns(),[R,q]=n(null),I=c((e=>{e&&q(e)}),[]);return r((()=>{if(R)return p.created({options:i}),p.mounted(R),w(!0),()=>{v.stop(),p.willUnmount()}}),[R,p]),r((()=>{S&&R&&k&&(!p.isHooked&&l&&l.qSelectionInfo&&l.qSelectionInfo.qInSelections||v.schedule((()=>{const e=[];return g.passive||e.push("passive"),g.active||e.push("interact"),g.select||e.push("select"),g.edit||e.push("edit"),d.app&&d.app.session&&e.push("fetch"),Promise.resolve(p.render({layout:l,options:i,plugins:a,embed:d.public.nebbie,context:Q({constraints:g,interactions:b,theme:d.public.theme,appLayout:u,keyboardNavigation:y},p.isHooked?{}:{logicalSize:o.logicalSize({layout:l}),localeInfo:(u||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===C&&"function"==typeof i.onInitialRender&&i.onInitialRender.call(null),x(C+1))}))})))}),[k,i,a,R,L,l,u,f,m,g,b,S,y]),t.createElement("div",{ref:E,"data-render-count":C,style:{position:"relative",height:"100%"},className:qg},t.createElement("div",{ref:I,id:"".concat(h,"_content"),style:{position:"absolute",width:"100%",height:"100%"}}))}const Tg={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"},Og=e=>{let{layout:t,theme:n,app:r,themeName:o,disableThemeBorder:a,queryParams:s}=e;const l=i((()=>{if(t&&n){const o=t.components?t.components.find((e=>"general"===e.key)):null,i=(e=t.visualization,Tg[e.toLowerCase()]?Tg[e.toLowerCase()]:e),l={main:ah(o,"main",n,i),footer:ah(o,"footer",n,i),subTitle:ah(o,"subTitle",n,i)},c=oh(o,n,i),u=rh(o,r,s),d=function(e,t,n,r){const o=Yd(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=Qd("","borderWidth",t,n)),i&&o?"".concat(i," solid ").concat(o):void 0}(o,n,i,a),h=function(e,t,n){return(null==e?void 0:e.borderRadius)||Qd("","borderRadius",t,n)}(o,n,i);return{titleStyles:l,bgColor:c,bgImage:u,border:d,borderRadius:h,boxShadow:ih(o,n,i)}}var e;return{}}),[t,n,r,o,a]);return l};class _g extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const Pg=["action-button","sn-nav-menu","filterpane","sn-shape"],Dg=[...Pg,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],Ag=e=>-1===Pg.indexOf(e),Mg=e=>Ag(e)?"10px 10px 0":"10px 0 0",Ng=e=>{let{layout:t,isError:n,isCardTheme:r,titleStyles:o,translator:i}=e;if(r){var a,s,l;const e=(null==t?void 0:t.showTitles)&&!(null==t||!t.title),r=(null==t?void 0:t.showTitles)&&!(null==t||!t.subtitle),c=(null==t||null===(a=t.filters)||void 0===a?void 0:a.length)>0&&(null==t||null===(s=t.qHyperCube)||void 0===s||null===(s=s.qMeasureInfo)||void 0===s?void 0:s.length)>0,u=null==t?void 0:t.visualization,d=vg(null!==(l=null==t?void 0:t.filters)&&void 0!==l?l:[],i),h=!(null!=t&&t.footnote)&&c&&d,p=(null==t?void 0:t.showTitles)&&(!(null==t||!t.footnote)||h);let f;return e&&(o.main.padding=Mg(u)),r&&(o.subTitle.padding=((e,t)=>{const n=Ag(e);return t?n?"0 10px":"0":Mg(e)})(u,e)),p&&(-1===Pg.indexOf(u)&&(o.footer.borderTop="1px solid #d9d9d9"),o.footer.padding="6px 10px"),(n||-1===Dg.indexOf(u))&&(f="".concat(e||r?"0":"10px"," 10px ").concat(p?"0":"5px")),f}},jg=new Map;[["auto-chart","Object.AutoChart"],["dummy-chart","Dummy"],["barchart","Object.BarChart"],["combochart","Object.ComboChart"],["container","Object.Container"],["distributionplot","Object.DistributionPlot"],["boxplot","Object.BoxPlot"],["filterpane","Object.FilterPane"],["gauge","Object.Gauge"],["histogram","Object.Histogram"],["kpi","Object.Kpi"],["linechart","Object.LineChart"],["listbox","Object.Listbox"],["piechart","Object.PieChart"],["pivot-table","Object.PivotTable"],["map","Object.Map"],["scatterplot","Object.ScatterPlot"],["sn-table","Object.StraightTable"],["text-image","Object.TextImage"],["treemap","Object.Treemap"],["waterfallchart","Object.WaterfallChart"],["mekkochart","Object.MekkoChart"],["action-button","Object.ActionButton"],["sn-nav-menu","Object.NavMenu"],["bulletchart","Object.BulletChart"],["sn-nlg-chart","Object.NlgChart"],["sn-analysis-autochart","Common.AnalysisTypes"],["sn-tabbed-container","Object.TabContainer"],["qlik-sankey-chart-ext","Object.SankeyChart"],["qlik-radar-chart","Object.RadarChart"],["qlik-funnel-chart-ext","Object.FunnelChart"],["sn-grid-chart","Object.GridChart"],["sn-layout-container","Object.LayoutContainer"]].forEach((e=>{let[t,n]=e;jg.set(t,n)}));const zg="njs-cell",Fg="njs-cell-body";const $g=(e,t)=>{switch(t.type){case"LOADING":return Q(Q({},e),{},{loading:!0});case"LOADED":return Q(Q({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return Q(Q({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return Q(Q({},e),{},{longRunningQuery:!0});case"ERROR":return Q(Q({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function Bg(e){let{delay:o=750}=e;const[i,a]=n(!1);return r((()=>{const e=setTimeout((()=>a(!0)),o);return()=>clearTimeout(e)}),[]),i?t.createElement(tg,null):null}const Wg=e=>!e.qError||7005===e.qError.qErrorCode,Hg=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,s=i&&!a&&t[e].qError,l=a&&t[e].qCalcCondMsg,c="".concat(s?r:a?l||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}})),Ug=e=>e&&(Array.isArray(e)?e:[e])||[],Gg=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t),s=Hg(o,Ug(a.qDimensionInfo||a.qItems),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),l=Hg(i,Ug(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:s,reqMeasErrors:l}},Vg=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:s,hasLayoutErrors:l,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,s=!1;const l=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),h=u.measures.min(),p=u.resolveLayout(n),f=Ug(p.qDimensionInfo||p.qItems).filter(Wg),m=Ug(p.qMeasureInfo).filter(Wg);if(o+=d,i+=h,(f.length<d||m.length<h)&&(r=!0),p.qError){a=!0,s=7005===p.qError.qErrorCode;const t=s&&p.qCalcCondMsg?p.qCalcCondMsg:s?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");l.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:l}})(e,o,t),u=[],d=[];let h=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=h||await r.getProperties();h=n;const o=Gg(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const p=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[p,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),b=[{title:f,descriptions:[...u]},{title:g,descriptions:[...d]}],y=l?c:b;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:y}]};function Kg(){return new le}const Jg=o(((e,o)=>{var i,c;let{halo:u,model:d,initialSnOptions:p,initialSnPlugins:f,initialError:m,onMount:g,currentId:b,emitter:y,navigation:v,onError:S}=e;const{app:w,types:C}=u,{nebbie:x}=u.public,{theme:E,translator:L,language:q,keyboardNavigation:I,externalFocusManagement:T,disableCellPadding:O=!1,navigation:_,queryParams:P}=s($a),[D]=n(y||Kg),A=ma(),[M,N,j]=ns(),[z,F]=l($g,{loading:!1,loaded:!1,longRunningQuery:!1,error:($=m)?{title:$.message}:null,sn:null,visualization:null});var $;const[B,W]=n(d),[H,{validating:U,canCancel:G,canRetry:V},K]=es(B),[J]=ts(w),[Z,X,Y]=ns(),[ee,te]=n(p),[ne,re]=n(f),oe="njs-cell-".concat(b),[ie]=lu(w,B,["#".concat(oe),".njs-action-toolbar-popover"]),[ae,se]=n(!1),le=h({enter:null,leave:null}),{titleStyles:ce,bgColor:ue,bgImage:de,border:he,borderRadius:pe,boxShadow:fe}=Og({layout:H,theme:u.public.theme,app:u.app,themeName:E,disableThemeBorder:null==ee?void 0:ee.disableThemeBorder,queryParams:P}),me=!("rtl"!==(null==ee?void 0:ee.direction)),ge=h({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r((()=>{iu(ge.current),ge.current.blurCallback=e=>{ge.current.onBlurHandler?ge.current.onBlurHandler(e):(u.root.toggleFocusOfCells(),e&&Y&&Y.focus())},ge.current.refocusContent=()=>{z.sn.component&&"function"==typeof z.sn.component.focus&&z.sn.component.focus()}}),[]);r((()=>{if(m)return void g();if(!J||!H)return;if(z.visualization===H.visualization&&z.sn)return void(async e=>{const[t,n]=await Vg(L,H,e.generator.qae.data,B);F(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:z.sn,layout:H,model:B})})(z.sn);const e=C.getSupportedVersion(H.visualization,H.version);return(async(e,t)=>{F({type:"LOADING"}),await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,onMount:d,navigation:h}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o}),p=e.create({model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,navigation:h});p&&(t({type:"LOADED",sn:p,visualization:r}),d())}catch(e){t(o?{type:"ERROR",error:{title:e.message,errorObject:e}}:{type:"ERROR",error:{title:"Could not find a version of '".concat(r,"' that supports current object version. Did you forget to register ").concat(r,"?")}}),d()}})({dispatch:F,types:C,visualization:e,version:t,model:B,app:w,selections:ie,nebbie:x,focusHandler:ge.current,emitter:D,onMount:g,navigation:null!=v?v:_})})(H.visualization,e),()=>{}}),[C,z.sn,B,ie,H,J,q]),r((()=>{if(!U)return;const e=setTimeout((()=>F({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[U]),a(o,(()=>({getQae:()=>z.sn.generator.qae,getExtensionDefinition:()=>z.sn.generator.definition.ext,support(e,t,n){if(H&&z.loaded&&!z.error){var r;const o=t||(null===(r=z.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||H)}return!1},toggleFocus(e){"function"==typeof z.sn.component.focus&&(e?z.sn.component.focus():z.sn.component.blur())},setOnBlurHandler(e){ge.current.onBlurHandler=e},setSnOptions:te,setSnPlugins:re,setModel:W,getImperativeHandle(){var e;return null!==(e=z.sn)&&void 0!==e&&e.component&&"function"==typeof z.sn.component.getImperativeHandle?z.sn.component.getImperativeHandle():{}},onContextMenu(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=z.sn)||void 0===e?void 0:e.component.onContextMenu(...n)},async takeSnapshot(){const{width:e,height:t}=N;let n=JSON.parse(JSON.stringify(H));return"function"==typeof z.sn.component.setSnapshotData&&(n=await z.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:L.language(),theme:A.name,appLayout:J,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof u.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return u.config.snapshot.capture(e)}})),[z.sn,X,N,H,A.name,J]);let be=null;if(z.loading&&!z.longRunningQuery)be=t.createElement(Bg,null);else if(z.error){if(S){S(z.error.errorObject?z.error.errorObject:new _g(z.error.title))}be=t.createElement($m,z.error)}else z.loaded&&(be=t.createElement(Ig,{key:H.visualization,sn:z.sn,halo:u,snOptions:ee,snPlugins:ne,layout:H,appLayout:J,cellId:b}));const ye=!(null===(i=u.public.theme)||void 0===i||!i.getStyle("","","_cards")),ve=null===(c=u.public.galaxy)||void 0===c?void 0:c.flags;let Se,we;O?(Se=!1,we=void 0):null!=ve&&ve.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(Se=!1,we=Ng({layout:H,isError:z.error,isCardTheme:ye,titleStyles:ce,translator:L})):(Se=!0,we=void 0);const Ce=jg.get(null==H?void 0:H.visualization),xe=L.get(Ce);return t.createElement(R,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:ue||"unset",backgroundImage:de&&de.url?"url(".concat(de.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:de&&de.size,backgroundPosition:de&&de.pos,border:he,borderRadius:pe,boxShadow:fe,boxSizing:"border-box"},elevation:0,square:!0,className:zg,ref:M,id:oe,onMouseEnter:()=>{le.current.leave&&clearTimeout(le.current.leave),le.enter||(le.current.enter=setTimeout((()=>{se(!0),le.current.enter=null}),250))},onMouseLeave:()=>{le.current.enter&&clearTimeout(le.current.enter),le.current.leave||(le.current.leave=setTimeout((()=>{se(!1),le.current.leave=null}),750))}},t.createElement(k,{container:!0,direction:"column",gap:0,style:Q(Q({position:"relative",width:"100%",height:"100%"},Se?{padding:A.spacing(1)}:{}),z.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":"".concat(b,"_title ").concat(b,"_type ").concat(b,"_content")},H&&t.createElement("div",{id:"".concat(b,"_type"),style:ng,"aria-label":null!=xe?xe:H.visualization}),j&&H&&z.sn&&t.createElement(lg,{layout:H,sn:z.sn,anchorEl:j,hovering:ae,focusHandler:ge.current,titleStyles:ce,isRtl:me,id:b,translator:L}," "),t.createElement(k,{tabIndex:I&&!T?0:-1,onKeyDown:I&&!T?e=>{["Enter"," ","Spacebar"].includes(e.key)&&u.root.toggleFocusOfCells(b)}:null,item:!0,xs:!0,className:Fg,style:Q({height:"100%"},we?{padding:we}:{}),ref:Z},be),j&&H&&z.sn&&t.createElement(Lg,{layout:H,titleStyles:ce,translator:L,flags:ve,isCardTheme:ye,isRtl:me})),z.longRunningQuery&&t.createElement(eg,{canCancel:G,canRetry:V,api:K}))}));function Zg(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Xg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?function(e,t){return Zg(e)&&Zg(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(...Xg("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Qg(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const Yg=e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))},eb=(e,t)=>e.__snInterceptor?e.__snInterceptor.setProperties.call(e,t):e.setProperties(t),tb=(e,t,n)=>{if(!e)return Promise.resolve();let r=Gp.generate(t,n);return Ge(!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()},nb=()=>{};function rb(){var e;let n,r,o,{model:i,halo:a,navigation:s,initialError:l,onDestroy:c=(async()=>{}),onRender:u=(()=>{}),onError:d=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=nb,p=null,f=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(),u(),y=!0};let C={},x=[];const E=new le;let k={};null!==(e=a.context)&&void 0!==e&&e.enablePrivateExperimental&&(k={support(e){var t;return!(!f||!y)&&p.current.support(e,null===(t=r)||void 0===t?void 0:t.support,o)},getPropertyPanelDefinition:()=>!(!f||!y)&&(r?r.definition:p.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){var e;await S;const t=p.current.getQae();if(null==t||null===(e=t.data)||void 0===e||null===(e=e.targets)||void 0===e||null===(e=e[0])||void 0===e||!e.propertyPath)return;const n=t.data.targets[0].propertyPath,r=p.current.getExtensionDefinition().data,o=await i.getEffectiveProperties();if(n&&r){var a,s;const e={app:i.app,dimensionDefinition:r.dimensions,measureDefinition:r.measures,dimensionProperties:(null===(a=o.qHyperCubeDef)||void 0===a||null===(a=a.qDimensions)||void 0===a?void 0:a[0])||jp.getDefaultDimension(),measureProperties:(null===(s=o.qHyperCubeDef)||void 0===s||null===(s=s.qMeasures)||void 0===s?void 0:s[0])||jp.getDefaultMeasure(),globalChangeListeners:void 0,path:n};return new Tm(e)}},toggleFocus(e){p.current.toggleFocus(e)},setOnBlurHandler(e){p.current.setOnBlurHandler(e)},onContextMenu(){return p.current.onContextMenu(...arguments)}});const L=Q(Q({id:i.id,model:i,async destroy(){await c(),h(),h=nb},async convertTo(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){const n=await i.getLayout();if(Yg(n)&&!t){const t=await Wp({halo:a,model:i,cellRef:p,newType:e});return await eb(i,t.qProperty),t}const r=await i.getEffectiveProperties(),o=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:r}),s=o.qProperty;return await tb(i,r,s),o}return await Wp({halo:a,model:i,cellRef:p,newType:e})},async toggleDataView(e){let t;if(n||!1===e)n&&!0!==e&&(t=i,await a.app.destroySessionObject(n),n=void 0,r=void 0,o=void 0);else{let e=a.context.dataViewType;const s=await i.getEffectiveProperties();if(!a.types.getSupportedVersion(e)){if(!a.types.getSupportedVersion("table"))throw new Error("No data view type registered");e="table"}const l=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:s,viewDataMode:!0});t=await a.app.createSessionObject(l.qProperty),n=t.id,r=p.current.getExtensionDefinition(),o=await i.getLayout()}t&&p.current.setModel(t)},get viewDataToggled(){return void 0!==n},addListener(e,t){E.addListener(e,t)},removeListener(e,t){E.removeListener(e,t)},getImperativeHandle:async()=>(await S,p.current.getImperativeHandle()),takeSnapshot:async()=>(await S,p.current.takeSnapshot())},k),{},{__DO_NOT_USE__:{mount(e){if(f)throw new Error("Already mounted");if(!(e instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return f=e,[h,p]=function(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,emitter:l,initialError:c,navigation:u,onError:d}=e;const{root:h}=n,p=t.createRef(),f=Th(),g=m.createPortal(t.createElement(Jg,{ref:p,halo:n,model:o,currentId:f,initialSnOptions:i,initialSnPlugins:a,initialError:c,onMount:s,emitter:l,navigation:u,onError:d}),r,f),b=()=>{h.remove(g),o.removeListener("closed",b)};return o.on("closed",b),h.addCell(f,p),(async()=>{try{await h.add(g,b)}catch(e){b(),s(),d(e)}})(),[b,p]}({halo:a,element:e,model:i,initialSnOptions:C,initialSnPlugins:x,initialError:l,onMount:g,emitter:E,navigation:s,onError:d}),v},async applyProperties(e){const t=Xg("/",e,await i.getEffectiveProperties());if(t.length)return i.applyPatches(t,!0)},options(e){(async e=>{const t=e.onInitialRender;f?(async()=>{await v,p.current.setSnOptions(Q(Q(Q({},C),e),{onInitialRender:w(t)}))})():C=Q(Q(Q({},C),e),{onInitialRender:w(t)})})(e)},plugins(e){(async e=>{Qg(e),f?(async()=>{await v,p.current.setSnPlugins(e)})():x=e})(e)},exportImage:()=>p.current.exportImage(),takeSnapshot:()=>p.current.takeSnapshot(),getModel:()=>i,convert:{async toType(e){const t=await i.getEffectiveProperties(),n=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:t}),r=n.qProperty;return await tb(i,t,r),n},async revert(){await i.clearSoftPatches()}}}});return L}async function ob(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=rb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}async function ib(e,t,n,r){let{type:o,version:i,fields:a,properties:s,extendProperties:l}=e,c={};const u=[],{modelStore:d}=r;try{const e=t.types.get({name:o,version:i});c=await e.initialProperties(s,l);const n=await e.supernova();a&&await Tp({sn:n,properties:c,fields:a,children:u},t),s&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},c)}catch(e){c=n?null:{qInfo:{qType:o},visualization:o}}if(!n){const e=await t.app.createObject(c);return u.length>0&&await e.setFullPropertyTree({qProperty:c,qChildren:u}),d.set(e.id,e),e}return c}const ab="njs-sheet";function sb(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 lb=o(((e,o)=>{var l;let{model:c,halo:u,initialSnOptions:d,initialSnPlugins:p,initialError:f,onMount:m,unmount:g,navigation:b,onError:y}=e;const{root:v}=u,[S,w]=n(c),[C]=es(S),{theme:x,modelStore:E}=s($a),[k,L]=n([]),[R,q]=n(void 0),[I,T]=n(void 0),[O,_]=n(""),P=h({cellCount:0,cellsRendered:0,initialRender:!1});null==b||null===(l=b.setCurrentSheetId)||void 0===l||l.call(b,S.id),r((()=>{if(C){const e=JSON.stringify(C.cells);if(e===O)return;_(e);const n=async()=>{k.forEach((e=>{v.removeCell(e.currentId)}));const e=C.cells;P.cellCount=e.length,P.cellsRendered=0;const n=()=>{P.cellsRendered++,P.cellsRendered!==P.cellCount||P.initialRender||(P.initialRender=!0,d.onInitialRender())},{columns:r,rows:o}=C,i=await Promise.all(e.map((async e=>{let i;const a=new Promise((e=>{i=e})),s=k.find((t=>t.id===e.name));if(s)return s.bounds=sb(e,r,o),delete s.mountedPromise,s;const l=await async function(e,t,n){let{id:r,options:o,plugins:i,element:a}=e;const{modelStore:s,rpcRequestModelStore:l}=n,c="".concat(r);let u=l.get(c);u||(u=t.app.getObject(r),l.set(c,u));const d=await u;return s.set(c,d),ob(d,{options:o,plugins:i,element:a},t)}({id:e.name},u,E);return{model:l.model,id:e.name,bounds:sb(e,r,o),cellRef:t.createRef(),currentId:Th(),mounted:i,mountedPromise:a,options:Q(Q({},d),{onInitialRender:n})}})));i.forEach((e=>v.addCell(e.currentId,e.cellRef))),L(i)};n()}}),[C]),r((()=>{const e=()=>{S.removeListener("closed",e),g()};return S.on("closed",e),()=>S.removeListener("closed",e)}),[S]);const D=i((()=>k?k.map((e=>function(e,n,r,o,i,a,s,l){var c;const{x:u,y:d,width:h,height:p}=e.bounds,f={left:"".concat(u,"%"),top:"".concat(d,"%"),width:"".concat(h,"%"),height:"".concat(p,"%"),position:"absolute"},m=null===(c=n.public.galaxy)||void 0===c?void 0:c.flags;return null!=m&&m.isEnabled("VNA-13_CELLPADDING_FROM_THEME")&&(f.boxSizing="border-box",f.padding="4px"),t.createElement("div",{style:f,key:e.model.id},t.createElement(Jg,{ref:e.cellRef,halo:n,model:e.model,currentId:e.currentId,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a,navigation:s,onError:l}))}(e,u,e.options,p,f,e.mounted,b,y))):[]),[k]);r((()=>{const e=null!=C&&C.components?C.components.find((e=>"general"===e.key)):null;q(oh(e,u.public.theme)),T(rh(e,u.app))}),[C,u.public.theme,u.app,x]),a(o,(()=>({setModel:w})),[]);const A=!C||void 0===C.height||Number.isNaN(C.height)?"100%":"".concat(Number(C.height),"%"),M=k.map((e=>e.mountedPromise)),N=M.filter((e=>!!e));return N.length&&Promise.all(M).then((()=>{m()})),t.createElement("div",{className:ab,style:{width:"100%",height:A,position:"relative",backgroundColor:R,backgroundImage:I&&I.url?"url(".concat(I.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:I&&I.size,backgroundPosition:I&&I.pos}},D)}));const cb=()=>{};function ub(){let{model:e,halo:n,navigation:r,initialError:o,onDestroy:i=(async()=>{}),onRender:a=(()=>{}),onError:s=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=cb,c=null,u=null,d=null,h=null;const p=new Promise((e=>{d=e})),f=new Promise((e=>{h=e})),g=e=>()=>{null==e||e(),h(),a()};let b={},y=[];const v={id:e.id,model:e,navigation:r,getImperativeHandle:async()=>(await f,c.current.getImperativeHandle()),async destroy(){await i(),l(),l=cb},__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,[l,c]=function(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l,navigation:c,onError:u}=e;const{root:d}=n,h=t.createRef();let p;const f=()=>{d.remove(p)};return p=m.createPortal(t.createElement(lb,{ref:h,halo:n,model:o,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s,unmount:f,navigation:c,onError:u}),r,o.id),c.setSheetRef(h),d.add(p,f),[f,h]}({halo:n,element:i,model:e,initialSnOptions:b,initialSnPlugins:y,initialError:o,onMount:d,navigation:r,onError:s}),p},async applyProperties(t){const n=Xg("/",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(Q(Q(Q({},b),e),{onInitialRender:g(t)}))})():b=Q(Q(Q({},b),e),{onInitialRender:g(t)})})(e)},plugins(e){(async e=>{Qg(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 db(e,t,n){let{id:r,options:o,plugins:i,element:a,onRender:s,onError:l,navigation:c}=e;const{modelStore:u,rpcRequestModelStore:d}=n,h="".concat(r);let p=d.get(h);p||(p=t.app.getObject(r),d.set(h,p));const f=await p;u.set(h,f);const m=c||("sheet"===f.genericType?function(e,t,n){var r;const{galaxy:o}=e.public;var i;if(null!==(r=o.anything)&&void 0!==r&&null!==(r=r.sense)&&void 0!==r&&r.navigation)return null===(i=o.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.navigation;const a={model:n},s={goToSheet:async n=>{var r,o;if(!a.sheetRef)return;const{modelStore:i,rpcRequestModelStore:l}=t,c="".concat(n);let u,d=l.get(c);d||(d=e.app.getObject(n),l.set(c,d));try{if(u=await d,"sheet"!==u.genericType)return}catch(e){return}i.set(c,u),null===(r=a.sheetRef)||void 0===r||null===(r=r.current)||void 0===r||null===(o=r.setModel)||void 0===o||o.call(r,u),a.model=u,s.emit("sheetChanged")},setSheetRef:e=>{a.sheetRef=e},getCurrentSheetId:()=>!!a.model&&a.model.id};return iu(s),s}(t,n,f):void 0);return"sheet"===f.genericType?async function(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=ub({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}(f,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m):ob(f,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m)}function hb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}var pb,fb,mb,gb;function bb(){if(gb)return mb;gb=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return mb=n=>n?"object"!=typeof n?e:n:t}var yb,vb,Sb,wb,Cb,xb,Eb,kb,Lb,Rb,qb,Ib,Tb,Ob,_b,Pb,Db,Ab,Mb,Nb,jb,zb,Fb,$b,Bb,Wb,Hb,Ub,Gb,Vb,Kb,Jb={exports:{}};function Zb(){if(vb)return yb;vb=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return yb={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 Xb(){if(wb)return Sb;wb=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};return Sb=e}function Qb(){return Cb||(Cb=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=Zb(),i=Xb(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const h="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[h,r]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split("".concat(t,"*")).join("".concat(t,"{0,").concat(n,"}")).split("".concat(t,"+")).join("".concat(t,"{1,").concat(n,"}"));return e})(t),o=d++;i(e,o,t),u[e]=o,l[o]=t,c[o]=r,a[o]=new RegExp(t,n?"g":void 0),s[o]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-]".concat(h,"*")),f("MAINVERSION","(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")")),f("MAINVERSIONLOOSE","(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")")),f("PRERELEASEIDENTIFIER","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIER],")")),f("PRERELEASEIDENTIFIERLOOSE","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIERLOOSE],")")),f("PRERELEASE","(?:-(".concat(l[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIER],")*))")),f("PRERELEASELOOSE","(?:-?(".concat(l[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIERLOOSE],")*))")),f("BUILDIDENTIFIER","".concat(h,"+")),f("BUILD","(?:\\+(".concat(l[u.BUILDIDENTIFIER],"(?:\\.").concat(l[u.BUILDIDENTIFIER],")*))")),f("FULLPLAIN","v?".concat(l[u.MAINVERSION]).concat(l[u.PRERELEASE],"?").concat(l[u.BUILD],"?")),f("FULL","^".concat(l[u.FULLPLAIN],"$")),f("LOOSEPLAIN","[v=\\s]*".concat(l[u.MAINVERSIONLOOSE]).concat(l[u.PRERELEASELOOSE],"?").concat(l[u.BUILD],"?")),f("LOOSE","^".concat(l[u.LOOSEPLAIN],"$")),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE","".concat(l[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),f("XRANGEIDENTIFIER","".concat(l[u.NUMERICIDENTIFIER],"|x|X|\\*")),f("XRANGEPLAIN","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:".concat(l[u.PRERELEASE],")?").concat(l[u.BUILD],"?")+")?)?"),f("XRANGEPLAINLOOSE","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(l[u.PRERELEASELOOSE],")?").concat(l[u.BUILD],"?")+")?)?"),f("XRANGE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAIN],"$")),f("XRANGELOOSE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAINLOOSE],"$")),f("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),f("COERCE","".concat(l[u.COERCEPLAIN],"(?:$|[^\\d])")),f("COERCEFULL",l[u.COERCEPLAIN]+"(?:".concat(l[u.PRERELEASE],")?")+"(?:".concat(l[u.BUILD],")?")+"(?:$|[^\\d])"),f("COERCERTL",l[u.COERCE],!0),f("COERCERTLFULL",l[u.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM","(\\s*)".concat(l[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",f("TILDE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAIN],"$")),f("TILDELOOSE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAINLOOSE],"$")),f("LONECARET","(?:\\^)"),f("CARETTRIM","(\\s*)".concat(l[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",f("CARET","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAIN],"$")),f("CARETLOOSE","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAINLOOSE],"$")),f("COMPARATORLOOSE","^".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],")$|^$")),f("COMPARATOR","^".concat(l[u.GTLT],"\\s*(").concat(l[u.FULLPLAIN],")$|^$")),f("COMPARATORTRIM","(\\s*)".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],"|").concat(l[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE","^\\s*(".concat(l[u.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAIN],")")+"\\s*$"),f("HYPHENRANGELOOSE","^\\s*(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s*$"),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Jb,Jb.exports)),Jb.exports}function Yb(){if(Lb)return kb;Lb=1;const e=Xb(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Zb(),{safeRe:r,t:o}=Qb(),i=bb(),{compareIdentifiers:a}=function(){if(Eb)return xb;Eb=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};return xb={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},xb}();class s{constructor(a,l){if(l=i(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof a,'".'));if(a.length>t)throw new TypeError("version is longer than ".concat(t," characters"));e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[o.LOOSE]:r[o.FULL]);if(!c)throw new TypeError("Invalid Version: ".concat(a));if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],o=t.prerelease[n];if(e("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],o=t.build[n];if(e("build compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e="-".concat(t).match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error("invalid identifier: ".concat(t))}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error("version ".concat(this.raw," is not a prerelease"));this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error("invalid increment argument: ".concat(e))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}return kb=s}function ey(){if(qb)return Rb;qb=1;const e=Yb();return Rb=(t,n,r)=>new e(t,r).compare(new e(n,r)),Rb}function ty(){if(Bb)return $b;Bb=1;const e=function(){if(Tb)return Ib;Tb=1;const e=ey();return Ib=(t,n,r)=>0===e(t,n,r),Ib}(),t=function(){if(_b)return Ob;_b=1;const e=ey();return Ob=(t,n,r)=>0!==e(t,n,r),Ob}(),n=function(){if(Db)return Pb;Db=1;const e=ey();return Pb=(t,n,r)=>e(t,n,r)>0,Pb}(),r=function(){if(Mb)return Ab;Mb=1;const e=ey();return Ab=(t,n,r)=>e(t,n,r)>=0,Ab}(),o=function(){if(jb)return Nb;jb=1;const e=ey();return Nb=(t,n,r)=>e(t,n,r)<0,Nb}(),i=function(){if(Fb)return zb;Fb=1;const e=ey();return zb=(t,n,r)=>e(t,n,r)<=0,zb}();return $b=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return o(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError("Invalid operator: ".concat(s))}},$b}function ny(){if(Gb)return Ub;Gb=1;const e=/\s+/g;class t{constructor(n,i){if(i=r(i),n instanceof t)return n.loose===!!i.loose&&n.includePrerelease===!!i.includePrerelease?n:new t(n.raw,i);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,m=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(m,R(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),i("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),i("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),i("caret trim",e);let g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>L(e,this.options)));a&&(g=g.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),i("range list",g);const y=new Map,v=g.map((e=>new o(e,this.options)));for(const e of v){if(f(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const S=[...y.values()];return n.set(t,S),S}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(q(this.set[t],e,this.options))return!0;return!1}}Ub=t;const n=new(fb?pb:(fb=1,pb=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=bb(),o=function(){if(Hb)return Wb;Hb=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: ".concat(t));this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Wb=t;const n=bb(),{safeRe:r,t:o}=Qb(),i=ty(),a=Xb(),s=Yb(),l=ny();return Wb}(),i=Xb(),a=Yb(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:d}=Qb(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=Zb(),f=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},b=(e,t)=>(i("comp",e,t),e=w(e,t),i("caret",e),e=v(e,t),i("tildes",e),e=x(e,t),i("xrange",e),e=k(e,t),i("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,o,a)=>{let s;return i("tilde",e,t,n,r,o,a),y(n)?s="":y(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):y(o)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):a?(i("replaceTilde pr",a),s=">=".concat(n,".").concat(r,".").concat(o,"-").concat(a," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),i("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{i("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,a,s)=>{let l;return i("caret",e,t,n,o,a,s),y(n)?l="":y(o)?l=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):y(a)?l="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(i("replaceCaret pr",s),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(+n+1,".0.0-0")):(i("no pr"),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a," <").concat(+n+1,".0.0-0")),i("caret return",l),l}))},x=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,o,a,s,l)=>{i("xRange",e,n,r,o,a,s,l);const c=y(o),u=c||y(a),d=u||y(s),h=d;return"="===r&&h&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(u&&(a=0),s=0,">"===r?(r=">=",u?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(l="-0"),n="".concat(r+o,".").concat(a,".").concat(s).concat(l)):u?n=">=".concat(o,".0.0").concat(l," <").concat(+o+1,".0.0-0"):d&&(n=">=".concat(o,".").concat(a,".0").concat(l," <").concat(o,".").concat(+a+1,".0-0")),i("xRange return",n),n}))},k=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),L=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),R=e=>(t,n,r,o,i,a,s,l,c,u,d,h)=>(n=y(r)?"":y(o)?">=".concat(r,".0.0").concat(e?"-0":""):y(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":""),l=y(c)?"":y(u)?"<".concat(+c+1,".0.0-0"):y(d)?"<".concat(c,".").concat(+u+1,".0-0"):h?"<=".concat(c,".").concat(u,".").concat(d,"-").concat(h):e?"<".concat(c,".").concat(u,".").concat(+d+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()),q=(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 Ub}var ry=function(){if(Kb)return Vb;Kb=1;const e=ny();return Vb=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Vb}(),oy=H(ry);const iy={};function ay(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:i}=o,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||oy(e,i.deps.properties),supernova:()=>async function(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!iy[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),s=Promise.resolve(a);iy[i]=s.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new _g("Failed to load visualization: '".concat(n,"'"),e)}))}return iy[i]}(a.name,a.version,t,o.load).then((e=>(n=n||Nm(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.supernova().then((()=>{const n=Q({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(r));return t?(Ge(!0,n,e),n):Q(Q({},n),e)}))}};return a}function sy(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=ay({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 ly(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=sy(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>{if(r[e])return r[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(iy).forEach((t=>{t.split("__")[0]===e&&(iy[t]=void 0)}))}(e)}}}const cy={context:{},load:()=>{},types:[],themes:[],anything:{},flags:{KPI_REACTCOLORPICKER:!0,CLIENT_IM_3365:!0},snapshot:{get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))}},uy={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};cy.context=uy;const dy=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Q(Q({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),e)},hy=function(){return[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]].filter(((e,t,n)=>n.indexOf(e)===t))};var py=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=ae(n.context.language);function o(e,i){if(i)return o.createConfiguration(i)(e);let a=Q(Q({},n.context),{},{translator:r.translator,hostConfig:n.hostConfig});const[s,l]=Ga({app:e,context:a}),c=function(){let{themes:e=[],loadTheme:t,root:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=St();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),wt(Ct,{__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:s});a.themeApi=c.externalAPI;const u={galaxy:{translator:r.translator,theme:c.externalAPI,flags:hb(n.flags),deviceType:xt(n.context.deviceType),hostConfig:n.hostConfig,anything:n.anything},theme:c.externalAPI,translator:r.translator,nebbie:null},d={app:e,root:s,config:n,public:u,context:a,types:null},h=ly({halo:d});n.types.forEach((e=>h.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&&te&&te.getWebResourceAuthParams){const{queryParams:e}=await te.getWebResourceAuthParams({hostConfig:n.hostConfig});a.queryParams=e,s.context(a)}})().then(e)})),f=null,g=null;const b={render:async e=>(await p,e.id?db(e,d,l):async function(e,t,n){let{type:r,version:o,fields:i,properties:a,options:s,plugins:l,element:c,extendProperties:u,navigation:d,onRender:h,onError:p}=e,f={};const m=[],{modelStore:g,subscribe:b}=n;let y;try{const e=t.types.get({name:r,version:o});f=await e.initialProperties(a,u);const n=await e.supernova();i&&await Tp({sn:n,properties:f,fields:i,children:m},t),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},f)}catch(e){y=e,f={qInfo:{qType:r},visualization:r}}const v=await t.app.createSessionObject(f);m.length>0&&await v.setFullPropertyTree({qProperty:f,qChildren:m}),g.set(v.id,v);const S=b(v);return ob(v,{options:s,plugins:l,element:c,onRender:h,onError:p},t,d,y,(async()=>{await t.app.destroySessionObject(v.id),S()}))}(e,d,l)),destroy:async()=>{s.destroy()},create:async e=>ib(e,d,!1,l),generateProperties:async e=>ib(e,d,!0,l),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=Q(Q(Q({},a),t),{},{translator:r.translator}),t.theme&&(await p,p=c.setTheme(t.theme),await p),t.language&&d.public.translator.language(t.language),s.context(a))},selections:async()=>(f||(f={mount(n){g||(g=function(e){let{element:n,app:r}=e;return m.createPortal(t.createElement(Oh,{app:r}),n,Th())}({element:n,app:e}),s.add(g))},unmount(){g&&(s.remove(g),g=null)}}),f),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){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)throw new Error("Element for ".concat(o||r," not provided"));if(this._instance)throw new Error("Field or object ".concat(o||r," already mounted"));const c=()=>i.emit("selectionActivated"),u=()=>i.emit("selectionDeactivated");return new Promise((o=>{[this._instance,this._ref]=function(e){let{element:n,app:r,fieldIdentifier:o,qId:i,stateName:a="$",options:s={},renderedCallback:l}=e;const c=t.createRef();return[m.createPortal(t.createElement(gp,{ref:c,app:r,element:n,fieldIdentifier:o,qId:i,stateName:a,initialOptions:s,renderedCallback:l}),n,Th()),c]}({element:a,app:e,fieldIdentifier:n,qId:r,options:mp(Q({onSelectionActivated:c,onSelectionDeactivated:u},l)),stateName:l.stateName||"$",renderedCallback:o}),s.add(this._instance)}))},unmount(){this._instance&&(s.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=mp(Q({onSelectionActivated:n,onSelectionDeactivated:r},e));i._ref.current.setOptions(t)}}}};return iu(i),i},getRegisteredTypes:h.getList,__DO_NOT_USE__:{types:h,popover(n,r,o){b._popoverInstance&&(s.remove(b._popoverInstance),b._popoverInstance=null);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Q({},bp);return Ge(!0,t,e),t}(Q({onPopoverClose:()=>b.emit("fieldPopoverClose")},o));b._popoverInstance=t.createElement(yp,{element:n,key:Th(),app:e,fieldIdentifier:r,options:i,stateName:o.stateName||"$"}),s.add(b._popoverInstance)}}};return d.public.nebbie=b,d.types=h,iu(b),b}return o.createConfiguration=t=>e(((e,t)=>({context:dy(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:Q({},t.snapshot||e.snapshot),types:hy(e.types,t.types),themes:hy(e.themes,t.themes),flags:dy(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:dy(e.anything,t.anything)}))(n,t)),o.config=n,o}(cy);function fy(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const my=globalThis.crypto||{getRandomValues:()=>123456};function gy(e){return t=>{const n=Ge({},t);n.qInfo=n.qInfo||{},n.qInfo.qId=n.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^my.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const r=n._mock;let o=n;return r&&(delete n._mock,o=Ge({},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 by=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},yy=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const s=by(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},vy=["id","session"],Sy=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function wy(e){return!Sy.includes(e)}function Cy(e){const t=by(e.getLayout);return t.qInfo&&t.qInfo.qId}function xy(e,t){return e.reduce(((e,n)=>Q(Q({},e),function(e,t){let n=Cy(e);const{delay:r}=t,{id:o,session:i}=e,a=Y(e,vy);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:Q(Q({id:n,session:by(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce(((e,t)=>{let[n,o]=t;return Q(Q({},e),{},{[n]:yy(o,{async:wy(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function Ey(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!Cy(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function ky(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(Ey);const n=xy(e,t);return async e=>Promise.resolve(n[e])}function Ly(){return()=>Promise.resolve({id:"app-layout"})}const Ry={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new fy,r=new gy(n),o=new ky(e,t),i=new Ly,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,destroySessionObject:async()=>{},getObject:o,getAppLayout:i,getListObject:async e=>{var t;return o(null===(t=e.qInfo)||void 0===t?void 0:t.qId)}};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},qy={generator:Nm,hook:gf,theme:St,locale:ne};function Iy(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.self}function Ty(){return!("undefined"==typeof process||!process.version||!process.versions.node)}function Oy(e){if(Array.isArray(e))return e.map(Oy);if("object"==typeof(t=e)&&null!==t&&t.constructor===Object){const t={};for(const n of Object.keys(e).sort())t[n]=Oy(e[n]);return t}var t;return e}function _y(e){if(Array.isArray(e))return e.map((e=>"object"==typeof e&&null!==e?_y(e):e)).filter((e=>"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e&&""!==e));if("object"==typeof e&&null!==e){const t={};for(const n of Object.keys(e)){const r=e[n];switch(typeof r){case"undefined":break;case"boolean":r&&(t[n]=r);break;case"string":{const e=r.trim();""!==e&&(t[n]=e);break}case"object":{if(null===r)break;const e=_y(r);e&&(Array.isArray(e)&&e.length>0||"object"==typeof e&&Object.keys(e).length>0)&&(t[n]=e);break}case"function":case"number":t[n]=r;break;default:console.warn(`Unexpected type for key "${n}": ${typeof r}`),t[n]=r}}if(0===Object.keys(t).length)return;return t}return e}let Py;Py=function(){const e=[...Py?.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 Dy=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],Ay=["apikey","oauth2","cookie","windowscookie","reference","anonymous"];let My=e=>crypto.getRandomValues(new Uint8Array(e)),Ny=(e,t=21)=>((e,t,n)=>{let r=(2<<Math.log2(e.length-1))-1,o=-~(1.6*r*t/e.length);return(i=t)=>{let a="";for(;;){let t=n(o),s=0|o;for(;s--;)if(a+=e[t[s]&r]||"",a.length>=i)return a}}})(e,0|t,My),jy=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const zy=async(e={})=>{const t=GS(e.hostConfig),n="anonymous"===t?.authType||!!t.accessCode;if("undefined"==typeof window)return Wy({isNodeEnv:!0,isAnonymous:n});if("noauth"===t?.authType)return Wy({isUnknown:!0,isAnonymous:!1});const{data:r,status:o}=await $y(e);if(404===o)return Wy({isUnknown:!0,isAnonymous:n});if(!r||o<=399&&o>=300)return Wy({isQSE:!0,isWindows:!0,isAnonymous:n});const i=(r.composition?.deploymentType||"").toLowerCase(),a="controlcenter"===i;return"qliksenseserver"===i?Wy({isQSE:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"qliksensedesktop"===i?Wy({isQSD:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"qliksensemobile"===i?Wy({isQSE:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"cloud-console"===i?Wy({isCloud:!0,isCloudConsole:!0,isAnonymous:n,meta:By(r)}):"fedramp"===r.composition?.provider?Wy({isCloud:!0,isQCG:!0,isControlCenter:a,isAnonymous:n,meta:By(r)}):Wy({isCloud:!0,isQCS:!0,isControlCenter:a,isAnonymous:n,meta:By(r)})},Fy={};const $y=async({hostConfig:e,noCache:t}={})=>{const n=_S(e),r=`${n}/resources/autogenerated/product-info.json`;try{if(!(r in Fy)){const e={};globalThis.QlikMain&&globalThis.QlikMain.resourceNeedsCredentials(r)&&(e.credentials="include");const t=fetch(r,e).then((async e=>e.ok?{data:await e.json(),status:e.status}:{data:void 0,status:e.status}));Fy[r]=t}const e=await Fy[r];return(e.status>=400||!e.data)&&delete Fy[r],e}catch{return delete Fy[r],{data:void 0,status:500}}finally{t&&delete Fy[r]}},By=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}}},Wy=e=>({isNodeEnv:!1,isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isControlCenter:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,isAnonymous:!1,...e});function Hy(e){return jy(e)}const Uy="__QLIK_INTERNAL__DO_NOT_USE_OR_YOU_WILL_BE_FIRED";const Gy="qlik-qmfe-api";function Vy(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function Ky(e){return`${e.accessCode}_${e.clientId}`}const Jy={};function Zy(e,t,n){localStorage.setItem(`${Gy}-${e}-${t}`,n)}function Xy(e,t,n){sessionStorage.setItem(`${Gy}-${e}-${t}`,n)}function Qy(e,t){return localStorage.getItem(`${Gy}-${e}-${t}`)||void 0}function Yy(e,t){return sessionStorage.getItem(`${Gy}-${e}-${t}`)||void 0}function ev(e,t){t.forEach((t=>localStorage.removeItem(`${Gy}-${e}-${t}`)))}function tv(e,t){t.forEach((t=>sessionStorage.removeItem(`${Gy}-${e}-${t}`)))}function nv(e,t){const n=`${Gy}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}async function rv(e,t){if(!e.clientId)throw new gS('A host config with authType set to "oauth2" has to also provide a clientId');return ov(Vy(e),t,e.noCache,e.accessTokenStorage)}async function ov(e,t,n,r){if(n)return t();const o=Iy(),i=Jy[e]||(o?function(e,t){let n,r;if("local"===t?(n=Qy(e,"access-token"),r=Qy(e,"refresh-token")):"session"===t&&(n=Yy(e,"access-token"),r=Yy(e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r):void 0);if(i)return Jy[e]=i,Promise.resolve(i);const a=t();if(Jy[e]=a,o){const t=await a;"local"===r&&t?(t.accessToken&&Zy(e,"access-token",t.accessToken),t.refreshToken&&Zy(e,"refresh-token",t.refreshToken)):"session"===r&&t&&(t.accessToken&&Xy(e,"access-token",t.accessToken),t.refreshToken&&Xy(e,"refresh-token",t.refreshToken))}return a}function iv(e){const t=Vy(e);delete Jy[t],Iy()&&(ev(t,["access-token","refresh-token"]),tv(t,["access-token","refresh-token"]))}function av(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function sv(e){if(e.errors)throw new SS(e.errors)}function lv(e){const t=Object.keys(e);t.sort();return t.map((t=>`${t}=${e[t]}`)).join("&")}async function cv(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t),r=function(e){let t="";if(Iy()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!Ty())throw new Error("Environment not supported for oauth2 authentication");t=Buffer.from(e).toString("base64")}return t}(Array.from(new Uint8Array(n)));return r.replaceAll(/\+/g,"-").replaceAll(/\//g,"_").replace(/=+$/,"")}async function uv(e){const t=e.clientId||"",n=_S(e),r=Hy(128),o=Hy(43),i=await cv(r),a=e.redirectUri||globalThis.location.href,s=Vy(e);iv(e),Xy(s,"state",o),Xy(s,"verifier",r),Xy(s,"href",globalThis.location.href),Xy("","client-in-progress",s);const l=`${n}/oauth/authorize?${lv({response_type:"code",client_id:t,redirect_uri:a,scope:e.scope||"user_default",state:o,code_challenge:i,code_challenge_method:"S256"})}`;globalThis.location.replace(l)}async function dv(e,t,n,r){try{const o=await fetch(`${_S(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({grant_type:"authorization_code",scope:e.scope||"user_default",...t?{code:t}:{},redirect_uri:r||globalThis.location.href,...n?{code_verifier:n}:{},client_id:e.clientId})}),i=await o.json();return sv(i),{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}catch(e){return console.error(e),new Promise((()=>{}))}}function hv(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 pv(e){const{clientId:t,clientSecret:n}=e;if(!t||!n)throw new gS('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');const r=await rv(e,(async()=>{if(!e.clientId||!e.clientSecret)throw new gS('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');return async function(e,t,n,r="user_default",o,i){const a=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify(hv(t,n,r,o,i))}),s=await a.json();return{accessToken:s.access_token,refreshToken:s.refresh_token,errors:s.errors}}(_S(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)}));return r}async function fv(e){const{clientId:t}=e;if(!t)throw new gS('A host config with authType set to "oauth2" has to also provide a clientId');const n=await rv(e,(async()=>{if(e.getAccessToken)try{const t="string"==typeof e.getAccessToken?await function(e){return globalThis[e]}(e.getAccessToken)():await e.getAccessToken();return{accessToken:t,refreshToken:void 0,errors:void 0}}catch{return yv("Could not fetch access token using custom function")}if(e.performInteractiveLogin){let t;try{const n=Hy(128),r=Hy(43),{code:o,state:i}=function(e){if("string"==typeof e){const t=new URLSearchParams(new URL(e).search);return{code:t.get("code")||"",state:t.get("state")||""}}return e}(await av(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=_S(e),a=await cv(r);return`${i}/oauth/authorize?${lv({response_type:"code",client_id:o,redirect_uri:t,scope:e.scope||"user_default",state:n,code_challenge:a,code_challenge_method:"S256"})}`}(e,o,r,n))}));if(!t)return yv("No redirect uri provided");if(r!==i)return yv("State returned by custom interactive login function does not match original");if(!o)return yv("No code found in response from custom interactive login function");return await dv(e,o,n,t)}catch(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:"Could not perform custom interactive login",detail:`${e}`}]}}}const t=Vy(e),n=nv(t,"code"),r=nv(t,"verifier");if(n&&r){const t=await dv(e,n,r,e.redirectUri);if(t)return t}}));return n||(e.performInteractiveLogin||(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),uv(e)),new Promise((()=>{})))}!function(e,t){(globalThis.location?.origin.startsWith("https://localhost:")||globalThis.location?.origin?.endsWith("qlik-stage.com"))&&(void 0===globalThis[Uy]&&(globalThis[Uy]={}),globalThis[Uy][e]=t)}("clearAllAccessTokens",(()=>{console.log("Clearing tokens",Jy),Object.keys(Jy).forEach((e=>{console.log("Clearing access tokens for",e),ev(e,["access-token","refresh-token"]),tv(e,["access-token","refresh-token"])})),function(){for(const e in Jy)delete Jy[e]}()}));let mv=Promise.resolve("");async function gv(e){if(Ty()){const t=await pv(e);return t?(sv(t),t.accessToken||""):""}return Iy()&&(mv=mv.then((async()=>{const t=await fv(e);return t?(sv(t),t.accessToken||""):""}))),mv}async function bv(e){const t=await async function(e){return Jy[Vy(e)]}(e);if(iv(e),t&&t.refreshToken&&e.clientSecret){const n=await rv(e,(async()=>{if(!t||!t.refreshToken||!e.clientSecret)throw new Error("Trying to refresh tokens without refreshToken or clientSecret");return async function(e,t,n){const r=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:t,client_secret:n})}),o=await r.json();return{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}(_S(e),t.refreshToken,e.clientSecret)}));n&&sv(n)}}function yv(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function vv(e,t,n){const r=await fetch(`${_S(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({subject_token:t,subject_token_type:"urn:ietf:params:oauth:token-type:access_token",grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",purpose:n,redirect_uri:globalThis.location?.href,client_id:e.clientId})});if(200!==r.status)throw await async function(e){const t=await e.text();try{const e=JSON.parse(t);return new SS(e.errors)}catch{return new SS([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function Sv(e,t){try{return await t()}catch(n){const{retry:r}=await xv({hostConfig:e});if(r)return t();throw n}}function wv(){const e=Math.floor(Date.now()/1e3).toString(16);var t;return`${e}${t=40-e.length,Ny("1234567890abcdef",t)()}`}async function Cv(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new gS('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 gS('A host config with authType set to "anonymous" has to also provide an accessCode');return ov(Ky(e),t,!1,void 0)}(e,(async()=>{const r=_S(e),o=await async function(e){let t;if(Iy()){const n=Ky(e);t=Qy(n,"tracking-code"),t||(t=wv()),Zy(n,"tracking-code",t)}else t=wv();return t}(e);return async function(e,t,n,r){const o=await fetch(`${e}/oauth/token/anonymous-embed`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({eac:t,client_id:n,grant_type:"urn:qlik:oauth:anonymous-embed",tracking_code:r})}),i=await o.json();return{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}(r,t,n,o)}));if(!r)return"";if(r.errors)throw new SS(r.errors);return r.accessToken?r.accessToken:""}async function xv({hostConfig:e}){return function(e){const t=Ky(e);delete Jy[t],Iy()&&(ev(t,["access-token","refresh-token"]),tv(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var Ev={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await Cv(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await Sv(e,(async()=>{const t=await Cv(e);return vv(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await Sv(e,(async()=>{const t=await Cv(e);return vv(e,t,"websocket")}))}}},handleAuthenticationError:xv};var kv={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function(){return{queryParams:{}}},handleAuthenticationError:function(){return Promise.resolve({})}},Lv=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=Tv(this.stack)}},Rv=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=Tv(this.stack)}};const qv=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,Iv=e=>{const t=e.match(qv);return Boolean(t&&t.length>0)};function Tv(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(Iv(e))break;t.unshift(e)}return t.join("\n")}function Ov(e,t,n,r){let o=e;return""!==t&&(o=o.concat(`?${t}`)),r&&(o=o.concat(`+headers=${JSON.stringify(r)}`)),n&&(o=o.concat(`+host-config=${n}`)),o}const _v=e=>"get"===e||"GET"===e;function Pv(e){return e&&(e instanceof Blob||e instanceof Object&&"[object Blob]"===e.toString())||e&&e instanceof ReadableStream||"string"==typeof e?e:JSON.parse(JSON.stringify(e))}function Dv(e){return!("get"===e||"GET"===e)}function Av(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 Mv(e){return e.then((e=>{const t={data:Pv(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t}))}let Nv=6e5;const jv={};function zv(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${zv(e.cause)}`:zv(e.cause):e.message:String(e)}async function Fv(e,t,n,r,o,i,a,s){const{body:l,contentTypeHeader:c,requestOptions:u}=function(e,t){if(!e)return{body:null,contentTypeHeader:{},requestOptions:{}};const n={},r={};let o=null;switch(t){case"":case"application/json":n["Content-Type"]="application/json",o=JSON.stringify(e);break;case"multipart/form-data":o=function(e){const t="multipart/form-data";if("object"!=typeof e)throw new Rv(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new Rv(`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 Rv(`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 Rv(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new Rv(`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,...Uv()};!d["User-Agent"]&&s&&(d["User-Agent"]=s);const h={method:e,credentials:a,mode:"cors",headers:d,redirect:await OS(o?.hostConfig)?"manual":"follow",keepalive:o?.keepalive,progress:o?.progress,body:l,...u};let p,f;if(o?.signal)h.signal=o.signal;else if(o?.timeoutMs&&o.timeoutMs>0){const e=new AbortController;p=setTimeout((()=>{e.abort()}),o.timeoutMs),h.signal=e.signal}f=o?.progress?await async function(e,{method:t,headers:n,credentials:r,keepalive:o,body:i,signal:a,progress:s}){const l=new XMLHttpRequest;let c,u;const d=new Promise(((e,t)=>{c=e,u=t}));if(l.open(t||"GET",e),"object"!=typeof n)throw Error("malformed headers",n);for(const[e,t]of Object.entries(n))l.setRequestHeader(e,t);o&&l.setRequestHeader("Connection","keep-alive"),a&&a.addEventListener("abort",(()=>{l.abort(),u()})),l.withCredentials="include"===r,s?.onUpload&&(l.upload.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onUpload?.({loaded:t,total:r?n:void 0})}),s?.onDownload&&(l.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onDownload?.({loaded:t,total:r?n:void 0})}),l.onloadend=()=>{const{status:e}=l,t={};for(const e of l.getAllResponseHeaders().split("\r\n")){const[n,r]=e.split(":",2);n&&r&&(t[n]=r)}l.response?c(new Response(l.response,{status:e,headers:t})):c(new Response(void 0,{status:e,headers:t}))};try{const e=i;l.send(e)}catch(e){return Promise.reject(new Lv(zv(e),0,new Headers,{}))}return d}(t,h):await async function(e,t){try{return await fetch(e,t)}catch(e){return Promise.reject(new Lv(zv(e),0,new Headers,{}))}}(t,h),p&&clearTimeout(p);const m=await async function(e,t){let n;const r=e.headers.get("content-type")?.split(";")[0],o=e.headers.get("content-disposition")?.split(";");if(o&&"attachment"===o[0]){let t="";for(let e=1;e<o.length;e++){const n=o[e].trim();if(0===n.indexOf("filename")){const e=n.indexOf('"'),r=n.lastIndexOf('"');t=n.slice(e+1,r)}}n=Gv(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=Gv(await e.blob());break;case"text/event-stream":n=e.body;break;default:try{n=await e.text(),n=JSON.parse(n)}catch{}}const{status:i,statusText:a,headers:s}=e,l=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new Lv(l,i,s,n);if(0===i)throw new Lv(l,302,s,n);const c={status:i,headers:s,data:n};return c}(f,t);return m}async function $v({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=_S(o?.hostConfig),{headers:a,queryParams:s,credentials:l}=await NS({hostConfig:o?.hostConfig,method:e}),c=i+function(e,t){let n=e;return t&&Object.keys(t).forEach((e=>{n=n.replace(`{${e}}`,t[e])})),n}(t,n),u=function(e){return e?Object.entries(e).map((e=>{const[,t]=e;if(void 0!==t)return e.map((e=>encodeURIComponent(decodeURIComponent(e)))).join("=")})).filter(Boolean).join("&"):""}({...r,...s}),d=function(e,t){return""!==t?`${e}?${t}`:e}(c,u);return{completeUrl:d,cacheKey:Ov(c,u,BS(o?.hostConfig),o?.headers),authHeaders:a,credentials:l}}function Bv(e,t){return Wv(e,t,(async()=>{const{cacheKey:n,authHeaders:r,credentials:o}=await $v(t);return Wv(e,{...t,cacheKey:n,authHeaders:r,credentials:o,options:{...t.options,noCache:!0}},void 0)}))}function Wv(e,{method:t,completeUrl:n,cacheKey:r,body:o,options:i,authHeaders:a,credentials:s,contentType:l,userAgent:c},u){jv[e]||(jv[e]={});const d=Dv(t)?void 0:jv[e][r];if(Dv(t)&&function(e,t){const n=Av(t);for(const t in e){const r=Av(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}(jv[e],r),d&&function(e,t,n){if(!t||void 0===t.value)return!1;if(e?.noCache)return!1;if(e?.useCacheIfAfter)return e.useCacheIfAfter.getTime()<=t.lastPulled;const r=Date.now()-t.lastPulled;return e?.maxCacheAge?r<=e?.maxCacheAge:r<n}(i,d,Nv))return d.lastHit=new Date,d.hitCount+=1,d.accessedPaths.add(globalThis.location?globalThis.location.pathname:"node"),Mv(d.value);const h=Fv(t,n,o,l,i,a,s,c),p=async function(e,t,n){try{return await t}catch(t){const r=t,o=r.data;if(401===r.status||403===r.status&&"CSRF-TOKEN-2"===o?.code||(301===r.status||302===r.status)&&await OS(e)){if(globalThis.loggingOut)return Hv();const{retry:t,preventDefault:i}=await MS({hostConfig:e,status:r.status,headers:r.headers,errorBody:o,canRetry:!!n});if(t&&n)return n();if(i)return Hv()}throw t}}(i?.hostConfig,h,u),f=function(e,t,n,r,o,i,a){const s=BS(o?.hostConfig);return t.then((t=>{const l=t.data;if(!l)return t;const c=l.links?.prev?.href,u=l.links?.next?.href;return c&&(t.prev=t=>Bv(e,{method:n,completeUrl:c,body:r,options:t||o,cacheKey:Ov(c,"",s,o?.headers),authHeaders:i,credentials:a})),u&&(t.next=t=>Bv(e,{method:n,completeUrl:u,body:r,options:t||o,cacheKey:Ov(u,"",s,o?.headers),authHeaders:i,credentials:a})),t}))}(e,p,t,o,i,a,s),m=function(e,t,n){return n.catch((n=>(delete e[t],Promise.reject(n))))}(jv[e],r,f);if(_v(t)){if(Object.hasOwn&&!Object.hasOwn(jv,e)||"__proto__"===e)throw new Error(`Forbidden api name: ${e}`);jv[e][r]={lastPulled:Date.now(),value:m,lastHit:null,hitCount:0,accessedPaths:new Set}}return Mv(m)}function Hv(){return new Promise((()=>{}))}function Uv(){if(!Iy())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function Gv(e,t){const n=e;return n.download=t?(n=t)=>Vv(e,n):t=>Vv(e,t),n}async function Vv(e,t){if(Iy()){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 XS})),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jv;const Kv="qmfe-api/latest";async function Jv(e,t,n){const r=(Py.getInterceptors()||[]).reduce(((e,t)=>n=>t(n,e)),(t=>async function(e,t){if(function(e){const t=GS(e);if(TS(t)){if(0===Object.keys(t).length)throw new gS("a host config must be provided when making a cross domain request");if(!t.host)throw new gS("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:Iy()?`${window.navigator.userAgent} ${Kv}`:Kv;const{completeUrl:r,cacheKey:o,authHeaders:i,credentials:a}=await $v(t);return Bv(e,{...t,method:t.method.toUpperCase(),completeUrl:r,cacheKey:o,authHeaders:i,credentials:a,userAgent:n})}(e,t)));return r(t)}const Zv="qlik-csrf-token";async function Xv(e,t){const n=_S(e);let r;r=await OS(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const t=(await Jv("csrf-token",{method:"get",pathTemplate:r,options:{hostConfig:e,noCache:!0}})).headers.get(Zv);return t||""}catch(e){if(404===e.status)return"";throw e}};return t?(Qv[n]=o(),Qv[n]):(Qv[n]=Qv[n]||o(),Qv[n])}const Qv={};function Yv(e){return!1===e.crossSiteCookies?"same-origin":TS(e)?"include":"same-origin"}var eS={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 Xv(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:Yv(e)}},getWebSocketAuthParams:async function({hostConfig:e}){const t={"qlik-csrf-token":await Xv(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=_S(e);delete Qv[t]}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=_S(e);return e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var tS={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 nS={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 rS(e,t){try{return await t()}catch(n){const{retry:r}=await oS({hostConfig:e});if(r)return t();throw n}}async function oS({hostConfig:e}){return e.getAccessToken?(iv(e),{preventDefault:!1,retry:!0}):Iy()?e.performInteractiveLogin?(iv(e),{retry:!0}):(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),uv(e),{preventDefault:!0}):(await bv(e),{preventDefault:!1,retry:!0})}Iy()&&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=nv("","client-in-progress");if(r&&t&&n){const e=nv(r,"state"),o=nv(r,"href");e&&e===n&&o&&(Xy(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var iS={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await gv(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await rS(e,(async()=>{const t=await gv(e);return vv(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await rS(e,(async()=>{const t=await gv(e);return vv(e,t,"webresource")}))}}},handleAuthenticationError:oS};var aS={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 sS={};function lS(e){const t=_S(e);return sS[t]=sS[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}(),sS[t]}var cS={requiredProps:[],optionalProps:["loginUri","crossSiteCookies"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":lS(e)},queryParams:{xrfkey:lS(e)},credentials:Yv(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:lS(e),"qlik-csrf-token":await Xv(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){return e.loginUri?(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0}):{}}};const uS={};let dS=Promise.resolve(),hS=!1;function pS(e,t){uS[e.toLowerCase()]=t}async function fS(e){const t=GS(e),n=await mS(t);dS&&await dS;let r=function(e){return uS[e.toLowerCase()]}(n);if(r||(dS=(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 yS(e)}return Promise.resolve(void 0)}(n),r&&pS(n,r)})(),await dS),!r)throw new yS(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 gS(`missing required properties in host config; '${r.join("', '")}'`);const o=[...Dy,...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 mS(e){return e.authType?e.authType:e.apiKey?"apikey":e.accessCode?"anonymous":e.clientId?"oauth2":e.webIntegrationId?"cookie":e.reference?"reference":await OS(e)?"windowscookie":"cookie"}hS||(pS("apikey",kv),pS("cookie",eS),pS("none",nS),pS("noauth",tS),pS("oauth2",iS),pS("anonymous",Ev),pS("windowscookie",cS),pS("reference",aS),hS=!0);var gS=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},bS=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"}},yS=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(uS).filter((e=>"qmfeembedframerauthmodule"!==e.toLowerCase())).join("', '")}'`),this.name="InvalidAuthTypeError"}};function vS({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var SS=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(vS).join(", ")),this.errors=t}};function wS(e){const t=_y(e)||{};return t.host&&(t.host=_S(t)),Iy()&&_S(t)===window.location.origin&&delete t.host,t.authType&&Ay.includes(t.authType)&&delete t.authType,t}function CS(e,t){if("function"!=typeof t)return t}const xS=new Map;function ES(e,t){const n=t?.reference||null;if(n&&!xS.has(n))throw new gS(`Host config with reference "${n}" is not registered. Please register it before using it.`);xS.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),xS.set(e,t)}function kS(e){return xS.get(e)}function LS(){return kS("default")||{}}globalThis.loggingOut=!1;let RS="";function qS({message:e}){e!==RS&&(RS=e,console.error(e))}function IS(e){return mS(e)}function TS(e){if(!globalThis.location?.origin)return!0;const t=GS(e);if(0===Object.keys(t).length)return!1;try{return new URL(_S(t)).origin!==globalThis.location.origin}catch{}return!1}async function OS(e){const t=GS(e);return"boolean"==typeof t.forceIsWindows?t.forceIsWindows:"cookie"!==t.authType&&("windowscookie"===t.authType||(await zy({hostConfig:e})).isWindows)}function _S(e){const t=GS(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 PS(e){const t=GS(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(HS,"ws")}async function DS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await n.getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}async function AS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await(n.getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}async function MS(e){const t=GS(e.hostConfig),n=await fS(t),r=await n.handleAuthenticationError({...e,hostConfig:t}),o=e.canRetry&&r.retry,i=r.preventDefault;if(!o&&!i){const{status:n,errorBody:r}=e;(t.onAuthFailed||qS)(function({errorBody:e,status:t}){const n=e;if("object"==typeof n?.errors){return{message:new SS(n?.errors).message}}return{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return r}async function NS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await n.getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}function jS(e,t){pS(e,t)}function zS(e){!function(e){ES("default",e||{})}(e)}function FS(e,t){ES(e,t)}function $S(e){!function(e){xS.has(e)?xS.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function BS(e){return function(e){const t=Oy(wS(GS(e)));return JSON.stringify(t,CS)}(e)}const WS=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},HS=/^http/;function US(e){return{message:e.message||"Unknown error"}}function GS(e){if(e?.reference){const t=kS(e.reference);if(!t)throw new gS(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:LS()}function VS(){return LS()}var KS={determineAuthType:IS,getDefaultHostConfig:VS,getRestCallAuthParams:NS,getWebResourceAuthParams:AS,getWebSocketAuthParams:DS,handleAuthenticationError:MS,isHostCrossOrigin:TS,isWindows:OS,logout:WS,registerAuthModule:jS,registerHostConfig:FS,serializeHostConfig:BS,setDefaultHostConfig:zS,toValidLocationUrl:_S,toValidWebsocketLocationUrl:PS,unregisterHostConfig:$S},JS=Object.freeze({__proto__:null,AuthorizationError:SS,InvalidAuthTypeError:yS,InvalidHostConfigError:gS,UnexpectedAuthTypeError:bS,default:KS,determineAuthType:IS,getAccessToken:async function(e){const t=await NS({method:"GET",...e}),n=t.headers?.Authorization;if(0===n.indexOf("Bearer "))return n.substring(7);throw new Error("Unknown format of authorization header returned by remote auth module")},getDefaultHostConfig:VS,getRestCallAuthParams:NS,getWebResourceAuthParams:AS,getWebSocketAuthParams:DS,handleAuthenticationError:MS,isHostCrossOrigin:TS,isWindows:OS,logout:WS,registerAuthModule:jS,registerHostConfig:FS,serializeHostConfig:BS,setDefaultHostConfig:zS,toValidLocationUrl:_S,toValidWebsocketLocationUrl:PS,unregisterHostConfig:$S});window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise((e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})}))),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout((()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")}),5e3),t=await window.__qlikMainPrivateResolvers.mainUrlPromise;return clearTimeout(e),new Promise((e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),n.addEventListener("error",(()=>{console.error(`Qlik runtime system not found: ${t}`)})),n.addEventListener("load",(()=>{window.QlikMain&&e(window.QlikMain)})),window.document.head.appendChild(n)}}))})());var ZS=Object.freeze({__proto__:null,importRuntimeModule:async function(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&window.__qlikMainPrivateResolvers.resolveMainJsUrl(t)}(t),async function(e){if(!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}}),XS=Object.freeze({__proto__:null});export{xm as DataPropertyHandler,Ry as EnigmaMocker,Tm as HyperCubeHandler,qy as __DO_NOT_USE__,Hp as conversion,py as embed,Hf as onContextMenu,Wf as onTakeSnapshot,jf as useAction,If as useApp,Rf as useAppLayout,zf as useConstraints,Af as useDeviceType,yf as useEffect,xf as useElement,Pf as useEmbed,Gf as useEmitter,Tf as useGlobal,Bf as useImperativeHandle,Ff as useInteractionState,Vf as useKeyboard,kf as useLayout,Sf as useMemo,qf as useModel,Mf as useNavigation,$f as useOptions,Nf as usePlugins,Cf as usePromise,Ef as useRect,wf as useRef,Uf as useRenderState,Of as useSelections,Lf as useStaleLayout,bf as useState,_f as useTheme,Df as useTranslator};
|
|
16
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,h=e.length,p=e.search(/[0-9\-\+#]/),f=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=h-g,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),S=g>0?e.substring(v,h):"";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))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,h=d.length,v=0;v<h;v++)m+=d.charAt(v),!((v-b+1)%l)&&v<h-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+S}},Md({exports:{}});const Gd=/,(?![^(]*\))/,Vd=/\s(?![^(]*\))/,Kd=/^[0-9]+[a-zA-Z%]+?$/,Jd=["none","inset","initial","inherit"],Zd=e=>{if(!e)return;const t=e.split(Vd).filter((e=>!Jd.includes(e.toLowerCase()))).at(-1),n=!t||(e=>"0"===e||Kd.test(e))(t)||Jd.includes(t.toLowerCase())?void 0:t;return n},Xd=e=>e?e.split(Gd).map((e=>e.trim())):[];function Qd(e,t,n,r){return n&&r?n.getStyle("object.".concat(r),e,t):n?n.getStyle("",e,t):void 0}function Yd(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:Qd(t,n,r,o)}const eh={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},th={"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 nh(e,t){return t?function(e){var t;let n,r,o,i;return null!=e&&null!==(t=e.session)&&void 0!==t&&t.config?(n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host):""}(e)+t:void 0}function rh(e,t,n){const r=null==e?void 0:e.bgImage;if(r){let o="";if("media"===r.mode||"media"===e.useImage){let e;const i=null==r?void 0:r.mediaUrl,{qUrl:a}=(null==i?void 0:i.qStaticContentUrl)||{};o=a?decodeURIComponent(a):void 0,o=nh(t,o),n&&(e=Object.entries(n).map((e=>{let[t,n]=e;return"&".concat(t,"=").concat(encodeURIComponent(n))})).join("&"),o="".concat(o,"?").concat(e))}"expression"===r.mode&&(o=r.expressionUrl?decodeURIComponent(r.expressionUrl):void 0);const i=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=th[e.bgImage.position]),n}(e),a=function(e){var t;let n=eh.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=eh[r]),n}(e);return o?{url:o,pos:i,size:a}:void 0}}function oh(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):Yd(null==r?void 0:r.color,"","backgroundColor",t,n)}function ih(e,t,n){var r,o;const i=Qd("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&Jd.includes(e.toLowerCase()))return e.toLowerCase();const r=Xd(e);if(1!==r.length)return e;let o=n;if(!o){const n=Xd(t);if(1!==n.length)return e;o=Zd(n[0])}if(!o)return e;const i=Zd(r[0]);return i?e.replace(i,o):"".concat(e," ").concat(o)})((null==e||null===(r=e.shadow)||void 0===r?void 0:r.boxShadow)||i,i,Yd(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function ah(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle("object.".concat(r),"title.".concat(t),"fontFamily"),fontSize:i.fontSize||n.getStyle("object.".concat(r),"title.".concat(t),"fontSize"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color):n.getStyle("object.".concat(r),"title.".concat(t),"color"),backgroundColor:i.backgroundColor||n.getStyle("object.".concat(r),"title.".concat(t),"backgroundColor"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const sh={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},lh=["theme","selections"];function ch(e){var t,n,r,o,i,a,s,l;let{app:c,themeApi:u,theme:d,queryParams:h,components:p=[],checkboxes:f=!1}=e;const m=function(){const e={};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const n=null==t?void 0:t.key;lh.includes(n)&&(e[n]=t)})),e}(p),g=(e,t)=>u.getStyle("object.listBox",e,t),b=e=>(null==e?void 0:e.index)>0||null!=e&&e.color?u.getColorPickerColor(e):void 0,y=function(e){var t,n,r,o,i;let{getColorPickerColor:a,theme:s,getListboxStyle:l,overrides:c,checkboxes:u}=e;const d=null===(t=c.theme)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.fontColor,h=a(d)||l("content","color")||(null===(n=s.palette)||void 0===n?void 0:n.text.primary),p=!u&&(null===(r=null===(o=c.theme)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.useContrastColor)||void 0===r||r),f=(null===(i=c.selections)||void 0===i?void 0:i.colors)||{},m=e=>{var t,n;const r="selected"===e?"main":e,o="".concat(e,"Contrast"),i=a(f[e])||l("","dataColors.".concat(e))||"possible"===e&&l("","backgroundColor")||(null===(t=s.palette)||void 0===t||null===(t=t.selected)||void 0===t?void 0:t[r])||sh[e];return{[e]:i,[o]:p?Ru(i,h):h||(null===(n=s.palette)||void 0===n?void 0:n.selected["".concat(o,"Text}")])}};return Q(Q(Q(Q(Q({},m("selected")),m("alternative")),m("excluded")),m("selectedExcluded")),m("possible"))}({getColorPickerColor:b,theme:d,getListboxStyle:g,overrides:m,checkboxes:f}),v=m.theme||{},S=b(null===(t=v.header)||void 0===t?void 0:t.fontColor)||g("title.main","color"),w=function(e){let t,{themeApi:n,themeOverrides:r}=e;const o=null==r?void 0:r.background;return o?(t=null!=o&&o.useExpression?oh({bgColor:o},n,"listBox"):n.getColorPickerColor(null==o?void 0:o.color),t):t}({themeApi:u,themeOverrides:v}),C=null!==(n=v.background)&&void 0!==n&&n.image?rh({bgImage:v.background.image},c,h):void 0,x=w||g("","backgroundColor")||d.palette.background.default,E=function(e,t){const n=ku(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(x,g),k=function(e){return Ru("#fff",e("content","color"))}(g),L=(null===(r=v.header)||void 0===r?void 0:r.fontStyle)||{},R=(null===(o=v.content)||void 0===o?void 0:o.fontStyle)||{},q=(e,t,n)=>!0===e&&t||!1===e&&n||void 0;return{background:{backgroundColor:x,backgroundImage:null==C||!C.url||null!=C&&C.url.startsWith("url(")?void 0:"url('".concat(C.url,"')"),backgroundRepeat:"no-repeat",backgroundSize:null==C?void 0:C.size,backgroundPosition:null==C?void 0:C.pos},header:{color:S,fontSize:(null===(i=v.header)||void 0===i?void 0:i.fontSize)||g("title.main","fontSize"),fontFamily:(null===(a=v.header)||void 0===a?void 0:a.fontFamily)||g("title.main","fontFamily"),fontWeight:q(L.bold,"bold","normal")||g("title.main","fontWeight")||"bold",textDecoration:L.underline?"underline":"initial",fontStyle:q(L.italic,"italic","normal")||g("title.main","fontStyle")||"initial"},content:{backgroundColor:f?void 0:y.possible,color:y.possibleContrast||g("content","color"),fontSize:(null===(s=v.content)||void 0===s?void 0:s.fontSize)||g("content","fontSize"),fontFamily:(null===(l=v.content)||void 0===l?void 0:l.fontFamily)||g("content","fontFamily"),fontWeight:q(R.bold,"bold","normal")||g("content","fontWeight")||"normal",textDecoration:R.underline?"underline":"initial",fontStyle:q(R.italic,"italic","normal")||g("content","fontStyle")||"initial"},search:{color:k,borderColor:d.palette.divider,highlightBorderColor:d.palette.custom.focusBorder,backgroundColor:E,backdropFilter:"blur(8px)"},selections:y}}function uh(e){let{app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a}=e;return ch({app:t,themeApi:n,theme:r,queryParams:o,components:i,checkboxes:a})}function dh(e){let{alignTo:o,anchorOrigin:i={vertical:"bottom",horizontal:"center"},transformOrigin:a={vertical:"top",horizontal:"center"},show:l,close:u,app:d,fieldName:p,stateName:f="$",autoFocus:m,components:g,checkboxes:b,selectDisabled:y=(()=>!1),sortCriteria:v=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:S="ltr"}=e;const w=Boolean(null==p?void 0:p.qLibraryId),C=l&&Boolean(o.current),[x,E]=n(0),L=ma(),R=h(),[I]=Ka({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:f,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:v,qFieldDefs:w?void 0:[p]},qLibraryId:w?p.qLibraryId:void 0}},d,p,f),O=c((()=>{I.lock("/qListObjectDef")}),[I]),_=c((()=>{I.unlock("/qListObjectDef")}),[I]),{translator:P,themeApi:D,keyboardNavigation:A,hostConfig:M}=s($a),N=h(),j=h(),[z]=lu(d,I,j),[F]=es(I),[$]=n((()=>cu({selectDisabled:y}))),B=bl({containerRef:j,enabled:A}),{checkboxes:W=b}=F||{},H=uh({themeApi:D,theme:L,components:g,checkboxes:W});if(r((()=>{z&&C&&(z.isModal(I)||z.goModal("/qListObjectDef"))}),[z,C]),!(I&&F&&P&&H))return null;const U=!0===F.qListObject.qDimensionInfo.qLocked,G=(e,t)=>{const n="escapeKeyDown"!==t;z.noModal(n),u()},V=Ic({layout:F,model:I,translator:P,selectionState:$,selections:z}),K=du(F);return t.createElement(T,{className:"listbox-container",open:C,onClose:G,anchorEl:o.current,anchorOrigin:i,transformOrigin:a,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?G():void 0,direction:S},t.createElement(k,{container:!0,direction:"column",gap:0,ref:j},t.createElement(k,{item:!0,container:!0,style:{direction:S,padding:L.spacing(1)}},t.createElement(k,{item:!0},U?t.createElement(q,{onClick:_,disabled:!U,size:"large"},t.createElement(as,{title:P.get("Listbox.Unlock")})):t.createElement(q,{onClick:O,disabled:!K,size:"large"},t.createElement(ls,{title:P.get("Listbox.Lock")}))),t.createElement(k,{item:!0,xs:!0}),t.createElement(k,{item:!0},t.createElement(Xc,{layout:F,more:{enabled:!U,actions:V,alignTo:N,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:z,onConfirm:G,onCancel:()=>G(0,"escapeKeyDown")}}))),t.createElement(k,{item:!0,xs:!0},t.createElement("div",{ref:N}),t.createElement(k,{item:!0},t.createElement(ru,{ref:R,popoverOpen:C,styles:H,visible:!0,model:I,listCount:x,selections:z,selectionState:$,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:B.focusSelection},autoFocus:null==m||m,direction:S})),t.createElement(Ec,{model:I,app:d,layout:F,selections:z,selectionState:$,direction:S,onSetListCount:e=>E(e),onCtrlF:()=>{R.current.focus()},styles:H,keyboard:B}))))}function hh(e){let{field:r,api:o,stateIx:i=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:l=null,onClose:c=(()=>{})}=e;const{translator:u}=s($a),d=l||h(),p=ma(),[f,m]=n(!1),g=e=>{e.currentTarget.contains(e.target)&&m(!f)},b=()=>{m(!1),c()},y=r.selections[i];void 0===y.qTotal&&(y.qTotal=0);const v=y.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},S=(v.qSelected+v.qLocked)/y.qTotal,w=v.qAlternative/y.qTotal,x=(v.qExcluded+v.qLockedExcluded+v.qSelectedExcluded)/y.qTotal,E=v.qSelected+v.qSelectedExcluded+v.qLocked+v.qLockedExcluded,L=0===E&&0===y.qTotal;let R="";y.qTotal===E&&y.qTotal>1?R=u.get("CurrentSelections.All"):E>1&&y.qTotal?R=u.get("CurrentSelections.Of",[E,y.qTotal]):y.qSelectedFieldSelectionInfo&&(R=y.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==r.states[i]&&(R="".concat(r.states[i],": ").concat(R));const I=[{color:p.palette.selected.main,ratio:S},{color:p.palette.selected.alternative,ratio:w},{color:p.palette.selected.excluded,ratio:x}];I.forEach(((e,t)=>{e.offset=t?I[t-1].offset+I[t-1].ratio:0}));let T=null,O=null,_=null,P=null;return l||(T=t.createElement(k,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:y.qLocked?"0.3":""}},t.createElement(C,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.label),t.createElement(C,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},R)),y.qLocked?O=t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(as,null))):y.qOneAndOnlyOne||(O=t.createElement(k,{item:!0},t.createElement(q,{title:u.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),o.clearField(y.qField,r.states[i])},size:"large"},t.createElement(is,null)))),_=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===L&&I.map((e=>t.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),P=t.createElement(k,{container:!0,gap:1,ref:d,sx:{backgroundColor:p.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:p.palette.action.hover}},onClick:!1===a&&g||null},T,O,_,f&&t.createElement(dh,{alignTo:d,show:f,close:b,app:o.model,fieldName:y.qField,stateName:r.states[i]}))),l?t.createElement(dh,{alignTo:d,show:!0,close:b,app:o.model,fieldName:y.qField,stateName:r.states[i]}):P}var ph=e=>os((e=>Q(Q({},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 fh={item:"".concat("MultiState","-item")},mh=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(fh.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function gh(e){let{field:r,api:o,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const[l,c]=n(!!i),[u,d]=n(-1),[p,f]=n(i?i.current:null),m=i||h(),{translator:g}=s($a),b=g.get("Selection.ClearAllStates"),y=()=>{d(-1),a()};let v=null;i||(v=t.createElement(t.Fragment,null,t.createElement(k,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(N,{style:{padding:"0px 8px"},color:"secondary",badgeContent:r.states.length},t.createElement(C,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.label))),t.createElement(k,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(ph,null)))));const S=t.createElement(j,{dense:!0},t.createElement(z,{title:b,onClick:()=>{r.states.forEach((e=>o.clearField(r.name,e)))}},t.createElement(F,{variant:"contained",fullWidth:!0},b)),r.states.map(((e,n)=>t.createElement(z,{key:n,title:r.label,onClick:e=>((e,t)=>{e.stopPropagation(),c(!1),d(t)})(e,n)},t.createElement(E,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(hh,{field:r,api:o,stateIx:n,skipHandleShowListBoxPopover:!0})))))),w=t.createElement(T,{open:l,onClose:()=>{c(!1),a()},anchorEl:p,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},S),x=i?w:t.createElement(mh,{container:!0,gap:0,className:fh.item,onClick:e=>{e.currentTarget.contains(e.target)&&(f(e.currentTarget),m.current=e.currentTarget,c(!l))}},v,l&&w,u>-1&&t.createElement(dh,{alignTo:m,show:u>-1,close:y,app:o.model,fieldName:r.selections[u].qField,stateName:r.states[u]}));return i&&u>-1?t.createElement(dh,{alignTo:m,show:u>-1,close:y,app:o.model,fieldName:r.selections[u].qField,stateName:r.states[u]}):x}const bh="More",yh={item:"".concat(bh,"-item"),badge:"".concat(bh,"-badge")},vh=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(yh.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(yh.badge)]:{padding:t.spacing(0,1)}}}));function Sh(e){let{items:r=[],api:o}=e;const i=ma(),[a,s]=n(!1),[l,c]=n(-1),[u,d]=n(null),p=h(),f=()=>{c(-1)};let m=null;return l>-1&&(m=r[l].states.length>1?t.createElement(gh,{field:r[l],api:o,moreAlignTo:p,onClose:f}):t.createElement(hh,{field:r[l],api:o,skipHandleShowListBoxPopover:!0,moreAlignTo:p,onClose:f})),t.createElement(vh,{container:!0,gap:0,className:yh.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,s(!a))}},t.createElement(k,{item:!0},t.createElement(E,{borderRadius:i.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:i.palette.selected.main,color:i.palette.selected.mainContrastText}},t.createElement(C,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",r.length))),t.createElement(k,{item:!0},t.createElement(q,{size:"large"},t.createElement(ph,null))),a&&t.createElement(T,{open:a,onClose:()=>{s(!1)},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},t.createElement(j,{dense:!0},r.map(((e,n)=>t.createElement(z,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(E,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(gh,{field:e,api:o}):t.createElement(hh,{field:e,api:o}))))))),m)}const wh=120,Ch=72;function xh(e){let{api:o,app:i}=e;const a=ma(),[l]=Za(i),[c]=es(l),[u,d]=n({items:[],more:[]}),{modalObjectStore:h}=s($a).selectionStore,[p,f]=ns(),[m,g]=n(0);return r((()=>{if(!f)return;const{width:e}=f,t=Math.floor(e)-Ch,n=Math.floor(t/wh);g(n)}),[f]),r((()=>{if(!(i&&l&&c&&m))return;const e=function(e){if(!e)return[];const t={};function n(e,n){e.qSelections.forEach((e=>{const r=e.qField;let o=t[r];var i;void 0===o&&(o={name:r,label:(null===(i=e.qDimensionReferences)||void 0===i||null===(i=i.find((e=>e.qLabel)))||void 0===i?void 0:i.qLabel)||e.qReadableName||r,states:[],selections:[]},t[r]=o),o.states.push(n),o.selections.push(e)}))}return e.qSelectionObject&&n(e.qSelectionObject,"$"),e.alternateStates&&e.alternateStates.forEach((e=>n(e.qSelectionObject,e.stateName))),Object.keys(t).map((e=>t[e])).filter((e=>!e.selections.some((e=>e.qIsHidden))))}(c);d((t=>{const n=e;if((()=>{const{model:e}=h.get(i.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)})()&&n.length+1===t.items.length){const e=t.items.filter((e=>!1===n.some((t=>e.name===t.name))))[0],{qField:r}=e.selections[0];e.selections=[{qField:r}];const o=t.items.indexOf(e);n.splice(o,0,e)}let r=[];return m<n.length&&(r=n.splice(m-n.length)),{items:n,more:r}}))}),[i,l,c,o.isInModal(),m]),t.createElement(k,{ref:p,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},u.items.map((e=>t.createElement(k,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(wh,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},e.states.length>1?t.createElement(gh,{field:e,api:o}):t.createElement(hh,{field:e,api:o})))),u.more.length>0&&t.createElement(k,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(Ch,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},t.createElement(Sh,{items:u.more,api:o})))}var Eh=e=>os((e=>Q(Q({},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 kh=e=>os((e=>Q(Q({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));const Lh=(e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}}))),o=(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::"),i=(n.qStateNames||[]).map((e=>e)).join("::");o!==i&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)};function Rh(e){let{api:o,app:i}=e;const{translator:a}=s($a),[l]=function(e){const[t]=Za(e),[o]=es(t),[i]=ts(e),[a,s]=n(null);return r((()=>{i&&t&&o&&Lh(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})),s({canGoBack:e,canGoForward:t,canClear:n})}),[o]),[a,t,o]}(i);return t.createElement(k,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(k,{item:!0},t.createElement(q,{style:{marginRight:"8px"},disabled:!l||!l.canGoBack,title:a.get("Navigate.Back"),onClick:()=>o.back(),size:"large"},t.createElement(Eh,null))),t.createElement(k,{item:!0},t.createElement(q,{style:{marginRight:"8px"},disabled:!l||!l.canGoForward,title:a.get("Navigate.Forward"),onClick:()=>o.forward(),size:"large"},t.createElement(kh,null))),t.createElement(k,{item:!0},t.createElement(q,{disabled:!l||!l.canClear,title:a.get("Selection.ClearAll"),onClick:()=>o.clear(),size:"large"},t.createElement(Nc,null))))}const qh=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function Ih(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function Th(){return qh.map(Ih).join("")}function Oh(e){let{app:n}=e;const r=ma(),[o]=ou(n);return o?t.createElement(k,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(k,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(Rh,{api:o,app:n})),t.createElement(k,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(xh,{api:o,app:n}))):null}let _h;_h="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let Ph=null,Dh=null;const Ah=_h.clearTimeout,Mh=_h.setTimeout,Nh=_h.cancelAnimationFrame||_h.mozCancelAnimationFrame||_h.webkitCancelAnimationFrame,jh=_h.requestAnimationFrame||_h.mozRequestAnimationFrame||_h.webkitRequestAnimationFrame;function zh(e){let t,n,r,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&Ph(this.__resizeRAF__),this.__resizeRAF__=Dh((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,l="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],l="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+l+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=_h.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const d=l.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==Nh||null==jh?(Ph=Ah,Dh=function(e){return Mh(e,20)}):(Ph=function([e,t]){Nh(e),Ah(t)},Dh=function(e){const t=jh((function(){Ah(n),e()})),n=Mh((function(){Nh(t),e()}),20);return[t,n]});class Fh extends f{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},o=parseFloat(r.paddingLeft||"0"),i=parseFloat(r.paddingRight||"0"),a=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),c=l.height-a-s,u=l.width-o-i,d=this._parentNode.offsetHeight-a-s,h=this._parentNode.offsetWidth-o-i;(e||this.state.height===d&&this.state.scaledHeight===c)&&(t||this.state.width===h&&this.state.scaledWidth===u)||(this.setState({height:d,width:h,scaledHeight:c,scaledWidth:u}),"function"==typeof n&&n({height:d,scaledHeight:c,scaledWidth:u,width:h}))}},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=zh(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:i=!1,nonce:a,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:h,scaledWidth:f,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=h),o||(0===m&&(y=!0),g.width=0,b.width=m,b.scaledWidth=f),i&&(y=!1),p(c,{ref:this._setRef,style:{...g,...l},...u},!y&&e(b))}}function $h(e){let{keyboard:t,hovering:n,updateKeyScroll:r,currentScrollIndex:o,isModal:i,constraints:a,selections:s}=e;return{handleKeyDown:e=>{const{keyCode:n,shiftKey:r=!1}=e.nativeEvent,o=()=>{e.stopPropagation(),e.preventDefault()};if(!t.enabled)return;const a=e.currentTarget.closest(".listbox-container"),l=i();switch(n){case fl.TAB:if(document.activeElement===a||!l&&!a.contains(document.activeElement))return;if(r){Sl(a)||vl(a)||Cl(e,t)}else{if(!(wl(a)||vl(a)||Sl(a)))break}o();break;case fl.ENTER:case fl.SPACE:if(!e.target.classList.contains("listbox-container"))break;t.focus(),o();break;case fl.ESCAPE:Cl(e,t),s.isActive()&&s.cancel()}},handleOnMouseEnter:()=>{n.current=!0},handleOnMouseLeave:()=>{n.current&&(n.current=!1)},globalKeyDown:e=>{if(!n.current||(()=>{const e=(null==a?void 0:a.select)||(null==a?void 0:a.active),t=i();return e||t})())return;const{keyCode:t,ctrlKey:s=!1,shiftKey:l=!1}=e;switch(t){case fl.ARROW_UP:r({up:1});break;case fl.ARROW_DOWN:r({down:1});break;case fl.PAGE_UP:r({up:o.stop-o.start});break;case fl.PAGE_DOWN:r({down:o.stop-o.start});break;case fl.HOME:r({scrollPosition:s&&l?"overflowStart":"start"});break;case fl.END:r({scrollPosition:s&&l?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const Bh=ga("div")((()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"})));function Wh(e){let{text:n}=e;const{translator:r}=s($a);return t.createElement(Bh,null,r.get(n))}const Hh={fontSize:"12px"},Uh=ga($)((e=>{let{theme:t,isLoading:n}=e;return{position:"absolute",top:0,left:0,height:48,zIndex:2,background:t.palette.custom.disabledBackground,opacity:1,color:t.palette.custom.disabledContrastText,width:"100%",display:"flex",justifyContent:n?"center":"flex-start",paddingLeft:16,paddingRight:16,borderRadius:0,"& *, & p":{color:t.palette.custom.disabledContrastText},"& i":{padding:"".concat(qs,"px")}}})),Gh=ga(k,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})((e=>{let{styles:t,isRtl:n}=e;return Q(Q({flexDirection:n?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},t.header),{},{"& *":{color:t.header.color}})})),Vh=ga(C)((e=>{let{styles:t}=e;return Q(Q({},t.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})}));function Kh(e){let{translator:n,toggleLock:r,keyboard:o,isLoading:i}=e;const a=n.get("SelectionToolbar.ClickToUnlock");return t.createElement(Uh,{title:a,tabIndex:o.enabled?0:-1,onClick:r,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:i},i?t.createElement(B,{size:16,variant:"indeterminate",color:"primary"}):t.createElement(as,{disableRipple:!0,style:Hh}),!i&&t.createElement(C,{fontSize:"14px"},a))}var Jh=e=>os((e=>Q(Q({},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 Zh=e=>os((e=>Q(Q({},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 Xh=e=>os((e=>Q(Q({},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 Qh="H",Yh="C";var ep={createDimensionIconData:e=>{let{dimInfo:t,app:n,selections:r,isPopover:o,active:i,keyboard:a}=e;switch(t.qGrouping){case Qh:return{icon:Zh,tooltip:"Listbox.DrillDown",onClick:void 0};case Yh:{const e=n&&i,s=()=>{o||r.confirm(),n.getDimension(t.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):console.log("engine api spec version doesn't have support for function stepCycle")})).catch((()=>null))};return{icon:e?Xh:Jh,tooltip:"Listbox.Cyclic",onClick:e?s:void 0,onKeyDown:e?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case fl.SPACE:case fl.ENTER:s();break;case fl.TAB:{if(!a.enabled)return;let n;n=e.shiftKey?a.focusSelection():vl(t)||Sl(t),n||Cl(e,a)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}}};const tp=I(F)((()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0})));function np(e){let{iconData:n,translator:r,iconStyle:o,disabled:i,keyboard:a}=e;if(!n)return;const{icon:s,tooltip:l,onClick:c,onKeyDown:u}=n,d=s,h=r.get(l);return c?t.createElement(tp,{variant:"outlined",onClick:c,tabIndex:a.innerTabStops?0:-1,title:h,size:"large",disableRipple:!0,disabled:i,onKeyDown:u,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button"},t.createElement(d,{style:o})):t.createElement(d,{title:h,size:"large",style:Q(Q({},o),{},{padding:"".concat(qs,"px")})})}const rp=500;let op=0;function ip(e){var o,i,a;let{layout:s,translator:l,styles:c,isRtl:u,showLock:d,showSearchIcon:p,constraints:f,onShowSearch:m,classes:g,containerRect:b,isPopover:y,showToolbar:v,showDetachedToolbarOnly:S,containerRef:w,model:C,selectionState:x,isDirectQuery:E,selections:L,keyboard:R,autoConfirm:I,app:T,disablePortal:O}=e;const[_,P]=n(S),[D,A]=n(null==s||null===(o=s.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked),[M,N]=n(!1);r((()=>{var e;A(null==s||null===(e=s.qListObject)||void 0===e||null===(e=e.qDimensionInfo)||void 0===e?void 0:e.qLocked)}),[null==s||null===(i=s.qListObject)||void 0===i||null===(i=i.qDimensionInfo)||void 0===i?void 0:i.qLocked]);const j=h(null),z=ep.createDimensionIconData({dimInfo:null==s||null===(a=s.qListObject)||void 0===a?void 0:a.qDimensionInfo,app:T,selections:L,isPopover:y,active:!(null!=f&&f.active),keyboard:R}),F=d&&D,$=!d&&D,B=p||$||z,W=Ls-(B?qs:0),H=u?Ls-(B?qs:0):Rs,U=(p?Is:0)+($?Is:0)+(z?Is:0),G=function(e){let{isLocked:t,setLocked:n,settingLockedState:r,model:o,setSettingLockedState:i}=e;return()=>{const e=new Date;if(e-op<rp)return Promise.resolve();if(r)return()=>{};i(!0),op=e;const a=t?o.unlock:o.lock;return n(!t),a.call(o,"/qListObjectDef").catch((()=>{n(t)})).finally((()=>{setTimeout((()=>{i(!1)}),0)}))}}({isLocked:D,setLocked:A,settingLockedState:M,setSettingLockedState:N,model:C}),V=Ic({layout:s,model:C,translator:l,selectionState:x,isDirectQuery:E,selections:L}),K=D||!d?void 0:[{key:"lock",type:void 0,label:l.get("SelectionToolbar.ClickToLock"),getSvgIconShape:ss,enabled:()=>!M&&!x.selectDisabled()&&du(s),action:G}],J=null!=f&&f.active?t.createElement(Qc,{title:l.get("Listbox.Search"),size:"large",style:Q(Q({},Hh),{},{padding:"".concat(qs,"px")})}):t.createElement(q,{onClick:m,tabIndex:-1,title:l.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn"},t.createElement(Qc,{style:Hh}));r((()=>{if(!j.current||!b)return;const e=function(e){var t,n,r,o;let{containerRect:i,titleRef:a,iconsWidth:s,paddingLeft:l,paddingRight:c}=e;const u=l+c,d=i.width<(null!==(t=null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0)+s+u+2+128,h=(null==a||null===(r=a.current)||void 0===r?void 0:r.scrollWidth)>(null==a||null===(o=a.current)||void 0===o?void 0:o.offsetWidth);return!(!d&&!h)}({containerRect:b,titleRef:j,iconsWidth:U,paddingLeft:W,paddingRight:H});P(S||e)}),[U,W,H,j.current,S,Object.entries(b||{}).sort().join(",")]);const X=function(e){let{isDetached:t,showToolbar:n,containerRef:r,isLocked:o,listboxSelectionToolbarItems:i,extraItems:a,selections:s,keyboard:l,autoConfirm:c,disablePortal:u}=e;return{autoConfirm:c,isDetached:t,show:n&&!t,popover:{show:n&&t,anchorEl:r.current},extraItems:a,more:{enabled:!o,actions:i,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"},disablePortal:u},selections:{show:n,api:s,onConfirm:()=>{null==l||l.focus()},onCancel:()=>{null==l||l.focus()}}}}({isDetached:!y&&_,showToolbar:v,containerRef:w,isLocked:D,extraItems:K,listboxSelectionToolbarItems:V,selections:L,keyboard:R,autoConfirm:I,disablePortal:O}),Y=t.createElement(Xc,Z({isRtl:u,layout:s},X));if(S)return Y;const ee=$?t.createElement(as,{size:"large",style:Q(Q({},Hh),{},{padding:"".concat(qs,"px")})}):void 0;return t.createElement(Gh,{item:!0,container:!0,styles:c,isRtl:u,marginY:1,paddingLeft:"".concat(W,"px"),paddingRight:"".concat(H,"px"),className:"header-container"},F&&t.createElement(Kh,{isLoading:M,translator:l,toggleLock:G,keyboard:R}),B&&t.createElement(k,{item:!0,container:!0,alignItems:"center",width:U,className:"header-action-container"},ee||p&&J,t.createElement(np,{iconData:z,iconStyle:Hh,disabled:L.isActive()&&y,translator:l,keyboard:R})),t.createElement(k,{item:!0,xs:!0,minWidth:0,justifyContent:u?"flex-end":"flex-start",className:g.listBoxHeader},t.createElement(Vh,{variant:"h6",noWrap:!0,ref:j,title:s.title,styles:c},s.title)),t.createElement(k,{item:!0,display:"flex"},Y))}const ap="ListBoxInline",sp={listBoxHeader:"".concat(ap,"-listBoxHeader"),screenReaderOnly:"".concat(ap,"-screenReaderOnly"),listboxWrapper:"".concat(ap,"-listboxWrapper")},lp=ga(k,{shouldForwardProp:e=>!["containerPadding","isGridMode","styles"].includes(e)})((e=>{let{theme:t,containerPadding:n,isGridMode:r,styles:o}=e;return Q(Q({},o.background),{},{["& .".concat(sp.listBoxHeader)]:{alignSelf:"center",display:"flex"},["& .".concat(sp.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"},["& .".concat(sp.listboxWrapper)]:{padding:n},"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus ::-webkit-scrollbar-track":{boxShadow:r?void 0:"inset -2px -2px 0px #3F8AB3"},"&:focus-visible":{outline:"none"}})}));const cp=t.memo((function(e){var o,a,l,u;let{options:d,layout:p}=e;const{app:f,direction:m,frequencyMode:g,checkboxes:b,search:y=!0,focusSearch:v=!1,rangeSelect:S=!0,model:w,selections:C,update:x,fetchStart:E,postProcessPages:L,calculatePagesHeight:R,showGray:q=!0,scrollState:I,renderedCallback:T,toolbar:O=!0,isPopover:_=!1,showLock:P=!1,components:D,selectDisabled:A=(()=>!1),disablePortal:M=!0}=d,N=ma(),{translator:j,keyboardNavigation:z,themeApi:F,queryParams:$,constraints:B}=s($a),{checkboxes:W=b}=p||{},H=uh({app:f,themeApi:F,theme:N,queryParams:$,components:D,checkboxes:W}),U=function(e){let{appLayout:t}=e;return!(null==t||!t.qIsDirectQueryMode)}({appLayout:null==f?void 0:f.layout}),G=h(),V=h(),[K,J]=ns(),[Z,X]=n(!1),[Y,ee]=n(!1),te=h(!1),[ne,re]=n({down:0,up:0,scrollPosition:""}),oe=e=>re((t=>Q(Q({},t),e))),[ie,ae]=n({start:0,stop:0}),[se]=ou(f),[le]=n((()=>cu({selectDisabled:A}))),ce=bl({containerRef:G,enabled:z}),ue=c((()=>(e=>{var t,n;let{app:r,appSelections:o}=e;return null!==(t=null===(n=r.isInModalSelection)||void 0===n?void 0:n.call(r))&&void 0!==t?t:o.isInModal()})({app:f,appSelections:se})),[f,se]),de=null==p?void 0:p.qListObject.qDimensionInfo.qError,he=de&&B.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",{handleKeyDown:pe,handleOnMouseEnter:fe,handleOnMouseLeave:me,globalKeyDown:ge}=i((()=>$h({keyboard:ce,hovering:te,updateKeyScroll:oe,currentScrollIndex:ie,constraints:B,isModal:ue,selections:C})),[ce,te,oe,G,ie,f,se,B,ue]);r((()=>(document.addEventListener("keydown",ge),()=>{document.removeEventListener("keydown",ge)})),[ge]),r((()=>{!0===y&&ee(!0);const e=()=>{X(!0)},t=()=>{X(!1),"toggle"===y&&ee(!1)};return _&&(C.isActive()||(C.on("activated",e),C.on("deactivated",t)),X(_)),O&&C&&(C.isModal()||(C.on("activated",e),C.on("deactivated",t)),X(_||C.isActive())),()=>{C&&C.removeListener&&(C.removeListener("activated",e),C.removeListener("deactivated",t))}}),[O,C,_]);const{wildCardSearch:be,searchEnabled:ye,autoConfirm:ve=!1,layoutOptions:Se={}}=null!=p?p:{},we=null==p||null===(o=p.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked,Ce=!1!==ye&&"toggle"===y&&!we,xe=(null==p||null===(a=p.title)||void 0===a?void 0:a.length)&&!1!==(null==p?void 0:p.showTitle),Ee=O&&!xe&&!_,ke=O&&xe||_,Le="rtl"===m;if(!(w&&p&&j&&H))return null;const Re=!0===y||"toggle"===y&&Y&&!1!==ye,qe=null!==(l=Se.dense)&&void 0!==l&&l,Ie=()=>{ee(!Y)},Te=()=>{"toggle"===y?Ie():V.current.focus()},Oe=Re&&("toggle"===y||v),_e="grid"===(null==Se?void 0:Se.dataLayout),Pe=function(e){let t,{isGridMode:n,dense:r,height:o,layoutOrder:i}=e;if(n){let e;e=nc({isGridMode:n,dense:r})>o?"0px":"2px",t="row"===i?"".concat(e," 4px"):"".concat(e," 6px ").concat(e," 4px")}else t=void 0;return t}({isGridMode:_e,dense:qe,height:null===(u=G.current)||void 0===u?void 0:u.clientHeight,layoutOrder:Se.layoutOrder});de&&(null==T||T());const De=ke?js+Os:0,Ae=t.createElement(ip,{app:f,showSearchIcon:Ce,onShowSearch:Ie,isPopover:_,showToolbar:Z,isDirectQuery:U,autoConfirm:ve,showDetachedToolbarOnly:Ee,layout:p,translator:j,styles:H,isRtl:Le,showLock:P,constraints:B,classes:sp,containerRect:J,containerRef:G,model:w,selectionState:le,selections:C,keyboard:ce,disablePortal:M});return t.createElement(t.Fragment,null,Ee&&Ae,t.createElement(lp,{className:"listbox-container",container:!0,tabIndex:ce.enabled?-1:void 0,direction:"column",gap:0,containerPadding:Pe,styles:H,style:{height:"100%",flexFlow:"column nowrap"},onKeyDown:pe,onMouseEnter:fe,onMouseLeave:me,ref:e=>{G.current=e,K(e)},isGridMode:_e,"aria-label":ce.active?j.get("Listbox.ScreenReaderInstructions"):""},ke&&Ae,t.createElement(k,{item:!0,container:!0,direction:"column",height:"100%",minHeight:De,role:"region","aria-label":j.get("Listbox.ResultFilterLabel")},t.createElement(k,{item:!0},t.createElement(ru,{ref:V,selections:C,selectionState:le,model:w,dense:qe,keyboard:ce,visible:Re,search:y,autoFocus:Oe,beginSelectionOnFocus:!_,wildCardSearch:be,searchEnabled:ye,direction:m,hide:Ce&&Ie,styles:H})),t.createElement(k,{item:!0,xs:!0,className:sp.listboxWrapper},de?t.createElement(Wh,{text:he}):t.createElement(Fh,null,(e=>{let{height:n,width:r}=e;return t.createElement(Ec,{model:w,app:f,constraints:B,layout:p,selections:C,selectionState:le,direction:m,frequencyMode:g,rangeSelect:S,checkboxes:W,height:n,width:r,update:x,fetchStart:E,postProcessPages:L,calculatePagesHeight:R,keyboard:ce,showGray:q,scrollState:I,keyScroll:{state:ne,reset:()=>re({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:ie,set:ae},renderedCallback:T,onCtrlF:Te,isModal:ue,styles:H})}))))))}));function up(e){let{options:n={}}=e;const{model:r}=n,[o]=es(r);return t.createElement(cp,{options:n,layout:o})}function dp(e){let{app:t,qId:o,options:i={}}=e;const[a,s]=n(),[l]=Va(),{sessionModel:c}=i,u=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],d=Object.keys(i).filter((e=>u.includes(e)));if(d.length)throw new Error('Option "'.concat(d.join(", "),'" is not applicable for existing objects.'));return r((()=>{let e=!1,n=()=>{};return async function(){const r=await Promise.resolve(c||async function(e){return l.get(e)||await t.getObject(e)}(o));if(!e){if(!l.get(r.id)){l.set(r.id,r);const e=()=>{l.clear(r.id)};r.once("closed",e),n=()=>{r.removeListener("closed",e)}}s(r)}}(),()=>{e=!0,n()}}),[]),a}const hp={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,autoConfirm:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};function pp(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 fp=["__DO_NOT_USE__"],mp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1};return Q(Q(Q({},Y(e,fp)),n),t)},gp=o(((e,o)=>{let{app:s,fieldIdentifier:l,qId:c,stateName:u,element:d,initialOptions:p,renderedCallback:f}=e;const[m,g]=n(p),{isExistingObject:b,hasExternalSelectionsApi:y}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:c,options:m});b||Object.assign(m,{frequencyMode:pp(m.frequencyMode)});const[v,S]=n(0);r((()=>{if(v)throw new Error("Source or selection Api can not change after a listbox has been mounted");S(v+1)}),[b,y]);const w=b?dp({app:s,qId:c,options:m}):function(e){var t;let{app:o,fieldIdentifier:i,stateName:a,options:s={}}=e;const[l,c]=n(""),[u,d]=n(!0),[p,f]=n(),[m,g]=n(),b=null!==(t=s.title)&&void 0!==t?t:m;let{histogram:y=!1,frequencyMode:v="N"}=s;l&&l.failedToFetchFieldDef&&(y=!1,v="N"),r((()=>{const e=y||"N"!==v;i.qLibraryId&&e?async function(){try{const e=await o.getDimension(i.qLibraryId),t=await e.getLayout();g(t.qDim.title),"N"===t.qDim.qGrouping?c(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""):c({multiFieldDim:!0}),d(!1)}catch(e){throw d(!1),c({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():(d(!1),g(i))}),[]);const{dense:S,checkboxes:w,listLayout:C,properties:x={}}=s,E={dense:S};"horizontal"===C&&(E.dataLayout="grid",E.layoutOrder="column",E.maxVisibleColumns={auto:!0},E.maxVisibleRows={auto:!1,maxRows:1});const k=h();k.current||(k.current=Th());const L=Ge(!0,{},hp,{qInfo:{qId:k.current},qListObjectDef:{qStateName:a,qFrequencyMode:y&&"N"===v?"V":v},histogram:y,checkboxes:w,layoutOptions:E,title:b});let R;if(Ge(!0,L,x),i.qLibraryId?(L.qListObjectDef.qLibraryId=i.qLibraryId,R=i.qLibraryId):(L.qListObjectDef.qDef.qFieldDefs=[i],R=i),"P"!==v&&y)if(null!=l&&l.multiFieldDim)L.frequencyMax="fetch";else{const e=i.qLibraryId?l:R;L.frequencyMax={qValueExpression:vc(e)}}const[q]=Ka(L,u?null:o,R,a);return r((()=>{q&&f(q)}),[q]),p}({app:s,fieldIdentifier:l,stateName:u,options:m}),C=h(d),x=y?m.selectionsApi:lu(s,w,[C,".njs-action-toolbar-more",".njs-action-toolbar-popover"],m)[0],E=i((()=>Q(Q({},m),{},{selections:x,model:w,app:s,renderedCallback:f})),[m,x,w,s]);return a(o,(()=>({setOptions:e=>g(e)})),[]),x&&w?t.createElement(up,{options:E}):null}));const bp={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function yp(e){let{app:r,fieldIdentifier:o,stateName:i,element:a,options:s={}}=e;const[l,c]=n(!!s.show);return t.createElement(dh,{show:l,app:r,alignTo:{current:a},anchorOrigin:s.anchorOrigin,transformOrigin:s.transformOrigin,close:()=>{c(!1),s.onPopoverClose&&s.onPopoverClose()},fieldName:o,stateName:i,autoFocus:s.autoFocus,components:s.components,sortCriteria:s.sortCriteria,direction:s.direction})}function vp(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Sp(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}const wp=e=>({qDef:{qFieldDefs:[e]}}),Cp=e=>({qDef:{qDef:e}});function xp(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,i={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r="string"==typeof e?wp(e):Q(Q({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||Th(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<i.maxDimensions()?(t.qDimensions.push(r),vp(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return Sp(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?Cp(e):Q(Q({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Th(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<i.maxMeasures()?(t.qMeasures.push(r),vp(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];Sp(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<i.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<i.maxMeasures()};return i}const Ep=e=>({qDef:{qFieldDefs:[e]}});function kp(e){let{dc:t,def:n,properties:r}=e;t.qInitialDataFetch=t.qInitialDataFetch||[];const o=r,i={dimensions:()=>t.qLibraryId||t.qDef&&t.qDef.qFieldDefs&&0!==t.qDef.qFieldDefs.length?[t]:[],measures:()=>[],addDimension(e){const r="string"==typeof e?Ep(e):Q(Q({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||Th(),r.qDef.qSortCriterias=t.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(r).forEach((e=>{t[e]=r[e]})),n.dimensions.added(r,o),r},removeDimension(e){const r=t;return delete t.qDef,delete t.qLibraryId,n.dimensions.removed(r,o,e),r},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===i.dimensions().length,canAddMeasure:()=>!1};return i}const Lp=e=>({qDef:{qFieldDefs:[e]}}),Rp=e=>{let t;return t="string"==typeof e?Ge(!0,{},hp,{qListObjectDef:Lp(e)}):e.qListObjectDef?Ge(!0,{},hp,e):Ge(!0,{},hp,{qListObjectDef:e}),t};function qp(e){let{children:t,halo:n}=e;const r={async addDimension(e){const r=Rp(e),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||Th(),!r.title)if(o.qLibraryId){const e=await n.app.getDimension(o.qLibraryId),t=await e.getProperties();t.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:t.qDim.qLabelExpression}}:r.title=t.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}t.push({qProperty:r,qChildren:[]})},addMeasure(){}};return r}function Ip(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 Tp(e,t){let{sn:n,properties:r,fields:o,children:i}=e;if(!o.length)return;const a=n.qae.data.targets[0];if(!a)return;const{propertyPath:s}=a,l=s.split("/");let c=r;for(let e=0;e<l.length;e++){const t=l[e];c=t?c[t]:c}const u=function(e){return e.match("/qListObjectDef")?kp:e.match("/qChildListDef")?qp:xp}(s),d=u({dc:c,def:a,properties:r,children:i,halo:t});for(let e=0;e<o.length;++e){const t=o[e];"measure"===Ip(t)?await d.addMeasure(t):await d.addDimension(t)}}var Op={getValue:(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},setValue:(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var _p={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 Pp=2**53-1;function Dp(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Ap(e,t){const n=Ge(!0,{},t,e);return Op.getValue(n,"qOtherTotalSpec.qOtherCounted")||Op.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),Op.getValue(n,"qOtherTotalSpec.qOtherLimit")||Op.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Mp(e,t){return Ge(!0,{},t,e)}function Np(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var jp={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===Op.getValue(e,t)&&Op.setValue(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Dp,importCommonProperties:function(e,t,n){const r="masterobject"===Op.getValue(t,"properties.qInfo.qType")?"masterobject":Op.getValue(n,"qInfo.qType");Op.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:Ap,createDefaultMeasure:Mp,resolveValue:Np,getHypercubePath:function(e){const t=Op.getValue(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(_p.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,_p.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=Ge(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?Op.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Dp(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=Ge(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=Np(i.max,r.dimensions.length,Pp),s=Np(i.min,r.dimensions.length,0);return{maxDimensions:Np(o.max,a,Pp),minDimensions:Np(o.min,s,0),maxMeasures:a,minMeasures:s}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.dimensions.length;++s)o.qDimensions.length<n?o.qDimensions.push(Ap(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Ap(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Ap(a.excludedDimensions[s],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.measures.length;++s)o.qMeasures.length<n?o.qMeasures.push(Mp(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Mp(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Mp(a.excludedMeasures[s],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=Op.getValue(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=Op.getValue(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var zp={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=Op.getValue(o,n||""),a=i.qHyperCubeDef,s=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),s.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&s.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),s.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&s.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),s.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();_p.isOrderedSubset(e,s.interColumnSortOrder)&&(s.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(jp.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!Op.isEmpty(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},s=jp.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=Op.getValue(n,i||"").qHyperCubeDef,c=Op.getValue(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p}=jp.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=jp.getDefaultDimension(),defaultMeasure:m=jp.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,jp.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p})&&jp.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:h,minMeasures:p,newHyperCubeDef:c}),jp.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:f}),jp.addDefaultMeasures({exportFormat:t,maxMeasures:h,minMeasures:p,newHyperCubeDef:c,defaultMeasure:m}),jp.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),jp.copyPropertyIfExist("qMaxStackedCells",l,c),jp.copyPropertyIfExist("qNoOfLeftDims",l,c),jp.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),jp.copyPropertyOrSetDefault("qMode",l,c,"S"),jp.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),jp.copyPropertyOrSetDefault("qSortbyYValue",l,c),jp.copyPropertyOrSetDefault("qIndentMode",l,c),jp.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),jp.importCommonProperties(s,t,n),jp.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),jp.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const Fp=e=>Op.getValue(e,"data.targets.0.propertyPath"),$p=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zp.exportProperties})(Fp(e))},Bp=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return zp.importProperties})(Fp(e))},Wp=async e=>{let{halo:t,model:n,cellRef:r,newType:o,properties:i,viewDataMode:a=!1}=e;const s=i?{qProperty:i}:await n.getFullPropertyTree(),l=r.current.getQae(),c=$p(l);if(!c)throw new Error("Source chart does not support conversion");const u=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),d=u.qae,h=Bp(d);if(!h)throw new Error("Target chart does not support conversion");return h({exportFormat:c({propertyTree:s,hypercubePath:jp.getHypercubePath(l),viewDataMode:a}),initialProperties:Q({qInfo:{qType:o},visualization:o},Op.getValue(d,"properties.initial",{})),dataDefinition:Op.getValue(d,"data.targets.0.",{}),hypercubePath:jp.getHypercubePath(d),viewDataMode:a})},Hp={hypercube:zp},Up=Ge.bind(null,!0),Gp={},{isArray:Vp}=Array;function Kp(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Jp(e){return void 0===e}function Zp(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Xp(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Jp(e[r||t])?i:e[t],e=e[r||t]})),e}function Qp(e,t){let n=!0;if(Kp(e)&&Kp(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Qp(e[r],t[r])||(n=!1)})),n);if(Vp(e)&&Vp(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Qp(e[n],t[n]))return!1;return!0}return e===t}Gp.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Up({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);Qp(i,a)||Zp(t,o)||(Jp(a)?r.push({op:"add",path:s,value:i}):Kp(i)&&Kp(a)?r=r.concat(Gp.generate(a,i,s)):Vp(i)&&Vp(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]&&Jp(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(Qp(t,o))return r;if(!Jp(t[0])&&Jp(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(Gp.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((o=>{Jp(t[o])&&!Zp(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Gp.apply=function(e,t){t.forEach((t=>{let n=Xp(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Vp(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Vp(o)&&Vp(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Kp(o)&&Kp(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Zp(a,e)&&delete a[e]})),Up(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=Xp(e,t.from);Vp(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Vp(n)?n.splice(+r,1):delete n[r]);var a}))},Gp.clone=function(e){return Up({},e)},Gp.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},Gp.updateObject=function(e,t){Object.keys(e).length?Gp.apply(e,Gp.generate(e,t)):Up(e,t)};const Yp=e=>t=>{const n=(r=Q(Q({},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(le.prototype).forEach((e=>{r[e]=le.prototype[e]})),le.init(r),r);var r;return n};let ef,tf;function nf(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 rf(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null},contraintsWarning:!0}}function of(e){sf(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 af(e){if(e.__hooks.obsolete)return Promise.resolve();tf=-1,ef=e,ef.__hooks.initiated&&ef.__hooks.list.length;try{ef.fn.call(null)}catch(e){console.error(e)}ef.__hooks.initiated=!0;const t=ef.__hooks;return df(ef),tf=void 0,ef=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){sf(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){sf(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 sf(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 lf(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 cf(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 uf(e){return e.__hooks.imperativeHandle}function df(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function hf(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,df(e))}function pf(e){if(void 0===ef)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=ef.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function ff(e){pf(++tf);return ef.context[e]}function mf(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function gf(e){return{__hooked:!0,fn:e,initiate:rf,run:af,teardown:of,runSnaps:lf,runMenu:cf,focus:Kf,blur:Jf,observeActions:hf,getImperativeHandle:uf,updateRectOnNextRun:mf}}function bf(e){const t=pf(++tf);if(!t.value){t.component=ef;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,af(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function yf(e,t){const n=pf(++tf);nf(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===ef.__hooks.pendingEffects.indexOf(n)&&ef.__hooks.pendingEffects.push(n))}function vf(e,t){const n=pf(++tf);nf(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],ef.__hooks.pendingLayoutEffects.push(n))}function Sf(e,t){const n=pf(++tf);return nf(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function wf(e){return Sf((()=>({current:e})),[])}function Cf(e,t){const[n,r]=bf((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=pf(++tf);return o.component||(o.component=ef),vf((()=>{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 xf(){return ff("element")}function Ef(){const e=xf(),t=ef.__hooks.resizer,[n,r]=bf((()=>{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()),vf((()=>{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 kf(){return ff("layout")}function Lf(){const e=ff("layout"),[t]=bf({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function Rf(){return ff("appLayout")}function qf(){const e=ff("model");return e&&e.session?e:void 0}function If(){const e=ff("app");return e&&e.session?e:void 0}function Tf(){const e=ff("global");return e&&e.session?e:void 0}function Of(){return ff("selections")}function _f(){return ff("theme")}function Pf(){return ff("nebbie")}function Df(){return ff("translator")}function Af(){return ff("deviceType")}function Mf(){return ff("navigation")}function Nf(){return ff("plugins")}function jf(e,t){const[n]=bf({action(){n._config.action.call(null)}});return n.component||(n.component=ef,ef.__hooks.actions.list.push(n)),Sf((()=>{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 zf(){return ff("constraints")}function Ff(){return ff("interactions")}function $f(){return ff("options")}function Bf(e,t){const n=pf(++tf);if(n.imperative||(n.imperative=!0),nf(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],ef.__hooks.imperativeHandle=r}}function Wf(e){const t=pf(++tf);t.value||(t.value=1,ef.__hooks.snaps.push(t)),t.fn=e}function Hf(e){const t=pf(++tf);t.value||(t.value=1,ef.__hooks.menus.push(t)),t.fn=e}function Uf(){pf(++tf);const e=ef.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Gf(){return ff("emitter")}function Vf(){const e=ff("keyboardNavigation"),t=ff("focusHandler");if(!ef.__hooks.accessibility.exitFunction){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.__hooks.accessibility;n.enabled&&n.active&&(Jf(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(ef);ef.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Kf(this))}.bind(ef);ef.__hooks.accessibility.focusFunction=n;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(ef);ef.__hooks.accessibility.focusSelectionFunction=r}const n=ef.__hooks.accessibility.focusFunction,r=ef.__hooks.accessibility.exitFunction,o=ef.__hooks.accessibility.focusSelectionFunction,[i,a]=bf({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return ef.__hooks.accessibility.setter=a,ef.__hooks.accessibility.enabled=e,yf((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Kf(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 Jf(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 Zf={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Xf=Object.keys(Zf),Qf=e=>(Object.keys(le.prototype).forEach((t=>{e[t]=le.prototype[t]})),le.init(e),e);function Yf(e,t){const n=Q({},Zf);Qf(n);const r={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==Xf.indexOf(t)?n[t]=e.component[t].bind(r):r[t]=e.component[t]}));const o=function(e){let{sn:t,component:n}=e;const r={},o=[],i=Yp(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:r}),i=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(r,{model:t.model,app:t.app,global:i,selections:t.selections,actions:o.actions}),Object.assign(n,{actions:o.actions,model:t.model,app:t.app,selections:t.selections}),[n,o]}function em(e,t,n){"function"==typeof e.component&&(e.component=gf(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const i={},a=["appLayout","constraints","interactions"],s={},l={};t.model&&t.model.session||(s.select=!0,s.edit=!0,l.select=!1,l.edit=!1);const c={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,navigation:t.navigation,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,externalFocusManagement:t.externalFocusManagement||!1,focusHandler:t.focusHandler,constraints:s,interactions:l,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(c,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(Q(Q({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(Q(Q({},r[e]),l))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=c.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},onContextMenu(t,n,r){return e.component.runMenu(this,t,n,r)},focus(){const t=e.component.getImperativeHandle(this);t&&"function"==typeof t.focus?t.focus():e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach((e=>{i[e]=JSON.stringify(c.context[e])})),i.themeName=c.context.theme?c.context.theme.name():void 0,i.language=c.context.translator?c.context.translator.language():void 0,Object.assign(c,{selections:t.selections}),[c,null]}(e,t,n):Yf(e,t),i=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];try{e.qae.properties.onChange.call({model:t.model},...r)}catch(e){}return t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=Gp.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Gp.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const s=Gp.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,s,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.__snInterceptor&&(t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor)},i.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){i.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const tm=1e3,nm=1e3,rm=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],om=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map((e=>{let[t,n]=e;return t+(Math.random()*(n-t)|0).toString(32)})).join(""),im=(e,t)=>e&&e.find((e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t}))||null,am=e=>{var t,n;return Q(Q({},e),{},{qDef:Q(Q({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:om()})})},sm=e=>{var t;return Q(Q({},am(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},lm=(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]}))},cm=new Error("Not supported in this object, need to implement in subclass."),um=e=>{if(!e)return[];return[...e].map((e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?Q(Q({},e),{},{qDef:Q(Q({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e}))},dm=(e,t)=>{if(e)return t&&Op.getValue(e,t)?Op.getValue(e,t).qHyperCube:e.qHyperCube};function hm(e,t){return e.filter(((e,n)=>t.includes(n)))}function pm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeDimensions(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function fm(e,t,n){_p.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function mm(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 gm(e,t){return e.getAlternativeDimensions().length+t.length>=tm}function bm(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<tm}async function ym(e,t,n,r,o,i){await e.autoSortDimension(t),_p.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 vm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=e.getAlternativeMeasures(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function Sm(e,t){_p.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function wm(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<nm}function Cm(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 xm{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=im(n,e.id))&&void 0!==t?t:im(r,e.id)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw cm}addDimensions(){throw cm}removeDimension(){throw cm}removeDimensions(){throw cm}autoSortDimension(){throw cm}replaceDimension(){throw cm}getSorting(){throw cm}createLibraryDimension(e){let t=Ge(!0,{},this.dimensionProperties||{},e.defaults||{});return t=sm(t),t.qLibraryId=e.id,t.qDef.autoSort=!0,t.qDef.qSortCriterias=rm,delete t.qDef.qFieldDefs,delete t.qDef.qFieldLabels,t}createFieldDimension(e){let t=Ge(!0,{},this.dimensionProperties||{},e.defaults||{});return t=sm(t),e.field||(t.qDef.qFieldDefs=[],t.qDef.qFieldLabels=[],t.qDef.qSortCriterias=[]),t.qDef.qFieldDefs=[e.field],t.qDef.qFieldLabels=e.label?[e.label]:[""],t.qDef.qSortCriterias=rm,t.qDef.autoSort=!0,t}addFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t)}addFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t)}addLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t)}addLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t)}async addAltLibraryDimensions(e){const t=e.map((e=>this.createLibraryDimension(e)));return this.addDimensions(t,!0)}async addAltFieldDimensions(e){const t=e.map((e=>this.createFieldDimension(e)));return this.addDimensions(t,!0)}addAlternativeFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t,!0)}addAlternativeLibraryDimension(e){const t=this.createLibraryDimension(e);return this.addDimension(t,!0)}minDimensions(){return"function"==typeof this.dimensionDefinition.min?this.dimensionDefinition.min.call(null,this.properties,this):this.dimensionDefinition.min||0}maxDimensions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=this.getMeasures().length-e;if("function"==typeof this.dimensionDefinition.max){var n;const e=[t];return null===(n=this.dimensionDefinition.max)||void 0===n?void 0:n.apply(null,e)}return Number.isNaN(+this.dimensionDefinition.max)?1e4:this.dimensionDefinition.max}canAddDimension(){return this.getDimensions().length<this.maxDimensions()}getMeasures(){return[]}getAlternativeMeasures(){throw new Error("Method not implemented.")}addMeasure(){throw cm}addMeasures(){throw cm}removeMeasure(){throw cm}removeMeasures(){throw cm}autoSortMeasure(){throw cm}replaceMeasure(){throw cm}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=im(n,e.id))&&void 0!==t?t:im(r,e.id)}createExpressionMeasure(e){var t,n;const r=Ge(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},r.qDef.qDef=e.expression,r.qDef.qLabel=e.label,r.qDef.autoSort=!0,r}addExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t)}addExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t)}createLibraryMeasure(e){var t,n;const r=Ge(!0,{},this.measureProperties||{},e.defaults||{});return r.qDef=null!==(t=r.qDef)&&void 0!==t?t:{},r.qDef.qNumFormat=null!==(n=r.qDef.qNumFormat)&&void 0!==n?n:{},(e=>{const t=e;t.quarantine={qNumFormat:t.qNumFormat||{},isCustomFormatted:t.isCustomFormatted||!1},t.qNumFormat=null,t.isCustomFormatted=void 0})(r.qDef),r.qLibraryId=e.id,r.qDef.autoSort=!0,delete r.qDef.qDef,delete r.qDef.qLabel,r}addLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t)}addLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t)}addAltLibraryMeasures(e){const t=e.map((e=>this.createLibraryMeasure(e)));return this.addMeasures(t,!0)}addAltExpressionMeasures(e){const t=e.map((e=>this.createExpressionMeasure(e)));return this.addMeasures(t,!0)}addAlternativeExpressionMeasure(e){const t=this.createExpressionMeasure(e);return this.addMeasure(t,!0)}addAlternativeLibraryMeasure(e){const t=this.createLibraryMeasure(e);return this.addMeasure(t,!0)}minMeasures(){return"function"==typeof this.measureDefinition.min?this.measureDefinition.min.call(null,this.properties,this):this.measureDefinition.min||0}maxMeasures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("function"==typeof this.measureDefinition.max){const t=[this.getDimensions().length-e];return this.measureDefinition.max.apply(null,t)}return Number.isNaN(+this.measureDefinition.max)?1e4:this.measureDefinition.max}canAddMeasure(){return this.getMeasures().length<this.maxMeasures()}updateGlobalChangeListeners(e){this.globalChangeListeners&&(this.globalChangeListeners||[]).forEach((t=>{t&&"function"==typeof t&&t(this.properties,this,{layout:e})}))}}function Em(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then((async()=>(fm(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 km(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((()=>(Sm(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 Lm(e,t){!function(e,t){_p.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 Rm(e,t){!function(e,t){_p.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 qm(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 Im(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),Sm(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 Tm extends xm{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?Op.getValue(e,"".concat(this.path,".qHyperCubeDef")):e.qHyperCubeDef,this.hcProperties&&(!function(e){var t,n,r,o,i,a,s;const l=e;l.hcProperties.qDimensions=null!==(t=l.getDimensions())&&void 0!==t?t:[],l.hcProperties.qMeasures=null!==(n=l.getMeasures())&&void 0!==n?n:[],l.hcProperties.qInterColumnSortOrder=null!==(r=l.hcProperties.qInterColumnSortOrder)&&void 0!==r?r:[],l.hcProperties.qLayoutExclude=null!==(o=l.hcProperties.qLayoutExclude)&&void 0!==o?o:{qHyperCubeDef:{qDimensions:[],qMeasures:[]}},l.hcProperties.qLayoutExclude.qHyperCubeDef=null!==(i=l.hcProperties.qLayoutExclude.qHyperCubeDef)&&void 0!==i?i:{qDimensions:[],qMeasures:[]},l.hcProperties.qLayoutExclude.qHyperCubeDef.qDimensions=null!==(a=l.getAlternativeDimensions())&&void 0!==a?a:[],l.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=null!==(s=l.getAlternativeMeasures())&&void 0!==s?s:[]}(this),function(e){const t=e;t.hcProperties.isHCEnabled&&0===t.hcProperties.qDynamicScript.length&&"S"===t.hcProperties.qMode&&(t.hcProperties.qDynamicScript=[])}(this),this.hcProperties.qDimensions=um(this.hcProperties.qDimensions),this.hcProperties.qMeasures=um(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=dm(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e){const t=sm(e.dimension);return bm(this,e.alternative)?pm(this,t,e.index):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?Em(e,t,o):Promise.resolve(t)}(this,t,e.index)}async addDimensions(e){const t=this.getDimensions(),n=t.length,r=[];let o=0;const{dimensions:i}=e;var a,s=!1,l=!1;try{for(var c,u=V(i);s=!(c=await u.next()).done;s=!1){const i=c.value;{if(gm(this,t))return r;const a=sm(i);if(bm(this,e.alternative||!1)){const e=await pm(this,a);r.push(e)}else t.length<this.maxDimensions()&&(await ym(this,a,n,t,r,o),o++)}}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}return r}removeDimension(e){const{alternative:t,index:n}=e;t&&qm(this,n),Lm(this,n)}async removeDimensions(e){const t=this.getAlternativeDimensions(),n=this.getDimensions();if(0===e.indexes.length)return[];let r=[];const o=[...e.indexes].sort(((e,t)=>t-e));if(e.alternative&&t.length>0){r=hm(t,e.indexes);var i,a=!1,s=!1;try{for(var l,c=V(o);a=!(l=await c.next()).done;a=!1){const e=l.value;await qm(this,e)}}catch(e){s=!0,i=e}finally{try{a&&null!=c.return&&await c.return()}finally{if(s)throw i}}}else if(n.length>0){r=hm(n,e.indexes);var u,d=!1,h=!1;try{for(var p,f=V(o);d=!(p=await f.next()).done;d=!1){const e=p.value;await Lm(this,e)}}catch(e){h=!0,u=e}finally{try{d&&null!=f.return&&await f.return()}finally{if(h)throw u}}}return r}replaceDimension(e){const{index:t,dimension:n}=e;return this.autoSortDimension(n).then((()=>function(e,t,n){if(!n)return;const r=e.getDimensions(),o=r[t],i=Q(Q({},n),{},{qDef:Q(Q({},n.qDef),{},{cId:om()})});return r[t]=i,i&&"function"==typeof e.dimensionDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertDimension(e){const t=am(e.dimension);return bm(this,e.alternative)?pm(this,t,e.index).then((()=>{mm(this,t)})):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?(r.splice(o,0,t),fm(e,r),mm(e,t)):Promise.resolve(t)}(this,t,e.index)}moveDimension(e){const t=this.getDimensions(),n=this.getAlternativeDimensions();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(_p.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Promise.resolve(Cm(e.fromIndex,e.toIndex,t,n)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;_p.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}autoSortDimension(e){return e.qLibraryId?function(e,t){return e.app.getDimensionList().then((n=>{const r=(null==t?void 0:t.qLibraryId)&&(o=t.qLibraryId,(i=n)&&i.find((e=>e.qInfo.qId===o))||null);var o,i;return r&&lm(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&&lm([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=dm(this.layout,this.path);return e?e.qMeasureInfo:[]}getMeasureLayout(e){return this.getMeasureLayouts().filter((t=>e===t.cId))[0]}addMeasure(e){const t=am(e.measure);if(wm(this,e.alternative)){return vm(t,this.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures,e.index)}return km(this,t,e.index)}autoSortMeasure(e){const t=e;return t.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},Promise.resolve(t)}addMeasures(e){const t=this.getMeasures(),n=[];let r=0;return e.measures.forEach((async o=>{if(function(e,t){return e.getAlternativeMeasures().length+t.length>=nm}(this,t))return!1;const i=am(o);return wm(this,e.alternative||!1)?(vm(this,i),n.push(i)):t.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=Q({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},_p.indexAdded(e.hcProperties.qInterColumnSortOrder,i.length+n.length+o),n.push(a),r.push(a),"function"==typeof e.measureDefinition.add&&e.measureDefinition.add.call(null,a,e.properties,e),Promise.resolve(r)}(this,i,t,n,r),r++),!0})),n}removeMeasure(e){const{index:t,alternative:n}=e;n&&function(e,t){e.getAlternativeMeasures().splice(t,1)}(this,t),Rm(this,t)}async removeMeasures(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();let r=[];if(0===e.length)return r;if(e.alternative&&n.length>0)r=hm(n,e.indexes),function(e,t){const n=e,r=function(e,t){return e.filter(((e,n)=>!t.includes(n)))}(n.getAlternativeMeasures(),t);n.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=r}(this,e.indexes);else if(t.length>0){r=hm(t,e.indexes);const n=[...e.indexes].sort(((e,t)=>t-e));var o,i=!1,a=!1;try{for(var s,l=V(n);i=!(s=await l.next()).done;i=!1){const e=s.value;await Rm(this,e)}}catch(e){a=!0,o=e}finally{try{i&&null!=l.return&&await l.return()}finally{if(a)throw o}}}return r}replaceMeasure(e){const{index:t,measure:n}=e;return this.autoSortMeasure(n).then((()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=Q(Q({},n),{},{qDef:Q(Q({},n.qDef),{},{cId:om()})});return r[t]=i,i&&"function"==typeof e.measureDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,t,n)))}reinsertMeasure(e){const t=am(e.measure);return wm(this,e.alternative)?vm(this,t,e.index):Im(this,t,e.index)}moveMeasure(e){const t=this.getMeasures(),n=this.getAlternativeMeasures();return e.fromIndex<t.length&&e.toIndex<t.length?Promise.resolve(_p.move(t,e.fromIndex,e.toIndex)):e.fromIndex<t.length&&e.toIndex>=t.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e.fromIndex,e.toIndex,t,n):e.fromIndex>=t.length&&e.toIndex<t.length?Cm(e.fromIndex,e.toIndex,t,n):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;_p.move(r,o,i)}(e.fromIndex,e.toIndex,t,n))}setSorting(e){e&&e.length===this.hcProperties.qInterColumnSortOrder.length&&(this.hcProperties.qInterColumnSortOrder=e)}getSorting(){return this.hcProperties.qInterColumnSortOrder}changeSorting(e){Op.move(this.hcProperties.qInterColumnSortOrder,e.fromIndex,e.toIndex)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}setHCEnabled(e){this.hcProperties&&(this.hcProperties.isHCEnabled=e)}getDynamicScripts(){var e;return(null===(e=this.hcProperties)||void 0===e?void 0:e.qDynamicScript)||[]}}const Om=()=>{};function _m(e,t){return void 0===e?()=>t:()=>e}function Pm(e){const t=e||{};return{min:"function"==typeof t.min?t.min:_m(t.min,0),max:"function"==typeof t.max?t.max:_m(t.max,1e3),added:t.added||t.add||Om,description:t.description||Om,moved:t.moved||t.move||Om,removed:t.removed||t.remove||Om,replaced:t.replaced||t.replace||Om,isDefined:()=>!!e}}const Dm=(e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o};function Am(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>Dm(e,n,{}),dimensions:Pm(e.dimensions),measures:Pm(e.measures)}}function Mm(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);return{properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(Am)},exportProperties:t.exportProperties,importProperties:t.importProperties}}function Nm(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:Mm(n.qae),component:n.component||{},create:e=>em(r,e,t),definition:t.flags.isEnabled("NEBULA_DATA_HANDLERS")?{dataHandler:e=>new Tm(e)}:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var jm=e=>os((e=>Q(Q({},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 zm(e){let{d:n}=e;const r=ma();let o="inherit",i=r.palette.success.main;n.missing?i=r.palette.warning.main:n.error&&(o="error",i=r.palette.error.main);const a={color:i},s=t.createElement(C,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(W,null,n.missing||n.error?t.createElement(jm,{style:a}):t.createElement(Cs,{style:a})));return t.createElement(k,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(k,{item:!0},s),t.createElement(k,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(C,{noWrap:!0,component:"p"},t.createElement(C,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(C,{component:"span"}," "),t.createElement(C,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Fm(e){let{data:n}=e;const r=ma();return t.createElement(k,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(zm,{d:e,key:n})));return o.length>0&&t.createElement(k,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(C,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function $m(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(k,{item:!0},t.createElement(jm,{style:{fontSize:"38px"}})),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(k,{item:!0},t.createElement(C,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Fm,{data:o}))}const Bm=["size"],Wm="Progress",Hm={root:"".concat(Wm,"-root"),front:"".concat(Wm,"-front"),back:"".concat(Wm,"-back")},Um=ga("div")((e=>{let{theme:t}=e;return{["&.".concat(Hm.root)]:{position:"relative",display:"inline-block"},["& .".concat(Hm.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Hm.back)]:{color:t.palette.divider}}})),Gm={small:16,medium:32,large:64,xlarge:128};function Vm(e){let{size:n="medium"}=e,r=Y(e,Bm);const o=Gm[n];return t.createElement(Um,{className:Hm.root},t.createElement(B,Z({variant:"determinate",value:100,className:Hm.back,size:o,thickness:3},r)),t.createElement(B,Z({variant:"indeterminate",disableShrink:!0,className:Hm.front,size:o,thickness:3},r)))}const Km=["cancel","translator"],Jm=["retry","translator"],Zm={stripes:"".concat("LongRunningQuery","-stripes")},Xm=ga(k)((()=>({["& .".concat(Zm.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 Qm(e){let{cancel:n,translator:r}=e,o=Y(e,Km);return t.createElement(t.Fragment,null,t.createElement(Xm,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(k,{item:!0},t.createElement(Vm,null)),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(k,Z({item:!0},o),t.createElement(F,{variant:"contained",onClick:n},r.get("Cancel"))))}function Ym(e){let{retry:n,translator:r}=e,o=Y(e,Jm);return t.createElement(t.Fragment,null,t.createElement(k,{item:!0},t.createElement(jm,{style:{fontSize:"38px"}})),t.createElement(k,{item:!0},t.createElement(C,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(k,{item:!0},t.createElement(F,Z({variant:"contained",onClick:n},o),r.get("Retry"))))}function eg(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=s($a);return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:Zm.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(Qm,{cancel:o.cancel,translator:i,className:Zm.cancel}),r&&t.createElement(Ym,{retry:o.retry,translator:i,className:Zm.retry}))}function tg(){return t.createElement(k,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(Vm,{size:"large"}))}const ng={width:0,height:0},rg="Header",og={containerStyle:"".concat(rg,"-containerStyle"),containerTitleStyle:"".concat(rg,"-containerTitleStyle")},ig=ga(k)((e=>{let{theme:t}=e;return{["&.".concat(og.containerStyle)]:{flexGrow:0},["&.".concat(og.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),ag="njs-cell-title",sg="njs-cell-sub-title";function lg(e){let{id:o,layout:i,sn:a,anchorEl:s,hovering:l,focusHandler:c,titleStyles:u={},isRtl:d,translator:h}=e;const p=i.showTitles&&!!i.title,f=i.showTitles&&!!i.subtitle,m=i.qSelectionInfo&&i.qSelectionInfo.qInSelections,[g,b]=n([]);r((()=>{a&&a.component&&a.component.isHooked&&a.component.observeActions((e=>{b([...e,...a&&a.selectionToolbar&&a.selectionToolbar.items||[]])}))}),[a]);const y=[og.containerStyle,...p||f?[og.containerTitleStyle]:[]],v=l||m,S=t.createElement(Xc,{show:!1,selections:{show:m,api:a.component.selections,onKeyDeactivate:c.refocusContent},actions:g,popover:{show:v,anchorEl:s},focusHandler:c,layout:i,isRtl:d});return t.createElement(ig,{item:!0,container:!0,wrap:"nowrap",className:y.join(" ")},t.createElement(k,{item:!0,zeroMinWidth:!0,xs:!0,dir:d?"rtl":"ltr"},t.createElement(k,{container:!0,wrap:"nowrap",direction:"column"},p?t.createElement(L,{title:i.title},t.createElement(C,{id:"".concat(o,"_title"),variant:"h6",noWrap:!0,className:ag,style:u.main},i.title)):t.createElement("div",{id:"".concat(o,"_title"),style:ng,"aria-label":h.get("Accessibility.Object.NoTitle")}),f&&t.createElement(L,{title:i.subtitle},t.createElement(C,{variant:"body2",noWrap:!0,className:sg,style:u.subTitle},i.subtitle)))),t.createElement(k,{item:!0},S))}const cg="condition",ug="search",dg="clear_selection",hg="matches_exactly",pg="starts_with",fg="ends_with",mg="beginning_of_word",gg="general",bg="fixed_value",yg=(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 ug:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case mg:o="*^",i="*";break;case fg:o="*";break;case pg:i="*";break;case hg:break;default:o="*",i="*"}const a=null!==(n=null===(r=e.options.values)||void 0===r?void 0:r[0])&&void 0!==n?n:"";return""!==a?'"'.concat(o).concat(a).concat(i,'"'):""})(e);break;case cg:o+=(e=>{var t,n,r,o,i,a,s;const{options:l}=e,c=(null==l?void 0:l.mode)===gg,u=(null==l||null===(t=l.modifier)||void 0===t?void 0:t.type)===bg,d=null!=l&&null!==(n=l.modifier)&&void 0!==n&&n.operator?l.modifier.operator.split(" "):[];if(0===d.length||!u&&(null===(r=l.firstValue)||void 0===r||!r.aggregator||null===(o=l.firstValue)||void 0===o||!o.field)||u&&(null===(i=l.firstValue)||void 0===i||!i.fixedValue)||c&&(null===(a=l.conditionField)||void 0===a||!a.aggregator||null===(s=l.conditionField)||void 0===s||!s.field))return"";let h,p,f="=";var m,g,b;if(c&&u)h="".concat(null===(m=l.conditionField)||void 0===m?void 0:m.aggregator,"(").concat(yc(null===(g=l.conditionField)||void 0===g?void 0:g.field),")"),p="".concat(null===(b=l.firstValue)||void 0===b?void 0:b.fixedValue);else if(!c&&u){var y;h="",p="".concat(null===(y=l.firstValue)||void 0===y?void 0:y.fixedValue),f=""}else if(c||u){var v,S,w,C;h="".concat(null===(v=l.conditionField)||void 0===v?void 0:v.aggregator,"(").concat(yc(null===(S=l.conditionField)||void 0===S?void 0:S.field),")"),p="".concat(null===(w=l.firstValue)||void 0===w?void 0:w.aggregator,"(").concat(yc(null===(C=l.firstValue)||void 0===C?void 0:C.field),")")}else{var x,E;h="".concat(yc(e.field)),p="".concat(null===(x=l.firstValue)||void 0===x?void 0:x.aggregator,"(total ").concat(yc(null===(E=l.firstValue)||void 0===E?void 0:E.field),")")}const k="".concat(f).concat(h).concat(d[0]).concat(p);let L="";if(d.length>1){var R,q,I;if(!u&&(null===(R=l.secondValue)||void 0===R||!R.aggregator||null===(q=l.secondValue)||void 0===q||!q.field)||u&&(null===(I=l.secondValue)||void 0===I||!I.fixedValue))return"";let e,t;var T;if(c&&u)e="".concat(null===(T=l.secondValue)||void 0===T?void 0:T.fixedValue),t=" and ".concat(h);else if(!c&&u){var O;e="".concat(null===(O=l.secondValue)||void 0===O?void 0:O.fixedValue),t=""}else if(c||u){var _,P;e="".concat(null===(_=l.secondValue)||void 0===_?void 0:_.aggregator,"(").concat(yc(null===(P=l.secondValue)||void 0===P?void 0:P.field),")"),t=" and ".concat(h)}else{var D,A;e="".concat(null===(D=l.secondValue)||void 0===D?void 0:D.aggregator,"(total ").concat(yc(null===(A=l.secondValue)||void 0===A?void 0:A.field),")"),t=" and ".concat(h)}L="".concat(t).concat(d[1]).concat(e)}return'"'.concat(k).concat(L,'"')})(e);break;case dg:o+=t.get("Object.FilterLabel.All");break;default:o+=null!==(r=e.options)&&void 0!==r&&r.values?e.options.values.join(", "):t.get("Object.FilterLabel.Unknown")}return""!==o&&(o=o.replace(/^"|"$/g,""),e.exclude&&(o="".concat(n," ").concat(o))),{field:e.field,label:o}})).filter((e=>""!==e.label))},vg=(e,t)=>yg(e,t).map((e=>"".concat(e.field,": ").concat(e.label))).join("; ");var Sg=e=>os((e=>Q(Q({},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 wg(e){let{styles:n,children:r}=e;return t.createElement(C,{noWrap:!0,variant:"body2",style:Q(Q({},n),{},{fontStyle:"italic"})},r)}function Cg(e){var n;let{layout:r,translator:o,filtersFootnoteString:i,footerStyle:a,isRtl:s}=e;const l=yg(null!==(n=null==r?void 0:r.filters)&&void 0!==n?n:[],o),c={color:null==a?void 0:a.color,fontFamily:null==a?void 0:a.fontFamily,fontSize:null==a?void 0:a.fontSize,fontWeight:null==a?void 0:a.fontWeight};return t.createElement(L,{title:i},t.createElement(k,{container:!0,wrap:"nowrap",sx:{backgroundColor:null==a?void 0:a.backgroundColor,padding:null==a?void 0:a.padding,borderTop:null==a?void 0:a.borderTop},"data-testid":"filters-footnote",justifyContent:s?"flex-end":"flex-start"},t.createElement(k,{item:!0,display:"flex"},t.createElement(Sg,{style:{fontSize:"12px",color:a.color,margin:"auto"}}),t.createElement(wg,{styles:Q(Q({},c),{},{marginLeft:"2px"})},o.get("Object.FiltersApplied")," ")),t.createElement(k,{item:!0,display:"flex"},l.map((e=>t.createElement(k,{container:!0,wrap:"nowrap",key:"".concat(e.field,"-").concat(e.label)},t.createElement(wg,{styles:Q(Q({},c),{},{fontWeight:"bold"})},"".concat(e.field,":")),t.createElement(wg,{styles:c}," ",e.label," ")))))))}const xg={itemStyle:"".concat("Footer","-itemStyle")},Eg=ga(k)((()=>({["& .".concat(xg.itemStyle)]:{minWidth:0,width:"100%"}}))),kg="njs-cell-footer";function Lg(e){var n,r,o;let{layout:i,titleStyles:a={},translator:s,flags:l,isCardTheme:c,isRtl:u}=e;const d=a.footer,h=(null==i||null===(n=i.filters)||void 0===n?void 0:n.length)>0&&(null==i||null===(r=i.qHyperCube)||void 0===r||null===(r=r.qMeasureInfo)||void 0===r?void 0:r.length)>0,p=vg(null!==(o=null==i?void 0:i.filters)&&void 0!==o?o:[],s),f=!(null!=i&&i.footnote)&&h&&p,m=null==l?void 0:l.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),g=c?"1px":"6px";return i&&i.showTitles&&(i.footnote||f)?t.createElement(Eg,{container:!0},t.createElement(k,{item:!0,className:xg.itemStyle,"data-testid":kg,sx:{paddingTop:e=>m?g:e.spacing(1)}},i.footnote&&t.createElement(L,{title:i.footnote},t.createElement(C,{noWrap:!0,variant:"body2",className:kg,style:d,align:u?"right":"left"},i.footnote)),f&&t.createElement(Cg,{layout:i,translator:s,filtersFootnoteString:p,footerStyle:d,isRtl:u}))):null}class Rg{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 qg="njs-viz";function Ig(e){let{sn:o,snOptions:i,snPlugins:a,layout:l,appLayout:u,halo:d,cellId:h}=e;const{component:p}=o,{theme:f,language:m,constraints:g,interactions:b,keyboardNavigation:y}=s($a),[v]=n((()=>new Rg)),[S,w]=n(!1),[C,x]=n(0),[E,k,L]=ns(),[R,q]=n(null),I=c((e=>{e&&q(e)}),[]);return r((()=>{if(R)return p.created({options:i}),p.mounted(R),w(!0),()=>{v.stop(),p.willUnmount()}}),[R,p]),r((()=>{S&&R&&k&&(!p.isHooked&&l&&l.qSelectionInfo&&l.qSelectionInfo.qInSelections||v.schedule((()=>{const e=[];return g.passive||e.push("passive"),g.active||e.push("interact"),g.select||e.push("select"),g.edit||e.push("edit"),d.app&&d.app.session&&e.push("fetch"),Promise.resolve(p.render({layout:l,options:i,plugins:a,embed:d.public.nebbie,context:Q({constraints:g,interactions:b,theme:d.public.theme,appLayout:u,keyboardNavigation:y},p.isHooked?{}:{logicalSize:o.logicalSize({layout:l}),localeInfo:(u||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===C&&"function"==typeof i.onInitialRender&&i.onInitialRender.call(null),x(C+1))}))})))}),[k,i,a,R,L,l,u,f,m,g,b,S,y]),t.createElement("div",{ref:E,"data-render-count":C,style:{position:"relative",height:"100%"},className:qg},t.createElement("div",{ref:I,id:"".concat(h,"_content"),style:{position:"absolute",width:"100%",height:"100%"}}))}const Tg={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"},Og=e=>{let{layout:t,theme:n,app:r,themeName:o,disableThemeBorder:a,queryParams:s}=e;const l=i((()=>{if(t&&n){const o=t.components?t.components.find((e=>"general"===e.key)):null,i=(e=t.visualization,Tg[e.toLowerCase()]?Tg[e.toLowerCase()]:e),l={main:ah(o,"main",n,i),footer:ah(o,"footer",n,i),subTitle:ah(o,"subTitle",n,i)},c=oh(o,n,i),u=rh(o,r,s),d=function(e,t,n,r){const o=Yd(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=Qd("","borderWidth",t,n)),i&&o?"".concat(i," solid ").concat(o):void 0}(o,n,i,a),h=function(e,t,n){return(null==e?void 0:e.borderRadius)||Qd("","borderRadius",t,n)}(o,n,i);return{titleStyles:l,bgColor:c,bgImage:u,border:d,borderRadius:h,boxShadow:ih(o,n,i)}}var e;return{}}),[t,n,r,o,a]);return l};class _g extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const Pg=["action-button","sn-nav-menu","filterpane","sn-shape"],Dg=[...Pg,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],Ag=e=>-1===Pg.indexOf(e),Mg=e=>Ag(e)?"10px 10px 0":"10px 0 0",Ng=e=>{let{layout:t,isError:n,isCardTheme:r,titleStyles:o,translator:i}=e;if(r){var a,s,l;const e=(null==t?void 0:t.showTitles)&&!(null==t||!t.title),r=(null==t?void 0:t.showTitles)&&!(null==t||!t.subtitle),c=(null==t||null===(a=t.filters)||void 0===a?void 0:a.length)>0&&(null==t||null===(s=t.qHyperCube)||void 0===s||null===(s=s.qMeasureInfo)||void 0===s?void 0:s.length)>0,u=null==t?void 0:t.visualization,d=vg(null!==(l=null==t?void 0:t.filters)&&void 0!==l?l:[],i),h=!(null!=t&&t.footnote)&&c&&d,p=(null==t?void 0:t.showTitles)&&(!(null==t||!t.footnote)||h);let f;return e&&(o.main.padding=Mg(u)),r&&(o.subTitle.padding=((e,t)=>{const n=Ag(e);return t?n?"0 10px":"0":Mg(e)})(u,e)),p&&(-1===Pg.indexOf(u)&&(o.footer.borderTop="1px solid #d9d9d9"),o.footer.padding="6px 10px"),(n||-1===Dg.indexOf(u))&&(f="".concat(e||r?"0":"10px"," 10px ").concat(p?"0":"5px")),f}},jg=new Map;[["auto-chart","Object.AutoChart"],["dummy-chart","Dummy"],["barchart","Object.BarChart"],["combochart","Object.ComboChart"],["container","Object.Container"],["distributionplot","Object.DistributionPlot"],["boxplot","Object.BoxPlot"],["filterpane","Object.FilterPane"],["gauge","Object.Gauge"],["histogram","Object.Histogram"],["kpi","Object.Kpi"],["linechart","Object.LineChart"],["listbox","Object.Listbox"],["piechart","Object.PieChart"],["pivot-table","Object.PivotTable"],["map","Object.Map"],["scatterplot","Object.ScatterPlot"],["sn-table","Object.StraightTable"],["text-image","Object.TextImage"],["treemap","Object.Treemap"],["waterfallchart","Object.WaterfallChart"],["mekkochart","Object.MekkoChart"],["action-button","Object.ActionButton"],["sn-nav-menu","Object.NavMenu"],["bulletchart","Object.BulletChart"],["sn-nlg-chart","Object.NlgChart"],["sn-analysis-autochart","Common.AnalysisTypes"],["sn-tabbed-container","Object.TabContainer"],["qlik-sankey-chart-ext","Object.SankeyChart"],["qlik-radar-chart","Object.RadarChart"],["qlik-funnel-chart-ext","Object.FunnelChart"],["sn-grid-chart","Object.GridChart"],["sn-layout-container","Object.LayoutContainer"]].forEach((e=>{let[t,n]=e;jg.set(t,n)}));const zg="njs-cell",Fg="njs-cell-body";const $g=(e,t)=>{switch(t.type){case"LOADING":return Q(Q({},e),{},{loading:!0});case"LOADED":return Q(Q({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return Q(Q({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return Q(Q({},e),{},{longRunningQuery:!0});case"ERROR":return Q(Q({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function Bg(e){let{delay:o=750}=e;const[i,a]=n(!1);return r((()=>{const e=setTimeout((()=>a(!0)),o);return()=>clearTimeout(e)}),[]),i?t.createElement(tg,null):null}const Wg=e=>!e.qError||7005===e.qError.qErrorCode,Hg=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,s=i&&!a&&t[e].qError,l=a&&t[e].qCalcCondMsg,c="".concat(s?r:a?l||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}})),Ug=e=>e&&(Array.isArray(e)?e:[e])||[],Gg=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t),s=Hg(o,Ug(a.qDimensionInfo||a.qItems),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),l=Hg(i,Ug(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:s,reqMeasErrors:l}},Vg=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:s,hasLayoutErrors:l,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,s=!1;const l=[];for(let c=0;c<t.length;++c){const u=t[c],d=u.dimensions.min(),h=u.measures.min(),p=u.resolveLayout(n),f=Ug(p.qDimensionInfo||p.qItems).filter(Wg),m=Ug(p.qMeasureInfo).filter(Wg);if(o+=d,i+=h,(f.length<d||m.length<h)&&(r=!0),p.qError){a=!0,s=7005===p.qError.qErrorCode;const t=s&&p.qCalcCondMsg?p.qCalcCondMsg:s?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");l.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:l}})(e,o,t),u=[],d=[];let h=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=h||await r.getProperties();h=n;const o=Gg(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const p=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[p,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),b=[{title:f,descriptions:[...u]},{title:g,descriptions:[...d]}],y=l?c:b;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:y}]};function Kg(){return new le}const Jg=o(((e,o)=>{var i,c;let{halo:u,model:d,initialSnOptions:p,initialSnPlugins:f,initialError:m,onMount:g,currentId:b,emitter:y,navigation:v,onError:S}=e;const{app:w,types:C}=u,{nebbie:x}=u.public,{theme:E,translator:L,language:q,keyboardNavigation:I,externalFocusManagement:T,disableCellPadding:O=!1,navigation:_,queryParams:P}=s($a),[D]=n(y||Kg),A=ma(),[M,N,j]=ns(),[z,F]=l($g,{loading:!1,loaded:!1,longRunningQuery:!1,error:($=m)?{title:$.message}:null,sn:null,visualization:null});var $;const[B,W]=n(d),[H,{validating:U,canCancel:G,canRetry:V},K]=es(B),[J]=ts(w),[Z,X,Y]=ns(),[ee,te]=n(p),[ne,re]=n(f),oe="njs-cell-".concat(b),[ie]=lu(w,B,["#".concat(oe),".njs-action-toolbar-popover"]),[ae,se]=n(!1),le=h({enter:null,leave:null}),{titleStyles:ce,bgColor:ue,bgImage:de,border:he,borderRadius:pe,boxShadow:fe}=Og({layout:H,theme:u.public.theme,app:u.app,themeName:E,disableThemeBorder:null==ee?void 0:ee.disableThemeBorder,queryParams:P}),me=!("rtl"!==(null==ee?void 0:ee.direction)),ge=h({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r((()=>{iu(ge.current),ge.current.blurCallback=e=>{ge.current.onBlurHandler?ge.current.onBlurHandler(e):(u.root.toggleFocusOfCells(),e&&Y&&Y.focus())},ge.current.refocusContent=()=>{z.sn.component&&"function"==typeof z.sn.component.focus&&z.sn.component.focus()}}),[]);r((()=>{if(m)return void g();if(!J||!H)return;if(z.visualization===H.visualization&&z.sn)return void(async e=>{const[t,n]=await Vg(L,H,e.generator.qae.data,B);F(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:z.sn,layout:H,model:B})})(z.sn);const e=C.getSupportedVersion(H.visualization,H.version);return(async(e,t)=>{F({type:"LOADING"}),await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,onMount:d,navigation:h}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o}),p=e.create({model:i,app:a,selections:s,nebbie:l,focusHandler:c,emitter:u,navigation:h});p&&(t({type:"LOADED",sn:p,visualization:r}),d())}catch(e){t(o?{type:"ERROR",error:{title:e.message,errorObject:e}}:{type:"ERROR",error:{title:"Could not find a version of '".concat(r,"' that supports current object version. Did you forget to register ").concat(r,"?")}}),d()}})({dispatch:F,types:C,visualization:e,version:t,model:B,app:w,selections:ie,nebbie:x,focusHandler:ge.current,emitter:D,onMount:g,navigation:null!=v?v:_})})(H.visualization,e),()=>{}}),[C,z.sn,B,ie,H,J,q]),r((()=>{if(!U)return;const e=setTimeout((()=>F({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[U]),a(o,(()=>({getQae:()=>z.sn.generator.qae,getExtensionDefinition:()=>z.sn.generator.definition.ext,support(e,t,n){if(H&&z.loaded&&!z.error){var r;const o=t||(null===(r=z.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||H)}return!1},toggleFocus(e){"function"==typeof z.sn.component.focus&&(e?z.sn.component.focus():z.sn.component.blur())},setOnBlurHandler(e){ge.current.onBlurHandler=e},setSnOptions:te,setSnPlugins:re,setModel:W,getImperativeHandle(){var e;return null!==(e=z.sn)&&void 0!==e&&e.component&&"function"==typeof z.sn.component.getImperativeHandle?z.sn.component.getImperativeHandle():{}},onContextMenu(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=z.sn)||void 0===e?void 0:e.component.onContextMenu(...n)},async takeSnapshot(){const{width:e,height:t}=N;let n=JSON.parse(JSON.stringify(H));return"function"==typeof z.sn.component.setSnapshotData&&(n=await z.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:L.language(),theme:A.name,appLayout:J,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof u.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return u.config.snapshot.capture(e)}})),[z.sn,X,N,H,A.name,J]);let be=null;if(z.loading&&!z.longRunningQuery)be=t.createElement(Bg,null);else if(z.error){if(S){S(z.error.errorObject?z.error.errorObject:new _g(z.error.title))}be=t.createElement($m,z.error)}else z.loaded&&(be=t.createElement(Ig,{key:H.visualization,sn:z.sn,halo:u,snOptions:ee,snPlugins:ne,layout:H,appLayout:J,cellId:b}));const ye=!(null===(i=u.public.theme)||void 0===i||!i.getStyle("","","_cards")),ve=null===(c=u.public.galaxy)||void 0===c?void 0:c.flags;let Se,we;O?(Se=!1,we=void 0):null!=ve&&ve.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(Se=!1,we=Ng({layout:H,isError:z.error,isCardTheme:ye,titleStyles:ce,translator:L})):(Se=!0,we=void 0);const Ce=jg.get(null==H?void 0:H.visualization),xe=L.get(Ce);return t.createElement(R,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:ue||"unset",backgroundImage:de&&de.url?"url(".concat(de.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:de&&de.size,backgroundPosition:de&&de.pos,border:he,borderRadius:pe,boxShadow:fe,boxSizing:"border-box"},elevation:0,square:!0,className:zg,ref:M,id:oe,onMouseEnter:()=>{le.current.leave&&clearTimeout(le.current.leave),le.enter||(le.current.enter=setTimeout((()=>{se(!0),le.current.enter=null}),250))},onMouseLeave:()=>{le.current.enter&&clearTimeout(le.current.enter),le.current.leave||(le.current.leave=setTimeout((()=>{se(!1),le.current.leave=null}),750))}},t.createElement(k,{container:!0,direction:"column",gap:0,style:Q(Q({position:"relative",width:"100%",height:"100%"},Se?{padding:A.spacing(1)}:{}),z.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":"".concat(b,"_title ").concat(b,"_type ").concat(b,"_content")},H&&t.createElement("div",{id:"".concat(b,"_type"),style:ng,"aria-label":null!=xe?xe:H.visualization}),j&&H&&z.sn&&t.createElement(lg,{layout:H,sn:z.sn,anchorEl:j,hovering:ae,focusHandler:ge.current,titleStyles:ce,isRtl:me,id:b,translator:L}," "),t.createElement(k,{tabIndex:I&&!T?0:-1,onKeyDown:I&&!T?e=>{["Enter"," ","Spacebar"].includes(e.key)&&u.root.toggleFocusOfCells(b)}:null,item:!0,xs:!0,className:Fg,style:Q({height:"100%"},we?{padding:we}:{}),ref:Z},be),j&&H&&z.sn&&t.createElement(Lg,{layout:H,titleStyles:ce,translator:L,flags:ve,isCardTheme:ye,isRtl:me})),z.longRunningQuery&&t.createElement(eg,{canCancel:G,canRetry:V,api:K}))}));function Zg(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Xg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?function(e,t){return Zg(e)&&Zg(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(...Xg("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Qg(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const Yg=e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))},eb=(e,t)=>e.__snInterceptor?e.__snInterceptor.setProperties.call(e,t):e.setProperties(t),tb=(e,t,n)=>{if(!e)return Promise.resolve();let r=Gp.generate(t,n);return Ge(!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()},nb=()=>{};function rb(){var e;let n,r,o,{model:i,halo:a,navigation:s,initialError:l,onDestroy:c=(async()=>{}),onRender:u=(()=>{}),onError:d=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=nb,p=null,f=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(),u(),y=!0};let C={},x=[];const E=new le;let k={};null!==(e=a.context)&&void 0!==e&&e.enablePrivateExperimental&&(k={support(e){var t;return!(!f||!y)&&p.current.support(e,null===(t=r)||void 0===t?void 0:t.support,o)},getPropertyPanelDefinition:()=>!(!f||!y)&&(r?r.definition:p.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){var e;await S;const t=p.current.getQae();if(null==t||null===(e=t.data)||void 0===e||null===(e=e.targets)||void 0===e||null===(e=e[0])||void 0===e||!e.propertyPath)return;const n=t.data.targets[0].propertyPath,r=p.current.getExtensionDefinition().data,o=await i.getEffectiveProperties();if(n&&r){var a,s;const e={app:i.app,dimensionDefinition:r.dimensions,measureDefinition:r.measures,dimensionProperties:(null===(a=o.qHyperCubeDef)||void 0===a||null===(a=a.qDimensions)||void 0===a?void 0:a[0])||jp.getDefaultDimension(),measureProperties:(null===(s=o.qHyperCubeDef)||void 0===s||null===(s=s.qMeasures)||void 0===s?void 0:s[0])||jp.getDefaultMeasure(),globalChangeListeners:void 0,path:n};return new Tm(e)}},toggleFocus(e){p.current.toggleFocus(e)},setOnBlurHandler(e){p.current.setOnBlurHandler(e)},onContextMenu(){return p.current.onContextMenu(...arguments)}});const L=Q(Q({id:i.id,model:i,async destroy(){await c(),h(),h=nb},async convertTo(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){const n=await i.getLayout();if(Yg(n)&&!t){const t=await Wp({halo:a,model:i,cellRef:p,newType:e});return await eb(i,t.qProperty),t}const r=await i.getEffectiveProperties(),o=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:r}),s=o.qProperty;return await tb(i,r,s),o}return await Wp({halo:a,model:i,cellRef:p,newType:e})},async toggleDataView(e){let t;if(n||!1===e)n&&!0!==e&&(t=i,await a.app.destroySessionObject(n),n=void 0,r=void 0,o=void 0);else{let e=a.context.dataViewType;const s=await i.getEffectiveProperties();if(!a.types.getSupportedVersion(e)){if(!a.types.getSupportedVersion("table"))throw new Error("No data view type registered");e="table"}const l=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:s,viewDataMode:!0});t=await a.app.createSessionObject(l.qProperty),n=t.id,r=p.current.getExtensionDefinition(),o=await i.getLayout()}t&&p.current.setModel(t)},get viewDataToggled(){return void 0!==n},addListener(e,t){E.addListener(e,t)},removeListener(e,t){E.removeListener(e,t)},getImperativeHandle:async()=>(await S,p.current.getImperativeHandle()),takeSnapshot:async()=>(await S,p.current.takeSnapshot())},k),{},{__DO_NOT_USE__:{mount(e){if(f)throw new Error("Already mounted");if(!(e instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return f=e,[h,p]=function(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,emitter:l,initialError:c,navigation:u,onError:d}=e;const{root:h}=n,p=t.createRef(),f=Th(),g=m.createPortal(t.createElement(Jg,{ref:p,halo:n,model:o,currentId:f,initialSnOptions:i,initialSnPlugins:a,initialError:c,onMount:s,emitter:l,navigation:u,onError:d}),r,f),b=()=>{h.remove(g),o.removeListener("closed",b)};return o.on("closed",b),h.addCell(f,p),(async()=>{try{await h.add(g,b)}catch(e){b(),s(),d(e)}})(),[b,p]}({halo:a,element:e,model:i,initialSnOptions:C,initialSnPlugins:x,initialError:l,onMount:g,emitter:E,navigation:s,onError:d}),v},async applyProperties(e){const t=Xg("/",e,await i.getEffectiveProperties());if(t.length)return i.applyPatches(t,!0)},options(e){(async e=>{const t=e.onInitialRender;f?(async()=>{await v,p.current.setSnOptions(Q(Q(Q({},C),e),{onInitialRender:w(t)}))})():C=Q(Q(Q({},C),e),{onInitialRender:w(t)})})(e)},plugins(e){(async e=>{Qg(e),f?(async()=>{await v,p.current.setSnPlugins(e)})():x=e})(e)},exportImage:()=>p.current.exportImage(),takeSnapshot:()=>p.current.takeSnapshot(),getModel:()=>i,convert:{async toType(e){const t=await i.getEffectiveProperties(),n=await Wp({halo:a,model:i,cellRef:p,newType:e,properties:t}),r=n.qProperty;return await tb(i,t,r),n},async revert(){await i.clearSoftPatches()}}}});return L}async function ob(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=rb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}async function ib(e,t,n,r){let{type:o,version:i,fields:a,properties:s,extendProperties:l}=e,c={};const u=[],{modelStore:d}=r;try{const e=t.types.get({name:o,version:i});c=await e.initialProperties(s,l);const n=await e.supernova();a&&await Tp({sn:n,properties:c,fields:a,children:u},t),s&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},c)}catch(e){c=n?null:{qInfo:{qType:o},visualization:o}}if(!n){const e=await t.app.createObject(c);return u.length>0&&await e.setFullPropertyTree({qProperty:c,qChildren:u}),d.set(e.id,e),e}return c}const ab="njs-sheet";function sb(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 lb=o(((e,o)=>{var l;let{model:c,halo:u,initialSnOptions:d,initialSnPlugins:p,initialError:f,onMount:m,unmount:g,navigation:b,onError:y}=e;const{root:v}=u,[S,w]=n(c),[C]=es(S),{theme:x,modelStore:E}=s($a),[k,L]=n([]),[R,q]=n(void 0),[I,T]=n(void 0),[O,_]=n(""),P=h({cellCount:0,cellsRendered:0,initialRender:!1});null==b||null===(l=b.setCurrentSheetId)||void 0===l||l.call(b,S.id),r((()=>{if(C){const e=JSON.stringify(C.cells);if(e===O)return;_(e);const n=async()=>{k.forEach((e=>{v.removeCell(e.currentId)}));const e=C.cells;P.cellCount=e.length,P.cellsRendered=0;const n=()=>{P.cellsRendered++,P.cellsRendered!==P.cellCount||P.initialRender||(P.initialRender=!0,d.onInitialRender())},{columns:r,rows:o}=C,i=await Promise.all(e.map((async e=>{let i;const a=new Promise((e=>{i=e})),s=k.find((t=>t.id===e.name));if(s)return s.bounds=sb(e,r,o),delete s.mountedPromise,s;const l=await async function(e,t,n){let{id:r,options:o,plugins:i,element:a}=e;const{modelStore:s,rpcRequestModelStore:l}=n,c="".concat(r);let u=l.get(c);u||(u=t.app.getObject(r),l.set(c,u));const d=await u;return s.set(c,d),ob(d,{options:o,plugins:i,element:a},t)}({id:e.name},u,E);return{model:l.model,id:e.name,bounds:sb(e,r,o),cellRef:t.createRef(),currentId:Th(),mounted:i,mountedPromise:a,options:Q(Q({},d),{onInitialRender:n})}})));i.forEach((e=>v.addCell(e.currentId,e.cellRef))),L(i)};n()}}),[C]),r((()=>{const e=()=>{S.removeListener("closed",e),g()};return S.on("closed",e),()=>S.removeListener("closed",e)}),[S]);const D=i((()=>k?k.map((e=>function(e,n,r,o,i,a,s,l){var c;const{x:u,y:d,width:h,height:p}=e.bounds,f={left:"".concat(u,"%"),top:"".concat(d,"%"),width:"".concat(h,"%"),height:"".concat(p,"%"),position:"absolute"},m=null===(c=n.public.galaxy)||void 0===c?void 0:c.flags;return null!=m&&m.isEnabled("VNA-13_CELLPADDING_FROM_THEME")&&(f.boxSizing="border-box",f.padding="4px"),t.createElement("div",{style:f,key:e.model.id},t.createElement(Jg,{ref:e.cellRef,halo:n,model:e.model,currentId:e.currentId,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a,navigation:s,onError:l}))}(e,u,e.options,p,f,e.mounted,b,y))):[]),[k]);r((()=>{const e=null!=C&&C.components?C.components.find((e=>"general"===e.key)):null;q(oh(e,u.public.theme)),T(rh(e,u.app))}),[C,u.public.theme,u.app,x]),a(o,(()=>({setModel:w})),[]);const A=!C||void 0===C.height||Number.isNaN(C.height)?"100%":"".concat(Number(C.height),"%"),M=k.map((e=>e.mountedPromise)),N=M.filter((e=>!!e));return N.length&&Promise.all(M).then((()=>{m()})),t.createElement("div",{className:ab,style:{width:"100%",height:A,position:"relative",backgroundColor:R,backgroundImage:I&&I.url?"url(".concat(I.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:I&&I.size,backgroundPosition:I&&I.pos}},D)}));const cb=()=>{};function ub(){let{model:e,halo:n,navigation:r,initialError:o,onDestroy:i=(async()=>{}),onRender:a=(()=>{}),onError:s=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=cb,c=null,u=null,d=null,h=null;const p=new Promise((e=>{d=e})),f=new Promise((e=>{h=e})),g=e=>()=>{null==e||e(),h(),a()};let b={},y=[];const v={id:e.id,model:e,navigation:r,getImperativeHandle:async()=>(await f,c.current.getImperativeHandle()),async destroy(){await i(),l(),l=cb},__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,[l,c]=function(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l,navigation:c,onError:u}=e;const{root:d}=n,h=t.createRef();let p;const f=()=>{d.remove(p)};return p=m.createPortal(t.createElement(lb,{ref:h,halo:n,model:o,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s,unmount:f,navigation:c,onError:u}),r,o.id),c.setSheetRef(h),d.add(p,f),[f,h]}({halo:n,element:i,model:e,initialSnOptions:b,initialSnPlugins:y,initialError:o,onMount:d,navigation:r,onError:s}),p},async applyProperties(t){const n=Xg("/",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(Q(Q(Q({},b),e),{onInitialRender:g(t)}))})():b=Q(Q(Q({},b),e),{onInitialRender:g(t)})})(e)},plugins(e){(async e=>{Qg(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 db(e,t,n){let{id:r,options:o,plugins:i,element:a,onRender:s,onError:l,navigation:c}=e;const{modelStore:u,rpcRequestModelStore:d}=n,h="".concat(r);let p=d.get(h);p||(p=t.app.getObject(r),d.set(h,p));const f=await p;u.set(h,f);const m=c||("sheet"===f.genericType?function(e,t,n){var r;const{galaxy:o}=e.public;var i;if(null!==(r=o.anything)&&void 0!==r&&null!==(r=r.sense)&&void 0!==r&&r.navigation)return null===(i=o.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.navigation;const a={model:n},s={goToSheet:async n=>{var r,o;if(!a.sheetRef)return;const{modelStore:i,rpcRequestModelStore:l}=t,c="".concat(n);let u,d=l.get(c);d||(d=e.app.getObject(n),l.set(c,d));try{if(u=await d,"sheet"!==u.genericType)return}catch(e){return}i.set(c,u),null===(r=a.sheetRef)||void 0===r||null===(r=r.current)||void 0===r||null===(o=r.setModel)||void 0===o||o.call(r,u),a.model=u,s.emit("sheetChanged")},setSheetRef:e=>{a.sheetRef=e},getCurrentSheetId:()=>!!a.model&&a.model.id};return iu(s),s}(t,n,f):void 0);return"sheet"===f.genericType?async function(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:async()=>{};const{onRender:a,onError:s}=t,l=ub({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}(f,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m):ob(f,{options:o,plugins:i,element:a,onRender:s,onError:l},t,m)}function hb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}var pb,fb,mb,gb;function bb(){if(gb)return mb;gb=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return mb=n=>n?"object"!=typeof n?e:n:t}var yb,vb,Sb,wb,Cb,xb,Eb,kb,Lb,Rb,qb,Ib,Tb,Ob,_b,Pb,Db,Ab,Mb,Nb,jb,zb,Fb,$b,Bb,Wb,Hb,Ub,Gb,Vb,Kb,Jb={exports:{}};function Zb(){if(vb)return yb;vb=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return yb={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 Xb(){if(wb)return Sb;wb=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};return Sb=e}function Qb(){return Cb||(Cb=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=Zb(),i=Xb(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const h="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[h,r]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split("".concat(t,"*")).join("".concat(t,"{0,").concat(n,"}")).split("".concat(t,"+")).join("".concat(t,"{1,").concat(n,"}"));return e})(t),o=d++;i(e,o,t),u[e]=o,l[o]=t,c[o]=r,a[o]=new RegExp(t,n?"g":void 0),s[o]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-]".concat(h,"*")),f("MAINVERSION","(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")\\.")+"(".concat(l[u.NUMERICIDENTIFIER],")")),f("MAINVERSIONLOOSE","(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(l[u.NUMERICIDENTIFIERLOOSE],")")),f("PRERELEASEIDENTIFIER","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIER],")")),f("PRERELEASEIDENTIFIERLOOSE","(?:".concat(l[u.NONNUMERICIDENTIFIER],"|").concat(l[u.NUMERICIDENTIFIERLOOSE],")")),f("PRERELEASE","(?:-(".concat(l[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIER],")*))")),f("PRERELEASELOOSE","(?:-?(".concat(l[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(l[u.PRERELEASEIDENTIFIERLOOSE],")*))")),f("BUILDIDENTIFIER","".concat(h,"+")),f("BUILD","(?:\\+(".concat(l[u.BUILDIDENTIFIER],"(?:\\.").concat(l[u.BUILDIDENTIFIER],")*))")),f("FULLPLAIN","v?".concat(l[u.MAINVERSION]).concat(l[u.PRERELEASE],"?").concat(l[u.BUILD],"?")),f("FULL","^".concat(l[u.FULLPLAIN],"$")),f("LOOSEPLAIN","[v=\\s]*".concat(l[u.MAINVERSIONLOOSE]).concat(l[u.PRERELEASELOOSE],"?").concat(l[u.BUILD],"?")),f("LOOSE","^".concat(l[u.LOOSEPLAIN],"$")),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE","".concat(l[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),f("XRANGEIDENTIFIER","".concat(l[u.NUMERICIDENTIFIER],"|x|X|\\*")),f("XRANGEPLAIN","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIER],")")+"(?:".concat(l[u.PRERELEASE],")?").concat(l[u.BUILD],"?")+")?)?"),f("XRANGEPLAINLOOSE","[v=\\s]*(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[u.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(l[u.PRERELEASELOOSE],")?").concat(l[u.BUILD],"?")+")?)?"),f("XRANGE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAIN],"$")),f("XRANGELOOSE","^".concat(l[u.GTLT],"\\s*").concat(l[u.XRANGEPLAINLOOSE],"$")),f("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),f("COERCE","".concat(l[u.COERCEPLAIN],"(?:$|[^\\d])")),f("COERCEFULL",l[u.COERCEPLAIN]+"(?:".concat(l[u.PRERELEASE],")?")+"(?:".concat(l[u.BUILD],")?")+"(?:$|[^\\d])"),f("COERCERTL",l[u.COERCE],!0),f("COERCERTLFULL",l[u.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM","(\\s*)".concat(l[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",f("TILDE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAIN],"$")),f("TILDELOOSE","^".concat(l[u.LONETILDE]).concat(l[u.XRANGEPLAINLOOSE],"$")),f("LONECARET","(?:\\^)"),f("CARETTRIM","(\\s*)".concat(l[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",f("CARET","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAIN],"$")),f("CARETLOOSE","^".concat(l[u.LONECARET]).concat(l[u.XRANGEPLAINLOOSE],"$")),f("COMPARATORLOOSE","^".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],")$|^$")),f("COMPARATOR","^".concat(l[u.GTLT],"\\s*(").concat(l[u.FULLPLAIN],")$|^$")),f("COMPARATORTRIM","(\\s*)".concat(l[u.GTLT],"\\s*(").concat(l[u.LOOSEPLAIN],"|").concat(l[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE","^\\s*(".concat(l[u.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAIN],")")+"\\s*$"),f("HYPHENRANGELOOSE","^\\s*(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(l[u.XRANGEPLAINLOOSE],")")+"\\s*$"),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Jb,Jb.exports)),Jb.exports}function Yb(){if(Lb)return kb;Lb=1;const e=Xb(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Zb(),{safeRe:r,t:o}=Qb(),i=bb(),{compareIdentifiers:a}=function(){if(Eb)return xb;Eb=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};return xb={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},xb}();class s{constructor(a,l){if(l=i(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof a,'".'));if(a.length>t)throw new TypeError("version is longer than ".concat(t," characters"));e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[o.LOOSE]:r[o.FULL]);if(!c)throw new TypeError("Invalid Version: ".concat(a));if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],o=t.prerelease[n];if(e("prerelease compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],o=t.build[n];if(e("build compare",n,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return a(r,o)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e="-".concat(t).match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error("invalid identifier: ".concat(t))}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error("version ".concat(this.raw," is not a prerelease"));this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error("invalid increment argument: ".concat(e))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}return kb=s}function ey(){if(qb)return Rb;qb=1;const e=Yb();return Rb=(t,n,r)=>new e(t,r).compare(new e(n,r)),Rb}function ty(){if(Bb)return $b;Bb=1;const e=function(){if(Tb)return Ib;Tb=1;const e=ey();return Ib=(t,n,r)=>0===e(t,n,r),Ib}(),t=function(){if(_b)return Ob;_b=1;const e=ey();return Ob=(t,n,r)=>0!==e(t,n,r),Ob}(),n=function(){if(Db)return Pb;Db=1;const e=ey();return Pb=(t,n,r)=>e(t,n,r)>0,Pb}(),r=function(){if(Mb)return Ab;Mb=1;const e=ey();return Ab=(t,n,r)=>e(t,n,r)>=0,Ab}(),o=function(){if(jb)return Nb;jb=1;const e=ey();return Nb=(t,n,r)=>e(t,n,r)<0,Nb}(),i=function(){if(Fb)return zb;Fb=1;const e=ey();return zb=(t,n,r)=>e(t,n,r)<=0,zb}();return $b=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return o(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError("Invalid operator: ".concat(s))}},$b}function ny(){if(Gb)return Ub;Gb=1;const e=/\s+/g;class t{constructor(n,i){if(i=r(i),n instanceof t)return n.loose===!!i.loose&&n.includePrerelease===!!i.includePrerelease?n:new t(n.raw,i);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,m=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(m,R(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),i("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),i("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),i("caret trim",e);let g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>L(e,this.options)));a&&(g=g.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),i("range list",g);const y=new Map,v=g.map((e=>new o(e,this.options)));for(const e of v){if(f(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const S=[...y.values()];return n.set(t,S),S}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(q(this.set[t],e,this.options))return!0;return!1}}Ub=t;const n=new(fb?pb:(fb=1,pb=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=bb(),o=function(){if(Hb)return Wb;Hb=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: ".concat(t));this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Wb=t;const n=bb(),{safeRe:r,t:o}=Qb(),i=ty(),a=Xb(),s=Yb(),l=ny();return Wb}(),i=Xb(),a=Yb(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:d}=Qb(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=Zb(),f=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},b=(e,t)=>(i("comp",e,t),e=w(e,t),i("caret",e),e=v(e,t),i("tildes",e),e=x(e,t),i("xrange",e),e=k(e,t),i("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,o,a)=>{let s;return i("tilde",e,t,n,r,o,a),y(n)?s="":y(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):y(o)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):a?(i("replaceTilde pr",a),s=">=".concat(n,".").concat(r,".").concat(o,"-").concat(a," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),i("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{i("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,a,s)=>{let l;return i("caret",e,t,n,o,a,s),y(n)?l="":y(o)?l=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):y(a)?l="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(i("replaceCaret pr",s),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a,"-").concat(s," <").concat(+n+1,".0.0-0")):(i("no pr"),l="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(o,".").concat(+a+1,"-0"):">=".concat(n,".").concat(o,".").concat(a).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(a," <").concat(+n+1,".0.0-0")),i("caret return",l),l}))},x=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,o,a,s,l)=>{i("xRange",e,n,r,o,a,s,l);const c=y(o),u=c||y(a),d=u||y(s),h=d;return"="===r&&h&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(u&&(a=0),s=0,">"===r?(r=">=",u?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(l="-0"),n="".concat(r+o,".").concat(a,".").concat(s).concat(l)):u?n=">=".concat(o,".0.0").concat(l," <").concat(+o+1,".0.0-0"):d&&(n=">=".concat(o,".").concat(a,".0").concat(l," <").concat(o,".").concat(+a+1,".0-0")),i("xRange return",n),n}))},k=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),L=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),R=e=>(t,n,r,o,i,a,s,l,c,u,d,h)=>(n=y(r)?"":y(o)?">=".concat(r,".0.0").concat(e?"-0":""):y(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":""),l=y(c)?"":y(u)?"<".concat(+c+1,".0.0-0"):y(d)?"<".concat(c,".").concat(+u+1,".0-0"):h?"<=".concat(c,".").concat(u,".").concat(d,"-").concat(h):e?"<".concat(c,".").concat(u,".").concat(+d+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()),q=(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 Ub}var ry=function(){if(Kb)return Vb;Kb=1;const e=ny();return Vb=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Vb}(),oy=H(ry);const iy={};function ay(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:i}=o,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||oy(e,i.deps.properties),supernova:()=>async function(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!iy[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),s=Promise.resolve(a);iy[i]=s.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new _g("Failed to load visualization: '".concat(n,"'"),e)}))}return iy[i]}(a.name,a.version,t,o.load).then((e=>(n=n||Nm(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.supernova().then((()=>{const n=Q({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(r));return t?(Ge(!0,n,e),n):Q(Q({},n),e)}))}};return a}function sy(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=ay({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 ly(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=sy(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>{if(r[e])return r[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(iy).forEach((t=>{t.split("__")[0]===e&&(iy[t]=void 0)}))}(e)}}}const cy={context:{},load:()=>{},types:[],themes:[],anything:{},flags:{KPI_REACTCOLORPICKER:!0,CLIENT_IM_3365:!0},snapshot:{get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))}},uy={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};cy.context=uy;const dy=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Q(Q({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),e)},hy=function(){return[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]].filter(((e,t,n)=>n.indexOf(e)===t))};var py=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=ae(n.context.language);function o(e,i){if(i)return o.createConfiguration(i)(e);let a=Q(Q({},n.context),{},{translator:r.translator,hostConfig:n.hostConfig});const[s,l]=Ga({app:e,context:a}),c=function(){let{themes:e=[],loadTheme:t,root:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=St();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),wt(Ct,{__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:s});a.themeApi=c.externalAPI;const u={galaxy:{translator:r.translator,theme:c.externalAPI,flags:hb(n.flags),deviceType:xt(n.context.deviceType),hostConfig:n.hostConfig,anything:n.anything},theme:c.externalAPI,translator:r.translator,nebbie:null},d={app:e,root:s,config:n,public:u,context:a,types:null},h=ly({halo:d});n.types.forEach((e=>h.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&&te&&te.getWebResourceAuthParams){const{queryParams:e}=await te.getWebResourceAuthParams({hostConfig:n.hostConfig});a.queryParams=e,s.context(a)}})().then(e)})),f=null,g=null;const b={render:async e=>(await p,e.id?db(e,d,l):async function(e,t,n){let{type:r,version:o,fields:i,properties:a,options:s,plugins:l,element:c,extendProperties:u,navigation:d,onRender:h,onError:p}=e,f={};const m=[],{modelStore:g,subscribe:b}=n;let y;try{const e=t.types.get({name:r,version:o});f=await e.initialProperties(a,u);const n=await e.supernova();i&&await Tp({sn:n,properties:f,fields:i,children:m},t),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},f)}catch(e){y=e,f={qInfo:{qType:r},visualization:r}}const v=await t.app.createSessionObject(f);m.length>0&&await v.setFullPropertyTree({qProperty:f,qChildren:m}),g.set(v.id,v);const S=b(v);return ob(v,{options:s,plugins:l,element:c,onRender:h,onError:p},t,d,y,(async()=>{await t.app.destroySessionObject(v.id),S()}))}(e,d,l)),destroy:async()=>{s.destroy()},create:async e=>ib(e,d,!1,l),generateProperties:async e=>ib(e,d,!0,l),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=Q(Q(Q({},a),t),{},{translator:r.translator}),t.theme&&(await p,p=c.setTheme(t.theme),await p),t.language&&d.public.translator.language(t.language),s.context(a))},selections:async()=>(f||(f={mount(n){g||(g=function(e){let{element:n,app:r}=e;return m.createPortal(t.createElement(Oh,{app:r}),n,Th())}({element:n,app:e}),s.add(g))},unmount(){g&&(s.remove(g),g=null)}}),f),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){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)throw new Error("Element for ".concat(o||r," not provided"));if(this._instance)throw new Error("Field or object ".concat(o||r," already mounted"));const c=()=>i.emit("selectionActivated"),u=()=>i.emit("selectionDeactivated");return new Promise((o=>{[this._instance,this._ref]=function(e){let{element:n,app:r,fieldIdentifier:o,qId:i,stateName:a="$",options:s={},renderedCallback:l}=e;const c=t.createRef();return[m.createPortal(t.createElement(gp,{ref:c,app:r,element:n,fieldIdentifier:o,qId:i,stateName:a,initialOptions:s,renderedCallback:l}),n,Th()),c]}({element:a,app:e,fieldIdentifier:n,qId:r,options:mp(Q({onSelectionActivated:c,onSelectionDeactivated:u},l)),stateName:l.stateName||"$",renderedCallback:o}),s.add(this._instance)}))},unmount(){this._instance&&(s.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=mp(Q({onSelectionActivated:n,onSelectionDeactivated:r},e));i._ref.current.setOptions(t)}}}};return iu(i),i},getRegisteredTypes:h.getList,__DO_NOT_USE__:{types:h,popover(n,r,o){b._popoverInstance&&(s.remove(b._popoverInstance),b._popoverInstance=null);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Q({},bp);return Ge(!0,t,e),t}(Q({onPopoverClose:()=>b.emit("fieldPopoverClose")},o));b._popoverInstance=t.createElement(yp,{element:n,key:Th(),app:e,fieldIdentifier:r,options:i,stateName:o.stateName||"$"}),s.add(b._popoverInstance)}}};return d.public.nebbie=b,d.types=h,iu(b),b}return o.createConfiguration=t=>e(((e,t)=>({context:dy(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:Q({},t.snapshot||e.snapshot),types:hy(e.types,t.types),themes:hy(e.themes,t.themes),flags:dy(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:dy(e.anything,t.anything)}))(n,t)),o.config=n,o}(cy);function fy(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const my=globalThis.crypto||{getRandomValues:()=>123456};function gy(e){return t=>{const n=Ge({},t);n.qInfo=n.qInfo||{},n.qInfo.qId=n.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^my.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const r=n._mock;let o=n;return r&&(delete n._mock,o=Ge({},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 by=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},yy=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const s=by(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},vy=["id","session"],Sy=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function wy(e){return!Sy.includes(e)}function Cy(e){const t=by(e.getLayout);return t.qInfo&&t.qInfo.qId}function xy(e,t){return e.reduce(((e,n)=>Q(Q({},e),function(e,t){let n=Cy(e);const{delay:r}=t,{id:o,session:i}=e,a=Y(e,vy);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:Q(Q({id:n,session:by(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce(((e,t)=>{let[n,o]=t;return Q(Q({},e),{},{[n]:yy(o,{async:wy(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function Ey(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!Cy(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function ky(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(Ey);const n=xy(e,t);return async e=>Promise.resolve(n[e])}function Ly(){return()=>Promise.resolve({id:"app-layout"})}const Ry={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new fy,r=new gy(n),o=new ky(e,t),i=new Ly,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,destroySessionObject:async()=>{},getObject:o,getAppLayout:i,getListObject:async e=>{var t;return o(null===(t=e.qInfo)||void 0===t?void 0:t.qId)}};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},qy={generator:Nm,hook:gf,theme:St,locale:ne};function Iy(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.self}function Ty(){return!("undefined"==typeof process||!process.version||!process.versions.node)}function Oy(e){if(Array.isArray(e))return e.map(Oy);if("object"==typeof(t=e)&&null!==t&&t.constructor===Object){const t={};for(const n of Object.keys(e).sort())t[n]=Oy(e[n]);return t}var t;return e}function _y(e){if(Array.isArray(e))return e.map((e=>"object"==typeof e&&null!==e?_y(e):e)).filter((e=>"object"==typeof e&&null!==e?Object.keys(e).length>0:null!=e&&""!==e));if("object"==typeof e&&null!==e){const t={};for(const n of Object.keys(e)){const r=e[n];switch(typeof r){case"undefined":break;case"boolean":r&&(t[n]=r);break;case"string":{const e=r.trim();""!==e&&(t[n]=e);break}case"object":{if(null===r)break;const e=_y(r);e&&(Array.isArray(e)&&e.length>0||"object"==typeof e&&Object.keys(e).length>0)&&(t[n]=e);break}case"function":case"number":t[n]=r;break;default:console.warn(`Unexpected type for key "${n}": ${typeof r}`),t[n]=r}}if(0===Object.keys(t).length)return;return t}return e}let Py;Py=function(){const e=[...Py?.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 Dy=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],Ay=["apikey","oauth2","cookie","windowscookie","reference","anonymous"];let My=e=>crypto.getRandomValues(new Uint8Array(e)),Ny=(e,t=21)=>((e,t,n)=>{let r=(2<<Math.log2(e.length-1))-1,o=-~(1.6*r*t/e.length);return(i=t)=>{let a="";for(;;){let t=n(o),s=0|o;for(;s--;)if(a+=e[t[s]&r]||"",a.length>=i)return a}}})(e,0|t,My),jy=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const zy=async(e={})=>{const t=GS(e.hostConfig),n="anonymous"===t?.authType||!!t.accessCode;if("undefined"==typeof window)return Wy({isNodeEnv:!0,isAnonymous:n});if("noauth"===t?.authType)return Wy({isUnknown:!0,isAnonymous:!1});const{data:r,status:o}=await $y(e);if(404===o)return Wy({isUnknown:!0,isAnonymous:n});if(!r||o<=399&&o>=300)return Wy({isQSE:!0,isWindows:!0,isAnonymous:n});const i=(r.composition?.deploymentType||"").toLowerCase(),a="controlcenter"===i;return"qliksenseserver"===i?Wy({isQSE:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"qliksensedesktop"===i?Wy({isQSD:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"qliksensemobile"===i?Wy({isQSE:!0,isWindows:!0,isAnonymous:n,meta:By(r)}):"cloud-console"===i?Wy({isCloud:!0,isCloudConsole:!0,isAnonymous:n,meta:By(r)}):"fedramp"===r.composition?.provider?Wy({isCloud:!0,isQCG:!0,isControlCenter:a,isAnonymous:n,meta:By(r)}):Wy({isCloud:!0,isQCS:!0,isControlCenter:a,isAnonymous:n,meta:By(r)})},Fy={};const $y=async({hostConfig:e,noCache:t}={})=>{const n=_S(e),r=`${n}/resources/autogenerated/product-info.json`;try{if(!(r in Fy)){const e={};globalThis.QlikMain&&globalThis.QlikMain.resourceNeedsCredentials(r)&&(e.credentials="include");const t=fetch(r,e).then((async e=>e.ok?{data:await e.json(),status:e.status}:{data:void 0,status:e.status}));Fy[r]=t}const e=await Fy[r];return(e.status>=400||!e.data)&&delete Fy[r],e}catch{return delete Fy[r],{data:void 0,status:500}}finally{t&&delete Fy[r]}},By=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}}},Wy=e=>({isNodeEnv:!1,isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isControlCenter:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,isAnonymous:!1,...e});function Hy(e){return jy(e)}const Uy="__QLIK_INTERNAL__DO_NOT_USE_OR_YOU_WILL_BE_FIRED";const Gy="qlik-qmfe-api";function Vy(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function Ky(e){return`${e.accessCode}_${e.clientId}`}const Jy={};function Zy(e,t,n){localStorage.setItem(`${Gy}-${e}-${t}`,n)}function Xy(e,t,n){sessionStorage.setItem(`${Gy}-${e}-${t}`,n)}function Qy(e,t){return localStorage.getItem(`${Gy}-${e}-${t}`)||void 0}function Yy(e,t){return sessionStorage.getItem(`${Gy}-${e}-${t}`)||void 0}function ev(e,t){t.forEach((t=>localStorage.removeItem(`${Gy}-${e}-${t}`)))}function tv(e,t){t.forEach((t=>sessionStorage.removeItem(`${Gy}-${e}-${t}`)))}function nv(e,t){const n=`${Gy}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}async function rv(e,t){if(!e.clientId)throw new gS('A host config with authType set to "oauth2" has to also provide a clientId');return ov(Vy(e),t,e.noCache,e.accessTokenStorage)}async function ov(e,t,n,r){if(n)return t();const o=Iy(),i=Jy[e]||(o?function(e,t){let n,r;if("local"===t?(n=Qy(e,"access-token"),r=Qy(e,"refresh-token")):"session"===t&&(n=Yy(e,"access-token"),r=Yy(e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r):void 0);if(i)return Jy[e]=i,Promise.resolve(i);const a=t();if(Jy[e]=a,o){const t=await a;"local"===r&&t?(t.accessToken&&Zy(e,"access-token",t.accessToken),t.refreshToken&&Zy(e,"refresh-token",t.refreshToken)):"session"===r&&t&&(t.accessToken&&Xy(e,"access-token",t.accessToken),t.refreshToken&&Xy(e,"refresh-token",t.refreshToken))}return a}function iv(e){const t=Vy(e);delete Jy[t],Iy()&&(ev(t,["access-token","refresh-token"]),tv(t,["access-token","refresh-token"]))}function av(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function sv(e){if(e.errors)throw new SS(e.errors)}function lv(e){const t=Object.keys(e);t.sort();return t.map((t=>`${t}=${e[t]}`)).join("&")}async function cv(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t),r=function(e){let t="";if(Iy()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!Ty())throw new Error("Environment not supported for oauth2 authentication");t=Buffer.from(e).toString("base64")}return t}(Array.from(new Uint8Array(n)));return r.replaceAll(/\+/g,"-").replaceAll(/\//g,"_").replace(/=+$/,"")}async function uv(e){const t=e.clientId||"",n=_S(e),r=Hy(128),o=Hy(43),i=await cv(r),a=e.redirectUri||globalThis.location.href,s=Vy(e);iv(e),Xy(s,"state",o),Xy(s,"verifier",r),Xy(s,"href",globalThis.location.href),Xy("","client-in-progress",s);const l=`${n}/oauth/authorize?${lv({response_type:"code",client_id:t,redirect_uri:a,scope:e.scope||"user_default",state:o,code_challenge:i,code_challenge_method:"S256"})}`;globalThis.location.replace(l)}async function dv(e,t,n,r){try{const o=await fetch(`${_S(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({grant_type:"authorization_code",scope:e.scope||"user_default",...t?{code:t}:{},redirect_uri:r||globalThis.location.href,...n?{code_verifier:n}:{},client_id:e.clientId})}),i=await o.json();return sv(i),{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}catch(e){return console.error(e),new Promise((()=>{}))}}function hv(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 pv(e){const{clientId:t,clientSecret:n}=e;if(!t||!n)throw new gS('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');const r=await rv(e,(async()=>{if(!e.clientId||!e.clientSecret)throw new gS('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');return async function(e,t,n,r="user_default",o,i){const a=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify(hv(t,n,r,o,i))}),s=await a.json();return{accessToken:s.access_token,refreshToken:s.refresh_token,errors:s.errors}}(_S(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)}));return r}async function fv(e){const{clientId:t}=e;if(!t)throw new gS('A host config with authType set to "oauth2" has to also provide a clientId');const n=await rv(e,(async()=>{if(e.getAccessToken)try{const t="string"==typeof e.getAccessToken?await function(e){return globalThis[e]}(e.getAccessToken)():await e.getAccessToken();return{accessToken:t,refreshToken:void 0,errors:void 0}}catch{return yv("Could not fetch access token using custom function")}if(e.performInteractiveLogin){let t;try{const n=Hy(128),r=Hy(43),{code:o,state:i}=function(e){if("string"==typeof e){const t=new URLSearchParams(new URL(e).search);return{code:t.get("code")||"",state:t.get("state")||""}}return e}(await av(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=_S(e),a=await cv(r);return`${i}/oauth/authorize?${lv({response_type:"code",client_id:o,redirect_uri:t,scope:e.scope||"user_default",state:n,code_challenge:a,code_challenge_method:"S256"})}`}(e,o,r,n))}));if(!t)return yv("No redirect uri provided");if(r!==i)return yv("State returned by custom interactive login function does not match original");if(!o)return yv("No code found in response from custom interactive login function");return await dv(e,o,n,t)}catch(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:"Could not perform custom interactive login",detail:`${e}`}]}}}const t=Vy(e),n=nv(t,"code"),r=nv(t,"verifier");if(n&&r){const t=await dv(e,n,r,e.redirectUri);if(t)return t}}));return n||(e.performInteractiveLogin||(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),uv(e)),new Promise((()=>{})))}!function(e,t){(globalThis.location?.origin.startsWith("https://localhost:")||globalThis.location?.origin?.endsWith("qlik-stage.com"))&&(void 0===globalThis[Uy]&&(globalThis[Uy]={}),globalThis[Uy][e]=t)}("clearAllAccessTokens",(()=>{console.log("Clearing tokens",Jy),Object.keys(Jy).forEach((e=>{console.log("Clearing access tokens for",e),ev(e,["access-token","refresh-token"]),tv(e,["access-token","refresh-token"])})),function(){for(const e in Jy)delete Jy[e]}()}));let mv=Promise.resolve("");async function gv(e){if(Ty()){const t=await pv(e);return t?(sv(t),t.accessToken||""):""}return Iy()&&(mv=mv.then((async()=>{const t=await fv(e);return t?(sv(t),t.accessToken||""):""}))),mv}async function bv(e){const t=await async function(e){return Jy[Vy(e)]}(e);if(iv(e),t&&t.refreshToken&&e.clientSecret){const n=await rv(e,(async()=>{if(!t||!t.refreshToken||!e.clientSecret)throw new Error("Trying to refresh tokens without refreshToken or clientSecret");return async function(e,t,n){const r=await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:t,client_secret:n})}),o=await r.json();return{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}(_S(e),t.refreshToken,e.clientSecret)}));n&&sv(n)}}function yv(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function vv(e,t,n){const r=await fetch(`${_S(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({subject_token:t,subject_token_type:"urn:ietf:params:oauth:token-type:access_token",grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",purpose:n,redirect_uri:globalThis.location?.href,client_id:e.clientId})});if(200!==r.status)throw await async function(e){const t=await e.text();try{const e=JSON.parse(t);return new SS(e.errors)}catch{return new SS([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function Sv(e,t){try{return await t()}catch(n){const{retry:r}=await xv({hostConfig:e});if(r)return t();throw n}}function wv(){const e=Math.floor(Date.now()/1e3).toString(16);var t;return`${e}${t=40-e.length,Ny("1234567890abcdef",t)()}`}async function Cv(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new gS('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 gS('A host config with authType set to "anonymous" has to also provide an accessCode');return ov(Ky(e),t,!1,void 0)}(e,(async()=>{const r=_S(e),o=await async function(e){let t;if(Iy()){const n=Ky(e);t=Qy(n,"tracking-code"),t||(t=wv()),Zy(n,"tracking-code",t)}else t=wv();return t}(e);return async function(e,t,n,r){const o=await fetch(`${e}/oauth/token/anonymous-embed`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({eac:t,client_id:n,grant_type:"urn:qlik:oauth:anonymous-embed",tracking_code:r})}),i=await o.json();return{accessToken:i.access_token,refreshToken:i.refresh_token,errors:i.errors}}(r,t,n,o)}));if(!r)return"";if(r.errors)throw new SS(r.errors);return r.accessToken?r.accessToken:""}async function xv({hostConfig:e}){return function(e){const t=Ky(e);delete Jy[t],Iy()&&(ev(t,["access-token","refresh-token"]),tv(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var Ev={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await Cv(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await Sv(e,(async()=>{const t=await Cv(e);return vv(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await Sv(e,(async()=>{const t=await Cv(e);return vv(e,t,"websocket")}))}}},handleAuthenticationError:xv};var kv={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function(){return{queryParams:{}}},handleAuthenticationError:function(){return Promise.resolve({})}},Lv=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=Tv(this.stack)}},Rv=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=Tv(this.stack)}};const qv=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,Iv=e=>{const t=e.match(qv);return Boolean(t&&t.length>0)};function Tv(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(Iv(e))break;t.unshift(e)}return t.join("\n")}function Ov(e,t,n,r){let o=e;return""!==t&&(o=o.concat(`?${t}`)),r&&(o=o.concat(`+headers=${JSON.stringify(r)}`)),n&&(o=o.concat(`+host-config=${n}`)),o}const _v=e=>"get"===e||"GET"===e;function Pv(e){return e&&(e instanceof Blob||e instanceof Object&&"[object Blob]"===e.toString())||e&&e instanceof ReadableStream||"string"==typeof e?e:JSON.parse(JSON.stringify(e))}function Dv(e){return!("get"===e||"GET"===e)}function Av(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 Mv(e){return e.then((e=>{const t={data:Pv(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t}))}let Nv=6e5;const jv={};function zv(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${zv(e.cause)}`:zv(e.cause):e.message:String(e)}async function Fv(e,t,n,r,o,i,a,s){const{body:l,contentTypeHeader:c,requestOptions:u}=function(e,t){if(!e)return{body:null,contentTypeHeader:{},requestOptions:{}};const n={},r={};let o=null;switch(t){case"":case"application/json":n["Content-Type"]="application/json",o=JSON.stringify(e);break;case"multipart/form-data":o=function(e){const t="multipart/form-data";if("object"!=typeof e)throw new Rv(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new Rv(`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 Rv(`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 Rv(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new Rv(`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,...Uv()};!d["User-Agent"]&&s&&(d["User-Agent"]=s);const h={method:e,credentials:a,mode:"cors",headers:d,redirect:await OS(o?.hostConfig)?"manual":"follow",keepalive:o?.keepalive,progress:o?.progress,body:l,...u};let p,f;if(o?.signal)h.signal=o.signal;else if(o?.timeoutMs&&o.timeoutMs>0){const e=new AbortController;p=setTimeout((()=>{e.abort()}),o.timeoutMs),h.signal=e.signal}f=o?.progress?await async function(e,{method:t,headers:n,credentials:r,keepalive:o,body:i,signal:a,progress:s}){const l=new XMLHttpRequest;let c,u;const d=new Promise(((e,t)=>{c=e,u=t}));if(l.open(t||"GET",e),"object"!=typeof n)throw Error("malformed headers",n);for(const[e,t]of Object.entries(n))l.setRequestHeader(e,t);o&&l.setRequestHeader("Connection","keep-alive"),a&&a.addEventListener("abort",(()=>{l.abort(),u()})),l.withCredentials="include"===r,s?.onUpload&&(l.upload.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onUpload?.({loaded:t,total:r?n:void 0})}),s?.onDownload&&(l.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onDownload?.({loaded:t,total:r?n:void 0})}),l.onloadend=()=>{const{status:e}=l,t={};for(const e of l.getAllResponseHeaders().split("\r\n")){const[n,r]=e.split(":",2);n&&r&&(t[n]=r)}l.response?c(new Response(l.response,{status:e,headers:t})):c(new Response(void 0,{status:e,headers:t}))};try{const e=i;l.send(e)}catch(e){return Promise.reject(new Lv(zv(e),0,new Headers,{}))}return d}(t,h):await async function(e,t){try{return await fetch(e,t)}catch(e){return Promise.reject(new Lv(zv(e),0,new Headers,{}))}}(t,h),p&&clearTimeout(p);const m=await async function(e,t){let n;const r=e.headers.get("content-type")?.split(";")[0],o=e.headers.get("content-disposition")?.split(";");if(o&&"attachment"===o[0]){let t="";for(let e=1;e<o.length;e++){const n=o[e].trim();if(0===n.indexOf("filename")){const e=n.indexOf('"'),r=n.lastIndexOf('"');t=n.slice(e+1,r)}}n=Gv(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=Gv(await e.blob());break;case"text/event-stream":n=e.body;break;default:try{n=await e.text(),n=JSON.parse(n)}catch{}}const{status:i,statusText:a,headers:s}=e,l=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new Lv(l,i,s,n);if(0===i)throw new Lv(l,302,s,n);const c={status:i,headers:s,data:n};return c}(f,t);return m}async function $v({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=_S(o?.hostConfig),{headers:a,queryParams:s,credentials:l}=await NS({hostConfig:o?.hostConfig,method:e}),c=i+function(e,t){let n=e;return t&&Object.keys(t).forEach((e=>{n=n.replace(`{${e}}`,t[e])})),n}(t,n),u=function(e){return e?Object.entries(e).map((e=>{const[,t]=e;if(void 0!==t)return e.map((e=>encodeURIComponent(decodeURIComponent(e)))).join("=")})).filter(Boolean).join("&"):""}({...r,...s}),d=function(e,t){return""!==t?`${e}?${t}`:e}(c,u);return{completeUrl:d,cacheKey:Ov(c,u,BS(o?.hostConfig),o?.headers),authHeaders:a,credentials:l}}function Bv(e,t){return Wv(e,t,(async()=>{const{cacheKey:n,authHeaders:r,credentials:o}=await $v(t);return Wv(e,{...t,cacheKey:n,authHeaders:r,credentials:o,options:{...t.options,noCache:!0}},void 0)}))}function Wv(e,{method:t,completeUrl:n,cacheKey:r,body:o,options:i,authHeaders:a,credentials:s,contentType:l,userAgent:c},u){jv[e]||(jv[e]={});const d=Dv(t)?void 0:jv[e][r];if(Dv(t)&&function(e,t){const n=Av(t);for(const t in e){const r=Av(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}(jv[e],r),d&&function(e,t,n){if(!t||void 0===t.value)return!1;if(e?.noCache)return!1;if(e?.useCacheIfAfter)return e.useCacheIfAfter.getTime()<=t.lastPulled;const r=Date.now()-t.lastPulled;return e?.maxCacheAge?r<=e?.maxCacheAge:r<n}(i,d,Nv))return d.lastHit=new Date,d.hitCount+=1,d.accessedPaths.add(globalThis.location?globalThis.location.pathname:"node"),Mv(d.value);const h=Fv(t,n,o,l,i,a,s,c),p=async function(e,t,n){try{return await t}catch(t){const r=t,o=r.data;if(401===r.status||403===r.status&&"CSRF-TOKEN-2"===o?.code||(301===r.status||302===r.status)&&await OS(e)){if(globalThis.loggingOut)return Hv();const{retry:t,preventDefault:i}=await MS({hostConfig:e,status:r.status,headers:r.headers,errorBody:o,canRetry:!!n});if(t&&n)return n();if(i)return Hv()}throw t}}(i?.hostConfig,h,u),f=function(e,t,n,r,o,i,a){const s=BS(o?.hostConfig);return t.then((t=>{const l=t.data;if(!l)return t;const c=l.links?.prev?.href,u=l.links?.next?.href;return c&&(t.prev=t=>Bv(e,{method:n,completeUrl:c,body:r,options:t||o,cacheKey:Ov(c,"",s,o?.headers),authHeaders:i,credentials:a})),u&&(t.next=t=>Bv(e,{method:n,completeUrl:u,body:r,options:t||o,cacheKey:Ov(u,"",s,o?.headers),authHeaders:i,credentials:a})),t}))}(e,p,t,o,i,a,s),m=function(e,t,n){return n.catch((n=>(delete e[t],Promise.reject(n))))}(jv[e],r,f);if(_v(t)){if(Object.hasOwn&&!Object.hasOwn(jv,e)||"__proto__"===e)throw new Error(`Forbidden api name: ${e}`);jv[e][r]={lastPulled:Date.now(),value:m,lastHit:null,hitCount:0,accessedPaths:new Set}}return Mv(m)}function Hv(){return new Promise((()=>{}))}function Uv(){if(!Iy())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function Gv(e,t){const n=e;return n.download=t?(n=t)=>Vv(e,n):t=>Vv(e,t),n}async function Vv(e,t){if(Iy()){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 XS})),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jv;const Kv="qmfe-api/latest";async function Jv(e,t,n){const r=(Py.getInterceptors()||[]).reduce(((e,t)=>n=>t(n,e)),(t=>async function(e,t){if(function(e){const t=GS(e);if(TS(t)){if(0===Object.keys(t).length)throw new gS("a host config must be provided when making a cross domain request");if(!t.host)throw new gS("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:Iy()?`${window.navigator.userAgent} ${Kv}`:Kv;const{completeUrl:r,cacheKey:o,authHeaders:i,credentials:a}=await $v(t);return Bv(e,{...t,method:t.method.toUpperCase(),completeUrl:r,cacheKey:o,authHeaders:i,credentials:a,userAgent:n})}(e,t)));return r(t)}const Zv="qlik-csrf-token";async function Xv(e,t){const n=_S(e);let r;r=await OS(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const t=(await Jv("csrf-token",{method:"get",pathTemplate:r,options:{hostConfig:e,noCache:!0}})).headers.get(Zv);return t||""}catch(e){if(404===e.status)return"";throw e}};return t?(Qv[n]=o(),Qv[n]):(Qv[n]=Qv[n]||o(),Qv[n])}const Qv={};function Yv(e){return!1===e.crossSiteCookies?"same-origin":TS(e)?"include":"same-origin"}var eS={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 Xv(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:Yv(e)}},getWebSocketAuthParams:async function({hostConfig:e}){const t={"qlik-csrf-token":await Xv(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=_S(e);delete Qv[t]}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=_S(e);return e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var tS={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 nS={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 rS(e,t){try{return await t()}catch(n){const{retry:r}=await oS({hostConfig:e});if(r)return t();throw n}}async function oS({hostConfig:e}){return e.getAccessToken?(iv(e),{preventDefault:!1,retry:!0}):Iy()?e.performInteractiveLogin?(iv(e),{retry:!0}):(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),uv(e),{preventDefault:!0}):(await bv(e),{preventDefault:!1,retry:!0})}Iy()&&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=nv("","client-in-progress");if(r&&t&&n){const e=nv(r,"state"),o=nv(r,"href");e&&e===n&&o&&(Xy(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var iS={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await gv(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await rS(e,(async()=>{const t=await gv(e);return vv(e,t,"websocket")}))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await rS(e,(async()=>{const t=await gv(e);return vv(e,t,"webresource")}))}}},handleAuthenticationError:oS};var aS={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 sS={};function lS(e){const t=_S(e);return sS[t]=sS[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}(),sS[t]}var cS={requiredProps:[],optionalProps:["loginUri","crossSiteCookies"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":lS(e)},queryParams:{xrfkey:lS(e)},credentials:Yv(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:lS(e),"qlik-csrf-token":await Xv(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){return e.loginUri?(e.authRedirectUserConfirmation&&await e.authRedirectUserConfirmation(),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0}):{}}};const uS={};let dS=Promise.resolve(),hS=!1;function pS(e,t){uS[e.toLowerCase()]=t}async function fS(e){const t=GS(e),n=await mS(t);dS&&await dS;let r=function(e){return uS[e.toLowerCase()]}(n);if(r||(dS=(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 yS(e)}return Promise.resolve(void 0)}(n),r&&pS(n,r)})(),await dS),!r)throw new yS(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 gS(`missing required properties in host config; '${r.join("', '")}'`);const o=[...Dy,...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 mS(e){return e.authType?e.authType:e.apiKey?"apikey":e.accessCode?"anonymous":e.clientId?"oauth2":e.webIntegrationId?"cookie":e.reference?"reference":await OS(e)?"windowscookie":"cookie"}hS||(pS("apikey",kv),pS("cookie",eS),pS("none",nS),pS("noauth",tS),pS("oauth2",iS),pS("anonymous",Ev),pS("windowscookie",cS),pS("reference",aS),hS=!0);var gS=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},bS=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"}},yS=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(uS).filter((e=>"qmfeembedframerauthmodule"!==e.toLowerCase())).join("', '")}'`),this.name="InvalidAuthTypeError"}};function vS({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var SS=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(vS).join(", ")),this.errors=t}};function wS(e){const t=_y(e)||{};return t.host&&(t.host=_S(t)),Iy()&&_S(t)===window.location.origin&&delete t.host,t.authType&&Ay.includes(t.authType)&&delete t.authType,t}function CS(e,t){if("function"!=typeof t)return t}const xS=new Map;function ES(e,t){const n=t?.reference||null;if(n&&!xS.has(n))throw new gS(`Host config with reference "${n}" is not registered. Please register it before using it.`);xS.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),xS.set(e,t)}function kS(e){return xS.get(e)}function LS(){return kS("default")||{}}globalThis.loggingOut=!1;let RS="";function qS({message:e}){e!==RS&&(RS=e,console.error(e))}function IS(e){return mS(e)}function TS(e){if(!globalThis.location?.origin)return!0;const t=GS(e);if(0===Object.keys(t).length)return!1;try{return new URL(_S(t)).origin!==globalThis.location.origin}catch{}return!1}async function OS(e){const t=GS(e);return"boolean"==typeof t.forceIsWindows?t.forceIsWindows:"cookie"!==t.authType&&("windowscookie"===t.authType||(await zy({hostConfig:e})).isWindows)}function _S(e){const t=GS(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 PS(e){const t=GS(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(HS,"ws")}async function DS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await n.getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}async function AS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await(n.getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}async function MS(e){const t=GS(e.hostConfig),n=await fS(t),r=await n.handleAuthenticationError({...e,hostConfig:t}),o=e.canRetry&&r.retry,i=r.preventDefault;if(!o&&!i){const{status:n,errorBody:r}=e;(t.onAuthFailed||qS)(function({errorBody:e,status:t}){const n=e;if("object"==typeof n?.errors){return{message:new SS(n?.errors).message}}return{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return r}async function NS(e){const t=GS(e.hostConfig);try{const n=await fS(t);return await n.getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw(t.onAuthFailed||qS)(US(e)),e}}function jS(e,t){pS(e,t)}function zS(e){!function(e){ES("default",e||{})}(e)}function FS(e,t){ES(e,t)}function $S(e){!function(e){xS.has(e)?xS.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function BS(e){return function(e){const t=Oy(wS(GS(e)));return JSON.stringify(t,CS)}(e)}const WS=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},HS=/^http/;function US(e){return{message:e.message||"Unknown error"}}function GS(e){if(e?.reference){const t=kS(e.reference);if(!t)throw new gS(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:LS()}function VS(){return LS()}var KS={determineAuthType:IS,getDefaultHostConfig:VS,getRestCallAuthParams:NS,getWebResourceAuthParams:AS,getWebSocketAuthParams:DS,handleAuthenticationError:MS,isHostCrossOrigin:TS,isWindows:OS,logout:WS,registerAuthModule:jS,registerHostConfig:FS,serializeHostConfig:BS,setDefaultHostConfig:zS,toValidLocationUrl:_S,toValidWebsocketLocationUrl:PS,unregisterHostConfig:$S},JS=Object.freeze({__proto__:null,AuthorizationError:SS,InvalidAuthTypeError:yS,InvalidHostConfigError:gS,UnexpectedAuthTypeError:bS,default:KS,determineAuthType:IS,getAccessToken:async function(e){const t=await NS({method:"GET",...e}),n=t.headers?.Authorization;if(0===n.indexOf("Bearer "))return n.substring(7);throw new Error("Unknown format of authorization header returned by remote auth module")},getDefaultHostConfig:VS,getRestCallAuthParams:NS,getWebResourceAuthParams:AS,getWebSocketAuthParams:DS,handleAuthenticationError:MS,isHostCrossOrigin:TS,isWindows:OS,logout:WS,registerAuthModule:jS,registerHostConfig:FS,serializeHostConfig:BS,setDefaultHostConfig:zS,toValidLocationUrl:_S,toValidWebsocketLocationUrl:PS,unregisterHostConfig:$S});window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise((e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})}))),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout((()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")}),5e3),t=await window.__qlikMainPrivateResolvers.mainUrlPromise;return clearTimeout(e),new Promise((e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),n.addEventListener("error",(()=>{console.error(`Qlik runtime system not found: ${t}`)})),n.addEventListener("load",(()=>{window.QlikMain&&e(window.QlikMain)})),window.document.head.appendChild(n)}}))})());var ZS=Object.freeze({__proto__:null,importRuntimeModule:async function(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&window.__qlikMainPrivateResolvers.resolveMainJsUrl(t)}(t),async function(e){if(!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}}),XS=Object.freeze({__proto__:null});export{xm as DataPropertyHandler,Ry as EnigmaMocker,Tm as HyperCubeHandler,qy as __DO_NOT_USE__,Hp as conversion,py as embed,Hf as onContextMenu,Wf as onTakeSnapshot,jf as useAction,If as useApp,Rf as useAppLayout,zf as useConstraints,Af as useDeviceType,yf as useEffect,xf as useElement,Pf as useEmbed,Gf as useEmitter,Tf as useGlobal,Bf as useImperativeHandle,Ff as useInteractionState,Vf as useKeyboard,kf as useLayout,Sf as useMemo,qf as useModel,Mf as useNavigation,$f as useOptions,Nf as usePlugins,Cf as usePromise,Ef as useRect,wf as useRef,Uf as useRenderState,Of as useSelections,Lf as useStaleLayout,bf as useState,_f as useTheme,Df as useTranslator};
|
|
17
17
|
//# sourceMappingURL=index.js.map
|