@sisense/sdk-ui 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +54 -52
- package/dist/ai.js +997 -844
- package/dist/analytics-composer.cjs +45 -45
- package/dist/analytics-composer.js +567 -536
- package/dist/derive-chart-family-DOmv279l.cjs +271 -0
- package/dist/derive-chart-family-ZvvF5lty.js +44444 -0
- package/dist/index.cjs +112 -132
- package/dist/index.js +8146 -7238
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +6 -1
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
- package/dist/packages/sdk-ui/src/ai/icons/close-dialog-icon.d.ts +3 -1
- package/dist/packages/sdk-ui/src/ai/icons/sisense-logo.d.ts +2 -4
- package/dist/packages/sdk-ui/src/ai/use-chat-session.d.ts +2 -1
- package/dist/packages/sdk-ui/src/analytics-composer/common/stringify-props.d.ts +5 -0
- package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/execute-query-composer.d.ts +15 -0
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/to-execute-query-code.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +15 -2
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +1 -1
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +26 -2
- package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +9 -4
- package/dist/packages/sdk-ui/src/chart/helpers/use-synced-data.d.ts +14 -1
- package/dist/packages/sdk-ui/src/chart-data-processor/data-table-date-period.d.ts +1 -4
- package/dist/packages/sdk-ui/src/common-filters/cascading-utils.d.ts +3 -1
- package/dist/packages/sdk-ui/src/common-filters/common-filters-connector.d.ts +4 -3
- package/dist/packages/sdk-ui/src/common-filters/types.d.ts +25 -0
- package/dist/packages/sdk-ui/src/common-filters/use-common-filters.d.ts +8 -9
- package/dist/packages/sdk-ui/src/common-filters/use-convert-filter-relations.d.ts +26 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +40 -10
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +5 -5
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +4 -4
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +3 -3
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-list.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/helpers.d.ts +122 -0
- package/dist/packages/sdk-ui/src/filters/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +11 -3
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +3 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts +2 -0
- package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +1 -0
- package/dist/packages/sdk-ui/src/query-execution/utils.d.ts +3 -0
- package/dist/packages/sdk-ui/src/utils/extract-widget-ids.d.ts +2 -0
- package/dist/packages/sdk-ui/src/utils/filter-relations.d.ts +64 -0
- package/dist/packages/sdk-ui/src/utils/filters-comparator.d.ts +5 -0
- package/dist/packages/sdk-ui/src/utils/filters.d.ts +0 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +178 -178
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-filters.d.ts +17 -17
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +14 -2
- package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +13 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +4 -4
- package/dist/useQuery-9lk4MNnb.cjs +889 -0
- package/dist/useQuery-BtpTzoxI.js +81219 -0
- package/dist/widget-composer-DbpSzSub.cjs +298 -0
- package/dist/{widget-composer-L8kmRhgX.js → widget-composer-ygehKLLR.js} +232 -163
- package/package.json +8 -8
- package/dist/useQuery-CIeSzN0Z.js +0 -7945
- package/dist/useQuery-LqaaNBLw.cjs +0 -175
- package/dist/widget-composer-CvgsMHyb.cjs +0 -237
- package/dist/widget-model-translator-CYeCKnTa.js +0 -116687
- package/dist/widget-model-translator-_Z-8UaTN.cjs +0 -917
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";var vn=Object.defineProperty,xn=Object.defineProperties;var Tn=Object.getOwnPropertyDescriptors;var De=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var Ge=Math.pow,Ke=(e,t,n)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))kt.call(t,n)&&Ke(e,n,t[n]);if(De)for(var n of De(t))Mt.call(t,n)&&Ke(e,n,t[n]);return e},I=(e,t)=>xn(e,Tn(t));var Ye=(e,t)=>{var n={};for(var o in e)kt.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&De)for(var o of De(e))t.indexOf(o)<0&&Mt.call(e,o)&&(n[o]=e[o]);return n};var G=(e,t,n)=>(Ke(e,typeof t!="symbol"?t+"":t,n),n);var ce=(e,t,n)=>new Promise((o,i)=>{var s=c=>{try{l(n.next(c))}catch(p){i(p)}},a=c=>{try{l(n.throw(c))}catch(p){i(p)}},l=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,a);l((n=n.apply(e,t)).next())});const u=require("react/jsx-runtime"),C=require("react"),r=require("./widget-model-translator-_Z-8UaTN.cjs");function Pn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=Pn(C);function Cn(e){let{i18n:t,defaultNS:n,children:o}=e;const i=C.useMemo(()=>({i18n:t,defaultNS:n}),[t,n]);return C.createElement(r.I18nContext.Provider,{value:i},o)}function or(e,t){return ce(this,null,function*(){const n=yield En(e,t);if(!n)throw new r.TranslatableError("errors.themeNotFound",{themeOid:e});const o=r.getPaletteName(n),i=yield sr(o,t);return r.convertToThemeSettings(n,i,t.url)})}function En(e,t){return ce(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new r.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function sr(e,t){return ce(this,null,function*(){const n=yield t.get(`api/palettes/${e}`);if(n&&"status"in n&&n.status==="error")throw new r.TranslatableError("errors.paletteNotFound",{paletteName:e});return n})}const Sn="sdkComponentInit",ir=C.createContext(!1),wn=({skipNested:e=!0,children:t})=>u.jsx(ir.Provider,{value:e,children:t}),Rn=(e,t)=>{const{tracking:n}=r.useSisenseContext(),{trackEvent:o}=r.useTracking(),i=C.useContext(ir),s=C.useRef(!1);C.useEffect(()=>{if(!n)return;if(!s.current&&!i){const l={packageName:n.packageName,packageVersion:"1.24.0",componentName:e,attributesUsed:Object.entries(t).filter(([,c])=>!!c).map(([c])=>c).join(", ")};o(Sn,l,!n.enabled).finally(()=>s.current=!0)}},[e,t,n,i,o])};var kn="[object Boolean]";function ar(e){return e===!0||e===!1||r.isObjectLike(e)&&r.baseGetTag(e)==kn}class lr extends C.Component{constructor(n){super(n);G(this,"componentName");G(this,"context");G(this,"handler");G(this,"httpClient");G(this,"postponedErrors",[]);this.handler=n.handler,this.componentName=n.componentName}componentDidMount(){var n;this.context.isInitialized&&(this.httpClient=(n=this.context.app)==null?void 0:n.httpClient)}componentDidCatch(n){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(n):this.postponedErrors.push(n)),n}sendErrorTracking(n){try{this.handler({packageName:"sdk-ui",packageVersion:"1.24.0",component:this.componentName,error:n})}catch(o){console.log("Failed to send tracking error event: ",o)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(n=>this.sendErrorTracking(n)),this.postponedErrors=[],this.props.children}}G(lr,"contextType",r.SisenseContext);const Mn=({componentName:e,config:t})=>{const{skip:n,transparent:o}=t||{};return i=>function(a){const{trackError:l}=r.useTracking();return ar(n)&&n||r.isFunction(n)&&n(a)?u.jsx(i,R({},a)):(Rn(e,a),u.jsx(wn,{skipNested:!o,children:u.jsx(lr,{componentName:e,handler:l,children:u.jsx(i,R({},a))})}))}},Dn="_container_1wquj_1",On="_card_1wquj_11",In="_text_1wquj_19",Xe={container:Dn,card:On,text:In};function cr({color:e="#FFCB05"}){return u.jsx("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:u.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:u.jsxs("g",{children:[u.jsx("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),u.jsx("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const ur=({error:e=new r.TranslatableError("errors.componentRenderError")})=>{var h,y,g,E,m,v;const{themeSettings:t}=r.useThemeContext(),{app:n}=r.useSisenseContext(),{t:o}=r.useTranslation(),[i,s]=C.useState(!1),a=()=>{s(!0)},l=()=>{s(!1)},c=u.jsx("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:u.jsx(cr,{color:(h=t==null?void 0:t.general)==null?void 0:h.brandColor})}),p=e instanceof r.AbstractTranslatableError?o(e.key,R({},e.interpolationOptions)):o(e instanceof Error?e.message:e),f=o("errorBoxText",{errorMessage:p,interpolation:{escapeValue:!1}}),d=(g=(y=n==null?void 0:n.settings)==null?void 0:y.errorBoundaryConfig)==null?void 0:g.alwaysShowErrorText;return u.jsx("div",{onMouseEnter:d?void 0:a,onMouseLeave:d?void 0:l,className:Xe.container,"aria-label":"error-box",children:u.jsxs("div",{className:Xe.card,style:{backgroundColor:((E=t==null?void 0:t.general)==null?void 0:E.backgroundColor)||"rgba(255,255,255,0.5)"},children:[c,(d||i)&&u.jsx("div",{className:Xe.text,style:{color:((m=t==null?void 0:t.typography)==null?void 0:m.primaryTextColor)||"#5b6372",fontFamily:((v=t==null?void 0:t.typography)==null?void 0:v.fontFamily)||"inherit"},children:f})]})})};let dr=class extends C.Component{constructor(n){var o;super(n);G(this,"showErrorBox",!0);G(this,"onError");G(this,"isContainerComponent");this.showErrorBox=(o=n.showErrorBox)!=null?o:!0,this.onError=n.onError,this.isContainerComponent=n.isContainerComponent||!1,this.state={error:null}}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n){var o;this.setState({error:n}),(o=this.onError)==null||o.call(this,n instanceof Error?n:new Error(n))}componentDidUpdate(n,o){o.error!==null&&jn(n.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const n=this.state.error||this.props.error;return!n||this.isContainerComponent&&!this.showErrorBox?this.props.children:this.showErrorBox?u.jsx(ur,{error:n}):null}};function jn(e=[],t=[]){return e.length!==t.length||e.some((n,o)=>!r.isEqual(n,t[o]))}const Fn=({componentName:e})=>t=>function(o){const i=r.useSisenseContext(),s=a=>{var l,c;return(c=(l=i.errorBoundary).onError)==null?void 0:c.call(l,a,{componentName:e,componentProps:o})};return u.jsx(dr,{resetKeys:Object.values(o),showErrorBox:i.errorBoundary.showErrorBox,onError:s,isContainerComponent:!!(o!=null&&o.children),children:u.jsx(t,R({},o))})},Nn=({shouldSkipSisenseContextWaiting:e,customContextErrorMessageKey:t})=>n=>function(i){if(_n(e,i))return u.jsx(n,R({},i));const{app:s,isInitialized:a}=r.useSisenseContext();if(!a){const l=t||"errors.noSisenseContext";throw new r.TranslatableError(l)}return s?u.jsx(n,R({},i)):u.jsx(r.LoadingIndicator,{})};function _n(e,t){return ar(e)&&e||r.isFunction(e)&&e(t)}function Ln(){const[e,t]=C.useState(null);return C.useEffect(()=>{r.initializeI18n().initPromise.then(n=>t(n))},[]),e}const pr=({children:e,userLanguage:t,customTranslations:n=[]})=>{const o=Ln();return C.useEffect(()=>{if(t&&(o==null?void 0:o.language)!==t){for(const{language:i,resources:s,namespace:a="sdkUi"}of n)o==null||o.addResourceBundle(i,a,s);o==null||o.changeLanguage(t)}},[o,t,n]),o&&u.jsx(Cn,{i18n:o,children:e})},Bn=()=>e=>function(n){const{isInitialized:o}=r.useSisenseContext();return o?u.jsx(e,R({},n)):u.jsx(pr,{children:u.jsx(e,R({},n))})},pt=C.createContext(null),Ae=()=>C.useContext(pt),Fe=S.createContext({});process.env.NODE_ENV!=="production"&&(Fe.displayName="ListContext");function An(e){return r.generateUtilityClass("MuiList",e)}r.generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const $n=["children","className","component","dense","disablePadding","subheader"],zn=e=>{const{classes:t,disablePadding:n,dense:o,subheader:i}=e,s={root:["root",!n&&"padding",o&&"dense",i&&"subheader"]};return r.composeClasses(s,An,t)},Un=r.styled("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>r._extends({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),fr=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiList"}),{children:i,className:s,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:p}=o,f=r._objectWithoutPropertiesLoose(o,$n),d=S.useMemo(()=>({dense:l}),[l]),h=r._extends({},o,{component:a,dense:l,disablePadding:c}),y=zn(h);return u.jsx(Fe.Provider,{value:d,children:u.jsxs(Un,r._extends({as:a,className:r.clsx(y.root,s),ref:n,ownerState:h},f,{children:[p,i]}))})});process.env.NODE_ENV!=="production"&&(fr.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,dense:r.PropTypes.bool,disablePadding:r.PropTypes.bool,subheader:r.PropTypes.node,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});function hr(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const qn=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Je(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Dt(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function yr(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function ve(e,t,n,o,i,s){let a=!1,l=i(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=o?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!yr(l,s)||c)l=i(e,l,n);else return l.focus(),!0}return!1}const ft=S.forwardRef(function(t,n){const{actions:o,autoFocus:i=!1,autoFocusItem:s=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:p=!1,onKeyDown:f,variant:d="selectedMenu"}=t,h=r._objectWithoutPropertiesLoose(t,qn),y=S.useRef(null),g=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});r.useEnhancedEffect(()=>{i&&y.current.focus()},[i]),S.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(b,{direction:x})=>{const k=!y.current.style.width;if(b.clientHeight<y.current.clientHeight&&k){const T=`${hr(r.ownerDocument(b))}px`;y.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=T,y.current.style.width=`calc(100% + ${T})`}return y.current}}),[]);const E=b=>{const x=y.current,k=b.key,T=r.ownerDocument(x).activeElement;if(k==="ArrowDown")b.preventDefault(),ve(x,T,p,c,Je);else if(k==="ArrowUp")b.preventDefault(),ve(x,T,p,c,Dt);else if(k==="Home")b.preventDefault(),ve(x,null,p,c,Je);else if(k==="End")b.preventDefault(),ve(x,null,p,c,Dt);else if(k.length===1){const P=g.current,w=k.toLowerCase(),D=performance.now();P.keys.length>0&&(D-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&w!==P.keys[0]&&(P.repeating=!1)),P.lastTime=D,P.keys.push(w);const O=T&&!P.repeating&&yr(T,P);P.previousKeyMatched&&(O||ve(x,T,!1,c,Je,P))?b.preventDefault():P.previousKeyMatched=!1}f&&f(b)},m=r.useForkRef(y,n);let v=-1;S.Children.forEach(a,(b,x)=>{if(!S.isValidElement(b)){v===x&&(v+=1,v>=a.length&&(v=-1));return}process.env.NODE_ENV!=="production"&&r.reactIsExports.isFragment(b)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
2
|
-
`)),b.props.disabled||(d==="selectedMenu"&&b.props.selected||v===-1)&&(v=x),v===x&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=a.length&&(v=-1))});const M=S.Children.map(a,(b,x)=>{if(x===v){const k={};return s&&(k.autoFocus=!0),b.props.tabIndex===void 0&&d==="selectedMenu"&&(k.tabIndex=0),S.cloneElement(b,k)}return b});return u.jsx(fr,r._extends({role:"menu",ref:m,className:l,onKeyDown:E,tabIndex:i?0:-1},h,{children:M}))});process.env.NODE_ENV!=="production"&&(ft.propTypes={autoFocus:r.PropTypes.bool,autoFocusItem:r.PropTypes.bool,children:r.PropTypes.node,className:r.PropTypes.string,disabledItemsFocusable:r.PropTypes.bool,disableListWrap:r.PropTypes.bool,onKeyDown:r.PropTypes.func,variant:r.PropTypes.oneOf(["menu","selectedMenu"])});function Wn(e,t=166){let n;function o(...i){const s=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(s,t)}return o.clear=()=>{clearTimeout(n)},o}function Ce(e){return r.ownerDocument(e).defaultView||window}function Ot(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function mr(e,t){const n=r._extends({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=r._extends({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const i=e[o]||{},s=t[o];n[o]={},!s||!Object.keys(s)?n[o]=i:!i||!Object.keys(i)?n[o]=s:(n[o]=r._extends({},s),Object.keys(i).forEach(a=>{n[o][a]=mr(i[a],s[a])}))}else n[o]===void 0&&(n[o]=e[o])}),n}function Vn(e){const t=r.ownerDocument(e);return t.body===e?Ce(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Pe(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function It(e){return parseInt(Ce(e).getComputedStyle(e).paddingRight,10)||0}function Hn(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function jt(e,t,n,o,i){const s=[t,n,...o];[].forEach.call(e.children,a=>{const l=s.indexOf(a)===-1,c=!Hn(a);l&&c&&Pe(a,i)})}function Ze(e,t){let n=-1;return e.some((o,i)=>t(o)?(n=i,!0):!1),n}function Qn(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(Vn(o)){const a=hr(r.ownerDocument(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${It(o)+a}px`;const l=r.ownerDocument(o).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${It(c)+a}px`})}let s;if(o.parentNode instanceof DocumentFragment)s=r.ownerDocument(o).body;else{const a=o.parentElement,l=Ce(o);s=(a==null?void 0:a.nodeName)==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:o}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:l})=>{s?a.style.setProperty(l,s):a.style.removeProperty(l)})}}function Kn(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Gn{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Pe(t.modalRef,!1);const i=Kn(n);jt(n,t.mount,t.modalRef,i,!0);const s=Ze(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),o)}mount(t,n){const o=Ze(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];i.restore||(i.restore=Qn(i,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=Ze(this.containers,a=>a.modals.indexOf(t)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(o,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&Pe(t.modalRef,n),jt(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&Pe(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const Yn=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Xn(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Jn(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Zn(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Jn(e))}function eo(e){const t=[],n=[];return Array.from(e.querySelectorAll(Yn)).forEach((o,i)=>{const s=Xn(o);s===-1||!Zn(o)||(s===0?t.push(o):n.push({documentOrder:i,tabIndex:s,node:o}))}),n.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function to(){return!0}function Ne(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:s=eo,isEnabled:a=to,open:l}=e,c=S.useRef(!1),p=S.useRef(null),f=S.useRef(null),d=S.useRef(null),h=S.useRef(null),y=S.useRef(!1),g=S.useRef(null),E=r.useForkRef(t.ref,g),m=S.useRef(null);S.useEffect(()=>{!l||!g.current||(y.current=!n)},[n,l]),S.useEffect(()=>{if(!l||!g.current)return;const b=r.ownerDocument(g.current);return g.current.contains(b.activeElement)||(g.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
3
|
-
`)),g.current.setAttribute("tabIndex","-1")),y.current&&g.current.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[l]),S.useEffect(()=>{if(!l||!g.current)return;const b=r.ownerDocument(g.current),x=P=>{m.current=P,!(o||!a()||P.key!=="Tab")&&b.activeElement===g.current&&P.shiftKey&&(c.current=!0,f.current&&f.current.focus())},k=()=>{const P=g.current;if(P===null)return;if(!b.hasFocus()||!a()||c.current){c.current=!1;return}if(P.contains(b.activeElement)||o&&b.activeElement!==p.current&&b.activeElement!==f.current)return;if(b.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!y.current)return;let w=[];if((b.activeElement===p.current||b.activeElement===f.current)&&(w=s(g.current)),w.length>0){var D,O;const A=!!((D=m.current)!=null&&D.shiftKey&&((O=m.current)==null?void 0:O.key)==="Tab"),U=w[0],$=w[w.length-1];typeof U!="string"&&typeof $!="string"&&(A?$.focus():U.focus())}else P.focus()};b.addEventListener("focusin",k),b.addEventListener("keydown",x,!0);const T=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(T),b.removeEventListener("focusin",k),b.removeEventListener("keydown",x,!0)}},[n,o,i,a,l,s]);const v=b=>{d.current===null&&(d.current=b.relatedTarget),y.current=!0,h.current=b.target;const x=t.props.onFocus;x&&x(b)},M=b=>{d.current===null&&(d.current=b.relatedTarget),y.current=!0};return u.jsxs(S.Fragment,{children:[u.jsx("div",{tabIndex:l?0:-1,onFocus:M,ref:p,"data-testid":"sentinelStart"}),S.cloneElement(t,{ref:E,onFocus:v}),u.jsx("div",{tabIndex:l?0:-1,onFocus:M,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Ne.propTypes={children:r.elementAcceptingRef,disableAutoFocus:r.PropTypes.bool,disableEnforceFocus:r.PropTypes.bool,disableRestoreFocus:r.PropTypes.bool,getTabbable:r.PropTypes.func,isEnabled:r.PropTypes.func,open:r.PropTypes.bool.isRequired});process.env.NODE_ENV!=="production"&&(Ne.propTypes=r.exactProp(Ne.propTypes));const ro=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],no={entering:{opacity:1},entered:{opacity:1}},ht=S.forwardRef(function(t,n){const o=r.useTheme(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,easing:c,in:p,onEnter:f,onEntered:d,onEntering:h,onExit:y,onExited:g,onExiting:E,style:m,timeout:v=i,TransitionComponent:M=r.Transition}=t,b=r._objectWithoutPropertiesLoose(t,ro),x=S.useRef(null),k=r.useForkRef(x,l.ref,n),T=N=>q=>{if(N){const j=x.current;q===void 0?N(j):N(j,q)}},P=T(h),w=T((N,q)=>{const j=r.getTransitionProps({style:m,timeout:v,easing:c},{mode:"enter"});N.style.webkitTransition=o.transitions.create("opacity",j),N.style.transition=o.transitions.create("opacity",j),f&&f(N,q)}),D=T(d),O=T(E),A=T(N=>{const q=r.getTransitionProps({style:m,timeout:v,easing:c},{mode:"exit"});N.style.webkitTransition=o.transitions.create("opacity",q),N.style.transition=o.transitions.create("opacity",q),y&&y(N)}),U=T(g),$=N=>{s&&s(x.current,N)};return u.jsx(M,r._extends({appear:a,in:p,nodeRef:x,onEnter:w,onEntered:D,onEntering:P,onExit:A,onExited:U,onExiting:O,addEndListener:$,timeout:v},b,{children:(N,q)=>S.cloneElement(l,r._extends({style:r._extends({opacity:0,visibility:N==="exited"&&!p?"hidden":void 0},no[N],m,l.props.style),ref:k},q))}))});process.env.NODE_ENV!=="production"&&(ht.propTypes={addEndListener:r.PropTypes.func,appear:r.PropTypes.bool,children:r.elementAcceptingRef.isRequired,easing:r.PropTypes.oneOfType([r.PropTypes.shape({enter:r.PropTypes.string,exit:r.PropTypes.string}),r.PropTypes.string]),in:r.PropTypes.bool,onEnter:r.PropTypes.func,onEntered:r.PropTypes.func,onEntering:r.PropTypes.func,onExit:r.PropTypes.func,onExited:r.PropTypes.func,onExiting:r.PropTypes.func,style:r.PropTypes.object,timeout:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})])});function oo(e){return r.generateUtilityClass("MuiBackdrop",e)}r.generateUtilityClasses("MuiBackdrop",["root","invisible"]);const so=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],io=e=>{const{classes:t,invisible:n}=e,o={root:["root",n&&"invisible"]};return r.composeClasses(o,oo,t)},ao=r.styled("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>r._extends({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),yt=S.forwardRef(function(t,n){var o,i,s;const a=r.useDefaultProps({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:p="div",components:f={},componentsProps:d={},invisible:h=!1,open:y,slotProps:g={},slots:E={},TransitionComponent:m=ht,transitionDuration:v}=a,M=r._objectWithoutPropertiesLoose(a,so),b=r._extends({},a,{component:p,invisible:h}),x=io(b),k=(o=g.root)!=null?o:d.root;return u.jsx(m,r._extends({in:y,timeout:v},M,{children:u.jsx(ao,r._extends({"aria-hidden":!0},k,{as:(i=(s=E.root)!=null?s:f.Root)!=null?i:p,className:r.clsx(x.root,c,k==null?void 0:k.className),ownerState:r._extends({},b,k==null?void 0:k.ownerState),classes:x,ref:n,children:l}))}))});process.env.NODE_ENV!=="production"&&(yt.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,components:r.PropTypes.shape({Root:r.PropTypes.elementType}),componentsProps:r.PropTypes.shape({root:r.PropTypes.object}),invisible:r.PropTypes.bool,open:r.PropTypes.bool.isRequired,slotProps:r.PropTypes.shape({root:r.PropTypes.object}),slots:r.PropTypes.shape({root:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),TransitionComponent:r.PropTypes.elementType,transitionDuration:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})])});function lo(e){return typeof e=="function"?e():e}function co(e){return e?e.props.hasOwnProperty("in"):!1}const uo=new Gn;function po(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:i=uo,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:l,children:c,onClose:p,open:f,rootRef:d}=e,h=S.useRef({}),y=S.useRef(null),g=S.useRef(null),E=r.useForkRef(g,d),[m,v]=S.useState(!f),M=co(c);let b=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(b=!1);const x=()=>r.ownerDocument(y.current),k=()=>(h.current.modalRef=g.current,h.current.mount=y.current,h.current),T=()=>{i.mount(k(),{disableScrollLock:o}),g.current&&(g.current.scrollTop=0)},P=r.useEventCallback(()=>{const j=lo(t)||x().body;i.add(k(),j),g.current&&T()}),w=S.useCallback(()=>i.isTopModal(k()),[i]),D=r.useEventCallback(j=>{y.current=j,j&&(f&&w()?T():g.current&&Pe(g.current,b))}),O=S.useCallback(()=>{i.remove(k(),b)},[b,i]);S.useEffect(()=>()=>{O()},[O]),S.useEffect(()=>{f?P():(!M||!s)&&O()},[f,O,M,s,P]);const A=j=>_=>{var L;(L=j.onKeyDown)==null||L.call(j,_),!(_.key!=="Escape"||_.which===229||!w())&&(n||(_.stopPropagation(),p&&p(_,"escapeKeyDown")))},U=j=>_=>{var L;(L=j.onClick)==null||L.call(j,_),_.target===_.currentTarget&&p&&p(_,"backdropClick")};return{getRootProps:(j={})=>{const _=r.extractEventHandlers(e);delete _.onTransitionEnter,delete _.onTransitionExited;const L=r._extends({},_,j);return r._extends({role:"presentation"},L,{onKeyDown:A(L),ref:E})},getBackdropProps:(j={})=>{const _=j;return r._extends({"aria-hidden":!0},_,{onClick:U(_),open:f})},getTransitionProps:()=>{const j=()=>{v(!1),a&&a()},_=()=>{v(!0),l&&l(),s&&O()};return{onEnter:Ot(j,c==null?void 0:c.props.onEnter),onExited:Ot(_,c==null?void 0:c.props.onExited)}},rootRef:E,portalRef:D,isTopModal:w,exited:m,hasTransition:M}}function fo(e){return r.generateUtilityClass("MuiModal",e)}r.generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const ho=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],yo=e=>{const{open:t,exited:n,classes:o}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return r.composeClasses(i,fo,o)},mo=r.styled("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>r._extends({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),go=r.styled(yt,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),mt=S.forwardRef(function(t,n){var o,i,s,a,l,c;const p=r.useDefaultProps({name:"MuiModal",props:t}),{BackdropComponent:f=go,BackdropProps:d,className:h,closeAfterTransition:y=!1,children:g,container:E,component:m,components:v={},componentsProps:M={},disableAutoFocus:b=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:k=!1,disablePortal:T=!1,disableRestoreFocus:P=!1,disableScrollLock:w=!1,hideBackdrop:D=!1,keepMounted:O=!1,onBackdropClick:A,open:U,slotProps:$,slots:N}=p,q=r._objectWithoutPropertiesLoose(p,ho),j=r._extends({},p,{closeAfterTransition:y,disableAutoFocus:b,disableEnforceFocus:x,disableEscapeKeyDown:k,disablePortal:T,disableRestoreFocus:P,disableScrollLock:w,hideBackdrop:D,keepMounted:O}),{getRootProps:_,getBackdropProps:L,getTransitionProps:J,portalRef:Ve,isTopModal:ke,exited:V,hasTransition:Me}=po(r._extends({},j,{rootRef:n})),te=r._extends({},j,{exited:V}),Z=yo(te),oe={};if(g.props.tabIndex===void 0&&(oe.tabIndex="-1"),Me){const{onEnter:F,onExited:B}=J();oe.onEnter=F,oe.onExited=B}const se=(o=(i=N==null?void 0:N.root)!=null?i:v.Root)!=null?o:mo,me=(s=(a=N==null?void 0:N.backdrop)!=null?a:v.Backdrop)!=null?s:f,ge=(l=$==null?void 0:$.root)!=null?l:M.root,ie=(c=$==null?void 0:$.backdrop)!=null?c:M.backdrop,He=r.useSlotProps({elementType:se,externalSlotProps:ge,externalForwardedProps:q,getSlotProps:_,additionalProps:{ref:n,as:m},ownerState:te,className:r.clsx(h,ge==null?void 0:ge.className,Z==null?void 0:Z.root,!te.open&&te.exited&&(Z==null?void 0:Z.hidden))}),Qe=r.useSlotProps({elementType:me,externalSlotProps:ie,additionalProps:d,getSlotProps:F=>L(r._extends({},F,{onClick:B=>{A&&A(B),F!=null&&F.onClick&&F.onClick(B)}})),className:r.clsx(ie==null?void 0:ie.className,d==null?void 0:d.className,Z==null?void 0:Z.backdrop),ownerState:te});return!O&&!U&&(!Me||V)?null:u.jsx(r.Portal,{ref:Ve,container:E,disablePortal:T,children:u.jsxs(se,r._extends({},He,{children:[!D&&f?u.jsx(me,r._extends({},Qe)):null,u.jsx(Ne,{disableEnforceFocus:x,disableAutoFocus:b,disableRestoreFocus:P,isEnabled:ke,open:U,children:S.cloneElement(g,oe)})]}))})});process.env.NODE_ENV!=="production"&&(mt.propTypes={BackdropComponent:r.PropTypes.elementType,BackdropProps:r.PropTypes.object,children:r.elementAcceptingRef.isRequired,classes:r.PropTypes.object,className:r.PropTypes.string,closeAfterTransition:r.PropTypes.bool,component:r.PropTypes.elementType,components:r.PropTypes.shape({Backdrop:r.PropTypes.elementType,Root:r.PropTypes.elementType}),componentsProps:r.PropTypes.shape({backdrop:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),container:r.PropTypes.oneOfType([r.HTMLElementType,r.PropTypes.func]),disableAutoFocus:r.PropTypes.bool,disableEnforceFocus:r.PropTypes.bool,disableEscapeKeyDown:r.PropTypes.bool,disablePortal:r.PropTypes.bool,disableRestoreFocus:r.PropTypes.bool,disableScrollLock:r.PropTypes.bool,hideBackdrop:r.PropTypes.bool,keepMounted:r.PropTypes.bool,onBackdropClick:r.PropTypes.func,onClose:r.PropTypes.func,onTransitionEnter:r.PropTypes.func,onTransitionExited:r.PropTypes.func,open:r.PropTypes.bool.isRequired,slotProps:r.PropTypes.shape({backdrop:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({backdrop:r.PropTypes.elementType,root:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});const Ft=e=>{let t;return e<1?t=5.11916*Ge(e,2):t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function bo(e){return r.generateUtilityClass("MuiPaper",e)}r.generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const vo=["className","component","elevation","square","variant"],xo=e=>{const{square:t,elevation:n,variant:o,classes:i}=e,s={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${n}`]};return r.composeClasses(s,bo,i)},To=r.styled("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return r._extends({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&r._extends({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${r.alpha_1("#fff",Ft(t.elevation))}, ${r.alpha_1("#fff",Ft(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),$e=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiPaper"}),{className:i,component:s="div",elevation:a=1,square:l=!1,variant:c="elevation"}=o,p=r._objectWithoutPropertiesLoose(o,vo),f=r._extends({},o,{component:s,elevation:a,square:l,variant:c}),d=xo(f);return process.env.NODE_ENV!=="production"&&r.useTheme().shadows[a]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
|
|
4
|
-
`)),u.jsx(To,r._extends({as:s,ownerState:f,className:r.clsx(d.root,i),ref:n},p))});process.env.NODE_ENV!=="production"&&($e.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,elevation:r.chainPropTypes(r.integerPropType,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),variant:r.PropTypes.oneOfType([r.PropTypes.oneOf(["elevation","outlined"]),r.PropTypes.string])});function Po(e){return r.generateUtilityClass("MuiPopover",e)}r.generateUtilityClasses("MuiPopover",["root","paper"]);const Co=["onEntering"],Eo=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],So=["slotProps"];function Nt(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function _t(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Lt(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ie(e){return typeof e=="function"?e():e}const wo=e=>{const{classes:t}=e,n={root:["root"],paper:["paper"]};return r.composeClasses(n,Po,t)},Ro=r.styled(mt,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),gr=r.styled($e,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ze=S.forwardRef(function(t,n){var o,i,s;const a=r.useDefaultProps({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:p={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:h,className:y,container:g,elevation:E=8,marginThreshold:m=16,open:v,PaperProps:M={},slots:b,slotProps:x,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:T=r.Grow,transitionDuration:P="auto",TransitionProps:{onEntering:w}={},disableScrollLock:D=!1}=a,O=r._objectWithoutPropertiesLoose(a.TransitionProps,Co),A=r._objectWithoutPropertiesLoose(a,Eo),U=(o=x==null?void 0:x.paper)!=null?o:M,$=S.useRef(),N=r.useForkRef($,U.ref),q=r._extends({},a,{anchorOrigin:p,anchorReference:d,elevation:E,marginThreshold:m,externalPaperSlotProps:U,transformOrigin:k,TransitionComponent:T,transitionDuration:P,TransitionProps:O}),j=wo(q),_=S.useCallback(()=>{if(d==="anchorPosition")return process.env.NODE_ENV!=="production"&&(f||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),f;const F=Ie(c),B=F&&F.nodeType===1?F:r.ownerDocument($.current).body,W=B.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const re=B.getBoundingClientRect();process.env.NODE_ENV!=="test"&&re.top===0&&re.left===0&&re.right===0&&re.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
5
|
-
`))}return{top:W.top+Nt(W,p.vertical),left:W.left+_t(W,p.horizontal)}},[c,p.horizontal,p.vertical,f,d]),L=S.useCallback(F=>({vertical:Nt(F,k.vertical),horizontal:_t(F,k.horizontal)}),[k.horizontal,k.vertical]),J=S.useCallback(F=>{const B={width:F.offsetWidth,height:F.offsetHeight},W=L(B);if(d==="none")return{top:null,left:null,transformOrigin:Lt(W)};const re=_();let ae=re.top-W.vertical,le=re.left-W.horizontal;const Et=ae+B.height,St=le+B.width,wt=Ce(Ie(c)),be=wt.innerHeight-m,Rt=wt.innerWidth-m;if(m!==null&&ae<m){const K=ae-m;ae-=K,W.vertical+=K}else if(m!==null&&Et>be){const K=Et-be;ae-=K,W.vertical+=K}if(process.env.NODE_ENV!=="production"&&B.height>be&&B.height&&be&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${B.height-be}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
6
|
-
`)),m!==null&&le<m){const K=le-m;le-=K,W.horizontal+=K}else if(St>Rt){const K=St-Rt;le-=K,W.horizontal+=K}return{top:`${Math.round(ae)}px`,left:`${Math.round(le)}px`,transformOrigin:Lt(W)}},[c,d,_,L,m]),[Ve,ke]=S.useState(v),V=S.useCallback(()=>{const F=$.current;if(!F)return;const B=J(F);B.top!==null&&(F.style.top=B.top),B.left!==null&&(F.style.left=B.left),F.style.transformOrigin=B.transformOrigin,ke(!0)},[J]);S.useEffect(()=>(D&&window.addEventListener("scroll",V),()=>window.removeEventListener("scroll",V)),[c,D,V]);const Me=(F,B)=>{w&&w(F,B),V()},te=()=>{ke(!1)};S.useEffect(()=>{v&&V()}),S.useImperativeHandle(l,()=>v?{updatePosition:()=>{V()}}:null,[v,V]),S.useEffect(()=>{if(!v)return;const F=Wn(()=>{V()}),B=Ce(c);return B.addEventListener("resize",F),()=>{F.clear(),B.removeEventListener("resize",F)}},[c,v,V]);let Z=P;P==="auto"&&!T.muiSupportAuto&&(Z=void 0);const oe=g||(c?r.ownerDocument(Ie(c)).body:void 0),se=(i=b==null?void 0:b.root)!=null?i:Ro,me=(s=b==null?void 0:b.paper)!=null?s:gr,ge=r.useSlotProps({elementType:me,externalSlotProps:r._extends({},U,{style:Ve?U.style:r._extends({},U.style,{opacity:0})}),additionalProps:{elevation:E,ref:N},ownerState:q,className:r.clsx(j.paper,U==null?void 0:U.className)}),ie=r.useSlotProps({elementType:se,externalSlotProps:(x==null?void 0:x.root)||{},externalForwardedProps:A,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:oe,open:v},ownerState:q,className:r.clsx(j.root,y)}),{slotProps:He}=ie,Qe=r._objectWithoutPropertiesLoose(ie,So);return u.jsx(se,r._extends({},Qe,!r.isHostComponent(se)&&{slotProps:He,disableScrollLock:D},{children:u.jsx(T,r._extends({appear:!0,in:v,onEntering:Me,onExited:te,timeout:Z},O,{children:u.jsx(me,r._extends({},ge,{children:h}))}))}))});process.env.NODE_ENV!=="production"&&(ze.propTypes={action:r.refType,anchorEl:r.chainPropTypes(r.PropTypes.oneOfType([r.HTMLElementType,r.PropTypes.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Ie(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
7
|
-
`))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
|
|
8
|
-
`))}return null}),anchorOrigin:r.PropTypes.shape({horizontal:r.PropTypes.oneOfType([r.PropTypes.oneOf(["center","left","right"]),r.PropTypes.number]).isRequired,vertical:r.PropTypes.oneOfType([r.PropTypes.oneOf(["bottom","center","top"]),r.PropTypes.number]).isRequired}),anchorPosition:r.PropTypes.shape({left:r.PropTypes.number.isRequired,top:r.PropTypes.number.isRequired}),anchorReference:r.PropTypes.oneOf(["anchorEl","anchorPosition","none"]),children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,container:r.PropTypes.oneOfType([r.HTMLElementType,r.PropTypes.func]),disableScrollLock:r.PropTypes.bool,elevation:r.integerPropType,marginThreshold:r.PropTypes.number,onClose:r.PropTypes.func,open:r.PropTypes.bool.isRequired,PaperProps:r.PropTypes.shape({component:r.elementTypeAcceptingRef}),slotProps:r.PropTypes.shape({paper:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({paper:r.PropTypes.elementType,root:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),transformOrigin:r.PropTypes.shape({horizontal:r.PropTypes.oneOfType([r.PropTypes.oneOf(["center","left","right"]),r.PropTypes.number]).isRequired,vertical:r.PropTypes.oneOfType([r.PropTypes.oneOf(["bottom","center","top"]),r.PropTypes.number]).isRequired}),TransitionComponent:r.PropTypes.elementType,transitionDuration:r.PropTypes.oneOfType([r.PropTypes.oneOf(["auto"]),r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})]),TransitionProps:r.PropTypes.object});function ko(e){return r.generateUtilityClass("MuiMenu",e)}r.generateUtilityClasses("MuiMenu",["root","paper","list"]);const Mo=["onEntering"],Do=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Oo={vertical:"top",horizontal:"right"},Io={vertical:"top",horizontal:"left"},jo=e=>{const{classes:t}=e,n={root:["root"],paper:["paper"],list:["list"]};return r.composeClasses(n,ko,t)},Fo=r.styled(ze,{shouldForwardProp:e=>r.rootShouldForwardProp(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),No=r.styled(gr,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),_o=r.styled(ft,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ue=S.forwardRef(function(t,n){var o,i;const s=r.useDefaultProps({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:l,className:c,disableAutoFocusItem:p=!1,MenuListProps:f={},onClose:d,open:h,PaperProps:y={},PopoverClasses:g,transitionDuration:E="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:M={},slotProps:b={}}=s,x=r._objectWithoutPropertiesLoose(s.TransitionProps,Mo),k=r._objectWithoutPropertiesLoose(s,Do),T=r.useRtl(),P=r._extends({},s,{autoFocus:a,disableAutoFocusItem:p,MenuListProps:f,onEntering:m,PaperProps:y,transitionDuration:E,TransitionProps:x,variant:v}),w=jo(P),D=a&&!p&&h,O=S.useRef(null),A=(L,J)=>{O.current&&O.current.adjustStyleForScrollbar(L,{direction:T?"rtl":"ltr"}),m&&m(L,J)},U=L=>{L.key==="Tab"&&(L.preventDefault(),d&&d(L,"tabKeyDown"))};let $=-1;S.Children.map(l,(L,J)=>{S.isValidElement(L)&&(process.env.NODE_ENV!=="production"&&r.reactIsExports.isFragment(L)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
9
|
-
`)),L.props.disabled||(v==="selectedMenu"&&L.props.selected||$===-1)&&($=J))});const N=(o=M.paper)!=null?o:No,q=(i=b.paper)!=null?i:y,j=r.useSlotProps({elementType:M.root,externalSlotProps:b.root,ownerState:P,className:[w.root,c]}),_=r.useSlotProps({elementType:N,externalSlotProps:q,ownerState:P,className:w.paper});return u.jsx(Fo,r._extends({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:T?"right":"left"},transformOrigin:T?Oo:Io,slots:{paper:N,root:M.root},slotProps:{root:j,paper:_},open:h,ref:n,transitionDuration:E,TransitionProps:r._extends({onEntering:A},x),ownerState:P},k,{classes:g,children:u.jsx(_o,r._extends({onKeyDown:U,actions:O,autoFocus:a&&($===-1||p),autoFocusItem:D,variant:v},f,{className:r.clsx(w.list,f.className),children:l}))}))});process.env.NODE_ENV!=="production"&&(Ue.propTypes={anchorEl:r.PropTypes.oneOfType([r.HTMLElementType,r.PropTypes.func]),autoFocus:r.PropTypes.bool,children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,disableAutoFocusItem:r.PropTypes.bool,MenuListProps:r.PropTypes.object,onClose:r.PropTypes.func,open:r.PropTypes.bool.isRequired,PaperProps:r.PropTypes.object,PopoverClasses:r.PropTypes.object,slotProps:r.PropTypes.shape({paper:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({paper:r.PropTypes.elementType,root:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),transitionDuration:r.PropTypes.oneOfType([r.PropTypes.oneOf(["auto"]),r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})]),TransitionProps:r.PropTypes.object,variant:r.PropTypes.oneOf(["menu","selectedMenu"])});const Lo=({children:e,open:t,position:n,onClose:o})=>{const{themeSettings:i}=r.useThemeContext();return u.jsx(Ue,{MenuListProps:{dense:!0,sx:{paddingTop:0,paddingBottom:0,fontFamily:i.typography.fontFamily}},anchorReference:"anchorPosition",anchorPosition:n!=null?n:{left:0,top:0},disableEnforceFocus:!0,disableRestoreFocus:!0,open:t,onClose:o,slotProps:{paper:{sx:{borderRadius:0,border:"1px solid #bababa",boxShadow:"0 2px 4px 0 rgba(0,0,0,0.3)",fontFamily:i.typography.fontFamily}}},children:e})};function Bo(e){return r.generateUtilityClass("MuiDivider",e)}const Bt=r.generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Ao=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],$o=e=>{const{absolute:t,children:n,classes:o,flexItem:i,light:s,orientation:a,textAlign:l,variant:c}=e,p={root:["root",t&&"absolute",c,s&&"light",a==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]};return r.composeClasses(p,Bo,o)},zo=r.styled("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>r._extends({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:r.alpha_1(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>r._extends({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>r._extends({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>r._extends({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>r._extends({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Uo=r.styled("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>r._extends({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),de=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiDivider"}),{absolute:i=!1,children:s,className:a,component:l=s?"div":"hr",flexItem:c=!1,light:p=!1,orientation:f="horizontal",role:d=l!=="hr"?"separator":void 0,textAlign:h="center",variant:y="fullWidth"}=o,g=r._objectWithoutPropertiesLoose(o,Ao),E=r._extends({},o,{absolute:i,component:l,flexItem:c,light:p,orientation:f,role:d,textAlign:h,variant:y}),m=$o(E);return u.jsx(zo,r._extends({as:l,className:r.clsx(m.root,a),role:d,ref:n,ownerState:E},g,{children:s?u.jsx(Uo,{className:m.wrapper,ownerState:E,children:s}):null}))});de.muiSkipListHighlight=!0;process.env.NODE_ENV!=="production"&&(de.propTypes={absolute:r.PropTypes.bool,children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,flexItem:r.PropTypes.bool,light:r.PropTypes.bool,orientation:r.PropTypes.oneOf(["horizontal","vertical"]),role:r.PropTypes.string,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),textAlign:r.PropTypes.oneOf(["center","left","right"]),variant:r.PropTypes.oneOfType([r.PropTypes.oneOf(["fullWidth","inset","middle"]),r.PropTypes.string])});const At=r.generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]);function qo(e){return r.generateUtilityClass("MuiTypography",e)}r.generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Wo=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Vo=e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:i,variant:s,classes:a}=e,l={root:["root",s,e.align!=="inherit"&&`align${r.capitalize(t)}`,n&&"gutterBottom",o&&"noWrap",i&&"paragraph"]};return r.composeClasses(l,qo,a)},Ho=r.styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${r.capitalize(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>r._extends({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),$t={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qo={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ko=e=>Qo[e]||e,Q=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiTypography"}),i=Ko(o.color),s=r.extendSxProp(r._extends({},o,{color:i})),{align:a="inherit",className:l,component:c,gutterBottom:p=!1,noWrap:f=!1,paragraph:d=!1,variant:h="body1",variantMapping:y=$t}=s,g=r._objectWithoutPropertiesLoose(s,Wo),E=r._extends({},s,{align:a,color:i,className:l,component:c,gutterBottom:p,noWrap:f,paragraph:d,variant:h,variantMapping:y}),m=c||(d?"p":y[h]||$t[h])||"span",v=Vo(E);return u.jsx(Ho,r._extends({as:m,ref:n,ownerState:E,className:r.clsx(v.root,l)},g))});process.env.NODE_ENV!=="production"&&(Q.propTypes={align:r.PropTypes.oneOf(["center","inherit","justify","left","right"]),children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,gutterBottom:r.PropTypes.bool,noWrap:r.PropTypes.bool,paragraph:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),variant:r.PropTypes.oneOfType([r.PropTypes.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),r.PropTypes.string]),variantMapping:r.PropTypes.object});const zt=r.generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Go(e){return r.generateUtilityClass("MuiMenuItem",e)}const xe=r.generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Yo=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Xo=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Jo=e=>{const{disabled:t,dense:n,divider:o,disableGutters:i,selected:s,classes:a}=e,l={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",o&&"divider",s&&"selected"]},c=r.composeClasses(l,Go,a);return r._extends({},a,c)},Zo=r.styled(r.ButtonBase,{shouldForwardProp:e=>r.rootShouldForwardProp(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Xo})(({theme:e,ownerState:t})=>r._extends({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xe.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:r.alpha_1(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xe.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:r.alpha_1(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xe.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:r.alpha_1(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:r.alpha_1(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xe.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xe.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Bt.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Bt.inset}`]:{marginLeft:52},[`& .${zt.root}`]:{marginTop:0,marginBottom:0},[`& .${zt.inset}`]:{paddingLeft:36},[`& .${At.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&r._extends({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${At.root} svg`]:{fontSize:"1.25rem"}}))),qe=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:a=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:p,role:f="menuitem",tabIndex:d,className:h}=o,y=r._objectWithoutPropertiesLoose(o,Yo),g=S.useContext(Fe),E=S.useMemo(()=>({dense:a||g.dense||!1,disableGutters:c}),[g.dense,a,c]),m=S.useRef(null);r.useEnhancedEffect(()=>{i&&(m.current?m.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[i]);const v=r._extends({},o,{dense:E.dense,divider:l,disableGutters:c}),M=Jo(o),b=r.useForkRef(m,n);let x;return o.disabled||(x=d!==void 0?d:-1),u.jsx(Fe.Provider,{value:E,children:u.jsx(Zo,r._extends({ref:b,role:f,tabIndex:x,component:s,focusVisibleClassName:r.clsx(M.focusVisible,p),className:r.clsx(M.root,h)},y,{ownerState:v,classes:M}))})});process.env.NODE_ENV!=="production"&&(qe.propTypes={autoFocus:r.PropTypes.bool,children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,dense:r.PropTypes.bool,disabled:r.PropTypes.bool,disableGutters:r.PropTypes.bool,divider:r.PropTypes.bool,focusVisibleClassName:r.PropTypes.string,role:r.PropTypes.string,selected:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),tabIndex:r.PropTypes.number});const es=({children:e,disabled:t,style:n,className:o="",onClick:i})=>{const{themeSettings:s}=r.useThemeContext();return u.jsx("div",{className:`csdk-menu-item ${o}`,children:u.jsx(qe,{disabled:t,sx:R({width:"100%",minWidth:"170px",height:"29px",minHeight:"29px",fontFamily:s.typography.fontFamily,fontSize:"13px",paddingLeft:"30px",paddingRight:"15px",color:"#5b6372","&:hover":{backgroundColor:"#f4f4f8"}},n),onClick:i,children:u.jsx("div",{className:"csdk-menu-item-content",children:e})})})};function ts(e){return r.generateUtilityClass("MuiListSubheader",e)}r.generateUtilityClasses("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rs=["className","color","component","disableGutters","disableSticky","inset"],ns=e=>{const{classes:t,color:n,disableGutters:o,inset:i,disableSticky:s}=e,a={root:["root",n!=="default"&&`color${r.capitalize(n)}`,!o&&"gutters",i&&"inset",!s&&"sticky"]};return r.composeClasses(a,ts,t)},os=r.styled("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${r.capitalize(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>r._extends({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),gt=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiListSubheader"}),{className:i,color:s="default",component:a="li",disableGutters:l=!1,disableSticky:c=!1,inset:p=!1}=o,f=r._objectWithoutPropertiesLoose(o,rs),d=r._extends({},o,{color:s,component:a,disableGutters:l,disableSticky:c,inset:p}),h=ns(d);return u.jsx(os,r._extends({as:a,className:r.clsx(h.root,i),ref:n,ownerState:d},f))});gt.muiSkipListHighlight=!0;process.env.NODE_ENV!=="production"&&(gt.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,color:r.PropTypes.oneOf(["default","inherit","primary"]),component:r.PropTypes.elementType,disableGutters:r.PropTypes.bool,disableSticky:r.PropTypes.bool,inset:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});const ss=({children:e})=>{const{themeSettings:t}=r.useThemeContext();return u.jsx(gt,{sx:{width:"100%",minWidth:"170px",backgroundColor:"#f2f2f2",borderBottom:"1px solid #e6e6e6",height:"29px",lineHeight:"29px",fontFamily:t.typography.fontFamily,fontSize:"13px",paddingLeft:"15px",paddingRight:"15px",color:"#5b6372"},children:e})};function is({color:e="#5B6372"}){return u.jsx("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",children:u.jsx("path",{fill:e,d:"M13.34 12.5l-2.72-3.175a.5.5 0 1 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.998 3.5a.5.5 0 1 1-.76-.65l2.72-3.175z"})})}function as(e){return r.generateUtilityClass("MuiIconButton",e)}const ls=r.generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),cs=["edge","children","className","color","disabled","disableFocusRipple","size"],us=e=>{const{classes:t,disabled:n,color:o,edge:i,size:s}=e,a={root:["root",n&&"disabled",o!=="default"&&`color${r.capitalize(o)}`,i&&`edge${r.capitalize(i)}`,`size${r.capitalize(s)}`]};return r.composeClasses(a,as,t)},ds=r.styled(r.ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${r.capitalize(n.color)}`],n.edge&&t[`edge${r.capitalize(n.edge)}`],t[`size${r.capitalize(n.size)}`]]}})(({theme:e,ownerState:t})=>r._extends({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:r.alpha_1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const o=(n=(e.vars||e).palette)==null?void 0:n[t.color];return r._extends({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&r._extends({color:o==null?void 0:o.main},!t.disableRipple&&{"&:hover":r._extends({},o&&{backgroundColor:e.vars?`rgba(${o.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:r.alpha_1(o.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${ls.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),pe=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiIconButton"}),{edge:i=!1,children:s,className:a,color:l="default",disabled:c=!1,disableFocusRipple:p=!1,size:f="medium"}=o,d=r._objectWithoutPropertiesLoose(o,cs),h=r._extends({},o,{edge:i,color:l,disabled:c,disableFocusRipple:p,size:f}),y=us(h);return u.jsx(ds,r._extends({className:r.clsx(y.root,a),centerRipple:!0,focusRipple:!p,disabled:c,ref:n},d,{ownerState:h,children:s}))});process.env.NODE_ENV!=="production"&&(pe.propTypes={children:r.chainPropTypes(r.PropTypes.node,e=>S.Children.toArray(e.children).some(n=>S.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
10
|
-
`)):null),classes:r.PropTypes.object,className:r.PropTypes.string,color:r.PropTypes.oneOfType([r.PropTypes.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),r.PropTypes.string]),disabled:r.PropTypes.bool,disableFocusRipple:r.PropTypes.bool,disableRipple:r.PropTypes.bool,edge:r.PropTypes.oneOf(["end","start",!1]),size:r.PropTypes.oneOfType([r.PropTypes.oneOf(["small","medium","large"]),r.PropTypes.string]),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});const ps=r.createSvgIcon(u.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),fs=["slots","slotProps"],hs=r.styled(r.ButtonBase)(({theme:e})=>r._extends({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":r._extends({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":r._extends({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:r.emphasize_1(e.palette.grey[200],.12)}:{backgroundColor:r.emphasize_1(e.palette.grey[600],.12)})})),ys=r.styled(ps)({width:24,height:16});function br(e){const{slots:t={},slotProps:n={}}=e,o=r._objectWithoutPropertiesLoose(e,fs),i=e;return u.jsx("li",{children:u.jsx(hs,r._extends({focusRipple:!0},o,{ownerState:i,children:u.jsx(ys,r._extends({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(br.propTypes={slotProps:r.PropTypes.shape({collapsedIcon:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({CollapsedIcon:r.PropTypes.elementType}),sx:r.PropTypes.object});function ms(e){return r.generateUtilityClass("MuiBreadcrumbs",e)}const gs=r.generateUtilityClasses("MuiBreadcrumbs",["root","ol","li","separator"]),bs=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],vs=e=>{const{classes:t}=e,n={root:["root"],li:["li"],ol:["ol"],separator:["separator"]};return r.composeClasses(n,ms,t)},xs=r.styled(Q,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${gs.li}`]:t.li},t.root]})({}),Ts=r.styled("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Ps=r.styled("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Cs(e,t,n,o){return e.reduce((i,s,a)=>(a<e.length-1?i=i.concat(s,u.jsx(Ps,{"aria-hidden":!0,className:t,ownerState:o,children:n},`separator-${a}`)):i.push(s),i),[])}const vr=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiBreadcrumbs"}),{children:i,className:s,component:a="nav",slots:l={},slotProps:c={},expandText:p="Show path",itemsAfterCollapse:f=1,itemsBeforeCollapse:d=1,maxItems:h=8,separator:y="/"}=o,g=r._objectWithoutPropertiesLoose(o,bs),[E,m]=S.useState(!1),v=r._extends({},o,{component:a,expanded:E,expandText:p,itemsAfterCollapse:f,itemsBeforeCollapse:d,maxItems:h,separator:y}),M=vs(v),b=r.useSlotProps({elementType:l.CollapsedIcon,externalSlotProps:c.collapsedIcon,ownerState:v}),x=S.useRef(null),k=P=>{const w=()=>{m(!0);const D=x.current.querySelector("a[href],button,[tabindex]");D&&D.focus()};return d+f>=P.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${f}} + itemsBeforeCollapse={${d}} >= maxItems={${h}}`].join(`
|
|
11
|
-
`)),P):[...P.slice(0,d),u.jsx(br,{"aria-label":p,slots:{CollapsedIcon:l.CollapsedIcon},slotProps:{collapsedIcon:b},onClick:w},"ellipsis"),...P.slice(P.length-f,P.length)]},T=S.Children.toArray(i).filter(P=>(process.env.NODE_ENV!=="production"&&r.reactIsExports.isFragment(P)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
12
|
-
`)),S.isValidElement(P))).map((P,w)=>u.jsx("li",{className:M.li,children:P},`child-${w}`));return u.jsx(xs,r._extends({ref:n,component:a,color:"text.secondary",className:r.clsx(M.root,s),ownerState:v},g,{children:u.jsx(Ts,{className:M.ol,ref:x,ownerState:v,children:Cs(E||h&&T.length<=h?T:k(T),M.separator,y,v)})}))});process.env.NODE_ENV!=="production"&&(vr.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,expandText:r.PropTypes.string,itemsAfterCollapse:r.integerPropType,itemsBeforeCollapse:r.integerPropType,maxItems:r.integerPropType,separator:r.PropTypes.node,slotProps:r.PropTypes.shape({collapsedIcon:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({CollapsedIcon:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});function Es(e){return r.generateUtilityClass("MuiButton",e)}const Oe=r.generateUtilityClasses("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"]),xr=S.createContext({});process.env.NODE_ENV!=="production"&&(xr.displayName="ButtonGroupContext");const Tr=S.createContext(void 0);process.env.NODE_ENV!=="production"&&(Tr.displayName="ButtonGroupButtonContext");const Ss=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ws=e=>{const{color:t,disableElevation:n,fullWidth:o,size:i,variant:s,classes:a}=e,l={root:["root",s,`${s}${r.capitalize(t)}`,`size${r.capitalize(i)}`,`${s}Size${r.capitalize(i)}`,`color${r.capitalize(t)}`,n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${r.capitalize(i)}`],endIcon:["icon","endIcon",`iconSize${r.capitalize(i)}`]},c=r.composeClasses(l,Es,a);return r._extends({},a,c)},Pr=e=>r._extends({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Rs=r.styled(r.ButtonBase,{shouldForwardProp:e=>r.rootShouldForwardProp(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${r.capitalize(n.color)}`],t[`size${r.capitalize(n.size)}`],t[`${n.variant}Size${r.capitalize(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,o;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],s=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return r._extends({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":r._extends({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:r.alpha_1(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:r.alpha_1(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:r.alpha_1(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":r._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Oe.focusVisible}`]:r._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Oe.disabled}`]:r._extends({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${r.alpha_1(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(o=e.palette).getContrastText)==null?void 0:n.call(o,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Oe.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Oe.disabled}`]:{boxShadow:"none"}}),ks=r.styled("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${r.capitalize(n.size)}`]]}})(({ownerState:e})=>r._extends({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Pr(e))),Ms=r.styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${r.capitalize(n.size)}`]]}})(({ownerState:e})=>r._extends({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Pr(e))),Ee=S.forwardRef(function(t,n){const o=S.useContext(xr),i=S.useContext(Tr),s=mr(o,t),a=r.useDefaultProps({props:s,name:"MuiButton"}),{children:l,color:c="primary",component:p="button",className:f,disabled:d=!1,disableElevation:h=!1,disableFocusRipple:y=!1,endIcon:g,focusVisibleClassName:E,fullWidth:m=!1,size:v="medium",startIcon:M,type:b,variant:x="text"}=a,k=r._objectWithoutPropertiesLoose(a,Ss),T=r._extends({},a,{color:c,component:p,disabled:d,disableElevation:h,disableFocusRipple:y,fullWidth:m,size:v,type:b,variant:x}),P=ws(T),w=M&&u.jsx(ks,{className:P.startIcon,ownerState:T,children:M}),D=g&&u.jsx(Ms,{className:P.endIcon,ownerState:T,children:g}),O=i||"";return u.jsxs(Rs,r._extends({ownerState:T,className:r.clsx(o.className,P.root,f,O),component:p,disabled:d,focusRipple:!y,focusVisibleClassName:r.clsx(P.focusVisible,E),ref:n,type:b},k,{classes:P,children:[w,l,D]}))});process.env.NODE_ENV!=="production"&&(Ee.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,color:r.PropTypes.oneOfType([r.PropTypes.oneOf(["inherit","primary","secondary","success","error","info","warning"]),r.PropTypes.string]),component:r.PropTypes.elementType,disabled:r.PropTypes.bool,disableElevation:r.PropTypes.bool,disableFocusRipple:r.PropTypes.bool,disableRipple:r.PropTypes.bool,endIcon:r.PropTypes.node,focusVisibleClassName:r.PropTypes.string,fullWidth:r.PropTypes.bool,href:r.PropTypes.string,size:r.PropTypes.oneOfType([r.PropTypes.oneOf(["small","medium","large"]),r.PropTypes.string]),startIcon:r.PropTypes.node,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),type:r.PropTypes.oneOfType([r.PropTypes.oneOf(["button","reset","submit"]),r.PropTypes.string]),variant:r.PropTypes.oneOfType([r.PropTypes.oneOf(["contained","outlined","text"]),r.PropTypes.string])});function Ds(e){return r.generateUtilityClass("MuiCard",e)}r.generateUtilityClasses("MuiCard",["root"]);const Os=["className","raised"],Is=e=>{const{classes:t}=e,n={root:["root"]};return r.composeClasses(n,Ds,t)},js=r.styled($e,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Cr=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiCard"}),{className:i,raised:s=!1}=o,a=r._objectWithoutPropertiesLoose(o,Os),l=r._extends({},o,{raised:s}),c=Is(l);return u.jsx(js,r._extends({className:r.clsx(c.root,i),elevation:s?8:void 0,ref:n,ownerState:l},a))});process.env.NODE_ENV!=="production"&&(Cr.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,raised:r.chainPropTypes(r.PropTypes.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});function Fs(e){return r.generateUtilityClass("MuiCardContent",e)}r.generateUtilityClasses("MuiCardContent",["root"]);const Ns=["className","component"],_s=e=>{const{classes:t}=e,n={root:["root"]};return r.composeClasses(n,Fs,t)},Ls=r.styled("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Er=S.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiCardContent"}),{className:i,component:s="div"}=o,a=r._objectWithoutPropertiesLoose(o,Ns),l=r._extends({},o,{component:s}),c=_s(l);return u.jsx(Ls,r._extends({as:s,className:r.clsx(c.root,i),ownerState:l,ref:n},a))});process.env.NODE_ENV!=="production"&&(Er.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,component:r.PropTypes.elementType,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});const Bs=({children:e,label:t,allowOpen:n,disabled:o,style:i,className:s=""})=>{const{themeSettings:a}=r.useThemeContext(),l=C.useRef(null),c=C.useRef(null),[p,f]=C.useState(!1),d=C.useCallback(()=>{o||f(!0)},[o]),h=C.useCallback(()=>f(!1),[]),y=C.useCallback(()=>f(!0),[]),g=C.useCallback(()=>f(!1),[]),E=p&&n;return u.jsxs("div",{ref:l,className:`csdk-menu-item ${s}`,children:[u.jsx(qe,{disabled:o,sx:R({width:"100%",minWidth:"170px",height:"29px",minHeight:"29px",fontFamily:a.typography.fontFamily,fontSize:"13px",paddingLeft:"30px",paddingRight:"0px",color:"#5b6372","&:hover":{backgroundColor:"#f4f4f8"}},i),onMouseEnter:d,onMouseLeave:h,children:u.jsxs("div",{className:"csdk-menu-item-content",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t,u.jsx(is,{})]})}),u.jsx(Ue,{ref:c,style:{pointerEvents:"none"},anchorEl:l.current,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:E,autoFocus:!1,disableAutoFocus:!0,disableEnforceFocus:!0,MenuListProps:{sx:{paddingTop:0,paddingBottom:0}},slotProps:{paper:{sx:{borderRadius:0,border:"1px solid #bababa",boxShadow:"0 2px 4px 0 rgba(0,0,0,0.3)",fontFamily:a.typography.fontFamily}}},onClose:()=>{f(!1)},onMouseEnter:y,onMouseLeave:g,children:u.jsx("div",{style:{pointerEvents:"auto"},children:e})})]})},Sr=({position:e,itemSections:t,children:n,closeContextMenu:o})=>{const[i,s]=C.useState(t),a=!!e;C.useEffect(()=>{t&&s(t)},[t]);const l=C.useCallback((c,p)=>{const{sectionTitle:f,items:d=[]}=c;return u.jsxs("div",{className:"csdk-menu-section",children:[f&&u.jsx(ss,{children:f}),d.map((h,y)=>{const{subItems:g}=h;return g&&g.length?u.jsx(Bs,{label:h.caption,allowOpen:a,style:h.style,className:h.class,children:g.map(l)},y):u.jsx(es,{disabled:h.disabled,style:h.style,className:h.class,onClick:()=>{var m;o(),(m=h.onClick)==null||m.call(h)},children:h.caption},y)})]},p!=null?p:f)},[o,a]);return u.jsx(u.Fragment,{children:u.jsxs(Lo,{position:e!=null?e:null,open:a,onClose:o,children:[i==null?void 0:i.map(l),n]})})},As=({children:e,onBeforeMenuOpen:t})=>{const[n,o]=C.useState(null),i=C.useCallback(c=>{const p=t?t(c):c;p&&o(p)},[t]),s=C.useCallback(()=>{o(null)},[]),a=C.useCallback(()=>{var c;(c=n==null?void 0:n.onClose)==null||c.call(n),s()},[s,n]),l=C.useMemo(()=>({openMenu:i,closeMenu:s}),[i,s]);return u.jsxs(pt.Provider,{value:l,children:[u.jsx(Sr,{position:n==null?void 0:n.position,itemSections:n==null?void 0:n.itemSections,closeContextMenu:a}),e]})},$s=({children:e,onBeforeMenuOpen:t})=>{const n=Ae(),o=C.useCallback(a=>{const l=t?t(a):a;l&&(n==null||n.openMenu(l))},[t,n]),i=C.useCallback(()=>{n==null||n.closeMenu()},[n]),s={openMenu:o,closeMenu:i};return u.jsx(pt.Provider,{value:s,children:e})},wr=({children:e,onBeforeMenuOpen:t})=>Ae()?t?u.jsx($s,{onBeforeMenuOpen:t,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(As,{onBeforeMenuOpen:t,children:e}),zs=({shouldHaveOwnMenuRoot:e}={})=>t=>function(o){const s=!!Ae();return e&&!s?u.jsx(wr,{children:u.jsx(t,R({},o))}):u.jsx(t,R({},o))},Us=e=>t=>(t.displayName=e,t),we=e=>{const{componentName:t,shouldSkipSisenseContextWaiting:n,trackingConfig:o={},customContextErrorMessageKey:i,shouldHaveOwnMenuRoot:s}=e;return a=>r.flow(Us(t),Nn({shouldSkipSisenseContextWaiting:n,customContextErrorMessageKey:i}),Mn({componentName:t,config:o}),Fn({componentName:t}),Bn(),zs({shouldHaveOwnMenuRoot:s}))(a)};function Rr(e){return typeof e=="string"}function qs(e){var c;const t=r.useThemeContext().themeSettings,[n,o]=C.useState(r.getDefaultThemeSettings()),[i,s]=C.useState(null),a=(c=r.useSisenseContext().app)==null?void 0:c.httpClient;return C.useEffect(()=>{e&&(Rr(e)?a&&or(e,a).then(o).catch(s):o(e))},[e,a]),i?[null,i]:r.isEqual(t,n)?[t,null]:[r.merge.withOptions({mergeArrays:!1},t,n),null]}const Ws=(e,t)=>{const n=C.useRef(document.createElement("style")),[o,i]=C.useState([]),s=C.useMemo(()=>e.filter(a=>!t.includes(Ut(a))),[e,t]);return C.useEffect(()=>{if(s.length){n.current=document.createElement("style");const a=s.map(Vs);n.current.innerHTML=a.join(`
|
|
13
|
-
`),document.head.appendChild(n.current),i(s.map(Ut))}return()=>{var a;(a=n.current)==null||a.remove()}},[s]),o};function Ut(e){return`${e.fontFamily}|${e.fontWeight}|${e.fontStyle}`}function Vs(e){return`@font-face {
|
|
14
|
-
font-family: "${e.fontFamily}";
|
|
15
|
-
font-weight: ${e.fontWeight};
|
|
16
|
-
font-style: ${e.fontStyle};
|
|
17
|
-
${e.src.map(t=>`src: ${Object.entries(t).map(([n,o])=>`${n}('${o}')`).join(" ")};`).join(`
|
|
18
|
-
`)}
|
|
19
|
-
}`}const qt=C.createContext({loadedFonts:[]}),Hs=({fonts:e,children:t})=>{var s;const{loadedFonts:n}=C.useContext(qt),{themeSettings:o}=r.useThemeContext(),i=Ws(e||((s=o.typography.fontsLoader)==null?void 0:s.fonts)||[],n);return u.jsx(qt.Provider,{value:{loadedFonts:[...n,...i]},children:t})},kr=we({componentName:"ThemeProvider",trackingConfig:{skip:e=>!!e.skipTracking,transparent:!0},shouldSkipSisenseContextWaiting:!0})(e=>{const{theme:t,children:n}=e,[o,i]=qs(t);if(i)throw i;return u.jsx(u.Fragment,{children:o&&u.jsx(r.ThemeContext.Provider,{value:{themeSettings:o},children:u.jsx(Hs,{children:n})})})}),Mr=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},Qs=C.createContext(null),et={didCatch:!1,error:null};class Dr extends C.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=et}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,o,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:s,reason:"imperative-api"}),this.setState(et)}}componentDidCatch(t,n){var o,i;(o=(i=this.props).onError)===null||o===void 0||o.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:o}=this.state,{resetKeys:i}=this.props;if(o&&n.error!==null&&Ks(t.resetKeys,i)){var s,a;(s=(a=this.props).onReset)===null||s===void 0||s.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(et)}}render(){const{children:t,fallbackRender:n,FallbackComponent:o,fallback:i}=this.props,{didCatch:s,error:a}=this.state;let l=t;if(s){const c={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(c);else if(o)l=C.createElement(o,c);else if(i===null||C.isValidElement(i))l=i;else throw a}return C.createElement(Qs.Provider,{value:{didCatch:s,error:a,resetErrorBoundary:this.resetErrorBoundary}},l)}}function Ks(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,o)=>!Object.is(n,t[o]))}const Or=C.createContext(void 0),Gs=({children:e})=>{const[t,n]=C.useState([]),[o,i]=C.useState([]),s=()=>n([]),a=()=>i([]);return u.jsx(Or.Provider,{value:{errors:t,warnings:o,clearError:s,clearWarning:a,setErrors:n,setWarnings:i},children:e})},Ir=()=>{const e=C.useContext(Or);return e||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}}},Ys=e=>{const{setErrors:t,errors:n}=Ir();if(!r.isDataSource(e.dataSet))throw"error, advanced charts only works against a data model";const o=r.cloneDeep(e.dataOptions),i=r.extractTrendMeasures(o);o.value.push(...i);const s=r.extractForecastMeasures(o);o.value.push(...s);const a=C.useCallback(({error:l})=>(console.debug("Unexpected error occurred when rendering advanced chart:",l),u.jsx(r.RegularChart,R({},e))),[e,n]);return n.length===2?null:u.jsx(Dr,{fallbackRender:a,onError:l=>{t(c=>[...c,l.message])},children:u.jsx(r.RegularChart,I(R({},e),{dataOptions:o}))})},jr=we({componentName:"Chart",shouldSkipSisenseContextWaiting:Mr,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{if(Xs(e))return u.jsx(r.TableComponent,R({},e));if(Js(e))return u.jsx(Ys,R({},e));if(Fr(e))return u.jsx(r.RegularChart,R({},e));throw new r.TranslatableError("errors.chartInvalidProps")});function Xs(e){return e.chartType==="table"&&"columns"in e.dataOptions}function Fr(e){return e.chartType!=="table"}function Js(e){return!Fr(e)||!r.isCartesian(e.chartType)?!1:e.dataOptions.value.some(n=>(n==null?void 0:n.forecast)!==void 0||(n==null?void 0:n.trend)!==void 0)}var Nr=(e=>(e.None="",e.Large="30px",e.Medium="20px",e.Small="10px",e))(Nr||{}),ot=(e=>(e.None="",e.Light="0.15",e.Medium="0.3",e.Dark="0.7",e))(ot||{}),st=(e=>(e.None="",e.Large="3px 12px",e.Medium="2px 8px",e.Small="1px 4px",e))(st||{}),_r=(e=>(e.None="",e.Large="15px",e.Medium="10px",e.Small="5px",e))(_r||{});const Zs=(e,t)=>{const n=r.get(e,"shadow",t.widget.shadow),o=r.get(e,"spaceAround",t.widget.spaceAround);if(n==="None"||o==="None")return"none";if(n in ot&&o in st){const i=ot[`${n}`];return`0px ${st[`${o}`]} rgba(9, 9, 10, ${i})`}return"none"};function ei({fill:e="rgba(38, 46, 61, 0.67)"}){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:u.jsx("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function ti({title:e,description:t,errorMessages:n=[],styleOptions:o,onRefresh:i}){var v,M,b;const[s,a]=C.useState(null),{themeSettings:l}=r.useThemeContext(),{typography:{primaryTextColor:c,secondaryTextColor:p,fontFamily:f}}=l,{t:d}=r.useTranslation(),h=x=>{a(x.currentTarget)},y=()=>{a(null)},g=C.useMemo(()=>e?u.jsx(Q,{variant:"body2",style:{color:c,fontFamily:f,fontSize:13},children:e}):null,[e,c,f]),E=C.useMemo(()=>n.length===0?null:n.map(x=>u.jsxs(u.Fragment,{children:[u.jsx(de,{sx:{my:1,borderColor:p,opacity:.3,marginY:"8px"}}),u.jsxs("div",{className:"csdk-flex",children:[u.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:u.jsx(ei,{fill:"#fa5656"})}),u.jsx(Q,{variant:"body2",className:"csdk-grow-1",style:{color:p,fontFamily:f,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:x})]})]})),[n,p,f]),m=C.useMemo(()=>t?u.jsxs(u.Fragment,{children:[u.jsx(de,{sx:{my:"8px",borderColor:p,opacity:.3}}),u.jsx(Q,{variant:"body2",style:{color:p,fontFamily:f,fontSize:13},children:t})]}):null,[t,p,f]);return u.jsxs(u.Fragment,{children:[u.jsx(r.Tooltip,{title:d("widgetHeader.info.tooltip"),style:{color:(v=l.chart)==null?void 0:v.textColor,fontFamily:(M=l.typography)==null?void 0:M.fontFamily},children:u.jsx(pe,{onClick:h,sx:{p:0},children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:u.jsx("path",{fill:(o==null?void 0:o.titleTextColor)||l.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),u.jsx(ze,{open:!!s,anchorEl:s,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},slotProps:{root:{sx:{".MuiPaper-root":{boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.25)",borderRadius:0}}}},children:u.jsxs(Cr,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[u.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:r.getSlightlyDifferentColor(l.general.backgroundColor)},children:[u.jsx(Q,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:l.typography.primaryTextColor,fontFamily:l.typography.fontFamily},children:d("widgetHeader.info.details")}),u.jsx(pe,{onClick:i,sx:{p:0},children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:u.jsx("path",{fill:(b=l.chart)==null?void 0:b.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),u.jsx(de,{sx:{borderColor:l.typography.secondaryTextColor,opacity:.3}}),u.jsxs(Er,{style:{backgroundColor:l.general.backgroundColor,padding:12},children:[g,E,m]})]})})]})}const ri=({title:e,description:t,errorMessages:n=[],warningMessages:o=[],dataSetName:i,styleOptions:s,onRefresh:a})=>{var p;const{themeSettings:l}=r.useThemeContext(),c=()=>{var d;const f=u.jsx(u.Fragment,{children:u.jsx(ti,{title:i,description:t,styleOptions:s,errorMessages:n,warningMessages:o,onRefresh:a})});return s!=null&&s.renderToolbar?(d=s==null?void 0:s.renderToolbar)==null?void 0:d.call(s,a,f):f};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(s==null?void 0:s.backgroundColor)||l.widget.header.backgroundColor},children:[u.jsx("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:ni((s==null?void 0:s.titleAlignment)||l.widget.header.titleAlignment),color:(s==null?void 0:s.titleTextColor)||l.widget.header.titleTextColor,fontFamily:(p=l.typography)==null?void 0:p.fontFamily,fontSize:15},children:e||""}),u.jsx("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:c()})]}),r.get(s,"dividerLine",l.widget.header.dividerLine)&&u.jsx(de,{style:{backgroundColor:(s==null?void 0:s.dividerLineColor)||l.widget.header.dividerLineColor||"#e6e6e6"}})]})};function ni(e){return e.toLowerCase()}const Lr=e=>u.jsx(Gs,{children:u.jsx(oi,R({},e))}),oi=({dataSetName:e,styleOptions:t,title:n,description:o,topSlot:i,bottomSlot:s,children:a,onRefresh:l=()=>{}})=>{var d,h,y;const{errors:c,warnings:p}=Ir(),{themeSettings:f}=r.useThemeContext();return u.jsx("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden",children:u.jsx("div",{className:"csdk-h-full",style:{padding:_r[r.get(t,"spaceAround",f.widget.spaceAround)]||"0px"},children:u.jsxs("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:r.get(t,"border",f.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||f.widget.borderColor,borderRadius:Nr[(t==null?void 0:t.cornerRadius)||f.widget.cornerRadius]||0,boxShadow:Zs(t,f),display:"flex",flexDirection:"column"},children:[!((d=t==null?void 0:t.header)!=null&&d.hidden)&&u.jsx(ri,{title:n,description:o,dataSetName:e,errorMessages:c,warningMessages:p,styleOptions:t==null?void 0:t.header,onRefresh:l}),i,u.jsx(kr,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((h=f.chart)==null?void 0:h.backgroundColor)}},children:u.jsx("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((y=f.chart)==null?void 0:y.backgroundColor)},children:a})}),s]})})})};function bt(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function si(e,t){return t.length<2?e:r.baseGet(e,r.baseSlice(t,0,-1))}function ii(e,t){return t=r.castPath(t,e),e=si(e,t),e==null||delete e[r.toKey(bt(t))]}var ai="[object Object]",li=Function.prototype,ci=Object.prototype,Br=li.toString,ui=ci.hasOwnProperty,di=Br.call(Object);function Ar(e){if(!r.isObjectLike(e)||r.baseGetTag(e)!=ai)return!1;var t=r.getPrototype(e);if(t===null)return!0;var n=ui.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Br.call(n)==di}function pi(e){return Ar(e)?void 0:e}var fi=1,hi=2,yi=4,mi=r.flatRest(function(e,t){var n={};if(e==null)return n;var o=!1;t=r.arrayMap(t,function(s){return s=r.castPath(s,e),o||(o=s.length>1),s}),r.copyObject(e,r.getAllKeysIn(e),n),o&&(n=r.baseClone(n,fi|hi|yi,pi));for(var i=t.length;i--;)ii(n,t[i]);return n});function gi({chartType:e,dataOptions:t,enabled:n}){const[o,i]=C.useState([]),s=C.useMemo(()=>{var h;const d=r.isCartesian(e)&&((h=t.category)==null?void 0:h.length)===1||r.isScatter(e);return n&&d},[n,e,t]),a=C.useMemo(()=>{if(o.length===0)return d=>I(R({},d),{series:d.series.map(h=>I(R({},h),{data:h.data.map(y=>I(R({},y),{selected:!1}))}))});if(r.isScatter(e))return d=>I(R({},d),{series:d.series.map(h=>I(R({},h),{data:h.data.map(y=>I(R({},y),{selected:!o.some(g=>{var E,m;return g.x===y.x&&g.y===y.y&&g.size===y.z&&g.breakByPoint===((E=y.custom)==null?void 0:E.maskedBreakByPoint)&&g.breakByColor===((m=y.custom)==null?void 0:m.maskedBreakByColor)})}))}))});{const d=o.reduce((h,{categoryValue:y})=>(y&&(h[`${y}`]=!0),h),{});return h=>I(R({},h),{series:h.series.map(y=>I(R({},y),{data:y.data.map(g=>{var E,m;return d[(m=(E=g.custom)==null?void 0:E.xValue)==null?void 0:m[0]]?g:I(R({},g),{selected:!0})})}))})}},[o,e]),l=C.useMemo(()=>d=>{var h;return I(R({},d),{chart:I(R({},d.chart),{events:I(R({},(h=d.chart)==null?void 0:h.events),{click:()=>{i([])}})})})},[]),c=C.useCallback(d=>(s&&(d=a(d),d=l(d)),d),[a,l,s]),p=C.useCallback(d=>{s&&i(d)},[s]),f=C.useCallback(d=>{s&&i([d])},[s]);return{onBeforeRender:c,onDataPointsSelected:p,onDataPointClick:f}}const $r=()=>{const e=Ae();if(!e)throw new r.TranslatableError("errors.missingMenuRoot");const{openMenu:t,closeMenu:n}=e;return{openMenu:t,closeMenu:n}};function it(e){return e&&e.length?r.baseUniq(e):[]}const bi=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:n,themeProps:o})=>{const{t:i}=r.useTranslation(),s=t.name,a=r.newStyled(Ee)`
|
|
20
|
-
&& {
|
|
21
|
-
background-color: ${o.activeDrillBackgroundColor};
|
|
22
|
-
color: ${o.primaryButtonTextColor};
|
|
23
|
-
border-radius: 100%;
|
|
24
|
-
border: 2px solid white;
|
|
25
|
-
min-width: 39px;
|
|
26
|
-
width: 39px;
|
|
27
|
-
height: 39px;
|
|
28
|
-
z-index: 10;
|
|
29
|
-
padding: 7px;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
text-transform: none;
|
|
32
|
-
margin-right: -5px;
|
|
33
|
-
|
|
34
|
-
&:hover {
|
|
35
|
-
background-color: ${o.activeDrillHoverBackgroundColor};
|
|
36
|
-
color: ${o.primaryTextColor};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`,l=r.newStyled.svg`
|
|
40
|
-
width: 22px;
|
|
41
|
-
height: 22px;
|
|
42
|
-
fill: #9ea2ab;
|
|
43
|
-
`,c=()=>u.jsx(a,{theme:o,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:e,children:u.jsx(l,{width:22,height:22,viewBox:"0 0 24 24",children:u.jsx("path",{fill:"#9EA2AB",d:"M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"})})}),p=r.newStyled(Ee)`
|
|
44
|
-
&& {
|
|
45
|
-
position: relative;
|
|
46
|
-
font-family: ${d=>d.theme.fontFamily};
|
|
47
|
-
border-radius: 0;
|
|
48
|
-
border: 1px solid ${Y};
|
|
49
|
-
background-color: ${d=>d.theme.chartBackgroundColor};
|
|
50
|
-
border-right: none;
|
|
51
|
-
border-left: none;
|
|
52
|
-
color: ${d=>d.theme.secondaryTextColor};
|
|
53
|
-
padding-right: 1.25rem;
|
|
54
|
-
padding-left: 1.875rem;
|
|
55
|
-
height: 1.64rem;
|
|
56
|
-
font-size: 13px;
|
|
57
|
-
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
|
58
|
-
text-transform: none;
|
|
59
|
-
cursor: auto;
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
white-space: nowrap;
|
|
62
|
-
|
|
63
|
-
&:hover {
|
|
64
|
-
background-color: ${d=>d.theme.chartBackgroundColor};
|
|
65
|
-
border: 1px solid ${Y};
|
|
66
|
-
border-right: none;
|
|
67
|
-
border-left: none;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
`;return{CancelButton:c,CurrentDrillButton:()=>u.jsxs(p,{theme:o,children:[s," (",i("drilldown.breadcrumbsAllSuffix"),")",u.jsx("span",{className:"flex items-center justify-between",children:u.jsx("span",{className:"csdk-absolute csdk-right-[0px] csdk-top-[3px] csdk-h-[18px] csdk-w-[18px] csdk-transform csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:"transparent",borderTop:`1px solid ${Y}`,borderRight:`1px solid ${Y}`}})})]})}},vi={modifiers:[{name:"offset",options:{offset:[0,12]}}]},xi=({themeProps:e,filterDisplayValues:t,currentTable:n,currentColumn:o})=>{const{t:i}=r.useTranslation();return u.jsxs("div",{className:"csdk-w-50 csdk-px-[12px] csdk-shadow-md csdk-shadow-gray-500 csdk-rounded-md csdk-bg-white",style:{backgroundColor:e.chartBackgroundColor,color:e.primaryTextColor},children:[u.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.members")}),u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),u.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.table")}),u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]}),u.jsxs("div",{className:"csdk-p-3 csdk-pl-1",children:[u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.column")}),u.jsx(Q,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:o})]})]})},Ti=({popperParams:e,currentDimension:t,themeProps:n})=>{const o=t.expression.match(/\[(.*?)]/),[i,s]=o?o[1].split("."):["",""],a=!!e;return u.jsx(r.Popper,{open:a,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:vi,children:e&&u.jsx(xi,{themeProps:n,filterDisplayValues:e.filterDisplayValues,currentTable:i,currentColumn:s})})},Pi=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:n},general:{backgroundColor:o,brandColor:i,primaryButtonTextColor:s},chart:{backgroundColor:a}}}=r.useThemeContext(),l=r.scaleBrightness(a,-.02),c=r.scaleBrightness(l,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:n,backgroundColor:o,brandColor:i,primaryButtonTextColor:s,chartBackgroundColor:a,activeDrillBackgroundColor:l,activeDrillHoverBackgroundColor:c}},Ci=r.newStyled(pe)`
|
|
71
|
-
&& {
|
|
72
|
-
position: absolute;
|
|
73
|
-
left: 0;
|
|
74
|
-
right: auto;
|
|
75
|
-
margin: auto;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
top: 0;
|
|
78
|
-
z-index: 10;
|
|
79
|
-
background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0) 100%);
|
|
80
|
-
display: inline-flex;
|
|
81
|
-
|
|
82
|
-
span[aria-label='prev-item'] {
|
|
83
|
-
width: 0;
|
|
84
|
-
height: 0;
|
|
85
|
-
border-top: 6px solid transparent;
|
|
86
|
-
border-bottom: 6px solid transparent;
|
|
87
|
-
border-right: 5px solid #000;
|
|
88
|
-
color: transparent;
|
|
89
|
-
opacity: 0.3;
|
|
90
|
-
|
|
91
|
-
&:hover {
|
|
92
|
-
opacity: 0.8;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
`,Ei=r.newStyled(pe)`
|
|
97
|
-
&& {
|
|
98
|
-
position: absolute;
|
|
99
|
-
left: auto;
|
|
100
|
-
right: 0;
|
|
101
|
-
margin: auto;
|
|
102
|
-
bottom: 0;
|
|
103
|
-
top: 0;
|
|
104
|
-
z-index: 10;
|
|
105
|
-
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, white 70%);
|
|
106
|
-
display: inline-flex;
|
|
107
|
-
|
|
108
|
-
span[aria-label='next-item'] {
|
|
109
|
-
width: 0;
|
|
110
|
-
height: 0;
|
|
111
|
-
border-top: 6px solid transparent;
|
|
112
|
-
border-bottom: 6px solid transparent;
|
|
113
|
-
border-left: 5px solid #000;
|
|
114
|
-
color: transparent;
|
|
115
|
-
opacity: 0.3;
|
|
116
|
-
|
|
117
|
-
&:hover {
|
|
118
|
-
opacity: 0.8;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
`,Si=({currentDimension:e,children:t})=>{const{t:n}=r.useTranslation(),o=C.useRef(null),[i,s]=C.useState(0),[a,l]=C.useState(0),[c,p]=C.useState(0),f=()=>{var g;return(g=o.current)==null?void 0:g.querySelector("ol")};C.useEffect(()=>{const g=f();if(g){const E=g.clientWidth,m=g.scrollWidth,v=g.scrollLeft;s(E),l(m),p(v)}},[e]),C.useEffect(()=>{const g=f();function E(){if(g){const M=g.clientWidth;s(M)}}function m(){if(g){const M=g.scrollLeft;p(M)}}const v=new ResizeObserver(E);return g?(v.observe(g),g.addEventListener("scroll",m),()=>{v.disconnect(),g.removeEventListener("scroll",m)}):()=>{}},[]);const d=g=>{const m="smooth",v=f();v&&v.scrollBy({left:g==="right"?200:-200,behavior:m})},h=c!=0,y=Math.floor(a-c)>i;return u.jsxs("div",{style:{position:"relative"},children:[h&&u.jsx(Ci,{onClick:()=>d("left"),children:u.jsx("span",{"aria-label":"prev-item",children:n("drilldown.breadcrumbsPrev")})}),y&&u.jsx(Ei,{onClick:()=>d("right"),children:u.jsx("span",{"aria-label":"next-item",children:n("drilldown.breadcrumbsNext")})}),u.jsx("div",{ref:o,children:t})]})},Y="#F2F2F2",wi=r.newStyled(Ee)`
|
|
123
|
-
&& {
|
|
124
|
-
font-family: ${({theme:e})=>e.fontFamily};
|
|
125
|
-
position: relative;
|
|
126
|
-
border-radius: 0;
|
|
127
|
-
border: 1px solid ${Y};
|
|
128
|
-
border-right: none;
|
|
129
|
-
color: ${({active:e,theme:t})=>e==="true"?t.primaryTextColor:t.secondaryTextColor};
|
|
130
|
-
background-color: ${({active:e,theme:t})=>e==="true"?t.activeDrillBackgroundColor:t.chartBackgroundColor};
|
|
131
|
-
padding-right: 1.25rem;
|
|
132
|
-
padding-left: 1.875rem;
|
|
133
|
-
height: 1.64rem;
|
|
134
|
-
font-size: 13px;
|
|
135
|
-
text-transform: none;
|
|
136
|
-
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
|
137
|
-
white-space: nowrap;
|
|
138
|
-
cursor: ${({active:e})=>e==="true"?"pointer":"auto"};
|
|
139
|
-
margin-right: ${({active:e})=>e==="true"?"5px":"0px"};
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
background-color: ${({active:e,theme:t})=>e==="true"?t.activeDrillHoverBackgroundColor:t.chartBackgroundColor};
|
|
143
|
-
border: 1px solid ${Y};
|
|
144
|
-
border-right: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.MuiTouchRipple-root {
|
|
148
|
-
display: none;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
`,Ri=r.newStyled(vr)`
|
|
152
|
-
.MuiBreadcrumbs-ol {
|
|
153
|
-
flex-wrap: nowrap;
|
|
154
|
-
overflow: hidden;
|
|
155
|
-
}
|
|
156
|
-
.MuiBreadcrumbs-separator {
|
|
157
|
-
display: none;
|
|
158
|
-
}
|
|
159
|
-
`,ki=({isActive:e,filterDisplayValue:t,handleMouseEnter:n,handleMouseLeave:o,handleClick:i,themeProps:s,popperParams:a,index:l})=>u.jsx(wi,{theme:s,active:e.toString(),index:l,onMouseEnter:n,onMouseLeave:o,onClick:i,children:u.jsxs("span",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?u.jsx("span",{className:"csdk-absolute csdk-right-0 csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:t===(a==null?void 0:a.filterDisplayValues)?s.activeDrillHoverBackgroundColor:s.activeDrillBackgroundColor,borderTop:`1px solid ${Y}`,borderRight:`1px solid ${Y}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,u.jsx("span",{className:`csdk-absolute ${e?"csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-right-[-15px]":"csdk-h-[10px] csdk-w-[10px] csdk-top-[7px] csdk-right-[-5px]"} csdk-transform translate-x-1/2 csdk-rotate-45`,style:{backgroundColor:s.chartBackgroundColor,borderTop:`1px solid ${Y}`,borderRight:`1px solid ${Y}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),zr=we({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:n,sliceDrilldownSelections:o})=>{const[i,s]=C.useState(null),[a,l]=C.useState(!1),c=Pi(),{CancelButton:p,CurrentDrillButton:f}=bi({clearDrilldownSelections:n,currentDimension:t,isHovered:a,setIsHovered:l,themeProps:c}),d=E=>m=>{l(!0),s({filterDisplayValues:E,anchorEl:m.currentTarget})},h=()=>{l(!1),s(null)},y=E=>E<e.length-1,g=E=>E===e.length-2;return e.length?u.jsx(Si,{currentDimension:t,children:u.jsxs(Ri,{separator:null,sx:{backgroundColor:c.chartBackgroundColor,padding:"4px"},children:[u.jsx(p,{}),e.map((E,m)=>{const v=y(m),M=g(m);return u.jsx("div",{children:u.jsx(ki,{isActive:v,isLastActive:M,filterDisplayValue:E,handleMouseEnter:d(E),handleMouseLeave:h,handleClick:()=>o(m+1),themeProps:c,popperParams:i,index:m})},m)}),u.jsx(f,{}),u.jsx(Ti,{popperParams:i,currentDimension:t,themeProps:c})]})}):null}),Mi=e=>{const t=Di(e);return t.disabled=!e.disabled,t},Di=e=>{const t=r.cloneDeep(e);return Object.setPrototypeOf(t,e),t};function Oi(e,t,n){return r.members(e,[],!1,n,void 0,t)}function Ur(e){if(!r.isMembersFilter(e))throw new r.TranslatableError("errors.notAMembersFilter");const{attribute:t,guid:n,backgroundFilter:o}=e;return Oi(t,o,n)}function qr(e){return"members"in e&&e.members.length===0}function vt(e,t){return X(e.attribute,t.attribute)}function X(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function Wr(e,{onLocalStateChange:t,syncCompareFn:n=r.isEqual}={}){const[o,i]=C.useState(e);C.useEffect(()=>{i(a=>n(a,e)?a:e)},[e,n]);const s=C.useCallback(a=>{i(l=>{const c=r.isFunction(a)?a(l):a;return t==null||t(c),c})},[t]);return[o,s]}const Vr=e=>{const{initialDimension:t,onDrilldownSelectionsChange:n}=e,o=C.useMemo(()=>e.drilldownPaths||[],[e.drilldownPaths]),i=C.useMemo(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:s}=r.useTranslation();if(!t)throw new r.TranslatableError("errors.drilldownNoInitialDimension");const[a,l]=Wr(i,{onLocalStateChange:n}),c=C.useMemo(()=>[r.translateColumnToAttribute(t),...a.map(({nextDimension:m})=>m)],[t,a]),p=C.useMemo(()=>o.filter(m=>{if(r.MetadataTypes.isAttribute(m)){const b=m;return c.every(x=>!X(x,b))}const M=m;return c.every((b,x)=>X(b,M.levels[x]))}),[o,c]),f=C.useCallback((m,v,M)=>{l(b=>Hr(b,m,v,M))},[l]),d=C.useCallback(m=>{l(v=>v.slice(0,m))},[l]),h=C.useCallback(()=>{l([])},[l]),{drilldownFilters:y,drilldownFiltersDisplayValues:g,drilldownDimension:E}=C.useMemo(()=>Qr(a,t,s),[a,t,s]);return{drilldownSelections:a,availableDrilldownPaths:p,drilldownFilters:y,drilldownFiltersDisplayValues:g,drilldownDimension:E,selectDrilldown:f,sliceDrilldownSelections:d,clearDrilldownSelections:h}},Hr=(e,t,n,o)=>{var h;if(!o)return[...e,{points:t,nextDimension:n}];if(X(o.levels[0],n))return[];const s=e.findIndex(y=>X(y.nextDimension,n));if(s!==-1)return e.slice(0,s+1);const l=(h=bt(e))==null?void 0:h.nextDimension,c=e.length?o.levels.findIndex(y=>l&&X(y,l)):0,p=o.levels.indexOf(n),d=o.levels.slice(c+1,p+1).map((y,g)=>({points:g===0?t:[],nextDimension:y}));return[...e,...d]},Qr=(e,t,n)=>{let o=t&&r.translateColumnToAttribute(t);const i=[],s=[];return e.forEach(({points:a,nextDimension:l})=>{i.push(r.members(o,a.map(Ii)));const c=a.length?a.map(Kr):[`${o.name} (${n("drilldown.breadcrumbsAllSuffix")})`];s.push(c),o=l}),{drilldownFilters:i,drilldownFiltersDisplayValues:s,drilldownDimension:o}};function Kr(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function Ii(e){return"categoryValue"in e?`${e.categoryValue}`:""}var ji=Object.prototype,Fi=ji.hasOwnProperty,Ni=r.createAggregator(function(e,t,n){Fi.call(e,n)?e[n].push(t):r.baseAssignValue(e,n,[t])});function _i(e,t){return t.all?[]:e.filter(n=>{var o;return!((o=t.ids)!=null&&o.includes(n.guid))})}function Gr(e,t){return e.find(n=>X(n.attribute,t))}function Yr(e,t,n){const o=Gr(n,e);return r.members(e,t.map(i=>`${i}`),!1,o==null?void 0:o.guid,void 0,o==null?void 0:o.backgroundFilter)}function Xr(e,t){return vt(e,t)&&"members"in e&&"members"in t&&r.isEqual(e.members,t.members)}var fe=(e=>(e.DRILLDOWN_CHART_POINTS_SELECTION="drilldown-chart-points-selection",e.DRILLDOWN_DRILL_DIRECTIONS="drilldown-drill-directions",e.CROSSFILTERING_CHART_POINTS_SELECTION="crossfiltering-chart-points-selection",e))(fe||{});const Jr=2;function he(e,t){const n=e.flatMap(({entries:i={}})=>t.flatMap(s=>{const a=i[s];return a?(Array.isArray(a)?a:[a]).filter(({attribute:c})=>!!c):[]})),o=Ni(n,({id:i})=>i);return Object.values(o).map(i=>({attribute:i[0].attribute,values:it(i.map(({value:s})=>s)),displayValues:it(i.map(({displayValue:s})=>s))}))}function Li(e){return he(e,["category"])}function Bi(e){return he(e,["category"])}function Ai(e,t){const n=he(e,["category"]),o=n.length-1;return t.category.map((i,s)=>o===s?n[s]:{attribute:r.translateColumnToAttribute(i),values:[],displayValues:[]})}function $i(e){return he(e,["x","y","breakByPoint","breakByColor"])}function zi(e){return he(e,["geo"])}function Ui(e){return he(e,["geo"])}function Zr(e,t,n){return e==="plugin"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?Ai(n,t):r.isCartesian(e)||e==="pie"||e==="funnel"?Li(n):r.isBoxplot(e)?Bi(n):r.isScatter(e)?$i(n):r.isScattermap(e)?zi(n):r.isAreamap(e)?Ui(n):[]}function xt(e,t){let n=[];return e==="plugin"?n=[]:e==="text"?n=[]:e==="pivot"?n=[...t.rows||[],...t.columns||[]]:r.isCartesian(e)||r.isCategorical(e)||r.isBoxplot(e)||r.isRange(e)?n=[...t.category]:r.isScatter(e)?n=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(o=>!!(o&&!r.isMeasureColumn(o))):(r.isScattermap(e)||r.isAreamap(e))&&(n=[...t.geo]),n.map(r.translateColumnToAttribute)}function qi(e,t,n){const o=Gr(t,e.attribute);if(!o||qr(o))return null;if(Xr(e,o))return Ur(e);if(r.isMembersFilter(o)&&n){const[i,s]=r.partition(o.members,l=>e.members.includes(l));if(i.length===e.members.length&&s.length)return Yr(e.attribute,s,[o])}return null}function Wi(e,t,n){const o=t.filter(a=>!a.disabled),i=e.map(a=>qi(a,o,n)).filter(a=>!!a),s=e.length!==i.length;return{filters:s?e:i,isSelection:s}}function Vi(e,t,n=!1){const o=e.map(({attribute:s,values:a})=>Yr(s,a,t)),i=Hi(t,o);return Wi(i,t,n)}function Hi(e,t){const n=e.filter(o=>o.locked);return n.length?t.filter(o=>!n.some(i=>vt(i,o))):t}function Qi(e,t,n){const o=Zr(e,t,n).filter(({displayValues:l})=>l.length);if(o.length===0)return"";const[i]=o,s=n.length===1,a=i.displayValues.length>Jr;return o.length>1?s?o.map(l=>l.displayValues[0]).join(", "):a?"":i.displayValues.join(", "):a?i.attribute.name:i.displayValues.join(", ")}function Ki(e,t,n){const o=Qi(e,t,n);return o?{id:fe.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:o}:null}function Gi(e,t){return{items:[{caption:e,onClick:t}]}}const Yi=({initialDimension:e,drilldownPaths:t,drilldownSelections:n,openMenu:o,onDrilldownSelectionsChange:i})=>{const{t:s}=r.useTranslation(),{availableDrilldownPaths:a,drilldownFilters:l,drilldownFiltersDisplayValues:c,drilldownDimension:p,selectDrilldown:f,sliceDrilldownSelections:d,clearDrilldownSelections:h}=Vr({initialDimension:e,drilldownPaths:t,drilldownSelections:n,onDrilldownSelectionsChange:i}),y=C.useCallback((E,m)=>{const v=[en(m,p),tn(a,p,(M,b)=>{f(m,M,b)},s)];o({position:E,itemSections:v})},[p,a,s,f,o]),g=C.useMemo(()=>p&&u.jsx(zr,{filtersDisplayValues:c,currentDimension:p,clearDrilldownSelections:h,sliceDrilldownSelections:d}),[h,p,c,d]);return{drilldownDimension:p,drilldownFilters:l,breadcrumbs:g,openDrilldownMenu:y}};function en(e,t){const n=it(e.map(Kr).filter(o=>!!o));return n.length>Jr?{id:fe.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:fe.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:n.join(", ")}}function Xi(e){return 30+12*e}function tn(e,t,n,o){const[i,s]=r.partition(e,r.MetadataTypes.isAttribute.bind(r.MetadataTypes)),a=i.map(c=>({caption:c.name,onClick:()=>n(c)})),l=s.map(c=>({caption:c.title,subItems:[{items:c.levels.map((p,f)=>({caption:p.name,class:f===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${Xi(f)}px`},disabled:X(p,t),onClick:()=>n(p,c)}))}]}));return{id:fe.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:o("drilldown.drillMenuItem"),items:[...l,...a]}}function Ji(e){const{_id:t,title:n,levels:o}=e;return{id:t,title:n,levels:o.map(i=>r.createDimensionalElementFromJaql(i))}}function rn(e,t,n){return ce(this,null,function*(){const i=yield new r.RestApi(e,n).getHierarchies(t);return i==null?void 0:i.map(s=>Ji(s))})}const Zi=r.withTracking("useGetHierarchyModels")(nn);function nn(e){const t=r.useHasChanged(e,["dataSource","dimension","ids","alwaysIncluded"]),n=r.useShouldLoad(e,t),[o,i]=C.useReducer(r.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:s,app:a}=r.useSisenseContext();return C.useEffect(()=>{s||i({type:"error",error:new r.TranslatableError("errors.sisenseContextNotFound")}),n(a)&&(i({type:"loading"}),rn(a.httpClient,e,a.defaultDataSource).then(l=>{i({type:"success",data:l})}).catch(l=>{i({type:"error",error:l})}))},[a,s,e,n]),o.data&&t?Wt(r.dataLoadStateReducer(o,{type:"loading"})):Wt(o)}function Wt(e){const o=e,{data:t}=o,n=Ye(o,["data"]);return I(R({},n),{hierarchies:t})}function ea({attribute:e,dataSource:t,drilldownPaths:n=[],enabled:o}){const[i,s]=C.useMemo(()=>r.partition(n,r.isString),[n]),{hierarchies:a=[]}=nn({enabled:o,dataSource:t,dimension:e,ids:i,alwaysIncluded:!0});return C.useMemo(()=>a.length?[...a,...s]:s,[a,s])}function ta(e,t){return xt(e,t)[0]}function ra(e){return[...r.CARTESIAN_CHART_TYPES,...r.CATEGORICAL_CHART_TYPES,...r.SCATTER_CHART_TYPES,...r.BOXPLOT_CHART_TYPES,...r.RANGE_CHART_TYPES].includes(e)}function na(e,t){return xt(e,t).length===1}function oa(e,t){return na(e,t)&&ra(e)}function on(e,t,n){const o=i=>!!i&&!X(n,r.translateColumnToAttribute(i));if(r.isCartesian(e)||r.isCategorical(e)||r.isBoxplot(e)||r.isRange(e)){const i=t.category[0];if(o(i))return I(R({},t),{category:[n]})}else if(r.isScatter(e)){const i=t,s=["x","y","breakByPoint","breakByColor"];for(const a of s){const l=i[a];if(l&&!r.isMeasureColumn(l)&&o(l))return I(R({},i),{[a]:n})}}return t}function Vt(e,t,n){return e.map(o=>{const i=["x","y","breakByPoint","breakByColor"],s=[...i,"size"].some(l=>l in o),a=i.find(l=>n[l]&&!r.isMeasureColumn(n[l]));if(s){const l=t,c=l.type==="mouseup";c&&console.warn("No drilldown support for multi-selection in scatter chart");const p=c?o[a]:l.point.options.custom[r.camelCase(`{masked ${a}`)];return{categoryValue:p,categoryDisplayValue:p}}return o})}const sa=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:n,dataOptions:o,dataSource:i,drilldownOptions:s}=e,{drilldownSelections:a}=s||{},{openMenu:l}=$r(),c=C.useMemo(()=>oa(n,o),[n,o]),p=C.useMemo(()=>[...(s==null?void 0:s.drilldownPaths)||[],...(s==null?void 0:s.drilldownDimensions)||[]],[s==null?void 0:s.drilldownPaths,s==null?void 0:s.drilldownDimensions]),f=C.useMemo(()=>{const w=r.createAttribute({name:"dummy drilldown initial attribute"});return ta(n,o)||w},[n,o]),d=ea({attribute:f,dataSource:i,drilldownPaths:p,enabled:c}),h=C.useMemo(()=>{var D,O;return(((D=s==null?void 0:s.drilldownSelections)==null?void 0:D.length)||((O=s==null?void 0:s.drilldownDimensions)==null?void 0:O.length)||(d==null?void 0:d.length))&&c},[s,c,d]),{drilldownDimension:y,drilldownFilters:g,breadcrumbs:E,openDrilldownMenu:m}=Yi({initialDimension:f,drilldownSelections:a,drilldownPaths:d,openMenu:l,onDrilldownSelectionsChange:t}),v=C.useCallback((w,D)=>{const O=Vt(w,D,o);m({left:D.clientX,top:D.clientY},O)},[o,m]),M=C.useCallback((w,D)=>{const O=Vt([w],D,o);m({left:D.clientX,top:D.clientY},O)},[o,m]),b=C.useMemo(()=>on(n,o,y),[n,o,y]),x=C.useMemo(()=>g.length?r.mergeFilters(e.filters,g):e.filters,[e.filters,g]),k=C.useMemo(()=>r.combineHandlers([v,e.onDataPointsSelected]),[v,e.onDataPointsSelected]),T=C.useMemo(()=>r.combineHandlers([M,e.onDataPointContextMenu]),[M,e.onDataPointContextMenu]);return{propsWithDrilldown:R(R({},e),h&&{dataOptions:b,filters:x,onDataPointsSelected:k,onDataPointContextMenu:T}),isDrilldownEnabled:h,breadcrumbs:E}},ia=we({componentName:"ChartWidget"})(e=>{var w,D;const{app:t}=r.useSisenseContext(),{chartType:n,dataSource:o=t==null?void 0:t.defaultDataSource,dataOptions:i,styleOptions:s,highlightSelectionDisabled:a=!1,highlights:l,description:c,onChange:p}=e,{width:f,height:d}=s||{},h=r.getWidgetDefaultSize(n,{hasHeader:!((w=s==null?void 0:s.header)!=null&&w.hidden)}),[y,g]=C.useState(0),E=C.useMemo(()=>mi(s,["width","height"]),[s]),m=C.useCallback(O=>{p==null||p({drilldownOptions:{drilldownSelections:O}})},[p]),{propsWithDrilldown:v,isDrilldownEnabled:M,breadcrumbs:b}=sa({propsToExtend:e,onDrilldownSelectionsChange:m}),x=gi({chartType:n,dataOptions:i,enabled:!a&&!M&&!(l!=null&&l.length)}),k=(D=t==null?void 0:t.settings.accessibilityConfig)==null?void 0:D.enabled,T=C.useCallback(O=>{var A;return k?I(R({},O),{accessibility:I(R({},O.accessibility),{description:c!=null?c:(A=O.accessibility)==null?void 0:A.description})}):O},[c,k]);if(!n||!i)return null;const P=I(R({},v),{dataSet:o,styleOptions:E,refreshCounter:y,onDataPointClick:C.useMemo(()=>r.combineHandlers([x.onDataPointClick,e.onDataPointClick]),[x.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:v.onDataPointContextMenu,onDataPointsSelected:C.useMemo(()=>r.combineHandlers([x.onDataPointsSelected,v.onDataPointsSelected]),[x.onDataPointsSelected,v.onDataPointsSelected]),onBeforeRender:C.useMemo(()=>r.combineHandlers([T,x.onBeforeRender,e.onBeforeRender],!0),[T,x.onBeforeRender,e.onBeforeRender])});return u.jsx(r.DynamicSizeContainer,{defaultSize:h,size:{width:f,height:d},children:u.jsx(Lr,I(R({},e),{topSlot:u.jsxs(u.Fragment,{children:[e.topSlot,b]}),dataSetName:o&&r.getDataSourceName(o),onRefresh:()=>g(y+1),children:u.jsx(jr,R({},P))}))})});var tt=function(){return r.root.Date.now()},aa="Expected a function",la=Math.max,ca=Math.min;function ua(e,t,n){var o,i,s,a,l,c,p=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(aa);t=r.toNumber(t)||0,r.isObject(n)&&(f=!!n.leading,d="maxWait"in n,s=d?la(r.toNumber(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function y(T){var P=o,w=i;return o=i=void 0,p=T,a=e.apply(w,P),a}function g(T){return p=T,l=setTimeout(v,t),f?y(T):a}function E(T){var P=T-c,w=T-p,D=t-P;return d?ca(D,s-w):D}function m(T){var P=T-c,w=T-p;return c===void 0||P>=t||P<0||d&&w>=s}function v(){var T=tt();if(m(T))return M(T);l=setTimeout(v,E(T))}function M(T){return l=void 0,h&&o?y(T):(o=i=void 0,a)}function b(){l!==void 0&&clearTimeout(l),p=0,o=c=i=l=void 0}function x(){return l===void 0?a:M(tt())}function k(){var T=tt(),P=m(T);if(o=arguments,i=this,c=T,P){if(l===void 0)return g(c);if(d)return clearTimeout(l),l=setTimeout(v,t),y(c)}return l===void 0&&(l=setTimeout(v,t)),a}return k.cancel=b,k.flush=x,k}class ye{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Se=typeof window=="undefined"||"Deno"in window;function H(){}function da(e,t){return typeof e=="function"?e(t):e}function at(e){return typeof e=="number"&&e>=0&&e!==1/0}function sn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Te(e,t,n){return Re(e)?typeof t=="function"?I(R({},n),{queryKey:e,queryFn:t}):I(R({},t),{queryKey:e}):e}function pa(e,t,n){return Re(e)?I(R({},t),{mutationKey:e}):typeof e=="function"?I(R({},t),{mutationFn:e}):R({},e)}function ee(e,t,n){return Re(e)?[I(R({},t),{queryKey:e}),n]:[e||{},t]}function Ht(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:s,queryKey:a,stale:l}=e;if(Re(a)){if(o){if(t.queryHash!==Tt(a,t.options))return!1}else if(!ue(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof i!="undefined"&&i!==t.state.fetchStatus||s&&!s(t))}function Qt(e,t){const{exact:n,fetching:o,predicate:i,mutationKey:s}=e;if(Re(s)){if(!t.options.mutationKey)return!1;if(n){if(ne(t.options.mutationKey)!==ne(s))return!1}else if(!ue(t.options.mutationKey,s))return!1}return!(typeof o=="boolean"&&t.state.status==="loading"!==o||i&&!i(t))}function Tt(e,t){return((t==null?void 0:t.queryKeyHashFn)||ne)(e)}function ne(e){return JSON.stringify(e,(t,n)=>lt(n)?Object.keys(n).sort().reduce((o,i)=>(o[i]=n[i],o),{}):n)}function ue(e,t){return an(e,t)}function an(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!an(e[n],t[n])):!1}function ln(e,t){if(e===t)return e;const n=Kt(e)&&Kt(t);if(n||lt(e)&<(t)){const o=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const p=n?c:i[c];a[p]=ln(e[p],t[p]),a[p]===e[p]&&l++}return o===s&&l===o?e:a}return t}function _e(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function lt(e){if(!Gt(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const n=t.prototype;return!(!Gt(n)||!n.hasOwnProperty("isPrototypeOf"))}function Gt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Re(e){return Array.isArray(e)}function cn(e){return new Promise(t=>{setTimeout(t,e)})}function Yt(e){cn(0).then(e)}function fa(){if(typeof AbortController=="function")return new AbortController}function ct(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ln(e,t):t}class ha extends ye{constructor(){super(),this.setup=t=>{if(!Se&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Le=new ha,Xt=["online","offline"];class ya extends ye{constructor(){super(),this.setup=t=>{if(!Se&&window.addEventListener){const n=()=>t();return Xt.forEach(o=>{window.addEventListener(o,n,!1)}),()=>{Xt.forEach(o=>{window.removeEventListener(o,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(o=>{typeof o=="boolean"?this.setOnline(o):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Be=new ya;function ma(e){return Math.min(1e3*Ge(2,e),3e4)}function We(e){return(e!=null?e:"online")==="online"?Be.isOnline():!0}class un{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function je(e){return e instanceof un}function dn(e){let t=!1,n=0,o=!1,i,s,a;const l=new Promise((m,v)=>{s=m,a=v}),c=m=>{o||(y(new un(m)),e.abort==null||e.abort())},p=()=>{t=!0},f=()=>{t=!1},d=()=>!Le.isFocused()||e.networkMode!=="always"&&!Be.isOnline(),h=m=>{o||(o=!0,e.onSuccess==null||e.onSuccess(m),i==null||i(),s(m))},y=m=>{o||(o=!0,e.onError==null||e.onError(m),i==null||i(),a(m))},g=()=>new Promise(m=>{i=v=>{const M=o||!d();return M&&m(v),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,o||e.onContinue==null||e.onContinue()}),E=()=>{if(o)return;let m;try{m=e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(h).catch(v=>{var M,b;if(o)return;const x=(M=e.retry)!=null?M:3,k=(b=e.retryDelay)!=null?b:ma,T=typeof k=="function"?k(n,v):k,P=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,v);if(t||!P){y(v);return}n++,e.onFail==null||e.onFail(n,v),cn(T).then(()=>{if(d())return g()}).then(()=>{t?y(v):E()})})};return We(e.networkMode)?E():g().then(E),{promise:l,cancel:c,continue:()=>(i==null?void 0:i())?l:Promise.resolve(),cancelRetry:p,continueRetry:f}}const Pt=console;function ga(){let e=[],t=0,n=f=>{f()},o=f=>{f()};const i=f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},s=f=>{t?e.push(f):Yt(()=>{n(f)})},a=f=>(...d)=>{s(()=>{f(...d)})},l=()=>{const f=e;e=[],f.length&&Yt(()=>{o(()=>{f.forEach(d=>{n(d)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{o=f}}}const z=ga();class pn{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),at(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Se?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class ba extends pn{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Pt,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||va(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=R(R({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const o=ct(this.state.data,t,this.options);return this.dispatch({data:o,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),o}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const o=this.promise;return(n=this.retryer)==null||n.cancel(t),o?o.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!sn(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(o=>o.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(o=>o.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var o,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(g=>g.options.queryFn);y&&this.setOptions(y.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const a=fa(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(l);const p=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:p};if(c(f),(o=this.options.behavior)==null||o.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=f.fetchOptions)==null?void 0:i.meta)){var d;this.dispatch({type:"fetch",meta:(d=f.fetchOptions)==null?void 0:d.meta})}const h=y=>{if(je(y)&&y.silent||this.dispatch({type:"error",error:y}),!je(y)){var g,E,m,v;(g=(E=this.cache.config).onError)==null||g.call(E,y,this),(m=(v=this.cache.config).onSettled)==null||m.call(v,this.state.data,y,this),process.env.NODE_ENV!=="production"&&this.logger.error(y)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=dn({fn:f.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:y=>{var g,E,m,v;if(typeof y=="undefined"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),h(new Error(this.queryHash+" data is undefined"));return}this.setData(y),(g=(E=this.cache.config).onSuccess)==null||g.call(E,y,this),(m=(v=this.cache.config).onSettled)==null||m.call(v,y,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(y,g)=>{this.dispatch({type:"failed",failureCount:y,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=o=>{var i,s;switch(t.type){case"failed":return I(R({},o),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return I(R({},o),{fetchStatus:"paused"});case"continue":return I(R({},o),{fetchStatus:"fetching"});case"fetch":return R(I(R({},o),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:We(this.options.networkMode)?"fetching":"paused"}),!o.dataUpdatedAt&&{error:null,status:"loading"});case"success":return R(I(R({},o),{data:t.data,dataUpdateCount:o.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=t.error;return je(a)&&a.revert&&this.revertState?I(R({},this.revertState),{fetchStatus:"idle"}):I(R({},o),{error:a,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return I(R({},o),{isInvalidated:!0});case"setState":return R(R({},o),t.state)}};this.state=n(this.state),z.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function va(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t!="undefined",o=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?o!=null?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class xa extends ye{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,o){var i;const s=n.queryKey,a=(i=n.queryHash)!=null?i:Tt(s,n);let l=this.get(a);return l||(l=new ba({cache:this,logger:t.getLogger(),queryKey:s,queryHash:a,options:t.defaultQueryOptions(n),state:o,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(o=>o!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){z.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[o]=ee(t,n);return typeof o.exact=="undefined"&&(o.exact=!0),this.queries.find(i=>Ht(o,i))}findAll(t,n){const[o]=ee(t,n);return Object.keys(o).length>0?this.queries.filter(i=>Ht(o,i)):this.queries}notify(t){z.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){z.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){z.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Ta extends pn{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Pt,this.observers=[],this.state=t.state||fn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=R(R({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}execute(){return ce(this,null,function*(){const t=()=>{var P;return this.retryer=dn({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(w,D)=>{this.dispatch({type:"failed",failureCount:w,error:D})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(P=this.options.retry)!=null?P:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var o,i,s,a,l,c,p,f;if(!n){var d,h,y,g;this.dispatch({type:"loading",variables:this.options.variables}),yield(d=(h=this.mutationCache.config).onMutate)==null?void 0:d.call(h,this.state.variables,this);const w=yield(y=(g=this.options).onMutate)==null?void 0:y.call(g,this.state.variables);w!==this.state.context&&this.dispatch({type:"loading",context:w,variables:this.state.variables})}const P=yield t();return yield(o=(i=this.mutationCache.config).onSuccess)==null?void 0:o.call(i,P,this.state.variables,this.state.context,this),yield(s=(a=this.options).onSuccess)==null?void 0:s.call(a,P,this.state.variables,this.state.context),yield(l=(c=this.mutationCache.config).onSettled)==null?void 0:l.call(c,P,null,this.state.variables,this.state.context,this),yield(p=(f=this.options).onSettled)==null?void 0:p.call(f,P,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:P}),P}catch(P){try{var E,m,v,M,b,x,k,T;throw yield(E=(m=this.mutationCache.config).onError)==null?void 0:E.call(m,P,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(P),yield(v=(M=this.options).onError)==null?void 0:v.call(M,P,this.state.variables,this.state.context),yield(b=(x=this.mutationCache.config).onSettled)==null?void 0:b.call(x,void 0,P,this.state.variables,this.state.context,this),yield(k=(T=this.options).onSettled)==null?void 0:k.call(T,void 0,P,this.state.variables,this.state.context),P}finally{this.dispatch({type:"error",error:P})}}})}dispatch(t){const n=o=>{switch(t.type){case"failed":return I(R({},o),{failureCount:t.failureCount,failureReason:t.error});case"pause":return I(R({},o),{isPaused:!0});case"continue":return I(R({},o),{isPaused:!1});case"loading":return I(R({},o),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!We(this.options.networkMode),status:"loading",variables:t.variables});case"success":return I(R({},o),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return I(R({},o),{data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return R(R({},o),t.state)}};this.state=n(this.state),z.batch(()=>{this.observers.forEach(o=>{o.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function fn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Pa extends ye{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,o){const i=new Ta({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:o,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){z.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact=="undefined"&&(t.exact=!0),this.mutations.find(n=>Qt(t,n))}findAll(t){return this.mutations.filter(n=>Qt(t,n))}notify(t){z.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(o=>o.state.isPaused);return z.batch(()=>n.reduce((o,i)=>o.then(()=>i.continue().catch(H)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Ca(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,o,i,s,a;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,c=(o=e.fetchOptions)==null||(i=o.meta)==null?void 0:i.fetchMore,p=c==null?void 0:c.pageParam,f=(c==null?void 0:c.direction)==="forward",d=(c==null?void 0:c.direction)==="backward",h=((s=e.state.data)==null?void 0:s.pages)||[],y=((a=e.state.data)==null?void 0:a.pageParams)||[];let g=y,E=!1;const m=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var P;if((P=e.signal)!=null&&P.aborted)E=!0;else{var w;(w=e.signal)==null||w.addEventListener("abort",()=>{E=!0})}return e.signal}})},v=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),M=(T,P,w,D)=>(g=D?[P,...g]:[...g,P],D?[w,...T]:[...T,w]),b=(T,P,w,D)=>{if(E)return Promise.reject("Cancelled");if(typeof w=="undefined"&&!P&&T.length)return Promise.resolve(T);const O={queryKey:e.queryKey,pageParam:w,meta:e.options.meta};m(O);const A=v(O);return Promise.resolve(A).then($=>M(T,w,$,D))};let x;if(!h.length)x=b([]);else if(f){const T=typeof p!="undefined",P=T?p:Jt(e.options,h);x=b(h,T,P)}else if(d){const T=typeof p!="undefined",P=T?p:Ea(e.options,h);x=b(h,T,P,!0)}else{g=[];const T=typeof e.options.getNextPageParam=="undefined";x=(l&&h[0]?l(h[0],0,h):!0)?b([],T,y[0]):Promise.resolve(M([],y[0],h[0]));for(let w=1;w<h.length;w++)x=x.then(D=>{if(l&&h[w]?l(h[w],w,h):!0){const A=T?y[w]:Jt(e.options,D);return b(D,T,A)}return Promise.resolve(M(D,y[w],h[w]))})}return x.then(T=>({pages:T,pageParams:g}))}}}}function Jt(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Ea(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Sa{constructor(t={}){this.queryCache=t.queryCache||new xa,this.mutationCache=t.mutationCache||new Pa,this.logger=t.logger||Pt,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&t.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Le.subscribe(()=>{Le.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Be.subscribe(()=>{Be.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[o]=ee(t,n);return o.fetchStatus="fetching",this.queryCache.findAll(o).length}isMutating(t){return this.mutationCache.findAll(I(R({},t),{fetching:!0})).length}getQueryData(t,n){var o;return(o=this.queryCache.find(t,n))==null?void 0:o.state.data}ensureQueryData(t,n,o){const i=Te(t,n,o),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:o})=>{const i=o.data;return[n,i]})}setQueryData(t,n,o){const i=this.queryCache.find(t),s=i==null?void 0:i.state.data,a=da(n,s);if(typeof a=="undefined")return;const l=Te(t),c=this.defaultQueryOptions(l);return this.queryCache.build(this,c).setData(a,I(R({},o),{manual:!0}))}setQueriesData(t,n,o){return z.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,o)]))}getQueryState(t,n){var o;return(o=this.queryCache.find(t,n))==null?void 0:o.state}removeQueries(t,n){const[o]=ee(t,n),i=this.queryCache;z.batch(()=>{i.findAll(o).forEach(s=>{i.remove(s)})})}resetQueries(t,n,o){const[i,s]=ee(t,n,o),a=this.queryCache,l=R({type:"active"},i);return z.batch(()=>(a.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(l,s)))}cancelQueries(t,n,o){const[i,s={}]=ee(t,n,o);typeof s.revert=="undefined"&&(s.revert=!0);const a=z.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(s)));return Promise.all(a).then(H).catch(H)}invalidateQueries(t,n,o){const[i,s]=ee(t,n,o);return z.batch(()=>{var a,l;if(this.queryCache.findAll(i).forEach(p=>{p.invalidate()}),i.refetchType==="none")return Promise.resolve();const c=I(R({},i),{type:(a=(l=i.refetchType)!=null?l:i.type)!=null?a:"active"});return this.refetchQueries(c,s)})}refetchQueries(t,n,o){const[i,s]=ee(t,n,o),a=z.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var p;return c.fetch(void 0,I(R({},s),{cancelRefetch:(p=s==null?void 0:s.cancelRefetch)!=null?p:!0,meta:{refetchPage:i.refetchPage}}))}));let l=Promise.all(a).then(H);return s!=null&&s.throwOnError||(l=l.catch(H)),l}fetchQuery(t,n,o){const i=Te(t,n,o),s=this.defaultQueryOptions(i);typeof s.retry=="undefined"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(t,n,o){return this.fetchQuery(t,n,o).then(H).catch(H)}fetchInfiniteQuery(t,n,o){const i=Te(t,n,o);return i.behavior=Ca(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,o){return this.fetchInfiniteQuery(t,n,o).then(H).catch(H)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const o=this.queryDefaults.find(i=>ne(t)===ne(i.queryKey));o?o.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(o=>ue(t,o.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>ue(t,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(t)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const o=this.mutationDefaults.find(i=>ne(t)===ne(i.mutationKey));o?o.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(o=>ue(t,o.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>ue(t,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(t)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n=I(R(R(R({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!n.queryHash&&n.queryKey&&(n.queryHash=Tt(n.queryKey,n)),typeof n.refetchOnReconnect=="undefined"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary=="undefined"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:I(R(R(R({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class wa extends ye{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Zt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ut(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ut(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const o=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),process.env.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)!="undefined"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),_e(o,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();const s=this.hasListeners();s&&er(this.currentQuery,i,this.options,o)&&this.executeFetch(),this.updateResult(n),s&&(this.currentQuery!==i||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==o.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),o=this.createResult(n,t);return ka(this,o,t)&&(this.currentResult=o,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),o}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(o=>{Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(o),t[o])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(o={}){var i=o,{refetchPage:t}=i,n=Ye(i,["refetchPage"]);return this.fetch(I(R({},n),{meta:{refetchPage:t}}))}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),o=this.client.getQueryCache().build(this.client,n);return o.isFetchingOptimistic=!0,o.fetch().then(()=>this.createResult(o,n))}fetch(t){var n;return this.executeFetch(I(R({},t),{cancelRefetch:(n=t.cancelRefetch)!=null?n:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(H)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Se||this.currentResult.isStale||!at(this.options.staleTime))return;const n=sn(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Se||this.options.enabled===!1||!at(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Le.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const o=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,c=t!==o,p=c?t.state:this.currentQueryInitialState,f=c?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:h,error:y,errorUpdatedAt:g,fetchStatus:E,status:m}=d,v=!1,M=!1,b;if(n._optimisticResults){const w=this.hasListeners(),D=!w&&Zt(t,n),O=w&&er(t,o,n,i);(D||O)&&(E=We(t.options.networkMode)?"fetching":"paused",h||(m="loading")),n._optimisticResults==="isRestoring"&&(E="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&f!=null&&f.isSuccess&&m!=="error")b=f.data,h=f.dataUpdatedAt,m=f.status,v=!0;else if(n.select&&typeof d.data!="undefined")if(s&&d.data===(a==null?void 0:a.data)&&n.select===this.selectFn)b=this.selectResult;else try{this.selectFn=n.select,b=n.select(d.data),b=ct(s==null?void 0:s.data,b,n),this.selectResult=b,this.selectError=null}catch(w){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(w),this.selectError=w}else b=d.data;if(typeof n.placeholderData!="undefined"&&typeof b=="undefined"&&m==="loading"){let w;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))w=s.data;else if(w=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof w!="undefined")try{w=n.select(w),this.selectError=null}catch(D){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(D),this.selectError=D}typeof w!="undefined"&&(m="success",b=ct(s==null?void 0:s.data,w,n),M=!0)}this.selectError&&(y=this.selectError,b=this.selectResult,g=Date.now(),m="error");const x=E==="fetching",k=m==="loading",T=m==="error";return{status:m,fetchStatus:E,isLoading:k,isSuccess:m==="success",isError:T,isInitialLoading:k&&x,data:b,dataUpdatedAt:h,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:x,isRefetching:x&&!k,isLoadingError:T&&d.dataUpdatedAt===0,isPaused:E==="paused",isPlaceholderData:M,isPreviousData:v,isRefetchError:T&&d.dataUpdatedAt!==0,isStale:Ct(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,o=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,_e(o,n))return;this.currentResult=o;const i={cache:!0},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.trackedProps.size)return!0;const c=new Set(l!=null?l:this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(p=>{const f=p;return this.currentResult[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),this.notify(R(R({},i),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!je(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){z.batch(()=>{if(t.onSuccess){var n,o,i,s;(n=(o=this.options).onSuccess)==null||n.call(o,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(t.onError){var a,l,c,p;(a=(l=this.options).onError)==null||a.call(l,this.currentResult.error),(c=(p=this.options).onSettled)==null||c.call(p,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Ra(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zt(e,t){return Ra(e,t)||e.state.dataUpdatedAt>0&&ut(e,t,t.refetchOnMount)}function ut(e,t,n){if(t.enabled!==!1){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&Ct(e,t)}return!1}function er(e,t,n,o){return n.enabled!==!1&&(e!==t||o.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Ct(e,n)}function Ct(e,t){return e.isStaleByTime(t.staleTime)}function ka(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!_e(e.getCurrentResult(),t)}var dt={exports:{}},rt={};/**
|
|
160
|
-
* @license React
|
|
161
|
-
* use-sync-external-store-shim.production.min.js
|
|
162
|
-
*
|
|
163
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the MIT license found in the
|
|
166
|
-
* LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/var tr;function Ma(){if(tr)return rt;tr=1;var e=C;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function l(d,h){var y=h(),g=o({inst:{value:y,getSnapshot:h}}),E=g[0].inst,m=g[1];return s(function(){E.value=y,E.getSnapshot=h,c(E)&&m({inst:E})},[d,y,h]),i(function(){return c(E)&&m({inst:E}),d(function(){c(E)&&m({inst:E})})},[d]),a(y),y}function c(d){var h=d.getSnapshot;d=d.value;try{var y=h();return!n(d,y)}catch(g){return!0}}function p(d,h){return h()}var f=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?p:l;return rt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,rt}var nt={};/**
|
|
168
|
-
* @license React
|
|
169
|
-
* use-sync-external-store-shim.development.js
|
|
170
|
-
*
|
|
171
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the MIT license found in the
|
|
174
|
-
* LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/var rr;function Da(){return rr||(rr=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=C,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var x=arguments.length,k=new Array(x>1?x-1:0),T=1;T<x;T++)k[T-1]=arguments[T];o("error",b,k)}}function o(b,x,k){{var T=t.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(x+="%s",k=k.concat([P]));var w=k.map(function(D){return String(D)});w.unshift("Warning: "+x),Function.prototype.apply.call(console[b],console,w)}}function i(b,x){return b===x&&(b!==0||1/b===1/x)||b!==b&&x!==x}var s=typeof Object.is=="function"?Object.is:i,a=e.useState,l=e.useEffect,c=e.useLayoutEffect,p=e.useDebugValue,f=!1,d=!1;function h(b,x,k){f||e.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=x();if(!d){var P=x();s(T,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var w=a({inst:{value:T,getSnapshot:x}}),D=w[0].inst,O=w[1];return c(function(){D.value=T,D.getSnapshot=x,y(D)&&O({inst:D})},[b,T,x]),l(function(){y(D)&&O({inst:D});var A=function(){y(D)&&O({inst:D})};return b(A)},[b]),p(T),T}function y(b){var x=b.getSnapshot,k=b.value;try{var T=x();return!s(k,T)}catch(P){return!0}}function g(b,x,k){return x()}var E=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",m=!E,v=m?g:h,M=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;nt.useSyncExternalStore=M,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),nt}process.env.NODE_ENV==="production"?dt.exports=Ma():dt.exports=Da();var Oa=dt.exports;const hn=Oa.useSyncExternalStore,nr=S.createContext(void 0),yn=S.createContext(!1);function mn(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=nr),window.ReactQueryClientContext):nr)}const gn=({context:e}={})=>{const t=S.useContext(mn(e,S.useContext(yn)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ia=({client:e,children:t,context:n,contextSharing:o=!1})=>{S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&o&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=mn(n,o);return S.createElement(yn.Provider,{value:!n&&o},S.createElement(i.Provider,{value:e},t))},ja=S.createContext(!1),Fa=()=>S.useContext(ja);function Na(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const _a=S.createContext(Na()),La=()=>S.useContext(_a);function bn(e,t){return typeof e=="function"?e(...t):!!e}const Ba=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Aa=e=>{S.useEffect(()=>{e.clearReset()},[e])},$a=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&bn(n,[e.error,o]),za=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Ua=(e,t)=>e.isLoading&&e.isFetching&&!t,qa=(e,t,n)=>(e==null?void 0:e.suspense)&&Ua(t,n),Wa=(e,t,n)=>t.fetchOptimistic(e).then(({data:o})=>{e.onSuccess==null||e.onSuccess(o),e.onSettled==null||e.onSettled(o,null)}).catch(o=>{n.clearReset(),e.onError==null||e.onError(o),e.onSettled==null||e.onSettled(void 0,o)});function Va(e,t){const n=gn({context:e.context}),o=Fa(),i=La(),s=n.defaultQueryOptions(e);s._optimisticResults=o?"isRestoring":"optimistic",s.onError&&(s.onError=z.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=z.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=z.batchCalls(s.onSettled)),za(s),Ba(s,i),Aa(i);const[a]=S.useState(()=>new t(n,s)),l=a.getOptimisticResult(s);if(hn(S.useCallback(c=>{const p=o?()=>{}:a.subscribe(z.batchCalls(c));return a.updateResult(),p},[a,o]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),S.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),qa(s,l,o))throw Wa(s,a,i);if($a({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:a.trackResult(l)}function Ha(e,t,n){const o=Te(e,t,n);return Va(o,wa)}exports.Backdrop=yt;exports.Button=Ee;exports.Chart=jr;exports.ChartWidget=ia;exports.ContextMenu=Sr;exports.DrilldownBreadcrumbs=zr;exports.ErrorBoundary=dr;exports.ErrorBoundary$1=Dr;exports.ErrorBoundaryBox=ur;exports.ExclamationMarkIcon=cr;exports.Fade=ht;exports.I18nProvider=pr;exports.IconButton=pe;exports.Menu=Ue;exports.MenuIds=fe;exports.MenuItem=qe;exports.MenuList=ft;exports.MenuProvider=wr;exports.Modal=mt;exports.Paper=$e;exports.Popover=ze;exports.QueryClient=Sa;exports.QueryClientProvider=Ia;exports.Subscribable=ye;exports.ThemeProvider=kr;exports.WidgetContainer=Lr;exports.applyDrilldownDimension=on;exports.asSisenseComponent=we;exports.clearMembersFilter=Ur;exports.cloneFilterAndToggleDisabled=Mi;exports.createCommonFiltersOverSelections=Vi;exports.debounce=ua;exports.getAllowedFilters=_i;exports.getDefaultState=fn;exports.getDrilldownMenuItems=tn;exports.getHierarchyModels=rn;exports.getLegacyPalette=sr;exports.getSelectMenuItem=Gi;exports.getSelectableWidgetAttributes=xt;exports.getSelectionTitleMenuItem=en;exports.getThemeSettingsByOid=or;exports.getWidgetSelections=Zr;exports.getWidgetSelectionsTitleMenuItem=Ki;exports.haveSameAttribute=vt;exports.isEqualMembersFilters=Xr;exports.isIncludeAllFilter=qr;exports.isPlainObject=Ar;exports.isSameAttribute=X;exports.isThemeOid=Rr;exports.last=bt;exports.notifyManager=z;exports.parseMutationArgs=pa;exports.processDrilldownSelections=Qr;exports.shallowEqualObjects=_e;exports.shouldSkipSisenseContextWaiting=Mr;exports.shouldThrowError=bn;exports.updateDrilldownSelections=Hr;exports.useDrilldownCore=Vr;exports.useGetHierarchyModels=Zi;exports.useMenu=$r;exports.useQuery=Ha;exports.useQueryClient=gn;exports.useSyncExternalStore=hn;exports.useSyncedState=Wr;
|