const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ThemeContainer-1.0.63-BD63EuA0.js","./cm-1.0.63-CSIRHMXC.js","./redux-1.0.63-Df-eBzJn.js","./vendor-1.0.63-CN03Eozo.js","./lib-1.0.63-DJZPtMem.js","./loglevel-1.0.63-BZ7XahX3.js","./lodash-1.0.63-hMxolcpJ.js","./moment-1.0.63-C5S46NFB.js","./AppTheme-1.0.63-CLc-SnB5.js","./index-1.0.63-BT4mpIxR.js","./Typography-1.0.63-mecuj_Wl.js","./getThemeProps-1.0.63-5ZzcWe3G.js","./useEnhancedEffect-1.0.63-DnR0ZFqV.js","./useTableSettings-1.0.63-DOq9cogk.js","./hooks-1.0.63-CWs3kTdT.js","./useStoreFormSettings-1.0.63-CruqV90e.js","./useMetadata-1.0.63-SO3BYgAj.js","./useGlobalCode-1.0.63-DqDx9M25.js","./useAppFunctions-1.0.63-DX15IlIH.js","./ThemeProvider-1.0.63-Cq0KMgkh.js","./SharedContainer-1.0.63-BGBqroWN.js","./cmJson-1.0.63-CyZ2MfFg.js","./rehyperaw-1.0.63-AkovKNCK.js","./markdown-1.0.63-BJvkzZkj.js","./Spinner-1.0.63-zcgIyS7Z.js","./AdminTheme-1.0.63-DhJ0rrw5.js","./ActionsDml-1.0.63-nhbCczlS.js","./RestApi-1.0.63-BUfzocgq.js","./notistack-1.0.63-B49ULGrj.js","./useRemoveAppFromStore-1.0.63-DNpeLtWd.js","./Languages-1.0.63-DsTK0dJK.js","./useChartSettings-1.0.63-BMkc1WeB.js","./useLocaleUd-1.0.63-CjhlhnHj.js","./useScreenSize-1.0.63-DVLFV7fE.js","./cjs-1.0.63-4A2xol4v.js","./ButtonBase-1.0.63-CF10PFMS.js","./index-1.0.63-CrdGWoQq.js","./dayjs.min-1.0.63--tEOvUER.js","./index-1.0.63-oIDff4nA.js","./Modal-1.0.63-fMXTbfks.js","./iconBase-1.0.63-CFvHhC4t.js","./dompurify-1.0.63-DhD2mIk-.js","./useFormDetails-1.0.63-B2jPpIRk.js","./DynamicModeEnum-1.0.63-BXuL5kgA.js","./StoreTypeEnum-1.0.63-Cbd7XZ4r.js","./FallbackSpinner-1.0.63-BLl5ldYH.js","./main-1.0.63.js","./SharedContainer-1.0.63-CL-1K3JO.css"])))=>i.map(i=>d[i]);
import{_}from"./cmJson-1.0.63-CyZ2MfFg.js";import{j as m}from"./cm-1.0.63-CSIRHMXC.js";import{r as i}from"./redux-1.0.63-Df-eBzJn.js";import{a as h}from"./hooks-1.0.63-CWs3kTdT.js";import{a as x,l as S,ah as g,ai as j}from"./lib-1.0.63-DJZPtMem.js";import{F as E}from"./FallbackSpinner-1.0.63-BLl5ldYH.js";import{g as L}from"./ActionsDml-1.0.63-nhbCczlS.js";import{u as M,S as T}from"./StoreTypeEnum-1.0.63-Cbd7XZ4r.js";import"./vendor-1.0.63-CN03Eozo.js";import"./rehyperaw-1.0.63-AkovKNCK.js";import"./markdown-1.0.63-BJvkzZkj.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./Spinner-1.0.63-zcgIyS7Z.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./RestApi-1.0.63-BUfzocgq.js";const y=a=>{const{prepareAdminStore:s}=M(a,T.ADMIN),[e,d]=i.useState(!1),[n,c]=i.useState("");return{loadAdminMetaData:(o,f,D)=>{L(o,f,!1,function(t){var p,A;const r=t==null?void 0:t.data;if(S.debug("response data",o,f,r),(p=r==null?void 0:r.access)!=null&&p.select&&Array.isArray(r.access.select)&&r.access.select.includes("POST"))s(o,f,r,D===!0)&&d(!0);else{let u="Unauthorized";((A=t==null?void 0:t.data)==null?void 0:A.message)!==void 0&&(u=t.data.message),u+=" - check console for more information",console.error(u),c(u)}},t=>{console.error("error",t),c(t??x.contactSupport)})},metaDataLoaded:e,loadError:n}},P=i.lazy(()=>_(()=>import("./ThemeContainer-1.0.63-BD63EuA0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url)),C=i.lazy(()=>_(()=>import("./SharedContainer-1.0.63-BGBqroWN.js").then(a=>a.S),__vite__mapDeps([20,21,1,2,3,4,5,6,7,22,23,14,24,10,25,26,27,28,18,16,15,29,30,8,9,11,12,31,32,33,34,35,36,37,38,19,39,40,41,42,43,44,45,46,47]),import.meta.url)),Q=({dbs:a,tbl:s,appId:e,exploring:d})=>{S.debug(a,s,e);const n=h(),{loadAdminMetaData:c,metaDataLoaded:l,loadError:o}=y(e);return i.useEffect(()=>{l||c(a,s,d===!0)},[a,s]),o!==""?(n(g({error:o})),n(j()),null):l?m.jsx(i.Suspense,{fallback:m.jsx(E,{}),children:m.jsx(P,{appId:e,children:m.jsx(C,{appId:e})})}):m.jsx(E,{})};export{Q as default};
