@asaleh37/ui-base 25.12.123 → 25.12.172

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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o,GridViewColumnIcon as r,FilterPanelTrigger as n,GridFilterListIcon as a,ExportExcel as s,QuickFilterTrigger as l,QuickFilterControl as d,QuickFilterClear as c,GridActionsCellItem as p,GridExpandMoreIcon as u,DataGridPremium as h,GridRowModes as m}from"@mui/x-data-grid-premium";export{DataGridPremium}from"@mui/x-data-grid-premium";import{jsxs as f,jsx as g,Fragment as T}from"react/jsx-runtime";import{useDispatch as A,useSelector as y,Provider as I}from"react-redux";export{useDispatch,useSelector}from"react-redux";import{library as _}from"@fortawesome/fontawesome-svg-core";import{fab as E}from"@fortawesome/free-brands-svg-icons";import{far as O}from"@fortawesome/free-regular-svg-icons";import{fas as C}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as N,DialogTitle as R,DialogContent as b,DialogContentText as w,DialogActions as P,Button as v,Modal as L,Box as S,AppBar as M,Toolbar as D,Typography as k,IconButton as U,Paper as x,TextField as F,Grid2 as B,ListItemButton as q,FormControlLabel as W,Checkbox as G,Autocomplete as H,Popper as Y,Avatar as K,Tooltip as V,styled as z,Badge as Q,Divider as $,MenuItem as j,InputAdornment as Z,Accordion as J,AccordionSummary as X,AccordionDetails as ee,keyframes as te,ClickAwayListener as ie,Fade as oe,Menu as re,useTheme as ne,Backdrop as ae,CircularProgress as se,createTheme as le}from"@mui/material";export*from"@mui/material";import{ThemeContext as de,CacheProvider as ce,ThemeProvider as pe}from"@emotion/react";import*as ue from"react";import he,{useState as me,useEffect as fe,createElement as ge,useRef as Te,useMemo as Ae,useReducer as ye}from"react";import{styled as Ie,alpha as _e,useTheme as Ee}from"@mui/material/styles";import Oe from"@mui/material/CssBaseline";import Ce from"@mui/material/AppBar";import Ne from"@mui/material/Toolbar";import{FontAwesomeIcon as Re}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as be,configureStore as we}from"@reduxjs/toolkit";import{toast as Pe,ToastContainer as ve}from"react-toastify";export{toast}from"react-toastify";import Le from"axios";export{default as axios}from"axios";import Se from"i18next";import{useTranslation as Me,initReactI18next as De}from"react-i18next";export{useTranslation}from"react-i18next";import{useForm as ke}from"react-hook-form";export{useForm}from"react-hook-form";import{useNavigate as Ue,useParams as xe,Routes as Fe,Route as Be,BrowserRouter as qe}from"react-router-dom";export{useNavigate,useParams}from"react-router-dom";import{zodResolver as We}from"@hookform/resolvers/zod";export{zodResolver}from"@hookform/resolvers/zod";import*as Ge from"zod";import{z as He}from"zod";export{Ge as z};import Ye from"@mui/material/List";import Ke from"@mui/material/Card";import Ve from"@mui/material/CardHeader";import ze from"@mui/material/ListItemText";import Qe from"@mui/material/ListItemIcon";import $e from"@mui/material/Checkbox";import je from"@mui/material/Button";import Ze from"@mui/material/Divider";import{LocalizationProvider as Je,DatePicker as Xe,DateTimePicker as et}from"@mui/x-date-pickers";import{AdapterMoment as tt}from"@mui/x-date-pickers/AdapterMoment";import it from"moment";import ot from"@mui/material/CardActions";import rt from"@mui/material/CardContent";import nt from"@mui/material/CardMedia";import at from"@mui/material/Typography";export*from"@mui/lab";export*from"@mui/x-tree-view/models";import{BarChart as st,Gauge as lt,LineChart as dt}from"@mui/x-charts";import ct from"@mui/material/LinearProgress";import pt from"@mui/material/Box";import{PieChart as ut}from"@mui/x-charts/PieChart";import ht from"@mui/material/IconButton";import mt from"@mui/material/Drawer";import{animated as ft,useSpring as gt}from"@react-spring/web";import Tt from"@mui/material/Collapse";import{RichTreeView as At}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as yt}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as It}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as _t,TreeItem2Content as Et,TreeItem2IconContainer as Ot,TreeItem2Checkbox as Ct,TreeItem2Label as Nt}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Rt}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as bt}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as wt}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import Pt from"stylis-plugin-rtl";import{prefixer as vt}from"stylis";import Lt from"@emotion/cache";import St from"@emotion/styled";import{grey as Mt}from"@mui/material/colors";import Dt from"@mui/material/SwipeableDrawer";import{LicenseInfo as kt}from"@mui/x-license";!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const Ut=(e=768)=>{const[t,i]=me(window.innerWidth<e);return fe(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},xt=350,Ft=be({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Bt=Ft.actions;var qt=Ft.reducer;const Wt=be({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Gt,hideLoadingMask:Ht}=Wt.actions;var Yt=Wt.reducer;const Kt=()=>{const e=A();return{show:t=>{e(Gt(t))},hide:()=>{e(Ht())}}},Vt=be({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),zt=Vt.actions;var Qt=Vt.reducer;const $t=()=>{const e=Kt(),t=A(),i=y(e=>e.AppInfo.value.apiBaseUrl),o=Le.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),o.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN"),Pe.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(zt.setUnAuthenticated()),Pe.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))Pe.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{Pe.error(e)})}else Pe.error(e.response.data);else Pe.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return Pe.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let r=await o.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==r?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(r),r):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(r),"ERROR")}}},jt=e=>{const[t,i]=me(!1),{t:o}=Me();return{ConfirmationWindow:()=>f(N,{open:t,children:[g(R,{children:e.title}),g(b,{children:g(w,{children:e.body})}),f(P,{children:[g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{i(!1)},children:o("NO_LABEL")}),g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),i(!1)},autoFocus:!0,children:o("YES_LABEL")})]})]}),open:t,setOpen:i}},Zt=()=>{const e=y(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Jt=e=>{const[t,i]=me(!1),o=y(e=>e.AppLayout.appDirection);return{windowState:t,setWindowState:i,Window:r=>g(L,{open:t,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!t&&e?.onCloseCallBack&&e.onCloseCallBack()},children:f(S,{dir:o,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[g(M,{position:"static",children:f(D,{variant:"dense",children:[g(Re,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),g(k,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),g("div",{style:{flexGrow:1}}),g(U,{onClick:()=>{i(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:g(Re,{icon:"xmark-square"})})]})}),g(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},Xt=be({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:ei,setStoresMetaData:ti}=Xt.actions;var ii=Xt.reducer;const oi=e=>{const t=y(e=>e.commonStores.stores),i=A(),o=Zt(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:a}=$t();return{reloadData:async n=>{if(e?.commonStoreKey){const n=Object.keys(t);for(const a of n)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||o.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await r({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{i(ei({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{i(ei({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:n||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await a({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},ri=e=>{const t=A(),{handleGetRequest:i}=$t(),o=y(t=>t?.commonStores?.stores[e]);return{reload:async()=>{o&&o?.url&&await i({endPointURI:o.url,showMask:!0,successCallBkFn:i=>{t(ei({storeKey:e,data:i.data}))},failureCallBkFn:()=>{t(ei({storeKey:e,data:[]}))}})},data:o?.data,store:o}},ni=e=>{const{t:t}=Me();return g(F,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:g(T,{children:e?.label?t(e.label):""}),error:e?.error,helperText:e?.helperText?t(e.helperText):void 0})};function ai(e,t){return e.filter(e=>-1===t.indexOf(e))}function si(e,t){return e.filter(e=>-1!==t.indexOf(e))}const li=({valueField:e="id",displayField:t="name",options:i=[],selectedOptions:o=[],setSelection:r})=>{const[n,a]=ue.useState([]),[s,l]=ue.useState([]),[d,c]=ue.useState([]),[p,u]=ue.useState(""),[h,m]=ue.useState(""),T=si(n,s),A=si(n,d);ue.useEffect(()=>{i&&l([...i])},[i]),ue.useEffect(()=>{o&&c([...o])},[o]);const y=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),a(i)},I=e=>si(n,e).length,_=e=>()=>{var t,i;I(e)===e.length?a(ai(n,e)):a((t=n,i=e,[...t,...ai(i,t)]))},E=(i,o,r)=>{const a=o.filter(e=>{if(e[t]){const i=e[t];if("left"===r&&i.toLocaleLowerCase().includes(p.toLocaleLowerCase()))return!0;if("right"===r&&i.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0}return!1});return f(Ke,{sx:{height:"100%"},children:[g(Ve,{sx:{px:2,py:1},avatar:g($e,{onClick:_(a),checked:I(a)===a.length&&0!==a.length,indeterminate:I(a)!==a.length&&0!==I(a),disabled:0===a.length,inputProps:{"aria-label":"all items selected"}}),title:i,subheader:`${I(o)} / ${o.length} Selected`}),g(S,{sx:{width:"100%",padding:1},children:g(ni,{fullWidth:!0,label:"search",value:"left"===r?p:h,onChange:e=>{"left"===r?u(e.target.value):m(e.target.value)}})}),g(Ze,{}),g(Ye,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:a.map(i=>(i[e],f(q,{role:"listitem",onClick:y(i),sx:{cursor:"pointer"},children:[g(Qe,{children:g($e,{checked:-1!==n.indexOf(i),tabIndex:-1,disableRipple:!0})}),g(ze,{id:i[e],primary:i[t]})]},i[e])))})]})};return f(B,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[g(B,{sx:{height:"100%",flex:1},children:E("Available Items",s,"left")}),g(B,{children:f(B,{container:!0,direction:"column",alignItems:"center",children:[g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(e=>{let t=d.concat(T);return r(t),t}),l(ai(s,T)),a(ai(n,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{l(s.concat(A)),c(e=>{let t=ai(d,A);return r(t),t}),a(ai(n,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),g(B,{sx:{height:"100%",flex:1},children:E("Currently Selected",d,"right")})]})},di=e=>{const{t:t}=Me();return g(W,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:g(G,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:t(e.label)})},ci=e=>{const t=y(e=>e.AppLayout),[i,o]=me(e?.options||[]),r=y(t=>t?.commonStores?.stores[e?.commonStoreKey]?.data),{handleGetRequest:n}=$t();fe(()=>{e?.commonStoreKey?o(r):(async()=>{e?.storeUrl?await n({endPointURI:e.storeUrl,showMask:!1,parameters:e?.storeLoadParam,successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}}):e?.dataQueryId?await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e?.storeLoadParam},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}}):e?.options&&o(e.options)})()},[e?.storeUrl,e?.storeLoadParam,e?.dataQueryId,e?.commonStoreKey,e?.options,r]);const{t:a}=Me();return g(H,{sx:e.sx,value:(t=>{for(let o of i)if(o[e.valueField]==t)return o;return null})(e.value),options:i,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?a(t[e.displayField]):"",renderOption:(t,i)=>g("li",{...t,children:null!=i?a(i[e.displayField]):""}),slots:{popper:e=>g(Y,{...e,style:{...e.style,direction:t.appDirection}})},groupBy:e?.groupField?t=>t[e.groupField]?t[e.groupField]:"":void 0,renderInput:t=>g(F,{...t,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:a(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?a(e.errorMessage):""})})},pi="YYYY-MM-DD",ui="YYYY-MM-DD HH:mm:ss",hi="#37505C",mi="#ff6d00",fi="#ea690e",gi="#74776B",Ti=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(Xe,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||pi):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:t(e.label),format:e?.format||pi,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||pi)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ai=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(et,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||ui):null,label:t(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||ui,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||ui)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},yi=e=>{const t=y(e=>e.AppLayout),i=Zt(),[o,r]=me([]),{handleGetRequest:n}=$t();return fe(()=>{e.lookupType&&(async()=>{await n({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r([])}})})()},[e.lookupType,i.UserSession]),g(ci,{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ii=e=>({...e,type:"string",renderEditCell:e=>g(Ti,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=it(e).format(pi)),o},valueFormatter:(e,t,i)=>t[i.field]}),_i=e=>({...e,type:"string",renderEditCell:e=>g(Ai,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=it(e).format(ui)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ei=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let t=null;try{t=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return g("div",{children:null!=t?t[e.colDef.displayField]:e.value})},commonStoreKey:e?.commonStoreKey,dataQueryId:e?.dataQueryId,storeUrl:e?.storeUrl,storeLoadParam:e?.storeLoadParam,renderEditCell:e=>g(ci,{...e,sx:{width:"100%"},options:e?.colDef?.options,valueField:e?.colDef?.valueField,displayField:e?.colDef?.displayField,groupField:e?.colDef?.comboboxGroupField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Oi=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:t=>{const i=t?.value;return i===e.checkedValue||"true"===i||1===i||!0===i?g(Re,{icon:"check",color:"green"}):g(Re,{icon:"xmark",color:"red"})},renderEditCell:t=>g(di,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),Ci=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...Ci(i));return t},Ni=e=>{const t=[];for(const i of e)t.push(...Ci(i));return t},Ri=(e,t,i)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===r?.fieldType){const e=Ii({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===r?.fieldType){const e=_i({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Oi({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=Ei({...r?.gridProps?.muiProps,comboboxGroupField:r?.comboboxGroupField,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options,commonStoreKey:r?.commonStoreKey,dataQueryId:r?.dataQueryId,storeUrl:r?.storeUrl,storeLoadParam:r?.storeLoadParam,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===r?.fieldType){const e=Ei({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,lookupType:r?.lookupType,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",commonStoreKey:r?.commonStoreKey,dataQueryId:r?.dataQueryId,storeUrl:r?.storeUrl,storeLoadParam:r?.storeLoadParam,hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}return o},bi=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?Ge.boolean({required_error:"This field is required"}):Ge.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()):t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()}return t},wi=(e,t,i)=>{const o=[],r=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),r.push(e[i]);else if(e?.ids)for(const n of e.ids){const e=t.find(e=>e[i]===n);o.push(e),r.push(n)}return{selectedRecords:o,selectedRecordIds:r}};function Pi(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Li,Si={exports:{}},Mi={exports:{}},Di={};var ki,Ui,xi,Fi,Bi,qi,Wi,Gi,Hi,Yi,Ki,Vi,zi,Qi,$i,ji={};
1
+ import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o,GridViewColumnIcon as r,FilterPanelTrigger as n,GridFilterListIcon as a,ExportExcel as s,QuickFilterTrigger as l,QuickFilterControl as d,QuickFilterClear as c,GridActionsCellItem as p,GridExpandMoreIcon as u,DataGridPremium as h,GridRowModes as m}from"@mui/x-data-grid-premium";export{DataGridPremium}from"@mui/x-data-grid-premium";import{jsxs as f,jsx as g,Fragment as T}from"react/jsx-runtime";import{useDispatch as y,useSelector as A,Provider as I}from"react-redux";export{useDispatch,useSelector}from"react-redux";import{library as _}from"@fortawesome/fontawesome-svg-core";import{fab as E}from"@fortawesome/free-brands-svg-icons";import{far as O}from"@fortawesome/free-regular-svg-icons";import{fas as C}from"@fortawesome/free-solid-svg-icons";import"react-toastify/dist/ReactToastify.css";import{Dialog as N,DialogTitle as R,DialogContent as b,DialogContentText as w,DialogActions as P,Button as v,Modal as L,Box as S,AppBar as M,Toolbar as D,Typography as k,IconButton as U,Paper as x,TextField as F,Grid2 as B,ListItemButton as q,FormControlLabel as W,Checkbox as G,Autocomplete as H,Popper as Y,Avatar as K,Tooltip as V,styled as z,Badge as Q,Divider as $,MenuItem as j,InputAdornment as Z,Accordion as J,AccordionSummary as X,AccordionDetails as ee,keyframes as te,ClickAwayListener as ie,Fade as oe,Menu as re,useTheme as ne,Backdrop as ae,CircularProgress as se,createTheme as le}from"@mui/material";export*from"@mui/material";import{ThemeContext as de,CacheProvider as ce,ThemeProvider as pe}from"@emotion/react";import*as ue from"react";import he,{useState as me,useEffect as fe,createElement as ge,useRef as Te,useMemo as ye,useReducer as Ae}from"react";import{styled as Ie,alpha as _e,useTheme as Ee}from"@mui/material/styles";import Oe from"@mui/material/CssBaseline";import Ce from"@mui/material/AppBar";import Ne from"@mui/material/Toolbar";import{FontAwesomeIcon as Re}from"@fortawesome/react-fontawesome";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";import{createSlice as be,configureStore as we}from"@reduxjs/toolkit";import{toast as Pe,ToastContainer as ve}from"react-toastify";export{toast}from"react-toastify";import Le from"axios";export{default as axios}from"axios";import Se from"i18next";import{useTranslation as Me,initReactI18next as De}from"react-i18next";export{useTranslation}from"react-i18next";import{useForm as ke}from"react-hook-form";export{useForm}from"react-hook-form";import{useNavigate as Ue,useParams as xe,Routes as Fe,Route as Be,BrowserRouter as qe}from"react-router-dom";export{useNavigate,useParams}from"react-router-dom";import{zodResolver as We}from"@hookform/resolvers/zod";export{zodResolver}from"@hookform/resolvers/zod";import*as Ge from"zod";import{z as He}from"zod";export{Ge as z};import Ye from"@mui/material/List";import Ke from"@mui/material/Card";import Ve from"@mui/material/CardHeader";import ze from"@mui/material/ListItemText";import Qe from"@mui/material/ListItemIcon";import $e from"@mui/material/Checkbox";import je from"@mui/material/Button";import Ze from"@mui/material/Divider";import{LocalizationProvider as Je,DatePicker as Xe,DateTimePicker as et}from"@mui/x-date-pickers";import{AdapterMoment as tt}from"@mui/x-date-pickers/AdapterMoment";import it from"moment";import ot from"@mui/material/CardActions";import rt from"@mui/material/CardContent";import nt from"@mui/material/CardMedia";import at from"@mui/material/Typography";export*from"@mui/lab";export*from"@mui/x-tree-view/models";import{BarChart as st,Gauge as lt,LineChart as dt}from"@mui/x-charts";import ct from"@mui/material/LinearProgress";import pt from"@mui/material/Box";import{PieChart as ut}from"@mui/x-charts/PieChart";import ht from"@mui/material/IconButton";import mt from"@mui/material/Drawer";import{animated as ft,useSpring as gt}from"@react-spring/web";import Tt from"@mui/material/Collapse";import{RichTreeView as yt}from"@mui/x-tree-view/RichTreeView";import{treeItemClasses as At}from"@mui/x-tree-view/TreeItem";import{useTreeItem2 as It}from"@mui/x-tree-view/useTreeItem2";import{TreeItem2Root as _t,TreeItem2Content as Et,TreeItem2IconContainer as Ot,TreeItem2Checkbox as Ct,TreeItem2Label as Nt}from"@mui/x-tree-view/TreeItem2";import{TreeItem2Icon as Rt}from"@mui/x-tree-view/TreeItem2Icon";import{TreeItem2Provider as bt}from"@mui/x-tree-view/TreeItem2Provider";import{TreeItem2DragAndDropOverlay as wt}from"@mui/x-tree-view/TreeItem2DragAndDropOverlay";import Pt from"stylis-plugin-rtl";import{prefixer as vt}from"stylis";import Lt from"@emotion/cache";import St from"@emotion/styled";import{grey as Mt}from"@mui/material/colors";import Dt from"@mui/material/SwipeableDrawer";import{LicenseInfo as kt}from"@mui/x-license";!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const Ut=(e=768)=>{const[t,i]=me(window.innerWidth<e);return fe(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},xt=350,Ft=be({name:"AppLayout",initialState:{themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Bt=Ft.actions;var qt=Ft.reducer;const Wt=be({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Gt,hideLoadingMask:Ht}=Wt.actions;var Yt=Wt.reducer;const Kt=()=>{const e=y();return{show:t=>{e(Gt(t))},hide:()=>{e(Ht())}}},Vt=be({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),zt=Vt.actions;var Qt=Vt.reducer;const $t=()=>{const e=Kt(),t=y(),i=A(e=>e.AppInfo.value.apiBaseUrl),o=Le.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),o.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN"),Pe.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(zt.setUnAuthenticated()),Pe.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))Pe.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{Pe.error(e)})}else Pe.error(e.response.data);else Pe.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return Pe.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let r=await o.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==r?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(r),r):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(r),"ERROR")}}},jt=e=>{const[t,i]=me(!1),{t:o}=Me();return{ConfirmationWindow:()=>f(N,{open:t,children:[g(R,{children:e.title}),g(b,{children:g(w,{children:e.body})}),f(P,{children:[g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{i(!1)},children:o("NO_LABEL")}),g(v,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),i(!1)},autoFocus:!0,children:o("YES_LABEL")})]})]}),open:t,setOpen:i}},Zt=()=>{const e=A(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Jt=e=>{const[t,i]=me(!1),o=A(e=>e.AppLayout.appDirection);return{windowState:t,setWindowState:i,Window:r=>g(L,{open:t,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!t&&e?.onCloseCallBack&&e.onCloseCallBack()},children:f(S,{dir:o,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[g(M,{position:"static",children:f(D,{variant:"dense",children:[g(Re,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),g(k,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),g("div",{style:{flexGrow:1}}),g(U,{onClick:()=>{i(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:g(Re,{icon:"xmark-square"})})]})}),g(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:r?.children})]})})}},Xt=be({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:ei,setStoresMetaData:ti}=Xt.actions;var ii=Xt.reducer;const oi=e=>{const t=A(e=>e.commonStores.stores),i=y(),o=Zt(),{handleGetRequest:r,handlePostRequest:n,handleDeleteRequest:a}=$t();return{reloadData:async n=>{if(e?.commonStoreKey){const n=Object.keys(t);for(const a of n)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||o.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await r({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{i(ei({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{i(ei({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:n||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await n({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await a({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},ri=e=>{const t=y(),{handleGetRequest:i}=$t(),o=A(t=>t?.commonStores?.stores[e]);return{reload:async()=>{o&&o?.url&&await i({endPointURI:o.url,showMask:!0,successCallBkFn:i=>{t(ei({storeKey:e,data:i.data}))},failureCallBkFn:()=>{t(ei({storeKey:e,data:[]}))}})},data:o?.data,store:o}},ni=e=>{const{t:t}=Me();return g(F,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:g(T,{children:e?.label?t(e.label):""}),error:e?.error,helperText:e?.helperText?t(e.helperText):void 0})};function ai(e,t){return e.filter(e=>-1===t.indexOf(e))}function si(e,t){return e.filter(e=>-1!==t.indexOf(e))}const li=({valueField:e="id",displayField:t="name",options:i=[],selectedOptions:o=[],setSelection:r})=>{const[n,a]=ue.useState([]),[s,l]=ue.useState([]),[d,c]=ue.useState([]),[p,u]=ue.useState(""),[h,m]=ue.useState(""),T=si(n,s),y=si(n,d);ue.useEffect(()=>{i&&l([...i])},[i]),ue.useEffect(()=>{o&&c([...o])},[o]);const A=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),a(i)},I=e=>si(n,e).length,_=e=>()=>{var t,i;I(e)===e.length?a(ai(n,e)):a((t=n,i=e,[...t,...ai(i,t)]))},E=(i,o,r)=>{const a=o.filter(e=>{if(e[t]){const i=e[t];if("left"===r&&i.toLocaleLowerCase().includes(p.toLocaleLowerCase()))return!0;if("right"===r&&i.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0}return!1});return f(Ke,{sx:{height:"100%"},children:[g(Ve,{sx:{px:2,py:1},avatar:g($e,{onClick:_(a),checked:I(a)===a.length&&0!==a.length,indeterminate:I(a)!==a.length&&0!==I(a),disabled:0===a.length,inputProps:{"aria-label":"all items selected"}}),title:i,subheader:`${I(o)} / ${o.length} Selected`}),g(S,{sx:{width:"100%",padding:1},children:g(ni,{fullWidth:!0,label:"search",value:"left"===r?p:h,onChange:e=>{"left"===r?u(e.target.value):m(e.target.value)}})}),g(Ze,{}),g(Ye,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:a.map(i=>(i[e],f(q,{role:"listitem",onClick:A(i),sx:{cursor:"pointer"},children:[g(Qe,{children:g($e,{checked:-1!==n.indexOf(i),tabIndex:-1,disableRipple:!0})}),g(ze,{id:i[e],primary:i[t]})]},i[e])))})]})};return f(B,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[g(B,{sx:{height:"100%",flex:1},children:E("Available Items",s,"left")}),g(B,{children:f(B,{container:!0,direction:"column",alignItems:"center",children:[g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(e=>{let t=d.concat(T);return r(t),t}),l(ai(s,T)),a(ai(n,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),g(je,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{l(s.concat(y)),c(e=>{let t=ai(d,y);return r(t),t}),a(ai(n,y))},disabled:0===y.length,"aria-label":"move selected left",children:"<"})]})}),g(B,{sx:{height:"100%",flex:1},children:E("Currently Selected",d,"right")})]})},di=e=>{const{t:t}=Me();return g(W,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:g(G,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:t(e.label)})},ci=e=>{const t=A(e=>e.AppLayout),[i,o]=me(e?.options||[]),r=A(t=>t?.commonStores?.stores[e?.commonStoreKey]?.data),{handleGetRequest:n}=$t();fe(()=>{e?.commonStoreKey?o(r):(async()=>{e?.storeUrl?await n({endPointURI:e.storeUrl,showMask:!1,parameters:e?.storeLoadParam,successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}}):e?.dataQueryId?await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e?.storeLoadParam},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o([])}}):e?.options&&o(e.options)})()},[e?.storeUrl,e?.storeLoadParam,e?.dataQueryId,e?.commonStoreKey,e?.options,r]);const{t:a}=Me();return g(H,{sx:e.sx,value:(t=>{for(let o of i)if(o[e.valueField]==t)return o;return null})(e.value),options:i,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?a(t[e.displayField]):"",renderOption:(t,i)=>g("li",{...t,children:null!=i?a(i[e.displayField]):""}),slots:{popper:e=>g(Y,{...e,style:{...e.style,direction:t.appDirection}})},groupBy:e?.groupField?t=>t[e.groupField]?t[e.groupField]:"":void 0,renderInput:t=>g(F,{...t,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:a(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?a(e.errorMessage):""})})},pi="YYYY-MM-DD",ui="YYYY-MM-DD HH:mm:ss",hi="#37505C",mi="#ff6d00",fi="#ea690e",gi="#74776B",Ti=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(Xe,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||pi):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:t(e.label),format:e?.format||pi,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||pi)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},yi=e=>{const{t:t}=Me();return e?.hidden?g(T,{}):g(Je,{dateAdapter:tt,children:g(et,{value:null!=e.value&&void 0!==e.value&&""!==e.value?it(e.value,e?.format||ui):null,label:t(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||ui,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||ui)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?g(T,{children:t(e.errorMessage)}):g(T,{})}}})})},Ai=e=>{const t=A(e=>e.AppLayout),i=Zt(),[o,r]=me([]),{handleGetRequest:n}=$t();return fe(()=>{e.lookupType&&(async()=>{await n({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{r(e.data)},failureCallBkFn:()=>{r([])}})})()},[e.lookupType,i.UserSession]),g(ci,{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ii=e=>({...e,type:"string",renderEditCell:e=>g(Ti,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=it(e).format(pi)),o},valueFormatter:(e,t,i)=>t[i.field]}),_i=e=>({...e,type:"string",renderEditCell:e=>g(yi,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=it(e).format(ui)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ei=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let t=null;try{t=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return g("div",{children:null!=t?t[e.colDef.displayField]:e.value})},commonStoreKey:e?.commonStoreKey,dataQueryId:e?.dataQueryId,storeUrl:e?.storeUrl,storeLoadParam:e?.storeLoadParam,renderEditCell:e=>g(ci,{...e,sx:{width:"100%"},options:e?.colDef?.options,valueField:e?.colDef?.valueField,displayField:e?.colDef?.displayField,groupField:e?.colDef?.comboboxGroupField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Oi=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:t=>{const i=t?.value;return i===e.checkedValue||"true"===i||1===i||!0===i?g(Re,{icon:"check",color:"green"}):g(Re,{icon:"xmark",color:"red"})},renderEditCell:t=>g(di,{...t,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}})}),Ci=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...Ci(i));return t},Ni=e=>{const t=[];for(const i of e)t.push(...Ci(i));return t},Ri=(e,t,i)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===r?.fieldType){const e=Ii({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===r?.fieldType){const e=_i({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Oi({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=Ei({...r?.gridProps?.muiProps,comboboxGroupField:r?.comboboxGroupField,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options,commonStoreKey:r?.commonStoreKey,dataQueryId:r?.dataQueryId,storeUrl:r?.storeUrl,storeLoadParam:r?.storeLoadParam,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===r?.fieldType){const e=Ei({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,lookupType:r?.lookupType,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",commonStoreKey:r?.commonStoreKey,dataQueryId:r?.dataQueryId,storeUrl:r?.storeUrl,storeLoadParam:r?.storeLoadParam,hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}return o},bi=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?Ge.boolean({required_error:"This field is required"}):Ge.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()):t[e]=!0===i?.required?Ge.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):Ge.number().optional().nullable():t[e]=!0===i?.required?Ge.string({message:"This field is required"}).min(1,"This field is required"):Ge.string().optional().nullable()}return t},wi=(e,t,i)=>{const o=[],r=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),r.push(e[i]);else if(e?.ids)for(const n of e.ids){const e=t.find(e=>e[i]===n);o.push(e),r.push(n)}return{selectedRecords:o,selectedRecordIds:r}};function Pi(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Li,Si={exports:{}},Mi={exports:{}},Di={};var ki,Ui,xi,Fi,Bi,qi,Wi,Gi,Hi,Yi,Ki,Vi,zi,Qi,$i,ji={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,12 +6,12 @@ import{QuickFilter as e,ToolbarButton as t,Toolbar as i,ColumnsPanelTrigger as o
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Zi(){return Ui||(Ui=1,"production"===process.env.NODE_ENV?Mi.exports=function(){if(Li)return Di;Li=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case d:case o:case n:case r:case p:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return u}}case i:return u}}}function I(e){return y(e)===d}return Di.AsyncMode=l,Di.ConcurrentMode=d,Di.ContextConsumer=s,Di.ContextProvider=a,Di.Element=t,Di.ForwardRef=c,Di.Fragment=o,Di.Lazy=m,Di.Memo=h,Di.Portal=i,Di.Profiler=n,Di.StrictMode=r,Di.Suspense=p,Di.isAsyncMode=function(e){return I(e)||y(e)===l},Di.isConcurrentMode=I,Di.isContextConsumer=function(e){return y(e)===s},Di.isContextProvider=function(e){return y(e)===a},Di.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Di.isForwardRef=function(e){return y(e)===c},Di.isFragment=function(e){return y(e)===o},Di.isLazy=function(e){return y(e)===m},Di.isMemo=function(e){return y(e)===h},Di.isPortal=function(e){return y(e)===i},Di.isProfiler=function(e){return y(e)===n},Di.isStrictMode=function(e){return y(e)===r},Di.isSuspense=function(e){return y(e)===p},Di.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},Di.typeOf=y,Di}():Mi.exports=(ki||(ki=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case p:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return u}}case i:return u}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,w=h,P=i,v=n,L=r,S=p,M=!1;function D(e){return y(e)===d}ji.AsyncMode=I,ji.ConcurrentMode=_,ji.ContextConsumer=E,ji.ContextProvider=O,ji.Element=C,ji.ForwardRef=N,ji.Fragment=R,ji.Lazy=b,ji.Memo=w,ji.Portal=P,ji.Profiler=v,ji.StrictMode=L,ji.Suspense=S,ji.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||y(e)===l},ji.isConcurrentMode=D,ji.isContextConsumer=function(e){return y(e)===s},ji.isContextProvider=function(e){return y(e)===a},ji.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ji.isForwardRef=function(e){return y(e)===c},ji.isFragment=function(e){return y(e)===o},ji.isLazy=function(e){return y(e)===m},ji.isMemo=function(e){return y(e)===h},ji.isPortal=function(e){return y(e)===i},ji.isProfiler=function(e){return y(e)===n},ji.isStrictMode=function(e){return y(e)===r},ji.isSuspense=function(e){return y(e)===p},ji.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},ji.typeOf=y}()),ji)),Mi.exports}
9
+ */function Zi(){return Ui||(Ui=1,"production"===process.env.NODE_ENV?Mi.exports=function(){if(Li)return Di;Li=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function A(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case d:case o:case n:case r:case p:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return u}}case i:return u}}}function I(e){return A(e)===d}return Di.AsyncMode=l,Di.ConcurrentMode=d,Di.ContextConsumer=s,Di.ContextProvider=a,Di.Element=t,Di.ForwardRef=c,Di.Fragment=o,Di.Lazy=m,Di.Memo=h,Di.Portal=i,Di.Profiler=n,Di.StrictMode=r,Di.Suspense=p,Di.isAsyncMode=function(e){return I(e)||A(e)===l},Di.isConcurrentMode=I,Di.isContextConsumer=function(e){return A(e)===s},Di.isContextProvider=function(e){return A(e)===a},Di.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Di.isForwardRef=function(e){return A(e)===c},Di.isFragment=function(e){return A(e)===o},Di.isLazy=function(e){return A(e)===m},Di.isMemo=function(e){return A(e)===h},Di.isPortal=function(e){return A(e)===i},Di.isProfiler=function(e){return A(e)===n},Di.isStrictMode=function(e){return A(e)===r},Di.isSuspense=function(e){return A(e)===p},Di.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===y||e.$$typeof===f)},Di.typeOf=A,Di}():Mi.exports=(ki||(ki=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function A(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case p:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return u}}case i:return u}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,w=h,P=i,v=n,L=r,S=p,M=!1;function D(e){return A(e)===d}ji.AsyncMode=I,ji.ConcurrentMode=_,ji.ContextConsumer=E,ji.ContextProvider=O,ji.Element=C,ji.ForwardRef=N,ji.Fragment=R,ji.Lazy=b,ji.Memo=w,ji.Portal=P,ji.Profiler=v,ji.StrictMode=L,ji.Suspense=S,ji.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||A(e)===l},ji.isConcurrentMode=D,ji.isContextConsumer=function(e){return A(e)===s},ji.isContextProvider=function(e){return A(e)===a},ji.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ji.isForwardRef=function(e){return A(e)===c},ji.isFragment=function(e){return A(e)===o},ji.isLazy=function(e){return A(e)===m},ji.isMemo=function(e){return A(e)===h},ji.isPortal=function(e){return A(e)===i},ji.isProfiler=function(e){return A(e)===n},ji.isStrictMode=function(e){return A(e)===r},ji.isSuspense=function(e){return A(e)===p},ji.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===p||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===y||e.$$typeof===f)},ji.typeOf=A}()),ji)),Mi.exports}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function Ji(){if(Fi)return xi;Fi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return xi=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))t.call(n,d)&&(s[d]=n[d]);if(e){a=e(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s},xi}function Xi(){if(qi)return Bi;qi=1;return Bi="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function eo(){return Gi?Wi:(Gi=1,Wi=Function.call.bind(Object.prototype.hasOwnProperty))}function to(){if(Yi)return Hi;Yi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Xi(),i={},o=eo();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,n,a,s,l){if("production"!==process.env.NODE_ENV)for(var d in r)if(o(r,d)){var c;try{if("function"!=typeof r[d]){var p=Error((s||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}c=r[d](n,d,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in i)){i[c.message]=!0;var u=l?l():"";e("Failed "+a+" type: "+c.message+(null!=u?u:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Hi=r}function io(){if(Vi)return Ki;Vi=1;var e=Zi(),t=Ji(),i=Xi(),o=eo(),r=to(),n=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Ki=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",p={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(a),arrayOf:function(e){return m(function(t,o,r,n,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new h("Invalid "+n+" `"+a+"` of type `"+A(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var d=e(s,l,r,n,a+"["+l+"]",i);if(d instanceof Error)return d}return null})},element:m(function(e,t,i,o,r){var n=e[t];return s(n)?null:new h("Invalid "+o+" `"+r+"` of type `"+A(n)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:m(function(t,i,o,r,n){var a=t[i];return e.isValidElementType(a)?null:new h("Invalid "+r+" `"+n+"` of type `"+A(a)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,i,o,r,n){if(!(t[i]instanceof e)){var a=e.name||c;return new h("Invalid "+r+" `"+n+"` of type `"+(((s=t[i]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+o+"`, expected instance of `"+a+"`.")}var s;return null})},node:m(function(e,t,i,o,r){return T(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,n,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var l=t[r],d=A(l);if("object"!==d)return new h("Invalid "+a+" `"+s+"` of type `"+d+"` supplied to `"+n+"`, expected an object.");for(var c in l)if(o(l,c)){var p=e(l,c,n,a,s+"."+c,i);if(p instanceof Error)return p}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return m(function(t,i,o,r,n){for(var a=t[i],s=0;s<e.length;s++)if(u(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===y(t)?String(t):t});return new h("Invalid "+r+" `"+n+"` of value `"+String(a)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(r)+" at index "+t+"."),a}return m(function(t,r,n,a,s){for(var l=[],d=0;d<e.length;d++){var c=(0,e[d])(t,r,n,a,s,i);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+n+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,n,a){var s=t[o],l=A(s);if("object"!==l)return new h("Invalid "+n+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(r,n,a,d,y(c));var p=c(s,d,r,n,a+"."+d,i);if(p)return p}return null})},exact:function(e){return m(function(r,n,a,s,l){var d=r[n],c=A(d);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var p=t({},r[n],e);for(var u in p){var m=e[u];if(o(e,u)&&"function"!=typeof m)return g(a,s,l,u,y(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,u,a,s,l+"."+u,i);if(f)return f}return null})}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,a,s,d,p,u,m){if(d=d||c,u=u||s,m!==i){if(l){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+s;!t[g]&&o<3&&(n("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,o++)}}return null==a[s]?r?null===a[s]?new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,p,u)}var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function f(e){return m(function(t,i,o,r,n,a){var s=t[i];return A(s)!==e?new h("Invalid "+r+" `"+n+"` of type `"+y(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,i,o,r){return new h((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function T(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(T);if(null===e||s(e))return!0;var t=function(e){var t=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!T(i.value))return!1}else for(;!(i=o.next()).done;){var r=i.value;if(r&&!T(r[1]))return!1}return!0;default:return!1}}function A(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=A(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function I(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Ki}function oo(){if(Qi)return zi;Qi=1;var e=Xi();function t(){}function i(){}return i.resetWarningCache=t,zi=function(){function o(t,i,o,r,n,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var n={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:t};return n.PropTypes=n,n}}function ro(){if($i)return Si.exports;if($i=1,"production"!==process.env.NODE_ENV){var e=Zi();Si.exports=io()(e.isElement,true)}else Si.exports=oo()();return Si.exports}var no=vi(ro());var ao,so={exports:{}},lo={};function co(){if(ao)return lo;ao=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(h){if("object"==typeof h&&null!==h){var m=h.$$typeof;switch(m){case e:switch(h=h.type){case i:case r:case o:case l:case d:case u:return h;default:switch(h=h&&h.$$typeof){case a:case s:case p:case c:case n:return h;default:return m}}case t:return m}}}return lo.ContextConsumer=n,lo.ContextProvider=a,lo.Element=e,lo.ForwardRef=s,lo.Fragment=i,lo.Lazy=p,lo.Memo=c,lo.Portal=t,lo.Profiler=r,lo.StrictMode=o,lo.Suspense=l,lo.SuspenseList=d,lo.isContextConsumer=function(e){return m(e)===n},lo.isContextProvider=function(e){return m(e)===a},lo.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},lo.isForwardRef=function(e){return m(e)===s},lo.isFragment=function(e){return m(e)===i},lo.isLazy=function(e){return m(e)===p},lo.isMemo=function(e){return m(e)===c},lo.isPortal=function(e){return m(e)===t},lo.isProfiler=function(e){return m(e)===r},lo.isStrictMode=function(e){return m(e)===o},lo.isSuspense=function(e){return m(e)===l},lo.isSuspenseList=function(e){return m(e)===d},lo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===r||e===o||e===l||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},lo.typeOf=m,lo}var po,uo,ho={};
14
+ */function Ji(){if(Fi)return xi;Fi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return xi=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))t.call(n,d)&&(s[d]=n[d]);if(e){a=e(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s},xi}function Xi(){if(qi)return Bi;qi=1;return Bi="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function eo(){return Gi?Wi:(Gi=1,Wi=Function.call.bind(Object.prototype.hasOwnProperty))}function to(){if(Yi)return Hi;Yi=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Xi(),i={},o=eo();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,n,a,s,l){if("production"!==process.env.NODE_ENV)for(var d in r)if(o(r,d)){var c;try{if("function"!=typeof r[d]){var p=Error((s||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}c=r[d](n,d,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in i)){i[c.message]=!0;var u=l?l():"";e("Failed "+a+" type: "+c.message+(null!=u?u:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Hi=r}function io(){if(Vi)return Ki;Vi=1;var e=Zi(),t=Ji(),i=Xi(),o=eo(),r=to(),n=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Ki=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",p={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(a),arrayOf:function(e){return m(function(t,o,r,n,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new h("Invalid "+n+" `"+a+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var d=e(s,l,r,n,a+"["+l+"]",i);if(d instanceof Error)return d}return null})},element:m(function(e,t,i,o,r){var n=e[t];return s(n)?null:new h("Invalid "+o+" `"+r+"` of type `"+y(n)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:m(function(t,i,o,r,n){var a=t[i];return e.isValidElementType(a)?null:new h("Invalid "+r+" `"+n+"` of type `"+y(a)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,i,o,r,n){if(!(t[i]instanceof e)){var a=e.name||c;return new h("Invalid "+r+" `"+n+"` of type `"+(((s=t[i]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+o+"`, expected instance of `"+a+"`.")}var s;return null})},node:m(function(e,t,i,o,r){return T(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,n,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var l=t[r],d=y(l);if("object"!==d)return new h("Invalid "+a+" `"+s+"` of type `"+d+"` supplied to `"+n+"`, expected an object.");for(var c in l)if(o(l,c)){var p=e(l,c,n,a,s+"."+c,i);if(p instanceof Error)return p}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return m(function(t,i,o,r,n){for(var a=t[i],s=0;s<e.length;s++)if(u(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===A(t)?String(t):t});return new h("Invalid "+r+" `"+n+"` of value `"+String(a)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(r)+" at index "+t+"."),a}return m(function(t,r,n,a,s){for(var l=[],d=0;d<e.length;d++){var c=(0,e[d])(t,r,n,a,s,i);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+n+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,n,a){var s=t[o],l=y(s);if("object"!==l)return new h("Invalid "+n+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(r,n,a,d,A(c));var p=c(s,d,r,n,a+"."+d,i);if(p)return p}return null})},exact:function(e){return m(function(r,n,a,s,l){var d=r[n],c=y(d);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var p=t({},r[n],e);for(var u in p){var m=e[u];if(o(e,u)&&"function"!=typeof m)return g(a,s,l,u,A(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+u+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,u,a,s,l+"."+u,i);if(f)return f}return null})}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,a,s,d,p,u,m){if(d=d||c,u=u||s,m!==i){if(l){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+s;!t[g]&&o<3&&(n("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,o++)}}return null==a[s]?r?null===a[s]?new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+p+" `"+u+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,p,u)}var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function f(e){return m(function(t,i,o,r,n,a){var s=t[i];return y(s)!==e?new h("Invalid "+r+" `"+n+"` of type `"+A(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,i,o,r){return new h((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function T(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(T);if(null===e||s(e))return!0;var t=function(e){var t=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!T(i.value))return!1}else for(;!(i=o.next()).done;){var r=i.value;if(r&&!T(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function A(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function I(e){var t=A(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Ki}function oo(){if(Qi)return zi;Qi=1;var e=Xi();function t(){}function i(){}return i.resetWarningCache=t,zi=function(){function o(t,i,o,r,n,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var n={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:t};return n.PropTypes=n,n}}function ro(){if($i)return Si.exports;if($i=1,"production"!==process.env.NODE_ENV){var e=Zi();Si.exports=io()(e.isElement,true)}else Si.exports=oo()();return Si.exports}var no=vi(ro());var ao,so={exports:{}},lo={};function co(){if(ao)return lo;ao=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(h){if("object"==typeof h&&null!==h){var m=h.$$typeof;switch(m){case e:switch(h=h.type){case i:case r:case o:case l:case d:case u:return h;default:switch(h=h&&h.$$typeof){case a:case s:case p:case c:case n:return h;default:return m}}case t:return m}}}return lo.ContextConsumer=n,lo.ContextProvider=a,lo.Element=e,lo.ForwardRef=s,lo.Fragment=i,lo.Lazy=p,lo.Memo=c,lo.Portal=t,lo.Profiler=r,lo.StrictMode=o,lo.Suspense=l,lo.SuspenseList=d,lo.isContextConsumer=function(e){return m(e)===n},lo.isContextProvider=function(e){return m(e)===a},lo.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},lo.isForwardRef=function(e){return m(e)===s},lo.isFragment=function(e){return m(e)===i},lo.isLazy=function(e){return m(e)===p},lo.isMemo=function(e){return m(e)===c},lo.isPortal=function(e){return m(e)===t},lo.isProfiler=function(e){return m(e)===r},lo.isStrictMode=function(e){return m(e)===o},lo.isSuspense=function(e){return m(e)===l},lo.isSuspenseList=function(e){return m(e)===d},lo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===r||e===o||e===l||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},lo.typeOf=m,lo}var po,uo,ho={};
15
15
  /**
16
16
  * @license React
17
17
  * react-is.development.js
@@ -20,7 +20,7 @@ object-assign
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */function mo(){return po||(po=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case o:case n:case r:case d:case c:case h:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case p:case a:return e;default:return m}}case i:return m}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ho.ContextConsumer=a,ho.ContextProvider=s,ho.Element=t,ho.ForwardRef=l,ho.Fragment=o,ho.Lazy=u,ho.Memo=p,ho.Portal=i,ho.Profiler=n,ho.StrictMode=r,ho.Suspense=d,ho.SuspenseList=c,ho.isContextConsumer=function(t){return e(t)===a},ho.isContextProvider=function(t){return e(t)===s},ho.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ho.isForwardRef=function(t){return e(t)===l},ho.isFragment=function(t){return e(t)===o},ho.isLazy=function(t){return e(t)===u},ho.isMemo=function(t){return e(t)===p},ho.isPortal=function(t){return e(t)===i},ho.isProfiler=function(t){return e(t)===n},ho.isStrictMode=function(t){return e(t)===r},ho.isSuspense=function(t){return e(t)===d},ho.isSuspenseList=function(t){return e(t)===c},ho.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===n||e===r||e===d||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},ho.typeOf=e}()),ho}function fo(){return uo||(uo=1,"production"===process.env.NODE_ENV?so.exports=co():so.exports=mo()),so.exports}var go=fo();function To(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Ao(e){if(ue.isValidElement(e)||go.isValidElementType(e)||!To(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=Ao(e[i])}),t}function yo(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return To(e)&&To(t)&&Object.keys(t).forEach(r=>{ue.isValidElement(t[r])||go.isValidElementType(t[r])?o[r]=t[r]:To(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&To(e[r])?o[r]=yo(e[r],t[r],i):i.clone?o[r]=To(t[r])?Ao(t[r]):t[r]:o[r]=t[r]}),o}function Io(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...r}=e,n=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function d(e,r){const n=a.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"==typeof t[a[n]]?t[a[n]]:r)-o/100}${i})`}return{keys:a,values:n,up:s,down:l,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...r}}function _o(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const Eo={borderRadius:4},Oo="production"!==process.env.NODE_ENV?no.oneOfType([no.number,no.string,no.object,no.array]):{};function Co(e,t){return t?yo(e,t,{clone:!1}):e}const No={xs:0,sm:600,md:900,lg:1200,xl:1536},Ro={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${No[e]}px)`},bo={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:No[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function wo(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Ro;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||Ro;return Object.keys(t).reduce((r,n)=>{if(a=e.keys,"@"===(s=n)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Pi(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:bo,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||No).includes(n)){r[e.up(n)]=i(t[n],n)}else{const e=n;r[e]=t[e]}var a,s;return r},{})}return i(t)}function Po(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function vo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Pi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Lo(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function So(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:Lo(e,i)||o,t&&(r=t(r,o,e)),r}function Mo(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:r}=e,n=e=>{if(null==e[t])return null;const n=e[t],a=Lo(e.theme,o)||{};return wo(e,n,e=>{let o=So(a,r,e);return e===o&&"string"==typeof e&&(o=So(a,r,`${t}${"default"===e?"":vo(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Oo}:{},n.filterProps=[t],n}const Do={m:"margin",p:"padding"},ko={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Uo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},xo=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!Uo[e])return[e];e=Uo[e]}const[t,i]=e.split(""),o=Do[t],r=ko[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),Fo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],qo=[...Fo,...Bo];function Wo(e,t,i,o){const r=Lo(e,t,!0)??i;return"number"==typeof r||"string"==typeof r?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof r?r.startsWith("var(")&&0===e?0:r.startsWith("var(")&&1===e?r:`calc(${e} * ${r})`:r*e):Array.isArray(r)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>r.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${i} > ${r.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=r[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof r?r:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Go(e){return Wo(e,"spacing",8,"spacing")}function Ho(e,t){return"string"==typeof t||null==t?t:e(t)}function Yo(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ho(t,i),e),{})}(xo(i),o);return wo(e,e[i],r)}function Ko(e,t){const i=Go(e.theme);return Object.keys(e).map(o=>Yo(e,t,o,i)).reduce(Co,{})}function Vo(e){return Ko(e,Fo)}function zo(e){return Ko(e,Bo)}function Qo(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Co(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function $o(e){return"number"!=typeof e?e:`${e}px solid`}function jo(e,t){return Mo({prop:e,themeKey:"borders",transform:t})}Vo.propTypes="production"!==process.env.NODE_ENV?Fo.reduce((e,t)=>(e[t]=Oo,e),{}):{},Vo.filterProps=Fo,zo.propTypes="production"!==process.env.NODE_ENV?Bo.reduce((e,t)=>(e[t]=Oo,e),{}):{},zo.filterProps=Bo,"production"===process.env.NODE_ENV||qo.reduce((e,t)=>(e[t]=Oo,e),{});const Zo=jo("border",$o),Jo=jo("borderTop",$o),Xo=jo("borderRight",$o),er=jo("borderBottom",$o),tr=jo("borderLeft",$o),ir=jo("borderColor"),or=jo("borderTopColor"),rr=jo("borderRightColor"),nr=jo("borderBottomColor"),ar=jo("borderLeftColor"),sr=jo("outline",$o),lr=jo("outlineColor"),dr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Wo(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ho(t,e)});return wo(e,e.borderRadius,i)}return null};dr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Oo}:{},dr.filterProps=["borderRadius"],Qo(Zo,Jo,Xo,er,tr,ir,or,rr,nr,ar,dr,sr,lr);const cr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Wo(e.theme,"spacing",8,"gap"),i=e=>({gap:Ho(t,e)});return wo(e,e.gap,i)}return null};cr.propTypes="production"!==process.env.NODE_ENV?{gap:Oo}:{},cr.filterProps=["gap"];const pr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Wo(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ho(t,e)});return wo(e,e.columnGap,i)}return null};pr.propTypes="production"!==process.env.NODE_ENV?{columnGap:Oo}:{},pr.filterProps=["columnGap"];const ur=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Wo(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ho(t,e)});return wo(e,e.rowGap,i)}return null};ur.propTypes="production"!==process.env.NODE_ENV?{rowGap:Oo}:{},ur.filterProps=["rowGap"];function hr(e,t){return"grey"===t?t:e}Qo(cr,pr,ur,Mo({prop:"gridColumn"}),Mo({prop:"gridRow"}),Mo({prop:"gridAutoFlow"}),Mo({prop:"gridAutoColumns"}),Mo({prop:"gridAutoRows"}),Mo({prop:"gridTemplateColumns"}),Mo({prop:"gridTemplateRows"}),Mo({prop:"gridTemplateAreas"}),Mo({prop:"gridArea"}));function mr(e){return e<=1&&0!==e?100*e+"%":e}Qo(Mo({prop:"color",themeKey:"palette",transform:hr}),Mo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hr}),Mo({prop:"backgroundColor",themeKey:"palette",transform:hr}));const fr=Mo({prop:"width",transform:mr}),gr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||No[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:mr(t)}};return wo(e,e.maxWidth,t)}return null};gr.filterProps=["maxWidth"];const Tr=Mo({prop:"minWidth",transform:mr}),Ar=Mo({prop:"height",transform:mr}),yr=Mo({prop:"maxHeight",transform:mr}),Ir=Mo({prop:"minHeight",transform:mr});Mo({prop:"size",cssProperty:"width",transform:mr}),Mo({prop:"size",cssProperty:"height",transform:mr});Qo(fr,gr,Tr,Ar,yr,Ir,Mo({prop:"boxSizing"}));const _r={border:{themeKey:"borders",transform:$o},borderTop:{themeKey:"borders",transform:$o},borderRight:{themeKey:"borders",transform:$o},borderBottom:{themeKey:"borders",transform:$o},borderLeft:{themeKey:"borders",transform:$o},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$o},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dr},color:{themeKey:"palette",transform:hr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hr},backgroundColor:{themeKey:"palette",transform:hr},p:{style:zo},pt:{style:zo},pr:{style:zo},pb:{style:zo},pl:{style:zo},px:{style:zo},py:{style:zo},padding:{style:zo},paddingTop:{style:zo},paddingRight:{style:zo},paddingBottom:{style:zo},paddingLeft:{style:zo},paddingX:{style:zo},paddingY:{style:zo},paddingInline:{style:zo},paddingInlineStart:{style:zo},paddingInlineEnd:{style:zo},paddingBlock:{style:zo},paddingBlockStart:{style:zo},paddingBlockEnd:{style:zo},m:{style:Vo},mt:{style:Vo},mr:{style:Vo},mb:{style:Vo},ml:{style:Vo},mx:{style:Vo},my:{style:Vo},margin:{style:Vo},marginTop:{style:Vo},marginRight:{style:Vo},marginBottom:{style:Vo},marginLeft:{style:Vo},marginX:{style:Vo},marginY:{style:Vo},marginInline:{style:Vo},marginInlineStart:{style:Vo},marginInlineEnd:{style:Vo},marginBlock:{style:Vo},marginBlockStart:{style:Vo},marginBlockEnd:{style:Vo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cr},rowGap:{style:ur},columnGap:{style:pr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:mr},maxWidth:{style:gr},minWidth:{transform:mr},height:{transform:mr},maxHeight:{transform:mr},minHeight:{transform:mr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Er=function(){function e(e,t,i,o){const r={[e]:t,theme:i},n=o[e];if(!n)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:d}=n;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=Lo(i,s)||{};if(d)return d(r);return wo(r,t,t=>{let i=So(c,l,t);return t===i&&"string"==typeof t&&(i=So(c,l,`${e}${"default"===t?"":vo(t)}`,t)),!1===a?i:{[a]:i}})}return function t(i){const{sx:o,theme:r={},nested:n}=i||{};if(!o)return null;const a=r.unstable_sxConfig??_r;function s(i){let o=i;if("function"==typeof i)o=i(r);else if("object"!=typeof i)return i;if(!o)return null;const s=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(r.breakpoints),l=Object.keys(s);let d=s;return Object.keys(o).forEach(i=>{const n=(s=o[i],l=r,"function"==typeof s?s(l):s);var s,l;if(null!=n)if("object"==typeof n)if(a[i])d=Co(d,e(i,n,r,a));else{const e=wo({theme:r},n,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,n)?d=Co(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Co(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":_o(r,Po(l,d))}:_o(r,Po(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Or(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Cr(e=null){const t=ue.useContext(de);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Er.filterProps=["sx"];const Nr=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=Io(i),l=function(e=8,t=Go({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(r);let d=yo({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Eo,...n}},a);return d=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const r=t(e.breakpoints.not(...i),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(i(o,e),o);return i(r),{...e,containerQueries:r}}(d),d.applyStyles=Or,d=t.reduce((e,t)=>yo(e,t),d),d.unstable_sxConfig={..._r,...a?.unstable_sxConfig},d.unstable_sx=function(e){return Er({sx:e,theme:this})},d}();function Rr(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??_r;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let n;return n=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return To(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const br=e=>e,wr=(()=>{let e=br;return{configure(t){e=t},generate:t=>e(t),reset(){e=br}}})();function Pr(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=Pr(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function vr(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=Pr(e))&&(o&&(o+=" "),o+=t);return o}const Lr={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const Sr=function(e={}){const{themeId:t,defaultTheme:i,defaultClassName:o="MuiBox-root",generateClassName:r}=e,n=
23
+ */function mo(){return po||(po=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case o:case n:case r:case d:case c:case h:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case p:case a:return e;default:return m}}case i:return m}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ho.ContextConsumer=a,ho.ContextProvider=s,ho.Element=t,ho.ForwardRef=l,ho.Fragment=o,ho.Lazy=u,ho.Memo=p,ho.Portal=i,ho.Profiler=n,ho.StrictMode=r,ho.Suspense=d,ho.SuspenseList=c,ho.isContextConsumer=function(t){return e(t)===a},ho.isContextProvider=function(t){return e(t)===s},ho.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ho.isForwardRef=function(t){return e(t)===l},ho.isFragment=function(t){return e(t)===o},ho.isLazy=function(t){return e(t)===u},ho.isMemo=function(t){return e(t)===p},ho.isPortal=function(t){return e(t)===i},ho.isProfiler=function(t){return e(t)===n},ho.isStrictMode=function(t){return e(t)===r},ho.isSuspense=function(t){return e(t)===d},ho.isSuspenseList=function(t){return e(t)===c},ho.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===n||e===r||e===d||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},ho.typeOf=e}()),ho}function fo(){return uo||(uo=1,"production"===process.env.NODE_ENV?so.exports=co():so.exports=mo()),so.exports}var go=fo();function To(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function yo(e){if(ue.isValidElement(e)||go.isValidElementType(e)||!To(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=yo(e[i])}),t}function Ao(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return To(e)&&To(t)&&Object.keys(t).forEach(r=>{ue.isValidElement(t[r])||go.isValidElementType(t[r])?o[r]=t[r]:To(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&To(e[r])?o[r]=Ao(e[r],t[r],i):i.clone?o[r]=To(t[r])?yo(t[r]):t[r]:o[r]=t[r]}),o}function Io(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...r}=e,n=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function d(e,r){const n=a.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"==typeof t[a[n]]?t[a[n]]:r)-o/100}${i})`}return{keys:a,values:n,up:s,down:l,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...r}}function _o(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const Eo={borderRadius:4},Oo="production"!==process.env.NODE_ENV?no.oneOfType([no.number,no.string,no.object,no.array]):{};function Co(e,t){return t?Ao(e,t,{clone:!1}):e}const No={xs:0,sm:600,md:900,lg:1200,xl:1536},Ro={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${No[e]}px)`},bo={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:No[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function wo(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Ro;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||Ro;return Object.keys(t).reduce((r,n)=>{if(a=e.keys,"@"===(s=n)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Pi(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:bo,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||No).includes(n)){r[e.up(n)]=i(t[n],n)}else{const e=n;r[e]=t[e]}var a,s;return r},{})}return i(t)}function Po(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function vo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Pi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Lo(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function So(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:Lo(e,i)||o,t&&(r=t(r,o,e)),r}function Mo(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:r}=e,n=e=>{if(null==e[t])return null;const n=e[t],a=Lo(e.theme,o)||{};return wo(e,n,e=>{let o=So(a,r,e);return e===o&&"string"==typeof e&&(o=So(a,r,`${t}${"default"===e?"":vo(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Oo}:{},n.filterProps=[t],n}const Do={m:"margin",p:"padding"},ko={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Uo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},xo=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!Uo[e])return[e];e=Uo[e]}const[t,i]=e.split(""),o=Do[t],r=ko[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),Fo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],qo=[...Fo,...Bo];function Wo(e,t,i,o){const r=Lo(e,t,!0)??i;return"number"==typeof r||"string"==typeof r?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof r?r.startsWith("var(")&&0===e?0:r.startsWith("var(")&&1===e?r:`calc(${e} * ${r})`:r*e):Array.isArray(r)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>r.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${i} > ${r.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=r[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof r?r:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Go(e){return Wo(e,"spacing",8,"spacing")}function Ho(e,t){return"string"==typeof t||null==t?t:e(t)}function Yo(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ho(t,i),e),{})}(xo(i),o);return wo(e,e[i],r)}function Ko(e,t){const i=Go(e.theme);return Object.keys(e).map(o=>Yo(e,t,o,i)).reduce(Co,{})}function Vo(e){return Ko(e,Fo)}function zo(e){return Ko(e,Bo)}function Qo(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Co(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function $o(e){return"number"!=typeof e?e:`${e}px solid`}function jo(e,t){return Mo({prop:e,themeKey:"borders",transform:t})}Vo.propTypes="production"!==process.env.NODE_ENV?Fo.reduce((e,t)=>(e[t]=Oo,e),{}):{},Vo.filterProps=Fo,zo.propTypes="production"!==process.env.NODE_ENV?Bo.reduce((e,t)=>(e[t]=Oo,e),{}):{},zo.filterProps=Bo,"production"===process.env.NODE_ENV||qo.reduce((e,t)=>(e[t]=Oo,e),{});const Zo=jo("border",$o),Jo=jo("borderTop",$o),Xo=jo("borderRight",$o),er=jo("borderBottom",$o),tr=jo("borderLeft",$o),ir=jo("borderColor"),or=jo("borderTopColor"),rr=jo("borderRightColor"),nr=jo("borderBottomColor"),ar=jo("borderLeftColor"),sr=jo("outline",$o),lr=jo("outlineColor"),dr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Wo(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ho(t,e)});return wo(e,e.borderRadius,i)}return null};dr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Oo}:{},dr.filterProps=["borderRadius"],Qo(Zo,Jo,Xo,er,tr,ir,or,rr,nr,ar,dr,sr,lr);const cr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Wo(e.theme,"spacing",8,"gap"),i=e=>({gap:Ho(t,e)});return wo(e,e.gap,i)}return null};cr.propTypes="production"!==process.env.NODE_ENV?{gap:Oo}:{},cr.filterProps=["gap"];const pr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Wo(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ho(t,e)});return wo(e,e.columnGap,i)}return null};pr.propTypes="production"!==process.env.NODE_ENV?{columnGap:Oo}:{},pr.filterProps=["columnGap"];const ur=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Wo(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ho(t,e)});return wo(e,e.rowGap,i)}return null};ur.propTypes="production"!==process.env.NODE_ENV?{rowGap:Oo}:{},ur.filterProps=["rowGap"];function hr(e,t){return"grey"===t?t:e}Qo(cr,pr,ur,Mo({prop:"gridColumn"}),Mo({prop:"gridRow"}),Mo({prop:"gridAutoFlow"}),Mo({prop:"gridAutoColumns"}),Mo({prop:"gridAutoRows"}),Mo({prop:"gridTemplateColumns"}),Mo({prop:"gridTemplateRows"}),Mo({prop:"gridTemplateAreas"}),Mo({prop:"gridArea"}));function mr(e){return e<=1&&0!==e?100*e+"%":e}Qo(Mo({prop:"color",themeKey:"palette",transform:hr}),Mo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hr}),Mo({prop:"backgroundColor",themeKey:"palette",transform:hr}));const fr=Mo({prop:"width",transform:mr}),gr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||No[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:mr(t)}};return wo(e,e.maxWidth,t)}return null};gr.filterProps=["maxWidth"];const Tr=Mo({prop:"minWidth",transform:mr}),yr=Mo({prop:"height",transform:mr}),Ar=Mo({prop:"maxHeight",transform:mr}),Ir=Mo({prop:"minHeight",transform:mr});Mo({prop:"size",cssProperty:"width",transform:mr}),Mo({prop:"size",cssProperty:"height",transform:mr});Qo(fr,gr,Tr,yr,Ar,Ir,Mo({prop:"boxSizing"}));const _r={border:{themeKey:"borders",transform:$o},borderTop:{themeKey:"borders",transform:$o},borderRight:{themeKey:"borders",transform:$o},borderBottom:{themeKey:"borders",transform:$o},borderLeft:{themeKey:"borders",transform:$o},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$o},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dr},color:{themeKey:"palette",transform:hr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hr},backgroundColor:{themeKey:"palette",transform:hr},p:{style:zo},pt:{style:zo},pr:{style:zo},pb:{style:zo},pl:{style:zo},px:{style:zo},py:{style:zo},padding:{style:zo},paddingTop:{style:zo},paddingRight:{style:zo},paddingBottom:{style:zo},paddingLeft:{style:zo},paddingX:{style:zo},paddingY:{style:zo},paddingInline:{style:zo},paddingInlineStart:{style:zo},paddingInlineEnd:{style:zo},paddingBlock:{style:zo},paddingBlockStart:{style:zo},paddingBlockEnd:{style:zo},m:{style:Vo},mt:{style:Vo},mr:{style:Vo},mb:{style:Vo},ml:{style:Vo},mx:{style:Vo},my:{style:Vo},margin:{style:Vo},marginTop:{style:Vo},marginRight:{style:Vo},marginBottom:{style:Vo},marginLeft:{style:Vo},marginX:{style:Vo},marginY:{style:Vo},marginInline:{style:Vo},marginInlineStart:{style:Vo},marginInlineEnd:{style:Vo},marginBlock:{style:Vo},marginBlockStart:{style:Vo},marginBlockEnd:{style:Vo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cr},rowGap:{style:ur},columnGap:{style:pr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:mr},maxWidth:{style:gr},minWidth:{transform:mr},height:{transform:mr},maxHeight:{transform:mr},minHeight:{transform:mr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Er=function(){function e(e,t,i,o){const r={[e]:t,theme:i},n=o[e];if(!n)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:d}=n;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=Lo(i,s)||{};if(d)return d(r);return wo(r,t,t=>{let i=So(c,l,t);return t===i&&"string"==typeof t&&(i=So(c,l,`${e}${"default"===t?"":vo(t)}`,t)),!1===a?i:{[a]:i}})}return function t(i){const{sx:o,theme:r={},nested:n}=i||{};if(!o)return null;const a=r.unstable_sxConfig??_r;function s(i){let o=i;if("function"==typeof i)o=i(r);else if("object"!=typeof i)return i;if(!o)return null;const s=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(r.breakpoints),l=Object.keys(s);let d=s;return Object.keys(o).forEach(i=>{const n=(s=o[i],l=r,"function"==typeof s?s(l):s);var s,l;if(null!=n)if("object"==typeof n)if(a[i])d=Co(d,e(i,n,r,a));else{const e=wo({theme:r},n,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,n)?d=Co(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Co(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":_o(r,Po(l,d))}:_o(r,Po(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Or(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Cr(e=null){const t=ue.useContext(de);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Er.filterProps=["sx"];const Nr=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=Io(i),l=function(e=8,t=Go({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(r);let d=Ao({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Eo,...n}},a);return d=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const r=t(e.breakpoints.not(...i),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(i(o,e),o);return i(r),{...e,containerQueries:r}}(d),d.applyStyles=Or,d=t.reduce((e,t)=>Ao(e,t),d),d.unstable_sxConfig={..._r,...a?.unstable_sxConfig},d.unstable_sx=function(e){return Er({sx:e,theme:this})},d}();function Rr(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??_r;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let n;return n=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return To(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const br=e=>e,wr=(()=>{let e=br;return{configure(t){e=t},generate:t=>e(t),reset(){e=br}}})();function Pr(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=Pr(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function vr(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=Pr(e))&&(o&&(o+=" "),o+=t);return o}const Lr={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const Sr=function(e={}){const{themeId:t,defaultTheme:i,defaultClassName:o="MuiBox-root",generateClassName:r}=e,n=
24
24
  /**
25
25
  * @mui/styled-engine v7.3.1
26
26
  *
@@ -28,139 +28,139 @@ object-assign
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
30
  */
31
- function(e,t){const i=St(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Er),a=ue.forwardRef(function(e,a){const s=function(e=Nr){return Cr(e)}(i),{className:l,component:d="div",...c}=Rr(e);return g(n,{as:d,ref:a,className:vr(l,r?r(o):o),theme:t&&s[t]||s,...c})});return a}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=Lr[t];return o?`${i}-${o}`:`${wr.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:wr.generate});function Mr(e){return/^\d+$/.test(e)}function Dr(e){return"number"==typeof e&&!isNaN(e)}function kr(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function Ur(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function xr(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Fr(e,t){const i=new Date(e),o=new Date,r=Math.floor((i-o)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of s){const i=Math.floor(r/t);if(Math.abs(i)>1)return a.format(i,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(Sr.propTypes={children:no.node,component:no.elementType,sx:no.oneOfType([no.arrayOf(no.oneOfType([no.func,no.object,no.bool])),no.func,no.object])});const Br=(e,t)=>t?it(e).format(t):it(e).format(pi),qr=(e,t)=>t?it(e,t).toDate():it(e,pi).toDate(),Wr=e=>{if(e?.fieldInfo){const t=e.fieldInfo,i=e?.formManager||null,o=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,a=e?.fieldInfo?.fieldType||null;if(!(t&&i&&r&&n&&a))return g(T,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?g(T,{}):g(B,{size:t?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===a||"number"===a?g(ni,{...t.muiTextFieldProps,fullWidth:!0,type:a,disabled:e.disabledFields.includes(n),label:s(),value:r[n],onChange:t=>{let s=null;""!=t.target.value&&(s="number"===a&&kr(t.target.value)?Number(t.target.value):t.target.value),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,s)},sx:{"& .MuiInputBase-root":{height:`${t?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...t?.formProps?.style,display:e.hiddenFields.includes(n)?"none":void 0},error:null!=i.formState.errors[n],helperText:i?.formState?.errors[n]?.message?.toString()}):"date"===t?.fieldType?g(Ti,{format:t?.dateFormat||pi,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"datetime"===t?.fieldType?g(Ai,{format:t?.dateFormat||ui,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"checkbox"===t?.fieldType?g(di,{label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),sx:t?.formProps?.style}):"combobox"===t?.fieldType?g(ci,{sx:t?.formProps?.style||{width:"100%"},label:s(),commonStoreKey:t?.commonStoreKey,dataQueryId:t?.dataQueryId,storeUrl:t?.storeUrl,storeLoadParam:t?.storeLoadParam,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},options:t?.options||[],displayField:t?.optionDisplayField||"",valueField:t?.optionValueField||"",value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"lookup"===t?.fieldType?g(yi,{sx:t?.formProps?.style||{width:"100%"},label:s(),disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},lookupType:t.lookupType,value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):null})}return g(T,{})},Gr=e=>{const t=Zt(),{ConfirmationWindow:i,setOpen:o}=jt({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||t.isUserAuthorized(e.authority)?f(T,{children:[g(i,{}),f(v,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?o(!0):e?.actionFn(e.record)}},children:[e?.icon?g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g("div",{children:e?.label})]})]}):g(T,{})},Hr=e=>{const{t:t}=Me();return g(T,{children:f(B,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?g(B,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?f(T,{children:[g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),g("div",{children:t(e.label)})]}):g(T,{children:t(e.label)})}):g(T,{}),e?.elements?e.elements.map(t=>"group"===t.type?g(Hr,{...t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===t.type&&"props"===t.mode?g(Wr,{fieldInfo:t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?g(B,{size:{sm:12},sx:{padding:1},children:e.actions.map(t=>g(Gr,{...t,record:e.formValues}))}):g(T,{})]})})},Yr=e=>{const t=y(e=>e.AppInfo.value.apiBaseUrl),[i,o]=me(null);return fe(()=>{e?.refKey&&(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),o(i)})()},[e.refKey]),e?.showAsAvatar?g(K,{sx:e.style,onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:i}):g("img",{src:i,loading:"lazy",alt:"image",onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Kr=e=>{const{handleGetRequest:t,handleDeleteRequest:i}=$t(),{isUserAuthorized:o}=Zt();let r=!0;e?.downloadAuthorityKey&&(r=o(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:a}=jt({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return f(T,{children:[g(n,{}),f(Ke,{sx:{width:300,border:"0.5px solid gray"},children:[g(nt,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?g(Yr,{attachmentId:e.id}):g(Re,{icon:"file",size:"3x"})}),f(rt,{children:[g(at,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),f(ot,{children:[e?.allowDelete?g(U,{size:"small",onClick:()=>{a(!0)},children:g(V,{title:"Delete Attachment",children:g(Re,{icon:"trash"})})}):g(T,{}),g("div",{style:{flex:1}}),r?g(U,{size:"small",onClick:async()=>{await t({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:g(V,{title:"Download Attachment",children:g(Re,{icon:"download"})})}):g(T,{})]})]})]})},Vr=e=>{const{handleUploadRequest:t,handleGetRequest:i}=$t(),[o,r]=me(null),[n,a]=me([]),[s,l]=me(null),[d,c]=me(null),[p,u]=me([]),[h,m]=me(null),{isUserAuthorized:A}=Zt(),y=e=>e.split(".").pop()?.toLowerCase()||"";fe(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{m(e.data)}})})()},[e.refKey,e.attachmentCode]),fe(()=>{if(u(h?.allowedFileTypes?h.allowedFileTypes.split(","):[]),h?.attachmentCategories){const e=[];for(const t of h.attachmentCategories.split(","))e.push({value:t});a(e)}else a([])},[h]);let I=!0;h?.downloadAuthorityKey&&!A(h?.downloadAuthorityKey)&&(I=!1);let _=!0;return!1===e?.enableAttachment&&(_=!1),h?.uploadAuthorityKey&&!A(h.uploadAuthorityKey)&&(_=!1),f(x,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[g(T,_?{children:null==h?.maxAllowedNumberOfFiles||h?.maxAllowedNumberOfFiles>h.refKeyAttachments.length?f(T,{children:[f("h3",{children:[g(Re,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),g("input",{type:"file",style:{margin:20},accept:h?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=y(t.name);if(p.length>0&&!p.includes(e))return void Pe.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?g(ci,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:d,onChangeCallBack:e=>{c(e)}}):g(T,{}),g(ni,{label:"Remark",value:s,onChange:e=>l(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),g(v,{sx:{m:1},variant:"contained",onClick:async()=>{let i=h?.refKeyAttachments.length||0;if(h?.maxAllowedNumberOfFiles&&o.length+i>h.maxAllowedNumberOfFiles)Pe.error("Maximum number of attachments is "+h.maxAllowedNumberOfFiles);else if(!0===h?.isCategoryRequired&&n.length>0&&(null==d||void 0===d||""===d))Pe.error("You must selected document type to process your request");else if(o){for(const e of o)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void Pe.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await t({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:s,category:d},files:o,successCallBkFn:e=>{m(e.data),r(null),c(null),l(null),Pe.success("Your request has been process successfully")}})}else Pe.error("You must add files to upload")},children:"Upload"})]}):g(T,{})}:{}),I&&h?.refKeyAttachments?.length>0?f(T,{children:[f("h3",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),g(B,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:h?.refKeyAttachments.map(t=>g(B,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:g(Kr,{...t,attachmentCode:e.attachmentCode,setAttachmentConfig:m,downloadAuthorityKey:h.downloadAuthorityKey,allowDelete:_})}))})]}):g(T,{})]})},zr=e=>{const t=y(e=>e.AppLayout),{t:i}=Me();return f(x,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),i("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,o)=>g(T,{children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[g(S,{sx:{marginBottom:.2},children:i.actionTime}),f(at,{children:["via ",i.actionMethod]})]}),f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId?i?.personId+"":void 0,style:{m:1,width:70,height:70}}),o!==e.actionHistory.length-1?g(S,{sx:{marginTop:11,position:"absolute"},children:"|"}):g(T,{})]}),f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[f(S,{sx:{width:"100%"},children:["ltr"===t.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),g(S,{sx:{width:"100%"},children:"ltr"===t.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},Qr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=i.isUserAuthorized(e.authority)),n)return f(T,{children:[g(o,{}),f(v,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else Pe.error(t("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?g(Re,{style:{marginRight:5,marginLeft:5},icon:e.icon}):g(T,{}),e?.label?t(e.label):g(T,{})]})]})},$r=z(e)({display:"grid",alignItems:"center"}),jr=z(t)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Zr=z(F)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Jr=e=>{const{t:p}=Me(),u=Zt(),h=!e?.templateProps?.editAction?.authority||u.isUserAuthorized(e.templateProps.editAction.authority),m=wi(e?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},e?.templateProps?.data||[],e?.templateProps?.keyColumnName||"id");return f(i,{children:[h&&"none"!=e?.templateProps?.editMode?.editMode&&(void 0===e?.templateProps?.hideCreateBtn||!1===e?.templateProps?.hideCreateBtn)?f(v,{onClick:e?.handleCreateNewRecord,children:[g(Re,{icon:"add",style:{marginRight:5,marginLeft:5}}),p("ADD_BTN_LABEL")]}):g(T,{}),e?.templateProps?.rowActions?e.templateProps.rowActions.map((t,i)=>!0===t?.gridActionProps?.multiRecord?ge(Qr,{...t,key:i,reloadData:async()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:m.selectedRecordIds,recordsToProcessActionOn:m.selectedRecords}):null):g(T,{}),g(S,{sx:{flex:1,mx:.5,my:.5,padding:1},children:e?.templateProps?.tBar}),g(V,{title:"Columns",children:g(o,{render:g(t,{}),children:g(r,{fontSize:"small"})})}),g(V,{title:"Filters",children:g(n,{render:(e,i)=>g(t,{...e,color:"default",children:g(Q,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:g(a,{fontSize:"small"})})})})}),e?.templateProps?.gridStateKey?g(V,{title:p("RESET_GRID_STATE"),children:g(U,{onClick:e?.clearGridState,children:g(Re,{icon:"eraser"})})}):g(T,{}),g($,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),g(V,{title:p("EXPORT_EXECL_LABEL"),children:g(s,{render:g(j,{}),children:g(Re,{icon:"file-excel",color:"green"})})}),f($r,{children:[g(l,{render:(e,t)=>g(V,{title:p("SEARCH_BTN_LABEL"),enterDelay:0,children:g(jr,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:g(Re,{icon:"search"})})})}),g(d,{render:({ref:e,...t},i)=>g(Zr,{...t,ownerState:{expanded:i.expanded},inputRef:e,"aria-label":"Search",placeholder:`${p("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:g(Z,{position:"start",children:g(Re,{icon:"search"})}),endAdornment:i.value?g(Z,{position:"end",children:g(c,{edge:"end",size:"small","aria-label":"Clear search",children:g(Re,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),g(U,{onClick:()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},children:g(Re,{icon:"refresh"})})]})},Xr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.record)),e?.reloadData&&e.reloadData()}});let n=!0;e.authority&&(n=i.isUserAuthorized(e.authority));let a={};e?.getActionIconStyleForRecord&&(a=e.getActionIconStyleForRecord(e.record));let s=!0;e?.isActionVisibleForRecord&&(s=e?.isActionVisibleForRecord(e.record));let l=!1;if(e?.isActionDisabledForRecord&&(l=e.isActionDisabledForRecord(e.record)),n&&s)return f(T,{children:[g(o,{}),g(p,{disabled:l,icon:g(V,{title:e?.label?t(e.label):"",children:g(Re,{icon:e.icon,style:{...a,color:l?"gray":null!=a?.color?a.color:void 0}})}),showInMenu:e?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!l){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.record),!0===e?.gridActionProps?.reloadGridAfterAction&&e?.reloadData&&e.reloadData())}}})]})};let en=-1;const tn=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},on=(e,t)=>{const i=tn(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},rn=["__check__","actions"],nn=e=>{const{t:t}=Me(),{handleGetRequest:i}=$t(),o=y(e=>e.commonStores.stores),r=y(e=>e.AppLayout),[n,a]=me({}),[s,l]=me(!0),{getLookupOptions:d}=(()=>{const{handleGetRequest:e}=$t(),t=y(e=>e.AppLayout),i=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:c,setWindowState:A}=Jt({windowTitle:t(e.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),{Window:I,setWindowState:_}=Jt({windowTitle:t(e.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),[E,O]=me([]),C=Ni(e.formElements),N=[],R=he.useMemo(()=>e?.gridStateKey?tn(e.gridStateKey):{},[]);for(const e of C)!0===e?.gridProps?.hidden&&N.push(e.fieldName);let b={};if(R?.columnVisibilityModel){b=R.columnVisibilityModel;const e=Object.keys(b);for(const t of N)e.includes(t)||(b[t]=!1)}else for(const e of N)b[e]=!1;const w=y(e=>e.AppLayout.appDirection),[P,v]=he.useState(b),[L,M]=he.useState(R.columnOrder||[]),[D,x]=he.useState(R.columnWidths||{}),[F,B]=me(R.columnGroupingModel||[]);let q=R?.pinnedColumns?.left||[];q=q.filter(e=>!rn.includes(e));let W=R?.pinnedColumns?.right||[]||[];W=W.filter(e=>!rn.includes(e));const[G,H]=me({left:[..."ltr"===w?rn:[],...q],right:[..."rtl"===w?rn:[],...W]}),Y=Zt(),K=Ue(),[z,Q]=me(null),[j,Z]=me(null),[te,ie]=me({}),oe=async(e,t,o)=>{let r=[];return e?await i({endPointURI:e,showMask:!1,parameters:t,successCallBkFn:e=>{r=e.data}}):o&&await i({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o,...t},successCallBkFn:e=>{r=e.data}}),r},re=async()=>{let i=Ri(C,"row"===e?.editMode?.editMode||!1,t);for(let e of i)if(e?.lookupType&&(e.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await d(e.lookupType),e.valueField="lookupValue"),"custom"===e.type){if(e?.options)continue;e.options=e?.commonStoreKey?o[e.commonStoreKey]?.data||[]:await oe(e?.storeUrl,e?.storeLoadParam,e?.dataQueryId)}O(i)},[ne,ae]=me({ids:new Set,type:"include"});let se="id";e?.keyColumnName&&(se=e?.keyColumnName);const le=e.setData;let de=null;de=e?.validationSchema?e.validationSchema:He.object(bi(C));let ce=!0;e?.editAction?.authority&&(ce=Y.isUserAuthorized(e.editAction.authority));let pe=!0;e?.deleteAction?.authority&&(pe=Y.isUserAuthorized(e.deleteAction.authority));const{ConfirmationWindow:ue,setOpen:ge}=jt({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let t=!0;z&&!0===z?.isNew||(t=await e.apiActions.deleteRecordById(z[se])),t&&(e?.deleteAction?.postActionCallBack&&await e.deleteAction.postActionCallBack(z),le(e=>e.filter(e=>e[se]!=z[se])))}});let Te,Ae,ye,Ie,_e,Ee;"modal"===e?.editMode?.editMode&&(Te=e?.editMode?.specs?.modalHeight||"fit-content",Ae=e?.editMode?.specs?.modalWidth||"300",ye=e?.editMode?.specs?.modalMinHeight,Ie=e?.editMode?.specs?.modalMinWidth,_e=e?.editMode?.specs?.modalIcon||"window",Ee=e?.editMode?.specs?.modalTitle||"Record Form");const{Window:Oe,setWindowState:Ce}=Jt({height:Te,minHeight:ye,minWidth:Ie,onCloseCallBack:()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},width:Ae,windowIcon:_e,windowTitle:Ee}),Ne={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(e?.rowActions?30*e.rowActions.length:0)+(e?.editAction&&e?.editAction?.isEnabled?30:0)+(e?.deleteAction&&e?.deleteAction?.isEnabled?30:0)+(e?.attachment?30:0)+(e?.workFlowDocumentCode?30:0),getActions:i=>{const o=i.row,r=[];if("none"!=e?.editMode?.editMode&&(void 0===e?.disableDefaultAction||!e.disableDefaultAction)){const i=te[o[se]]?.mode===m.Edit;if("row"===e.editMode.editMode&&i)ce&&(r.push(g(p,{icon:g(Re,{icon:"save"}),label:t("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[se];ie({...te,[t]:{mode:m.View}})})(o)}})),r.push(g(p,{icon:g(Re,{icon:"cancel"}),label:t("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[se];t&&Dr(t)&&t<0?(ie({...te,[t]:{mode:m.View,ignoreModifications:!0}}),le(e=>{const i=e.filter(e=>e[se]!=t);return i})):ie({...te,[t]:{mode:m.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(e?.editAction&&!0===e?.editAction?.isEnabled){let i=!0;e?.editAction?.isActionVisibleForRecord&&(i=e?.editAction?.isActionVisibleForRecord(o));let n=!1;e?.editAction?.isActionDisabledForRecord&&(n=e?.editAction?.isActionDisabledForRecord(o)),ce&&i&&r.push(g(p,{disabled:n,icon:g(V,{title:t("EDIT_BTN_LABEL"),children:g(Re,{icon:"edit",style:{color:n?"gray":void 0}})}),showInMenu:e?.editAction?.gridActionProps?.showInMenu||!1,label:t("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{ce&&!n&&(async t=>{if(t)if(Z(t),"form"===e.editMode.editMode)K(e.editMode.specs.formRoute+"/"+t[se]);else if("modal"===e.editMode.editMode)Ce(!0);else if("row"===e?.editMode?.editMode){const e=t[se];ie({...te,[e]:{mode:m.Edit}})}})(o)}}))}if(e?.deleteAction&&!0===e?.deleteAction?.isEnabled){let i=!0;e?.deleteAction?.isActionVisibleForRecord&&(i=e?.deleteAction?.isActionVisibleForRecord(o));let n=!1;e?.deleteAction?.isActionDisabledForRecord&&(n=e?.deleteAction?.isActionDisabledForRecord(o)),pe&&i&&r.push(g(p,{disabled:n,icon:g(V,{title:t("DELETE_BTN_LABEL"),children:g(Re,{icon:"trash",style:{color:n?"gray":void 0}})}),showInMenu:e?.deleteAction?.gridActionProps?.showInMenu||!1,label:t("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(pe&&!n){if(e?.deleteAction?.preActionValidation&&!e.deleteAction.preActionValidation(o))return;Q(o),ge(!0)}}}))}}}if(o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.attachment&&r?.push(g(p,{icon:g(V,{title:"Attachments",children:g(Re,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{a(o),l(!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(o)),A(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.workFlowDocumentCode&&r?.push(g(p,{icon:g(V,{title:"Approvals",children:g(Re,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{a(o),_(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.rowActions)for(const t of e.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||r.push(g(Xr,{...t,record:o,reloadData:async()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}}));return r}};let be=[];(void 0===e?.disableDefaultAction||!e.disableDefaultAction||e?.rowActions&&e?.rowActions.length>0)&&be.push(Ne),be=[...be,...E];fe(()=>{void 0!==e?.autoLoad&&!0!==e.autoLoad||e.apiActions.reloadData(e?.gridLoadParametersValues),re()},[]),fe(()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},[Y.UserInfo?.currentOrganization]),fe(()=>{re()},[w,e.formElements]);const we=he.useMemo(()=>{const e=be.map(e=>({...e}));if(L.length){const t=new Map(e.map(e=>[e.field,e]));return L.map(e=>t.get(e)).filter(Boolean)}return e},[L,D,be]);return f(T,{children:[g(ue,{}),"modal"===e?.editMode?.editMode?g(Oe,{children:e?.editMode?.specs?.formComponent?g(e.editMode.specs.formComponent,{recordIdToEdit:j?j[se]:void 0,formCloseCallBk:()=>{Ce(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)}}):g(pn,{keyColumnName:e.keyColumnName,attachment:e.attachment,formValuesChangeCallBk:e?.formProps?.formValuesChangeCallBk,recordIdToEdit:j?j[se]:void 0,formCloseCallBk:()=>{Ce(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)},elements:e.formElements,apiActions:e.apiActions,editAuthorityKey:e?.editAction?.authority,formSavedSuccessfullyCallBk:e?.editAction?.postActionCallBack,preSaveValidation:e?.editAction?.preActionValidation,actions:e?.rowActions})}):g(T,{}),void 0!==e?.hideInfoBar||e?.hideInfoBar?g(T,{}):f(S,{sx:{display:"flex"},children:[void 0!==e?.hideBackButton||e?.hideBackButton?g(T,{}):g(U,{onClick:()=>{K(-1,{replace:!0})},children:g(Re,{icon:"ltr"===w?"arrow-left":"arrow-right"})}),f(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[e?.girdIcon?g(Re,{icon:e.girdIcon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g(k,{variant:"h5",children:e?.gridTitle?Ur(t(e?.gridTitle)):""})]})]}),e?.gridLoadParameters&&e?.gridLoadParameters.length>0&&e?.gridLoadParametersValues&&e?.setGridLoadParametersValues?f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(u,{}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(pn,{saveButtonSpecs:{label:t("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{null!=t?e.setGridLoadParametersValues(t):e.setGridLoadParametersValues({}),e.apiActions.reloadData(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:e.gridLoadParameters})})})]}):g(T,{}),e?.attachment?g(c,{children:g(Vr,{attachmentCode:e.attachment.attachmentCode,refKey:n[e?.keyColumnName||"id"],enableAttachment:s})}):g(T,{}),e?.workFlowDocumentCode?g(I,{children:g(cn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:n[e?.keyColumnName||"id"],postActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)},cancelActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)}})}):g(T,{}),g(h,{...e?.muiProps,slots:{toolbar:Jr},slotProps:{toolbar:{templateProps:{...e,rowSelectionModel:ne,data:e?.data},handleCreateNewRecord:()=>{if("form"===e?.editMode?.editMode)K(e.editMode.specs.formRoute);else if("modal"===e?.editMode?.editMode)Z(null),Ce(!0);else if("row"===e?.editMode?.editMode){en-=1;const e={};e[se]=en,e.isNew=!0;for(const t of E)"actions"!=t?.type&&t?.field!=se&&t?.field&&(e[t.field]=null);le(t=>[e,...t]),ie(e=>({...e,[en]:{mode:m.Edit}}))}},clearGridState:()=>{e?.gridStateKey&&localStorage.removeItem(e.gridStateKey),v({}),M([]),x({}),B([]),H({left:[..."ltr"===w?rn:[]],right:[..."rtl"===w?rn:[]]})}}},getRowId:e=>e[se],showToolbar:!0,rows:e?.data,columns:we,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==e.editMode.editMode?te:void 0,onRowModesModelChange:"row"==e.editMode.editMode?e=>{ie(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===e.editMode.editMode){let i=null;const o=(e=>{try{de.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof He.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(o){const e=o.split(",");throw Pe.error(g("div",{style:{},children:e.map(e=>f(T,{children:[g("div",{children:e}),g($,{})]}))})),new Error(o)}if(e?.editAction?.preActionValidation&&!e.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[se]&&Dr(t[se])&&Number(t[se])<0&&(r[se]=null),i=await e.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return e?.editAction?.postActionCallBack&&await e.editAction.postActionCallBack(t),!0===t?.isNew&&le(e=>{const o=e.filter(e=>e[se]!==t[se]);return[i,...o]}),!0===e?.editMode?.reloadAfterSave&&e?.apiActions?.reloadData&&e?.apiActions?.reloadData(e?.gridLoadParametersValues),i}},rowSelectionModel:ne,onRowSelectionModelChange:e=>{ae(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:t=>{v(t),e?.gridStateKey&&on(e.gridStateKey,{columnVisibilityModel:t})},onColumnOrderChange:t=>{const{column:i,targetIndex:o}=t;M(t=>{const r=t.length?[...t]:be.map(e=>e.field),n=r.indexOf(i.field);return-1===n||(r.splice(n,1),r.splice(o,0,i.field),e?.gridStateKey&&on(e.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:F,onRowGroupingModelChange:t=>{(t=>{B(t),e?.gridStateKey&&on(e.gridStateKey,{columnGroupingModel:t})})(t)},sx:{width:"100%"}})]})},an=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},sn=e=>{const[t,i]=me([]);return fe(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),g(nn,{data:t,disableDefaultAction:!0,setData:e.setReportData,formElements:an(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},ln=e=>{const[t,i]=me({...e?.initialParameterValues}),o=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,t);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:t}=Me();return f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(Re,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(pn,{saveButtonSpecs:{label:t("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:t("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{i(null!=t?t:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o})})})]})},parametersValues:t,setParametersValues:i,panelElements:o}},dn=e=>{const[t,i]=me(null),[o,r]=me(null),[n,a]=me([]),[s,l]=me("WAITING_REPORT_CODE"),{handleGetRequest:d,handlePostRequest:c,HandleDownloadHTTPPostPDF:p}=$t(),[u,h]=me(null),{ParameterPanel:m,parametersValues:A,panelElements:y,setParametersValues:I}=ln({parameters:u?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}});fe(()=>{u&&(!0===e?.byPassParameterEntry||0==u.reportParameters.length?(_(A),l("WAITING_RESULT")):l("WAITING_PARAMETER_INPUT"))},[u]);const _=async t=>{l("WAITING_RESULT"),"Excel"===u?.reportType?await c({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT"),a(e.data)}}):u?.reportType&&await p({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),l("ERROR")}})};return fe(()=>{e?.reportCode&&(async()=>{l("LOADING_METADATA"),await d({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:e=>{h(e.data)},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),l("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[f(S,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[g(Re,{icon:"Excel"===u?.reportType?"file-excel":"file-pdf",color:"Excel"===u?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),u?.reportName]}),"Excel"!=u?.reportType&&"SHOWING_RESULT"===s?f(T,{children:[!0===e?.byPassParameterEntry?g(T,{}):u?.reportParameters.length>0?g(U,{onClick:()=>{l("WAITING_PARAMETER_INPUT")},children:g(Re,{icon:"filter"})}):g(T,{}),g(U,{children:g(Re,{icon:"refresh",onClick:()=>{_(A)}})})]}):g(T,{})]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===s&&"Excel"!=u?.reportType?g(m,{searchBtnClickCallBk:_}):"SHOWING_RESULT"===s||("WAITING_PARAMETER_INPUT"===s||"WAITING_RESULT"===s)&&"Excel"===u?.reportType?"Excel"===u?.reportType?g(sn,{reportData:n,setReportData:a,reloadReport:async()=>{_(A)},gridLoadParameters:y,gridLoadParametersValues:A,setGridLoadParametersValues:I}):g("iframe",{src:t,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===s?f(S,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[g(Re,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),o]}):g(T,{})})]})},cn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{isUserAuthorized:o,UserInfo:r}=Zt(),{handleGetRequest:n,handlePostRequest:a}=$t(),[s,l]=me(null),[d,c]=me([]),{t:p}=Me(),[u,h]=me(null),[m,A]=me({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:I,setWindowState:_}=Jt({windowTitle:"ltr"===i.appDirection?m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"Document":m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),E=async()=>{await n({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{A(structuredClone(e.data))},failureCallBkFn:()=>{A({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},O=async()=>{await a({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:m?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:s.id,refDocumentStatus:m?.workflowDocumentStatus?.documentStatusCode,actionComment:u},successCallBkFn:async t=>{s?.post_action_endpoint?await a({endPointURI:s.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{E(),e?.postActionCallBk&&e.postActionCallBk()}}):E()}})};return fe(()=>{e.refDocumentId&&e.workFlowDocumentCode&&E()},[e.refDocumentId,e.workFlowDocumentCode]),fe(()=>{c(m?.nextActions&&m?.nextActions?.length>0?m.nextActions.filter(e=>{if(!m?.workflowDocumentStatus?.nextActionTakersAuthority&&!m?.nextActionTakers)return!0;if(m?.workflowDocumentStatus?.nextActionTakersAuthority&&o(m.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(m?.nextActionTakers)for(const e of m.nextActionTakers)if(r?.username===e?.username||r?.username===e?.USERNAME)return!0;return!1}):[])},[m.nextActions,m.nextActionTakers]),f(T,{children:[m?.workflowDocumentReport?.id?g(I,{children:g(dn,{reportCode:m?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):g(T,{}),m?.workflowDocument?f(S,{sx:{width:"100%",maxWidth:600,textAlign:"center",fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{t(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`,m?.workflowDocumentStatus?"ltr"===i.appDirection?` ( ${m?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${m?.workflowDocumentStatus?.documentStatusArName} )`:"",g(S,{sx:{flex:1}}),m?.workflowDocumentReport?.id?g(v,{onClick:()=>{_(!0)},variant:"outlined",startIcon:g(Re,{icon:"eye"}),children:p("VIEW_LABEL")}):g(T,{})]}):g(T,{}),f(S,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[d?.length>0?f(x,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[g(ci,{sx:{marginBottom:2,width:400},label:p("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===i.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:s?.id,options:d,onChangeCallBack:(e,t)=>{l(t)}}),g(ni,{sx:{width:400},rows:3,value:u,onChange:e=>{h(e.target.value)},multiline:!0,label:p("WF_COMMENT_LABEL")}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(v,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=s&&null!=s?.id?!0!==s.require_comment&&1!==s.require_comment&&"true"!==s.require_comment||null!==u&&""!==u?s?.pre_action_endpoint?await a({endPointURI:s.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{O()}}):O():Pe.error("You must enter comment for the action to be processed"):Pe.error("You must select action to process")},children:p("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?g(v,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:p("WF_CANCEL_BTN_LABEL")}):g(T,{})]}),m?.nextActionTakers&&m.nextActionTakers.length>0?f(T,{children:[g($,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",p("WF_WAITING_FOR_LABEL")]})}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:m.nextActionTakers.map(e=>f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),f(S,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[g("div",{children:"ltr"===i.appDirection?e?.employee_en_name:e?.employee_ar_name}),g("div",{children:e?.email?f(T,{children:[g(Re,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):g(T,{})}),g("div",{children:e?.mobile_number?f(T,{children:[g(Re,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):g(T,{})})]})]}))})]}):g(T,{})]}):g(T,{}),m?.actionsHistory.length>0?g(zr,{actionHistory:m.actionsHistory}):f(x,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),p("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},pn=e=>{const{Window:t,setWindowState:i}=Jt({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[o,r]=me(!0),{t:n}=Me(),a=Ni(e.elements),[s,l]=me([]),[d,c]=me([]),p={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(p[t.props.fieldName]=t.props.defaultValue);let u=null;u=e?.validationSchema?e.validationSchema:Ge.object(bi(a));const h=ke({resolver:We(u),defaultValues:p}),m=h.watch(),A=xe(),y=e?.formRouteRecordIdParamName,I=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:y&&A[y]&&(t=A[y]),t){const i=await e.apiActions.loadRecordById(t);if(i){h.reset({...i});for(const e of a)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?h.setValue(e.fieldName,i[e.fieldName]+""):h.setValue(e.fieldName,i[e.fieldName]));e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(m,O,h)}}else h.reset({}),e.formValuesChangeCallBk(m,O,h)},{Window:_,setWindowState:E}=Jt({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await I()}}),O={setFieldValue:(e,t)=>{h.setValue(e,t)},hideField:e=>{c(t=>[...t,e])},showField:e=>{c(t=>t.filter(t=>t!==e))},disableField:e=>{l(t=>[...t,e])},enableField:e=>{l(t=>t.filter(t=>t!==e))}};return fe(()=>{const e=[],t=[];for(const i of a)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);c(e),l(t)},[e.elements]),fe(()=>{I()},[e?.recordIdToEdit]),fe(()=>{r(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(m))},[m]),f(T,{children:[e?.attachment?g(t,{children:g(Vr,{attachmentCode:e.attachment.attachmentCode,refKey:m[e?.keyColumnName||"id"],enableAttachment:o})}):g(T,{}),e?.workFlowDocumentCode?g(_,{children:g(cn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:m[e?.keyColumnName||"id"],postActionCallBk:()=>{E(!1),I()},cancelActionCallBk:()=>{E(!1),I()}})}):g(T,{}),g(Sr,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:g(B,{sx:{width:"100%"},container:!0,children:e.elements.map((t,i)=>"group"===t.type?g(Hr,{...t.props,formManager:h,formValues:m,formActions:O,hiddenFields:d,disabledFields:s,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"props"===t.mode?g(Wr,{fieldInfo:t.props,formManager:h,formValues:m,formActions:O,hiddenFields:d,disabledFields:s,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:h,formValues:m})},i):void 0)})}),f(Sr,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[m[e?.keyColumnName||"id"]&&e?.attachment?g(V,{title:"Attachments",children:g(U,{onClick:()=>{i(!0)},children:g(Re,{icon:"paperclip"})})}):null,m[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?g(V,{title:"Approvals",children:g(U,{onClick:()=>{E(!0)},children:g(Re,{icon:"stamp"})})}):null,e?.actions?e.actions.map(t=>!1===t?.isIdRequired?g(Gr,{...t,record:m}):m[e?.keyColumnName||"id"]?!0===t?.formActionProps?.enabled?g(Gr,{...t,record:m}):g(T,{}):void 0):g(T,{}),g("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?g(Re,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:h.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(h.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{Pe.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:n(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?g(Re,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),h.reset(p)},children:n(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},un=()=>{const{workflowDocumentCode:e,refDocumentId:t}=xe();return g(cn,{workFlowDocumentCode:e,refDocumentId:t})},hn=e=>g(st,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),mn=e=>f(x,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[g(S,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:g("div",{children:e.record[e.valueField]})}),g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),fn=e=>f(T,{children:[g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(lt,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),gn=e=>g(dt,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Tn(e){return f(pt,{sx:{display:"flex",alignItems:"center"},children:[g(pt,{sx:{width:"100%",mr:1},children:g(ct,{variant:"determinate",...e})}),g(pt,{sx:{minWidth:35},children:g(at,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const An=e=>f(pt,{sx:{width:"100%"},children:[g(at,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(Tn,{value:e.record[e.valueField]/e.total*100})]}),yn=e=>{const t=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return g(ut,{series:[{data:t}]})},In=e=>{const[t,i]=me(!0),[o,r]=me([]),{handleGetRequest:n}=$t();fe(()=>{e.loadWidget?(async()=>{i(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),r(e.data)},failureCallBkFn:()=>{i(!1),r([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let a=0;if(1==o.length)a=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of o)a+=t[e.verticalAxisField];return f(T,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?f(S,{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):g(T,{}),g(S,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:t?f(T,{children:[g(Re,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),g("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?g(hn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?g(gn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?g(yn,{data:o,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):f(B,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[g(B,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),o.map((t,i)=>"Card"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(mn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(fn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):"LinearProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(An,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):void 0)]})})]})},_n=e=>{const[t,i]=me({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:o,parametersValues:r}=ln({parameters:t?.dashboardParameters||[],initialParameterValues:{}}),[n,a]=me(0),[s,l]=me(!1);fe(()=>{if(null!=t.dashboardCode&&null!=t.dashboardCode&&""!=t.dashboardCode){l(!1);let e=!0;if(t?.dashboardParameters.length>0)for(const i of t?.dashboardParameters)if(!0===i?.mandatory&&(void 0===r[i.parameterCode]||null===r[i.parameterCode]||""===r[i.parameterCode])){e=!1;break}e&&l(e),a(n+1)}},[t?.dashboardParameters,r]);const d=Ue(),{handleGetRequest:c,handlePostRequest:p}=$t();return fe(()=>{e.dashboardCode&&(async()=>{await c({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),g(T,{children:t?f(T,{children:[f(S,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{d(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),g(S,{children:t?.dashboardTitle}),g(S,{sx:{flex:1}})]}),t?.dashboardParameters.length>0?g(o,{searchBtnClickCallBk:async e=>{a(n+1)}}):g(T,{}),g(B,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:t?.widgets.map((e,t)=>g(B,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:g(In,{...e,parameterValues:r,loadWidget:s})},t))})]}):g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},En=()=>{const{dashboardCode:e}=xe();return g(_n,{dashboardCode:e})},On=e=>{const{UserSession:t}=Zt(),i=y(e=>e.AppLayout),o=A(),{handlePostRequest:r}=$t(),[n,a]=me(t.value.currentOrganization.id);return f(S,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[g(ci,{sx:{width:"100%"},displayField:"ltr"===i.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:t.value.userOrganizations,value:n,onChangeCallBack:e=>{a(e)}}),g(v,{sx:{m:1},variant:"contained",disabled:null==n||n===t.value.currentOrganization.id,onClick:async()=>{await r({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:t.value.username,orgId:n},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),i.token=null,o(zt.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Cn=be({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Nn,setSideBarState:Rn}=Cn.actions;var bn=Cn.reducer;function wn(e,t){const i=Te(e);fe(()=>{i.current=e},[e]),fe(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const Pn=te`
31
+ function(e,t){const i=St(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Er),a=ue.forwardRef(function(e,a){const s=function(e=Nr){return Cr(e)}(i),{className:l,component:d="div",...c}=Rr(e);return g(n,{as:d,ref:a,className:vr(l,r?r(o):o),theme:t&&s[t]||s,...c})});return a}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=Lr[t];return o?`${i}-${o}`:`${wr.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:wr.generate});function Mr(e){return/^\d+$/.test(e)}function Dr(e){return"number"==typeof e&&!isNaN(e)}function kr(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function Ur(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function xr(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Fr(e,t){const i=new Date(e),o=new Date,r=Math.floor((i-o)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of s){const i=Math.floor(r/t);if(Math.abs(i)>1)return a.format(i,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(Sr.propTypes={children:no.node,component:no.elementType,sx:no.oneOfType([no.arrayOf(no.oneOfType([no.func,no.object,no.bool])),no.func,no.object])});const Br=(e,t)=>t?it(e).format(t):it(e).format(pi),qr=(e,t)=>t?it(e,t).toDate():it(e,pi).toDate(),Wr=e=>{if(e?.fieldInfo){const t=e.fieldInfo,i=e?.formManager||null,o=e?.formActions||null,r=e?.formValues||null,n=e?.fieldInfo?.fieldName||null,a=e?.fieldInfo?.fieldType||null;if(!(t&&i&&r&&n&&a))return g(T,{});const s=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(r):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(n)?g(T,{}):g(B,{size:t?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===a||"number"===a?g(ni,{...t.muiTextFieldProps,fullWidth:!0,type:a,disabled:e.disabledFields.includes(n),label:s(),value:r[n],onChange:t=>{let s=null;""!=t.target.value&&(s="number"===a&&kr(t.target.value)?Number(t.target.value):t.target.value),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,s)},sx:{"& .MuiInputBase-root":{height:`${t?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...t?.formProps?.style,display:e.hiddenFields.includes(n)?"none":void 0},error:null!=i.formState.errors[n],helperText:i?.formState?.errors[n]?.message?.toString()}):"date"===t?.fieldType?g(Ti,{format:t?.dateFormat||pi,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"datetime"===t?.fieldType?g(yi,{format:t?.dateFormat||ui,sx:t?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],error:null!=i.formState.errors[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"checkbox"===t?.fieldType?g(di,{label:s(),onChangeCallBack:t=>{i.setValue(n,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t)},value:r[n],checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),sx:t?.formProps?.style}):"combobox"===t?.fieldType?g(ci,{sx:t?.formProps?.style||{width:"100%"},label:s(),commonStoreKey:t?.commonStoreKey,dataQueryId:t?.dataQueryId,storeUrl:t?.storeUrl,storeLoadParam:t?.storeLoadParam,disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},options:t?.options||[],displayField:t?.optionDisplayField||"",valueField:t?.optionValueField||"",value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):"lookup"===t?.fieldType?g(Ai,{sx:t?.formProps?.style||{width:"100%"},label:s(),disabled:e.disabledFields.includes(n),hidden:e.hiddenFields.includes(n),onChangeCallBack:(t,a)=>{let s=null;t&&(s=t),i.setValue(n,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(r,o,i,n,t,a)},lookupType:t.lookupType,value:r[n],errorMessage:i?.formState?.errors[n]?.message?.toString()}):null})}return g(T,{})},Gr=e=>{const t=Zt(),{ConfirmationWindow:i,setOpen:o}=jt({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||t.isUserAuthorized(e.authority)?f(T,{children:[g(i,{}),f(v,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?o(!0):e?.actionFn(e.record)}},children:[e?.icon?g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g("div",{children:e?.label})]})]}):g(T,{})},Hr=e=>{const{t:t}=Me();return g(T,{children:f(B,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?g(B,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?f(T,{children:[g(Re,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),g("div",{children:t(e.label)})]}):g(T,{children:t(e.label)})}):g(T,{}),e?.elements?e.elements.map(t=>"group"===t.type?g(Hr,{...t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===t.type&&"props"===t.mode?g(Wr,{fieldInfo:t.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?g(B,{size:{sm:12},sx:{padding:1},children:e.actions.map(t=>g(Gr,{...t,record:e.formValues}))}):g(T,{})]})})},Yr=e=>{const t=A(e=>e.AppInfo.value.apiBaseUrl),[i,o]=me(null);return fe(()=>{e?.refKey&&(()=>{let i=t+"/api/v1/attachment/";e?.attachmentId?i+="download?attachmentId="+e.attachmentId:(i+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(i+=`&category=${e.category}`)),o(i)})()},[e.refKey]),e?.showAsAvatar?g(K,{sx:e.style,onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:i}):g("img",{src:i,loading:"lazy",alt:"image",onError:()=>{o(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Kr=e=>{const{handleGetRequest:t,handleDeleteRequest:i}=$t(),{isUserAuthorized:o}=Zt();let r=!0;e?.downloadAuthorityKey&&(r=o(e.downloadAuthorityKey));const{ConfirmationWindow:n,setOpen:a}=jt({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await i({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return f(T,{children:[g(n,{}),f(Ke,{sx:{width:300,border:"0.5px solid gray"},children:[g(nt,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?g(Yr,{attachmentId:e.id}):g(Re,{icon:"file",size:"3x"})}),f(rt,{children:[g(at,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),g(at,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),f(ot,{children:[e?.allowDelete?g(U,{size:"small",onClick:()=>{a(!0)},children:g(V,{title:"Delete Attachment",children:g(Re,{icon:"trash"})})}):g(T,{}),g("div",{style:{flex:1}}),r?g(U,{size:"small",onClick:async()=>{await t({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:g(V,{title:"Download Attachment",children:g(Re,{icon:"download"})})}):g(T,{})]})]})]})},Vr=e=>{const{handleUploadRequest:t,handleGetRequest:i}=$t(),[o,r]=me(null),[n,a]=me([]),[s,l]=me(null),[d,c]=me(null),[p,u]=me([]),[h,m]=me(null),{isUserAuthorized:y}=Zt(),A=e=>e.split(".").pop()?.toLowerCase()||"";fe(()=>{(async()=>{await i({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{m(e.data)}})})()},[e.refKey,e.attachmentCode]),fe(()=>{if(u(h?.allowedFileTypes?h.allowedFileTypes.split(","):[]),h?.attachmentCategories){const e=[];for(const t of h.attachmentCategories.split(","))e.push({value:t});a(e)}else a([])},[h]);let I=!0;h?.downloadAuthorityKey&&!y(h?.downloadAuthorityKey)&&(I=!1);let _=!0;return!1===e?.enableAttachment&&(_=!1),h?.uploadAuthorityKey&&!y(h.uploadAuthorityKey)&&(_=!1),f(x,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[g(T,_?{children:null==h?.maxAllowedNumberOfFiles||h?.maxAllowedNumberOfFiles>h.refKeyAttachments.length?f(T,{children:[f("h3",{children:[g(Re,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),g("input",{type:"file",style:{margin:20},accept:h?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=A(t.name);if(p.length>0&&!p.includes(e))return void Pe.error(e+" is not allowed")}r(e.target.files)}}),n.length>0?g(ci,{label:"Attachment Type",sx:{width:300,m:1},options:n,displayField:"value",valueField:"value",value:d,onChangeCallBack:e=>{c(e)}}):g(T,{}),g(ni,{label:"Remark",value:s,onChange:e=>l(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),g(v,{sx:{m:1},variant:"contained",onClick:async()=>{let i=h?.refKeyAttachments.length||0;if(h?.maxAllowedNumberOfFiles&&o.length+i>h.maxAllowedNumberOfFiles)Pe.error("Maximum number of attachments is "+h.maxAllowedNumberOfFiles);else if(!0===h?.isCategoryRequired&&n.length>0&&(null==d||void 0===d||""===d))Pe.error("You must selected document type to process your request");else if(o){for(const e of o)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void Pe.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await t({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:s,category:d},files:o,successCallBkFn:e=>{m(e.data),r(null),c(null),l(null),Pe.success("Your request has been process successfully")}})}else Pe.error("You must add files to upload")},children:"Upload"})]}):g(T,{})}:{}),I&&h?.refKeyAttachments?.length>0?f(T,{children:[f("h3",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),g(B,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:h?.refKeyAttachments.map(t=>g(B,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:g(Kr,{...t,attachmentCode:e.attachmentCode,setAttachmentConfig:m,downloadAuthorityKey:h.downloadAuthorityKey,allowDelete:_})}))})]}):g(T,{})]})},zr=e=>{const t=A(e=>e.AppLayout),{t:i}=Me();return f(x,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),i("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,o)=>g(T,{children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[g(S,{sx:{marginBottom:.2},children:i.actionTime}),f(at,{children:["via ",i.actionMethod]})]}),f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId?i?.personId+"":void 0,style:{m:1,width:70,height:70}}),o!==e.actionHistory.length-1?g(S,{sx:{marginTop:11,position:"absolute"},children:"|"}):g(T,{})]}),f(S,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[f(S,{sx:{width:"100%"},children:["ltr"===t.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),g(S,{sx:{width:"100%"},children:"ltr"===t.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},Qr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let n=!0;if(e.authority&&(n=i.isUserAuthorized(e.authority)),n)return f(T,{children:[g(o,{}),f(v,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else Pe.error(t("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?g(Re,{style:{marginRight:5,marginLeft:5},icon:e.icon}):g(T,{}),e?.label?t(e.label):g(T,{})]})]})},$r=z(e)({display:"grid",alignItems:"center"}),jr=z(t)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Zr=z(F)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),Jr=e=>{const{t:p}=Me(),u=Zt(),h=!e?.templateProps?.editAction?.authority||u.isUserAuthorized(e.templateProps.editAction.authority),m=wi(e?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},e?.templateProps?.data||[],e?.templateProps?.keyColumnName||"id");return f(i,{children:[h&&"none"!=e?.templateProps?.editMode?.editMode&&(void 0===e?.templateProps?.hideCreateBtn||!1===e?.templateProps?.hideCreateBtn)?f(v,{onClick:e?.handleCreateNewRecord,children:[g(Re,{icon:"add",style:{marginRight:5,marginLeft:5}}),p("ADD_BTN_LABEL")]}):g(T,{}),e?.templateProps?.rowActions?e.templateProps.rowActions.map((t,i)=>!0===t?.gridActionProps?.multiRecord?ge(Qr,{...t,key:i,reloadData:async()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:m.selectedRecordIds,recordsToProcessActionOn:m.selectedRecords}):null):g(T,{}),g(S,{sx:{flex:1,mx:.5,my:.5,padding:1},children:e?.templateProps?.tBar}),g(V,{title:"Columns",children:g(o,{render:g(t,{}),children:g(r,{fontSize:"small"})})}),g(V,{title:"Filters",children:g(n,{render:(e,i)=>g(t,{...e,color:"default",children:g(Q,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:g(a,{fontSize:"small"})})})})}),e?.templateProps?.gridStateKey?g(V,{title:p("RESET_GRID_STATE"),children:g(U,{onClick:e?.clearGridState,children:g(Re,{icon:"eraser"})})}):g(T,{}),g($,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),g(V,{title:p("EXPORT_EXECL_LABEL"),children:g(s,{render:g(j,{}),children:g(Re,{icon:"file-excel",color:"green"})})}),f($r,{children:[g(l,{render:(e,t)=>g(V,{title:p("SEARCH_BTN_LABEL"),enterDelay:0,children:g(jr,{...e,ownerState:{expanded:t.expanded},color:"default","aria-disabled":t.expanded,children:g(Re,{icon:"search"})})})}),g(d,{render:({ref:e,...t},i)=>g(Zr,{...t,ownerState:{expanded:i.expanded},inputRef:e,"aria-label":"Search",placeholder:`${p("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:g(Z,{position:"start",children:g(Re,{icon:"search"})}),endAdornment:i.value?g(Z,{position:"end",children:g(c,{edge:"end",size:"small","aria-label":"Clear search",children:g(Re,{icon:"xmark"})})}):null,...t.slotProps?.input},...t.slotProps}})})]}),g(U,{onClick:()=>{e.templateProps.apiActions.reloadData(e?.templateProps?.gridLoadParametersValues)},children:g(Re,{icon:"refresh"})})]})},Xr=e=>{const{t:t}=Me(),i=Zt(),{ConfirmationWindow:o,setOpen:r}=jt({body:t(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:t("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.record)),e?.reloadData&&e.reloadData()}});let n=!0;e.authority&&(n=i.isUserAuthorized(e.authority));let a={};e?.getActionIconStyleForRecord&&(a=e.getActionIconStyleForRecord(e.record));let s=!0;e?.isActionVisibleForRecord&&(s=e?.isActionVisibleForRecord(e.record));let l=!1;if(e?.isActionDisabledForRecord&&(l=e.isActionDisabledForRecord(e.record)),n&&s)return f(T,{children:[g(o,{}),g(p,{disabled:l,icon:g(V,{title:e?.label?t(e.label):"",children:g(Re,{icon:e.icon,style:{...a,color:l?"gray":null!=a?.color?a.color:void 0}})}),showInMenu:e?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!l){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):(await e.actionFn(e.record),!0===e?.gridActionProps?.reloadGridAfterAction&&e?.reloadData&&e.reloadData())}}})]})};let en=-1;const tn=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},on=(e,t)=>{const i=tn(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},rn=["__check__","actions"],nn=e=>{const{t:t}=Me(),{handleGetRequest:i}=$t(),o=A(e=>e.commonStores.stores),r=A(e=>e.AppLayout),[n,a]=me({}),[s,l]=me(!0),{getLookupOptions:d}=(()=>{const{handleGetRequest:e}=$t(),t=A(e=>e.AppLayout),i=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let o=await i(e.lookupType);return{...e,options:o,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:i}})(),{Window:c,setWindowState:y}=Jt({windowTitle:t(e.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),{Window:I,setWindowState:_}=Jt({windowTitle:t(e.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{e?.apiActions?.reloadData(e.gridLoadParametersValues)}}),[E,O]=me([]),C=Ni(e.formElements),N=[],R=he.useMemo(()=>e?.gridStateKey?tn(e.gridStateKey):{},[]);for(const e of C)!0===e?.gridProps?.hidden&&N.push(e.fieldName);let b={};if(R?.columnVisibilityModel){b=R.columnVisibilityModel;const e=Object.keys(b);for(const t of N)e.includes(t)||(b[t]=!1)}else for(const e of N)b[e]=!1;const w=A(e=>e.AppLayout.appDirection),[P,v]=he.useState(b),[L,M]=he.useState(R.columnOrder||[]),[D,x]=he.useState(R.columnWidths||{}),[F,B]=me(R.columnGroupingModel||[]);let q=R?.pinnedColumns?.left||[];q=q.filter(e=>!rn.includes(e));let W=R?.pinnedColumns?.right||[]||[];W=W.filter(e=>!rn.includes(e));const[G,H]=me({left:[..."ltr"===w?rn:[],...q],right:[..."rtl"===w?rn:[],...W]}),Y=Zt(),K=Ue(),[z,Q]=me(null),[j,Z]=me(null),[te,ie]=me({}),oe=async(e,t,o)=>{let r=[];return e?await i({endPointURI:e,showMask:!1,parameters:t,successCallBkFn:e=>{r=e.data}}):o&&await i({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:o,...t},successCallBkFn:e=>{r=e.data}}),r},re=async()=>{let i=Ri(C,"row"===e?.editMode?.editMode||!1,t);for(let e of i)if(e?.lookupType&&(e.displayField="ltr"===r.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await d(e.lookupType),e.valueField="lookupValue"),"custom"===e.type){if(e?.options)continue;e.options=e?.commonStoreKey?o[e.commonStoreKey]?.data||[]:await oe(e?.storeUrl,e?.storeLoadParam,e?.dataQueryId)}O(i)},[ne,ae]=me({ids:new Set,type:"include"});let se="id";e?.keyColumnName&&(se=e?.keyColumnName);const le=e.setData;let de=null;de=e?.validationSchema?e.validationSchema:He.object(bi(C));let ce=!0;e?.editAction?.authority&&(ce=Y.isUserAuthorized(e.editAction.authority));let pe=!0;e?.deleteAction?.authority&&(pe=Y.isUserAuthorized(e.deleteAction.authority));const{ConfirmationWindow:ue,setOpen:ge}=jt({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let t=!0;z&&!0===z?.isNew||(t=await e.apiActions.deleteRecordById(z[se])),t&&(e?.deleteAction?.postActionCallBack&&await e.deleteAction.postActionCallBack(z),le(e=>e.filter(e=>e[se]!=z[se])))}});let Te,ye,Ae,Ie,_e,Ee;"modal"===e?.editMode?.editMode&&(Te=e?.editMode?.specs?.modalHeight||"fit-content",ye=e?.editMode?.specs?.modalWidth||"300",Ae=e?.editMode?.specs?.modalMinHeight,Ie=e?.editMode?.specs?.modalMinWidth,_e=e?.editMode?.specs?.modalIcon||"window",Ee=e?.editMode?.specs?.modalTitle||"Record Form");const{Window:Oe,setWindowState:Ce}=Jt({height:Te,minHeight:Ae,minWidth:Ie,onCloseCallBack:()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},width:ye,windowIcon:_e,windowTitle:Ee}),Ne={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(e?.rowActions?30*e.rowActions.length:0)+(e?.editAction&&e?.editAction?.isEnabled?30:0)+(e?.deleteAction&&e?.deleteAction?.isEnabled?30:0)+(e?.attachment?30:0)+(e?.workFlowDocumentCode?30:0),getActions:i=>{const o=i.row,r=[];if("none"!=e?.editMode?.editMode&&(void 0===e?.disableDefaultAction||!e.disableDefaultAction)){const i=te[o[se]]?.mode===m.Edit;if("row"===e.editMode.editMode&&i)ce&&(r.push(g(p,{icon:g(Re,{icon:"save"}),label:t("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[se];ie({...te,[t]:{mode:m.View}})})(o)}})),r.push(g(p,{icon:g(Re,{icon:"cancel"}),label:t("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[se];t&&Dr(t)&&t<0?(ie({...te,[t]:{mode:m.View,ignoreModifications:!0}}),le(e=>{const i=e.filter(e=>e[se]!=t);return i})):ie({...te,[t]:{mode:m.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(e?.editAction&&!0===e?.editAction?.isEnabled){let i=!0;e?.editAction?.isActionVisibleForRecord&&(i=e?.editAction?.isActionVisibleForRecord(o));let n=!1;e?.editAction?.isActionDisabledForRecord&&(n=e?.editAction?.isActionDisabledForRecord(o)),ce&&i&&r.push(g(p,{disabled:n,icon:g(V,{title:t("EDIT_BTN_LABEL"),children:g(Re,{icon:"edit",style:{color:n?"gray":void 0}})}),showInMenu:e?.editAction?.gridActionProps?.showInMenu||!1,label:t("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{ce&&!n&&(async t=>{if(t)if(Z(t),"form"===e.editMode.editMode)K(e.editMode.specs.formRoute+"/"+t[se]);else if("modal"===e.editMode.editMode)Ce(!0);else if("row"===e?.editMode?.editMode){const e=t[se];ie({...te,[e]:{mode:m.Edit}})}})(o)}}))}if(e?.deleteAction&&!0===e?.deleteAction?.isEnabled){let i=!0;e?.deleteAction?.isActionVisibleForRecord&&(i=e?.deleteAction?.isActionVisibleForRecord(o));let n=!1;e?.deleteAction?.isActionDisabledForRecord&&(n=e?.deleteAction?.isActionDisabledForRecord(o)),pe&&i&&r.push(g(p,{disabled:n,icon:g(V,{title:t("DELETE_BTN_LABEL"),children:g(Re,{icon:"trash",style:{color:n?"gray":void 0}})}),showInMenu:e?.deleteAction?.gridActionProps?.showInMenu||!1,label:t("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(pe&&!n){if(e?.deleteAction?.preActionValidation&&!e.deleteAction.preActionValidation(o))return;Q(o),ge(!0)}}}))}}}if((o[e?.keyColumnName]||o.id&&o.id>0)&&e?.attachment&&r?.push(g(p,{icon:g(V,{title:"Attachments",children:g(Re,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{a(o),l(!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(o)),y(!0)}})),(o[e?.keyColumnName]||o.id&&o.id>0)&&e?.workFlowDocumentCode&&r?.push(g(p,{icon:g(V,{title:"Approvals",children:g(Re,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{a(o),_(!0)}})),o[e?.keyColumnName||"id"]&&o[e?.keyColumnName||"id"]>0&&e?.rowActions)for(const t of e.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||r.push(g(Xr,{...t,record:o,reloadData:async()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)}}));return r}};let be=[];(void 0===e?.disableDefaultAction||!e.disableDefaultAction||e?.rowActions&&e?.rowActions.length>0)&&be.push(Ne),be=[...be,...E];fe(()=>{void 0!==e?.autoLoad&&!0!==e.autoLoad||e.apiActions.reloadData(e?.gridLoadParametersValues),re()},[]),fe(()=>{e.apiActions.reloadData(e?.gridLoadParametersValues)},[Y.UserInfo?.currentOrganization]),fe(()=>{re()},[w,e.formElements]);const we=he.useMemo(()=>{const e=be.map(e=>({...e}));if(L.length){const t=new Map(e.map(e=>[e.field,e]));return L.map(e=>t.get(e)).filter(Boolean)}return e},[L,D,be]);return f(T,{children:[g(ue,{}),"modal"===e?.editMode?.editMode?g(Oe,{children:e?.editMode?.specs?.formComponent?g(e.editMode.specs.formComponent,{recordIdToEdit:j?j[se]:void 0,formCloseCallBk:()=>{Ce(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)}}):g(pn,{keyColumnName:e.keyColumnName,attachment:e.attachment,formValuesChangeCallBk:e?.formProps?.formValuesChangeCallBk,recordIdToEdit:j?j[se]:void 0,formCloseCallBk:()=>{Ce(!1),e.apiActions.reloadData(e?.gridLoadParametersValues)},elements:e.formElements,apiActions:e.apiActions,editAuthorityKey:e?.editAction?.authority,formSavedSuccessfullyCallBk:e?.editAction?.postActionCallBack,preSaveValidation:e?.editAction?.preActionValidation,actions:e?.rowActions})}):g(T,{}),void 0!==e?.hideInfoBar||e?.hideInfoBar?g(T,{}):f(S,{sx:{display:"flex"},children:[void 0!==e?.hideBackButton||e?.hideBackButton?g(T,{}):g(U,{onClick:()=>{K(-1,{replace:!0})},children:g(Re,{icon:"ltr"===w?"arrow-left":"arrow-right"})}),f(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[e?.girdIcon?g(Re,{icon:e.girdIcon,style:{marginRight:5,marginLeft:5}}):g(T,{}),g(k,{variant:"h5",children:e?.gridTitle?Ur(t(e?.gridTitle)):""})]})]}),e?.gridLoadParameters&&e?.gridLoadParameters.length>0&&e?.gridLoadParametersValues&&e?.setGridLoadParametersValues?f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(u,{}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(pn,{saveButtonSpecs:{label:t("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{null!=t?e.setGridLoadParametersValues(t):e.setGridLoadParametersValues({}),e.apiActions.reloadData(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:e.gridLoadParameters})})})]}):g(T,{}),e?.attachment?g(c,{children:g(Vr,{attachmentCode:e.attachment.attachmentCode,refKey:n[e?.keyColumnName||"id"],enableAttachment:s})}):g(T,{}),e?.workFlowDocumentCode?g(I,{children:g(cn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:n[e?.keyColumnName||"id"],postActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)},cancelActionCallBk:()=>{_(!1),e.apiActions.reloadData(e.gridLoadParametersValues)}})}):g(T,{}),g(h,{...e?.muiProps,slots:{toolbar:Jr},slotProps:{toolbar:{templateProps:{...e,rowSelectionModel:ne,data:e?.data},handleCreateNewRecord:()=>{if("form"===e?.editMode?.editMode)K(e.editMode.specs.formRoute);else if("modal"===e?.editMode?.editMode)Z(null),Ce(!0);else if("row"===e?.editMode?.editMode){en-=1;const e={};e[se]=en,e.isNew=!0;for(const t of E)"actions"!=t?.type&&t?.field!=se&&t?.field&&(e[t.field]=null);le(t=>[e,...t]),ie(e=>({...e,[en]:{mode:m.Edit}}))}},clearGridState:()=>{e?.gridStateKey&&localStorage.removeItem(e.gridStateKey),v({}),M([]),x({}),B([]),H({left:[..."ltr"===w?rn:[]],right:[..."rtl"===w?rn:[]]})}}},getRowId:e=>e[se],showToolbar:!0,rows:e?.data,columns:we,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==e.editMode.editMode?te:void 0,onRowModesModelChange:"row"==e.editMode.editMode?e=>{ie(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===e.editMode.editMode){let i=null;const o=(e=>{try{de.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof He.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(t);if(o){const e=o.split(",");throw Pe.error(g("div",{style:{},children:e.map(e=>f(T,{children:[g("div",{children:e}),g($,{})]}))})),new Error(o)}if(e?.editAction?.preActionValidation&&!e.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[se]&&Dr(t[se])&&Number(t[se])<0&&(r[se]=null),i=await e.apiActions.saveRecord(r),null==i)throw new Error("Failed to process your request, contact your administrator");return e?.editAction?.postActionCallBack&&await e.editAction.postActionCallBack(t),!0===t?.isNew&&le(e=>{const o=e.filter(e=>e[se]!==t[se]);return[i,...o]}),!0===e?.editMode?.reloadAfterSave&&e?.apiActions?.reloadData&&e?.apiActions?.reloadData(e?.gridLoadParametersValues),i}},rowSelectionModel:ne,onRowSelectionModelChange:e=>{ae(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:t=>{v(t),e?.gridStateKey&&on(e.gridStateKey,{columnVisibilityModel:t})},onColumnOrderChange:t=>{const{column:i,targetIndex:o}=t;M(t=>{const r=t.length?[...t]:be.map(e=>e.field),n=r.indexOf(i.field);return-1===n||(r.splice(n,1),r.splice(o,0,i.field),e?.gridStateKey&&on(e.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:F,onRowGroupingModelChange:t=>{(t=>{B(t),e?.gridStateKey&&on(e.gridStateKey,{columnGroupingModel:t})})(t)},sx:{width:"100%"}})]})},an=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},sn=e=>{const[t,i]=me([]);return fe(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));i(t)},[e.reportData]),g(nn,{data:t,disableDefaultAction:!0,setData:e.setReportData,formElements:an(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},ln=e=>{const[t,i]=me({...e?.initialParameterValues}),o=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,t);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:t}=Me();return f(J,{defaultExpanded:!0,sx:{width:"100%"},children:[g(X,{expandIcon:g(Re,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(Re,{style:{marginLeft:5,marginRight:5},icon:"search"}),g(k,{component:"span",children:"Filters"})]})}),g(ee,{children:g(S,{children:g(pn,{saveButtonSpecs:{label:t("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:t("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:t("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{i({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{i(null!=t?t:{}),e&&await e(t)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o})})})]})},parametersValues:t,setParametersValues:i,panelElements:o}},dn=e=>{const[t,i]=me(null),[o,r]=me(null),[n,a]=me([]),[s,l]=me("WAITING_REPORT_CODE"),{handleGetRequest:d,handlePostRequest:c,HandleDownloadHTTPPostPDF:p}=$t(),[u,h]=me(null),{ParameterPanel:m,parametersValues:y,panelElements:A,setParametersValues:I}=ln({parameters:u?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}});fe(()=>{u&&(!0===e?.byPassParameterEntry||0==u.reportParameters.length?(_(y),l("WAITING_RESULT")):l("WAITING_PARAMETER_INPUT"))},[u]);const _=async t=>{l("WAITING_RESULT"),"Excel"===u?.reportType?await c({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT"),a(e.data)}}):u?.reportType&&await p({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{l("SHOWING_RESULT");const t=e.headers["content-disposition"];let o="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(o=e[1])}if(o.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),o=URL.createObjectURL(t);i(o)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),i=window.URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),l("ERROR")}})};return fe(()=>{e?.reportCode&&(async()=>{l("LOADING_METADATA"),await d({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:e=>{h(e.data)},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),l("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[f(S,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[g(Re,{icon:"Excel"===u?.reportType?"file-excel":"file-pdf",color:"Excel"===u?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),u?.reportName]}),"Excel"!=u?.reportType&&"SHOWING_RESULT"===s?f(T,{children:[!0===e?.byPassParameterEntry?g(T,{}):u?.reportParameters.length>0?g(U,{onClick:()=>{l("WAITING_PARAMETER_INPUT")},children:g(Re,{icon:"filter"})}):g(T,{}),g(U,{children:g(Re,{icon:"refresh",onClick:()=>{_(y)}})})]}):g(T,{})]}),g(S,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===s&&"Excel"!=u?.reportType?g(m,{searchBtnClickCallBk:_}):"SHOWING_RESULT"===s||("WAITING_PARAMETER_INPUT"===s||"WAITING_RESULT"===s)&&"Excel"===u?.reportType?"Excel"===u?.reportType?g(sn,{reportData:n,setReportData:a,reloadReport:async()=>{_(y)},gridLoadParameters:A,gridLoadParametersValues:y,setGridLoadParametersValues:I}):g("iframe",{src:t,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===s?f(S,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[g(Re,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),o]}):g(T,{})})]})},cn=e=>{const t=Ue(),i=A(e=>e.AppLayout),{isUserAuthorized:o,UserInfo:r}=Zt(),{handleGetRequest:n,handlePostRequest:a}=$t(),[s,l]=me(null),[d,c]=me([]),{t:p}=Me(),[u,h]=me(null),[m,y]=me({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:I,setWindowState:_}=Jt({windowTitle:"ltr"===i.appDirection?m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"Document":m?.workflowDocument&&m?.referencedDocument?`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),E=async()=>{await n({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{y(structuredClone(e.data))},failureCallBkFn:()=>{y({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},O=async()=>{await a({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:m?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:s.id,refDocumentStatus:m?.workflowDocumentStatus?.documentStatusCode,actionComment:u},successCallBkFn:async t=>{s?.post_action_endpoint?await a({endPointURI:s.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{E(),e?.postActionCallBk&&e.postActionCallBk()}}):E()}})};return fe(()=>{e.refDocumentId&&e.workFlowDocumentCode&&E()},[e.refDocumentId,e.workFlowDocumentCode]),fe(()=>{c(m?.nextActions&&m?.nextActions?.length>0?m.nextActions.filter(e=>{if(!m?.workflowDocumentStatus?.nextActionTakersAuthority&&!m?.nextActionTakers)return!0;if(m?.workflowDocumentStatus?.nextActionTakersAuthority&&o(m.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(m?.nextActionTakers)for(const e of m.nextActionTakers)if(r?.username==e?.username||r?.username==e?.USERNAME||r?.email==e?.email||r?.email==e?.EMAIL||r?.employeeNumber==e?.employeeNumber||r?.employeeNumber==e?.EMPLOYEE_NUMBER)return!0;return!1}):[])},[m.nextActions,m.nextActionTakers]),f(T,{children:[m?.workflowDocumentReport?.id?g(I,{children:g(dn,{reportCode:m?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):g(T,{}),m?.workflowDocument?f(S,{sx:{width:"100%",maxWidth:600,textAlign:"center",fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{t(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?`${m?.workflowDocument?.documentEnName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`:`${m?.workflowDocument?.documentArName} # ${m?.referencedDocument[m?.workflowDocument?.documentNumberField]}`,m?.workflowDocumentStatus?"ltr"===i.appDirection?` ( ${m?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${m?.workflowDocumentStatus?.documentStatusArName} )`:"",g(S,{sx:{flex:1}}),m?.workflowDocumentReport?.id?g(v,{onClick:()=>{_(!0)},variant:"outlined",startIcon:g(Re,{icon:"eye"}),children:p("VIEW_LABEL")}):g(T,{})]}):g(T,{}),f(S,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[d?.length>0?f(x,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[g(ci,{sx:{marginBottom:2,width:400},label:p("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===i.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:s?.id,options:d,onChangeCallBack:(e,t)=>{l(t)}}),g(ni,{sx:{width:400},rows:3,value:u,onChange:e=>{h(e.target.value)},multiline:!0,label:p("WF_COMMENT_LABEL")}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(v,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=s&&null!=s?.id?!0!==s.require_comment&&1!==s.require_comment&&"true"!==s.require_comment||null!==u&&""!==u?s?.pre_action_endpoint?await a({endPointURI:s.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:s.id},successCallBkFn:()=>{O()}}):O():Pe.error("You must enter comment for the action to be processed"):Pe.error("You must select action to process")},children:p("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?g(v,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:p("WF_CANCEL_BTN_LABEL")}):g(T,{})]}),m?.nextActionTakers&&m.nextActionTakers.length>0?f(T,{children:[g($,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",p("WF_WAITING_FOR_LABEL")]})}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:m.nextActionTakers.map(e=>f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),f(S,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[g("div",{children:"ltr"===i.appDirection?e?.employee_en_name:e?.employee_ar_name}),g("div",{children:e?.email?f(T,{children:[g(Re,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):g(T,{})}),g("div",{children:e?.mobile_number?f(T,{children:[g(Re,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):g(T,{})})]})]}))})]}):g(T,{})]}):g(T,{}),m?.actionsHistory.length>0?g(zr,{actionHistory:m.actionsHistory}):f(x,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[f(S,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[g(Re,{icon:"history",style:{marginRight:10,marginLeft:10}}),p("WF_ACTION_HISTORY_LABEL")]}),g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},pn=e=>{const{Window:t,setWindowState:i}=Jt({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[o,r]=me(!0),{t:n}=Me(),a=Ni(e.elements),[s,l]=me([]),[d,c]=me([]),p={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(p[t.props.fieldName]=t.props.defaultValue);let u=null;u=e?.validationSchema?e.validationSchema:Ge.object(bi(a));const h=ke({resolver:We(u),defaultValues:p}),m=h.watch(),y=xe(),A=e?.formRouteRecordIdParamName,I=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:A&&y[A]&&(t=y[A]),t){const i=await e.apiActions.loadRecordById(t);if(i){h.reset({...i});for(const e of a)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?h.setValue(e.fieldName,i[e.fieldName]+""):h.setValue(e.fieldName,i[e.fieldName]));e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(m,O,h)}}else h.reset({}),e.formValuesChangeCallBk(m,O,h)},{Window:_,setWindowState:E}=Jt({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await I()}}),O={setFieldValue:(e,t)=>{h.setValue(e,t)},hideField:e=>{c(t=>[...t,e])},showField:e=>{c(t=>t.filter(t=>t!==e))},disableField:e=>{l(t=>[...t,e])},enableField:e=>{l(t=>t.filter(t=>t!==e))}};return fe(()=>{const e=[],t=[];for(const i of a)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);c(e),l(t)},[e.elements]),fe(()=>{I()},[e?.recordIdToEdit]),fe(()=>{r(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(m))},[m]),f(T,{children:[e?.attachment?g(t,{children:g(Vr,{attachmentCode:e.attachment.attachmentCode,refKey:m[e?.keyColumnName||"id"],enableAttachment:o})}):g(T,{}),e?.workFlowDocumentCode?g(_,{children:g(cn,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:m[e?.keyColumnName||"id"],postActionCallBk:()=>{E(!1),I()},cancelActionCallBk:()=>{E(!1),I()}})}):g(T,{}),g(Sr,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:g(B,{sx:{width:"100%"},container:!0,children:e.elements.map((t,i)=>"group"===t.type?g(Hr,{...t.props,formManager:h,formValues:m,formActions:O,hiddenFields:d,disabledFields:s,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"props"===t.mode?g(Wr,{fieldInfo:t.props,formManager:h,formValues:m,formActions:O,hiddenFields:d,disabledFields:s,formValuesChangeCallBk:e.formValuesChangeCallBk},i):"field"===t.type&&"node"===t.mode?g(B,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:g(t.node,{formManager:h,formValues:m})},i):void 0)})}),f(Sr,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[m[e?.keyColumnName||"id"]&&e?.attachment?g(V,{title:"Attachments",children:g(U,{onClick:()=>{i(!0)},children:g(Re,{icon:"paperclip"})})}):null,m[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?g(V,{title:"Approvals",children:g(U,{onClick:()=>{E(!0)},children:g(Re,{icon:"stamp"})})}):null,e?.actions?e.actions.map(t=>!1===t?.isIdRequired?g(Gr,{...t,record:m}):m[e?.keyColumnName||"id"]?!0===t?.formActionProps?.enabled?g(Gr,{...t,record:m}):g(T,{}):void 0):g(T,{}),g("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?g(Re,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:h.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(h.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{Pe.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:n(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?g(T,{}):g(v,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?g(Re,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),h.reset(p)},children:n(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},un=()=>{const{workflowDocumentCode:e,refDocumentId:t}=xe();return g(cn,{workFlowDocumentCode:e,refDocumentId:t})},hn=e=>g(st,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),mn=e=>f(x,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[g(S,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:g("div",{children:e.record[e.valueField]})}),g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),fn=e=>f(T,{children:[g(k,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(lt,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),gn=e=>g(dt,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Tn(e){return f(pt,{sx:{display:"flex",alignItems:"center"},children:[g(pt,{sx:{width:"100%",mr:1},children:g(ct,{variant:"determinate",...e})}),g(pt,{sx:{minWidth:35},children:g(at,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const yn=e=>f(pt,{sx:{width:"100%"},children:[g(at,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),g(Tn,{value:e.record[e.valueField]/e.total*100})]}),An=e=>{const t=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return g(ut,{series:[{data:t}]})},In=e=>{const[t,i]=me(!0),[o,r]=me([]),{handleGetRequest:n}=$t();fe(()=>{e.loadWidget?(async()=>{i(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{i(!1),r(e.data)},failureCallBkFn:()=>{i(!1),r([])}})})():i(!1)},[e.loadWidget,e.loadCounter]);let a=0;if(1==o.length)a=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of o)a+=t[e.verticalAxisField];return f(T,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?f(S,{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):g(T,{}),g(S,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:t?f(T,{children:[g(Re,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),g("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?g(hn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?g(gn,{data:o,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?g(An,{data:o,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):f(B,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[g(B,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),o.map((t,i)=>"Card"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(mn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},i)}):"CircularProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(fn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):"LinearProgress"===e.widgetType?g(B,{size:{md:3,xs:12},children:g(yn,{widgetTitle:"",record:t,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:a},i)}):void 0)]})})]})},_n=e=>{const[t,i]=me({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:o,parametersValues:r}=ln({parameters:t?.dashboardParameters||[],initialParameterValues:{}}),[n,a]=me(0),[s,l]=me(!1);fe(()=>{if(null!=t.dashboardCode&&null!=t.dashboardCode&&""!=t.dashboardCode){l(!1);let e=!0;if(t?.dashboardParameters.length>0)for(const i of t?.dashboardParameters)if(!0===i?.mandatory&&(void 0===r[i.parameterCode]||null===r[i.parameterCode]||""===r[i.parameterCode])){e=!1;break}e&&l(e),a(n+1)}},[t?.dashboardParameters,r]);const d=Ue(),{handleGetRequest:c,handlePostRequest:p}=$t();return fe(()=>{e.dashboardCode&&(async()=>{await c({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{i(e.data)},failureCallBkFn:()=>{i(null)}})})()},[e.dashboardCode,e.parameters]),g(T,{children:t?f(T,{children:[f(S,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(U,{onClick:()=>{d(-1,{replace:!0})},children:g(Re,{icon:"arrow-left"})}),g(S,{sx:{flex:1}}),g(Re,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),g(S,{children:t?.dashboardTitle}),g(S,{sx:{flex:1}})]}),t?.dashboardParameters.length>0?g(o,{searchBtnClickCallBk:async e=>{a(n+1)}}):g(T,{}),g(B,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:t?.widgets.map((e,t)=>g(B,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:g(In,{...e,parameterValues:r,loadWidget:s})},t))})]}):g(S,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},En=()=>{const{dashboardCode:e}=xe();return g(_n,{dashboardCode:e})},On=e=>{const{UserSession:t}=Zt(),i=A(e=>e.AppLayout),o=y(),{handlePostRequest:r}=$t(),[n,a]=me(t.value.currentOrganization.id);return f(S,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[g(ci,{sx:{width:"100%"},displayField:"ltr"===i.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:t.value.userOrganizations,value:n,onChangeCallBack:e=>{a(e)}}),g(v,{sx:{m:1},variant:"contained",disabled:null==n||n===t.value.currentOrganization.id,onClick:async()=>{await r({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:t.value.username,orgId:n},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),i.token=null,o(zt.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},Cn=be({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Nn,setSideBarState:Rn}=Cn.actions;var bn=Cn.reducer;function wn(e,t){const i=Te(e);fe(()=>{i.current=e},[e]),fe(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const Pn=te`
32
32
  0% { transform: scale(1); opacity: 1; }
33
33
  25% { transform: scale(1); opacity: 0.6; }
34
34
  50% { transform: scale(1); opacity: 1; }
35
35
  75% { transform: scale(1); opacity: 0.6; }
36
36
  100% { transform: scale(1); opacity: 1; }
37
- `,vn=e=>{const t=Ue(),i=y(e=>e.AppLayout),{handlePostRequest:o}=$t();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:Fr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g($,{flexItem:!0}):g(T,{})]})},Ln=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=$t(),n=Ue(),a=y(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);wn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&Pe.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g(Q,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g($,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(vn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g($,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Sn=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=$t();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g($,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ni,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ni,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ni,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),Pe.success("Your request has been processed successfully")},showMask:!0}):Pe.error("You must enter new password in required fields and must be identical"):Pe.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Mn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=y(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Dn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=y(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=y(e=>e.AppLayout),l=y(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=$t(),m=Ut(),I=A();return f(T,{children:[g(p,{children:g(Sn,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})}),g(e,{children:g(On,{successChangeCallBackFn:()=>{t(!1)}})}),g(Mn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Nn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),m?g(T,{}):g(Yr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?Ln:T,{}),m?g(T,{}):g("div",{onClick:a,style:{cursor:"pointer"},children:g(Yr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},kn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),Un=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=Un(e,i.children);if(t)return t}}},xn=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function Fn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Bn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${yt.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),qn=Ie(Et)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:_e(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),Wn=ft(Tt);function Gn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(Wn,{style:t,...e})}const Hn=Ie(at)({color:"inherit",fontWeight:500});function Yn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=y(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Hn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(Fn,{})]})}const Kn=e=>Array.isArray(e)?e.length>0&&e.some(Kn):Boolean(e),Vn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:A}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),y=A.getItem(o),I=Kn(a);return g(bt,{itemId:o,children:f(Bn,{...l(s),children:[f(qn,{...d({className:vr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Yn,{...u({icon:y?.icon||"book",expandable:I&&T.expanded})}),g(wt,{...m()})]}),a&&g(Gn,{...h()})]})})});function zn(){const e=Ue(),t=y(e=>e.AppLayout),i=y(e=>e.AppInfo.value),o=A(),r=Ut(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:a}=Zt(),s=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||n(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||a(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=s(i.children)),t.push(e)}return t},l=[];i.enableAdministrationModule&&l.push(...structuredClone(xn)),l.push(...structuredClone(i.businessNavigationItems));const d=s(l);return g(At,{items:d,onItemClick:(t,i)=>{const n=Un(i,l);"NAVIGATION"===n?.action&&null!=n?.actionPayload&&(e(n?.actionPayload?.path||""),r&&o(Nn()))},sx:{height:"fit-content",flexGrow:1,maxWidth:xt,direction:t.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Vn}})}const Qn=()=>{const e=y(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=y(e=>e.AppLayout),n=y(e=>e.SideBar),a=A();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(kn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Nn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(zn,{})]})},$n=Lt({key:"muirtl",stylisPlugins:[vt,Pt]}),jn=Lt({key:"mui"}),Zn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(li,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{Pe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Jn=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=y(e=>e.commonStores.stores.SystemOrganizations.data),a=y(e=>e.commonStores.stores.SystemOrganizationRanks.data),s=y(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:l}=Me(),[d,c]=me([]),p=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return f(T,{children:[g(o,{children:g(Zn,{selectedRecord:t,closeModalFn:()=>{r(!1)}})}),g(nn,{apiActions:p,hideInfoBar:!0,data:d,setData:c,editMode:{editMode:"row"},formElements:u,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{i(e),r(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=$t(),n=y(e=>e.commonStores.stores.SystemOrganizationRanks),a=A();return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=$t(),r=y(e=>e.commonStores.stores.SystemOrganizationUnits),n=A(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=y(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(nn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},ia=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=y(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=$t();return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},oa=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},ra=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(li,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{Pe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},na=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(ra,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(nn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{r(e),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},aa=e=>{const t=y(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},sa=()=>{const e=y(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(nn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},la=e=>{const{t:t}=Me(),i=y(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return g(nn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},da=[{value:"FILE_SYSTEM"},{value:"SFTP"}],ca=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},pa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(nn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!xr(t.recipientMail)?(Pe.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},ua=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(nn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},ha=e=>{const t=y(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:t,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(nn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ma={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},fa=(e,t,i)=>{if(e&&ma[e]){const o=ma[e],r=Object.keys(o);for(const e of r){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},ga=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Ta=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:y(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Aa=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=$t(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return f(T,{children:[g(o,{children:g(Ta,{selectedRecord:t})}),g(nn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},ya=e=>{const{t:t}=Me(),[i,o]=me([]),r=y(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(nn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ia=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Yr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(T,{children:g(nn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:r,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Jn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Xn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:ea,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ta,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=y(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=y(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:A,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return f(T,{children:[g(h,{children:g(Zn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Jn,{selectedPerson:t})}),g(A,{children:g(Sn,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(nn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(Pe.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(Pe.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:i});return g(T,{children:g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:ia,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:oa,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:na,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=Me(),{handleGetRequest:t}=$t(),[i,o]=me([]),r=oi({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:o}),n=y(e=>e.commonStores.stores.SystemApplicationModules.data);return g(nn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:ta,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Xn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(nn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=y(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:r,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return f(T,{children:[g(i,{children:g(aa,{selectedRecord:e})}),g(nn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=$t(),t=y(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{Pe.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=y(e=>e.commonStores.stores.SystemDataQueries.data);return g(nn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",pi):i.setValue("parameterValueFormat",ui)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",ui)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:sa,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=y(e=>e.commonStores.stores.SystemDataSources.data),c=y(e=>e.commonStores.stores.SystemDataQueries.data),p=y(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:da,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:p,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return f(T,{children:[g(o,{children:g(dn,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(la,{selectedRecord:t})}),g(nn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:ca},formElements:h,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(Pe.error("You must choose the report query"),!1):(Pe.error("You must choose the report blueprint"),!1):(Pe.error("You must enter the jasper report name"),!1):(Pe.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=y(e=>e.commonStores.stores.SystemDataQueries.data),t=y(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:t,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return f(T,{children:[g(r,{children:g(pa,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(ua,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(ha,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(nn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(Pe.error("You must specifiy the start sending time since this email is periodical"),!1):(Pe.error("You must specifiy the period value since this email is periodical"),!1):(Pe.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){fa(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{fa(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=y(e=>e.commonStores.stores.SystemOrganizations.data),s=y(e=>e.commonStores.stores.SystemReports.data),l=y(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:a,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:s,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:l,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return f(T,{children:[g(i,{children:g(ga,{selectedRecord:e})}),g(r,{children:g(Aa,{selectedRecord:e})}),g(nn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=Me(),t=y(e=>e.commonStores.stores.SystemDataQueries.data),i=y(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(ya,{selectedRecord:t})}),g(nn,{apiActions:l,data:n,setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:En},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=Me(),[t,i]=me([]),{handlePostRequest:o}=$t(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=y(e=>e.commonStores.stores.SystemMailTemplates.data);return g(nn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ia},{path:"dev/system/roles",component:na},{path:"dev/system/lookups",component:sa},{path:"dev/system/modules",component:oa},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:da,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!0,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=y(e=>e.commonStores.stores.SystemTimeIntervals.data),r=y(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:o,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=Zt(),t=y(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=$t(),[r,n]=me([]),a=y(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&wn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(vn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:un}]]],_a=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},Ea=()=>{const e=y(e=>e.AppLayout),t=y(e=>e.AppInfo.value),i=y(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=A(),{show:n,hide:a}=Kt(),s=y(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=$t();fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]);const u=Ut();return g(ce,{value:"ltr"===e.appDirection?jn:$n,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:u?1:3},children:f(Fe,{children:[t.enableAdministrationModule?Ia.map((e,t)=>g(Be,{path:e.path,element:g(_a,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(_a,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Oa=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Ca(e){const{window:t}=e,i=y(e=>e.SideBar),o=y(e=>e.AppInfo.value),r=A(),n=e=>{r(Rn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Oa,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(zn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const Na=()=>{const{t:e}=Me(),t=y(e=>e.loadingMask.value),i=y(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Ra=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void Pe.error("username is required to proceed");if(null==o||""==o)return void Pe.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),Pe.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||hi:e.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||mi:e.appTheme?.dark?.secondaryColor||gi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${e?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:e?.loginScreenStyle?.backgroundColor,zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},ba=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=$t(),o=y(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},wa=({msalInstance:e})=>{const t=y(e=>e.AppInfo.value);y(e=>e.UserSession.value);const[i,o]=me(!1),{handleGetRequest:r}=$t(),n=A(),a=async()=>{localStorage.getItem("TOKEN")?t?.apiBaseUrl&&r({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(o(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};n(zt.setAuthenticated(t))}else n(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{o(!1)}}):(n(zt.setUnAuthenticated()),o(!1))},s=y(e=>e.UserSession.value);fe(()=>{a()},[t]);const l=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:t?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.primaryColor||hi:t.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.secondaryColor||mi:t.appTheme?.dark?.secondaryColor||gi}}});return g(pe,{theme:l,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${t?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:t?.loginScreenStyle?.backgroundColor,zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:t?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:t?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",t.appVersion]}),g(v,{loading:i,onClick:async()=>{o(!0);const i=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});i?.accessToken?(localStorage.setItem("TOKEN",i.accessToken),a()):o(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:g(Re,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Pa=()=>{const e=y(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=y(e=>e.UserSession.value),l=A(),d=async()=>{if(null==t||""==t)return void Pe.error("username is required to proceed");if(null==o||""==o)return void Pe.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),Pe.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=y(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||hi:e.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||mi:e.appTheme?.dark?.secondaryColor||gi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%"},children:[g("img",{src:e?.appLogo,width:70,height:70}),g(k,{sx:{m:1},variant:"caption",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:200,textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:200,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:200,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},va=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=y(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),La=({msalInstance:e})=>{const t=y(e=>e.SideBar),i=y(e=>e.AppInfo.value),o=Ut(),r=y(e=>e.UserSession),n=y(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(Na,{}),!0===r.value.isAuthenticated?f(va,{open:t.isOpened,children:[g(Oe,{}),g(Dn,{}),o?null:g(Qn,{}),o?g(Ca,{}):null,g(kn,{}),g(Ea,{}),g(ba,{})]}):"AZURE"===i.authenticationMethod?g(wa,{msalInstance:e}):g(o?Pa:Ra,{})]})},Sa=be({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),Ma=Sa.actions;var Da=Sa.reducer;const ka={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWorkflows:{autoLoad:!0,url:"api/v1/dev/workflowdocument/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},Ua={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},xa=200,Fa=400,Ba=400,qa=499,Wa=500,Ga=599,Ha="GET",Ya="POST",Ka=[Ua.OPENID_SCOPE,Ua.PROFILE_SCOPE,Ua.OFFLINE_ACCESS_SCOPE],Va=[...Ka,Ua.EMAIL_SCOPE],za="Content-Type",Qa="Content-Length",$a="Retry-After",ja="X-AnchorMailbox",Za="x-ms-request-id",Ja="x-ms-httpver",Xa="active-account-filters",es="common",ts="organizations",is="consumers",os="access_token",rs="xms_cc",ns="login",as="select_account",ss="consent",ls="none",ds="no_session",cs="code",ps="id_token token refresh_token",us="query",hs="fragment",ms="query",fs="authorization_code",gs="refresh_token",Ts="MSSTS",As="ADFS",ys="Generic",Is="-",_s=".",Es={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Os="appmetadata",Cs="1",Ns="authority-metadata",Rs=86400,bs="config",ws="cache",Ps="network",vs="hardcoded_values",Ls={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Ss={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ms=60,Ds=3600,ks="throttling",Us="retry-after, h429",xs="invalid_grant",Fs="client_mismatch",Bs="1",qs="3",Ws="4",Gs="2",Hs="4",Ys="5",Ks="0",Vs="1",zs="2",Qs="3",$s="4",js="pop",Zs="unexpected_error",Js="post_request_failed",Xs={[Zs]:"Unexpected error in authentication.",[Js]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
38
- /*! @azure/msal-common v15.12.0 2025-08-19 */class el extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,el.prototype),this.errorCode=e||Ua.EMPTY_STRING,this.errorMessage=t||Ua.EMPTY_STRING,this.subError=i||Ua.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function tl(e,t){return new el(e,t?`${Xs[e]} ${t}`:Xs[e])}
39
- /*! @azure/msal-common v15.12.0 2025-08-19 */const il="client_info_decoding_error",ol="client_info_empty_error",rl="token_parsing_error",nl="null_or_empty_token",al="endpoints_resolution_error",sl="network_error",ll="openid_config_error",dl="hash_not_deserialized",cl="invalid_state",pl="state_mismatch",ul="state_not_found",hl="nonce_mismatch",ml="auth_time_not_found",fl="max_age_transpired",gl="multiple_matching_tokens",Tl="multiple_matching_accounts",Al="multiple_matching_appMetadata",yl="request_cannot_be_made",Il="cannot_remove_empty_scope",_l="cannot_append_scopeset",El="empty_input_scopeset",Ol="device_code_polling_cancelled",Cl="device_code_expired",Nl="device_code_unknown_error",Rl="no_account_in_silent_request",bl="invalid_cache_record",wl="invalid_cache_environment",Pl="no_account_found",vl="no_crypto_object",Ll="unexpected_credential_type",Sl="invalid_assertion",Ml="invalid_client_credential",Dl="token_refresh_required",kl="user_timeout_reached",Ul="token_claims_cnf_required_for_signedjwt",xl="authorization_code_missing_from_server_response",Fl="binding_key_not_removed",Bl="end_session_endpoint_not_supported",ql="key_id_missing",Wl="no_network_connectivity",Gl="user_canceled",Hl="missing_tenant_id_error",Yl="method_not_implemented",Kl="nested_app_auth_bridge_disabled",Vl={[il]:"The client info could not be parsed/decoded correctly",[ol]:"The client info was empty",[rl]:"Token cannot be parsed",[nl]:"The token is null or empty",[al]:"Endpoints cannot be resolved",[sl]:"Network request failed",[ll]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[dl]:"The hash parameters could not be deserialized",[cl]:"State was not the expected format",[pl]:"State mismatch error",[ul]:"State not found",[hl]:"Nonce mismatch error",[ml]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[fl]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[gl]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Tl]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Al]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[yl]:"Token request cannot be made without authorization code or refresh token.",[Il]:"Cannot remove null or empty scope from ScopeSet",[_l]:"Cannot append ScopeSet",[El]:"Empty input ScopeSet cannot be processed",[Ol]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Cl]:"Device code is expired.",[Nl]:"Device code stopped polling for unknown reasons.",[Rl]:"Please pass an account object, silent flow is not supported without account information",[bl]:"Cache record object was null or undefined.",[wl]:"Invalid environment when attempting to create cache entry",[Pl]:"No account found in cache for given key.",[vl]:"No crypto object detected.",[Ll]:"Unexpected credential type.",[Sl]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Ml]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Dl]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[kl]:"User defined timeout for device code polling reached",[Ul]:"Cannot generate a POP jwt if the token_claims are not populated",[xl]:"Server response does not contain an authorization code to proceed",[Fl]:"Could not remove the credential's binding key from storage.",[Bl]:"The provided authority does not support logout",[ql]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Wl]:"No network connectivity. Check your internet connection.",[Gl]:"User cancelled the flow.",[Hl]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Yl]:"This method has not been implemented",[Kl]:"The nested app auth bridge is disabled"};class zl extends el{constructor(e,t){super(e,t?`${Vl[e]}: ${t}`:Vl[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,zl.prototype)}}function Ql(e,t){return new zl(e,t)}
40
- /*! @azure/msal-common v15.12.0 2025-08-19 */const $l={createNewGuid:()=>{throw Ql(Yl)},base64Decode:()=>{throw Ql(Yl)},base64Encode:()=>{throw Ql(Yl)},base64UrlEncode:()=>{throw Ql(Yl)},encodeKid:()=>{throw Ql(Yl)},async getPublicKeyThumbprint(){throw Ql(Yl)},async removeTokenBindingKey(){throw Ql(Yl)},async clearKeystore(){throw Ql(Yl)},async signJwt(){throw Ql(Yl)},async hashString(){throw Ql(Yl)}};
41
- /*! @azure/msal-common v15.12.0 2025-08-19 */var jl;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(jl||(jl={}));class Zl{constructor(e,t,i){this.level=jl.Info;const o=e||Zl.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:jl.Info,this.correlationId=o.correlationId||Ua.EMPTY_STRING,this.packageName=t||Ua.EMPTY_STRING,this.packageVersion=i||Ua.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:jl.Info}}clone(e,t,i){return new Zl({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const i=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${jl[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,i){this.localCallback&&this.localCallback(e,t,i)}error(e,t){this.logMessage(e,{logLevel:jl.Error,containsPii:!1,correlationId:t||Ua.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:jl.Error,containsPii:!0,correlationId:t||Ua.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:jl.Warning,containsPii:!1,correlationId:t||Ua.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:jl.Warning,containsPii:!0,correlationId:t||Ua.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:jl.Info,containsPii:!1,correlationId:t||Ua.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:jl.Info,containsPii:!0,correlationId:t||Ua.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:jl.Verbose,containsPii:!1,correlationId:t||Ua.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:jl.Verbose,containsPii:!0,correlationId:t||Ua.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:jl.Trace,containsPii:!1,correlationId:t||Ua.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:jl.Trace,containsPii:!0,correlationId:t||Ua.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
42
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Jl="@azure/msal-common",Xl="15.12.0",ed="none",td="redirect_uri_empty",id="claims_request_parsing_error",od="authority_uri_insecure",rd="url_parse_error",nd="empty_url_error",ad="empty_input_scopes_error",sd="invalid_claims",ld="token_request_empty",dd="logout_request_empty",cd="invalid_code_challenge_method",pd="pkce_params_missing",ud="invalid_cloud_discovery_metadata",hd="invalid_authority_metadata",md="untrusted_authority",fd="missing_ssh_jwk",gd="missing_ssh_kid",Td="missing_nonce_authentication_header",Ad="invalid_authentication_header",yd="cannot_set_OIDCOptions",Id="cannot_allow_platform_broker",_d="authority_mismatch",Ed="invalid_request_method_for_EAR",Od="invalid_authorize_post_body_parameters",Cd={[td]:"A redirect URI is required for all calls, and none has been set.",[id]:"Could not parse the given claims request object.",[od]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[rd]:"URL could not be parsed into appropriate segments.",[nd]:"URL was empty or null.",[ad]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[sd]:"Given claims parameter must be a stringified JSON object.",[ld]:"Token request was empty and not found in cache.",[dd]:"The logout request was null or undefined.",[cd]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[pd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[ud]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[hd]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[md]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[fd]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[gd]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Td]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Ad]:"Invalid authentication header provided",[yd]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Id]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[_d]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[Od]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Ed]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."};class Nd extends el{constructor(e){super(e,Cd[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Nd.prototype)}}function Rd(e){return new Nd(e)}
43
- /*! @azure/msal-common v15.12.0 2025-08-19 */class bd{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},i=e.split("&"),o=e=>decodeURIComponent(e.replace(/\+/g," "));return i.forEach(e=>{if(e.trim()){const[i,r]=e.split(/=(.+)/g,2);i&&r&&(t[o(i)]=o(r))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
44
- /*! @azure/msal-common v15.12.0 2025-08-19 */class wd{constructor(e){const t=e?bd.trimArrayEntries([...e]):[],i=t?bd.removeEmptyStringsFromArray(t):[];if(!i||!i.length)throw Rd(ad);this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||Ua.EMPTY_STRING).split(" ");return new wd(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...Ka],i=new wd(t);return i.containsOnlyOIDCScopes()?i.removeScope(Ua.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new wd(t);return!!e&&i.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e)))}containsOnlyOIDCScopes(){let e=0;return Va.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw Ql(_l)}}removeScope(e){if(!e)throw Ql(Il);this.scopes.delete(e.trim())}removeOIDCScopes(){Va.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Ql(El);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw Ql(El);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),i=e.getScopeCount(),o=this.getScopeCount();return t.size<o+i}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return Ua.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
45
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Pd(e,t){return!!e&&!!t&&e===t.split(".")[1]}function vd(e,t,i,o){if(o){const{oid:t,sub:i,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=o,p=r||a||s||"";return{tenantId:p,localAccountId:t||i||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:Pd(p,e)}}return{tenantId:i,localAccountId:t,username:"",isHomeTenant:Pd(i,e)}}function Ld(e,t,i,o){let r=e;if(t){const{isHomeTenant:i,...o}=t;r={...e,...o}}if(i){const{isHomeTenant:t,...n}=vd(e.homeAccountId,e.localAccountId,e.tenantId,i);return r={...r,...n,idTokenClaims:i,idToken:o},r}return r}
46
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Sd(e,t){const i=function(e){if(!e)throw Ql(nl);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw Ql(rl);return t[2]}(e);try{const e=t(i);return JSON.parse(e)}catch(e){throw Ql(rl)}}function Md(e,t){if(0===t||Date.now()-3e5>e+t)throw Ql(fl)}
47
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Dd(e){if(!e)return e;let t=e.toLowerCase();return bd.endsWith(t,"?")?t=t.slice(0,-1):bd.endsWith(t,"?/")&&(t=t.slice(0,-2)),bd.endsWith(t,"/")||(t+="/"),t}function kd(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function Ud(e){if(!e||e.indexOf("=")<0)return null;try{const t=kd(e),i=Object.fromEntries(new URLSearchParams(t));if(i.code||i.ear_jwe||i.error||i.error_description||i.state)return i}catch(e){throw Ql(dl)}return null}function xd(e,t=!0,i){const o=new Array;return e.forEach((e,r)=>{!t&&i&&r in i?o.push(`${r}=${e}`):o.push(`${r}=${encodeURIComponent(e)}`)}),o.join("&")}function Fd(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return Dd(e.origin+e.pathname+e.search)}catch(e){return Dd(t)}}
48
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Bd{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Rd(nd);e.includes("#")||(this._urlString=Bd.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return bd.endsWith(t,"?")?t=t.slice(0,-1):bd.endsWith(t,"?/")&&(t=t.slice(0,-2)),bd.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Rd(rd)}if(!e.HostNameAndPort||!e.PathSegments)throw Rd(rd);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Rd(od)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return Bd.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==es&&i[0]!==ts||(i[0]=e),Bd.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Rd(rd);const i={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=i.AbsolutePath.split("/");return o=o.filter(e=>e&&e.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=e.match(t);if(!i)throw Rd(rd);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===Ua.FORWARD_SLASH){const i=new Bd(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new Bd(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Ud(e)}}
49
- /*! @azure/msal-common v15.12.0 2025-08-19 */const qd={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},Wd={metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Gd=new Set;function Hd(e,t,i,o){if(o?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const r=Yd(t,e);if(r)return o?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${i}, returning aliases`),r.aliases;o?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${i}`)}return null}function Yd(e,t){for(let i=0;i<e.length;i++){const o=e[i];if(o.aliases.includes(t))return o}return null}
50
- /*! @azure/msal-common v15.12.0 2025-08-19 */Wd.metadata.forEach(e=>{e.aliases.forEach(e=>{Gd.add(e)})});const Kd="cache_quota_exceeded",Vd="cache_error_unknown",zd={[Kd]:"Exceeded cache storage capacity.",[Vd]:"Unexpected error occurred when using cache storage."};class Qd extends el{constructor(e,t){const i=t||(zd[e]?zd[e]:zd[Vd]);super(`${e}: ${i}`),Object.setPrototypeOf(this,Qd.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}function $d(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new Qd(Kd):new Qd(e.name,e.message):new Qd(Vd)}
51
- /*! @azure/msal-common v15.12.0 2025-08-19 */class jd{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(Jl,Xl),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const i=this.getAllAccounts(e,t);if(i.length>1){return i.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===i.length?i[0]:null}getBaseAccountInfo(e,t){const i=this.getAccountsFilteredBy(e,t);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(e,t,i){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,i?.tenantId,i))}getTenantedAccountInfoByFilter(e,t,i,o,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;const s=this.getIdToken(e,o,t,i.tenantId);return s&&(n=Sd(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=Ld(e,i,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,i,o){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(i){const e=n.get(i);if(!e)return[];n=new Map([[i,e]])}const s=[];return n.forEach(e=>{const i=this.getTenantedAccountInfoByFilter(r,a,e,t,o);i&&s.push(i)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw Ql(bl);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==i?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==i?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==i?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof el?e:$d(e)}}async saveAccessToken(e,t){const i={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=wd.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,i,!1))return;const o=this.getAccessTokenCredential(e,t);if(o&&this.credentialMatchesFilter(o,i)){wd.fromString(o.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const i=this.getAccountKeys(),o=[];return i.forEach(i=>{const r=this.getAccount(i,t);if(!r)return;if(e.homeAccountId&&!this.matchHomeAccountId(r,e.homeAccountId))return;if(e.username&&!this.matchUsername(r.username,e.username))return;if(e.environment&&!this.matchEnvironment(r,e.environment))return;if(e.realm&&!this.matchRealm(r,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(r,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(r,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},a=r.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,n));a&&0===a.length||o.push(r)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===Es.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===Ss.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(i[t]=o))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(i=o)}),i}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t);this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const i=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);i.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),i.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),i.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const i=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!i||i.credentialType.toLowerCase()!==Es.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==Ss.POP)return;const o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Es.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(n,t,i),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let i=a;if(!o){const t=new Map;a.forEach((i,o)=>{i.realm===e.tenantId&&t.set(o,i)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;i=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),i.forEach((e,i)=>{this.removeIdToken(i,t)}),r&&t&&r.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,i){const o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(i,t);o&&this.credentialMatchesFilter(o,e)&&r.set(i,o)}),r}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.clientId||-1!==i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,i,o){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=wd.createSearchScopes(t.scopes),a=t.authenticationScheme||Ss.BEARER,s=a.toLowerCase()!==Ss.BEARER.toLowerCase()?Es.ACCESS_TOKEN_WITH_AUTH_SCHEME:Es.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,c=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,l,!0)){const t=this.getAccessTokenCredential(e,r);t&&this.credentialMatchesFilter(t,l)&&c.push(t)}});const p=c.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):p>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),c.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),r)}),this.performanceClient.addFields({multiMatchedAT:c.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),c[0])}accessTokenKeyMatchesFilter(e,t,i){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!o.includes(e[t].toLowerCase()))return!1;if(!i&&o.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const i=this.getTokenKeys(),o=[];return i.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const r=this.getAccessTokenCredential(i,t);r&&this.credentialMatchesFilter(r,e)&&o.push(r)}),o}getRefreshToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Cs:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Es.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,i);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}});const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&r&&i&&r.addFields({multiMatchedRT:d},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.familyId||-1!==i.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),o=Object.keys(i).map(e=>i[e]),r=o.length;if(r<1)return null;if(r>1)throw Ql(Al);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Cs)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const o=e.canonicalAuthority;if(o){const r=new Bd(o).getUrlComponents().HostNameAndPort;i=Hd(r,e.cloudDiscoveryMetadata?.metadata,bs,t)||Hd(r,Wd.metadata,vs,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==Es.ACCESS_TOKEN&&e.credentialType!==Es.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return wd.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(Os)}isAuthorityMetadata(e){return-1!==e.indexOf(Ns)}generateAuthorityMetadataCacheKey(e){return`${Ns}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Zd extends jd{async setAccount(){throw Ql(Yl)}getAccount(){throw Ql(Yl)}async setIdTokenCredential(){throw Ql(Yl)}getIdTokenCredential(){throw Ql(Yl)}async setAccessTokenCredential(){throw Ql(Yl)}getAccessTokenCredential(){throw Ql(Yl)}async setRefreshTokenCredential(){throw Ql(Yl)}getRefreshTokenCredential(){throw Ql(Yl)}setAppMetadata(){throw Ql(Yl)}getAppMetadata(){throw Ql(Yl)}setServerTelemetry(){throw Ql(Yl)}getServerTelemetry(){throw Ql(Yl)}setAuthorityMetadata(){throw Ql(Yl)}getAuthorityMetadata(){throw Ql(Yl)}getAuthorityMetadataKeys(){throw Ql(Yl)}setThrottlingCache(){throw Ql(Yl)}getThrottlingCache(){throw Ql(Yl)}removeItem(){throw Ql(Yl)}getKeys(){throw Ql(Yl)}getAccountKeys(){throw Ql(Yl)}getTokenKeys(){throw Ql(Yl)}generateCredentialKey(){throw Ql(Yl)}generateAccountKey(){throw Ql(Yl)}}
52
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Jd="AAD",Xd="OIDC",ec="EAR",tc="acquireTokenByCode",ic="acquireTokenByRefreshToken",oc="acquireTokenSilent",rc="acquireTokenSilentAsync",nc="acquireTokenPopup",ac="acquireTokenPreRedirect",sc="acquireTokenRedirect",lc="cryptoOptsGetPublicKeyThumbprint",dc="cryptoOptsSignJwt",cc="silentCacheClientAcquireToken",pc="silentIframeClientAcquireToken",uc="awaitConcurrentIframe",hc="silentRefreshClientAcquireToken",mc="ssoSilent",fc="standardInteractionClientGetDiscoveredAuthority",gc="nativeInteractionClientAcquireToken",Tc="networkClientSendPostRequestAsync",Ac="refreshTokenClientExecutePostToTokenEndpoint",yc="authorizationCodeClientExecutePostToTokenEndpoint",Ic="refreshTokenClientExecuteTokenRequest",_c="refreshTokenClientAcquireToken",Ec="refreshTokenClientAcquireTokenWithCachedRefreshToken",Oc="refreshTokenClientAcquireTokenByRefreshToken",Cc="refreshTokenClientCreateTokenRequestBody",Nc="acquireTokenFromCache",Rc="silentFlowClientAcquireCachedToken",bc="silentFlowClientGenerateResultFromCacheRecord",wc="acquireTokenBySilentIframe",Pc="initializeBaseRequest",vc="initializeSilentRequest",Lc="initializeClientApplication",Sc="initializeCache",Mc="silentIframeClientTokenHelper",Dc="silentHandlerInitiateAuthRequest",kc="silentHandlerMonitorIframeForHash",Uc="silentHandlerLoadFrame",xc="silentHandlerLoadFrameSync",Fc="standardInteractionClientCreateAuthCodeClient",Bc="standardInteractionClientGetClientConfiguration",qc="standardInteractionClientInitializeAuthorizationRequest",Wc="getAuthCodeUrl",Gc="getStandardParams",Hc="handleCodeResponseFromServer",Yc="handleCodeResponse",Kc="handleResponseEar",Vc="handleResponsePlatformBroker",zc="handleResponseCode",Qc="updateTokenEndpointAuthority",$c="authClientAcquireToken",jc="authClientExecuteTokenRequest",Zc="authClientCreateTokenRequestBody",Jc="popTokenGenerateCnf",Xc="popTokenGenerateKid",ep="handleServerTokenResponse",tp="deserializeResponse",ip="authorityFactoryCreateDiscoveredInstance",op="authorityResolveEndpointsAsync",rp="authorityGetCloudDiscoveryMetadataFromNetwork",np="authorityUpdateCloudDiscoveryMetadata",ap="authorityGetEndpointMetadataFromNetwork",sp="authorityUpdateEndpointMetadata",lp="authorityUpdateMetadataWithRegionalInformation",dp="regionDiscoveryDetectRegion",cp="regionDiscoveryGetRegionFromIMDS",pp="regionDiscoveryGetCurrentVersion",up="acquireTokenByCodeAsync",hp="handleRedirectPromise",mp="handleNativeRedirectPromise",fp="nativeMessageHandlerHandshake",gp="removeHiddenIframe",Tp="clearTokensAndKeysWithClaims",Ap="cacheManagerGetRefreshToken",yp="importExistingCache",Ip="setUserData",_p="localStorageUpdated",Ep="generatePkceCodes",Op="generateCodeVerifier",Cp="generateCodeChallengeFromVerifier",Np="sha256Digest",Rp="getRandomValues",bp="generateHKDF",wp="generateBaseKey",Pp="base64Decode",vp="urlEncodeArr",Lp="encrypt",Sp="decrypt",Mp="generateEarKey",Dp="decryptEarResponse",kp=1;
37
+ `,vn=e=>{const t=Ue(),i=A(e=>e.AppLayout),{handlePostRequest:o}=$t();return f(T,{children:[f(v,{fullWidth:!0,onClick:()=>{var i;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&t(e.notificationActionPayload),e?.isNotified||(i=e.id,o({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:i}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[f(S,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?g(Re,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):g(T,{}),"ltr"===i.appDirection?e.notificationEnText:e.notificationArText,g(S,{sx:{flex:1}}),e?.isNotified?g(T,{}):f(k,{color:"warning",sx:{animation:`${Pn} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[g(Re,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===i.appDirection?"New":"جديد"]})]}),f(S,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[g(S,{sx:{marginRight:1,marginLeft:1},children:Fr(e.createTime,i.appDirection)}),g(S,{sx:{flex:1}}),g(S,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?g($,{flexItem:!0}):g(T,{})]})},Ln=()=>{const{UserInfo:e}=Zt(),[t,i]=me(null),{handleGetRequest:o,handlePostRequest:r}=$t(),n=Ue(),a=A(e=>e.AppLayout),[s,l]=me(!1),[d,c]=me([]);wn(()=>{!0===e.isAuthenticated&&o({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>d.length&&Pe.info("ltr"===a.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===a.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),c(e.data)}})},1e3);return g(ie,{onClickAway:()=>{l(!1)},children:f("div",{style:{cursor:"pointer"},children:[g(U,{color:"inherit",onClick:e=>{i(e.currentTarget),l(!s)},sx:{marginRight:1,marginLeft:1},children:g(Q,{anchorOrigin:{vertical:"top",horizontal:"ltr"===a.appDirection?"right":"left"},badgeContent:d.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:g(Re,{icon:"bell"})})}),g(Y,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:s,anchorEl:t,dir:a.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>g(oe,{...e,timeout:350,children:f(x,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[g($,{variant:"fullWidth",flexItem:!0,children:f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===a.appDirection?"Notifications":"الاشعارات"]})}),0==d.length?g(S,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:g(S,{children:"ltr"===a.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):g(T,{}),g(S,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:d.map((e,t)=>g(vn,{...e,setOpen:l,showDivider:t<d.length-1}))}),g($,{variant:"fullWidth",flexItem:!0,children:g(v,{sx:{textTransform:"none"},onClick:()=>{n("myNotifications")},children:"ltr"===a.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},Sn=e=>{const[t,i]=me(""),[o,r]=me(""),[n,a]=me(""),{handlePostRequest:s}=$t();return f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[f(S,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),g($,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?g(ni,{label:"Current Password",value:t,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):g(T,{}),g(ni,{label:"New Password",value:o,onChange:e=>{r(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(ni,{label:"Confirm New Password",value:n,onChange:e=>{a(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),g(v,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==t&&""!==t.trim()?null!==o&&""!==o&&null!==n&&""!==n&&o==n?await s({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:t,newPassword:o},successCallBkFn:()=>{e.onSuccessCallBk(),Pe.success("Your request has been processed successfully")},showMask:!0}):Pe.error("You must enter new password in required fields and must be identical"):Pe.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},Mn=z(Ce,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{A(e=>e.AppInfo.value);const t=A(e=>e.AppLayout),i=Ut();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:i?void 0:"calc(100% - 350px)",marginLeft:i||"ltr"!==t.appDirection?void 0:"350px",marginRight:i||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),Dn=()=>{const{Window:e,setWindowState:t}=Jt({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),i=A(e=>e.AppInfo.value),[o,r]=me(null),n=()=>{r(null)},a=e=>{r(e.currentTarget)},s=A(e=>e.AppLayout),l=A(e=>e.SideBar),{UserSession:d}=Zt(),c=d.value.currentOrganization,{Window:p,setWindowState:u}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:h}=$t(),m=Ut(),I=y();return f(T,{children:[i.isUserProfileManaged?f(T,{children:[g(p,{children:g(Sn,{selectedPerson:d.value,isSelfService:!0,onSuccessCallBk:()=>{u(!1)}})}),g(re,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:o,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(o),onClose:n,children:g(j,{onClick:()=>{u(!0),n()},children:g(k,{sx:{textAlign:"center"},children:"Change Password"})})})]}):g(T,{}),g(e,{children:g(On,{successChangeCallBackFn:()=>{t(!1)}})}),g(Mn,{position:"fixed",open:l.isOpened,children:f(Ne,{children:[g(U,{color:"inherit","aria-label":"open drawer",onClick:()=>{I(Nn())},edge:"start",sx:[{mr:"ltr"===s.appDirection?2:void 0,ml:"rtl"===s.appDirection?2:void 0},l.isOpened&&{display:"none"}],children:g(Re,{icon:"bars"})}),m?g(T,{}):g(Yr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:d?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),g(k,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:m?"":`${i.appName} - ${"ltr"===s.appDirection?c?.organizationEnName:c?.organizationArName}`}),g(V,{title:"light"===s.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:g(U,{sx:{mx:1},color:"inherit",onClick:()=>{I(Bt.setThemeMode("light"===s.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===s.themeMode?"dark":"light")},children:"light"===s.themeMode?g(Re,{icon:"moon"}):g(Re,{icon:{prefix:"far",iconName:"sun"}})})}),i.isLocalizationEnabled?g(V,{title:"ar"===Se.language?"Change Language To English":"Change Language To Arabic",children:g(U,{color:"inherit",onClick:()=>{let e="ar"===Se.language?"en":"ar";var t;t=e,Se.changeLanguage(t),localStorage.setItem("language",t),I(Bt.setAppDirection("ar"===e?"rtl":"ltr"))},children:g(Re,{icon:"language"})})}):g(T,{}),d.value?.userOrganizations&&d.value?.userOrganizations.length>1?g(V,{title:"Change Current Organization",children:g(U,{color:"inherit",onClick:()=>{t(!0)},children:g(Re,{icon:"globe"})})}):g(T,{}),g(!0===i?.enableUINotifications?Ln:T,{}),m?g(T,{}):g("div",{onClick:a,style:{cursor:"pointer"},children:g(Yr,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:d.value?.id+""})}),g("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:a,children:m?"":d.value?.username}),g(U,{color:"inherit",onClick:async()=>{try{await h({endPointURI:"api/auth/logout"})}catch(e){}I(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:g(Re,{rotation:"rtl"===s.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},kn=z("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),Un=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=Un(e,i.children);if(t)return t}}},xn=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscribed Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function Fn(){return g(pt,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Bn=Ie(_t)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${At.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),qn=Ie(Et)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:_e(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),Wn=ft(Tt);function Gn(e){const t=gt({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return g(Wn,{style:t,...e})}const Hn=Ie(at)({color:"inherit",fontWeight:500});function Yn({icon:e,expandable:t,children:i,...o}){const{t:r}=Me(),n=A(e=>e.AppLayout);return f(Nt,{...o,sx:{display:"flex",alignItems:"center",padding:1},children:[g(Re,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),g(Hn,{variant:"body2",sx:{fontSize:16},children:r(i)}),t&&g(Fn,{})]})}const Kn=e=>Array.isArray(e)?e.length>0&&e.some(Kn):Boolean(e),Vn=ue.forwardRef(function(e,t){const{id:i,itemId:o,label:r,disabled:n,children:a,...s}=e,{getRootProps:l,getContentProps:d,getIconContainerProps:c,getCheckboxProps:p,getLabelProps:u,getGroupTransitionProps:h,getDragAndDropOverlayProps:m,status:T,publicAPI:y}=It({id:i,itemId:o,children:a,label:r,disabled:n,rootRef:t}),A=y.getItem(o),I=Kn(a);return g(bt,{itemId:o,children:f(Bn,{...l(s),children:[f(qn,{...d({className:vr("content",{"Mui-expanded":T.expanded,"Mui-selected":T.selected,"Mui-focused":T.focused,"Mui-disabled":T.disabled})}),children:[g(Ot,{...c(),children:g(Rt,{status:T})}),g(Ct,{...p()}),g(Yn,{...u({icon:A?.icon||"book",expandable:I&&T.expanded})}),g(wt,{...m()})]}),a&&g(Gn,{...h()})]})})});function zn(){const e=Ue(),t=A(e=>e.AppLayout),i=A(e=>e.AppInfo.value),o=y(),r=Ut(),{isUserAuthorized:n,isCurrentOrganizationAuthorizedToModule:a}=Zt(),s=e=>{const t=[];for(let o of e)if(("development_admin.organization"!==o.id||i.isUserProfileManaged)&&(void 0===o.authority||null==o.authority||n(o.authority))&&(void 0===o.applicationModule||null===o.applicationModule||a(o.applicationModule))){let e=structuredClone(o);o?.children&&(e.children=s(o.children)),t.push(e)}return t},l=[];i.enableAdministrationModule&&l.push(...structuredClone(xn)),l.push(...structuredClone(i.businessNavigationItems));const d=s(l);return g(yt,{items:d,onItemClick:(t,i)=>{const n=Un(i,l);"NAVIGATION"===n?.action&&null!=n?.actionPayload&&(e(n?.actionPayload?.path||""),r&&o(Nn()))},sx:{height:"fit-content",flexGrow:1,maxWidth:xt,direction:t.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Vn}})}const Qn=()=>{const e=A(e=>e.AppInfo.value),{UserSession:t}=Zt(),i=t.value.currentOrganization,o=ne(),r=A(e=>e.AppLayout),n=A(e=>e.SideBar),a=y();return f(mt,{sx:{width:xt,flexShrink:0,"& .MuiDrawer-paper":{width:xt,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===r.appDirection?"left":"right",open:n.isOpened,children:[f(kn,{children:[f(S,{sx:{width:"100%"},children:[g(k,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===r.appDirection?i?.organizationEnName:i?.organizationArName}`}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),g(ht,{onClick:()=>{a(Nn())},children:"ltr"===o.direction?g(Re,{icon:"angle-left"}):g(Re,{icon:"angle-right"})})]}),g(Ze,{}),g(zn,{})]})},$n=Lt({key:"muirtl",stylisPlugins:[vt,Pt]}),jn=Lt({key:"mui"}),Zn=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.selectedRecord&&(async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),r(e.data.availableRoles)}})})()},[e.selectedRecord]);return f(T,{children:[g(li,{displayField:"roleName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:t,successCallBkFn:()=>{Pe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Jn=e=>{const t=A(e=>e.AppInfo.value),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),a=A(e=>e.commonStores.stores.SystemOrganizations.data),s=A(e=>e.commonStores.stores.SystemOrganizationRanks.data),l=A(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:d}=Me(),[c,p]=me([]),u=oi({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:p}),h=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"organizationEnName"}}];return t?.isUserProfileManaged&&h.push({type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}),f(T,{children:[g(r,{children:g(Zn,{selectedRecord:i,closeModalFn:()=>{n(!1)}})}),g(nn,{apiActions:u,hideInfoBar:!0,data:c,setData:p,editMode:{editMode:"row"},formElements:h,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{o(e),n(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id,employeeNumber:e.selectedPerson.employeeNumber},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async i=>(t?.isUserProfileManaged?i.personId=e.selectedPerson.id:i.organizationMembershipNumber=e.selectedPerson.employeeNumber,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Xn=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:i}),{handleGetRequest:r}=$t(),n=A(e=>e.commonStores.stores.SystemOrganizationRanks),a=y();return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await r({endPointURI:n.url,showMask:!1,successCallBkFn:e=>{a(ei({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{a(ei({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},ea=()=>{const{t:e}=Me(),[t,i]=me([]),{handleGetRequest:o}=$t(),r=A(e=>e.commonStores.stores.SystemOrganizationUnits),n=y(),a=oi({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:i}),s=A(e=>e.commonStores.stores.SystemOrganizationUnitType.data);return g(nn,{apiActions:a,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await o({endPointURI:r.url,showMask:!1,successCallBkFn:e=>{n(ei({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{n(ei({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ta=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},ia=()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt();A(e=>e.commonStores.stores.CurrentOrganizationRanks.data),A(e=>e.commonStores.stores.CurrentOrganizationUnits.data);const[r,n]=me([]),a=oi({commonStoreKey:"persons",setData:n}),[s,l]=me(null),{Window:d,setWindowState:c}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:p,setWindowState:u}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:h,setWindowState:m}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),y=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"Employee Number",fieldName:"employeeNumber",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Division Code",fieldName:"orgDivisionCode",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Division En Name",fieldName:"orgDivisionEngName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Division Ar Name",fieldName:"orgDivisionArbName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Department Code",fieldName:"orgDepartmentCode",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Department En Name",fieldName:"orgDepartmentEngName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Department Ar Name",fieldName:"orgDepartmentArbName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Section Code",fieldName:"orgSectionCode",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Section En Name",fieldName:"orgSectionEngName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Section Ar Name",fieldName:"orgSectionArbName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Subsection Code",fieldName:"orgSubsectionCode",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Subsection En Name",fieldName:"orgSubsectionEngName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Subsection Ar Name",fieldName:"orgSubsectionArbName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Rank Code",fieldName:"orgRankCode",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Rank En Name",fieldName:"orgRankEngName",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Rank Ar Name",fieldName:"orgRankArbName",fieldType:"text"}}];return f(T,{children:[g(p,{children:g(Zn,{selectedRecord:s,closeModalFn:()=>{u(!1)}})}),g(d,{children:g(Jn,{selectedPerson:t})}),g(nn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:a,data:r,setData:n,editMode:{editMode:"none"},formElements:y,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),c(!0)}}],girdIcon:"users"})]})},oa=()=>{const{t:e}=Me(),[t,i]=me(null),{UserInfo:o}=Zt(),r=A(e=>e.commonStores.stores.CurrentOrganizationRanks.data),n=A(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[a,s]=me([]),l=oi({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:s}),[d,c]=me(null),{Window:p,setWindowState:u}=Jt({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:h,setWindowState:m}=Jt({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:y,setWindowState:I}=Jt({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),_=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Yr,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return f(T,{children:[g(h,{children:g(Zn,{selectedRecord:d,closeModalFn:()=>{m(!1)}})}),g(p,{children:g(Jn,{selectedPerson:t})}),g(y,{children:g(Sn,{selectedPerson:t,isSelfService:!1,onSuccessCallBk:()=>{I(!1)}})}),g(nn,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:l,data:a,setData:s,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:_,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{i(e),I(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{c({organizationId:o?.currentOrganization?.id,id:e?.organizationMemberId}),m(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{i(e),u(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(Pe.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(Pe.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},ra=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:i}),r=A(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:n}=$t();return g(nn,{apiActions:o,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},na=()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},aa=e=>{const[t,i]=me([]),[o,r]=me([]),{handlePostRequest:n,handleGetRequest:a}=$t();fe(()=>{e.roleId&&(async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()},[e.roleId]);return f(T,{children:[g(li,{displayField:"authorityName",options:o,valueField:"id",selectedOptions:t,setSelection:i}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[g(v,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:t,successCallBkFn:()=>{Pe.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),g(v,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},sa=()=>{const{t:e}=Me(),[t,i]=me([]),[o,r]=me(null),{Window:n,setWindowState:a}=Jt({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),s=oi({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return f(T,{children:[g(n,{children:g(aa,{roleId:o?.id,closeModalFn:()=>{a(!1)}})}),g(nn,{apiActions:s,data:t,hideInfoBar:!0,setData:i,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{r(e),a(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},la=e=>{const t=A(e=>e.commonStores.stores.SystemEntityParameters.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:r});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:t,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:i("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},da=()=>{const e=A(e=>e.commonStores.stores.SystemOrganizations.data),{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:o});return g(nn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}],keyColumnName:"id",gridTitle:t("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},ca=e=>{const{t:t}=Me(),i=A(e=>e.commonStores.stores.SystemEntityParameters.data),[o,r]=me([]),n=oi({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:i,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return g(nn,{apiActions:n,data:o,hideInfoBar:!0,setData:r,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:t("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},pa=[{value:"FILE_SYSTEM"},{value:"SFTP"}],ua=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},ha=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:o});return g(nn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:t("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!xr(t.recipientMail)?(Pe.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},ma=e=>{const{t:t}=Me(),[i,o]=me([]),r=A(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:o}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(nn,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:o,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:a,keyColumnName:"id",gridTitle:t("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},fa=e=>{const t=A(e=>e.commonStores.stores.SystemReports.data),{t:i}=Me(),[o,r]=me([]),n=oi({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:r}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:t,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return g(nn,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:a,keyColumnName:"id",gridTitle:i("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},ga={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},Ta=(e,t,i)=>{if(e&&ga[e]){const o=ga[e],r=Object.keys(o);for(const e of r){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},ya=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:o}),n=A(e=>e.commonStores.stores.SystemDataQueries.data),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:r,data:i,setData:o,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:a,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Aa=e=>{const{t:t}=Me(),[i,o]=me([]),r=oi({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:A(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:r,data:i,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Ia=e=>{const[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:n}=Me(),{handleGetRequest:a}=$t(),[s,l]=me([]);fe(()=>{(async()=>{await a({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{l(e.data)}})})()},[e.selectedRecord]);const[d,c]=me([]),p=oi({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:c}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return f(T,{children:[g(o,{children:g(Aa,{selectedRecord:t})}),g(nn,{apiActions:p,data:d,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:c,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),r(!0)}}],formElements:u,keyColumnName:"id",gridTitle:n("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},_a=e=>{const{t:t}=Me(),[i,o]=me([]),r=A(e=>e.commonStores.stores.SystemWidgets.data),n=oi({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:o});return g(nn,{apiActions:n,data:i,setData:o,editMode:{editMode:"row"},hideInfoBar:!0,formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:t("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ea=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),r=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g(Yr,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(T,{children:g(nn,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:r,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Jn,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Xn,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:ea,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:ta,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const e=A(e=>e.AppInfo.value);return g(e?.isUserProfileManaged?oa:ia,{})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:i});return g(T,{children:g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:ra,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:na,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:sa,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=Me(),{handleGetRequest:t}=$t(),[i,o]=me([]),r=oi({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:o}),n=A(e=>e.commonStores.stores.SystemApplicationModules.data);return g(nn,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:ta,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:ea,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Xn,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=Me(),t=A(e=>e.commonStores.stores.SystemDataQueries.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:o});return g(nn,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}}],keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),r=A(e=>e.commonStores.stores.SystemDataSources.data),{t:n}=Me(),[a,s]=me([]),l=oi({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:s}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:r,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return f(T,{children:[g(i,{children:g(la,{selectedRecord:e})}),g(nn,{apiActions:l,rowActions:[{label:"Query Parameters",actionFn:async e=>{t(e),o(!0)},icon:"p"}],data:a,setData:s,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:d,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=$t(),t=A(e=>e.commonStores.stores.SystemDataSourceType.data),{t:i}=Me(),[o,r]=me([]),n=oi({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:r,commonStoreKey:"SystemDataSources"});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{Pe.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=Me(),t=A(e=>e.commonStores.stores.SystemParameterTypes.data),[i,o]=me([]),r=oi({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:o}),n=A(e=>e.commonStores.stores.SystemDataQueries.data);return g(nn,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:t,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:n,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",pi):i.setValue("parameterValueFormat",ui)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",pi)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",ui)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:da,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:a}=Jt({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[s,l]=me([]),d=A(e=>e.commonStores.stores.SystemDataSources.data),c=A(e=>e.commonStores.stores.SystemDataQueries.data),p=A(e=>e.commonStores.stores.SystemBluePrints.data),u=oi({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:l}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:pa,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:p,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return f(T,{children:[g(o,{children:g(dn,{reportCode:t?.reportCode,resultMode:"App"})}),g(n,{children:g(ca,{selectedRecord:t})}),g(nn,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:u,data:s,setData:l,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{i(e),a(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{i(e),r(!0)}}],formProps:{formValuesChangeCallBk:ua},formElements:h,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(Pe.error("You must choose the report query"),!1):(Pe.error("You must choose the report blueprint"),!1):(Pe.error("You must enter the jasper report name"),!1):(Pe.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=A(e=>e.commonStores.stores.SystemDataQueries.data),t=A(e=>e.commonStores.stores.SystemTimeIntervals.data),[i,o]=me(null),{Window:r,setWindowState:n}=Jt({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:a,setWindowState:s}=Jt({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:l,setWindowState:d}=Jt({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:c}=Me(),[p,u]=me([]),h=oi({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:u}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:t,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return f(T,{children:[g(r,{children:g(ha,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(a,{children:g(ma,{selectedRecord:i,callBkFn:()=>{n(!1)}})}),g(l,{children:g(fa,{selectedRecord:i,callBkFn:()=>{d(!1)}})}),g(nn,{apiActions:h,data:p,setData:u,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:m,keyColumnName:"id",gridTitle:c("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{o(e),n(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{o(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{o(e),d(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(Pe.error("You must specifiy the start sending time since this email is periodical"),!1):(Pe.error("You must specifiy the period value since this email is periodical"),!1):(Pe.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){Ta(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Ta(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,t]=me(null),{Window:i,setWindowState:o}=Jt({windowTitle:"Document Status",windowIcon:"tag"}),{Window:r,setWindowState:n}=Jt({windowTitle:"Document Action",windowIcon:"stamp"}),a=A(e=>e.commonStores.stores.SystemOrganizations.data),s=A(e=>e.commonStores.stores.SystemReports.data),l=A(e=>e.commonStores.stores.SystemDataSources.data),{t:d}=Me(),[c,p]=me([]),u=oi({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:p}),h=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:a,comboboxValueDataType:"string",optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:s,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:l,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return f(T,{children:[g(i,{children:g(ya,{selectedRecord:e})}),g(r,{children:g(Ia,{selectedRecord:e})}),g(nn,{apiActions:u,data:c,setData:p,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{t(e),o(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{t(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:d("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:h,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=Me(),t=A(e=>e.commonStores.stores.SystemDataQueries.data),i=A(e=>e.commonStores.stores.SystemWidgetTypes.data),[o,r]=me([]),n=oi({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:r});return g(nn,{apiActions:n,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:i,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:t,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}],keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=Me(),[t,i]=me(null),{Window:o,setWindowState:r}=Jt({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[n,a]=me([]),s=Ue(),l=oi({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:a});return f(T,{children:[g(o,{children:g(_a,{selectedRecord:t})}),g(nn,{apiActions:l,data:n,setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{i(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:En},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=Me(),[t,i]=me([]),{handlePostRequest:o}=$t(),r=oi({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:i}),n=A(e=>e.commonStores.stores.SystemMailTemplates.data);return g(nn,{apiActions:r,disableDefaultAction:!0,data:t,setData:i,editMode:{editMode:"none"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],rowActions:[{actionFn:async e=>{(async e=>{await o({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{r.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:ra},{path:"dev/system/roles",component:sa},{path:"dev/system/lookups",component:da},{path:"dev/system/modules",component:na},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=oi({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i});return g(nn,{apiActions:o,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:pa,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!0,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}],keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=Me(),[t,i]=me([]),o=A(e=>e.commonStores.stores.SystemTimeIntervals.data),r=A(e=>e.commonStores.stores.SystemDataQueries.data),n=oi({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:i}),a=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:r,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:o,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?g(Re,{icon:e.row.notificationIcon}):g(T,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>g(S,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return g(nn,{apiActions:n,data:t,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:a,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=Zt(),t=A(e=>e.AppLayout),{handleGetRequest:i,handlePostRequest:o}=$t(),[r,n]=me([]),a=A(e=>e.AppInfo.value),s=()=>{!0===e.isAuthenticated&&i({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{n(e.data)}})};return!0===a?.enableUINotifications&&wn(s,1e3),f(T,{children:[f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g(S,{sx:{flex:1}}),f("h3",{children:[g(Re,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===t.appDirection?"Notifications":"الاشعارات"]}),g(S,{sx:{flex:1}}),g(v,{sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),g(v,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await o({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),g(S,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:g(S,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:r.map((e,t)=>g(vn,{...e,showDivider:t<r.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:un}]]],Oa=e=>{const{isUserAuthorized:t,isCurrentOrganizationAuthorizedToModule:i}=Zt();return e?.applicationModule&&!i(e?.applicationModule)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!t(e.authority)?g(S,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:f("h2",{children:[g(Re,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):g(T,{children:e.children})},Ca=()=>{const e=A(e=>e.AppLayout),t=A(e=>e.AppInfo.value),i=A(e=>e.AppInfo.value.businessRoutes),{UserInfo:o}=Zt(),r=y(),{show:n,hide:a}=Kt(),s=A(e=>e.commonStores),[l,d]=me(!1),{isUserAuthorized:c}=Zt(),{handleGetRequest:p}=$t();fe(()=>{s?.storeKeys&&(async()=>{n("Loading ... please wait"),d(!1);const e=s.stores,t=s.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!c(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||p({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ei({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ei({storeKey:i,data:[]}))}});d(!0),a()})()},[s.storeKeys,o?.currentOrganization]);const u=Ut();return g(ce,{value:"ltr"===e.appDirection?jn:$n,children:g(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:u?1:3},children:f(Fe,{children:[t.enableAdministrationModule?Ea.map((e,t)=>g(Be,{path:e.path,element:g(Oa,{authority:e.authority,applicationModule:e.applicationModule,children:g(e.component,{})})},"adm"+t)):null,i.map((e,t)=>g(Be,{path:e.path,element:g(Oa,{authority:e.authority,children:g(e.component,{})})},"bs"+t))]})})})},Na=Ie("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:Mt[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:Mt[900]})}));function Ra(e){const{window:t}=e,i=A(e=>e.SideBar),o=A(e=>e.AppInfo.value),r=y(),n=e=>{r(Rn(e))};return g(Dt,{container:void 0!==t?()=>t().document.body:void 0,anchor:"bottom",open:i.isOpened,onClose:()=>{n(!1)},onOpen:()=>{n(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[g(Na,{}),g(S,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:g(zn,{})}),f(S,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[g(k,{sx:{fontSize:12},color:"textDisabled",children:o.appName}),f(k,{sx:{fontSize:12},color:"textDisabled",children:["V.",o.appVersion]})]})]})})}const ba=()=>{const{t:e}=Me(),t=A(e=>e.loadingMask.value),i=A(e=>e.AppLayout);return f(ae,{dir:i.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t.isOpened,children:[g(se,{color:"inherit"}),g("div",{style:{marginRight:10,marginLeft:10},children:t?.message||e("DEFAULT_LOADING_MESSAGE")})]})},wa=()=>{const e=A(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=A(e=>e.UserSession.value),l=y(),d=async()=>{if(null==t||""==t)return void Pe.error("username is required to proceed");if(null==o||""==o)return void Pe.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),Pe.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=A(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||hi:e.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||mi:e.appTheme?.dark?.secondaryColor||gi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${e?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:e?.loginScreenStyle?.backgroundColor,zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:e?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:300,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:300,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Pa=()=>{const[e,t]=me({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:i}=$t(),o=A(e=>e.AppInfo.value);return fe(()=>{if(o?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{o?.checkLicense?.endpoint&&await i({endPointURI:o.checkLicense?.endpoint,successCallBkFn:e=>{t(e.data)}})})()},o?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[o]),e.isLicensed?g(T,{}):f(S,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[g("img",{src:o.appLogo,style:{height:200,width:200}}),f(k,{variant:"h5",children:[o.appName," - ",o.appVersion]}),g(k,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),g(k,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),f(k,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),f(k,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},va=({msalInstance:e})=>{const t=A(e=>e.AppInfo.value);A(e=>e.UserSession.value);const[i,o]=me(!1),{handleGetRequest:r}=$t(),n=y(),a=async()=>{localStorage.getItem("TOKEN")?t?.apiBaseUrl&&r({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(o(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};n(zt.setAuthenticated(t))}else n(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{o(!1)}}):(n(zt.setUnAuthenticated()),o(!1))},s=A(e=>e.UserSession.value);fe(()=>{a()},[t]);const l=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${t.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:t?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.primaryColor||hi:t.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===t?.loginScreenStyle?.themeMode?t.appTheme?.light?.secondaryColor||mi:t.appTheme?.dark?.secondaryColor||gi}}});return g(pe,{theme:l,children:0==s.isAuthenticated?g(S,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${t?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:t?.loginScreenStyle?.backgroundColor,zIndex:0}},children:g(x,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:f(S,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[g("img",{src:t?.appLogo,width:150,height:150}),g(k,{sx:{m:1},variant:"h4",color:"textSecondary",children:t?.appName}),f(k,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",t.appVersion]}),g(v,{loading:i,onClick:async()=>{o(!0);const i=await e.acquireTokenPopup({scopes:t?.azureConfiguration?.scopes});i?.accessToken?(localStorage.setItem("TOKEN",i.accessToken),a()):o(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:g(Re,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},La=()=>{const e=A(e=>e.AppInfo.value),[t,i]=me(""),[o,r]=me(""),[n,a]=me(!1),s=A(e=>e.UserSession.value),l=y(),d=async()=>{if(null==t||""==t)return void Pe.error("username is required to proceed");if(null==o||""==o)return void Pe.error("password is required to proceed");a(!0);let i=null;try{if(i=await Le.post(`${e.apiBaseUrl}/api/auth/login`,{username:t,password:o},{withCredentials:!0}),null!=i.data&&""!==i.data){a(!1);const e={...i.data,isAuthenticated:!0};i?.data?.token&&localStorage.setItem("TOKEN",i.data.token),l(zt.setAuthenticated(e))}}catch(e){a(!1),Pe.error(e?.response?.data||"failed to authenticate, contact your administrator")}},c=A(e=>e.UserSession.value),p=le({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||hi:e.appTheme?.dark?.primaryColor||fi},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||mi:e.appTheme?.dark?.secondaryColor||gi}}});return fe(()=>{(async()=>{if(e?.apiBaseUrl&&null==c.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await Le.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};l(zt.setAuthenticated(e))}else l(zt.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){l(zt.setUnAuthenticated())}}})()},[e,c.isAuthenticated]),g(pe,{theme:p,children:0==s.isAuthenticated?f(x,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%"},children:[g("img",{src:e?.appLogo,width:70,height:70}),g(k,{sx:{m:1},variant:"caption",color:"textSecondary",children:e?.appName}),f(k,{sx:{paddingRight:1,width:200,textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),g(F,{label:"username",sx:{width:200,m:1},value:t,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(F,{label:"password",sx:{width:200,m:1},value:o,type:"password",onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&d()}}),g(v,{loading:n,onClick:d,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):f(x,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[g(se,{sx:{marginRight:1}}),g("div",{children:"You will be redirected shortly ... please wait"})]})})},Sa=Ie("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=A(e=>e.AppLayout),o=Ee(),r=Ut();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?o.transitions.create(["margin","width"],{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.enteringScreen}):o.transitions.create(["margin","width"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==i.appDirection||!0!==t?0:xt+"px",marginRight:r||"rtl"!==i.appDirection||!0!==t?0:xt+"px"}}),Ma=({msalInstance:e})=>{const t=A(e=>e.SideBar),i=A(e=>e.AppInfo.value),o=Ut(),r=A(e=>e.UserSession),n=A(e=>e.AppLayout);return f(qe,{children:[g(ve,{rtl:"rtl"===n.appDirection,draggable:!0,position:"bottom-center"}),g(ba,{}),!0===r.value.isAuthenticated?f(Sa,{open:t.isOpened,children:[g(Oe,{}),g(Dn,{}),o?null:g(Qn,{}),o?g(Ra,{}):null,g(kn,{}),g(Ca,{}),g(Pa,{})]}):"AZURE"===i.authenticationMethod?g(va,{msalInstance:e}):g(o?La:wa,{})]})},Da=be({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",isUserProfileManaged:!0,isLocalizationEnabled:!1,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),ka=Da.actions;var Ua=Da.reducer;const xa={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWorkflows:{autoLoad:!0,url:"api/v1/dev/workflowdocument/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,authority:"SYSTEM_ADMIN",url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},Fa={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Ba=200,qa=400,Wa=400,Ga=499,Ha=500,Ya=599,Ka="GET",Va="POST",za=[Fa.OPENID_SCOPE,Fa.PROFILE_SCOPE,Fa.OFFLINE_ACCESS_SCOPE],Qa=[...za,Fa.EMAIL_SCOPE],$a="Content-Type",ja="Content-Length",Za="Retry-After",Ja="X-AnchorMailbox",Xa="x-ms-request-id",es="x-ms-httpver",ts="active-account-filters",is="common",os="organizations",rs="consumers",ns="access_token",as="xms_cc",ss="login",ls="select_account",ds="consent",cs="none",ps="no_session",us="code",hs="id_token token refresh_token",ms="query",fs="fragment",gs="query",Ts="authorization_code",ys="refresh_token",As="MSSTS",Is="ADFS",_s="Generic",Es="-",Os=".",Cs={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Ns="appmetadata",Rs="1",bs="authority-metadata",ws=86400,Ps="config",vs="cache",Ls="network",Ss="hardcoded_values",Ms={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Ds={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},ks=60,Us=3600,xs="throttling",Fs="retry-after, h429",Bs="invalid_grant",qs="client_mismatch",Ws="1",Gs="3",Hs="4",Ys="2",Ks="4",Vs="5",zs="0",Qs="1",$s="2",js="3",Zs="4",Js="pop",Xs="unexpected_error",el="post_request_failed",tl={[Xs]:"Unexpected error in authentication.",[el]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
38
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class il extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,il.prototype),this.errorCode=e||Fa.EMPTY_STRING,this.errorMessage=t||Fa.EMPTY_STRING,this.subError=i||Fa.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ol(e,t){return new il(e,t?`${tl[e]} ${t}`:tl[e])}
39
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const rl="client_info_decoding_error",nl="client_info_empty_error",al="token_parsing_error",sl="null_or_empty_token",ll="endpoints_resolution_error",dl="network_error",cl="openid_config_error",pl="hash_not_deserialized",ul="invalid_state",hl="state_mismatch",ml="state_not_found",fl="nonce_mismatch",gl="auth_time_not_found",Tl="max_age_transpired",yl="multiple_matching_tokens",Al="multiple_matching_accounts",Il="multiple_matching_appMetadata",_l="request_cannot_be_made",El="cannot_remove_empty_scope",Ol="cannot_append_scopeset",Cl="empty_input_scopeset",Nl="device_code_polling_cancelled",Rl="device_code_expired",bl="device_code_unknown_error",wl="no_account_in_silent_request",Pl="invalid_cache_record",vl="invalid_cache_environment",Ll="no_account_found",Sl="no_crypto_object",Ml="unexpected_credential_type",Dl="invalid_assertion",kl="invalid_client_credential",Ul="token_refresh_required",xl="user_timeout_reached",Fl="token_claims_cnf_required_for_signedjwt",Bl="authorization_code_missing_from_server_response",ql="binding_key_not_removed",Wl="end_session_endpoint_not_supported",Gl="key_id_missing",Hl="no_network_connectivity",Yl="user_canceled",Kl="missing_tenant_id_error",Vl="method_not_implemented",zl="nested_app_auth_bridge_disabled",Ql={[rl]:"The client info could not be parsed/decoded correctly",[nl]:"The client info was empty",[al]:"Token cannot be parsed",[sl]:"The token is null or empty",[ll]:"Endpoints cannot be resolved",[dl]:"Network request failed",[cl]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[pl]:"The hash parameters could not be deserialized",[ul]:"State was not the expected format",[hl]:"State mismatch error",[ml]:"State not found",[fl]:"Nonce mismatch error",[gl]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Tl]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[yl]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Al]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Il]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[_l]:"Token request cannot be made without authorization code or refresh token.",[El]:"Cannot remove null or empty scope from ScopeSet",[Ol]:"Cannot append ScopeSet",[Cl]:"Empty input ScopeSet cannot be processed",[Nl]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Rl]:"Device code is expired.",[bl]:"Device code stopped polling for unknown reasons.",[wl]:"Please pass an account object, silent flow is not supported without account information",[Pl]:"Cache record object was null or undefined.",[vl]:"Invalid environment when attempting to create cache entry",[Ll]:"No account found in cache for given key.",[Sl]:"No crypto object detected.",[Ml]:"Unexpected credential type.",[Dl]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[kl]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Ul]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[xl]:"User defined timeout for device code polling reached",[Fl]:"Cannot generate a POP jwt if the token_claims are not populated",[Bl]:"Server response does not contain an authorization code to proceed",[ql]:"Could not remove the credential's binding key from storage.",[Wl]:"The provided authority does not support logout",[Gl]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Hl]:"No network connectivity. Check your internet connection.",[Yl]:"User cancelled the flow.",[Kl]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Vl]:"This method has not been implemented",[zl]:"The nested app auth bridge is disabled"};class $l extends il{constructor(e,t){super(e,t?`${Ql[e]}: ${t}`:Ql[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,$l.prototype)}}function jl(e,t){return new $l(e,t)}
40
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Zl={createNewGuid:()=>{throw jl(Vl)},base64Decode:()=>{throw jl(Vl)},base64Encode:()=>{throw jl(Vl)},base64UrlEncode:()=>{throw jl(Vl)},encodeKid:()=>{throw jl(Vl)},async getPublicKeyThumbprint(){throw jl(Vl)},async removeTokenBindingKey(){throw jl(Vl)},async clearKeystore(){throw jl(Vl)},async signJwt(){throw jl(Vl)},async hashString(){throw jl(Vl)}};
41
+ /*! @azure/msal-common v15.12.0 2025-08-19 */var Jl;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(Jl||(Jl={}));class Xl{constructor(e,t,i){this.level=Jl.Info;const o=e||Xl.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:Jl.Info,this.correlationId=o.correlationId||Fa.EMPTY_STRING,this.packageName=t||Fa.EMPTY_STRING,this.packageVersion=i||Fa.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Jl.Info}}clone(e,t,i){return new Xl({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const i=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Jl[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,i){this.localCallback&&this.localCallback(e,t,i)}error(e,t){this.logMessage(e,{logLevel:Jl.Error,containsPii:!1,correlationId:t||Fa.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Jl.Error,containsPii:!0,correlationId:t||Fa.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Jl.Warning,containsPii:!1,correlationId:t||Fa.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Jl.Warning,containsPii:!0,correlationId:t||Fa.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Jl.Info,containsPii:!1,correlationId:t||Fa.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Jl.Info,containsPii:!0,correlationId:t||Fa.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Jl.Verbose,containsPii:!1,correlationId:t||Fa.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Jl.Verbose,containsPii:!0,correlationId:t||Fa.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Jl.Trace,containsPii:!1,correlationId:t||Fa.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Jl.Trace,containsPii:!0,correlationId:t||Fa.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
42
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const ed="@azure/msal-common",td="15.12.0",id="none",od="redirect_uri_empty",rd="claims_request_parsing_error",nd="authority_uri_insecure",ad="url_parse_error",sd="empty_url_error",ld="empty_input_scopes_error",dd="invalid_claims",cd="token_request_empty",pd="logout_request_empty",ud="invalid_code_challenge_method",hd="pkce_params_missing",md="invalid_cloud_discovery_metadata",fd="invalid_authority_metadata",gd="untrusted_authority",Td="missing_ssh_jwk",yd="missing_ssh_kid",Ad="missing_nonce_authentication_header",Id="invalid_authentication_header",_d="cannot_set_OIDCOptions",Ed="cannot_allow_platform_broker",Od="authority_mismatch",Cd="invalid_request_method_for_EAR",Nd="invalid_authorize_post_body_parameters",Rd={[od]:"A redirect URI is required for all calls, and none has been set.",[rd]:"Could not parse the given claims request object.",[nd]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[ad]:"URL could not be parsed into appropriate segments.",[sd]:"URL was empty or null.",[ld]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[dd]:"Given claims parameter must be a stringified JSON object.",[cd]:"Token request was empty and not found in cache.",[pd]:"The logout request was null or undefined.",[ud]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[hd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[md]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[fd]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[gd]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Td]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[yd]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Ad]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Id]:"Invalid authentication header provided",[_d]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Ed]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[Od]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[Nd]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Cd]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."};class bd extends il{constructor(e){super(e,Rd[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,bd.prototype)}}function wd(e){return new bd(e)}
43
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Pd{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},i=e.split("&"),o=e=>decodeURIComponent(e.replace(/\+/g," "));return i.forEach(e=>{if(e.trim()){const[i,r]=e.split(/=(.+)/g,2);i&&r&&(t[o(i)]=o(r))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
44
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class vd{constructor(e){const t=e?Pd.trimArrayEntries([...e]):[],i=t?Pd.removeEmptyStringsFromArray(t):[];if(!i||!i.length)throw wd(ld);this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||Fa.EMPTY_STRING).split(" ");return new vd(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...za],i=new vd(t);return i.containsOnlyOIDCScopes()?i.removeScope(Fa.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new vd(t);return!!e&&i.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e)))}containsOnlyOIDCScopes(){let e=0;return Qa.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw jl(Ol)}}removeScope(e){if(!e)throw jl(El);this.scopes.delete(e.trim())}removeOIDCScopes(){Qa.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw jl(Cl);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw jl(Cl);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),i=e.getScopeCount(),o=this.getScopeCount();return t.size<o+i}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return Fa.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
45
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Ld(e,t){return!!e&&!!t&&e===t.split(".")[1]}function Sd(e,t,i,o){if(o){const{oid:t,sub:i,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=o,p=r||a||s||"";return{tenantId:p,localAccountId:t||i||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:Ld(p,e)}}return{tenantId:i,localAccountId:t,username:"",isHomeTenant:Ld(i,e)}}function Md(e,t,i,o){let r=e;if(t){const{isHomeTenant:i,...o}=t;r={...e,...o}}if(i){const{isHomeTenant:t,...n}=Sd(e.homeAccountId,e.localAccountId,e.tenantId,i);return r={...r,...n,idTokenClaims:i,idToken:o},r}return r}
46
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Dd(e,t){const i=function(e){if(!e)throw jl(sl);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw jl(al);return t[2]}(e);try{const e=t(i);return JSON.parse(e)}catch(e){throw jl(al)}}function kd(e,t){if(0===t||Date.now()-3e5>e+t)throw jl(Tl)}
47
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Ud(e){if(!e)return e;let t=e.toLowerCase();return Pd.endsWith(t,"?")?t=t.slice(0,-1):Pd.endsWith(t,"?/")&&(t=t.slice(0,-2)),Pd.endsWith(t,"/")||(t+="/"),t}function xd(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function Fd(e){if(!e||e.indexOf("=")<0)return null;try{const t=xd(e),i=Object.fromEntries(new URLSearchParams(t));if(i.code||i.ear_jwe||i.error||i.error_description||i.state)return i}catch(e){throw jl(pl)}return null}function Bd(e,t=!0,i){const o=new Array;return e.forEach((e,r)=>{!t&&i&&r in i?o.push(`${r}=${e}`):o.push(`${r}=${encodeURIComponent(e)}`)}),o.join("&")}function qd(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return Ud(e.origin+e.pathname+e.search)}catch(e){return Ud(t)}}
48
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Wd{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw wd(sd);e.includes("#")||(this._urlString=Wd.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Pd.endsWith(t,"?")?t=t.slice(0,-1):Pd.endsWith(t,"?/")&&(t=t.slice(0,-2)),Pd.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw wd(ad)}if(!e.HostNameAndPort||!e.PathSegments)throw wd(ad);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw wd(nd)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return Wd.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==is&&i[0]!==os||(i[0]=e),Wd.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw wd(ad);const i={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=i.AbsolutePath.split("/");return o=o.filter(e=>e&&e.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=e.match(t);if(!i)throw wd(ad);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===Fa.FORWARD_SLASH){const i=new Wd(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new Wd(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Fd(e)}}
49
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Gd={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},Hd={metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Yd=new Set;function Kd(e,t,i,o){if(o?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const r=Vd(t,e);if(r)return o?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${i}, returning aliases`),r.aliases;o?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${i}`)}return null}function Vd(e,t){for(let i=0;i<e.length;i++){const o=e[i];if(o.aliases.includes(t))return o}return null}
50
+ /*! @azure/msal-common v15.12.0 2025-08-19 */Hd.metadata.forEach(e=>{e.aliases.forEach(e=>{Yd.add(e)})});const zd="cache_quota_exceeded",Qd="cache_error_unknown",$d={[zd]:"Exceeded cache storage capacity.",[Qd]:"Unexpected error occurred when using cache storage."};class jd extends il{constructor(e,t){const i=t||($d[e]?$d[e]:$d[Qd]);super(`${e}: ${i}`),Object.setPrototypeOf(this,jd.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}function Zd(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new jd(zd):new jd(e.name,e.message):new jd(Qd)}
51
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Jd{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(ed,td),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const i=this.getAllAccounts(e,t);if(i.length>1){return i.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===i.length?i[0]:null}getBaseAccountInfo(e,t){const i=this.getAccountsFilteredBy(e,t);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(e,t,i){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,i?.tenantId,i))}getTenantedAccountInfoByFilter(e,t,i,o,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;const s=this.getIdToken(e,o,t,i.tenantId);return s&&(n=Dd(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=Md(e,i,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,i,o){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(i){const e=n.get(i);if(!e)return[];n=new Map([[i,e]])}const s=[];return n.forEach(e=>{const i=this.getTenantedAccountInfoByFilter(r,a,e,t,o);i&&s.push(i)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw jl(Pl);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==i?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==i?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==i?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof il?e:Zd(e)}}async saveAccessToken(e,t){const i={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=vd.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,i,!1))return;const o=this.getAccessTokenCredential(e,t);if(o&&this.credentialMatchesFilter(o,i)){vd.fromString(o.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const i=this.getAccountKeys(),o=[];return i.forEach(i=>{const r=this.getAccount(i,t);if(!r)return;if(e.homeAccountId&&!this.matchHomeAccountId(r,e.homeAccountId))return;if(e.username&&!this.matchUsername(r.username,e.username))return;if(e.environment&&!this.matchEnvironment(r,e.environment))return;if(e.realm&&!this.matchRealm(r,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(r,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(r,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},a=r.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,n));a&&0===a.length||o.push(r)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===Ds.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(i[t]=o))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(i=o)}),i}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t);this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const i=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);i.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),i.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),i.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const i=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!i||i.credentialType.toLowerCase()!==Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==Ds.POP)return;const o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Cs.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(n,t,i),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let i=a;if(!o){const t=new Map;a.forEach((i,o)=>{i.realm===e.tenantId&&t.set(o,i)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;i=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),i.forEach((e,i)=>{this.removeIdToken(i,t)}),r&&t&&r.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,i){const o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(i,t);o&&this.credentialMatchesFilter(o,e)&&r.set(i,o)}),r}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.clientId||-1!==i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,i,o){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=vd.createSearchScopes(t.scopes),a=t.authenticationScheme||Ds.BEARER,s=a.toLowerCase()!==Ds.BEARER.toLowerCase()?Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME:Cs.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,c=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,l,!0)){const t=this.getAccessTokenCredential(e,r);t&&this.credentialMatchesFilter(t,l)&&c.push(t)}});const p=c.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):p>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),c.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),r)}),this.performanceClient.addFields({multiMatchedAT:c.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),c[0])}accessTokenKeyMatchesFilter(e,t,i){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!o.includes(e[t].toLowerCase()))return!1;if(!i&&o.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const i=this.getTokenKeys(),o=[];return i.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const r=this.getAccessTokenCredential(i,t);r&&this.credentialMatchesFilter(r,e)&&o.push(r)}),o}getRefreshToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Rs:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Cs.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,i);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}});const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&r&&i&&r.addFields({multiMatchedRT:d},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.familyId||-1!==i.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),o=Object.keys(i).map(e=>i[e]),r=o.length;if(r<1)return null;if(r>1)throw jl(Il);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Rs)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const o=e.canonicalAuthority;if(o){const r=new Wd(o).getUrlComponents().HostNameAndPort;i=Kd(r,e.cloudDiscoveryMetadata?.metadata,Ps,t)||Kd(r,Hd.metadata,Ss,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==Cs.ACCESS_TOKEN&&e.credentialType!==Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return vd.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(Ns)}isAuthorityMetadata(e){return-1!==e.indexOf(bs)}generateAuthorityMetadataCacheKey(e){return`${bs}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Xd extends Jd{async setAccount(){throw jl(Vl)}getAccount(){throw jl(Vl)}async setIdTokenCredential(){throw jl(Vl)}getIdTokenCredential(){throw jl(Vl)}async setAccessTokenCredential(){throw jl(Vl)}getAccessTokenCredential(){throw jl(Vl)}async setRefreshTokenCredential(){throw jl(Vl)}getRefreshTokenCredential(){throw jl(Vl)}setAppMetadata(){throw jl(Vl)}getAppMetadata(){throw jl(Vl)}setServerTelemetry(){throw jl(Vl)}getServerTelemetry(){throw jl(Vl)}setAuthorityMetadata(){throw jl(Vl)}getAuthorityMetadata(){throw jl(Vl)}getAuthorityMetadataKeys(){throw jl(Vl)}setThrottlingCache(){throw jl(Vl)}getThrottlingCache(){throw jl(Vl)}removeItem(){throw jl(Vl)}getKeys(){throw jl(Vl)}getAccountKeys(){throw jl(Vl)}getTokenKeys(){throw jl(Vl)}generateCredentialKey(){throw jl(Vl)}generateAccountKey(){throw jl(Vl)}}
52
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const ec="AAD",tc="OIDC",ic="EAR",oc="acquireTokenByCode",rc="acquireTokenByRefreshToken",nc="acquireTokenSilent",ac="acquireTokenSilentAsync",sc="acquireTokenPopup",lc="acquireTokenPreRedirect",dc="acquireTokenRedirect",cc="cryptoOptsGetPublicKeyThumbprint",pc="cryptoOptsSignJwt",uc="silentCacheClientAcquireToken",hc="silentIframeClientAcquireToken",mc="awaitConcurrentIframe",fc="silentRefreshClientAcquireToken",gc="ssoSilent",Tc="standardInteractionClientGetDiscoveredAuthority",yc="nativeInteractionClientAcquireToken",Ac="networkClientSendPostRequestAsync",Ic="refreshTokenClientExecutePostToTokenEndpoint",_c="authorizationCodeClientExecutePostToTokenEndpoint",Ec="refreshTokenClientExecuteTokenRequest",Oc="refreshTokenClientAcquireToken",Cc="refreshTokenClientAcquireTokenWithCachedRefreshToken",Nc="refreshTokenClientAcquireTokenByRefreshToken",Rc="refreshTokenClientCreateTokenRequestBody",bc="acquireTokenFromCache",wc="silentFlowClientAcquireCachedToken",Pc="silentFlowClientGenerateResultFromCacheRecord",vc="acquireTokenBySilentIframe",Lc="initializeBaseRequest",Sc="initializeSilentRequest",Mc="initializeClientApplication",Dc="initializeCache",kc="silentIframeClientTokenHelper",Uc="silentHandlerInitiateAuthRequest",xc="silentHandlerMonitorIframeForHash",Fc="silentHandlerLoadFrame",Bc="silentHandlerLoadFrameSync",qc="standardInteractionClientCreateAuthCodeClient",Wc="standardInteractionClientGetClientConfiguration",Gc="standardInteractionClientInitializeAuthorizationRequest",Hc="getAuthCodeUrl",Yc="getStandardParams",Kc="handleCodeResponseFromServer",Vc="handleCodeResponse",zc="handleResponseEar",Qc="handleResponsePlatformBroker",$c="handleResponseCode",jc="updateTokenEndpointAuthority",Zc="authClientAcquireToken",Jc="authClientExecuteTokenRequest",Xc="authClientCreateTokenRequestBody",ep="popTokenGenerateCnf",tp="popTokenGenerateKid",ip="handleServerTokenResponse",op="deserializeResponse",rp="authorityFactoryCreateDiscoveredInstance",np="authorityResolveEndpointsAsync",ap="authorityGetCloudDiscoveryMetadataFromNetwork",sp="authorityUpdateCloudDiscoveryMetadata",lp="authorityGetEndpointMetadataFromNetwork",dp="authorityUpdateEndpointMetadata",cp="authorityUpdateMetadataWithRegionalInformation",pp="regionDiscoveryDetectRegion",up="regionDiscoveryGetRegionFromIMDS",hp="regionDiscoveryGetCurrentVersion",mp="acquireTokenByCodeAsync",fp="handleRedirectPromise",gp="handleNativeRedirectPromise",Tp="nativeMessageHandlerHandshake",yp="removeHiddenIframe",Ap="clearTokensAndKeysWithClaims",Ip="cacheManagerGetRefreshToken",_p="importExistingCache",Ep="setUserData",Op="localStorageUpdated",Cp="generatePkceCodes",Np="generateCodeVerifier",Rp="generateCodeChallengeFromVerifier",bp="sha256Digest",wp="getRandomValues",Pp="generateHKDF",vp="generateBaseKey",Lp="base64Decode",Sp="urlEncodeArr",Mp="encrypt",Dp="decrypt",kp="generateEarKey",Up="decryptEarResponse",xp=1;
53
53
  /*! @azure/msal-common v15.12.0 2025-08-19 */
54
54
  /*! @azure/msal-common v15.12.0 2025-08-19 */
55
- class Up{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class xp{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:kp,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Up}}startPerformanceMeasurement(){return new Up}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}
56
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Fp={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},Bp={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:jl.Info,correlationId:Ua.EMPTY_STRING},qp={claimsBasedCachingEnabled:!1},Wp={async sendGetRequestAsync(){throw Ql(Yl)},async sendPostRequestAsync(){throw Ql(Yl)}},Gp={sku:Ua.SKU,version:Xl,cpu:Ua.EMPTY_STRING,os:Ua.EMPTY_STRING},Hp={clientSecret:Ua.EMPTY_STRING,clientAssertion:void 0},Yp={azureCloudInstance:ed,tenant:`${Ua.DEFAULT_COMMON_TENANT}`},Kp={application:{appName:"",appVersion:""}};function Vp(e){return e.authOptions.authority.options.protocolMode===Xd}
57
- /*! @azure/msal-common v15.12.0 2025-08-19 */const zp="home_account_id",Qp="UPN";
58
- /*! @azure/msal-common v15.12.0 2025-08-19 */function $p(e,t){if(!e)throw Ql(ol);try{const i=t(e);return JSON.parse(i)}catch(e){throw Ql(il)}}function jp(e){if(!e)throw Ql(il);const t=e.split(_s,2);return{uid:t[0],utid:t.length<2?Ua.EMPTY_STRING:t[1]}}
59
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Zp="client_id",Jp="redirect_uri",Xp="token_type",eu="req_cnf",tu="return_spa_code",iu="x-client-xtra-sku",ou="brk_client_id",ru="brk_redirect_uri",nu="instance_aware";
55
+ class Fp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Bp{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:xp,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Fp}}startPerformanceMeasurement(){return new Fp}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}
56
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const qp={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},Wp={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Jl.Info,correlationId:Fa.EMPTY_STRING},Gp={claimsBasedCachingEnabled:!1},Hp={async sendGetRequestAsync(){throw jl(Vl)},async sendPostRequestAsync(){throw jl(Vl)}},Yp={sku:Fa.SKU,version:td,cpu:Fa.EMPTY_STRING,os:Fa.EMPTY_STRING},Kp={clientSecret:Fa.EMPTY_STRING,clientAssertion:void 0},Vp={azureCloudInstance:id,tenant:`${Fa.DEFAULT_COMMON_TENANT}`},zp={application:{appName:"",appVersion:""}};function Qp(e){return e.authOptions.authority.options.protocolMode===tc}
57
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const $p="home_account_id",jp="UPN";
58
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Zp(e,t){if(!e)throw jl(nl);try{const i=t(e);return JSON.parse(i)}catch(e){throw jl(rl)}}function Jp(e){if(!e)throw jl(rl);const t=e.split(Os,2);return{uid:t[0],utid:t.length<2?Fa.EMPTY_STRING:t[1]}}
59
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Xp="client_id",eu="redirect_uri",tu="token_type",iu="req_cnf",ou="return_spa_code",ru="x-client-xtra-sku",nu="brk_client_id",au="brk_redirect_uri",su="instance_aware";
60
60
  /*! @azure/msal-common v15.12.0 2025-08-19 */
61
- function au(e,t,i){if(!t)return;const o=e.get(Zp);o&&e.has(ou)&&i?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(Jp)},t)}function su(e,t){e.set("response_type",t)}function lu(e,t,i=!0,o=Ka){!i||o.includes("openid")||t.includes("openid")||o.push("openid");const r=i?[...t||[],...o]:t||[],n=new wd(r);e.set("scope",n.printScopes())}function du(e,t){e.set(Zp,t)}function cu(e,t){e.set(Jp,t)}function pu(e,t){e.set("login_hint",t)}function uu(e,t){e.set(ja,`UPN:${t}`)}function hu(e,t){e.set(ja,`Oid:${t.uid}@${t.utid}`)}function mu(e,t){e.set("sid",t)}function fu(e,t,i){const o=function(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw Rd(sd)}else i={};t&&t.length>0&&(i.hasOwnProperty(os)||(i[os]={}),i[os][rs]={values:t});return JSON.stringify(i)}(t,i);try{JSON.parse(o)}catch(e){throw Rd(sd)}e.set("claims",o)}function gu(e,t){e.set("client-request-id",t)}function Tu(e,t){e.set("x-client-SKU",t.sku),e.set("x-client-VER",t.version),t.os&&e.set("x-client-OS",t.os),t.cpu&&e.set("x-client-CPU",t.cpu)}function Au(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function yu(e,t){t&&e.set("state",t)}function Iu(e,t,i){if(!t||!i)throw Rd(pd);e.set("code_challenge",t),e.set("code_challenge_method",i)}function _u(e,t){e.set("client_secret",t)}function Eu(e,t){t&&e.set("client_assertion",t)}function Ou(e,t){t&&e.set("client_assertion_type",t)}function Cu(e,t){e.set("grant_type",t)}function Nu(e){e.set("client_info","1")}function Ru(e){e.has(nu)||e.set(nu,"true")}function bu(e,t){Object.entries(t).forEach(([t,i])=>{!e.has(t)&&i&&e.set(t,i)})}function wu(e,t){t&&(e.set(Xp,Ss.POP),e.set(eu,t))}function Pu(e,t){t&&(e.set(Xp,Ss.SSH),e.set(eu,t))}function vu(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function Lu(e){e.set("x-ms-lib-capability",Us)}function Su(e,t,i){e.has(ou)||e.set(ou,t),e.has(ru)||e.set(ru,i)}
61
+ function lu(e,t,i){if(!t)return;const o=e.get(Xp);o&&e.has(nu)&&i?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(eu)},t)}function du(e,t){e.set("response_type",t)}function cu(e,t,i=!0,o=za){!i||o.includes("openid")||t.includes("openid")||o.push("openid");const r=i?[...t||[],...o]:t||[],n=new vd(r);e.set("scope",n.printScopes())}function pu(e,t){e.set(Xp,t)}function uu(e,t){e.set(eu,t)}function hu(e,t){e.set("login_hint",t)}function mu(e,t){e.set(Ja,`UPN:${t}`)}function fu(e,t){e.set(Ja,`Oid:${t.uid}@${t.utid}`)}function gu(e,t){e.set("sid",t)}function Tu(e,t,i){const o=function(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw wd(dd)}else i={};t&&t.length>0&&(i.hasOwnProperty(ns)||(i[ns]={}),i[ns][as]={values:t});return JSON.stringify(i)}(t,i);try{JSON.parse(o)}catch(e){throw wd(dd)}e.set("claims",o)}function yu(e,t){e.set("client-request-id",t)}function Au(e,t){e.set("x-client-SKU",t.sku),e.set("x-client-VER",t.version),t.os&&e.set("x-client-OS",t.os),t.cpu&&e.set("x-client-CPU",t.cpu)}function Iu(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function _u(e,t){t&&e.set("state",t)}function Eu(e,t,i){if(!t||!i)throw wd(hd);e.set("code_challenge",t),e.set("code_challenge_method",i)}function Ou(e,t){e.set("client_secret",t)}function Cu(e,t){t&&e.set("client_assertion",t)}function Nu(e,t){t&&e.set("client_assertion_type",t)}function Ru(e,t){e.set("grant_type",t)}function bu(e){e.set("client_info","1")}function wu(e){e.has(su)||e.set(su,"true")}function Pu(e,t){Object.entries(t).forEach(([t,i])=>{!e.has(t)&&i&&e.set(t,i)})}function vu(e,t){t&&(e.set(tu,Ds.POP),e.set(iu,t))}function Lu(e,t){t&&(e.set(tu,Ds.SSH),e.set(iu,t))}function Su(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function Mu(e){e.set("x-ms-lib-capability",Fs)}function Du(e,t,i){e.has(nu)||e.set(nu,t),e.has(au)||e.set(au,i)}
62
62
  /*! @azure/msal-common v15.12.0 2025-08-19 */
63
- const Mu=0,Du=1,ku=2,Uu=3;
63
+ const ku=0,Uu=1,xu=2,Fu=3;
64
64
  /*! @azure/msal-common v15.12.0 2025-08-19 */
65
65
  /*! @azure/msal-common v15.12.0 2025-08-19 */
66
- const xu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}try{const o=e(...n);return a?.end({success:!0}),i.trace(`Returning result from ${t}`),o}catch(e){i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},Fu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}return o?.setPreQueueTime(t,r),e(...n).then(e=>(i.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};
66
+ const Bu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}try{const o=e(...n);return a?.end({success:!0}),i.trace(`Returning result from ${t}`),o}catch(e){i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},qu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}return o?.setPreQueueTime(t,r),e(...n).then(e=>(i.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};
67
67
  /*! @azure/msal-common v15.12.0 2025-08-19 */
68
- class Bu{constructor(e,t,i,o){this.networkInterface=e,this.logger=t,this.performanceClient=i,this.correlationId=o}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(dp,this.correlationId);let i=e;if(i)t.region_source=qs;else{const e=Bu.IMDS_OPTIONS;try{const o=await Fu(this.getRegionFromIMDS.bind(this),cp,this.logger,this.performanceClient,this.correlationId)(Ua.IMDS_VERSION,e);if(o.status===xa&&(i=o.body,t.region_source=Ws),o.status===Ba){const o=await Fu(this.getCurrentVersion.bind(this),pp,this.logger,this.performanceClient,this.correlationId)(e);if(!o)return t.region_source=Bs,null;const r=await Fu(this.getRegionFromIMDS.bind(this),cp,this.logger,this.performanceClient,this.correlationId)(o,e);r.status===xa&&(i=r.body,t.region_source=Ws)}}catch(e){return t.region_source=Bs,null}}return i||(t.region_source=Bs),i||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(cp,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Ua.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Ua.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(pp,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Ua.IMDS_ENDPOINT}?format=json`,e);return t.status===Ba&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
68
+ class Wu{constructor(e,t,i,o){this.networkInterface=e,this.logger=t,this.performanceClient=i,this.correlationId=o}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(pp,this.correlationId);let i=e;if(i)t.region_source=Gs;else{const e=Wu.IMDS_OPTIONS;try{const o=await qu(this.getRegionFromIMDS.bind(this),up,this.logger,this.performanceClient,this.correlationId)(Fa.IMDS_VERSION,e);if(o.status===Ba&&(i=o.body,t.region_source=Hs),o.status===Wa){const o=await qu(this.getCurrentVersion.bind(this),hp,this.logger,this.performanceClient,this.correlationId)(e);if(!o)return t.region_source=Ws,null;const r=await qu(this.getRegionFromIMDS.bind(this),up,this.logger,this.performanceClient,this.correlationId)(o,e);r.status===Ba&&(i=r.body,t.region_source=Hs)}}catch(e){return t.region_source=Ws,null}}return i||(t.region_source=Ws),i||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(up,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Fa.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Fa.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(hp,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Fa.IMDS_ENDPOINT}?format=json`,e);return t.status===Wa&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
69
69
  /*! @azure/msal-common v15.12.0 2025-08-19 */
70
- function qu(){return Math.round((new Date).getTime()/1e3)}function Wu(e){return e.getTime()/1e3}function Gu(e){return e?new Date(1e3*Number(e)):new Date}function Hu(e,t){const i=Number(e)||0;return qu()+t>i}function Yu(e,t){const i=Number(e)+24*t*60*60*1e3;return Date.now()>i}
70
+ function Gu(){return Math.round((new Date).getTime()/1e3)}function Hu(e){return e.getTime()/1e3}function Yu(e){return e?new Date(1e3*Number(e)):new Date}function Ku(e,t){const i=Number(e)||0;return Gu()+t>i}function Vu(e,t){const i=Number(e)+24*t*60*60*1e3;return Date.now()>i}
71
71
  /*! @azure/msal-common v15.12.0 2025-08-19 */
72
- function Ku(e,t,i,o,r){return{credentialType:Es.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function Vu(e,t,i,o,r,n,a,s,l,d,c,p,u,h,m){const f={homeAccountId:e,credentialType:Es.ACCESS_TOKEN,secret:i,cachedAt:qu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||Ss.BEARER,lastUpdatedAt:Date.now().toString()};if(p&&(f.userAssertionHash=p),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==Ss.BEARER.toLowerCase())switch(f.credentialType=Es.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case Ss.POP:const e=Sd(i,l);if(!e?.cnf?.kid)throw Ql(Ul);f.keyId=e.cnf.kid;break;case Ss.SSH:f.keyId=u}return f}function zu(e,t,i,o,r,n,a){const s={credentialType:Es.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function Qu(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function $u(e){return!!e&&(Qu(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Es.ACCESS_TOKEN||e.credentialType===Es.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function ju(e){return!!e&&(Qu(e)&&e.credentialType===Es.REFRESH_TOKEN)}function Zu(){return qu()+Rs}function Ju(e,t,i){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=i,e.jwks_uri=t.jwks_uri}function Xu(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function eh(e){return e.expiresAt<=qu()}
73
- /*! @azure/msal-common v15.12.0 2025-08-19 */Bu.IMDS_OPTIONS={headers:{Metadata:"true"}};class th{constructor(e,t,i,o,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=a,this.correlationId=n,this.managedIdentity=s||!1,this.regionDiscovery=new Bu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Ua.CIAM_AUTH_URL))return Uu;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Ua.ADFS:return Du;case Ua.DSTS:return ku}return Mu}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new Bd(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Ql(al)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Ql(al)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Ql(al)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Ql(Bl);return this.replacePath(this.metadata.end_session_endpoint)}throw Ql(al)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Ql(al)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Ql(al)}canReplaceTenant(e){return 1===e.PathSegments.length&&!th.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Mu&&this.protocolMode!==Xd}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new Bd(this.metadata.canonical_authority).getUrlComponents(),o=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=o[r];if(0===r&&this.canReplaceTenant(i)){const e=new Bd(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];n!==e&&(this.logger.verbose(`Replacing tenant domain name ${n} with id ${e}`),n=e)}e!==n&&(t=t.replace(`/${n}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Du||this.protocolMode===Xd&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(op,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await Fu(this.updateCloudDiscoveryMetadata.bind(this),np,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await Fu(this.updateEndpointMetadata.bind(this),sp,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Zu(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==ws&&i?.source!==ws&&(e.expiresAt=Zu(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(sp,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===vs&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Ju(e,await Fu(this.updateMetadataWithRegionalInformation.bind(this),lp,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let i=await Fu(this.getEndpointMetadataFromNetwork.bind(this),ap,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await Fu(this.updateMetadataWithRegionalInformation.bind(this),lp,this.logger,this.performanceClient,this.correlationId)(i)),Ju(e,i,!0),Ps;throw Ql(ll,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Ju(e,t,!1),{source:bs};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return Ju(e,t,!1),{source:vs,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const i=eh(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ws}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new Bd(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Rd(hd)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(ap,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e),o=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}
74
- /*! @azure/msal-common v15.12.0 2025-08-19 */(i.body);return o?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in qd?qd[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(lp,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Ua.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Gs,this.regionDiscoveryMetadata.region_used=t,th.replaceWithRegionalInformation(e,t);const i=await Fu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),dp,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=Hs,this.regionDiscoveryMetadata.region_used=i,th.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=Ys}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(np,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await Fu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),rp,this.logger,this.performanceClient,this.correlationId)();if(i)return Xu(e,i,!0),Ps;throw Rd(md)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Ua.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Ua.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Ua.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Xu(e,t,!1),bs;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(i=this.hostnameAndPort,Yd(Wd.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Xu(e,t,!1),vs;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var i;const o=eh(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),ws):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Uu)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),th.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=Yd(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Rd(ud)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),th.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(rp,this.correlationId);const e=`${Ua.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let i=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,t);let r,n;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}
75
- /*! @azure/msal-common v15.12.0 2025-08-19 */(o.body))r=o.body,n=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===Ua.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),n=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=Yd(n,this.hostnameAndPort)}catch(e){if(e instanceof el)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=th.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&Bd.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==ed){const e=t.tenant?t.tenant:Ua.DEFAULT_COMMON_TENANT;i=`${t.azureCloudInstance}/${e}/`}return i||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Ua.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Ql(al)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Gd.has(e)}static isPublicCloudAuthority(e){return Ua.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const o=new Bd(e);o.validateAsUri();const r=o.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${Ua.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=Bd.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:n}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=th.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=th.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=th.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new Bd(e).getUrlComponents();if(0===i.PathSegments.length&&i.HostNameAndPort.endsWith(Ua.CIAM_AUTH_URL)){t=`${t}${i.HostNameAndPort.split(".")[0]}${Ua.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function ih(e){return e.endsWith(Ua.FORWARD_SLASH)?e:`${e}${Ua.FORWARD_SLASH}`}
72
+ function zu(e,t,i,o,r){return{credentialType:Cs.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function Qu(e,t,i,o,r,n,a,s,l,d,c,p,u,h,m){const f={homeAccountId:e,credentialType:Cs.ACCESS_TOKEN,secret:i,cachedAt:Gu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||Ds.BEARER,lastUpdatedAt:Date.now().toString()};if(p&&(f.userAssertionHash=p),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==Ds.BEARER.toLowerCase())switch(f.credentialType=Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case Ds.POP:const e=Dd(i,l);if(!e?.cnf?.kid)throw jl(Fl);f.keyId=e.cnf.kid;break;case Ds.SSH:f.keyId=u}return f}function $u(e,t,i,o,r,n,a){const s={credentialType:Cs.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function ju(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function Zu(e){return!!e&&(ju(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Cs.ACCESS_TOKEN||e.credentialType===Cs.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Ju(e){return!!e&&(ju(e)&&e.credentialType===Cs.REFRESH_TOKEN)}function Xu(){return Gu()+ws}function eh(e,t,i){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=i,e.jwks_uri=t.jwks_uri}function th(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function ih(e){return e.expiresAt<=Gu()}
73
+ /*! @azure/msal-common v15.12.0 2025-08-19 */Wu.IMDS_OPTIONS={headers:{Metadata:"true"}};class oh{constructor(e,t,i,o,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=a,this.correlationId=n,this.managedIdentity=s||!1,this.regionDiscovery=new Wu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Fa.CIAM_AUTH_URL))return Fu;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Fa.ADFS:return Uu;case Fa.DSTS:return xu}return ku}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new Wd(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw jl(ll)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw jl(ll)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw jl(ll)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw jl(Wl);return this.replacePath(this.metadata.end_session_endpoint)}throw jl(ll)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw jl(ll)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw jl(ll)}canReplaceTenant(e){return 1===e.PathSegments.length&&!oh.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===ku&&this.protocolMode!==tc}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new Wd(this.metadata.canonical_authority).getUrlComponents(),o=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=o[r];if(0===r&&this.canReplaceTenant(i)){const e=new Wd(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];n!==e&&(this.logger.verbose(`Replacing tenant domain name ${n} with id ${e}`),n=e)}e!==n&&(t=t.replace(`/${n}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Uu||this.protocolMode===tc&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(np,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await qu(this.updateCloudDiscoveryMetadata.bind(this),sp,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await qu(this.updateEndpointMetadata.bind(this),dp,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Xu(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==vs&&i?.source!==vs&&(e.expiresAt=Xu(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(dp,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Ss&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){eh(e,await qu(this.updateMetadataWithRegionalInformation.bind(this),cp,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let i=await qu(this.getEndpointMetadataFromNetwork.bind(this),lp,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await qu(this.updateMetadataWithRegionalInformation.bind(this),cp,this.logger,this.performanceClient,this.correlationId)(i)),eh(e,i,!0),Ls;throw jl(cl,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),eh(e,t,!1),{source:Ps};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return eh(e,t,!1),{source:Ss,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const i=ih(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:vs}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new Wd(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw wd(fd)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(lp,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e),o=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}
74
+ /*! @azure/msal-common v15.12.0 2025-08-19 */(i.body);return o?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Gd?Gd[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(cp,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Fa.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Ys,this.regionDiscoveryMetadata.region_used=t,oh.replaceWithRegionalInformation(e,t);const i=await qu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),pp,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=Ks,this.regionDiscoveryMetadata.region_used=i,oh.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=Vs}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(sp,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await qu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ap,this.logger,this.performanceClient,this.correlationId)();if(i)return th(e,i,!0),Ls;throw wd(gd)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Fa.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Fa.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Fa.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),th(e,t,!1),Ps;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(i=this.hostnameAndPort,Vd(Hd.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),th(e,t,!1),Ss;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var i;const o=ih(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),vs):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Fu)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),oh.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=Vd(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),wd(md)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),oh.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(ap,this.correlationId);const e=`${Fa.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let i=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,t);let r,n;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}
75
+ /*! @azure/msal-common v15.12.0 2025-08-19 */(o.body))r=o.body,n=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===Fa.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),n=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=Vd(n,this.hostnameAndPort)}catch(e){if(e instanceof il)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=oh.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&Wd.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==id){const e=t.tenant?t.tenant:Fa.DEFAULT_COMMON_TENANT;i=`${t.azureCloudInstance}/${e}/`}return i||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Fa.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw jl(ll)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Yd.has(e)}static isPublicCloudAuthority(e){return Fa.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const o=new Wd(e);o.validateAsUri();const r=o.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${Fa.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=Wd.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:n}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=oh.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=oh.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=oh.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new Wd(e).getUrlComponents();if(0===i.PathSegments.length&&i.HostNameAndPort.endsWith(Fa.CIAM_AUTH_URL)){t=`${t}${i.HostNameAndPort.split(".")[0]}${Fa.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function rh(e){return e.endsWith(Fa.FORWARD_SLASH)?e:`${e}${Fa.FORWARD_SLASH}`}
76
76
  /*! @azure/msal-common v15.12.0 2025-08-19 */
77
- async function oh(e,t,i,o,r,n,a){a?.addQueueMeasurement(ip,n);const s=th.transformCIAMAuthority(ih(e)),l=new th(s,t,i,o,r,n,a);try{return await Fu(l.resolveEndpointsAsync.bind(l),op,r,a,n)(),l}catch(e){throw Ql(al)}}
78
- /*! @azure/msal-common v15.12.0 2025-08-19 */th.reservedTenantDomains=new Set(["{tenant}","{tenantid}",es,is,ts]);class rh extends el{constructor(e,t,i,o,r){super(e,t,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,rh.prototype)}}
79
- /*! @azure/msal-common v15.12.0 2025-08-19 */function nh(e,t,i){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:i,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,embeddedClientId:t.embeddedClientId||t.tokenBodyParameters?.clientId}}
80
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ah{static generateThrottlingStorageKey(e){return`${ks}.${JSON.stringify(e)}`}static preProcess(e,t,i){const o=ah.generateThrottlingStorageKey(t),r=e.getThrottlingCache(o);if(r){if(r.throttleTime<Date.now())return void e.removeItem(o,i);throw new rh(r.errorCodes?.join(" ")||Ua.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,i,o){if(ah.checkResponseStatus(i)||ah.checkResponseForRetryAfter(i)){const r={throttleTime:ah.calculateThrottleTime(parseInt(i.headers[$a])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(ah.generateThrottlingStorageKey(t),r,o)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty($a)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,i=Date.now()/1e3;return Math.floor(1e3*Math.min(i+(t||Ms),i+Ds))}static removeThrottle(e,t,i,o){const r=nh(t,i,o),n=this.generateThrottlingStorageKey(r);e.removeItem(n,i.correlationId)}}
81
- /*! @azure/msal-common v15.12.0 2025-08-19 */class sh extends el{constructor(e,t,i){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,sh.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=i}}function lh(e,t,i,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new sh(e,t,i)}
82
- /*! @azure/msal-common v15.12.0 2025-08-19 */class dh{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:i,cacheOptions:o,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:p,serializableCache:u}){const h={...Bp,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Yp,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...Fp,...t},loggerOptions:h,cacheOptions:{...qp,...o},storageInterface:r||new Zd(e.clientId,$l,new Zl(h),new xp),networkInterface:n||Wp,cryptoInterface:a||$l,clientCredentials:s||Hp,libraryInfo:{...Gp,...l},telemetry:{...Kp,...d},serverTelemetryManager:c||null,persistencePlugin:p||null,serializableCache:u||null};var m}(e),this.logger=new Zl(this.config.loggerOptions,Jl,Xl),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[za]=Ua.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case zp:try{const i=jp(e.credential);t[ja]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Qp:t[ja]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,i,o,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(o,e,{body:t,headers:i},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,i,o){let r;ah.preProcess(this.cacheManager,e,o);try{r=await Fu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Tc,this.logger,this.performanceClient,o)(t,i);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[Ja]||"",requestId:e[Za]||""},o)}catch(e){if(e instanceof sh){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[Ja]||"",requestId:t[Za]||"",contentTypeHeader:t[za]||void 0,contentLengthHeader:t[Qa]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof el?e:Ql(sl)}return ah.postProcess(this.cacheManager,e,r,o),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Qc,t);const i=`https://${e}/${this.authority.tenant}/`,o=await oh(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&Su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&bu(t,e.tokenQueryParameters),gu(t,e.correlationId),au(t,e.correlationId,this.performanceClient),xd(t)}}
83
- /*! @azure/msal-common v15.12.0 2025-08-19 */function ch(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
84
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ph{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(e,t,i){const o=new ph;let r;t.authorityType===Du?o.authorityType=As:t.protocolMode===Xd?o.authorityType=ys:o.authorityType=Ts,e.clientInfo&&i&&(r=$p(e.clientInfo,i)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw Ql(wl);o.environment=n,o.realm=r?.utid||ch(e.idTokenClaims)||"",o.localAccountId=r?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=a||s||"",o.loginHint=e.idTokenClaims?.login_hint,o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const t=vd(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,i){const o=new ph;return o.authorityType=e.authorityType||ys,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.loginHint=e.loginHint,o.cloudGraphHostName=t,o.msGraphHost=i,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,t,i,o,r){if(t!==Du&&t!==ku){if(e)try{const t=$p(e,o.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,i){if(!e||!t)return!1;let o=!0;if(i){const i=e.idTokenClaims||{},r=t.idTokenClaims||{};o=i.iat===r.iat&&i.nonce===r.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.loginHint===t.loginHint&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}
85
- /*! @azure/msal-common v15.12.0 2025-08-19 */const uh="no_tokens_found",hh="native_account_unavailable",mh="refresh_token_expired",fh="ux_not_allowed",gh="bad_token",Th=["interaction_required","consent_required","login_required",gh,fh],Ah=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],yh={[uh]:"No refresh token found in the cache. Please sign-in.",[hh]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[mh]:"Refresh token has expired.",[gh]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[fh]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Ih extends el{constructor(e,t,i,o,r,n,a,s){super(e,t,i),Object.setPrototypeOf(this,Ih.prototype),this.timestamp=o||Ua.EMPTY_STRING,this.traceId=r||Ua.EMPTY_STRING,this.correlationId=n||Ua.EMPTY_STRING,this.claims=a||Ua.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function _h(e,t,i){const o=!!e&&Th.indexOf(e)>-1,r=!!i&&Ah.indexOf(i)>-1,n=!!t&&Th.some(e=>t.indexOf(e)>-1);return o||n||r}function Eh(e){return new Ih(e,yh[e])}
86
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Oh{static setRequestState(e,t,i){const o=Oh.generateLibraryState(e,i);return t?`${o}${Ua.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw Ql(vl);const i={id:e.createNewGuid()};t&&(i.meta=t);const o=JSON.stringify(i);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw Ql(vl);if(!t)throw Ql(cl);try{const i=t.split(Ua.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(Ua.RESOURCE_DELIM):Ua.EMPTY_STRING,n=e.base64Decode(o),a=JSON.parse(n);return{userRequestState:r||Ua.EMPTY_STRING,libraryState:a}}catch(e){throw Ql(cl)}}}
87
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Ch="sw";class Nh{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Jc,e.correlationId);const i=await Fu(this.generateKid.bind(this),Jc,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Xc,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Ch}}async signPopToken(e,t,i){return this.signPayload(e,t,i)}async signPayload(e,t,i,o){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=i,d=n?new Bd(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:qu(),m:r?.toUpperCase(),u:c?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:a||void 0,...o},t,l,i.correlationId)}}
88
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Rh{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
89
- /*! @azure/msal-common v15.12.0 2025-08-19 */class bh{constructor(e,t,i,o,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||Ua.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Ua.NOT_AVAILABLE} - Description: ${e.error_description||Ua.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Ua.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Ua.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,r=new rh(e.error,i,e.suberror,o,e.status);if(t&&e.status&&e.status>=Wa&&e.status<=Ga)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${r}`);if(t&&e.status&&e.status>=Fa&&e.status<=qa)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(_h(e.error,e.error_description,e.suberror))throw new Ih(e.error,e.error_description,e.suberror,e.timestamp||Ua.EMPTY_STRING,e.trace_id||Ua.EMPTY_STRING,e.correlation_id||Ua.EMPTY_STRING,e.claims||Ua.EMPTY_STRING,o);throw r}}async handleServerTokenResponse(e,t,i,o,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(ep,e.correlation_id),e.id_token){if(d=Sd(e.id_token||Ua.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw Ql(hl);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw Ql(ml);Md(e,o.maxAge)}}this.homeAccountIdentifier=ph.generateHomeAccountId(e.client_info||Ua.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=Oh.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||o.sshKid||void 0;const p=this.generateCacheRecord(e,t,i,o,d,n,r);let u;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),u=new Rh(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(u)),a&&!s&&p.account){const e=this.cacheStorage.generateAccountKey(p.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await bh.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(p,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&u&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(u))}return bh.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,e,l)}generateCacheRecord(e,t,i,o,r,n,a){const s=t.getPreferredCache();if(!s)throw Ql(wl);const l=ch(r);let d,c;e.id_token&&r&&(d=Ku(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=wh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let p=null;if(e.access_token){const r=e.scope?wd.fromString(e.scope):new wd(o.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=i+a,h=u+d,m=c&&c>0?i+c:void 0;p=Vu(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),u,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,o.claims,o.requestedClaimsHash)}let u=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=i+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}u=zu(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,n,t)}let h=null;return e.foci&&(h={clientId:this.clientId,environment:s,familyId:e.foci}),{account:c,idToken:d,accessToken:p,refreshToken:u,appMetadata:h}}static async generateAuthenticationResult(e,t,i,o,r,n,a,s,l){let d,c,p=Ua.EMPTY_STRING,u=[],h=null,m=Ua.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==Ss.POP||r.popKid)p=i.accessToken.secret;else{const t=new Nh(e),{secret:o,keyId:n}=i.accessToken;if(!n)throw Ql(ql);p=await t.signPopToken(o,n,r)}u=wd.fromString(i.accessToken.target).asArray(),h=Gu(i.accessToken.expiresOn),d=Gu(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(c=Gu(i.accessToken.refreshOn))}i.appMetadata&&(m=i.appMetadata.familyId===Cs?Cs:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&i.account&&(i.account.nativeAccountId=s?.spa_accountid);const T=i.account?Ld(i.account.getAccountInfo(),void 0,n,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:u,account:T,idToken:i?.idToken?.secret||"",idTokenClaims:n||{},accessToken:p,fromCache:o,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||Ua.EMPTY_STRING,familyId:m,tokenType:i.accessToken?.tokenType||Ua.EMPTY_STRING,state:a?a.userRequestState:Ua.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||Ua.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||Ua.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function wh(e,t,i,o,r,n,a,s,l,d,c,p){p?.verbose("setCachedAccount called");const u=e.getAccountKeys().find(e=>e.startsWith(i));let h=null;u&&(h=e.getAccount(u,r));const m=h||ph.createAccount({homeAccountId:i,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,o),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=vd(i,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
90
- /*! @azure/msal-common v15.12.0 2025-08-19 */async function Ph(e,t,i){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:i})}
91
- /*! @azure/msal-common v15.12.0 2025-08-19 */class vh extends dh{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement($c,e.correlationId),!e.code)throw Ql(yl);const i=qu(),o=await Fu(this.executeTokenRequest.bind(this),jc,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=o.headers?.[Za],n=new bh(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(o.body),Fu(n.handleServerTokenResponse.bind(n),ep,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,i,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw Rd(dd);const t=this.createLogoutUrlQueryString(e);return Bd.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(jc,t.correlationId);const i=this.createTokenQueryParameters(t),o=Bd.appendQueryString(e.tokenEndpoint,i),r=await Fu(this.createTokenRequestBody.bind(this),Zc,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=$p(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${_s}${e.utid}`,type:zp}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=nh(this.config.authOptions.clientId,t);return Fu(this.executePostToTokenEndpoint.bind(this),yc,this.logger,this.performanceClient,t.correlationId)(o,r,a,s,t.correlationId,yc)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Zc,e.correlationId);const t=new Map;if(du(t,e.embeddedClientId||e.tokenBodyParameters?.[Zp]||this.config.authOptions.clientId),this.includeRedirectUri)cu(t,e.redirectUri);else if(!e.redirectUri)throw Rd(td);if(lu(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Tu(t,this.config.libraryInfo),Au(t,this.config.telemetry.application),Lu(t),this.serverTelemetryManager&&!Vp(this.config)&&vu(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&_u(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Eu(t,await Ph(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Ou(t,i.assertionType)}if(Cu(t,fs),Nu(t),e.authenticationScheme===Ss.POP){const i=new Nh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await Fu(i.generateCnf.bind(i),Jc,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}wu(t,o)}else if(e.authenticationScheme===Ss.SSH){if(!e.sshJwk)throw Rd(fd);Pu(t,e.sshJwk)}let i;if((!bd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&fu(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=$p(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${_s}${t.utid}`,type:zp}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case zp:try{hu(t,jp(i.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Qp:uu(t,i.credential)}return e.embeddedClientId&&Su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&bu(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[tu]||bu(t,{[tu]:"1"}),au(t,e.correlationId,this.performanceClient),xd(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&function(e,t){e.set("post_logout_redirect_uri",t)}(t,e.postLogoutRedirectUri),e.correlationId&&gu(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&yu(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&bu(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Ru(t),xd(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
92
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Lh extends dh{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(_c,e.correlationId);const t=qu(),i=await Fu(this.executeTokenRequest.bind(this),Ic,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[Za],r=new bh(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),Fu(r.handleServerTokenResponse.bind(r),ep,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw Rd(ld);if(this.performanceClient?.addQueueMeasurement(Oc,e.correlationId),!e.account)throw Ql(Rl);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await Fu(this.acquireTokenWithCachedRefreshToken.bind(this),Ec,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof Ih&&t.errorCode===uh,o=t instanceof rh&&t.errorCode===xs&&t.subError===Fs;if(i||o)return Fu(this.acquireTokenWithCachedRefreshToken.bind(this),Ec,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return Fu(this.acquireTokenWithCachedRefreshToken.bind(this),Ec,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Ec,e.correlationId);const i=xu(this.cacheManager.getRefreshToken.bind(this.cacheManager),Ap,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!i)throw Eh(uh);if(i.expiresOn&&Hu(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),Eh(mh);const o={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||Ss.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:zp}};try{return await Fu(this.acquireToken.bind(this),_c,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Ih&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),t.subError===gh)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Ic,e.correlationId);const i=this.createTokenQueryParameters(e),o=Bd.appendQueryString(t.tokenEndpoint,i),r=await Fu(this.createTokenRequestBody.bind(this),Cc,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=nh(this.config.authOptions.clientId,e);return Fu(this.executePostToTokenEndpoint.bind(this),Ac,this.logger,this.performanceClient,e.correlationId)(o,r,n,a,e.correlationId,Ac)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Cc,e.correlationId);const t=new Map;if(du(t,e.embeddedClientId||e.tokenBodyParameters?.[Zp]||this.config.authOptions.clientId),e.redirectUri&&cu(t,e.redirectUri),lu(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Cu(t,gs),Nu(t),Tu(t,this.config.libraryInfo),Au(t,this.config.telemetry.application),Lu(t),this.serverTelemetryManager&&!Vp(this.config)&&vu(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&_u(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Eu(t,await Ph(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Ou(t,i.assertionType)}if(e.authenticationScheme===Ss.POP){const i=new Nh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await Fu(i.generateCnf.bind(i),Jc,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}wu(t,o)}else if(e.authenticationScheme===Ss.SSH){if(!e.sshJwk)throw Rd(fd);Pu(t,e.sshJwk)}if((!bd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&fu(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case zp:try{hu(t,jp(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Qp:uu(t,e.ccsCredential.credential)}return e.embeddedClientId&&Su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&bu(t,e.tokenBodyParameters),au(t,e.correlationId,this.performanceClient),xd(t)}}
93
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Sh extends dh{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Rc,e.correlationId);let t=Ks;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!bd.isEmptyObj(e.claims))throw this.setCacheOutcome(Vs,e.correlationId),Ql(Dl);if(!e.account)throw Ql(Rl);const i=e.account.tenantId||function(e){const t=new Bd(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case es:case ts:case is:return;default:return i}}(e.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,o,i);if(!r)throw this.setCacheOutcome(zs,e.correlationId),Ql(Dl);if(n=r.cachedAt,Number(n)>qu()||Hu(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Qs,e.correlationId),Ql(Dl);var n;r.refreshOn&&Hu(r.refreshOn,0)&&(t=$s);const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await Fu(this.generateResultFromCacheRecord.bind(this),bc,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Ks&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(bc,t.correlationId),e.idToken&&(i=Sd(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw Ql(ml);Md(e,t.maxAge)}return bh.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}
94
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Mh={sendGetRequestAsync:()=>Promise.reject(Ql(Yl)),sendPostRequestAsync:()=>Promise.reject(Ql(Yl))};
95
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Dh(e,t,i,o){const r=t.correlationId,n=new Map;du(n,t.embeddedClientId||t.extraQueryParameters?.[Zp]||e.clientId);if(lu(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),cu(n,t.redirectUri),gu(n,r),function(e,t){e.set("response_mode",t||ms)}(n,t.responseMode),Nu(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),o?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),o?.addFields({domainHintFromRequest:!0},r)),t.prompt!==as)if(t.sid&&t.prompt===ls)i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),mu(n,t.sid),o?.addFields({sidFromRequest:!0},r);else if(t.account){const e=(a=t.account,a.idTokenClaims?.sid||null);let s=function(e){return e.loginHint||e.idTokenClaims?.login_hint||null}
96
- /*! @azure/msal-common v15.12.0 2025-08-19 */(t.account);if(s&&t.domainHint&&(i.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){i.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),pu(n,s),o?.addFields({loginHintFromClaim:!0},r);try{hu(n,jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===ls){i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),mu(n,e),o?.addFields({sidFromClaim:!0},r);try{hu(n,jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)i.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),pu(n,t.loginHint),uu(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){i.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),pu(n,t.account.username),o?.addFields({loginHintFromUpn:!0},r);try{hu(n,jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(i.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),pu(n,t.loginHint),uu(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r));else i.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");var a;return t.nonce&&function(e,t){e.set("nonce",t)}(n,t.nonce),t.state&&yu(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&fu(n,t.claims,e.clientCapabilities),t.embeddedClientId&&Su(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(nu)||Ru(n),n}function kh(e,t,i,o){const r=xd(t,i,o);return Bd.appendQueryString(e.authorizationEndpoint,r)}function Uh(e,t){if(!e.state||!t)throw e.state?Ql(ul,"Cached State"):Ql(ul,"Server State");let i,o;try{i=decodeURIComponent(e.state)}catch(t){throw Ql(cl,e.state)}try{o=decodeURIComponent(t)}catch(t){throw Ql(cl,e.state)}if(i!==o)throw Ql(pl);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",i=e.error_uri?.lastIndexOf(t);return i&&i>=0?e.error_uri?.substring(i+t.length):void 0}(e);if(_h(e.error,e.error_description,e.suberror))throw new Ih(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new rh(e.error||"",e.error_description,e.suberror,t)}}function xh(e){const{skus:t,libraryName:i,libraryVersion:o,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[i,o]],[2,[r,n]]]);let s=[];if(t?.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},()=>"|");return a.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:i,skuName:o,skuVersion:r}=e;if(i>=t.length)return;t[i]=[o,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class Fh{constructor(e,t){this.cacheOutcome=Ks,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Ua.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Ua.EMPTY_STRING,this.telemetryCacheKey=Ls.CACHE_KEY+Is+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Ls.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const o=t.join(Ls.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(Ls.VALUE_SEPARATOR);return[Ls.SCHEMA_VERSION,r,o].join(Ls.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Fh.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(Ls.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(Ls.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?Ls.OVERFLOW_TRUE:Ls.OVERFLOW_FALSE].join(Ls.VALUE_SEPARATOR);return[Ls.SCHEMA_VERSION,e.cacheHits,i,o,n].join(Ls.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Ls.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof el?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Ls.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=Fh.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const i={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i,this.correlationId)}}static maxErrorsToSend(e){let t,i=0,o=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||Ua.EMPTY_STRING,n=e.failedRequests[2*t+1]||Ua.EMPTY_STRING,a=e.errors[t]||Ua.EMPTY_STRING;if(o+=r.toString().length+n.toString().length+a.length+3,!(o<Ls.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||Ua.EMPTY_STRING),e.push(this.regionSource||Ua.EMPTY_STRING),e.push(this.regionOutcome||Ua.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}static makeExtraSkuString(e){return xh(e)}}
97
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Bh="missing_kid_error",qh="missing_alg_error",Wh={[Bh]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[qh]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class Gh extends el{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Gh.prototype)}}function Hh(e){return new Gh(e,Wh[e])}
98
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Yh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Hh(Bh);if(!e.alg)throw Hh(qh);const t=new Yh({typ:e.typ||js,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
99
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Kh="pkce_not_created",Vh="ear_jwk_empty",zh="ear_jwe_empty",Qh="crypto_nonexistent",$h="empty_navigate_uri",jh="hash_empty_error",Zh="no_state_in_hash",Jh="hash_does_not_contain_known_properties",Xh="unable_to_parse_state",em="state_interaction_type_mismatch",tm="interaction_in_progress",im="popup_window_error",om="empty_window_error",rm="user_cancelled",nm="monitor_popup_timeout",am="monitor_window_timeout",sm="redirect_in_iframe",lm="block_iframe_reload",dm="block_nested_popups",cm="iframe_closed_prematurely",pm="silent_logout_unsupported",um="no_account_error",hm="silent_prompt_value_error",mm="no_token_request_cache_error",fm="unable_to_parse_token_request_cache_error",gm="auth_request_not_set_error",Tm="invalid_cache_type",Am="non_browser_environment",ym="database_not_open",Im="no_network_connectivity",_m="post_request_failed",Em="get_request_failed",Om="failed_to_parse_response",Cm="unable_to_load_token",Nm="crypto_key_not_found",Rm="auth_code_required",bm="auth_code_or_nativeAccountId_required",wm="spa_code_and_nativeAccountId_present",Pm="database_unavailable",vm="unable_to_acquire_token_from_native_platform",Lm="native_handshake_timeout",Sm="native_extension_not_installed",Mm="native_connection_not_established",Dm="uninitialized_public_client_application",km="native_prompt_not_supported",Um="invalid_base64_string",xm="invalid_pop_token_request",Fm="failed_to_build_headers",Bm="failed_to_parse_headers",qm="failed_to_decrypt_ear_response",Wm="timed_out",Gm="For more visit: aka.ms/msaljs/browser-errors",Hm={[Kh]:"The PKCE code challenge and verifier could not be generated.",[Vh]:"No EAR encryption key provided. This is unexpected.",[zh]:"Server response does not contain ear_jwe property. This is unexpected.",[Qh]:"The crypto object or function is not available.",[$h]:"Navigation URI is empty. Please check stack trace for more info.",[jh]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${Gm}`,[Zh]:"Hash does not contain state. Please verify that the request originated from msal.",[Jh]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${Gm}`,[Xh]:"Unable to parse state. Please verify that the request originated from msal.",[em]:"Hash contains state but the interaction type does not match the caller.",[tm]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${Gm}`,[im]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[om]:"window.open returned null or undefined window object.",[rm]:"User cancelled the flow.",[nm]:`Token acquisition in popup failed due to timeout. ${Gm}`,[am]:`Token acquisition in iframe failed due to timeout. ${Gm}`,[sm]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[lm]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${Gm}`,[dm]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[cm]:"The iframe being monitored was closed prematurely.",[pm]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[um]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[hm]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[mm]:"No token request found in cache.",[fm]:"The cached token request could not be parsed.",[gm]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Tm]:"Invalid cache type",[Am]:"Login and token requests are not supported in non-browser environments.",[ym]:"Database is not open!",[Im]:"No network connectivity. Check your internet connection.",[_m]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Em]:"Network request failed. Please check the network trace to determine root cause.",[Om]:"Failed to parse network response. Check network trace.",[Cm]:"Error loading token to cache.",[Nm]:"Cryptographic Key or Keypair not found in browser storage.",[Rm]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[bm]:"An authorization code or nativeAccountId must be provided to this flow.",[wm]:"Request cannot contain both spa code and native account id.",[Pm]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[vm]:`Unable to acquire token from native platform. ${Gm}`,[Lm]:"Timed out while attempting to establish connection to browser extension",[Sm]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Mm]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${Gm}`,[Dm]:`You must call and await the initialize function before attempting to call any other MSAL API. ${Gm}`,[km]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Um]:"Invalid base64 encoded string.",[xm]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[Fm]:"Failed to build request headers object.",[Bm]:"Failed to parse response headers",[qm]:"Failed to decrypt ear response",[Wm]:"The request timed out."};class Ym extends el{constructor(e,t){super(e,Hm[e],t),Object.setPrototypeOf(this,Ym.prototype),this.name="BrowserAuthError"}}function Km(e,t){return new Ym(e,t)}
100
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Vm="invalid_grant",zm=483,Qm=600,$m="msal",jm=30,Zm="msal.js.browser",Jm="53ee284d-920a-4b59-9d30-a60315b26836",Xm="ppnbnpeolgkicgegkbkbjmhlideopiji",ef="MATS",tf="MicrosoftEntra",of="DOM API",rf="get-token-and-sign-out",nf="PlatformAuthDOMHandler",af="PlatformAuthExtensionHandler",sf="Handshake",lf="HandshakeResponse",df="GetToken",cf="Response",pf="localStorage",uf="sessionStorage",hf="memoryStorage",mf="GET",ff="POST",gf="signin",Tf="signout",Af="request.origin",yf="urlHash",If="request.params",_f="code.verifier",Ef="interaction.status",Of="request.native",Cf="wrapper.sku",Nf="wrapper.version",Rf=861,bf=862,wf=863,Pf=865,vf=866,Lf=61,Sf=961,Mf=962;var Df;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(Df||(Df={}));const kf="startup",Uf="login",xf="logout",Ff="acquireToken",Bf="ssoSilent",qf="handleRedirect",Wf="none",Gf={scopes:Ka},Hf="@azure/msal-react",Yf="msal.db",Kf=`${Yf}.keys`,Vf=0,zf=1,Qf=2,$f=3,jf=4,Zf=5,Jf=[Vf,Zf,jf];
77
+ async function nh(e,t,i,o,r,n,a){a?.addQueueMeasurement(rp,n);const s=oh.transformCIAMAuthority(rh(e)),l=new oh(s,t,i,o,r,n,a);try{return await qu(l.resolveEndpointsAsync.bind(l),np,r,a,n)(),l}catch(e){throw jl(ll)}}
78
+ /*! @azure/msal-common v15.12.0 2025-08-19 */oh.reservedTenantDomains=new Set(["{tenant}","{tenantid}",is,rs,os]);class ah extends il{constructor(e,t,i,o,r){super(e,t,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,ah.prototype)}}
79
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function sh(e,t,i){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:i,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,embeddedClientId:t.embeddedClientId||t.tokenBodyParameters?.clientId}}
80
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class lh{static generateThrottlingStorageKey(e){return`${xs}.${JSON.stringify(e)}`}static preProcess(e,t,i){const o=lh.generateThrottlingStorageKey(t),r=e.getThrottlingCache(o);if(r){if(r.throttleTime<Date.now())return void e.removeItem(o,i);throw new ah(r.errorCodes?.join(" ")||Fa.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,i,o){if(lh.checkResponseStatus(i)||lh.checkResponseForRetryAfter(i)){const r={throttleTime:lh.calculateThrottleTime(parseInt(i.headers[Za])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(lh.generateThrottlingStorageKey(t),r,o)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(Za)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,i=Date.now()/1e3;return Math.floor(1e3*Math.min(i+(t||ks),i+Us))}static removeThrottle(e,t,i,o){const r=sh(t,i,o),n=this.generateThrottlingStorageKey(r);e.removeItem(n,i.correlationId)}}
81
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class dh extends il{constructor(e,t,i){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,dh.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=i}}function ch(e,t,i,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new dh(e,t,i)}
82
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class ph{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:i,cacheOptions:o,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:p,serializableCache:u}){const h={...Wp,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Vp,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...qp,...t},loggerOptions:h,cacheOptions:{...Gp,...o},storageInterface:r||new Xd(e.clientId,Zl,new Xl(h),new Bp),networkInterface:n||Hp,cryptoInterface:a||Zl,clientCredentials:s||Kp,libraryInfo:{...Yp,...l},telemetry:{...zp,...d},serverTelemetryManager:c||null,persistencePlugin:p||null,serializableCache:u||null};var m}(e),this.logger=new Xl(this.config.loggerOptions,ed,td),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[$a]=Fa.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case $p:try{const i=Jp(e.credential);t[Ja]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case jp:t[Ja]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,i,o,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(o,e,{body:t,headers:i},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,i,o){let r;lh.preProcess(this.cacheManager,e,o);try{r=await qu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Ac,this.logger,this.performanceClient,o)(t,i);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[es]||"",requestId:e[Xa]||""},o)}catch(e){if(e instanceof dh){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[es]||"",requestId:t[Xa]||"",contentTypeHeader:t[$a]||void 0,contentLengthHeader:t[ja]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof il?e:jl(dl)}return lh.postProcess(this.cacheManager,e,r,o),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(jc,t);const i=`https://${e}/${this.authority.tenant}/`,o=await nh(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&Du(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&Pu(t,e.tokenQueryParameters),yu(t,e.correlationId),lu(t,e.correlationId,this.performanceClient),Bd(t)}}
83
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function uh(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
84
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class hh{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(e,t,i){const o=new hh;let r;t.authorityType===Uu?o.authorityType=Is:t.protocolMode===tc?o.authorityType=_s:o.authorityType=As,e.clientInfo&&i&&(r=Zp(e.clientInfo,i)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw jl(vl);o.environment=n,o.realm=r?.utid||uh(e.idTokenClaims)||"",o.localAccountId=r?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=a||s||"",o.loginHint=e.idTokenClaims?.login_hint,o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const t=Sd(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,i){const o=new hh;return o.authorityType=e.authorityType||_s,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.loginHint=e.loginHint,o.cloudGraphHostName=t,o.msGraphHost=i,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,t,i,o,r){if(t!==Uu&&t!==xu){if(e)try{const t=Zp(e,o.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,i){if(!e||!t)return!1;let o=!0;if(i){const i=e.idTokenClaims||{},r=t.idTokenClaims||{};o=i.iat===r.iat&&i.nonce===r.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.loginHint===t.loginHint&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}
85
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const mh="no_tokens_found",fh="native_account_unavailable",gh="refresh_token_expired",Th="ux_not_allowed",yh="bad_token",Ah=["interaction_required","consent_required","login_required",yh,Th],Ih=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],_h={[mh]:"No refresh token found in the cache. Please sign-in.",[fh]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[gh]:"Refresh token has expired.",[yh]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[Th]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Eh extends il{constructor(e,t,i,o,r,n,a,s){super(e,t,i),Object.setPrototypeOf(this,Eh.prototype),this.timestamp=o||Fa.EMPTY_STRING,this.traceId=r||Fa.EMPTY_STRING,this.correlationId=n||Fa.EMPTY_STRING,this.claims=a||Fa.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function Oh(e,t,i){const o=!!e&&Ah.indexOf(e)>-1,r=!!i&&Ih.indexOf(i)>-1,n=!!t&&Ah.some(e=>t.indexOf(e)>-1);return o||n||r}function Ch(e){return new Eh(e,_h[e])}
86
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Nh{static setRequestState(e,t,i){const o=Nh.generateLibraryState(e,i);return t?`${o}${Fa.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw jl(Sl);const i={id:e.createNewGuid()};t&&(i.meta=t);const o=JSON.stringify(i);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw jl(Sl);if(!t)throw jl(ul);try{const i=t.split(Fa.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(Fa.RESOURCE_DELIM):Fa.EMPTY_STRING,n=e.base64Decode(o),a=JSON.parse(n);return{userRequestState:r||Fa.EMPTY_STRING,libraryState:a}}catch(e){throw jl(ul)}}}
87
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Rh="sw";class bh{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(ep,e.correlationId);const i=await qu(this.generateKid.bind(this),ep,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}}async generateKid(e){this.performanceClient?.addQueueMeasurement(tp,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Rh}}async signPopToken(e,t,i){return this.signPayload(e,t,i)}async signPayload(e,t,i,o){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=i,d=n?new Wd(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:Gu(),m:r?.toUpperCase(),u:c?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:a||void 0,...o},t,l,i.correlationId)}}
88
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class wh{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
89
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Ph{constructor(e,t,i,o,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||Fa.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Fa.NOT_AVAILABLE} - Description: ${e.error_description||Fa.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Fa.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Fa.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,r=new ah(e.error,i,e.suberror,o,e.status);if(t&&e.status&&e.status>=Ha&&e.status<=Ya)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${r}`);if(t&&e.status&&e.status>=qa&&e.status<=Ga)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(Oh(e.error,e.error_description,e.suberror))throw new Eh(e.error,e.error_description,e.suberror,e.timestamp||Fa.EMPTY_STRING,e.trace_id||Fa.EMPTY_STRING,e.correlation_id||Fa.EMPTY_STRING,e.claims||Fa.EMPTY_STRING,o);throw r}}async handleServerTokenResponse(e,t,i,o,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(ip,e.correlation_id),e.id_token){if(d=Dd(e.id_token||Fa.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw jl(fl);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw jl(gl);kd(e,o.maxAge)}}this.homeAccountIdentifier=hh.generateHomeAccountId(e.client_info||Fa.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=Nh.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||o.sshKid||void 0;const p=this.generateCacheRecord(e,t,i,o,d,n,r);let u;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),u=new wh(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(u)),a&&!s&&p.account){const e=this.cacheStorage.generateAccountKey(p.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Ph.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(p,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&u&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(u))}return Ph.generateAuthenticationResult(this.cryptoObj,t,p,!1,o,d,c,e,l)}generateCacheRecord(e,t,i,o,r,n,a){const s=t.getPreferredCache();if(!s)throw jl(vl);const l=uh(r);let d,c;e.id_token&&r&&(d=zu(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=vh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let p=null;if(e.access_token){const r=e.scope?vd.fromString(e.scope):new vd(o.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=i+a,h=u+d,m=c&&c>0?i+c:void 0;p=Qu(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),u,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,o.claims,o.requestedClaimsHash)}let u=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=i+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}u=$u(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,n,t)}let h=null;return e.foci&&(h={clientId:this.clientId,environment:s,familyId:e.foci}),{account:c,idToken:d,accessToken:p,refreshToken:u,appMetadata:h}}static async generateAuthenticationResult(e,t,i,o,r,n,a,s,l){let d,c,p=Fa.EMPTY_STRING,u=[],h=null,m=Fa.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==Ds.POP||r.popKid)p=i.accessToken.secret;else{const t=new bh(e),{secret:o,keyId:n}=i.accessToken;if(!n)throw jl(Gl);p=await t.signPopToken(o,n,r)}u=vd.fromString(i.accessToken.target).asArray(),h=Yu(i.accessToken.expiresOn),d=Yu(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(c=Yu(i.accessToken.refreshOn))}i.appMetadata&&(m=i.appMetadata.familyId===Rs?Rs:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&i.account&&(i.account.nativeAccountId=s?.spa_accountid);const T=i.account?Md(i.account.getAccountInfo(),void 0,n,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:u,account:T,idToken:i?.idToken?.secret||"",idTokenClaims:n||{},accessToken:p,fromCache:o,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||Fa.EMPTY_STRING,familyId:m,tokenType:i.accessToken?.tokenType||Fa.EMPTY_STRING,state:a?a.userRequestState:Fa.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||Fa.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||Fa.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function vh(e,t,i,o,r,n,a,s,l,d,c,p){p?.verbose("setCachedAccount called");const u=e.getAccountKeys().find(e=>e.startsWith(i));let h=null;u&&(h=e.getAccount(u,r));const m=h||hh.createAccount({homeAccountId:i,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,o),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=Sd(i,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
90
+ /*! @azure/msal-common v15.12.0 2025-08-19 */async function Lh(e,t,i){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:i})}
91
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Sh extends ph{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(Zc,e.correlationId),!e.code)throw jl(_l);const i=Gu(),o=await qu(this.executeTokenRequest.bind(this),Jc,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=o.headers?.[Xa],n=new Ph(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(o.body),qu(n.handleServerTokenResponse.bind(n),ip,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,i,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw wd(pd);const t=this.createLogoutUrlQueryString(e);return Wd.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Jc,t.correlationId);const i=this.createTokenQueryParameters(t),o=Wd.appendQueryString(e.tokenEndpoint,i),r=await qu(this.createTokenRequestBody.bind(this),Xc,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=Zp(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${Os}${e.utid}`,type:$p}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=sh(this.config.authOptions.clientId,t);return qu(this.executePostToTokenEndpoint.bind(this),_c,this.logger,this.performanceClient,t.correlationId)(o,r,a,s,t.correlationId,_c)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Xc,e.correlationId);const t=new Map;if(pu(t,e.embeddedClientId||e.tokenBodyParameters?.[Xp]||this.config.authOptions.clientId),this.includeRedirectUri)uu(t,e.redirectUri);else if(!e.redirectUri)throw wd(od);if(cu(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Au(t,this.config.libraryInfo),Iu(t,this.config.telemetry.application),Mu(t),this.serverTelemetryManager&&!Qp(this.config)&&Su(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&Ou(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Cu(t,await Lh(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Nu(t,i.assertionType)}if(Ru(t,Ts),bu(t),e.authenticationScheme===Ds.POP){const i=new bh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await qu(i.generateCnf.bind(i),ep,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}vu(t,o)}else if(e.authenticationScheme===Ds.SSH){if(!e.sshJwk)throw wd(Td);Lu(t,e.sshJwk)}let i;if((!Pd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Tu(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Zp(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${Os}${t.utid}`,type:$p}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case $p:try{fu(t,Jp(i.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case jp:mu(t,i.credential)}return e.embeddedClientId&&Du(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Pu(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[ou]||Pu(t,{[ou]:"1"}),lu(t,e.correlationId,this.performanceClient),Bd(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&function(e,t){e.set("post_logout_redirect_uri",t)}(t,e.postLogoutRedirectUri),e.correlationId&&yu(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&_u(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&Pu(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&wu(t),Bd(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
92
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Mh extends ph{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(Oc,e.correlationId);const t=Gu(),i=await qu(this.executeTokenRequest.bind(this),Ec,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[Xa],r=new Ph(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),qu(r.handleServerTokenResponse.bind(r),ip,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw wd(cd);if(this.performanceClient?.addQueueMeasurement(Nc,e.correlationId),!e.account)throw jl(wl);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await qu(this.acquireTokenWithCachedRefreshToken.bind(this),Cc,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof Eh&&t.errorCode===mh,o=t instanceof ah&&t.errorCode===Bs&&t.subError===qs;if(i||o)return qu(this.acquireTokenWithCachedRefreshToken.bind(this),Cc,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return qu(this.acquireTokenWithCachedRefreshToken.bind(this),Cc,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Cc,e.correlationId);const i=Bu(this.cacheManager.getRefreshToken.bind(this.cacheManager),Ip,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!i)throw Ch(mh);if(i.expiresOn&&Ku(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),Ch(gh);const o={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||Ds.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:$p}};try{return await qu(this.acquireToken.bind(this),Oc,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Eh&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),t.subError===yh)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Ec,e.correlationId);const i=this.createTokenQueryParameters(e),o=Wd.appendQueryString(t.tokenEndpoint,i),r=await qu(this.createTokenRequestBody.bind(this),Rc,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=sh(this.config.authOptions.clientId,e);return qu(this.executePostToTokenEndpoint.bind(this),Ic,this.logger,this.performanceClient,e.correlationId)(o,r,n,a,e.correlationId,Ic)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Rc,e.correlationId);const t=new Map;if(pu(t,e.embeddedClientId||e.tokenBodyParameters?.[Xp]||this.config.authOptions.clientId),e.redirectUri&&uu(t,e.redirectUri),cu(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Ru(t,ys),bu(t),Au(t,this.config.libraryInfo),Iu(t,this.config.telemetry.application),Mu(t),this.serverTelemetryManager&&!Qp(this.config)&&Su(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&Ou(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Cu(t,await Lh(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Nu(t,i.assertionType)}if(e.authenticationScheme===Ds.POP){const i=new bh(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await qu(i.generateCnf.bind(i),ep,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}vu(t,o)}else if(e.authenticationScheme===Ds.SSH){if(!e.sshJwk)throw wd(Td);Lu(t,e.sshJwk)}if((!Pd.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Tu(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case $p:try{fu(t,Jp(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case jp:mu(t,e.ccsCredential.credential)}return e.embeddedClientId&&Du(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Pu(t,e.tokenBodyParameters),lu(t,e.correlationId,this.performanceClient),Bd(t)}}
93
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Dh extends ph{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(wc,e.correlationId);let t=zs;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Pd.isEmptyObj(e.claims))throw this.setCacheOutcome(Qs,e.correlationId),jl(Ul);if(!e.account)throw jl(wl);const i=e.account.tenantId||function(e){const t=new Wd(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case is:case os:case rs:return;default:return i}}(e.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,o,i);if(!r)throw this.setCacheOutcome($s,e.correlationId),jl(Ul);if(n=r.cachedAt,Number(n)>Gu()||Ku(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(js,e.correlationId),jl(Ul);var n;r.refreshOn&&Ku(r.refreshOn,0)&&(t=Zs);const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await qu(this.generateResultFromCacheRecord.bind(this),Pc,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==zs&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(Pc,t.correlationId),e.idToken&&(i=Dd(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw jl(gl);kd(e,t.maxAge)}return Ph.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}
94
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const kh={sendGetRequestAsync:()=>Promise.reject(jl(Vl)),sendPostRequestAsync:()=>Promise.reject(jl(Vl))};
95
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Uh(e,t,i,o){const r=t.correlationId,n=new Map;pu(n,t.embeddedClientId||t.extraQueryParameters?.[Xp]||e.clientId);if(cu(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),uu(n,t.redirectUri),yu(n,r),function(e,t){e.set("response_mode",t||gs)}(n,t.responseMode),bu(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),o?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),o?.addFields({domainHintFromRequest:!0},r)),t.prompt!==ls)if(t.sid&&t.prompt===cs)i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),gu(n,t.sid),o?.addFields({sidFromRequest:!0},r);else if(t.account){const e=(a=t.account,a.idTokenClaims?.sid||null);let s=function(e){return e.loginHint||e.idTokenClaims?.login_hint||null}
96
+ /*! @azure/msal-common v15.12.0 2025-08-19 */(t.account);if(s&&t.domainHint&&(i.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){i.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),hu(n,s),o?.addFields({loginHintFromClaim:!0},r);try{fu(n,Jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===cs){i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),gu(n,e),o?.addFields({sidFromClaim:!0},r);try{fu(n,Jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)i.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),hu(n,t.loginHint),mu(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){i.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),hu(n,t.account.username),o?.addFields({loginHintFromUpn:!0},r);try{fu(n,Jp(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(i.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),hu(n,t.loginHint),mu(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r));else i.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");var a;return t.nonce&&function(e,t){e.set("nonce",t)}(n,t.nonce),t.state&&_u(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&Tu(n,t.claims,e.clientCapabilities),t.embeddedClientId&&Du(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(su)||wu(n),n}function xh(e,t,i,o){const r=Bd(t,i,o);return Wd.appendQueryString(e.authorizationEndpoint,r)}function Fh(e,t){if(!e.state||!t)throw e.state?jl(ml,"Cached State"):jl(ml,"Server State");let i,o;try{i=decodeURIComponent(e.state)}catch(t){throw jl(ul,e.state)}try{o=decodeURIComponent(t)}catch(t){throw jl(ul,e.state)}if(i!==o)throw jl(hl);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",i=e.error_uri?.lastIndexOf(t);return i&&i>=0?e.error_uri?.substring(i+t.length):void 0}(e);if(Oh(e.error,e.error_description,e.suberror))throw new Eh(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new ah(e.error||"",e.error_description,e.suberror,t)}}function Bh(e){const{skus:t,libraryName:i,libraryVersion:o,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[i,o]],[2,[r,n]]]);let s=[];if(t?.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},()=>"|");return a.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:i,skuName:o,skuVersion:r}=e;if(i>=t.length)return;t[i]=[o,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class qh{constructor(e,t){this.cacheOutcome=zs,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Fa.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Fa.EMPTY_STRING,this.telemetryCacheKey=Ms.CACHE_KEY+Es+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Ms.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const o=t.join(Ms.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(Ms.VALUE_SEPARATOR);return[Ms.SCHEMA_VERSION,r,o].join(Ms.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=qh.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(Ms.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(Ms.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?Ms.OVERFLOW_TRUE:Ms.OVERFLOW_FALSE].join(Ms.VALUE_SEPARATOR);return[Ms.SCHEMA_VERSION,e.cacheHits,i,o,n].join(Ms.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Ms.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof il?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(Ms.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=qh.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const i={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i,this.correlationId)}}static maxErrorsToSend(e){let t,i=0,o=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||Fa.EMPTY_STRING,n=e.failedRequests[2*t+1]||Fa.EMPTY_STRING,a=e.errors[t]||Fa.EMPTY_STRING;if(o+=r.toString().length+n.toString().length+a.length+3,!(o<Ms.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||Fa.EMPTY_STRING),e.push(this.regionSource||Fa.EMPTY_STRING),e.push(this.regionOutcome||Fa.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}static makeExtraSkuString(e){return Bh(e)}}
97
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Wh="missing_kid_error",Gh="missing_alg_error",Hh={[Wh]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[Gh]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class Yh extends il{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Yh.prototype)}}function Kh(e){return new Yh(e,Hh[e])}
98
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Vh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Kh(Wh);if(!e.alg)throw Kh(Gh);const t=new Vh({typ:e.typ||Js,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
99
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const zh="pkce_not_created",Qh="ear_jwk_empty",$h="ear_jwe_empty",jh="crypto_nonexistent",Zh="empty_navigate_uri",Jh="hash_empty_error",Xh="no_state_in_hash",em="hash_does_not_contain_known_properties",tm="unable_to_parse_state",im="state_interaction_type_mismatch",om="interaction_in_progress",rm="popup_window_error",nm="empty_window_error",am="user_cancelled",sm="monitor_popup_timeout",lm="monitor_window_timeout",dm="redirect_in_iframe",cm="block_iframe_reload",pm="block_nested_popups",um="iframe_closed_prematurely",hm="silent_logout_unsupported",mm="no_account_error",fm="silent_prompt_value_error",gm="no_token_request_cache_error",Tm="unable_to_parse_token_request_cache_error",ym="auth_request_not_set_error",Am="invalid_cache_type",Im="non_browser_environment",_m="database_not_open",Em="no_network_connectivity",Om="post_request_failed",Cm="get_request_failed",Nm="failed_to_parse_response",Rm="unable_to_load_token",bm="crypto_key_not_found",wm="auth_code_required",Pm="auth_code_or_nativeAccountId_required",vm="spa_code_and_nativeAccountId_present",Lm="database_unavailable",Sm="unable_to_acquire_token_from_native_platform",Mm="native_handshake_timeout",Dm="native_extension_not_installed",km="native_connection_not_established",Um="uninitialized_public_client_application",xm="native_prompt_not_supported",Fm="invalid_base64_string",Bm="invalid_pop_token_request",qm="failed_to_build_headers",Wm="failed_to_parse_headers",Gm="failed_to_decrypt_ear_response",Hm="timed_out",Ym="For more visit: aka.ms/msaljs/browser-errors",Km={[zh]:"The PKCE code challenge and verifier could not be generated.",[Qh]:"No EAR encryption key provided. This is unexpected.",[$h]:"Server response does not contain ear_jwe property. This is unexpected.",[jh]:"The crypto object or function is not available.",[Zh]:"Navigation URI is empty. Please check stack trace for more info.",[Jh]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${Ym}`,[Xh]:"Hash does not contain state. Please verify that the request originated from msal.",[em]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${Ym}`,[tm]:"Unable to parse state. Please verify that the request originated from msal.",[im]:"Hash contains state but the interaction type does not match the caller.",[om]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${Ym}`,[rm]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[nm]:"window.open returned null or undefined window object.",[am]:"User cancelled the flow.",[sm]:`Token acquisition in popup failed due to timeout. ${Ym}`,[lm]:`Token acquisition in iframe failed due to timeout. ${Ym}`,[dm]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[cm]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${Ym}`,[pm]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[um]:"The iframe being monitored was closed prematurely.",[hm]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[mm]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[fm]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[gm]:"No token request found in cache.",[Tm]:"The cached token request could not be parsed.",[ym]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Am]:"Invalid cache type",[Im]:"Login and token requests are not supported in non-browser environments.",[_m]:"Database is not open!",[Em]:"No network connectivity. Check your internet connection.",[Om]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Cm]:"Network request failed. Please check the network trace to determine root cause.",[Nm]:"Failed to parse network response. Check network trace.",[Rm]:"Error loading token to cache.",[bm]:"Cryptographic Key or Keypair not found in browser storage.",[wm]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Pm]:"An authorization code or nativeAccountId must be provided to this flow.",[vm]:"Request cannot contain both spa code and native account id.",[Lm]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[Sm]:`Unable to acquire token from native platform. ${Ym}`,[Mm]:"Timed out while attempting to establish connection to browser extension",[Dm]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[km]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${Ym}`,[Um]:`You must call and await the initialize function before attempting to call any other MSAL API. ${Ym}`,[xm]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Fm]:"Invalid base64 encoded string.",[Bm]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[qm]:"Failed to build request headers object.",[Wm]:"Failed to parse response headers",[Gm]:"Failed to decrypt ear response",[Hm]:"The request timed out."};class Vm extends il{constructor(e,t){super(e,Km[e],t),Object.setPrototypeOf(this,Vm.prototype),this.name="BrowserAuthError"}}function zm(e,t){return new Vm(e,t)}
100
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const Qm="invalid_grant",$m=483,jm=600,Zm="msal",Jm=30,Xm="msal.js.browser",ef="53ee284d-920a-4b59-9d30-a60315b26836",tf="ppnbnpeolgkicgegkbkbjmhlideopiji",of="MATS",rf="MicrosoftEntra",nf="DOM API",af="get-token-and-sign-out",sf="PlatformAuthDOMHandler",lf="PlatformAuthExtensionHandler",df="Handshake",cf="HandshakeResponse",pf="GetToken",uf="Response",hf="localStorage",mf="sessionStorage",ff="memoryStorage",gf="GET",Tf="POST",yf="signin",Af="signout",If="request.origin",_f="urlHash",Ef="request.params",Of="code.verifier",Cf="interaction.status",Nf="request.native",Rf="wrapper.sku",bf="wrapper.version",wf=861,Pf=862,vf=863,Lf=865,Sf=866,Mf=61,Df=961,kf=962;var Uf;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(Uf||(Uf={}));const xf="startup",Ff="login",Bf="logout",qf="acquireToken",Wf="ssoSilent",Gf="handleRedirect",Hf="none",Yf={scopes:za},Kf="@azure/msal-react",Vf="msal.db",zf=`${Vf}.keys`,Qf=0,$f=1,jf=2,Zf=3,Jf=4,Xf=5,eg=[Qf,Xf,Jf];
101
101
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
102
- function Xf(e){return encodeURIComponent(tg(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function eg(e){return ig(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function tg(e){return ig((new TextEncoder).encode(e))}function ig(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}
103
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function og(e){return(new TextDecoder).decode(rg(e))}function rg(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Km(Um)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}
104
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const ng="AES-GCM",ag="HKDF",sg="SHA-256",lg=new Uint8Array([1,0,1]),dg="0123456789abcdef",cg=new Uint32Array(1),pg="raw",ug="encrypt",hg="decrypt",mg={name:"RSASSA-PKCS1-v1_5",hash:sg,modulusLength:2048,publicExponent:lg};async function fg(e,t,i){t?.addQueueMeasurement(Np,i);const o=(new TextEncoder).encode(e);return window.crypto.subtle.digest(sg,o)}function gg(e){return window.crypto.getRandomValues(e)}function Tg(){return window.crypto.getRandomValues(cg),cg[0]}function Ag(){const e=Date.now(),t=1024*Tg()+(1023&Tg()),i=new Uint8Array(16),o=Math.trunc(t/2**30),r=t&2**30-1,n=Tg();i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|o>>>8,i[7]=o,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n;let a="";for(let e=0;e<i.length;e++)a+=dg.charAt(i[e]>>>4),a+=dg.charAt(15&i[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function yg(e){return window.crypto.subtle.exportKey("jwk",e)}async function Ig(){const e=await Eg(),t={alg:"dir",kty:"oct",k:eg(new Uint8Array(e))};return tg(JSON.stringify(t))}async function _g(e,t){const i=t.split(".");if(5!==i.length)throw Km(qm,"jwe_length");const o=await async function(e){const t=og(e),i=rg(JSON.parse(t).k);return window.crypto.subtle.importKey(pg,i,ng,!1,[hg])}(e).catch(()=>{throw Km(qm,"import_key")});try{const e=(new TextEncoder).encode(i[0]),t=rg(i[2]),r=rg(i[3]),n=rg(i[4]),a=8*n.byteLength,s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length);const l=await window.crypto.subtle.decrypt({name:ng,iv:t,tagLength:a,additionalData:e},o,s);return(new TextDecoder).decode(l)}catch(e){throw Km(qm,"decrypt")}}async function Eg(){const e=await window.crypto.subtle.generateKey({name:ng,length:256},!0,[ug,hg]);return window.crypto.subtle.exportKey(pg,e)}async function Og(e){return window.crypto.subtle.importKey(pg,e,ag,!1,["deriveKey"])}async function Cg(e,t,i){return window.crypto.subtle.deriveKey({name:ag,salt:t,hash:sg,info:(new TextEncoder).encode(i)},e,{name:ng,length:256},!1,[ug,hg])}async function Ng(e,t,i){const o=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await Cg(e,r,i),a=await window.crypto.subtle.encrypt({name:ng,iv:new Uint8Array(12)},n,o);return{data:eg(new Uint8Array(a)),nonce:eg(r)}}async function Rg(e,t,i,o){const r=rg(o),n=await Cg(e,rg(t),i),a=await window.crypto.subtle.decrypt({name:ng,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function bg(e){const t=await fg(e);return eg(new Uint8Array(t))}
105
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const wg="storage_not_supported",Pg="stubbed_public_client_application_called",vg="in_mem_redirect_unavailable",Lg={[wg]:"Given storage configuration option was not supported.",[Pg]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[vg]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class Sg extends el{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Sg.prototype)}}function Mg(e){return new Sg(e,Lg[e])}
106
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function Dg(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function kg(){return window.parent!==window}function Ug(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function xg(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${$m}.`))throw Km(dm)}function Fg(){if("undefined"==typeof window)throw Km(Am)}function Bg(e){if(!e)throw Km(Dm)}function qg(e){Fg(),function(){if(Bd.hashContainsKnownProperties(window.location.hash)&&kg())throw Km(lm)}(),xg(),Bg(e)}function Wg(e,t){if(qg(e),function(e){if(kg()&&!e)throw Km(sm)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===hf&&!t.cache.storeAuthStateInCookie)throw Mg(vg)}function Gg(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}
102
+ function tg(e){return encodeURIComponent(og(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function ig(e){return rg(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function og(e){return rg((new TextEncoder).encode(e))}function rg(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}
103
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function ng(e){return(new TextDecoder).decode(ag(e))}function ag(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw zm(Fm)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}
104
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const sg="AES-GCM",lg="HKDF",dg="SHA-256",cg=new Uint8Array([1,0,1]),pg="0123456789abcdef",ug=new Uint32Array(1),hg="raw",mg="encrypt",fg="decrypt",gg={name:"RSASSA-PKCS1-v1_5",hash:dg,modulusLength:2048,publicExponent:cg};async function Tg(e,t,i){t?.addQueueMeasurement(bp,i);const o=(new TextEncoder).encode(e);return window.crypto.subtle.digest(dg,o)}function yg(e){return window.crypto.getRandomValues(e)}function Ag(){return window.crypto.getRandomValues(ug),ug[0]}function Ig(){const e=Date.now(),t=1024*Ag()+(1023&Ag()),i=new Uint8Array(16),o=Math.trunc(t/2**30),r=t&2**30-1,n=Ag();i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|o>>>8,i[7]=o,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n;let a="";for(let e=0;e<i.length;e++)a+=pg.charAt(i[e]>>>4),a+=pg.charAt(15&i[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function _g(e){return window.crypto.subtle.exportKey("jwk",e)}async function Eg(){const e=await Cg(),t={alg:"dir",kty:"oct",k:ig(new Uint8Array(e))};return og(JSON.stringify(t))}async function Og(e,t){const i=t.split(".");if(5!==i.length)throw zm(Gm,"jwe_length");const o=await async function(e){const t=ng(e),i=ag(JSON.parse(t).k);return window.crypto.subtle.importKey(hg,i,sg,!1,[fg])}(e).catch(()=>{throw zm(Gm,"import_key")});try{const e=(new TextEncoder).encode(i[0]),t=ag(i[2]),r=ag(i[3]),n=ag(i[4]),a=8*n.byteLength,s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length);const l=await window.crypto.subtle.decrypt({name:sg,iv:t,tagLength:a,additionalData:e},o,s);return(new TextDecoder).decode(l)}catch(e){throw zm(Gm,"decrypt")}}async function Cg(){const e=await window.crypto.subtle.generateKey({name:sg,length:256},!0,[mg,fg]);return window.crypto.subtle.exportKey(hg,e)}async function Ng(e){return window.crypto.subtle.importKey(hg,e,lg,!1,["deriveKey"])}async function Rg(e,t,i){return window.crypto.subtle.deriveKey({name:lg,salt:t,hash:dg,info:(new TextEncoder).encode(i)},e,{name:sg,length:256},!1,[mg,fg])}async function bg(e,t,i){const o=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await Rg(e,r,i),a=await window.crypto.subtle.encrypt({name:sg,iv:new Uint8Array(12)},n,o);return{data:ig(new Uint8Array(a)),nonce:ig(r)}}async function wg(e,t,i,o){const r=ag(o),n=await Rg(e,ag(t),i),a=await window.crypto.subtle.decrypt({name:sg,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function Pg(e){const t=await Tg(e);return ig(new Uint8Array(t))}
105
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const vg="storage_not_supported",Lg="stubbed_public_client_application_called",Sg="in_mem_redirect_unavailable",Mg={[vg]:"Given storage configuration option was not supported.",[Lg]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[Sg]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class Dg extends il{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Dg.prototype)}}function kg(e){return new Dg(e,Mg[e])}
106
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function Ug(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function xg(){return window.parent!==window}function Fg(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Bg(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${Zm}.`))throw zm(pm)}function qg(){if("undefined"==typeof window)throw zm(Im)}function Wg(e){if(!e)throw zm(Um)}function Gg(e){qg(),function(){if(Wd.hashContainsKnownProperties(window.location.hash)&&xg())throw zm(cm)}(),Bg(),Wg(e)}function Hg(e,t){if(Gg(e),function(e){if(xg()&&!e)throw zm(dm)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===ff&&!t.cache.storeAuthStateInCookie)throw kg(Sg)}function Yg(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}
107
107
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
108
- class Hg{navigateInternal(e,t){return Hg.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Hg.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,i)=>{setTimeout(()=>{i(Km(Wm,"failed_to_redirect"))},t.timeout)})}}
109
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class Yg{async sendGetRequestAsync(e,t){let i,o={},r=0;const n=Kg(t);try{i=await fetch(e,{method:mf,headers:n})}catch(e){throw lh(Km(window.navigator.onLine?Em:Im),void 0,void 0,e)}o=Vg(i.headers);try{return r=i.status,{headers:o,body:await i.json(),status:r}}catch(e){throw lh(Km(Om),r,o,e)}}async sendPostRequestAsync(e,t){const i=t&&t.body||"",o=Kg(t);let r,n=0,a={};try{r=await fetch(e,{method:ff,headers:o,body:i})}catch(e){throw lh(Km(window.navigator.onLine?_m:Im),void 0,void 0,e)}a=Vg(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw lh(Km(Om),n,a,e)}}}function Kg(e){try{const t=new Headers;if(!e||!e.headers)return t;const i=e.headers;return Object.entries(i).forEach(([e,i])=>{t.append(e,i)}),t}catch(e){throw lh(Km(Fm),void 0,void 0,e)}}function Vg(e){try{const t={};return e.forEach((e,i)=>{t[i]=e}),t}catch(e){throw Km(Bm)}}
110
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const zg=1e4;
108
+ class Kg{navigateInternal(e,t){return Kg.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Kg.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,i)=>{setTimeout(()=>{i(zm(Hm,"failed_to_redirect"))},t.timeout)})}}
109
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Vg{async sendGetRequestAsync(e,t){let i,o={},r=0;const n=zg(t);try{i=await fetch(e,{method:gf,headers:n})}catch(e){throw ch(zm(window.navigator.onLine?Cm:Em),void 0,void 0,e)}o=Qg(i.headers);try{return r=i.status,{headers:o,body:await i.json(),status:r}}catch(e){throw ch(zm(Nm),r,o,e)}}async sendPostRequestAsync(e,t){const i=t&&t.body||"",o=zg(t);let r,n=0,a={};try{r=await fetch(e,{method:Tf,headers:o,body:i})}catch(e){throw ch(zm(window.navigator.onLine?Om:Em),void 0,void 0,e)}a=Qg(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw ch(zm(Nm),n,a,e)}}}function zg(e){try{const t=new Headers;if(!e||!e.headers)return t;const i=e.headers;return Object.entries(i).forEach(([e,i])=>{t.append(e,i)}),t}catch(e){throw ch(zm(qm),void 0,void 0,e)}}function Qg(e){try{const t={};return e.forEach((e,i)=>{t[i]=e}),t}catch(e){throw zm(Wm)}}
110
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const $g=1e4;
111
111
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
112
- const Qg="4.21.1",$g="msal",jg="browser",Zg=`${$g}.${jg}.log.level`,Jg=`${$g}.${jg}.log.pii`,Xg=`${$g}.${jg}.platform.auth.dom`,eT=`${$g}.version`,tT="account.keys",iT="token.keys";function oT(e=1){return e<1?`${$g}.${tT}`:`${$g}.${e}.${tT}`}function rT(e,t=1){return t<1?`${$g}.${iT}.${e}`:`${$g}.${t}.${iT}.${e}`}
113
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class nT{static loggerCallback(e,t){switch(e){case jl.Error:return void console.error(t);case jl.Info:return void console.info(t);case jl.Verbose:return void console.debug(t);case jl.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:i,telemetry:o},r){const n={clientId:Ua.EMPTY_STRING,authority:`${Ua.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Ua.EMPTY_STRING,authorityMetadata:Ua.EMPTY_STRING,redirectUri:"undefined"!=typeof window?Ug():"",postLogoutRedirectUri:Ua.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Jd,OIDCOptions:{serverResponseType:hs,defaultScopes:[Ua.OPENID_SCOPE,Ua.PROFILE_SCOPE,Ua.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:ed,tenant:Ua.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:uf,cacheRetentionDays:5,temporaryCacheLocation:uf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==pf),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:jl.Info,piiLoggingEnabled:!1},l={...{...Fp,loggerOptions:s,networkClient:r?new Yg:Mh,navigationClient:new Hg,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||zg,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:jm},...i,loggerOptions:i?.loggerOptions||s},d={application:{appName:Ua.EMPTY_STRING,appVersion:Ua.EMPTY_STRING},client:new xp};e?.protocolMode!==Xd&&e?.OIDCOptions&&new Zl(l.loggerOptions).warning(JSON.stringify(Rd(yd)));if(e?.protocolMode&&e.protocolMode===Xd&&l?.allowPlatformBroker)throw Rd(Id);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...o}}}(e,this.browserEnvironment);try{t=window[uf]}catch(e){}const i=t?.getItem(Zg),o=t?.getItem(Jg)?.toLowerCase(),r="true"===o||"false"!==o&&void 0,n={...this.config.system.loggerOptions},a=i&&Object.keys(jl).includes(i)?jl[i]:void 0;a&&(n.loggerCallback=nT.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Zl(n,"@azure/msal-browser",Qg),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
114
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class aT extends nT{getModuleName(){return aT.MODULE_NAME}getId(){return aT.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}aT.MODULE_NAME="",aT.ID="StandardOperatingContext";
112
+ const jg="4.21.1",Zg="msal",Jg="browser",Xg=`${Zg}.${Jg}.log.level`,eT=`${Zg}.${Jg}.log.pii`,tT=`${Zg}.${Jg}.platform.auth.dom`,iT=`${Zg}.version`,oT="account.keys",rT="token.keys";function nT(e=1){return e<1?`${Zg}.${oT}`:`${Zg}.${e}.${oT}`}function aT(e,t=1){return t<1?`${Zg}.${rT}.${e}`:`${Zg}.${t}.${rT}.${e}`}
113
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class sT{static loggerCallback(e,t){switch(e){case Jl.Error:return void console.error(t);case Jl.Info:return void console.info(t);case Jl.Verbose:return void console.debug(t);case Jl.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:i,telemetry:o},r){const n={clientId:Fa.EMPTY_STRING,authority:`${Fa.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Fa.EMPTY_STRING,authorityMetadata:Fa.EMPTY_STRING,redirectUri:"undefined"!=typeof window?Fg():"",postLogoutRedirectUri:Fa.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:ec,OIDCOptions:{serverResponseType:fs,defaultScopes:[Fa.OPENID_SCOPE,Fa.PROFILE_SCOPE,Fa.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:id,tenant:Fa.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:mf,cacheRetentionDays:5,temporaryCacheLocation:mf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==hf),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Jl.Info,piiLoggingEnabled:!1},l={...{...qp,loggerOptions:s,networkClient:r?new Vg:kh,navigationClient:new Kg,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||$g,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Jm},...i,loggerOptions:i?.loggerOptions||s},d={application:{appName:Fa.EMPTY_STRING,appVersion:Fa.EMPTY_STRING},client:new Bp};e?.protocolMode!==tc&&e?.OIDCOptions&&new Xl(l.loggerOptions).warning(JSON.stringify(wd(_d)));if(e?.protocolMode&&e.protocolMode===tc&&l?.allowPlatformBroker)throw wd(Ed);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...o}}}(e,this.browserEnvironment);try{t=window[mf]}catch(e){}const i=t?.getItem(Xg),o=t?.getItem(eT)?.toLowerCase(),r="true"===o||"false"!==o&&void 0,n={...this.config.system.loggerOptions},a=i&&Object.keys(Jl).includes(i)?Jl[i]:void 0;a&&(n.loggerCallback=sT.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Xl(n,"@azure/msal-browser",jg),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
114
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class lT extends sT{getModuleName(){return lT.MODULE_NAME}getId(){return lT.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}lT.MODULE_NAME="",lT.ID="StandardOperatingContext";
115
115
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
116
- class sT{constructor(){this.dbName=Yf,this.version=1,this.tableName=Kf,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",t=>{const i=t;this.db=i.target.result,this.dbOpen=!0,e()}),i.addEventListener("error",()=>t(Km(Pm)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Km(ym));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(Km(ym));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),i()}),r.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Km(ym));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);o.addEventListener("success",()=>{this.closeConnection(),t()}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Km(ym));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",t=>{const i=t;this.closeConnection(),e(i.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Km(ym));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(1===i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const i=window.indexedDB.deleteDatabase(Yf),o=setTimeout(()=>t(!1),200);i.addEventListener("success",()=>(clearTimeout(o),e(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),i.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}
117
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class lT{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,i)=>{e.push(i)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}}
118
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class dT{constructor(e){this.inMemoryCache=new lT,this.indexedDBCache=new sT,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Ym&&e.errorCode===Pm))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}
119
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class cT{constructor(e,t,i){this.logger=e,function(e){if(!window)throw Km(Am);if(!window.crypto)throw Km(Qh);if(!e&&!window.crypto.subtle)throw Km(Qh,"crypto_subtle_undefined")}(i??!1),this.cache=new dT(this.logger),this.performanceClient=t}createNewGuid(){return Ag()}base64Encode(e){return tg(e)}base64Decode(e){return og(e)}base64UrlEncode(e){return Xf(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(lc,e.correlationId),i=await async function(e,t){return window.crypto.subtle.generateKey(mg,e,t)}(cT.EXTRACTABLE,cT.POP_KEY_USAGES),o=await yg(i.publicKey),r=pT({e:o.e,kty:o.kty,n:o.n}),n=await this.hashString(r),a=await yg(i.privateKey),s=await async function(e,t,i){return window.crypto.subtle.importKey("jwk",e,mg,t,i)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),n}async removeTokenBindingKey(e){await this.cache.removeItem(e);if(await this.cache.containsKey(e))throw Ql(Fl)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,i,o){const r=this.performanceClient?.startMeasurement(dc,o),n=await this.cache.getItem(t);if(!n)throw Km(Nm);const a=await yg(n.publicKey),s=pT(a),l=Xf(JSON.stringify({kid:t})),d=Xf(Yh.getShrHeaderString({...i?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${Xf(JSON.stringify(e))}`,p=(new TextEncoder).encode(c),u=await async function(e,t){return window.crypto.subtle.sign(mg,e,t)}(n.privateKey,p),h=`${c}.${eg(new Uint8Array(u))}`;return r&&r.end({success:!0}),h}async hashString(e){return bg(e)}}function pT(e){return JSON.stringify(e,Object.keys(e).sort())}
120
- /*! @azure/msal-browser v4.21.1 2025-08-27 */cT.POP_KEY_USAGES=["sign","verify"],cT.EXTRACTABLE=!0;const uT=864e5,hT="Lax",mT="None";class fT{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){const o=i[e],[r,...n]=decodeURIComponent(o).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw Ql(Yl)}setItem(e,t,i,o=!0,r=hT){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(i){const e=function(e){const t=new Date,i=new Date(t.getTime()+e*uT);return i.toUTCString()}
121
- /*! @azure/msal-browser v4.21.1 2025-08-27 */(i);n+=`expires=${e};`}(o||r===mT)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(Ql(Yl))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const i=decodeURIComponent(e).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function gT(e,t){const i=e.getItem(oT(t));return i?JSON.parse(i):[]}function TT(e,t,i){const o=t.getItem(rT(e,i));if(o){const e=JSON.parse(o);if(e&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("accessToken")&&e.hasOwnProperty("refreshToken"))return e}return{idToken:[],accessToken:[],refreshToken:[]}}
122
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function AT(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
123
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const yT="msal.cache.encryption";class IT{constructor(e,t,i){if(!window.localStorage)throw Mg(wg);this.memoryStorage=new lT,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=i,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new fT,i=t.getItem(yT);let o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch(e){}if(o.key&&o.id){const t=xu(rg,Pp,this.logger,this.performanceClient,e)(o.key);this.encryptionCookie={id:o.id,key:await Fu(Og,bp,this.logger,this.performanceClient,e)(t)}}else{const i=Ag(),o=await Fu(Eg,wp,this.logger,this.performanceClient,e)(),r=xu(eg,vp,this.logger,this.performanceClient,e)(new Uint8Array(o));this.encryptionCookie={id:i,key:await Fu(Og,bp,this.logger,this.performanceClient,e)(o)};const n={id:i,key:r};t.setItem(yT,JSON.stringify(n),0,!0,mT)}await Fu(this.importExistingCache.bind(this),yp,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw Km(Dm);return this.memoryStorage.getItem(e)}async decryptData(e,t,i){if(!this.initialized||!this.encryptionCookie)throw Km(Dm);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;const o=await Fu(Rg,Sp,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!o)return null;try{return JSON.parse(o)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,i,o){if(!this.initialized||!this.encryptionCookie)throw Km(Dm);const{data:r,nonce:n}=await Fu(Ng,Lp,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(e,t),this.setItem(e,JSON.stringify(a)),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear();gT(this).forEach(e=>this.removeItem(e));const e=TT(this.clientId,this);e.idToken.forEach(e=>this.removeItem(e)),e.accessToken.forEach(e=>this.removeItem(e)),e.refreshToken.forEach(e=>this.removeItem(e)),this.getKeys().forEach(e=>{(e.startsWith($g)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=gT(this);t=await this.importArray(t,e),t.length?this.setItem(oT(),JSON.stringify(t)):this.removeItem(oT());const i=TT(this.clientId,this);i.idToken=await this.importArray(i.idToken,e),i.accessToken=await this.importArray(i.accessToken,e),i.refreshToken=await this.importArray(i.refreshToken,e),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(rT(this.clientId),JSON.stringify(i)):this.removeItem(rT(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const i=this.getItem(e);if(!i)return null;let o;try{o=JSON.parse(i)}catch(e){return null}return AT(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):Fu(Rg,Sp,this.logger,this.performanceClient,t)(this.encryptionCookie.key,o.nonce,this.getContext(e),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),o)}async importArray(e,t){const i=[],o=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),i.push(e)):this.removeItem(e)});o.push(r)}),await Promise.all(o),i}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e){this.logger.trace("Updating internal cache from broadcast event");const t=this.performanceClient.startMeasurement(_p);t.add({isBackground:!0});const{key:i,value:o,context:r}=e.data;return i?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),void t.end({success:!0})):(this.logger.error("Broadcast event missing key"),void t.end({success:!1,errorCode:"noKey"}))}}
124
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class _T{constructor(){if(!window.sessionStorage)throw Mg(wg)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return Promise.resolve(null)}}
125
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const ET="msal:initializeStart",OT="msal:initializeEnd",CT="msal:accountAdded",NT="msal:accountRemoved",RT="msal:activeAccountChanged",bT="msal:loginStart",wT="msal:loginSuccess",PT="msal:loginFailure",vT="msal:acquireTokenStart",LT="msal:acquireTokenSuccess",ST="msal:acquireTokenFailure",MT="msal:acquireTokenFromNetworkStart",DT="msal:ssoSilentStart",kT="msal:ssoSilentSuccess",UT="msal:ssoSilentFailure",xT="msal:acquireTokenByCodeStart",FT="msal:acquireTokenByCodeSuccess",BT="msal:acquireTokenByCodeFailure",qT="msal:handleRedirectStart",WT="msal:handleRedirectEnd",GT="msal:popupOpened",HT="msal:logoutStart",YT="msal:logoutSuccess",KT="msal:logoutFailure",VT="msal:logoutEnd",zT="msal:restoreFromBFCache";
126
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function QT(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}
127
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class $T extends jd{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new lT,this.browserStorage=jT(e,t.cacheLocation,o,r),this.temporaryCacheStorage=jT(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new fT,this.eventHandler=n}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=gT(this.browserStorage,0),i=TT(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},e);const o=gT(this.browserStorage,1),r=TT(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,i.idToken,r.idToken,e),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(oT(0),JSON.stringify(t)):this.browserStorage.removeItem(oT(0)),o.length>0?this.browserStorage.setItem(oT(1),JSON.stringify(o)):this.browserStorage.removeItem(oT(1)),this.setTokenKeys(i,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,i,o){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){QT(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=AT(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&($u(l)||ju(l))&&(d=l.expiresOn),!l||Yu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&Hu(d,300))this.browserStorage.removeItem(n),QT(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==pf||AT(s)){const t=`${$g}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{i.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(eT);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Qg&&this.setItem(eT,Qg,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,i){let o=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=o?this.removeAccessTokenKeys(r.slice(0,n),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,n),i)));break}catch(a){const s=$d(a);if(!(s.errorCode===Kd&&n<20))throw s;if(!r.length){const i=e===rT(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===rT(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...i,...n],o=i.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],i,!1)}}async setUserData(e,t,i,o){let r=0,n=[];for(let a=0;a<=20;a++)try{await Fu(this.browserStorage.setUserData.bind(this.browserStorage),Ip,this.logger,this.performanceClient)(e,t,i,o),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),i,0):(this.removeAccessTokenKeys(n.slice(0,r),i,0),this.removeAccessTokenKeys(n.slice(r,a),i)));break}catch(e){const t=$d(e);if(!(t.errorCode===Kd&&a<20))throw t;if(!n.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;n=[...e,...t],r=e.length}if(n.length<=a)throw t;this.removeAccessToken(n[a],i,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.browserStorage.getUserData(e);if(!i)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(i);return o&&ph.isAccountEntity(o)?jd.toObject(new ph,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const i=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.addAccountKeyToMap(i,t);this.cacheConfig.cacheLocation===pf&&r&&this.eventHandler.emitEvent(CT,void 0,e.getAccountInfo())}getAccountKeys(){return gT(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const i=this.getAccountKeys();return-1===i.indexOf(e)?(i.push(e),this.setItem(oT(),JSON.stringify(i),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const i=this.getAccountKeys(),o=i.indexOf(e);if(o>-1){if(i.splice(o,1),0===i.length)return void this.removeItem(oT());this.setItem(oT(),JSON.stringify(i),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const i=this.getActiveAccount(t);i?.homeAccountId===e.homeAccountId&&i?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===pf&&this.eventHandler.emitEvent(NT,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const i=this.getTokenKeys(),o=i.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,t))}removeAccessToken(e,t,i=!0){super.removeAccessToken(e,t),i&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,i=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(i);let r=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,i)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const i=this.getTokenKeys(),o=i.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,t))}getTokenKeys(e=1){return TT(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(rT(this.clientId,i),JSON.stringify(e),t):this.removeItem(rT(this.clientId,i))}getIdTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(i);return o&&((r=o)&&Qu(r)&&r.hasOwnProperty("realm")&&r.credentialType===Es.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.idToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(i);return o&&$u(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys(),n=r.accessToken.indexOf(i);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(i);return o&&ju(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&(o=e,(r=i)&&0===o.indexOf(Os)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const i=function({environment:e,clientId:t}){return[Os,e,t].join(Is).toLowerCase()}(e);this.setItem(i,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(Ls.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),i)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(Ns)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(Cf,e),this.internalStorage.setItem(Nf,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Cf)||Ua.EMPTY_STRING,this.internalStorage.getItem(Nf)||Ua.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Xa),i=this.browserStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const i=this.generateCacheKey(Xa);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:qu().toString()};this.setItem(i,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(RT)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(ks));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),i)}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===pf){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,i){const o=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf($g)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf($g)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Tp,e);const t=this.getTokenKeys();let i=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return bd.startsWith(e,$g)?e:`${$g}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Es.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==Ss.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${$g}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${$g}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(If)),this.removeTemporaryItem(this.generateCacheKey(_f)),this.removeTemporaryItem(this.generateCacheKey(Af)),this.removeTemporaryItem(this.generateCacheKey(yf)),this.removeTemporaryItem(this.generateCacheKey(Of)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=tg(JSON.stringify(e));if(this.setTemporaryCache(If,i,!0),t){const e=tg(t);this.setTemporaryCache(_f,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(If,!0);if(!e)throw Km(mm);const t=this.getTemporaryCache(_f,!0);let i,o="";try{i=JSON.parse(og(e)),t&&(o=og(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Km(fm)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Of,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${$g}.${Ef}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),Dg(window),null}}setInteractionInProgress(e,t=gf){const i=`${$g}.${Ef}`;if(e){if(this.getInteractionInProgress())throw Km(tm);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(i)}async hydrateCache(e,t){const i=Ku(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const r={idToken:i,accessToken:Vu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Wu(e.expiresOn):0,e.extExpiresOn?Wu(e.extExpiresOn):0,og,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof Qd&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function jT(e,t,i,o){try{switch(t){case pf:return new IT(e,i,o);case uf:return new _T}}catch(e){i.error(e)}return new lT}class ZT{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Zl({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,i){if("undefined"!=typeof window){const o=i||Ag();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,o){const r={eventType:e,interactionType:t||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(e){case CT:case NT:case RT:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,i],o)=>{(0===i.length||i.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}
128
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class JT{constructor(e,t,i,o,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Ag(),this.logger=o.clone(Zm,Qg,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e,t){if(t)try{this.browserStorage.removeAccount(t,e),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(e),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return Bd.getAbsoluteUrl(t,Ug())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Fh(i,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,i=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(fc,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=e.requestAuthority||this.config.auth.authority,n=i?.length?"true"===i:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(Bd.getDomainFromUrl(r),t.environment):r,s=th.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await Fu(oh,ip,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw Rd(_d);return l}}
129
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function XT(e,t,i,o){i.addQueueMeasurement(Pc,e.correlationId);const r=e.authority||t.auth.authority,n=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:r,scopes:n};if(a.authenticationScheme){if(a.authenticationScheme===Ss.SSH){if(!e.sshJwk)throw Rd(fd);if(!e.sshKid)throw Rd(gd)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=Ss.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!bd.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await bg(e.claims)),a}async function eA(e,t,i,o,r){o.addQueueMeasurement(vc,e.correlationId);const n=await Fu(XT,Pc,r,o,e.correlationId)(e,i,o,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function tA(e,t){let i;const o=e.httpMethod;if(t===ec){if(i=o||Ya,i!==Ya)throw Rd(Ed)}else i=o||Ha;if(e.authorizePostBodyParameters&&i!==Ya)throw Rd(Od);return i}
130
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class iA extends JT{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Ag(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const i=this.getLogoutHintFromIdTokenClaims(e.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=Bd.getAbsoluteUrl(e.postLogoutRedirectUri,Ug())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=Bd.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Ug())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=Bd.getAbsoluteUrl(Ug(),Ug())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(Fc,this.correlationId);const t=await Fu(this.getClientConfiguration.bind(this),Bc,this.logger,this.performanceClient,this.correlationId)(e);return new vh(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(Bc,this.correlationId);const a=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Zm,version:Qg,cpu:Ua.EMPTY_STRING,os:Ua.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(qc,this.correlationId);const i=this.getRedirectUri(e.redirectUri),o={interactionType:t},r=Oh.setRequestState(this.browserCrypto,e&&e.state||Ua.EMPTY_STRING,o),n={...await Fu(XT,Pc,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||Ag(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:tA(n,this.config.auth.protocolMode)};if(e.loginHint||e.sid)return a;const s=e.account||this.browserStorage.getActiveAccount(this.correlationId);return s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${s.homeAccountId}`,this.correlationId),a.account=s),a}}
116
+ class dT{constructor(){this.dbName=Vf,this.version=1,this.tableName=zf,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",t=>{const i=t;this.db=i.target.result,this.dbOpen=!0,e()}),i.addEventListener("error",()=>t(zm(Lm)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(zm(_m));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(zm(_m));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),i()}),r.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(zm(_m));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);o.addEventListener("success",()=>{this.closeConnection(),t()}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(zm(_m));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",t=>{const i=t;this.closeConnection(),e(i.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(zm(_m));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(1===i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const i=window.indexedDB.deleteDatabase(Vf),o=setTimeout(()=>t(!1),200);i.addEventListener("success",()=>(clearTimeout(o),e(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),i.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}
117
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class cT{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,i)=>{e.push(i)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}}
118
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class pT{constructor(e){this.inMemoryCache=new cT,this.indexedDBCache=new dT,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Vm&&e.errorCode===Lm))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}
119
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class uT{constructor(e,t,i){this.logger=e,function(e){if(!window)throw zm(Im);if(!window.crypto)throw zm(jh);if(!e&&!window.crypto.subtle)throw zm(jh,"crypto_subtle_undefined")}(i??!1),this.cache=new pT(this.logger),this.performanceClient=t}createNewGuid(){return Ig()}base64Encode(e){return og(e)}base64Decode(e){return ng(e)}base64UrlEncode(e){return tg(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(cc,e.correlationId),i=await async function(e,t){return window.crypto.subtle.generateKey(gg,e,t)}(uT.EXTRACTABLE,uT.POP_KEY_USAGES),o=await _g(i.publicKey),r=hT({e:o.e,kty:o.kty,n:o.n}),n=await this.hashString(r),a=await _g(i.privateKey),s=await async function(e,t,i){return window.crypto.subtle.importKey("jwk",e,gg,t,i)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),n}async removeTokenBindingKey(e){await this.cache.removeItem(e);if(await this.cache.containsKey(e))throw jl(ql)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,i,o){const r=this.performanceClient?.startMeasurement(pc,o),n=await this.cache.getItem(t);if(!n)throw zm(bm);const a=await _g(n.publicKey),s=hT(a),l=tg(JSON.stringify({kid:t})),d=tg(Vh.getShrHeaderString({...i?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${tg(JSON.stringify(e))}`,p=(new TextEncoder).encode(c),u=await async function(e,t){return window.crypto.subtle.sign(gg,e,t)}(n.privateKey,p),h=`${c}.${ig(new Uint8Array(u))}`;return r&&r.end({success:!0}),h}async hashString(e){return Pg(e)}}function hT(e){return JSON.stringify(e,Object.keys(e).sort())}
120
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */uT.POP_KEY_USAGES=["sign","verify"],uT.EXTRACTABLE=!0;const mT=864e5,fT="Lax",gT="None";class TT{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){const o=i[e],[r,...n]=decodeURIComponent(o).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw jl(Vl)}setItem(e,t,i,o=!0,r=fT){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(i){const e=function(e){const t=new Date,i=new Date(t.getTime()+e*mT);return i.toUTCString()}
121
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */(i);n+=`expires=${e};`}(o||r===gT)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(jl(Vl))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const i=decodeURIComponent(e).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function yT(e,t){const i=e.getItem(nT(t));return i?JSON.parse(i):[]}function AT(e,t,i){const o=t.getItem(aT(e,i));if(o){const e=JSON.parse(o);if(e&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("accessToken")&&e.hasOwnProperty("refreshToken"))return e}return{idToken:[],accessToken:[],refreshToken:[]}}
122
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function IT(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
123
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const _T="msal.cache.encryption";class ET{constructor(e,t,i){if(!window.localStorage)throw kg(vg);this.memoryStorage=new cT,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=i,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new TT,i=t.getItem(_T);let o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch(e){}if(o.key&&o.id){const t=Bu(ag,Lp,this.logger,this.performanceClient,e)(o.key);this.encryptionCookie={id:o.id,key:await qu(Ng,Pp,this.logger,this.performanceClient,e)(t)}}else{const i=Ig(),o=await qu(Cg,vp,this.logger,this.performanceClient,e)(),r=Bu(ig,Sp,this.logger,this.performanceClient,e)(new Uint8Array(o));this.encryptionCookie={id:i,key:await qu(Ng,Pp,this.logger,this.performanceClient,e)(o)};const n={id:i,key:r};t.setItem(_T,JSON.stringify(n),0,!0,gT)}await qu(this.importExistingCache.bind(this),_p,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw zm(Um);return this.memoryStorage.getItem(e)}async decryptData(e,t,i){if(!this.initialized||!this.encryptionCookie)throw zm(Um);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;const o=await qu(wg,Dp,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!o)return null;try{return JSON.parse(o)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,i,o){if(!this.initialized||!this.encryptionCookie)throw zm(Um);const{data:r,nonce:n}=await qu(bg,Mp,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(e,t),this.setItem(e,JSON.stringify(a)),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear();yT(this).forEach(e=>this.removeItem(e));const e=AT(this.clientId,this);e.idToken.forEach(e=>this.removeItem(e)),e.accessToken.forEach(e=>this.removeItem(e)),e.refreshToken.forEach(e=>this.removeItem(e)),this.getKeys().forEach(e=>{(e.startsWith(Zg)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=yT(this);t=await this.importArray(t,e),t.length?this.setItem(nT(),JSON.stringify(t)):this.removeItem(nT());const i=AT(this.clientId,this);i.idToken=await this.importArray(i.idToken,e),i.accessToken=await this.importArray(i.accessToken,e),i.refreshToken=await this.importArray(i.refreshToken,e),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(aT(this.clientId),JSON.stringify(i)):this.removeItem(aT(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const i=this.getItem(e);if(!i)return null;let o;try{o=JSON.parse(i)}catch(e){return null}return IT(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):qu(wg,Dp,this.logger,this.performanceClient,t)(this.encryptionCookie.key,o.nonce,this.getContext(e),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),o)}async importArray(e,t){const i=[],o=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),i.push(e)):this.removeItem(e)});o.push(r)}),await Promise.all(o),i}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e){this.logger.trace("Updating internal cache from broadcast event");const t=this.performanceClient.startMeasurement(Op);t.add({isBackground:!0});const{key:i,value:o,context:r}=e.data;return i?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),void t.end({success:!0})):(this.logger.error("Broadcast event missing key"),void t.end({success:!1,errorCode:"noKey"}))}}
124
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class OT{constructor(){if(!window.sessionStorage)throw kg(vg)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return Promise.resolve(null)}}
125
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const CT="msal:initializeStart",NT="msal:initializeEnd",RT="msal:accountAdded",bT="msal:accountRemoved",wT="msal:activeAccountChanged",PT="msal:loginStart",vT="msal:loginSuccess",LT="msal:loginFailure",ST="msal:acquireTokenStart",MT="msal:acquireTokenSuccess",DT="msal:acquireTokenFailure",kT="msal:acquireTokenFromNetworkStart",UT="msal:ssoSilentStart",xT="msal:ssoSilentSuccess",FT="msal:ssoSilentFailure",BT="msal:acquireTokenByCodeStart",qT="msal:acquireTokenByCodeSuccess",WT="msal:acquireTokenByCodeFailure",GT="msal:handleRedirectStart",HT="msal:handleRedirectEnd",YT="msal:popupOpened",KT="msal:logoutStart",VT="msal:logoutSuccess",zT="msal:logoutFailure",QT="msal:logoutEnd",$T="msal:restoreFromBFCache";
126
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function jT(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}
127
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class ZT extends Jd{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new cT,this.browserStorage=JT(e,t.cacheLocation,o,r),this.temporaryCacheStorage=JT(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new TT,this.eventHandler=n}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=yT(this.browserStorage,0),i=AT(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},e);const o=yT(this.browserStorage,1),r=AT(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,i.idToken,r.idToken,e),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(nT(0),JSON.stringify(t)):this.browserStorage.removeItem(nT(0)),o.length>0?this.browserStorage.setItem(nT(1),JSON.stringify(o)):this.browserStorage.removeItem(nT(1)),this.setTokenKeys(i,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,i,o){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){jT(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=IT(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(Zu(l)||Ju(l))&&(d=l.expiresOn),!l||Vu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&Ku(d,300))this.browserStorage.removeItem(n),jT(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==hf||IT(s)){const t=`${Zg}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{i.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(iT);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==jg&&this.setItem(iT,jg,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,i){let o=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=o?this.removeAccessTokenKeys(r.slice(0,n),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,n),i)));break}catch(a){const s=Zd(a);if(!(s.errorCode===zd&&n<20))throw s;if(!r.length){const i=e===aT(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===aT(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...i,...n],o=i.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],i,!1)}}async setUserData(e,t,i,o){let r=0,n=[];for(let a=0;a<=20;a++)try{await qu(this.browserStorage.setUserData.bind(this.browserStorage),Ep,this.logger,this.performanceClient)(e,t,i,o),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),i,0):(this.removeAccessTokenKeys(n.slice(0,r),i,0),this.removeAccessTokenKeys(n.slice(r,a),i)));break}catch(e){const t=Zd(e);if(!(t.errorCode===zd&&a<20))throw t;if(!n.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;n=[...e,...t],r=e.length}if(n.length<=a)throw t;this.removeAccessToken(n[a],i,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.browserStorage.getUserData(e);if(!i)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(i);return o&&hh.isAccountEntity(o)?Jd.toObject(new hh,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const i=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.addAccountKeyToMap(i,t);this.cacheConfig.cacheLocation===hf&&r&&this.eventHandler.emitEvent(RT,void 0,e.getAccountInfo())}getAccountKeys(){return yT(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const i=this.getAccountKeys();return-1===i.indexOf(e)?(i.push(e),this.setItem(nT(),JSON.stringify(i),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const i=this.getAccountKeys(),o=i.indexOf(e);if(o>-1){if(i.splice(o,1),0===i.length)return void this.removeItem(nT());this.setItem(nT(),JSON.stringify(i),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const i=this.getActiveAccount(t);i?.homeAccountId===e.homeAccountId&&i?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===hf&&this.eventHandler.emitEvent(bT,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const i=this.getTokenKeys(),o=i.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,t))}removeAccessToken(e,t,i=!0){super.removeAccessToken(e,t),i&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,i=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(i);let r=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,i)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const i=this.getTokenKeys(),o=i.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,t))}getTokenKeys(e=1){return AT(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(aT(this.clientId,i),JSON.stringify(e),t):this.removeItem(aT(this.clientId,i))}getIdTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(i);return o&&((r=o)&&ju(r)&&r.hasOwnProperty("realm")&&r.credentialType===Cs.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.idToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(i);return o&&Zu(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys(),n=r.accessToken.indexOf(i);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(i);return o&&Ju(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&(o=e,(r=i)&&0===o.indexOf(Ns)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const i=function({environment:e,clientId:t}){return[Ns,e,t].join(Es).toLowerCase()}(e);this.setItem(i,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(Ms.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),i)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(bs)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(Rf,e),this.internalStorage.setItem(bf,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Rf)||Fa.EMPTY_STRING,this.internalStorage.getItem(bf)||Fa.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(ts),i=this.browserStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const i=this.generateCacheKey(ts);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:Gu().toString()};this.setItem(i,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(wT)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(xs));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),i)}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===hf){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,i){const o=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(Zg)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(Zg)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Ap,e);const t=this.getTokenKeys();let i=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return Pd.startsWith(e,Zg)?e:`${Zg}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Cs.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==Ds.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Zg}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Zg}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Ef)),this.removeTemporaryItem(this.generateCacheKey(Of)),this.removeTemporaryItem(this.generateCacheKey(If)),this.removeTemporaryItem(this.generateCacheKey(_f)),this.removeTemporaryItem(this.generateCacheKey(Nf)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=og(JSON.stringify(e));if(this.setTemporaryCache(Ef,i,!0),t){const e=og(t);this.setTemporaryCache(Of,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Ef,!0);if(!e)throw zm(gm);const t=this.getTemporaryCache(Of,!0);let i,o="";try{i=JSON.parse(ng(e)),t&&(o=ng(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),zm(Tm)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Nf,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${Zg}.${Cf}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),Ug(window),null}}setInteractionInProgress(e,t=yf){const i=`${Zg}.${Cf}`;if(e){if(this.getInteractionInProgress())throw zm(om);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(i)}async hydrateCache(e,t){const i=zu(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const r={idToken:i,accessToken:Qu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?Hu(e.expiresOn):0,e.extExpiresOn?Hu(e.extExpiresOn):0,ng,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof jd&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function JT(e,t,i,o){try{switch(t){case hf:return new ET(e,i,o);case mf:return new OT}}catch(e){i.error(e)}return new cT}class XT{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Xl({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,i){if("undefined"!=typeof window){const o=i||Ig();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,o){const r={eventType:e,interactionType:t||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(e){case RT:case bT:case wT:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,i],o)=>{(0===i.length||i.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}
128
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class ey{constructor(e,t,i,o,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Ig(),this.logger=o.clone(Xm,jg,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e,t){if(t)try{this.browserStorage.removeAccount(t,e),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(e),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return Wd.getAbsoluteUrl(t,Fg())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new qh(i,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,i=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Tc,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=e.requestAuthority||this.config.auth.authority,n=i?.length?"true"===i:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(Wd.getDomainFromUrl(r),t.environment):r,s=oh.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await qu(nh,rp,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw wd(Od);return l}}
129
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function ty(e,t,i,o){i.addQueueMeasurement(Lc,e.correlationId);const r=e.authority||t.auth.authority,n=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:r,scopes:n};if(a.authenticationScheme){if(a.authenticationScheme===Ds.SSH){if(!e.sshJwk)throw wd(Td);if(!e.sshKid)throw wd(yd)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=Ds.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!Pd.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Pg(e.claims)),a}async function iy(e,t,i,o,r){o.addQueueMeasurement(Sc,e.correlationId);const n=await qu(ty,Lc,r,o,e.correlationId)(e,i,o,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function oy(e,t){let i;const o=e.httpMethod;if(t===ic){if(i=o||Va,i!==Va)throw wd(Cd)}else i=o||Ka;if(e.authorizePostBodyParameters&&i!==Va)throw wd(Nd);return i}
130
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class ry extends ey{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Ig(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const i=this.getLogoutHintFromIdTokenClaims(e.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=Wd.getAbsoluteUrl(e.postLogoutRedirectUri,Fg())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=Wd.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Fg())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=Wd.getAbsoluteUrl(Fg(),Fg())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(qc,this.correlationId);const t=await qu(this.getClientConfiguration.bind(this),Wc,this.logger,this.performanceClient,this.correlationId)(e);return new Sh(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(Wc,this.correlationId);const a=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Xm,version:jg,cpu:Fa.EMPTY_STRING,os:Fa.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(Gc,this.correlationId);const i=this.getRedirectUri(e.redirectUri),o={interactionType:t},r=Nh.setRequestState(this.browserCrypto,e&&e.state||Fa.EMPTY_STRING,o),n={...await qu(ty,Lc,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||Ig(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:oy(n,this.config.auth.protocolMode)};if(e.loginHint||e.sid)return a;const s=e.account||this.browserStorage.getActiveAccount(this.correlationId);return s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${s.homeAccountId}`,this.correlationId),a.account=s),a}}
131
131
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
132
132
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
133
- function oA(e,t,i){const o=Ud(e);if(!o)throw kd(e)?(i.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),i.errorPii(`The ${t} detected is: ${e}`),Km(Jh)):(i.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),Km(jh));return o}function rA(e,t,i){if(!e.state)throw Km(Zh);const o=function(e,t){if(!t)return null;try{return Oh.parseRequestState(e,t).libraryState.meta}catch(e){throw Ql(cl)}}(t,e.state);if(!o)throw Km(Xh);if(o.interactionType!==i)throw Km(em)}
134
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class nA{constructor(e,t,i,o,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}async handleCodeResponse(e,t){let i;this.performanceClient.addQueueMeasurement(Yc,t.correlationId);try{i=function(e,t){if(Uh(e,t),!e.code)throw Ql(xl);return e}(e,t.state)}catch(e){throw e instanceof rh&&e.subError===rm?Km(rm):e}return Fu(this.handleCodeResponseFromServer.bind(this),Hc,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(Hc,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await Fu(this.authModule.updateAuthority.bind(this.authModule),Qc,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),i&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await Fu(this.authModule.acquireToken.bind(this.authModule),$c,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:zp}:e.loginHint?{credential:e.loginHint,type:Qp}:null}}
135
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const aA="user_switch",sA={[aA]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class lA extends el{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,lA.prototype),this.name="NativeAuthError",this.ext=i}}function dA(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function cA(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return Eh(hh);case"USER_INTERACTION_REQUIRED":return new Ih(e,t);case"USER_CANCEL":return Km(rm);case"NO_NETWORK":return Km(Im);case"UX_NOT_ALLOWED":return Eh(fh)}return new lA(e,sA[e]||t,i)}
136
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class pA extends iA{async acquireToken(e){this.performanceClient.addQueueMeasurement(cc,e.correlationId);const t=this.initializeServerTelemetryManager(Lf),i=await Fu(this.getClientConfiguration.bind(this),Bc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new Sh(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await Fu(o.acquireCachedToken.bind(o),Rc,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Ym&&e.errorCode===Nm&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t.correlationId,t?.account)}}
137
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class uA extends JT{constructor(e,t,i,o,r,n,a,s,l,d,c,p){super(e,t,i,o,r,n,s,l,p),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new pA(e,this.nativeStorageManager,i,o,r,n,s,l,p);const u=this.platformAuthProvider.getExtensionName();this.skus=Fh.makeExtraSkuString({libraryName:Zm,libraryVersion:Qg,extensionName:u,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[iu]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(gc,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(gc,this.correlationId),o=qu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===zf)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(n);return await this.handleNativeResponse(a,n,o).then(e=>(i.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw i.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof lA&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:wd.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Ql(Pl);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw Ql(Pl);try{const e=this.createSilentCacheRequest(t,i),o=await this.silentCacheClient.acquireToken(e),r={...i,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const o=await this.initializeNativeRequest(i);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof lA){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),dA(e))throw e}}this.browserStorage.setTemporaryCache(Of,JSON.stringify(o),!0);const r={apiId:Rf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(n,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...r}=i;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Of));const n=qu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),i=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),i}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=Sd(e.id_token,og),r=this.createHomeAccountIdentifier(e,o),n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==n&&e.account.id!==t.accountId)throw cA(aA);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=wh(this.browserStorage,a,r,og,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,i);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,o,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return ph.generateHomeAccountId(e.client_info||Ua.EMPTY_STRING,Mu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?wd.fromString(t):wd.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===Ss.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Nh(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Ql(ql);return i.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,i,o,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||i.oid||i.sub||Ua.EMPTY_STRING,c=l.TenantId||i.tid||Ua.EMPTY_STRING,p=Ld(o.getAccountInfo(),void 0,i,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const u=await this.generatePopAccessToken(e,t),h=t.tokenType===Ss.POP?Ss.POP:Ss.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:p,idToken:e.id_token,idTokenClaims:i,accessToken:u,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:Gu(n+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,i,o,r,n,a){const s=Ku(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===Ss.POP?Ua.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),d=this.generateScopes(e.scope,t.scope),c={idToken:s,accessToken:Vu(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,og,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===Ss.POP?Ua.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:i,...o}=e,r=new wd(i||[]);r.appendScopes(Ka);const n={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(n.signPopToken&&e.popKid)throw Km(xm);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=ef,e.authenticationScheme===Ss.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Nh(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await Fu(i.generateCnf.bind(i),Jc,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=o}return this.addRequestSKUs(n),n}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new Bd(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case wf:case Lf:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),ls}if(e)switch(e){case ls:case ss:case ns:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),Km(km)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(ou)&&e.extraParameters.hasOwnProperty(ru)&&e.extraParameters.hasOwnProperty(Zp);if(!e.embeddedClientId&&!t)return;let i="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,i=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[ru],i=e.extraParameters[Zp]),e.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}}
138
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function hA(e,t,i,o,r){const n=Dh({...e.auth,authority:t},i,o,r);if(Tu(n,{sku:Zm,version:Qg,os:"",cpu:""}),e.auth.protocolMode!==Xd&&Au(n,e.telemetry.application),i.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},i.correlationId),i.authenticationScheme===Ss.POP)){const e=new cT(o,r),t=new Nh(e);let a;if(i.popKid)a=e.encodeKid(i.popKid);else{a=(await Fu(t.generateCnf.bind(t),Jc,o,r,i.correlationId)(i,o)).reqCnfString}wu(n,a)}return au(n,i.correlationId,r),n}async function mA(e,t,i,o,r){if(!i.codeChallenge)throw Rd(pd);const n=await Fu(hA,Gc,o,r,i.correlationId)(e,t,i,o,r);return su(n,cs),Iu(n,i.codeChallenge,Ua.S256_CODE_CHALLENGE_METHOD),bu(n,i.extraQueryParameters||{}),kh(t,n,e.auth.encodeExtraQueryParams,i.extraQueryParameters)}async function fA(e,t,i,o,r,n){if(!o.earJwk)throw Km(Vh);const a=await hA(t,i,o,r,n);su(a,ps),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;bu(s,o.extraQueryParameters||{});return TA(e,kh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function gA(e,t,i,o,r,n){const a=await hA(t,i,o,r,n);su(a,cs),Iu(a,o.codeChallenge,o.codeChallengeMethod||Ua.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,i])=>{i&&e.set(t,i)})}(a,o.authorizePostBodyParameters||{});const s=new Map;bu(s,o.extraQueryParameters||{});return TA(e,kh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function TA(e,t,i){const o=e.createElement("form");return o.method="post",o.action=t,i.forEach((t,i)=>{const r=e.createElement("input");r.hidden=!0,r.name=i,r.value=t,o.appendChild(r)}),e.body.appendChild(o),o}async function AA(e,t,i,o,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Km(Mm);const c=new cT(s,l),p=new uA(o,r,c,s,a,o.system.navigationClient,i,l,d,t,n,e.correlationId),{userRequestState:u}=Oh.parseRequestState(c,e.state);return Fu(p.acquireToken.bind(p),gc,s,l,e.correlationId)({...e,state:u,prompt:void 0})}async function yA(e,t,i,o,r,n,a,s,l,d,c,p){if(ah.removeThrottle(a,r.auth.clientId,e),t.accountId)return Fu(AA,Vc,d,c,e.correlationId)(e,t.accountId,o,r,a,s,l,d,c,p);const u={...e,code:t.code||"",codeVerifier:i},h=new nA(n,a,u,d,c);return await Fu(h.handleCodeResponse.bind(h),Yc,d,c,e.correlationId)(t,e)}async function IA(e,t,i,o,r,n,a,s,l,d,c){if(ah.removeThrottle(n,o.auth.clientId,e),Uh(t,e.state),!t.ear_jwe)throw Km(zh);if(!e.earJwk)throw Km(Vh);const p=JSON.parse(await Fu(_g,Dp,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(p.accountId)return Fu(AA,Vc,l,d,e.correlationId)(e,p.accountId,i,o,n,a,s,l,d,c);const u=new bh(o.auth.clientId,n,new cT(l,d),l,null,null,d);u.validateTokenResponse(p);const h={code:"",state:e.state,nonce:e.nonce,client_info:p.client_info,cloud_graph_host_name:p.cloud_graph_host_name,cloud_instance_host_name:p.cloud_instance_host_name,cloud_instance_name:p.cloud_instance_name,msgraph_host:p.msgraph_host};return await Fu(u.handleServerTokenResponse.bind(u),ep,l,d,e.correlationId)(p,r,qu(),e,h,void 0,void 0,void 0,void 0)}
139
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function _A(e,t,i){e.addQueueMeasurement(Ep,i);const o=xu(EA,Op,t,e,i)(e,t,i);return{verifier:o,challenge:await Fu(OA,Cp,t,e,i)(o,e,t,i)}}function EA(e,t,i){try{const o=new Uint8Array(32);xu(gg,Rp,t,e,i)(o);return eg(o)}catch(e){throw Km(Kh)}}async function OA(e,t,i,o){t.addQueueMeasurement(Cp,o);try{const r=await Fu(fg,Np,i,t,o)(e,t,o);return eg(new Uint8Array(r))}catch(e){throw Km(Kh)}}
140
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class CA{constructor(e,t,i,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(fp),this.platformAuthType=af}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:df,request:e},i={channel:Jm,extensionId:this.extensionId,responseId:Ag(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);const o=await new Promise((e,t)=>{this.resolvers.set(i.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(o)}static async createProvider(e,t,i){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const o=new CA(e,t,i,Xm);return await o.sendHandshakeRequest(),o}catch(o){const r=new CA(e,t,i);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Jm,extensionId:this.extensionId,responseId:Ag(),body:{method:sf}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,i)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(Km(Lm)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Jm&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===sf){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(Km(Sm))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,i=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===cf){if(!i)return;const e=t.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)i.reject(cA(e.code,e.description,e.ext));else{if(!e.result)throw tl(Zs,"Event does not contain result.");e.result.code&&e.result.description?i.reject(cA(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===lf){if(!o)return void this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),i?i.reject(t):o&&o.reject(t)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw tl(Zs,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Xm?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
141
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class NA{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=nf}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(tf);if(o?.includes(rf))return e.trace("Platform auth api available in DOM"),new NA(e,t,i)}}getExtensionId(){return tf}getExtensionVersion(){return""}getExtensionName(){return of}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),i=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}}initializePlatformDOMRequest(e){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");const{accountId:t,clientId:i,authority:o,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...p}=e,u=this.getDOMExtraParams(p);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...u},isSecurityTokenService:!1,redirectUri:n,scope:r,state:s,storeInCache:l,embeddedClientId:d}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(e);if(e.hasOwnProperty("error")){const t=e;if(!1===t.isSuccess&&t.error&&t.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),cA(t.error.code,t.error.description,{error:parseInt(t.error.errorCode),protocol_error:t.error.protocolError,status:t.error.status,properties:t.error.properties})}}throw tl(Zs,"Response missing expected properties.")}convertToPlatformBrokerResponse(e){this.logger.trace(this.platformAuthType+" - convertToNativeResponse called");return{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expiresIn,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e){return{...Object.entries(e).reduce((e,[t,i])=>(e[t]=String(i),e),{})}}}
142
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function RA(e,t,i,o){e.trace("getPlatformAuthProvider called",i);const r=function(){let e;try{return e=window[uf],"true"===e?.getItem(Xg)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await NA.createProvider(e,t,i)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await CA.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function bA(e,t,i,o){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!i)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(o)switch(o){case Ss.BEARER:case Ss.POP:return t.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return t.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}
143
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class wA extends iA{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let i;try{if(i={popupName:this.generatePopupName(e.scopes||Ka,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,i,t);{const o={...e,httpMethod:tA(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(o,i,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),i={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},o=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(t,i,o,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,i){this.logger.verbose("acquireTokenPopupAsync called");const o=await Fu(this.initializeAuthorizationRequest.bind(this),qc,this.logger,this.performanceClient,this.correlationId)(e,Df.Popup);t.popup&&Gg(o.authority);const r=bA(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===ec?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,i)}async executeCodeFlow(e,t,i){const o=e.correlationId,r=this.initializeServerTelemetryManager(bf),n=i||await Fu(_A,Ep,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:n.challenge};try{const i=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Ya)return await this.executeCodeFlowWithPost(a,t,i,n.verifier);{const r=await Fu(mA,Wc,this.logger,this.performanceClient,o)(this.config,i.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(GT,Df.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=xu(oA,tp,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await Fu(yA,zc,this.logger,this.performanceClient,o)(e,d,n.verifier,bf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof el&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const i=e.correlationId,o=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,i)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await Fu(Ig,Mp,this.logger,this.performanceClient,i)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await fA(a.document,this.config,o,n,this.logger,this.performanceClient)).submit();const s=await Fu(this.monitorPopupForHash.bind(this),kc,this.logger,this.performanceClient,i)(a,t.popupWindowParent),l=xu(oA,tp,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Fu(IA,Kc,this.logger,this.performanceClient,i)(n,l,bf,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,i,o){const r=e.correlationId,n=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,r)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=t.popup||this.openPopup("about:blank",t);(await gA(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await Fu(this.monitorPopupForHash.bind(this),kc,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=xu(oA,tp,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return Fu(yA,zc,this.logger,this.performanceClient,r)(e,l,o,bf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,i,o){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(HT,Df.Popup,e);const r=this.initializeServerTelemetryManager(Mf);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===Xd){if(this.eventHandler.emitEvent(YT,Df.Popup,e),o){const e={apiId:Mf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=Bd.getAbsoluteUrl(o,Ug());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(YT,Df.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(GT,Df.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:Mf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=Bd.getAbsoluteUrl(o,Ug());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof el&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(KT,Df.Popup,null,e),this.eventHandler.emitEvent(VT,Df.Popup),e}this.eventHandler.emitEvent(VT,Df.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Km($h)}monitorPopupForHash(e,t){return new Promise((t,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),void i(Km(rm));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(o);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===us?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(n)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let i;if(t.popup?(i=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),i.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),i=this.openSizedPopup(e,t)),!i)throw Km(om);return i.focus&&i.focus(),this.currentWindow=i,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(e){throw this.logger.error("error opening popup "+e.message),Km(im)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:i,popupWindowParent:o}){const r=o.screenLeft?o.screenLeft:o.screenX,n=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=i.popupSize?.width,d=i.popupSize?.height,c=i.popupPosition?.top,p=i.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=zm),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=Qm),(!c||c<0||c>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),c=Math.max(0,s/2-Qm/2+n)),(!p||p<0||p>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,a/2-zm/2+r)),o.open(e,t,`width=${l}, height=${d}, top=${c}, left=${p}, scrollbars=yes`)}unloadWindow(e){this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(e,t){return`${$m}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${$m}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
144
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class PA extends iA{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await Fu(this.initializeAuthorizationRequest.bind(this),qc,this.logger,this.performanceClient,this.correlationId)(e,Df.Redirect);t.platformBroker=bA(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const i=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(zT,Df.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(Af,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===ec?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof el&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(Rf),r=await Fu(_A,Ep,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===Ya)return await this.executeCodeFlowWithPost(n);{const i=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await Fu(mA,Wc,this.logger,this.performanceClient,e.correlationId)(this.config,i.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof el&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await Fu(Ig,Mp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await fA(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Km(Wm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await gA(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Km(Wm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(Pf);try{const[n,a]=this.getRedirectResponse(e||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Af,!0)||Ua.EMPTY_STRING,l=Fd(s);if(l===Fd(window.location.href)&&this.config.auth.navigateToLoginRequestUrl){this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(s);return await this.handleResponse(n,t,i,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,i,r);if(!kg()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(yf,a,!0);const e={apiId:Pf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let o=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),o=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new Bd(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Af,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),o=await this.navigationClient.navigateInternal(t,e)}if(!o)return await this.handleResponse(n,t,i,r)}return null}catch(e){throw e instanceof el&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===us?window.location.search:window.location.hash);let i=Ud(t);if(i){try{rA(i,this.browserCrypto,Df.Redirect)}catch(e){return e instanceof el&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return Dg(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(yf,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(yf)),o&&(i=Ud(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}async handleResponse(e,t,i,o){if(!e.state)throw Km(Zh);if(e.ear_jwe){const i=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return Fu(IA,Kc,this.logger,this.performanceClient,t.correlationId)(t,e,Rf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return Fu(yA,zc,this.logger,this.performanceClient,t.correlationId)(t,e,i,Rf,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const i={apiId:Rf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=t||this.config.auth.onRedirectNavigate;if("function"==typeof o){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==o(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,i)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")}return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await this.navigationClient.navigateExternal(e,i)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Km($h)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(Sf);try{this.eventHandler.emitEvent(HT,Df.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:Sf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===Xd)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(YT,Df.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(YT,Df.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Tf),void await this.navigationClient.navigateExternal(n,o);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Tf),void await this.navigationClient.navigateExternal(n,o);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof el&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(KT,Df.Redirect,null,e),this.eventHandler.emitEvent(VT,Df.Redirect),e}this.eventHandler.emitEvent(VT,Df.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return Bd.getAbsoluteUrl(t,Ug())}}
145
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function vA(e,t,i,o,r){if(t.addQueueMeasurement(Dc,o),!e)throw i.info("Navigate url is empty"),Km($h);return r?Fu(DA,Uc,i,t,o)(e,r,t,o):xu(kA,xc,i,t,o)(e)}async function LA(e,t,i,o,r){const n=UA();if(!n.contentDocument)throw"No document associated with iframe!";return(await gA(n.contentDocument,e,t,i,o,r)).submit(),n}async function SA(e,t,i,o,r){const n=UA();if(!n.contentDocument)throw"No document associated with iframe!";return(await fA(n.contentDocument,e,t,i,o,r)).submit(),n}async function MA(e,t,i,o,r,n,a){return o.addQueueMeasurement(kc,n),new Promise((o,n)=>{t<zg&&r.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const s=window.setTimeout(()=>{window.clearInterval(l),n(Km(am))},t),l=window.setInterval(()=>{let t="";const i=e.contentWindow;try{t=i?i.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";i&&(r=a===us?i.location.search:i.location.hash),window.clearTimeout(s),window.clearInterval(l),o(r)},i)}).finally(()=>{xu(xA,gp,r,o,n)(e)})}function DA(e,t,i,o){return i.addQueueMeasurement(Uc,o),new Promise((i,o)=>{const r=UA();window.setTimeout(()=>{r?(r.src=e,i(r)):o("Unable to load iframe")},t)})}function kA(e){const t=UA();return t.src=e,t}function UA(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function xA(e){document.body===e.parentNode&&document.body.removeChild(e)}
146
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class FA extends iA{constructor(e,t,i,o,r,n,a,s,l,d,c){super(e,t,i,o,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(pc,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==ls&&t.prompt!==ds&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${ls}`),t.prompt=ls):t.prompt=ls;const i=await Fu(this.initializeAuthorizationRequest.bind(this),qc,this.logger,this.performanceClient,e.correlationId)(t,Df.Silent);return i.platformBroker=bA(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),Gg(i.authority),this.config.auth.protocolMode===ec?this.executeEarFlow(i):this.executeCodeFlow(i)}async executeCodeFlow(e){let t;const i=this.initializeServerTelemetryManager(this.apiId);try{return t=await Fu(this.createAuthCodeClient.bind(this),Fc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await Fu(this.silentTokenHelper.bind(this),Mc,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof el&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!(t&&o instanceof el&&o.errorCode===Vm))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await Fu(this.silentTokenHelper.bind(this),Mc,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,i=await Fu(this.getDiscoveredAuthority.bind(this),fc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await Fu(Ig,Mp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o},n=await Fu(SA,Dc,this.logger,this.performanceClient,t)(this.config,i,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await Fu(MA,kc,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=xu(oA,tp,this.logger,this.performanceClient,t)(s,a,this.logger);return Fu(IA,Kc,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(Km(pm))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(Mc,i);const o=await Fu(_A,Ep,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r={...t,codeChallenge:o.challenge};let n;if(t.httpMethod===Ya)n=await Fu(LA,Dc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await Fu(mA,Wc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);n=await Fu(vA,Dc,this.logger,this.performanceClient,i)(t,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await Fu(MA,kc,this.logger,this.performanceClient,i)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,a),l=xu(oA,tp,this.logger,this.performanceClient,i)(s,a,this.logger);return Fu(yA,zc,this.logger,this.performanceClient,i)(t,l,o.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}
147
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class BA extends iA{async acquireToken(e){this.performanceClient.addQueueMeasurement(hc,e.correlationId);const t=await Fu(XT,Pc,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),i={...e,...t};e.redirectUri&&(i.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(Lf),r=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return Fu(r.acquireTokenByRefreshToken.bind(r),Oc,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return Promise.reject(Km(pm))}async createRefreshTokenClient(e){const t=await Fu(this.getClientConfiguration.bind(this),Bc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Lh(t,this.performanceClient)}}
148
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class qA{constructor(e,t,i,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=i,this.cryptoObj=o}async loadExternalTokens(e,t,i){if(!this.isBrowserEnvironment)throw Km(Am);const o=e.correlationId||Ag(),r=t.id_token?Sd(t.id_token,og):void 0,n={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new th(th.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Ag()):void 0,s=await this.loadAccount(e,i.clientInfo||t.client_info||"",o,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,o),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,i,o),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,o);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,i,o,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=ph.createFromAccountInfo(e.account);return await this.storage.setAccount(t,i),t}if(!r||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Km(Cm);const n=ph.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,o),a=o?.tid,s=wh(this.storage,r,n,og,i,o,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,i),s}async loadIdToken(e,t,i,o,r){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const n=Ku(t,i,e.id_token,this.config.auth.clientId,o);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,i,o,r,n,a){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const s=t.scope?wd.fromString(t.scope):new wd(e.scopes),l=n.expiresOn||t.expires_in+qu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+qu(),c=Vu(i,o,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,og);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,i,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const r=zu(t,i,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,o),r}generateAuthenticationResult(e,t,i,o){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=wd.fromString(t.accessToken.target).asArray(),s=Gu(t.accessToken.expiresOn),r=Gu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:i||{},accessToken:n,fromCache:!0,expiresOn:s,correlationId:e.correlationId||"",requestId:"",extExpiresOn:r,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}
149
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class WA extends vh{constructor(e){super(e),this.includeRedirectUri=!1}}
150
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class GA extends iA{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw Km(Rm);const t=await Fu(this.initializeAuthorizationRequest.bind(this),qc,this.logger,this.performanceClient,e.correlationId)(e,Df.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},r=await Fu(this.getClientConfiguration.bind(this),Bc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new WA(r);this.logger.verbose("Auth code client created");const a=new nA(n,this.browserStorage,o,this.logger,this.performanceClient);return await Fu(a.handleCodeResponseFromServer.bind(a),Hc,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof el&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Km(pm))}}
133
+ function ny(e,t,i){const o=Fd(e);if(!o)throw xd(e)?(i.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),i.errorPii(`The ${t} detected is: ${e}`),zm(em)):(i.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),zm(Jh));return o}function ay(e,t,i){if(!e.state)throw zm(Xh);const o=function(e,t){if(!t)return null;try{return Nh.parseRequestState(e,t).libraryState.meta}catch(e){throw jl(ul)}}(t,e.state);if(!o)throw zm(tm);if(o.interactionType!==i)throw zm(im)}
134
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class sy{constructor(e,t,i,o,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}async handleCodeResponse(e,t){let i;this.performanceClient.addQueueMeasurement(Vc,t.correlationId);try{i=function(e,t){if(Fh(e,t),!e.code)throw jl(Bl);return e}(e,t.state)}catch(e){throw e instanceof ah&&e.subError===am?zm(am):e}return qu(this.handleCodeResponseFromServer.bind(this),Kc,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(Kc,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await qu(this.authModule.updateAuthority.bind(this.authModule),jc,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),i&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await qu(this.authModule.acquireToken.bind(this.authModule),Zc,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:$p}:e.loginHint?{credential:e.loginHint,type:jp}:null}}
135
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const ly="user_switch",dy={[ly]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class cy extends il{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,cy.prototype),this.name="NativeAuthError",this.ext=i}}function py(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function uy(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return Ch(fh);case"USER_INTERACTION_REQUIRED":return new Eh(e,t);case"USER_CANCEL":return zm(am);case"NO_NETWORK":return zm(Em);case"UX_NOT_ALLOWED":return Ch(Th)}return new cy(e,dy[e]||t,i)}
136
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class hy extends ry{async acquireToken(e){this.performanceClient.addQueueMeasurement(uc,e.correlationId);const t=this.initializeServerTelemetryManager(Mf),i=await qu(this.getClientConfiguration.bind(this),Wc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new Dh(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await qu(o.acquireCachedToken.bind(o),wc,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Vm&&e.errorCode===bm&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t.correlationId,t?.account)}}
137
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class my extends ey{constructor(e,t,i,o,r,n,a,s,l,d,c,p){super(e,t,i,o,r,n,s,l,p),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new hy(e,this.nativeStorageManager,i,o,r,n,s,l,p);const u=this.platformAuthProvider.getExtensionName();this.skus=qh.makeExtraSkuString({libraryName:Xm,libraryVersion:jg,extensionName:u,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[ru]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(yc,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(yc,this.correlationId),o=Gu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===$f)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(n);return await this.handleNativeResponse(a,n,o).then(e=>(i.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw i.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof cy&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:vd.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),jl(Ll);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw jl(Ll);try{const e=this.createSilentCacheRequest(t,i),o=await this.silentCacheClient.acquireToken(e),r={...i,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const o=await this.initializeNativeRequest(i);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof cy){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),py(e))throw e}}this.browserStorage.setTemporaryCache(Nf,JSON.stringify(o),!0);const r={apiId:wf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(n,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...r}=i;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Nf));const n=Gu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),i=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),i}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=Dd(e.id_token,ng),r=this.createHomeAccountIdentifier(e,o),n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==n&&e.account.id!==t.accountId)throw uy(ly);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=vh(this.browserStorage,a,r,ng,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,i);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,o,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return hh.generateHomeAccountId(e.client_info||Fa.EMPTY_STRING,ku,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?vd.fromString(t):vd.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===Ds.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new bh(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw jl(Gl);return i.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,i,o,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||i.oid||i.sub||Fa.EMPTY_STRING,c=l.TenantId||i.tid||Fa.EMPTY_STRING,p=Md(o.getAccountInfo(),void 0,i,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const u=await this.generatePopAccessToken(e,t),h=t.tokenType===Ds.POP?Ds.POP:Ds.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:p,idToken:e.id_token,idTokenClaims:i,accessToken:u,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:Yu(n+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,i,o,r,n,a){const s=zu(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===Ds.POP?Fa.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),d=this.generateScopes(e.scope,t.scope),c={idToken:s,accessToken:Qu(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,ng,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===Ds.POP?Fa.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:i,...o}=e,r=new vd(i||[]);r.appendScopes(za);const n={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(n.signPopToken&&e.popKid)throw zm(Bm);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=of,e.authenticationScheme===Ds.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new bh(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await qu(i.generateCnf.bind(i),ep,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=o}return this.addRequestSKUs(n),n}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new Wd(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case vf:case Mf:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),cs}if(e)switch(e){case cs:case ds:case ss:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),zm(xm)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(nu)&&e.extraParameters.hasOwnProperty(au)&&e.extraParameters.hasOwnProperty(Xp);if(!e.embeddedClientId&&!t)return;let i="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,i=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[au],i=e.extraParameters[Xp]),e.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}}
138
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function fy(e,t,i,o,r){const n=Uh({...e.auth,authority:t},i,o,r);if(Au(n,{sku:Xm,version:jg,os:"",cpu:""}),e.auth.protocolMode!==tc&&Iu(n,e.telemetry.application),i.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},i.correlationId),i.authenticationScheme===Ds.POP)){const e=new uT(o,r),t=new bh(e);let a;if(i.popKid)a=e.encodeKid(i.popKid);else{a=(await qu(t.generateCnf.bind(t),ep,o,r,i.correlationId)(i,o)).reqCnfString}vu(n,a)}return lu(n,i.correlationId,r),n}async function gy(e,t,i,o,r){if(!i.codeChallenge)throw wd(hd);const n=await qu(fy,Yc,o,r,i.correlationId)(e,t,i,o,r);return du(n,us),Eu(n,i.codeChallenge,Fa.S256_CODE_CHALLENGE_METHOD),Pu(n,i.extraQueryParameters||{}),xh(t,n,e.auth.encodeExtraQueryParams,i.extraQueryParameters)}async function Ty(e,t,i,o,r,n){if(!o.earJwk)throw zm(Qh);const a=await fy(t,i,o,r,n);du(a,hs),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;Pu(s,o.extraQueryParameters||{});return Ay(e,xh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function yy(e,t,i,o,r,n){const a=await fy(t,i,o,r,n);du(a,us),Eu(a,o.codeChallenge,o.codeChallengeMethod||Fa.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,i])=>{i&&e.set(t,i)})}(a,o.authorizePostBodyParameters||{});const s=new Map;Pu(s,o.extraQueryParameters||{});return Ay(e,xh(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function Ay(e,t,i){const o=e.createElement("form");return o.method="post",o.action=t,i.forEach((t,i)=>{const r=e.createElement("input");r.hidden=!0,r.name=i,r.value=t,o.appendChild(r)}),e.body.appendChild(o),o}async function Iy(e,t,i,o,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw zm(km);const c=new uT(s,l),p=new my(o,r,c,s,a,o.system.navigationClient,i,l,d,t,n,e.correlationId),{userRequestState:u}=Nh.parseRequestState(c,e.state);return qu(p.acquireToken.bind(p),yc,s,l,e.correlationId)({...e,state:u,prompt:void 0})}async function _y(e,t,i,o,r,n,a,s,l,d,c,p){if(lh.removeThrottle(a,r.auth.clientId,e),t.accountId)return qu(Iy,Qc,d,c,e.correlationId)(e,t.accountId,o,r,a,s,l,d,c,p);const u={...e,code:t.code||"",codeVerifier:i},h=new sy(n,a,u,d,c);return await qu(h.handleCodeResponse.bind(h),Vc,d,c,e.correlationId)(t,e)}async function Ey(e,t,i,o,r,n,a,s,l,d,c){if(lh.removeThrottle(n,o.auth.clientId,e),Fh(t,e.state),!t.ear_jwe)throw zm($h);if(!e.earJwk)throw zm(Qh);const p=JSON.parse(await qu(Og,Up,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(p.accountId)return qu(Iy,Qc,l,d,e.correlationId)(e,p.accountId,i,o,n,a,s,l,d,c);const u=new Ph(o.auth.clientId,n,new uT(l,d),l,null,null,d);u.validateTokenResponse(p);const h={code:"",state:e.state,nonce:e.nonce,client_info:p.client_info,cloud_graph_host_name:p.cloud_graph_host_name,cloud_instance_host_name:p.cloud_instance_host_name,cloud_instance_name:p.cloud_instance_name,msgraph_host:p.msgraph_host};return await qu(u.handleServerTokenResponse.bind(u),ip,l,d,e.correlationId)(p,r,Gu(),e,h,void 0,void 0,void 0,void 0)}
139
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function Oy(e,t,i){e.addQueueMeasurement(Cp,i);const o=Bu(Cy,Np,t,e,i)(e,t,i);return{verifier:o,challenge:await qu(Ny,Rp,t,e,i)(o,e,t,i)}}function Cy(e,t,i){try{const o=new Uint8Array(32);Bu(yg,wp,t,e,i)(o);return ig(o)}catch(e){throw zm(zh)}}async function Ny(e,t,i,o){t.addQueueMeasurement(Rp,o);try{const r=await qu(Tg,bp,i,t,o)(e,t,o);return ig(new Uint8Array(r))}catch(e){throw zm(zh)}}
140
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Ry{constructor(e,t,i,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(Tp),this.platformAuthType=lf}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:pf,request:e},i={channel:ef,extensionId:this.extensionId,responseId:Ig(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);const o=await new Promise((e,t)=>{this.resolvers.set(i.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(o)}static async createProvider(e,t,i){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const o=new Ry(e,t,i,tf);return await o.sendHandshakeRequest(),o}catch(o){const r=new Ry(e,t,i);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ef,extensionId:this.extensionId,responseId:Ig(),body:{method:df}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,i)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(zm(Mm)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===ef&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===df){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(zm(Dm))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,i=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===uf){if(!i)return;const e=t.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)i.reject(uy(e.code,e.description,e.ext));else{if(!e.result)throw ol(Xs,"Event does not contain result.");e.result.code&&e.result.description?i.reject(uy(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===cf){if(!o)return void this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),i?i.reject(t):o&&o.reject(t)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ol(Xs,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===tf?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
141
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class by{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=sf}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(rf);if(o?.includes(af))return e.trace("Platform auth api available in DOM"),new by(e,t,i)}}getExtensionId(){return rf}getExtensionVersion(){return""}getExtensionName(){return nf}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),i=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}}initializePlatformDOMRequest(e){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");const{accountId:t,clientId:i,authority:o,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...p}=e,u=this.getDOMExtraParams(p);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...u},isSecurityTokenService:!1,redirectUri:n,scope:r,state:s,storeInCache:l,embeddedClientId:d}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(e);if(e.hasOwnProperty("error")){const t=e;if(!1===t.isSuccess&&t.error&&t.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),uy(t.error.code,t.error.description,{error:parseInt(t.error.errorCode),protocol_error:t.error.protocolError,status:t.error.status,properties:t.error.properties})}}throw ol(Xs,"Response missing expected properties.")}convertToPlatformBrokerResponse(e){this.logger.trace(this.platformAuthType+" - convertToNativeResponse called");return{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expiresIn,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e){return{...Object.entries(e).reduce((e,[t,i])=>(e[t]=String(i),e),{})}}}
142
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function wy(e,t,i,o){e.trace("getPlatformAuthProvider called",i);const r=function(){let e;try{return e=window[mf],"true"===e?.getItem(tT)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await by.createProvider(e,t,i)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await Ry.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function Py(e,t,i,o){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!i)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(o)switch(o){case Ds.BEARER:case Ds.POP:return t.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return t.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}
143
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class vy extends ry{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let i;try{if(i={popupName:this.generatePopupName(e.scopes||za,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,i,t);{const o={...e,httpMethod:oy(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(o,i,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),i={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},o=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(t,i,o,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,i){this.logger.verbose("acquireTokenPopupAsync called");const o=await qu(this.initializeAuthorizationRequest.bind(this),Gc,this.logger,this.performanceClient,this.correlationId)(e,Uf.Popup);t.popup&&Yg(o.authority);const r=Py(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===ic?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,i)}async executeCodeFlow(e,t,i){const o=e.correlationId,r=this.initializeServerTelemetryManager(Pf),n=i||await qu(Oy,Cp,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:n.challenge};try{const i=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Va)return await this.executeCodeFlowWithPost(a,t,i,n.verifier);{const r=await qu(gy,Hc,this.logger,this.performanceClient,o)(this.config,i.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(YT,Uf.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=Bu(ny,op,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await qu(_y,$c,this.logger,this.performanceClient,o)(e,d,n.verifier,Pf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof il&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const i=e.correlationId,o=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,i)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await qu(Eg,kp,this.logger,this.performanceClient,i)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await Ty(a.document,this.config,o,n,this.logger,this.performanceClient)).submit();const s=await qu(this.monitorPopupForHash.bind(this),xc,this.logger,this.performanceClient,i)(a,t.popupWindowParent),l=Bu(ny,op,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return qu(Ey,zc,this.logger,this.performanceClient,i)(n,l,Pf,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,i,o){const r=e.correlationId,n=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,r)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=t.popup||this.openPopup("about:blank",t);(await yy(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await qu(this.monitorPopupForHash.bind(this),xc,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=Bu(ny,op,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return qu(_y,$c,this.logger,this.performanceClient,r)(e,l,o,Pf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,i,o){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(KT,Uf.Popup,e);const r=this.initializeServerTelemetryManager(kf);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===tc){if(this.eventHandler.emitEvent(VT,Uf.Popup,e),o){const e={apiId:kf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=Wd.getAbsoluteUrl(o,Fg());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(VT,Uf.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(YT,Uf.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:kf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=Wd.getAbsoluteUrl(o,Fg());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof il&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(zT,Uf.Popup,null,e),this.eventHandler.emitEvent(QT,Uf.Popup),e}this.eventHandler.emitEvent(QT,Uf.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),zm(Zh)}monitorPopupForHash(e,t){return new Promise((t,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),void i(zm(am));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(o);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===ms?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(n)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let i;if(t.popup?(i=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),i.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),i=this.openSizedPopup(e,t)),!i)throw zm(nm);return i.focus&&i.focus(),this.currentWindow=i,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(e){throw this.logger.error("error opening popup "+e.message),zm(rm)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:i,popupWindowParent:o}){const r=o.screenLeft?o.screenLeft:o.screenX,n=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=i.popupSize?.width,d=i.popupSize?.height,c=i.popupPosition?.top,p=i.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=$m),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=jm),(!c||c<0||c>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),c=Math.max(0,s/2-jm/2+n)),(!p||p<0||p>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,a/2-$m/2+r)),o.open(e,t,`width=${l}, height=${d}, top=${c}, left=${p}, scrollbars=yes`)}unloadWindow(e){this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(e,t){return`${Zm}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Zm}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
144
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Ly extends ry{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await qu(this.initializeAuthorizationRequest.bind(this),Gc,this.logger,this.performanceClient,this.correlationId)(e,Uf.Redirect);t.platformBroker=Py(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const i=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent($T,Uf.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(If,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===ic?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof il&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(wf),r=await qu(Oy,Cp,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===Va)return await this.executeCodeFlowWithPost(n);{const i=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await qu(gy,Hc,this.logger,this.performanceClient,e.correlationId)(this.config,i.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof il&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await qu(Eg,kp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await Ty(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(zm(Hm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await yy(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(zm(Hm,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(Lf);try{const[n,a]=this.getRedirectResponse(e||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(If,!0)||Fa.EMPTY_STRING,l=qd(s);if(l===qd(window.location.href)&&this.config.auth.navigateToLoginRequestUrl){this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(s);return await this.handleResponse(n,t,i,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,i,r);if(!xg()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(_f,a,!0);const e={apiId:Lf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let o=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),o=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new Wd(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(If,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),o=await this.navigationClient.navigateInternal(t,e)}if(!o)return await this.handleResponse(n,t,i,r)}return null}catch(e){throw e instanceof il&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===ms?window.location.search:window.location.hash);let i=Fd(t);if(i){try{ay(i,this.browserCrypto,Uf.Redirect)}catch(e){return e instanceof il&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return Ug(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(_f,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(_f)),o&&(i=Fd(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}async handleResponse(e,t,i,o){if(!e.state)throw zm(Xh);if(e.ear_jwe){const i=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return qu(Ey,zc,this.logger,this.performanceClient,t.correlationId)(t,e,wf,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return qu(_y,$c,this.logger,this.performanceClient,t.correlationId)(t,e,i,wf,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const i={apiId:wf,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=t||this.config.auth.onRedirectNavigate;if("function"==typeof o){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==o(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,i)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")}return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await this.navigationClient.navigateExternal(e,i)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),zm(Zh)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(Df);try{this.eventHandler.emitEvent(KT,Uf.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:Df,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===tc)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(VT,Uf.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(VT,Uf.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Af),void await this.navigationClient.navigateExternal(n,o);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Af),void await this.navigationClient.navigateExternal(n,o);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof il&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(zT,Uf.Redirect,null,e),this.eventHandler.emitEvent(QT,Uf.Redirect),e}this.eventHandler.emitEvent(QT,Uf.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return Wd.getAbsoluteUrl(t,Fg())}}
145
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function Sy(e,t,i,o,r){if(t.addQueueMeasurement(Uc,o),!e)throw i.info("Navigate url is empty"),zm(Zh);return r?qu(Uy,Fc,i,t,o)(e,r,t,o):Bu(xy,Bc,i,t,o)(e)}async function My(e,t,i,o,r){const n=Fy();if(!n.contentDocument)throw"No document associated with iframe!";return(await yy(n.contentDocument,e,t,i,o,r)).submit(),n}async function Dy(e,t,i,o,r){const n=Fy();if(!n.contentDocument)throw"No document associated with iframe!";return(await Ty(n.contentDocument,e,t,i,o,r)).submit(),n}async function ky(e,t,i,o,r,n,a){return o.addQueueMeasurement(xc,n),new Promise((o,n)=>{t<$g&&r.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const s=window.setTimeout(()=>{window.clearInterval(l),n(zm(lm))},t),l=window.setInterval(()=>{let t="";const i=e.contentWindow;try{t=i?i.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";i&&(r=a===ms?i.location.search:i.location.hash),window.clearTimeout(s),window.clearInterval(l),o(r)},i)}).finally(()=>{Bu(By,yp,r,o,n)(e)})}function Uy(e,t,i,o){return i.addQueueMeasurement(Fc,o),new Promise((i,o)=>{const r=Fy();window.setTimeout(()=>{r?(r.src=e,i(r)):o("Unable to load iframe")},t)})}function xy(e){const t=Fy();return t.src=e,t}function Fy(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function By(e){document.body===e.parentNode&&document.body.removeChild(e)}
146
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class qy extends ry{constructor(e,t,i,o,r,n,a,s,l,d,c){super(e,t,i,o,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(hc,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==cs&&t.prompt!==ps&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${cs}`),t.prompt=cs):t.prompt=cs;const i=await qu(this.initializeAuthorizationRequest.bind(this),Gc,this.logger,this.performanceClient,e.correlationId)(t,Uf.Silent);return i.platformBroker=Py(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),Yg(i.authority),this.config.auth.protocolMode===ic?this.executeEarFlow(i):this.executeCodeFlow(i)}async executeCodeFlow(e){let t;const i=this.initializeServerTelemetryManager(this.apiId);try{return t=await qu(this.createAuthCodeClient.bind(this),qc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await qu(this.silentTokenHelper.bind(this),kc,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof il&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!(t&&o instanceof il&&o.errorCode===Qm))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await qu(this.silentTokenHelper.bind(this),kc,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,i=await qu(this.getDiscoveredAuthority.bind(this),Tc,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await qu(Eg,kp,this.logger,this.performanceClient,t)(),r={...e,earJwk:o},n=await qu(Dy,Uc,this.logger,this.performanceClient,t)(this.config,i,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await qu(ky,xc,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=Bu(ny,op,this.logger,this.performanceClient,t)(s,a,this.logger);return qu(Ey,zc,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(zm(hm))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(kc,i);const o=await qu(Oy,Cp,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r={...t,codeChallenge:o.challenge};let n;if(t.httpMethod===Va)n=await qu(My,Uc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await qu(gy,Hc,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);n=await qu(Sy,Uc,this.logger,this.performanceClient,i)(t,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await qu(ky,xc,this.logger,this.performanceClient,i)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,a),l=Bu(ny,op,this.logger,this.performanceClient,i)(s,a,this.logger);return qu(_y,$c,this.logger,this.performanceClient,i)(t,l,o.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}
147
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Wy extends ry{async acquireToken(e){this.performanceClient.addQueueMeasurement(fc,e.correlationId);const t=await qu(ty,Lc,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),i={...e,...t};e.redirectUri&&(i.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(Mf),r=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return qu(r.acquireTokenByRefreshToken.bind(r),Nc,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return Promise.reject(zm(hm))}async createRefreshTokenClient(e){const t=await qu(this.getClientConfiguration.bind(this),Wc,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Mh(t,this.performanceClient)}}
148
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Gy{constructor(e,t,i,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=i,this.cryptoObj=o}async loadExternalTokens(e,t,i){if(!this.isBrowserEnvironment)throw zm(Im);const o=e.correlationId||Ig(),r=t.id_token?Dd(t.id_token,ng):void 0,n={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new oh(oh.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Ig()):void 0,s=await this.loadAccount(e,i.clientInfo||t.client_info||"",o,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,o),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,i,o),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,o);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,i,o,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=hh.createFromAccountInfo(e.account);return await this.storage.setAccount(t,i),t}if(!r||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),zm(Rm);const n=hh.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,o),a=o?.tid,s=vh(this.storage,r,n,ng,i,o,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,i),s}async loadIdToken(e,t,i,o,r){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const n=zu(t,i,e.id_token,this.config.auth.clientId,o);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,i,o,r,n,a){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const s=t.scope?vd.fromString(t.scope):new vd(e.scopes),l=n.expiresOn||t.expires_in+Gu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+Gu(),c=Qu(i,o,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,ng);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,i,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const r=$u(t,i,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,o),r}generateAuthenticationResult(e,t,i,o){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=vd.fromString(t.accessToken.target).asArray(),s=Yu(t.accessToken.expiresOn),r=Yu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:i||{},accessToken:n,fromCache:!0,expiresOn:s,correlationId:e.correlationId||"",requestId:"",extExpiresOn:r,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}
149
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Hy extends Sh{constructor(e){super(e),this.includeRedirectUri=!1}}
150
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Yy extends ry{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw zm(wm);const t=await qu(this.initializeAuthorizationRequest.bind(this),Gc,this.logger,this.performanceClient,e.correlationId)(e,Uf.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},r=await qu(this.getClientConfiguration.bind(this),Wc,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new Hy(r);this.logger.verbose("Auth code client created");const a=new sy(n,this.browserStorage,o,this.logger,this.performanceClient);return await qu(a.handleCodeResponseFromServer.bind(a),Kc,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof il&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject(zm(hm))}}
151
151
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
152
152
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
153
- function HA(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function YA(e,t){try{qg(e)}catch(e){throw t.end({success:!1},e),e}}class KA{constructor(e){var t,i,o,r;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new cT(this.logger,this.performanceClient):$l,this.eventHandler=new ZT(this.logger),this.browserStorage=this.isBrowserEnvironment?new $T(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw Rd(ud)}return{canonicalAuthority:e.authority?ih(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth)):(t=this.config.auth.clientId,i=this.logger,o=this.performanceClient,r=this.eventHandler,new $T(t,{cacheLocation:hf,cacheRetentionDays:5,temporaryCacheLocation:hf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},$l,i,o,r));const n={cacheLocation:hf,cacheRetentionDays:5,temporaryCacheLocation:hf,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new $T(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new qA(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const i=new KA(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent(OT);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(Lc,i);if(this.eventHandler.emitEvent(ET),!t)try{this.logMultipleInstances(r)}catch{}if(await Fu(this.browserStorage.initialize.bind(this.browserStorage),Sc,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await RA(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),xu(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Tp,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent(OT),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),Bg(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Tf)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(qT,Df.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(sc,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new uA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Pf,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=Fu(e.handleRedirectPromise.bind(e),mp,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,i]=this.browserStorage.getCachedRequest(),o=t.correlationId;n=this.performanceClient.startMeasurement(sc,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=Fu(r.handleRedirectPromise.bind(r),hp,this.logger,this.performanceClient,n.event.correlationId)(e,t,i,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();i.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(wT,Df.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(LT,Df.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:HA(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(WT,Df.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(ST,Df.Redirect,null,t):this.eventHandler.emitEvent(PT,Df.Redirect,null,t),this.eventHandler.emitEvent(WT,Df.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement(ac,t);i.add({accountType:HA(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return i.add({navigateCallbackResult:!1!==t}),i.event=i.end({success:!0})||i.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return i.add({navigateCallbackResult:!1!==o}),i.event=i.end({success:!0})||i.event,o}}const r=this.getAllAccounts().length>0;try{let o;if(Wg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,gf),r?this.eventHandler.emitEvent(vT,Df.Redirect,e):this.eventHandler.emitEvent(bT,Df.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new uA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Rf,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof lA&&dA(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Ih){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw o})}else{o=this.createRedirectClient(t).acquireToken(e)}return await o}catch(e){throw this.browserStorage.resetRequestCache(),2===i.event.status?this.performanceClient.startMeasurement(sc,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(ST,Df.Redirect,null,e):this.eventHandler.emitEvent(PT,Df.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(nc,t);i.add({scenarioId:e.scenarioId,accountType:HA(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),YA(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,gf)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(vT,Df.Popup,e):this.eventHandler.emitEvent(bT,Df.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},bf).then(e=>(i.end({success:!0,accountType:HA(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof lA&&dA(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Ih){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e,n)}throw o});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(wT,Df.Popup,e):this.eventHandler.emitEvent(LT,Df.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:HA(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(ST,Df.Popup,null,e):this.eventHandler.emitEvent(PT,Df.Popup,null,e),i.end({success:!1},e),Promise.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let o;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(mc,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:HA(e.account)}),YA(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(DT,Df.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,wf).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof lA&&dA(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(i.correlationId).acquireToken(i)}throw e});else{o=this.createSilentIframeClient(i.correlationId).acquireToken(i)}return o.then(e=>(this.eventHandler.emitEvent(kT,Df.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:HA(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(UT,Df.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(tc,t);YA(this.initialized,i),this.eventHandler.emitEvent(xT,Df.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Km(wm);if(e.code){const o=e.code;let r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(FT,Df.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:HA(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(BT,Df.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},vf,e.nativeAccountId).catch(e=>{throw e instanceof lA&&dA(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:HA(o.account),success:!0}),o}throw Km(vm)}throw Km(bm)}catch(e){throw this.eventHandler.emitEvent(BT,Df.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(up,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Nc,e.correlationId),t){case Vf:case zf:case Qf:const t=this.createSilentCacheClient(e.correlationId);return Fu(t.acquireToken.bind(t),cc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Ql(Dl)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(ic,e.correlationId),t){case Vf:case Qf:case $f:case jf:const t=this.createSilentRefreshClient(e.correlationId);return Fu(t.acquireToken.bind(t),hc,this.logger,this.performanceClient,e.correlationId)(e);default:throw Ql(Dl)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(wc,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return Fu(t.acquireToken.bind(t),pc,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);Wg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Tf);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);qg(this.initialized),this.browserStorage.setInteractionInProgress(!0,Tf);return this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();
153
+ function Ky(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function Vy(e,t){try{Gg(e)}catch(e){throw t.end({success:!1},e),e}}class zy{constructor(e){var t,i,o,r;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new uT(this.logger,this.performanceClient):Zl,this.eventHandler=new XT(this.logger),this.browserStorage=this.isBrowserEnvironment?new ZT(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw wd(md)}return{canonicalAuthority:e.authority?rh(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth)):(t=this.config.auth.clientId,i=this.logger,o=this.performanceClient,r=this.eventHandler,new ZT(t,{cacheLocation:ff,cacheRetentionDays:5,temporaryCacheLocation:ff,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},Zl,i,o,r));const n={cacheLocation:ff,cacheRetentionDays:5,temporaryCacheLocation:ff,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new ZT(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new Gy(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const i=new zy(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent(NT);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(Mc,i);if(this.eventHandler.emitEvent(CT),!t)try{this.logMultipleInstances(r)}catch{}if(await qu(this.browserStorage.initialize.bind(this.browserStorage),Dc,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await wy(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),Bu(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Ap,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent(NT),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),Wg(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Af)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(GT,Uf.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(dc,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new my(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Lf,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=qu(e.handleRedirectPromise.bind(e),gp,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,i]=this.browserStorage.getCachedRequest(),o=t.correlationId;n=this.performanceClient.startMeasurement(dc,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=qu(r.handleRedirectPromise.bind(r),fp,this.logger,this.performanceClient,n.event.correlationId)(e,t,i,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();i.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(vT,Uf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(MT,Uf.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:Ky(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(HT,Uf.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(DT,Uf.Redirect,null,t):this.eventHandler.emitEvent(LT,Uf.Redirect,null,t),this.eventHandler.emitEvent(HT,Uf.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement(lc,t);i.add({accountType:Ky(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return i.add({navigateCallbackResult:!1!==t}),i.event=i.end({success:!0})||i.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return i.add({navigateCallbackResult:!1!==o}),i.event=i.end({success:!0})||i.event,o}}const r=this.getAllAccounts().length>0;try{let o;if(Hg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,yf),r?this.eventHandler.emitEvent(ST,Uf.Redirect,e):this.eventHandler.emitEvent(PT,Uf.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new my(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,wf,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof cy&&py(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Eh){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw o})}else{o=this.createRedirectClient(t).acquireToken(e)}return await o}catch(e){throw this.browserStorage.resetRequestCache(),2===i.event.status?this.performanceClient.startMeasurement(dc,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(DT,Uf.Redirect,null,e):this.eventHandler.emitEvent(LT,Uf.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(sc,t);i.add({scenarioId:e.scenarioId,accountType:Ky(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Vy(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,yf)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(ST,Uf.Popup,e):this.eventHandler.emitEvent(PT,Uf.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Pf).then(e=>(i.end({success:!0,accountType:Ky(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof cy&&py(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Eh){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e,n)}throw o});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(vT,Uf.Popup,e):this.eventHandler.emitEvent(MT,Uf.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:Ky(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(DT,Uf.Popup,null,e):this.eventHandler.emitEvent(LT,Uf.Popup,null,e),i.end({success:!1},e),Promise.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let o;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(gc,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:Ky(e.account)}),Vy(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(UT,Uf.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,vf).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof cy&&py(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(i.correlationId).acquireToken(i)}throw e});else{o=this.createSilentIframeClient(i.correlationId).acquireToken(i)}return o.then(e=>(this.eventHandler.emitEvent(xT,Uf.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:Ky(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(FT,Uf.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(oc,t);Vy(this.initialized,i),this.eventHandler.emitEvent(BT,Uf.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw zm(vm);if(e.code){const o=e.code;let r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(qT,Uf.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:Ky(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(WT,Uf.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},Sf,e.nativeAccountId).catch(e=>{throw e instanceof cy&&py(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:Ky(o.account),success:!0}),o}throw zm(Sm)}throw zm(Pm)}catch(e){throw this.eventHandler.emitEvent(WT,Uf.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(mp,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(bc,e.correlationId),t){case Qf:case $f:case jf:const t=this.createSilentCacheClient(e.correlationId);return qu(t.acquireToken.bind(t),uc,this.logger,this.performanceClient,e.correlationId)(e);default:throw jl(Ul)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(rc,e.correlationId),t){case Qf:case jf:case Zf:case Jf:const t=this.createSilentRefreshClient(e.correlationId);return qu(t.acquireToken.bind(t),fc,this.logger,this.performanceClient,e.correlationId)(e);default:throw jl(Ul)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(vc,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return qu(t.acquireToken.bind(t),hc,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);Hg(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Af);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);Gg(this.initialized),this.browserStorage.setInteractionInProgress(!0,Af);return this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();
154
154
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
155
155
  return function(e,t,i,o,r){return e.verbose("getAllAccounts called"),i?t.getAllAccounts(r||{},o):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){const r=i.getAccountInfoFilteredBy(e,o);return r?(t.verbose("getAccount: Account matching provided filter found, returning"),r):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const r=i.getAccountInfoFilteredBy({username:e},o);return r?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),r):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=i.getAccountInfoFilteredBy({homeAccountId:e},o);return r?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),r):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const r=i.getAccountInfoFilteredBy({localAccountId:e},o);return r?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),r):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();!function(e,t,i){t.setActiveAccount(e,i)}(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return function(e,t){return e.getActiveAccount(t)}
156
- /*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=ph.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(i,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,i,o){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Km(Mm);return new uA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,o)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!bA(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case ls:case ss:case ns:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${e.prompt} is not compatible with platform broker flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e))||(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1)}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new wA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new PA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new FA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,wf,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new pA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new BA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new GA(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,vf,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return Fg(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===pf?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===pf?this.eventHandler.unsubscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?Ag():Ua.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Gf})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Gf})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(oc,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),YA(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Km(um);return i.add({accountType:HA(o)}),this.acquireTokenSilentDeduped(e,o,t).then(o=>(i.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),{...o,state:e.state,correlationId:t})).catch(e=>{throw e instanceof el&&e.setCorrelationId(t),i.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,i){const o=nh(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(o),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);const o=Fu(this.acquireTokenSilentAsync.bind(this),rc,this.logger,this.performanceClient,i)({...e,correlationId:i},t);return this.activeSilentTokenRequests.set(r,o),o.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),n}async acquireTokenSilentAsync(e,t){const i=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(rc,e.correlationId),this.eventHandler.emitEvent(vT,Df.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const o=await Fu(eA,vc,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Vf;return this.acquireTokenSilentNoIframe(o,r).catch(async e=>{const t=function(e,t){const i=!(e instanceof Ih&&e.subError!==gh),o=e.errorCode===Vm||e.errorCode===Dl,r=i&&o||e.errorCode===uh||e.errorCode===mh,n=Jf.includes(t);return r&&n}
157
- /*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Zf){const[t,i]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${i}`,o.correlationId);const n=this.performanceClient.startMeasurement(uc,o.correlationId);n.add({awaitIframeCorrelationId:i});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${i} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${i} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),Fu(this.acquireTokenBySilentIframe.bind(this),wc,this.logger,this.performanceClient,o.correlationId)(o)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),Fu(this.acquireTokenBySilentIframe.bind(this),wc,this.logger,this.performanceClient,o.correlationId)(o).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(LT,Df.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(ST,Df.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return bA(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,Lf,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof lA&&dA(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Ql(Dl);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===zf&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),Fu(this.acquireTokenFromCache.bind(this),Nc,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===zf)throw i;return this.eventHandler.emitEvent(MT,Df.Silent,e),Fu(this.acquireTokenByRefreshToken.bind(this),ic,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await Fu(_A,Ep,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Promise.resolve()}getPreGeneratedPkceCodes(e){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,this.logger.verbose((t?"Found":"Did not find")+" pre-generated PKCE codes"),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e){const t=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[];window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(t),function(e,t,i){const o=window.msal?.clientIds||[],r=o.length,n=o.filter(t=>t===e).length;n>1&&i.warning("There is already an instance of MSAL.js in the window with the same client id."),t.add({msalInstanceCount:r,sameClientIdInstanceCount:n})}(t,e,this.logger)}}
156
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=hh.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(i,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,i,o){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw zm(km);return new my(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,o)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!Py(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case cs:case ds:case ss:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${e.prompt} is not compatible with platform broker flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e))||(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1)}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new vy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new Ly(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new qy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,vf,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new hy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new Wy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new Yy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Sf,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return qg(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===hf?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===hf?this.eventHandler.unsubscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?Ig():Fa.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Yf})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Yf})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(nc,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Vy(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw zm(mm);return i.add({accountType:Ky(o)}),this.acquireTokenSilentDeduped(e,o,t).then(o=>(i.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),{...o,state:e.state,correlationId:t})).catch(e=>{throw e instanceof il&&e.setCorrelationId(t),i.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,i){const o=sh(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(o),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);const o=qu(this.acquireTokenSilentAsync.bind(this),ac,this.logger,this.performanceClient,i)({...e,correlationId:i},t);return this.activeSilentTokenRequests.set(r,o),o.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),n}async acquireTokenSilentAsync(e,t){const i=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(ac,e.correlationId),this.eventHandler.emitEvent(ST,Uf.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const o=await qu(iy,Sc,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Qf;return this.acquireTokenSilentNoIframe(o,r).catch(async e=>{const t=function(e,t){const i=!(e instanceof Eh&&e.subError!==yh),o=e.errorCode===Qm||e.errorCode===Ul,r=i&&o||e.errorCode===mh||e.errorCode===gh,n=eg.includes(t);return r&&n}
157
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Xf){const[t,i]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${i}`,o.correlationId);const n=this.performanceClient.startMeasurement(mc,o.correlationId);n.add({awaitIframeCorrelationId:i});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${i} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${i} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),qu(this.acquireTokenBySilentIframe.bind(this),vc,this.logger,this.performanceClient,o.correlationId)(o)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),qu(this.acquireTokenBySilentIframe.bind(this),vc,this.logger,this.performanceClient,o.correlationId)(o).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(MT,Uf.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(DT,Uf.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return Py(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,Mf,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof cy&&py(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,jl(Ul);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===$f&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),qu(this.acquireTokenFromCache.bind(this),bc,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===$f)throw i;return this.eventHandler.emitEvent(kT,Uf.Silent,e),qu(this.acquireTokenByRefreshToken.bind(this),rc,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await qu(Oy,Cp,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Promise.resolve()}getPreGeneratedPkceCodes(e){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,this.logger.verbose((t?"Found":"Did not find")+" pre-generated PKCE codes"),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e){const t=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[];window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(t),function(e,t,i){const o=window.msal?.clientIds||[],r=o.length,n=o.filter(t=>t===e).length;n>1&&i.warning("There is already an instance of MSAL.js in the window with the same client id."),t.add({msalInstanceCount:r,sameClientIdInstanceCount:n})}(t,e,this.logger)}}
158
158
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
159
- class VA{static async createPublicClientApplication(e){const t=await async function(e,t){const i=new aT(e);return await i.initialize(),KA.createController(i,t)}(e);return new VA(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new KA(new aT(e))}async initialize(e){return this.controller.initialize(e,this.isBroker)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}
160
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const zA={initialize:()=>Promise.reject(Mg(Pg)),acquireTokenPopup:()=>Promise.reject(Mg(Pg)),acquireTokenRedirect:()=>Promise.reject(Mg(Pg)),acquireTokenSilent:()=>Promise.reject(Mg(Pg)),acquireTokenByCode:()=>Promise.reject(Mg(Pg)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(Mg(Pg)),loginPopup:()=>Promise.reject(Mg(Pg)),loginRedirect:()=>Promise.reject(Mg(Pg)),logout:()=>Promise.reject(Mg(Pg)),logoutRedirect:()=>Promise.reject(Mg(Pg)),logoutPopup:()=>Promise.reject(Mg(Pg)),ssoSilent:()=>Promise.reject(Mg(Pg)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw Mg(Pg)},getLogger:()=>{throw Mg(Pg)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw Mg(Pg)},hydrateCache:()=>Promise.reject(Mg(Pg)),clearCache:()=>Promise.reject(Mg(Pg))};
161
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class QA{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case bT:return Uf;case DT:return Bf;case vT:if(e.interactionType===Df.Redirect||e.interactionType===Df.Popup)return Ff;break;case qT:return qf;case HT:return xf;case kT:case UT:if(t&&t!==Bf)break;return Wf;case VT:if(t&&t!==xf)break;return Wf;case WT:if(t&&t!==qf)break;return Wf;case wT:case PT:case LT:case ST:case zT:if(e.interactionType===Df.Redirect||e.interactionType===Df.Popup){if(t&&t!==Uf&&t!==Ff)break;return Wf}}return null}}
162
- /*! @azure/msal-react v3.0.19 2025-08-19 */const $A={instance:zA,inProgress:Wf,accounts:[],logger:new Zl({})},jA=ue.createContext($A);
159
+ class Qy{static async createPublicClientApplication(e){const t=await async function(e,t){const i=new lT(e);return await i.initialize(),zy.createController(i,t)}(e);return new Qy(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new zy(new lT(e))}async initialize(e){return this.controller.initialize(e,this.isBroker)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}
160
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const $y={initialize:()=>Promise.reject(kg(Lg)),acquireTokenPopup:()=>Promise.reject(kg(Lg)),acquireTokenRedirect:()=>Promise.reject(kg(Lg)),acquireTokenSilent:()=>Promise.reject(kg(Lg)),acquireTokenByCode:()=>Promise.reject(kg(Lg)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(kg(Lg)),loginPopup:()=>Promise.reject(kg(Lg)),loginRedirect:()=>Promise.reject(kg(Lg)),logout:()=>Promise.reject(kg(Lg)),logoutRedirect:()=>Promise.reject(kg(Lg)),logoutPopup:()=>Promise.reject(kg(Lg)),ssoSilent:()=>Promise.reject(kg(Lg)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw kg(Lg)},getLogger:()=>{throw kg(Lg)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw kg(Lg)},hydrateCache:()=>Promise.reject(kg(Lg)),clearCache:()=>Promise.reject(kg(Lg))};
161
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class jy{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case PT:return Ff;case UT:return Wf;case ST:if(e.interactionType===Uf.Redirect||e.interactionType===Uf.Popup)return qf;break;case GT:return Gf;case KT:return Bf;case xT:case FT:if(t&&t!==Wf)break;return Hf;case QT:if(t&&t!==Bf)break;return Hf;case HT:if(t&&t!==Gf)break;return Hf;case vT:case LT:case MT:case DT:case $T:if(e.interactionType===Uf.Redirect||e.interactionType===Uf.Popup){if(t&&t!==Ff&&t!==qf)break;return Hf}}return null}}
162
+ /*! @azure/msal-react v3.0.19 2025-08-19 */const Zy={instance:$y,inProgress:Hf,accounts:[],logger:new Xl({})},Jy=ue.createContext(Zy);
163
163
  /*! @azure/msal-react v3.0.19 2025-08-19 */
164
- function ZA(e,t){if(e.length!==t.length)return!1;const i=[...t];return e.every(e=>{const t=i.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)})}
165
- /*! @azure/msal-react v3.0.19 2025-08-19 */jA.Consumer;const JA="3.0.19",XA="UNBLOCK_INPROGRESS",ey="EVENT",ty=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case XA:e.inProgress===kf&&(r=Wf,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case ey:const t=o.message,n=QA.getInteractionStatusFromEvent(t,e.inProgress);n&&(o.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${i}`)}if(r===kf)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||ZA(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:ZA(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function iy({instance:e,children:t}){fe(()=>{e.initializeWrapperLibrary(Hf,JA)},[e]);const i=Ae(()=>e.getLogger().clone("@azure/msal-react",JA),[e]),[o,r]=ye(ty,void 0,()=>({inProgress:kf,accounts:[]}));fe(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:ey})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:XA})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const n={instance:e,inProgress:o.inProgress,accounts:o.accounts,logger:i};return he.createElement(jA.Provider,{value:n},t)}const oy=e=>{const t=A();let i;"AZURE"===e?.authenticationMethod&&(i=new VA({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),kt.setLicenseKey(e.muiPremiumKey);const o={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||hi} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||hi},secondary:{main:e.appTheme?.light?.secondaryColor||mi},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||fi},secondary:{main:e.appTheme?.dark?.secondaryColor||gi}}},n=y(e=>e.AppLayout);let a={...o};"dark"===n.themeMode&&(a={...r});const s=le({direction:n.appDirection,...a});return fe(()=>{document.title=e.documentTitle,t(Ma.setAppInfo(e));let i={};e.enableAdministrationModule&&(i={...ka}),e.businessCommonStoresMetaData&&(i={...i,...e.businessCommonStoresMetaData}),t(ti(i))},[e]),g(pe,{theme:s,children:"AZURE"===e?.authenticationMethod?g(iy,{instance:i,children:g(La,{msalInstance:i})}):g(La,{msalInstance:i})})};var ry={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},ny={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const ay={...ry,...ny,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var sy={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},ly={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const dy={...sy,...ly,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};_.add(E),_.add(O),_.add(C);const cy=e=>{const[t,i]=me({AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:bn,AppInfo:Da}),o=we({reducer:t}),[r,n]=me(!1);return fe(()=>{(()=>{const t={AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:bn,AppInfo:Da,...e?.businessReduxReducers};i(e=>({...t}));const o={en:{translation:{...ay,...e?.businessLocals?.en}},ar:{translation:{...dy,...e?.businessLocals?.ar}}};Se.use(De).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),n(!0)})()},[e]),r?g(I,{store:o,children:g(oy,{...e})}):g(T,{})};export{Kr as AttachmentCard,Yr as AttachmentImageViewer,Vr as AttachmentPanel,cy as BaseApp,di as CheckBox,ci as ComboBox,fi as DARK_THEME_INITIAL_MAIN_COLOR,gi as DARK_THEME_INITIAL_SECANDARY_COLOR,pi as DATE_FORMAT,ui as DATE_TIME_FORMAT,En as DashboardRouteView,_n as DashboardViewer,Ti as Datefield,Ai as DatetimeField,sn as ExcelReportViewer,Wr as FormElement,hi as LIGHT_THEME_INITIAL_MAIN_COLOR,mi as LIGHT_THEME_INITIAL_SECANDARY_COLOR,dn as ReportViewer,yi as SystemLookupCombobox,hn as TemplateBarChart,mn as TemplateDataCard,pn as TemplateForm,fn as TemplateGauge,nn as TemplateGrid,gn as TemplateLineChart,An as TemplateLineProgress,yn as TemplatePieChart,ni as TemplateTextField,li as TransferList,cn as WorkflowDocumentPanel,zr as WorkflowDocumentTimeLine,un as WorkflowRouteComponent,Ur as capitalizeFirstLetter,Ri as constructGridColumnsFromFields,bi as constructValidationSchema,Br as formatDate,Ni as getAllFields,Ci as getElementFields,wi as getGridSelection,Mr as hasDigitsOnly,Dr as isNumber,kr as isNumeric,xr as isValidEmail,qr as parseStringToDate,Fr as timeAgo,oi as useApiActions,$t as useAxios,ri as useCommonStore,jt as useConfirmationWindow,Ut as useIsMobile,Kt as useLoadingMask,Zt as useSession,Jt as useWindow};
164
+ function Xy(e,t){if(e.length!==t.length)return!1;const i=[...t];return e.every(e=>{const t=i.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)})}
165
+ /*! @azure/msal-react v3.0.19 2025-08-19 */Jy.Consumer;const eA="3.0.19",tA="UNBLOCK_INPROGRESS",iA="EVENT",oA=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case tA:e.inProgress===xf&&(r=Hf,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case iA:const t=o.message,n=jy.getInteractionStatusFromEvent(t,e.inProgress);n&&(o.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${i}`)}if(r===xf)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||Xy(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:Xy(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function rA({instance:e,children:t}){fe(()=>{e.initializeWrapperLibrary(Kf,eA)},[e]);const i=ye(()=>e.getLogger().clone("@azure/msal-react",eA),[e]),[o,r]=Ae(oA,void 0,()=>({inProgress:xf,accounts:[]}));fe(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:iA})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:tA})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const n={instance:e,inProgress:o.inProgress,accounts:o.accounts,logger:i};return he.createElement(Jy.Provider,{value:n},t)}const nA=e=>{const t=y();let i;"AZURE"===e?.authenticationMethod&&(i=new Qy({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),kt.setLicenseKey(e.muiPremiumKey);const o={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||hi} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||hi},secondary:{main:e.appTheme?.light?.secondaryColor||mi},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||fi} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||fi},secondary:{main:e.appTheme?.dark?.secondaryColor||gi}}},n=A(e=>e.AppLayout);let a={...o};"dark"===n.themeMode&&(a={...r});const s=le({direction:n.appDirection,...a});return fe(()=>{document.title=e.documentTitle,t(ka.setAppInfo(e));let i={};e.enableAdministrationModule&&(i={...xa}),e.businessCommonStoresMetaData&&(i={...i,...e.businessCommonStoresMetaData}),t(ti(i))},[e]),g(pe,{theme:s,children:"AZURE"===e?.authenticationMethod?g(rA,{instance:i,children:g(Ma,{msalInstance:i})}):g(Ma,{msalInstance:i})})};var aA={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>&copy;</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},sA={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const lA={...aA,...sA,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var dA={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>&copy;</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},cA={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const pA={...dA,...cA,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};_.add(E),_.add(O),_.add(C);const uA=e=>{const[t,i]=me({AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:bn,AppInfo:Ua}),o=we({reducer:t}),[r,n]=me(!1);return fe(()=>{(()=>{const t={AppLayout:qt,UserSession:Qt,loadingMask:Yt,commonStores:ii,SideBar:bn,AppInfo:Ua,...e?.businessReduxReducers};i(e=>({...t}));const o={en:{translation:{...lA,...e?.businessLocals?.en}},ar:{translation:{...pA,...e?.businessLocals?.ar}}};Se.use(De).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),n(!0)})()},[e]),r?g(I,{store:o,children:g(nA,{...e})}):g(T,{})};export{Kr as AttachmentCard,Yr as AttachmentImageViewer,Vr as AttachmentPanel,uA as BaseApp,di as CheckBox,ci as ComboBox,fi as DARK_THEME_INITIAL_MAIN_COLOR,gi as DARK_THEME_INITIAL_SECANDARY_COLOR,pi as DATE_FORMAT,ui as DATE_TIME_FORMAT,En as DashboardRouteView,_n as DashboardViewer,Ti as Datefield,yi as DatetimeField,sn as ExcelReportViewer,Wr as FormElement,hi as LIGHT_THEME_INITIAL_MAIN_COLOR,mi as LIGHT_THEME_INITIAL_SECANDARY_COLOR,dn as ReportViewer,Ai as SystemLookupCombobox,hn as TemplateBarChart,mn as TemplateDataCard,pn as TemplateForm,fn as TemplateGauge,nn as TemplateGrid,gn as TemplateLineChart,yn as TemplateLineProgress,An as TemplatePieChart,ni as TemplateTextField,li as TransferList,cn as WorkflowDocumentPanel,zr as WorkflowDocumentTimeLine,un as WorkflowRouteComponent,Ur as capitalizeFirstLetter,Ri as constructGridColumnsFromFields,bi as constructValidationSchema,Br as formatDate,Ni as getAllFields,Ci as getElementFields,wi as getGridSelection,Mr as hasDigitsOnly,Dr as isNumber,kr as isNumeric,xr as isValidEmail,qr as parseStringToDate,Fr as timeAgo,oi as useApiActions,$t as useAxios,ri as useCommonStore,jt as useConfirmationWindow,Ut as useIsMobile,Kt as useLoadingMask,Zt as useSession,Jt as useWindow};
166
166
  //# sourceMappingURL=index.mjs.map