@asaleh37/ui-base 25.12.16 → 25.12.122

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.
Files changed (27) hide show
  1. package/__ODockerfile +14 -14
  2. package/dist/index.d.ts +0 -2
  3. package/dist/index.js +107 -107
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +112 -112
  6. package/dist/index.mjs.map +1 -1
  7. package/package-lock.json/342/200/216 +9039 -9039
  8. package/package.json +122 -122
  9. package/src/components/administration/admin/OrganizationMemberGrid.tsx +49 -63
  10. package/src/components/administration/admin/PersonGrid.tsx +344 -10
  11. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +238 -238
  12. package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +427 -427
  13. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +198 -198
  14. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +1047 -1047
  15. package/src/components/templates/report/ExcelReportViewer.tsx +72 -72
  16. package/src/components/templates/report/ReportViewer.tsx +272 -272
  17. package/src/hooks/UseWindow.tsx +111 -111
  18. package/src/hooks/index.ts +22 -22
  19. package/src/hooks/useCommonStore.tsx +29 -29
  20. package/src/hooks/useParameterPanel.tsx +159 -159
  21. package/src/layout/NavigationTree.tsx +1 -8
  22. package/src/layout/TopBar.tsx +55 -72
  23. package/src/main.tsx +1 -2
  24. package/src/navigationItems/Administration/adminNavigationItems.tsx +1 -1
  25. package/src/redux/features/common/AppInfoSlice.ts +0 -4
  26. package/src/components/administration/admin/CustomPersonGrid.tsx +0 -361
  27. package/src/components/administration/admin/OrgProvidedPersonGrid.tsx +0 -347
package/dist/index.js CHANGED
@@ -34,133 +34,133 @@ function(e,t){const o=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
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
- `,or=e=>{const i=_.useNavigate(),r=o.useSelector(e=>e.AppLayout),{handlePostRequest:n}=Re();return t.jsxs(t.Fragment,{children:[t.jsxs(s.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&i(e.notificationActionPayload),e?.isNotified||(t=e.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(s.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===r.appDirection?e.notificationEnText:e.notificationArText,t.jsx(s.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(s.Typography,{color:"warning",sx:{animation:`${tr} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===r.appDirection?"New":"جديد"]})]}),t.jsxs(s.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:hi(e.createTime,r.appDirection)}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(s.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},ir=()=>{const{UserInfo:e}=we(),[i,r]=d.useState(null),{handleGetRequest:n,handlePostRequest:a}=Re(),l=_.useNavigate(),c=o.useSelector(e=>e.AppLayout),[u,p]=d.useState(!1),[h,f]=d.useState([]);er(()=>{!0===e.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>h.length&&g.toast.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),f(e.data)}})},1e3);return t.jsx(s.ClickAwayListener,{onClickAway:()=>{p(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(s.IconButton,{color:"inherit",onClick:e=>{r(e.currentTarget),p(!u)},sx:{marginRight:1,marginLeft:1},children:t.jsx(s.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:h.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(s.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:u,anchorEl:i,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(s.Fade,{...e,timeout:350,children:t.jsxs(s.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==h.length?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(s.Box,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:h.map((e,o)=>t.jsx(or,{...e,setOpen:p,showDivider:o<h.length-1}))}),t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(s.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},rr=e=>{const[o,i]=d.useState(""),[r,n]=d.useState(""),[a,l]=d.useState(""),{handlePostRequest:c}=Re();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(s.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(s.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(De,{label:"Current Password",value:o,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"New Password",value:r,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(De,{label:"Confirm New Password",value:a,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==o&&""!==o.trim()?null!==r&&""!==r&&null!==a&&""!==a&&r==a?await c({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:o,newPassword:r},successCallBkFn:()=>{e.onSuccessCallBk(),g.toast.success("Your request has been processed successfully")},showMask:!0}):g.toast.error("You must enter new password in required fields and must be identical"):g.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},nr=s.styled(p,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{o.useSelector(e=>e.AppInfo.value);const t=o.useSelector(e=>e.AppLayout),i=pe();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})}}]}}),ar=()=>{const{Window:e,setWindowState:i}=Se({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),r=o.useSelector(e=>e.AppInfo.value),[n,a]=d.useState(null),l=()=>{a(null)},c=e=>{a(e.currentTarget)},u=o.useSelector(e=>e.AppLayout),p=o.useSelector(e=>e.SideBar),{UserSession:f}=we(),g=f.value.currentOrganization,{Window:T,setWindowState:y}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Re(),_=pe(),E=o.useDispatch();return t.jsxs(t.Fragment,{children:[r.isUserProfileManaged?t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx(rr,{selectedPerson:f.value,isSelfService:!0,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(s.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(n),onClose:l,children:t.jsx(s.MenuItem,{onClick:()=>{y(!0),l()},children:t.jsx(s.Typography,{sx:{textAlign:"center"},children:"Change Password"})})})]}):t.jsx(t.Fragment,{}),t.jsx(e,{children:t.jsx(Qi,{successChangeCallBackFn:()=>{i(!1)}})}),t.jsx(nr,{position:"fixed",open:p.isOpened,children:t.jsxs(h,{children:[t.jsx(s.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{E(Zi())},edge:"start",sx:[{mr:"ltr"===u.appDirection?2:void 0,ml:"rtl"===u.appDirection?2:void 0},p.isOpened&&{display:"none"}],children:t.jsx(m.FontAwesomeIcon,{icon:"bars"})}),_?t.jsx(t.Fragment,{}):t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:f?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(s.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${r.appName} - ${"ltr"===u.appDirection?g?.organizationEnName:g?.organizationArName}`}),t.jsx(s.Tooltip,{title:"light"===u.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(s.IconButton,{sx:{mx:1},color:"inherit",onClick:()=>{E(ge.setThemeMode("light"===u.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===u.themeMode?"dark":"light")},children:"light"===u.themeMode?t.jsx(m.FontAwesomeIcon,{icon:"moon"}):t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),r.isLocalizationEnabled?t.jsx(s.Tooltip,{title:"ar"===A.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{let e="ar"===A.language?"en":"ar";var t;t=e,A.changeLanguage(t),localStorage.setItem("language",t),E(ge.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(m.FontAwesomeIcon,{icon:"language"})})}):t.jsx(t.Fragment,{}),f.value?.userOrganizations&&f.value?.userOrganizations.length>1?t.jsx(s.Tooltip,{title:"Change Current Organization",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{i(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===r?.enableUINotifications?t.jsx(ir,{}):t.jsx(t.Fragment,{}),_?t.jsx(t.Fragment,{}):t.jsx("div",{onClick:c,style:{cursor:"pointer"},children:t.jsx(Ti,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:f.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:_?"":f.value?.username}),t.jsx(s.IconButton,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}E(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:t.jsx(m.FontAwesomeIcon,{rotation:"rtl"===u.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},sr=s.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),lr=(e,t)=>{for(const o of t){if(o.id===e)return o;if(o.children){const t=lr(e,o.children);if(t)return t}}},dr=[...[{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 cr(){return t.jsx(W,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ur=c.styled(J.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${$.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),pr=c.styled(J.TreeItem2Content)(({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:c.alpha(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})}})),hr=V.animated(z);function mr(e){const o=V.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(hr,{style:o,...e})}const fr=c.styled(F)({color:"inherit",fontWeight:500});function gr({icon:e,expandable:i,children:r,...n}){const{t:a}=y.useTranslation(),s=o.useSelector(e=>e.AppLayout);return t.jsxs(J.TreeItem2Label,{...n,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===s.appDirection?7:void 0,marginLeft:"rtl"===s.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(fr,{variant:"body2",sx:{fontSize:16},children:a(r)}),i&&t.jsx(cr,{})]})}const Tr=e=>Array.isArray(e)?e.length>0&&e.some(Tr):Boolean(e),Ar=ce.forwardRef(function(e,o){const{id:i,itemId:r,label:n,disabled:a,children:s,...l}=e,{getRootProps:d,getContentProps:c,getIconContainerProps:u,getCheckboxProps:p,getLabelProps:h,getGroupTransitionProps:m,getDragAndDropOverlayProps:f,status:g,publicAPI:T}=Z.useTreeItem2({id:i,itemId:r,children:s,label:n,disabled:a,rootRef:o}),A=T.getItem(r),y=Tr(s);return t.jsx(ee.TreeItem2Provider,{itemId:r,children:t.jsxs(ur,{...d(l),children:[t.jsxs(pr,{...c({className:ai("content",{"Mui-expanded":g.expanded,"Mui-selected":g.selected,"Mui-focused":g.focused,"Mui-disabled":g.disabled})}),children:[t.jsx(J.TreeItem2IconContainer,{...u(),children:t.jsx(X.TreeItem2Icon,{status:g})}),t.jsx(J.TreeItem2Checkbox,{...p()}),t.jsx(gr,{...h({icon:A?.icon||"book",expandable:y&&g.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...f()})]}),s&&t.jsx(mr,{...m()})]})})});function yr(){const e=_.useNavigate(),i=o.useSelector(e=>e.AppLayout),r=o.useSelector(e=>e.AppInfo.value),n=o.useDispatch(),a=pe(),{isUserAuthorized:s,isCurrentOrganizationAuthorizedToModule:l}=we(),d=e=>{const t=[];for(let o of e)if(("development_admin.organization"!==o.id||r.isUserProfileManaged)&&(void 0===o.authority||null==o.authority||s(o.authority))&&(void 0===o.applicationModule||null===o.applicationModule||l(o.applicationModule))){let e=structuredClone(o);o?.children&&(e.children=d(o.children)),t.push(e)}return t},c=[];r.enableAdministrationModule&&c.push(...structuredClone(dr)),c.push(...structuredClone(r.businessNavigationItems));const u=d(c);return t.jsx(Q.RichTreeView,{items:u,onItemClick:(t,o)=>{const i=lr(o,c);"NAVIGATION"===i?.action&&null!=i?.actionPayload&&(e(i?.actionPayload?.path||""),a&&n(Zi()))},sx:{height:"fit-content",flexGrow:1,maxWidth:he,direction:i.appDirection,maxHeight:a?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ar}})}const Ir=()=>{const e=o.useSelector(e=>e.AppInfo.value),{UserSession:i}=we(),r=i.value.currentOrganization,n=s.useTheme(),a=o.useSelector(e=>e.AppLayout),l=o.useSelector(e=>e.SideBar),d=o.useDispatch();return t.jsxs(K,{sx:{width:he,flexShrink:0,"& .MuiDrawer-paper":{width:he,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===a.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(sr,{children:[t.jsxs(s.Box,{sx:{width:"100%"},children:[t.jsx(s.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===a.appDirection?r?.organizationEnName:r?.organizationArName}`}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(Y,{onClick:()=>{d(Zi())},children:"ltr"===n.direction?t.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(v,{}),t.jsx(yr,{})]})},_r=re({key:"muirtl",stylisPlugins:[ie.prefixer,oe]}),Er=re({key:"mui"}),Or=e=>{const[o,i]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),n(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"roleName",options:r,valueField:"id",selectedOptions:o,setSelection:i}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:o,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Cr=e=>{const i=o.useSelector(e=>e.AppInfo.value),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),l=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=o.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),u=o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:p}=y.useTranslation(),[h,m]=d.useState([]),f=xe({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),g=[{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:l,optionValueField:"id",optionDisplayField:"organizationEnName"}}];return i?.isUserProfileManaged&&g.push({type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:u,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"}}),t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Or,{selectedRecord:r,closeModalFn:()=>{s(!1)}})}),t.jsx(vi,{apiActions:f,hideInfoBar:!0,data:h,setData:m,editMode:{editMode:"row"},formElements:g,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{n(e),s(!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 t=>(i?.isUserProfileManaged?t.personId=e.selectedPerson.id:t.organizationMembershipNumber=e.selectedPerson.employeeNumber,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Nr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),n=xe({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:a}=Re(),s=o.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=o.useDispatch();return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,setData:r,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 a({endPointURI:s.url,showMask:!1,successCallBkFn:e=>{l(ve({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(ve({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Rr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),{handleGetRequest:n}=Re(),a=o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),s=o.useDispatch(),l=xe({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),c=[{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:o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),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:i,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vi,{apiActions:l,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:c,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:a.url,showMask:!1,successCallBkFn:e=>{s(ve({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{s(ve({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},br=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return t.jsx(vi,{apiActions:r,data:o,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"}})},wr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState(null),{UserInfo:n}=we();o.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),o.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data);const[a,l]=d.useState([]),c=xe({commonStoreKey:"persons",setData:l}),[u,p]=d.useState(null),{Window:h,setWindowState:m}=Se({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:f,setWindowState:g}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:T,setWindowState:A}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),I=[{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=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(Ti,{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 t.jsxs(t.Fragment,{children:[t.jsx(f,{children:t.jsx(Or,{selectedRecord:u,closeModalFn:()=>{g(!1)}})}),t.jsx(h,{children:t.jsx(Cr,{selectedPerson:i})}),t.jsx(vi,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:c,data:a,setData:l,editMode:{editMode:"none"},formElements:I,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),m(!0)}}],girdIcon:"users"})]})},Sr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState(null),{UserInfo:n}=we(),a=o.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=o.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[c,u]=d.useState([]),p=xe({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:u}),[h,m]=d.useState(null),{Window:f,setWindowState:T}=Se({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:A,setWindowState:I}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:_,setWindowState:E}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),O=[{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=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(Ti,{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:a,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(A,{children:t.jsx(Or,{selectedRecord:h,closeModalFn:()=>{I(!1)}})}),t.jsx(f,{children:t.jsx(Cr,{selectedPerson:i})}),t.jsx(_,{children:t.jsx(rr,{selectedPerson:i,isSelfService:!1,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(vi,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:p,data:c,setData:u,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:O,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{r(e),E(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{m({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),I(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),T(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.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||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},Pr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),n=xe({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:r}),a=o.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:s}=Re(),l=[{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:a,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"}}];return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:l,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"}})},vr=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return t.jsx(vi,{apiActions:r,data:o,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"}})},Lr=e=>{const[o,i]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"authorityName",options:r,valueField:"id",selectedOptions:o,setSelection:i}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:o,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Mr=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=xe({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Lr,{roleId:r?.id,closeModalFn:()=>{s(!1)}})}),t.jsx(vi,{apiActions:l,data:o,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=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},xr=e=>{const i=o.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:a}),l=[{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:i,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"}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:r("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"}})},Dr=()=>{const e=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:n}),s=[{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"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,hideInfoBar:!0,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:i("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},kr=e=>{const{t:i}=y.useTranslation(),r=o.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:a}),l=[{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:r,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 t.jsx(vi,{apiActions:s,data:n,hideInfoBar:!0,setData:a,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},Ur=[{value:"FILE_SYSTEM"},{value:"SFTP"}],Fr=(e,t,o,i,r)=>{i?("useSysDatasource"===i&&1==r?(t.hideField("datasourceConId"),o.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===i&&("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")))},Br=e=>{const{t:o}=y.useTranslation(),[i,r]=d.useState([]),n=xe({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:r});return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,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:o("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!pi(t.recipientMail)?(g.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},qr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=xe({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:n}),l=[{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:a,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 t.jsx(vi,{apiActions:s,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},jr=e=>{const i=o.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:a}),l=[{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:i,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 t.jsx(vi,{apiActions:s,data:n,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:r("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"}})},Gr={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}}},Wr=(e,t,o)=>{if(e&&Gr[e]){const i=Gr[e],r=Object.keys(i);for(const e of r){i[e].isVisible?t.showField(e):(t.hideField(e),o.setValue(e,null))}}else t.hideField("mailHost"),o.setValue("mailHost",null),t.hideField("mailPort"),o.setValue("mailPort",null),t.hideField("mailUsername"),o.setValue("mailUsername",null),t.hideField("mailPassword"),o.setValue("mailPassword",null),t.hideField("mailProtocol"),o.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),o.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),o.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),o.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),o.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),o.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),o.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),o.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),o.setValue("azureGraphApiEmailId",null)},Hr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:n}),s=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{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:s,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:s,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 t.jsx(vi,{apiActions:a,data:r,setData:n,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},Yr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:n}),s=[{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:o.useSelector(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 t.jsx(vi,{apiActions:a,data:r,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:i("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"}})},Kr=e=>{const[o,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:a}=y.useTranslation(),{handleGetRequest:s}=Re(),[l,c]=d.useState([]);d.useEffect(()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()},[e.selectedRecord]);const[u,p]=d.useState([]),h=xe({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:p}),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:"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:l,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Yr,{selectedRecord:o})}),t.jsx(vi,{apiActions:h,data:u,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:p,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),n(!0)}}],formElements:m,keyColumnName:"id",gridTitle:a("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"}})]})},Vr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=o.useSelector(e=>e.commonStores.stores.SystemWidgets.data),s=xe({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:n}),l=[{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:a,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"}}];return t.jsx(vi,{apiActions:s,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:i("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"}})},zr=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),n=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(Ti,{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 t.jsx(t.Fragment,{children:t.jsx(vi,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:o,setData:i,editMode:{editMode:"row"},formElements:n,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:Cr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return t.jsx(vi,{apiActions:r,data:o,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:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Rr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:br,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const e=o.useSelector(e=>e.AppInfo.value);return e?.isUserProfileManaged?t.jsx(Sr,{}):t.jsx(wr,{})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({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 t.jsx(t.Fragment,{children:t.jsx(vi,{apiActions:r,data:o,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:Pr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:vr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:Mr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return t.jsx(vi,{apiActions:r,data:o,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}=y.useTranslation(),{handleGetRequest:i}=Re(),[r,n]=d.useState([]),a=xe({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:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:o.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),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"}}];return t.jsx(vi,{apiActions:a,data:r,hideInfoBar:!0,setData:n,editMode:{editMode:"row"},formElements:s,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:br,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Rr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Nr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:n}),s=[{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:i,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,editMode:{editMode:"row",reloadAfterSave:!0},formElements:s,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,i]=d.useState(null),{Window:r,setWindowState:n}=Se({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),a=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:s}=y.useTranslation(),[l,c]=d.useState([]),u=xe({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),p=[{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:a,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(xr,{selectedRecord:e})}),t.jsx(vi,{apiActions:u,rowActions:[{label:"Query Parameters",actionFn:async e=>{i(e),n(!0)},icon:"p"}],data:l,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:p,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,o,i,r)=>{i?"useSysCon"===i&&1==r?(t.hideField("datasourceConId"),o.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Re(),i=o.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:a,commonStoreKey:"SystemDataSources"}),l=[{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:i,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"}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:r("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=>{g.toast.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}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:n}),s=[{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:i,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:o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),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"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,o,i,r,n)=>{i?"parameterType"===i?("combobox"===r?(o.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?o.setValue("parameterValueFormat",je):o.setValue("parameterValueFormat",Ge)):(t.hideField("parameterValueFormat"),o.setValue("parameterValueFormat",null))):"parameterDataQueryId"==i?null!=r&&""!=r?(o.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==i&&(null!=r&&""!=r?(o.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(o.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"),o.setValue("parameterValueFormat",je)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),o.setValue("parameterValueFormat",Ge)):(o.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:Dr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState(null),{Window:n,setWindowState:a}=Se({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:l}=Se({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,u]=d.useState([]),p=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),h=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),m=o.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),f=xe({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:u}),T=[{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:Ur,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:p,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:m,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:h,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 t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Di,{reportCode:i?.reportCode,resultMode:"App"})}),t.jsx(s,{children:t.jsx(kr,{selectedRecord:i})}),t.jsx(vi,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:f,data:c,setData:u,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)=>{r(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{r(e),a(!0)}}],formProps:{formValuesChangeCallBk:Fr},formElements:T,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)||(g.toast.error("You must choose the report query"),!1):(g.toast.error("You must choose the report blueprint"),!1):(g.toast.error("You must enter the jasper report name"),!1):(g.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),i=o.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:c}=Se({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:u,setWindowState:p}=Se({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:h}=y.useTranslation(),[m,f]=d.useState([]),T=xe({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:f}),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_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:i,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Br,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(l,{children:t.jsx(qr,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(u,{children:t.jsx(jr,{selectedRecord:r,callBkFn:()=>{p(!1)}})}),t.jsx(vi,{apiActions:T,data:m,setData:f,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:A,keyColumnName:"id",gridTitle:h("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),p(!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)||(g.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(g.toast.error("You must specifiy the period value since this email is periodical"),!1):(g.toast.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}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i}),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:"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,o,i,r){Wr(t,i,o)}}}},{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"}}];return t.jsx(vi,{apiActions:r,data:o,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:n,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,o)=>{Wr(o.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Document Status",windowIcon:"tag"}),{Window:a,setWindowState:s}=Se({windowTitle:"Document Action",windowIcon:"stamp"}),l=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=o.useSelector(e=>e.commonStores.stores.SystemReports.data),u=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:p}=y.useTranslation(),[h,m]=d.useState([]),f=xe({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:m}),g=[{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:l,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:c,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:u,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Hr,{selectedRecord:e})}),t.jsx(a,{children:t.jsx(Kr,{selectedRecord:e})}),t.jsx(vi,{apiActions:f,data:h,setData:m,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{i(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{i(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:p("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:g,keyColumnName:"id",gridTitle:p("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}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),r=o.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[n,a]=d.useState([]),s=xe({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:a}),l=[{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:r,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:i,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"}}]}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,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}=y.useTranslation(),[o,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[a,s]=d.useState([]),l=_.useNavigate(),c=xe({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Vr,{selectedRecord:o})}),t.jsx(vi,{apiActions:c,data:a,setData:s,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),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/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:zi},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return t.jsx(vi,{apiActions:r,data:o,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}=y.useTranslation(),[i,r]=d.useState([]),{handlePostRequest:n}=Re(),a=xe({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:r}),s=o.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{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:s,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"}}];return t.jsx(vi,{apiActions:a,disableDefaultAction:!0,data:i,setData:r,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await n({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{a.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:Pr},{path:"dev/system/roles",component:Mr},{path:"dev/system/lookups",component:Dr},{path:"dev/system/modules",component:vr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i}),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:"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:Ur,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"}}];return t.jsx(vi,{apiActions:r,data:o,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:n,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}=y.useTranslation(),[i,r]=d.useState([]),n=o.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),a=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=xe({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),c=[{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:a,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:a,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:n,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=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{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=>t.jsx(s.Box,{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 t.jsx(vi,{apiActions:l,data:i,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:c,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}=we(),i=o.useSelector(e=>e.AppLayout),{handleGetRequest:r,handlePostRequest:n}=Re(),[a,l]=d.useState([]),c=o.useSelector(e=>e.AppInfo.value),u=()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===c?.enableUINotifications&&er(u,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?"Notifications":"الاشعارات"]}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Button,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(s.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(s.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(s.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:a.map((e,o)=>t.jsx(or,{...e,showDivider:o<a.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fi}]]],Qr=e=>{const{isUserAuthorized:o,isCurrentOrganizationAuthorizedToModule:i}=we();return e?.applicationModule&&!i(e?.applicationModule)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!o(e.authority)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},$r=()=>{const e=o.useSelector(e=>e.AppLayout),i=o.useSelector(e=>e.AppInfo.value),r=o.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:n}=we(),a=o.useDispatch(),{show:c,hide:u}=Ee(),p=o.useSelector(e=>e.commonStores),[h,m]=d.useState(!1),{isUserAuthorized:f}=we(),{handleGetRequest:g}=Re();d.useEffect(()=>{p?.storeKeys&&(async()=>{c("Loading ... please wait"),m(!1);const e=p.stores,t=p.storeKeys;for(let o of t)void 0!==e[o]?.authority&&null!==e[o]?.authority&&!f(e[o]?.authority)||""==e[o]?.url||!0!==e[o].autoLoad||g({endPointURI:e[o].url,showMask:!1,successCallBkFn:e=>{a(ve({storeKey:o,data:e.data}))},failureCallBkFn:()=>{a(ve({storeKey:o,data:[]}))}});m(!0),u()})()},[p.storeKeys,n?.currentOrganization]);const T=pe();return t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?Er:_r,children:t.jsx(s.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:T?1:3},children:t.jsxs(_.Routes,{children:[i.enableAdministrationModule?zr.map((e,o)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Qr,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+o)):null,r.map((e,o)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Qr,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+o))]})})})},Zr=c.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function Jr(e){const{window:i}=e,r=o.useSelector(e=>e.SideBar),n=o.useSelector(e=>e.AppInfo.value),a=o.useDispatch(),l=e=>{a(Ji(e))},d=void 0!==i?()=>i().document.body:void 0;return t.jsx(se,{container:d,anchor:"bottom",open:r.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Zr,{}),t.jsx(s.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(yr,{})}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Xr=()=>{const{t:e}=y.useTranslation(),i=o.useSelector(e=>e.loadingMask.value),r=o.useSelector(e=>e.AppLayout);return t.jsxs(s.Backdrop,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:i.isOpened,children:[t.jsx(s.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:i?.message||e("DEFAULT_LOADING_MESSAGE")})]})},en=()=>{const e=o.useSelector(e=>e.AppInfo.value),[i,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=o.useSelector(e=>e.UserSession.value),h=o.useDispatch(),m=async()=>{if(null==i||""==i)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:i,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=o.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let o=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=o&&null!=o.data){const e={...o.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsx(s.Box,{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:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:300,m:1},value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},tn=()=>{const[e,i]=d.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:r}=Re(),n=o.useSelector(e=>e.AppInfo.value);return d.useEffect(()=>{if(n?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{n?.checkLicense?.endpoint&&await r({endPointURI:n.checkLicense?.endpoint,successCallBkFn:e=>{i(e.data)}})})()},n?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[n]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{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:[t.jsx("img",{src:n.appLogo,style:{height:200,width:200}}),t.jsxs(s.Typography,{variant:"h5",children:[n.appName," - ",n.appVersion]}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(s.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(s.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},on=({msalInstance:e})=>{const i=o.useSelector(e=>e.AppInfo.value);o.useSelector(e=>e.UserSession.value);const[r,n]=d.useState(!1),{handleGetRequest:a}=Re(),c=o.useDispatch(),u=async()=>{localStorage.getItem("TOKEN")?i?.apiBaseUrl&&a({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(n(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};c(Ce.setAuthenticated(t))}else c(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{n(!1)}}):(c(Ce.setUnAuthenticated()),n(!1))},p=o.useSelector(e=>e.UserSession.value);d.useEffect(()=>{u()},[i]);const h=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:i?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===i?.loginScreenStyle?.themeMode?i.appTheme?.light?.primaryColor||We:i.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===i?.loginScreenStyle?.themeMode?i.appTheme?.light?.secondaryColor||He:i.appTheme?.dark?.secondaryColor||Ke}}});return t.jsx(l.ThemeProvider,{theme:h,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${i?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:i?.loginScreenStyle?.backgroundColor,zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:i?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),t.jsx(s.Button,{loading:r,onClick:async()=>{n(!0);const t=await e.acquireTokenPopup({scopes:i?.azureConfiguration?.scopes});t?.accessToken?(localStorage.setItem("TOKEN",t.accessToken),u()):n(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:t.jsx(m.FontAwesomeIcon,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},rn=()=>{const e=o.useSelector(e=>e.AppInfo.value),[i,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=o.useSelector(e=>e.UserSession.value),h=o.useDispatch(),m=async()=>{if(null==i||""==i)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:i,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=o.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let o=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=o&&null!=o.data){const e={...o.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%"},children:[t.jsx("img",{src:e?.appLogo,width:70,height:70}),t.jsx(s.Typography,{sx:{m:1},variant:"caption",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:200,textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:200,m:1},value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:200,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},nn=c.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=o.useSelector(e=>e.AppLayout),r=c.useTheme(),n=pe();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!n&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?r.transitions.create(["margin","width"],{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}):r.transitions.create(["margin","width"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.leavingScreen}),marginLeft:n||"ltr"!==i.appDirection||!0!==t?0:he+"px",marginRight:n||"rtl"!==i.appDirection||!0!==t?0:he+"px"}}),an=({msalInstance:e})=>{const i=o.useSelector(e=>e.SideBar),r=o.useSelector(e=>e.AppInfo.value),n=pe(),a=o.useSelector(e=>e.UserSession),s=o.useSelector(e=>e.AppLayout);return t.jsxs(_.BrowserRouter,{children:[t.jsx(g.ToastContainer,{rtl:"rtl"===s.appDirection,draggable:!0,position:"bottom-center"}),t.jsx(Xr,{}),!0===a.value.isAuthenticated?t.jsxs(nn,{open:i.isOpened,children:[t.jsx(u,{}),t.jsx(ar,{}),n?null:t.jsx(Ir,{}),n?t.jsx(Jr,{}):null,t.jsx(sr,{}),t.jsx($r,{}),t.jsx(tn,{})]}):"AZURE"===r.authenticationMethod?t.jsx(on,{msalInstance:e}):n?t.jsx(rn,{}):t.jsx(en,{})]})},sn=f.createSlice({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}}}),ln=sn.actions;var dn=sn.reducer;const cn={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"}},un={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"},pn=200,hn=400,mn=400,fn=499,gn=500,Tn=599,An="GET",yn="POST",In=[un.OPENID_SCOPE,un.PROFILE_SCOPE,un.OFFLINE_ACCESS_SCOPE],_n=[...In,un.EMAIL_SCOPE],En="Content-Type",On="Content-Length",Cn="Retry-After",Nn="X-AnchorMailbox",Rn="x-ms-request-id",bn="x-ms-httpver",wn="active-account-filters",Sn="common",Pn="organizations",vn="consumers",Ln="access_token",Mn="xms_cc",xn="login",Dn="select_account",kn="consent",Un="none",Fn="no_session",Bn="code",qn="id_token token refresh_token",jn="query",Gn="fragment",Wn="query",Hn="authorization_code",Yn="refresh_token",Kn="MSSTS",Vn="ADFS",zn="Generic",Qn="-",$n=".",Zn={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Jn="appmetadata",Xn="1",ea="authority-metadata",ta=86400,oa="config",ia="cache",ra="network",na="hardcoded_values",aa={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"},sa={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},la=60,da=3600,ca="throttling",ua="retry-after, h429",pa="invalid_grant",ha="client_mismatch",ma="1",fa="3",ga="4",Ta="2",Aa="4",ya="5",Ia="0",_a="1",Ea="2",Oa="3",Ca="4",Na="pop",Ra="unexpected_error",ba="post_request_failed",wa={[Ra]:"Unexpected error in authentication.",[ba]:"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 Sa extends Error{constructor(e,t,o){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Sa.prototype),this.errorCode=e||un.EMPTY_STRING,this.errorMessage=t||un.EMPTY_STRING,this.subError=o||un.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Pa(e,t){return new Sa(e,t?`${wa[e]} ${t}`:wa[e])}
39
- /*! @azure/msal-common v15.12.0 2025-08-19 */const va="client_info_decoding_error",La="client_info_empty_error",Ma="token_parsing_error",xa="null_or_empty_token",Da="endpoints_resolution_error",ka="network_error",Ua="openid_config_error",Fa="hash_not_deserialized",Ba="invalid_state",qa="state_mismatch",ja="state_not_found",Ga="nonce_mismatch",Wa="auth_time_not_found",Ha="max_age_transpired",Ya="multiple_matching_tokens",Ka="multiple_matching_accounts",Va="multiple_matching_appMetadata",za="request_cannot_be_made",Qa="cannot_remove_empty_scope",$a="cannot_append_scopeset",Za="empty_input_scopeset",Ja="device_code_polling_cancelled",Xa="device_code_expired",es="device_code_unknown_error",ts="no_account_in_silent_request",os="invalid_cache_record",is="invalid_cache_environment",rs="no_account_found",ns="no_crypto_object",as="unexpected_credential_type",ss="invalid_assertion",ls="invalid_client_credential",ds="token_refresh_required",cs="user_timeout_reached",us="token_claims_cnf_required_for_signedjwt",ps="authorization_code_missing_from_server_response",hs="binding_key_not_removed",ms="end_session_endpoint_not_supported",fs="key_id_missing",gs="no_network_connectivity",Ts="user_canceled",As="missing_tenant_id_error",ys="method_not_implemented",Is="nested_app_auth_bridge_disabled",_s={[va]:"The client info could not be parsed/decoded correctly",[La]:"The client info was empty",[Ma]:"Token cannot be parsed",[xa]:"The token is null or empty",[Da]:"Endpoints cannot be resolved",[ka]:"Network request failed",[Ua]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Fa]:"The hash parameters could not be deserialized",[Ba]:"State was not the expected format",[qa]:"State mismatch error",[ja]:"State not found",[Ga]:"Nonce mismatch error",[Wa]:"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.",[Ha]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Ya]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Ka]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Va]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[za]:"Token request cannot be made without authorization code or refresh token.",[Qa]:"Cannot remove null or empty scope from ScopeSet",[$a]:"Cannot append ScopeSet",[Za]:"Empty input ScopeSet cannot be processed",[Ja]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Xa]:"Device code is expired.",[es]:"Device code stopped polling for unknown reasons.",[ts]:"Please pass an account object, silent flow is not supported without account information",[os]:"Cache record object was null or undefined.",[is]:"Invalid environment when attempting to create cache entry",[rs]:"No account found in cache for given key.",[ns]:"No crypto object detected.",[as]:"Unexpected credential type.",[ss]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[ls]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[ds]:"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.",[cs]:"User defined timeout for device code polling reached",[us]:"Cannot generate a POP jwt if the token_claims are not populated",[ps]:"Server response does not contain an authorization code to proceed",[hs]:"Could not remove the credential's binding key from storage.",[ms]:"The provided authority does not support logout",[fs]:"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.",[gs]:"No network connectivity. Check your internet connection.",[Ts]:"User cancelled the flow.",[As]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ys]:"This method has not been implemented",[Is]:"The nested app auth bridge is disabled"};class Es extends Sa{constructor(e,t){super(e,t?`${_s[e]}: ${t}`:_s[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Es.prototype)}}function Os(e,t){return new Es(e,t)}
40
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Cs={createNewGuid:()=>{throw Os(ys)},base64Decode:()=>{throw Os(ys)},base64Encode:()=>{throw Os(ys)},base64UrlEncode:()=>{throw Os(ys)},encodeKid:()=>{throw Os(ys)},async getPublicKeyThumbprint(){throw Os(ys)},async removeTokenBindingKey(){throw Os(ys)},async clearKeystore(){throw Os(ys)},async signJwt(){throw Os(ys)},async hashString(){throw Os(ys)}};
41
- /*! @azure/msal-common v15.12.0 2025-08-19 */var Ns;!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"}(Ns||(Ns={}));class Rs{constructor(e,t,o){this.level=Ns.Info;const i=e||Rs.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level="number"==typeof i.logLevel?i.logLevel:Ns.Info,this.correlationId=i.correlationId||un.EMPTY_STRING,this.packageName=t||un.EMPTY_STRING,this.packageVersion=o||un.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ns.Info}}clone(e,t,o){return new Rs({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:o||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const o=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Ns[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,o,t.containsPii||!1)}executeCallback(e,t,o){this.localCallback&&this.localCallback(e,t,o)}error(e,t){this.logMessage(e,{logLevel:Ns.Error,containsPii:!1,correlationId:t||un.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Ns.Error,containsPii:!0,correlationId:t||un.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Ns.Warning,containsPii:!1,correlationId:t||un.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Ns.Warning,containsPii:!0,correlationId:t||un.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Ns.Info,containsPii:!1,correlationId:t||un.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Ns.Info,containsPii:!0,correlationId:t||un.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Ns.Verbose,containsPii:!1,correlationId:t||un.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Ns.Verbose,containsPii:!0,correlationId:t||un.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Ns.Trace,containsPii:!1,correlationId:t||un.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Ns.Trace,containsPii:!0,correlationId:t||un.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
42
- /*! @azure/msal-common v15.12.0 2025-08-19 */const bs="@azure/msal-common",ws="15.12.0",Ss="none",Ps="redirect_uri_empty",vs="claims_request_parsing_error",Ls="authority_uri_insecure",Ms="url_parse_error",xs="empty_url_error",Ds="empty_input_scopes_error",ks="invalid_claims",Us="token_request_empty",Fs="logout_request_empty",Bs="invalid_code_challenge_method",qs="pkce_params_missing",js="invalid_cloud_discovery_metadata",Gs="invalid_authority_metadata",Ws="untrusted_authority",Hs="missing_ssh_jwk",Ys="missing_ssh_kid",Ks="missing_nonce_authentication_header",Vs="invalid_authentication_header",zs="cannot_set_OIDCOptions",Qs="cannot_allow_platform_broker",$s="authority_mismatch",Zs="invalid_request_method_for_EAR",Js="invalid_authorize_post_body_parameters",Xs={[Ps]:"A redirect URI is required for all calls, and none has been set.",[vs]:"Could not parse the given claims request object.",[Ls]:"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",[Ms]:"URL could not be parsed into appropriate segments.",[xs]:"URL was empty or null.",[Ds]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[ks]:"Given claims parameter must be a stringified JSON object.",[Us]:"Token request was empty and not found in cache.",[Fs]:"The logout request was null or undefined.",[Bs]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[qs]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[js]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Gs]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Ws]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Hs]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Ys]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Ks]:"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.",[Vs]:"Invalid authentication header provided",[zs]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Qs]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[$s]:"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.",[Js]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Zs]:"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 el extends Sa{constructor(e){super(e,Xs[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,el.prototype)}}function tl(e){return new el(e)}
43
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ol{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={},o=e.split("&"),i=e=>decodeURIComponent(e.replace(/\+/g," "));return o.forEach(e=>{if(e.trim()){const[o,r]=e.split(/=(.+)/g,2);o&&r&&(t[i(o)]=i(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 il{constructor(e){const t=e?ol.trimArrayEntries([...e]):[],o=t?ol.removeEmptyStringsFromArray(t):[];if(!o||!o.length)throw tl(Ds);this.scopes=new Set,o.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||un.EMPTY_STRING).split(" ");return new il(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...In],o=new il(t);return o.containsOnlyOIDCScopes()?o.removeScope(un.OFFLINE_ACCESS_SCOPE):o.removeOIDCScopes(),o}containsScope(e){const t=this.printScopesLowerCase().split(" "),o=new il(t);return!!e&&o.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 _n.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 Os($a)}}removeScope(e){if(!e)throw Os(Qa);this.scopes.delete(e.trim())}removeOIDCScopes(){_n.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Os(Za);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 Os(Za);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),o=e.getScopeCount(),i=this.getScopeCount();return t.size<i+o}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 un.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
45
- /*! @azure/msal-common v15.12.0 2025-08-19 */function rl(e,t){return!!e&&!!t&&e===t.split(".")[1]}function nl(e,t,o,i){if(i){const{oid:t,sub:o,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=i,u=r||a||s||"";return{tenantId:u,localAccountId:t||o||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:rl(u,e)}}return{tenantId:o,localAccountId:t,username:"",isHomeTenant:rl(o,e)}}function al(e,t,o,i){let r=e;if(t){const{isHomeTenant:o,...i}=t;r={...e,...i}}if(o){const{isHomeTenant:t,...n}=nl(e.homeAccountId,e.localAccountId,e.tenantId,o);return r={...r,...n,idTokenClaims:o,idToken:i},r}return r}
46
- /*! @azure/msal-common v15.12.0 2025-08-19 */function sl(e,t){const o=function(e){if(!e)throw Os(xa);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw Os(Ma);return t[2]}(e);try{const e=t(o);return JSON.parse(e)}catch(e){throw Os(Ma)}}function ll(e,t){if(0===t||Date.now()-3e5>e+t)throw Os(Ha)}
47
- /*! @azure/msal-common v15.12.0 2025-08-19 */function dl(e){if(!e)return e;let t=e.toLowerCase();return ol.endsWith(t,"?")?t=t.slice(0,-1):ol.endsWith(t,"?/")&&(t=t.slice(0,-2)),ol.endsWith(t,"/")||(t+="/"),t}function cl(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function ul(e){if(!e||e.indexOf("=")<0)return null;try{const t=cl(e),o=Object.fromEntries(new URLSearchParams(t));if(o.code||o.ear_jwe||o.error||o.error_description||o.state)return o}catch(e){throw Os(Fa)}return null}function pl(e,t=!0,o){const i=new Array;return e.forEach((e,r)=>{!t&&o&&r in o?i.push(`${r}=${e}`):i.push(`${r}=${encodeURIComponent(e)}`)}),i.join("&")}function hl(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return dl(e.origin+e.pathname+e.search)}catch(e){return dl(t)}}
48
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ml{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw tl(xs);e.includes("#")||(this._urlString=ml.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return ol.endsWith(t,"?")?t=t.slice(0,-1):ol.endsWith(t,"?/")&&(t=t.slice(0,-2)),ol.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw tl(Ms)}if(!e.HostNameAndPort||!e.PathSegments)throw tl(Ms);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw tl(Ls)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ml.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),o=t.PathSegments;return!e||0===o.length||o[0]!==Sn&&o[0]!==Pn||(o[0]=e),ml.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw tl(Ms);const o={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=o.AbsolutePath.split("/");return i=i.filter(e=>e&&e.length>0),o.PathSegments=i,o.QueryString&&o.QueryString.endsWith("/")&&(o.QueryString=o.QueryString.substring(0,o.QueryString.length-1)),o}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),o=e.match(t);if(!o)throw tl(Ms);return o[2]}static getAbsoluteUrl(e,t){if(e[0]===un.FORWARD_SLASH){const o=new ml(t).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ml(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!ul(e)}}
49
- /*! @azure/msal-common v15.12.0 2025-08-19 */const fl={"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"}},gl={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"]}]},Tl=new Set;function Al(e,t,o,i){if(i?.trace(`getAliasesFromMetadata called with source: ${o}`),e&&t){const r=yl(t,e);if(r)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${o}, returning aliases`),r.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${o}`)}return null}function yl(e,t){for(let o=0;o<e.length;o++){const i=e[o];if(i.aliases.includes(t))return i}return null}
50
- /*! @azure/msal-common v15.12.0 2025-08-19 */gl.metadata.forEach(e=>{e.aliases.forEach(e=>{Tl.add(e)})});const Il="cache_quota_exceeded",_l="cache_error_unknown",El={[Il]:"Exceeded cache storage capacity.",[_l]:"Unexpected error occurred when using cache storage."};class Ol extends Sa{constructor(e,t){const o=t||(El[e]?El[e]:El[_l]);super(`${e}: ${o}`),Object.setPrototypeOf(this,Ol.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=o}}function Cl(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new Ol(Il):new Ol(e.name,e.message):new Ol(_l)}
51
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Nl{constructor(e,t,o,i,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=o.clone(bs,ws),this.staticAuthorityOptions=r,this.performanceClient=i}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 o=this.getAllAccounts(e,t);if(o.length>1){return o.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===o.length?o[0]:null}getBaseAccountInfo(e,t){const o=this.getAccountsFilteredBy(e,t);return o.length>0?o[0].getAccountInfo():null}buildTenantProfiles(e,t,o){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,o?.tenantId,o))}getTenantedAccountInfoByFilter(e,t,o,i,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(o,r))return null;const s=this.getIdToken(e,i,t,o.tenantId);return s&&(n=sl(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=al(e,o,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,o,i){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(o){const e=n.get(o);if(!e)return[];n=new Map([[o,e]])}const s=[];return n.forEach(e=>{const o=this.getTenantedAccountInfoByFilter(r,a,e,t,i);o&&s.push(o)}),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,o){if(!e)throw Os(os);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==o?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==o?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==o?.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 Sa?e:Cl(e)}}async saveAccessToken(e,t){const o={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},i=this.getTokenKeys(),r=il.fromString(e.target);i.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,o,!1))return;const i=this.getAccessTokenCredential(e,t);if(i&&this.credentialMatchesFilter(i,o)){il.fromString(i.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const o=this.getAccountKeys(),i=[];return o.forEach(o=>{const r=this.getAccount(o,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||i.push(r)}),i}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===Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===sa.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),o={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const i=this.getAppMetadata(t);i&&(e.environment&&!this.matchEnvironment(i,e.environment)||e.clientId&&!this.matchClientId(i,e.clientId)||(o[t]=i))}),o}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let o=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const i=this.getAuthorityMetadata(t);i&&-1!==i.aliases.indexOf(e)&&(o=i)}),o}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 o=this.getTokenKeys(),i=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);o.idToken.filter(i).forEach(e=>{this.removeIdToken(e,t)}),o.accessToken.filter(i).forEach(e=>{this.removeAccessToken(e,t)}),o.refreshToken.filter(i).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const o=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!o||o.credentialType.toLowerCase()!==Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||o.tokenType!==sa.POP)return;const i=o.keyId;i&&this.cryptoImpl.removeTokenBindingKey(i).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${i}`,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,o,i,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Zn.ID_TOKEN,clientId:this.clientId,realm:i},a=this.getIdTokensByFilter(n,t,o),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let o=a;if(!i){const t=new Map;a.forEach((o,i)=>{o.realm===e.tenantId&&t.set(i,o)});const i=t.size;if(i<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===i)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;o=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),o.forEach((e,o)=>{this.removeIdToken(o,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,o){const i=o&&o.idToken||this.getTokenKeys().idToken,r=new Map;return i.forEach(o=>{if(!this.idTokenKeyMatchesFilter(o,{clientId:this.clientId,...e}))return;const i=this.getIdTokenCredential(o,t);i&&this.credentialMatchesFilter(i,e)&&r.set(o,i)}),r}idTokenKeyMatchesFilter(e,t){const o=e.toLowerCase();return(!t.clientId||-1!==o.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==o.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,o,i){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=il.createSearchScopes(t.scopes),a=t.authenticationScheme||sa.BEARER,s=a.toLowerCase()!==sa.BEARER.toLowerCase()?Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME:Zn.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:i||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=o&&o.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 u=c.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):u>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,o){const i=e.toLowerCase();if(t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===i.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===i.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===i.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(o&&!i.includes(e[t].toLowerCase()))return!1;if(!o&&i.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const o=this.getTokenKeys(),i=[];return o.accessToken.forEach(o=>{if(!this.accessTokenKeyMatchesFilter(o,e,!0))return;const r=this.getAccessTokenCredential(o,t);r&&this.credentialMatchesFilter(r,e)&&i.push(r)}),i}getRefreshToken(e,t,o,i,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Xn:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Zn.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=i&&i.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,o);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&&o&&r.addFields({multiMatchedRT:d},o),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const o=e.toLowerCase();return(!t.familyId||-1!==o.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==o.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},o=this.getAppMetadataFilteredBy(t),i=Object.keys(o).map(e=>o[e]),r=i.length;if(r<1)return null;if(r>1)throw Os(Va);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Xn)}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 o=function(e,t){let o;const i=e.canonicalAuthority;if(i){const r=new ml(i).getUrlComponents().HostNameAndPort;o=Al(r,e.cloudDiscoveryMetadata?.metadata,oa,t)||Al(r,gl.metadata,na,t)||e.knownAuthorities}return o||[]}(this.staticAuthorityOptions,this.commonLogger);if(o.includes(t)&&o.includes(e.environment))return!0}const o=this.getAuthorityMetadataByAlias(t);return!!(o&&o.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!==Zn.ACCESS_TOKEN&&e.credentialType!==Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return il.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(Jn)}isAuthorityMetadata(e){return-1!==e.indexOf(ea)}generateAuthorityMetadataCacheKey(e){return`${ea}-${this.clientId}-${e}`}static toObject(e,t){for(const o in t)e[o]=t[o];return e}}class Rl extends Nl{async setAccount(){throw Os(ys)}getAccount(){throw Os(ys)}async setIdTokenCredential(){throw Os(ys)}getIdTokenCredential(){throw Os(ys)}async setAccessTokenCredential(){throw Os(ys)}getAccessTokenCredential(){throw Os(ys)}async setRefreshTokenCredential(){throw Os(ys)}getRefreshTokenCredential(){throw Os(ys)}setAppMetadata(){throw Os(ys)}getAppMetadata(){throw Os(ys)}setServerTelemetry(){throw Os(ys)}getServerTelemetry(){throw Os(ys)}setAuthorityMetadata(){throw Os(ys)}getAuthorityMetadata(){throw Os(ys)}getAuthorityMetadataKeys(){throw Os(ys)}setThrottlingCache(){throw Os(ys)}getThrottlingCache(){throw Os(ys)}removeItem(){throw Os(ys)}getKeys(){throw Os(ys)}getAccountKeys(){throw Os(ys)}getTokenKeys(){throw Os(ys)}generateCredentialKey(){throw Os(ys)}generateAccountKey(){throw Os(ys)}}
52
- /*! @azure/msal-common v15.12.0 2025-08-19 */const bl="AAD",wl="OIDC",Sl="EAR",Pl="acquireTokenByCode",vl="acquireTokenByRefreshToken",Ll="acquireTokenSilent",Ml="acquireTokenSilentAsync",xl="acquireTokenPopup",Dl="acquireTokenPreRedirect",kl="acquireTokenRedirect",Ul="cryptoOptsGetPublicKeyThumbprint",Fl="cryptoOptsSignJwt",Bl="silentCacheClientAcquireToken",ql="silentIframeClientAcquireToken",jl="awaitConcurrentIframe",Gl="silentRefreshClientAcquireToken",Wl="ssoSilent",Hl="standardInteractionClientGetDiscoveredAuthority",Yl="nativeInteractionClientAcquireToken",Kl="networkClientSendPostRequestAsync",Vl="refreshTokenClientExecutePostToTokenEndpoint",zl="authorizationCodeClientExecutePostToTokenEndpoint",Ql="refreshTokenClientExecuteTokenRequest",$l="refreshTokenClientAcquireToken",Zl="refreshTokenClientAcquireTokenWithCachedRefreshToken",Jl="refreshTokenClientAcquireTokenByRefreshToken",Xl="refreshTokenClientCreateTokenRequestBody",ed="acquireTokenFromCache",td="silentFlowClientAcquireCachedToken",od="silentFlowClientGenerateResultFromCacheRecord",id="acquireTokenBySilentIframe",rd="initializeBaseRequest",nd="initializeSilentRequest",ad="initializeClientApplication",sd="initializeCache",ld="silentIframeClientTokenHelper",dd="silentHandlerInitiateAuthRequest",cd="silentHandlerMonitorIframeForHash",ud="silentHandlerLoadFrame",pd="silentHandlerLoadFrameSync",hd="standardInteractionClientCreateAuthCodeClient",md="standardInteractionClientGetClientConfiguration",fd="standardInteractionClientInitializeAuthorizationRequest",gd="getAuthCodeUrl",Td="getStandardParams",Ad="handleCodeResponseFromServer",yd="handleCodeResponse",Id="handleResponseEar",_d="handleResponsePlatformBroker",Ed="handleResponseCode",Od="updateTokenEndpointAuthority",Cd="authClientAcquireToken",Nd="authClientExecuteTokenRequest",Rd="authClientCreateTokenRequestBody",bd="popTokenGenerateCnf",wd="popTokenGenerateKid",Sd="handleServerTokenResponse",Pd="deserializeResponse",vd="authorityFactoryCreateDiscoveredInstance",Ld="authorityResolveEndpointsAsync",Md="authorityGetCloudDiscoveryMetadataFromNetwork",xd="authorityUpdateCloudDiscoveryMetadata",Dd="authorityGetEndpointMetadataFromNetwork",kd="authorityUpdateEndpointMetadata",Ud="authorityUpdateMetadataWithRegionalInformation",Fd="regionDiscoveryDetectRegion",Bd="regionDiscoveryGetRegionFromIMDS",qd="regionDiscoveryGetCurrentVersion",jd="acquireTokenByCodeAsync",Gd="handleRedirectPromise",Wd="handleNativeRedirectPromise",Hd="nativeMessageHandlerHandshake",Yd="removeHiddenIframe",Kd="clearTokensAndKeysWithClaims",Vd="cacheManagerGetRefreshToken",zd="importExistingCache",Qd="setUserData",$d="localStorageUpdated",Zd="generatePkceCodes",Jd="generateCodeVerifier",Xd="generateCodeChallengeFromVerifier",ec="sha256Digest",tc="getRandomValues",oc="generateHKDF",ic="generateBaseKey",rc="base64Decode",nc="urlEncodeArr",ac="encrypt",sc="decrypt",lc="generateEarKey",dc="decryptEarResponse",cc=1;
37
+ `,or=e=>{const i=_.useNavigate(),r=o.useSelector(e=>e.AppLayout),{handlePostRequest:n}=Re();return t.jsxs(t.Fragment,{children:[t.jsxs(s.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&i(e.notificationActionPayload),e?.isNotified||(t=e.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(s.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===r.appDirection?e.notificationEnText:e.notificationArText,t.jsx(s.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(s.Typography,{color:"warning",sx:{animation:`${tr} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===r.appDirection?"New":"جديد"]})]}),t.jsxs(s.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:hi(e.createTime,r.appDirection)}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(s.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},ir=()=>{const{UserInfo:e}=we(),[i,r]=d.useState(null),{handleGetRequest:n,handlePostRequest:a}=Re(),l=_.useNavigate(),c=o.useSelector(e=>e.AppLayout),[u,p]=d.useState(!1),[h,f]=d.useState([]);er(()=>{!0===e.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>h.length&&g.toast.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),f(e.data)}})},1e3);return t.jsx(s.ClickAwayListener,{onClickAway:()=>{p(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(s.IconButton,{color:"inherit",onClick:e=>{r(e.currentTarget),p(!u)},sx:{marginRight:1,marginLeft:1},children:t.jsx(s.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:h.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(s.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:u,anchorEl:i,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(s.Fade,{...e,timeout:350,children:t.jsxs(s.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==h.length?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(s.Box,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:h.map((e,o)=>t.jsx(or,{...e,setOpen:p,showDivider:o<h.length-1}))}),t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(s.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},rr=e=>{const[o,i]=d.useState(""),[r,n]=d.useState(""),[a,l]=d.useState(""),{handlePostRequest:c}=Re();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(s.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(s.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(De,{label:"Current Password",value:o,onChange:e=>{i(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"New Password",value:r,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(De,{label:"Confirm New Password",value:a,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==o&&""!==o.trim()?null!==r&&""!==r&&null!==a&&""!==a&&r==a?await c({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:o,newPassword:r},successCallBkFn:()=>{e.onSuccessCallBk(),g.toast.success("Your request has been processed successfully")},showMask:!0}):g.toast.error("You must enter new password in required fields and must be identical"):g.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},nr=s.styled(p,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=o.useSelector(e=>e.AppLayout),i=pe();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})}}]}}),ar=()=>{const{Window:e,setWindowState:i}=Se({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),r=o.useSelector(e=>e.AppInfo.value),[n,a]=d.useState(null),l=()=>{a(null)},c=e=>{a(e.currentTarget)},u=o.useSelector(e=>e.AppLayout),p=o.useSelector(e=>e.SideBar),{UserSession:f}=we(),g=f.value.currentOrganization,{Window:T,setWindowState:y}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Re(),_=pe(),E=o.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx(rr,{selectedPerson:f.value,isSelfService:!0,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(s.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(n),onClose:l,children:t.jsx(s.MenuItem,{onClick:()=>{y(!0),l()},children:t.jsx(s.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qi,{successChangeCallBackFn:()=>{i(!1)}})}),t.jsx(nr,{position:"fixed",open:p.isOpened,children:t.jsxs(h,{children:[t.jsx(s.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{E(Zi())},edge:"start",sx:[{mr:"ltr"===u.appDirection?2:void 0,ml:"rtl"===u.appDirection?2:void 0},p.isOpened&&{display:"none"}],children:t.jsx(m.FontAwesomeIcon,{icon:"bars"})}),_?t.jsx(t.Fragment,{}):t.jsx(Ti,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:f?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(s.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${r.appName} - ${"ltr"===u.appDirection?g?.organizationEnName:g?.organizationArName}`}),t.jsx(s.Tooltip,{title:"light"===u.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{E(ge.setThemeMode("light"===u.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===u.themeMode?"dark":"light")},children:"light"===u.themeMode?t.jsx(m.FontAwesomeIcon,{icon:"moon"}):t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(s.Tooltip,{title:"ar"===A.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{let e="ar"===A.language?"en":"ar";var t;t=e,A.changeLanguage(t),localStorage.setItem("language",t),E(ge.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(m.FontAwesomeIcon,{icon:"language"})})}),f.value?.userOrganizations&&f.value?.userOrganizations.length>1?t.jsx(s.Tooltip,{title:"Change Current Organization",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{i(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===r?.enableUINotifications?t.jsx(ir,{}):t.jsx(t.Fragment,{}),_?t.jsx(t.Fragment,{}):t.jsx("div",{onClick:c,style:{cursor:"pointer"},children:t.jsx(Ti,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:f.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:_?"":f.value?.username}),t.jsx(s.IconButton,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}E(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:t.jsx(m.FontAwesomeIcon,{rotation:"rtl"===u.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},sr=s.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),lr=(e,t)=>{for(const o of t){if(o.id===e)return o;if(o.children){const t=lr(e,o.children);if(t)return t}}},dr=[...[{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 cr(){return t.jsx(W,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ur=c.styled(J.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${$.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),pr=c.styled(J.TreeItem2Content)(({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:c.alpha(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})}})),hr=V.animated(z);function mr(e){const o=V.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(hr,{style:o,...e})}const fr=c.styled(F)({color:"inherit",fontWeight:500});function gr({icon:e,expandable:i,children:r,...n}){const{t:a}=y.useTranslation(),s=o.useSelector(e=>e.AppLayout);return t.jsxs(J.TreeItem2Label,{...n,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===s.appDirection?7:void 0,marginLeft:"rtl"===s.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(fr,{variant:"body2",sx:{fontSize:16},children:a(r)}),i&&t.jsx(cr,{})]})}const Tr=e=>Array.isArray(e)?e.length>0&&e.some(Tr):Boolean(e),Ar=ce.forwardRef(function(e,o){const{id:i,itemId:r,label:n,disabled:a,children:s,...l}=e,{getRootProps:d,getContentProps:c,getIconContainerProps:u,getCheckboxProps:p,getLabelProps:h,getGroupTransitionProps:m,getDragAndDropOverlayProps:f,status:g,publicAPI:T}=Z.useTreeItem2({id:i,itemId:r,children:s,label:n,disabled:a,rootRef:o}),A=T.getItem(r),y=Tr(s);return t.jsx(ee.TreeItem2Provider,{itemId:r,children:t.jsxs(ur,{...d(l),children:[t.jsxs(pr,{...c({className:ai("content",{"Mui-expanded":g.expanded,"Mui-selected":g.selected,"Mui-focused":g.focused,"Mui-disabled":g.disabled})}),children:[t.jsx(J.TreeItem2IconContainer,{...u(),children:t.jsx(X.TreeItem2Icon,{status:g})}),t.jsx(J.TreeItem2Checkbox,{...p()}),t.jsx(gr,{...h({icon:A?.icon||"book",expandable:y&&g.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...f()})]}),s&&t.jsx(mr,{...m()})]})})});function yr(){const e=_.useNavigate(),i=o.useSelector(e=>e.AppLayout),r=o.useSelector(e=>e.AppInfo.value),n=o.useDispatch(),a=pe(),{isUserAuthorized:s,isCurrentOrganizationAuthorizedToModule:l}=we(),d=e=>{const t=[];for(let o of e)if((void 0===o.authority||null==o.authority||s(o.authority))&&(void 0===o.applicationModule||null===o.applicationModule||l(o.applicationModule))){let e=structuredClone(o);o?.children&&(e.children=d(o.children)),t.push(e)}return t},c=[];r.enableAdministrationModule&&c.push(...structuredClone(dr)),c.push(...structuredClone(r.businessNavigationItems));const u=d(c);return t.jsx(Q.RichTreeView,{items:u,onItemClick:(t,o)=>{const i=lr(o,c);"NAVIGATION"===i?.action&&null!=i?.actionPayload&&(e(i?.actionPayload?.path||""),a&&n(Zi()))},sx:{height:"fit-content",flexGrow:1,maxWidth:he,direction:i.appDirection,maxHeight:a?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ar}})}const Ir=()=>{const e=o.useSelector(e=>e.AppInfo.value),{UserSession:i}=we(),r=i.value.currentOrganization,n=s.useTheme(),a=o.useSelector(e=>e.AppLayout),l=o.useSelector(e=>e.SideBar),d=o.useDispatch();return t.jsxs(K,{sx:{width:he,flexShrink:0,"& .MuiDrawer-paper":{width:he,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===a.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(sr,{children:[t.jsxs(s.Box,{sx:{width:"100%"},children:[t.jsx(s.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===a.appDirection?r?.organizationEnName:r?.organizationArName}`}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(Y,{onClick:()=>{d(Zi())},children:"ltr"===n.direction?t.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(v,{}),t.jsx(yr,{})]})},_r=re({key:"muirtl",stylisPlugins:[ie.prefixer,oe]}),Er=re({key:"mui"}),Or=e=>{const[o,i]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{i(e.data.currentRoles),n(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"roleName",options:r,valueField:"id",selectedOptions:o,setSelection:i}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:o,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Cr=e=>{const[i,r]=d.useState(null),{Window:n,setWindowState:a}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=o.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),c=o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:u}=y.useTranslation(),[p,h]=d.useState([]),m=xe({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:h}),f=[{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:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,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 t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Or,{selectedRecord:i,closeModalFn:()=>{a(!1)}})}),t.jsx(vi,{apiActions:m,hideInfoBar:!0,data:p,setData:h,editMode:{editMode:"row"},formElements:f,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{r(e),a(!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"}})]})},Nr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),n=xe({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:a}=Re(),s=o.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=o.useDispatch();return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,setData:r,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 a({endPointURI:s.url,showMask:!1,successCallBkFn:e=>{l(ve({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(ve({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Rr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),{handleGetRequest:n}=Re(),a=o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),s=o.useDispatch(),l=xe({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),c=[{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:o.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),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:i,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vi,{apiActions:l,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:c,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:a.url,showMask:!1,successCallBkFn:e=>{s(ve({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{s(ve({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},br=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:i});return t.jsx(vi,{apiActions:r,data:o,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"}})},wr=()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState([]),n=xe({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:r}),a=o.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:s}=Re(),l=[{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:a,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"}}];return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:l,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"}})},Sr=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:i});return t.jsx(vi,{apiActions:r,data:o,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"}})},Pr=e=>{const[o,i]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{i(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"authorityName",options:r,valueField:"id",selectedOptions:o,setSelection:i}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:o,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},vr=()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=xe({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:i});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Pr,{roleId:r?.id,closeModalFn:()=>{s(!1)}})}),t.jsx(vi,{apiActions:l,data:o,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=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Lr=e=>{const i=o.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:a}),l=[{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:i,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"}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:r("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"}})},Mr=()=>{const e=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:n}),s=[{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"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,hideInfoBar:!0,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:i("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},xr=e=>{const{t:i}=y.useTranslation(),r=o.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:a}),l=[{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:r,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 t.jsx(vi,{apiActions:s,data:n,hideInfoBar:!0,setData:a,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},Dr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],kr=(e,t,o,i,r)=>{i?("useSysDatasource"===i&&1==r?(t.hideField("datasourceConId"),o.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===i&&("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")))},Ur=e=>{const{t:o}=y.useTranslation(),[i,r]=d.useState([]),n=xe({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:r});return t.jsx(vi,{apiActions:n,data:i,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,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:o("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!pi(t.recipientMail)?(g.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Fr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=xe({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:n}),l=[{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:a,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 t.jsx(vi,{apiActions:s,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},Br=e=>{const i=o.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:a}),l=[{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:i,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 t.jsx(vi,{apiActions:s,data:n,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:r("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"}})},qr={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}}},jr=(e,t,o)=>{if(e&&qr[e]){const i=qr[e],r=Object.keys(i);for(const e of r){i[e].isVisible?t.showField(e):(t.hideField(e),o.setValue(e,null))}}else t.hideField("mailHost"),o.setValue("mailHost",null),t.hideField("mailPort"),o.setValue("mailPort",null),t.hideField("mailUsername"),o.setValue("mailUsername",null),t.hideField("mailPassword"),o.setValue("mailPassword",null),t.hideField("mailProtocol"),o.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),o.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),o.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),o.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),o.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),o.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),o.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),o.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),o.setValue("azureGraphApiEmailId",null)},Gr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:n}),s=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{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:s,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:s,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 t.jsx(vi,{apiActions:a,data:r,setData:n,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:i("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"}})},Wr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:n}),s=[{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:o.useSelector(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 t.jsx(vi,{apiActions:a,data:r,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:i("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"}})},Hr=e=>{const[o,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:a}=y.useTranslation(),{handleGetRequest:s}=Re(),[l,c]=d.useState([]);d.useEffect(()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()},[e.selectedRecord]);const[u,p]=d.useState([]),h=xe({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:p}),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:"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:l,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Wr,{selectedRecord:o})}),t.jsx(vi,{apiActions:h,data:u,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:p,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{i(e),n(!0)}}],formElements:m,keyColumnName:"id",gridTitle:a("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"}})]})},Yr=e=>{const{t:i}=y.useTranslation(),[r,n]=d.useState([]),a=o.useSelector(e=>e.commonStores.stores.SystemWidgets.data),s=xe({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:n}),l=[{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:a,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"}}];return t.jsx(vi,{apiActions:s,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:i("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"}})},Kr=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:i}),n=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(Ti,{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 t.jsx(t.Fragment,{children:t.jsx(vi,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:o,setData:i,editMode:{editMode:"row"},formElements:n,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:Cr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:i});return t.jsx(vi,{apiActions:r,data:o,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:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Rr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:br,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState(null),{UserInfo:n}=we(),a=o.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=o.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[c,u]=d.useState([]),p=xe({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:u}),[h,m]=d.useState(null),{Window:f,setWindowState:T}=Se({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:A,setWindowState:I}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:_,setWindowState:E}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),O=[{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=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(Ti,{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:a,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,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 t.jsxs(t.Fragment,{children:[t.jsx(A,{children:t.jsx(Or,{selectedRecord:h,closeModalFn:()=>{I(!1)}})}),t.jsx(f,{children:t.jsx(Cr,{selectedPerson:i})}),t.jsx(_,{children:t.jsx(rr,{selectedPerson:i,isSelfService:!1,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(vi,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:p,data:c,setData:u,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:O,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{r(e),E(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{m({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),I(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),T(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.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||(g.toast.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}=y.useTranslation(),[o,i]=d.useState([]),r=xe({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 t.jsx(t.Fragment,{children:t.jsx(vi,{apiActions:r,data:o,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:wr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Sr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:vr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:i});return t.jsx(vi,{apiActions:r,data:o,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}=y.useTranslation(),{handleGetRequest:i}=Re(),[r,n]=d.useState([]),a=xe({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:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:o.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),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"}}];return t.jsx(vi,{apiActions:a,data:r,hideInfoBar:!0,setData:n,editMode:{editMode:"row"},formElements:s,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:br,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Rr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Nr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:n}),s=[{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:i,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,editMode:{editMode:"row",reloadAfterSave:!0},formElements:s,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,i]=d.useState(null),{Window:r,setWindowState:n}=Se({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),a=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:s}=y.useTranslation(),[l,c]=d.useState([]),u=xe({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),p=[{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:a,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Lr,{selectedRecord:e})}),t.jsx(vi,{apiActions:u,rowActions:[{label:"Query Parameters",actionFn:async e=>{i(e),n(!0)},icon:"p"}],data:l,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:p,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,o,i,r)=>{i?"useSysCon"===i&&1==r?(t.hideField("datasourceConId"),o.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Re(),i=o.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:a,commonStoreKey:"SystemDataSources"}),l=[{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:i,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"}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:r("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=>{g.toast.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}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:n}),s=[{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:i,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:o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),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"}}];return t.jsx(vi,{apiActions:a,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,o,i,r,n)=>{i?"parameterType"===i?("combobox"===r?(o.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?o.setValue("parameterValueFormat",je):o.setValue("parameterValueFormat",Ge)):(t.hideField("parameterValueFormat"),o.setValue("parameterValueFormat",null))):"parameterDataQueryId"==i?null!=r&&""!=r?(o.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==i&&(null!=r&&""!=r?(o.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(o.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"),o.setValue("parameterValueFormat",je)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),o.setValue("parameterValueFormat",Ge)):(o.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:Mr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=y.useTranslation(),[i,r]=d.useState(null),{Window:n,setWindowState:a}=Se({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:l}=Se({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,u]=d.useState([]),p=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),h=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),m=o.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),f=xe({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:u}),T=[{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:Dr,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:p,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:m,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:h,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 t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Di,{reportCode:i?.reportCode,resultMode:"App"})}),t.jsx(s,{children:t.jsx(xr,{selectedRecord:i})}),t.jsx(vi,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:f,data:c,setData:u,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)=>{r(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{r(e),a(!0)}}],formProps:{formValuesChangeCallBk:kr},formElements:T,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)||(g.toast.error("You must choose the report query"),!1):(g.toast.error("You must choose the report blueprint"),!1):(g.toast.error("You must enter the jasper report name"),!1):(g.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),i=o.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:c}=Se({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:u,setWindowState:p}=Se({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:h}=y.useTranslation(),[m,f]=d.useState([]),T=xe({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:f}),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_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:i,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 t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ur,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(l,{children:t.jsx(Fr,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(u,{children:t.jsx(Br,{selectedRecord:r,callBkFn:()=>{p(!1)}})}),t.jsx(vi,{apiActions:T,data:m,setData:f,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:A,keyColumnName:"id",gridTitle:h("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),p(!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)||(g.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(g.toast.error("You must specifiy the period value since this email is periodical"),!1):(g.toast.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}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:i}),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:"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,o,i,r){jr(t,i,o)}}}},{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"}}];return t.jsx(vi,{apiActions:r,data:o,setData:i,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:n,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,o)=>{jr(o.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Document Status",windowIcon:"tag"}),{Window:a,setWindowState:s}=Se({windowTitle:"Document Action",windowIcon:"stamp"}),l=o.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=o.useSelector(e=>e.commonStores.stores.SystemReports.data),u=o.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:p}=y.useTranslation(),[h,m]=d.useState([]),f=xe({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:m}),g=[{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:l,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:c,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:u,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 t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Gr,{selectedRecord:e})}),t.jsx(a,{children:t.jsx(Hr,{selectedRecord:e})}),t.jsx(vi,{apiActions:f,data:h,setData:m,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{i(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{i(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:p("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:g,keyColumnName:"id",gridTitle:p("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}=y.useTranslation(),i=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),r=o.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[n,a]=d.useState([]),s=xe({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:a}),l=[{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:r,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:i,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"}}]}}];return t.jsx(vi,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,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}=y.useTranslation(),[o,i]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[a,s]=d.useState([]),l=_.useNavigate(),c=xe({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Yr,{selectedRecord:o})}),t.jsx(vi,{apiActions:c,data:a,setData:s,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),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/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:zi},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:i});return t.jsx(vi,{apiActions:r,data:o,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}=y.useTranslation(),[i,r]=d.useState([]),{handlePostRequest:n}=Re(),a=xe({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:r}),s=o.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{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:s,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"}}];return t.jsx(vi,{apiActions:a,disableDefaultAction:!0,data:i,setData:r,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await n({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{a.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:wr},{path:"dev/system/roles",component:vr},{path:"dev/system/lookups",component:Mr},{path:"dev/system/modules",component:Sr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=y.useTranslation(),[o,i]=d.useState([]),r=xe({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:i}),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:"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:Dr,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"}}];return t.jsx(vi,{apiActions:r,data:o,setData:i,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:n,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}=y.useTranslation(),[i,r]=d.useState([]),n=o.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),a=o.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=xe({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),c=[{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:a,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:a,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:n,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=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{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=>t.jsx(s.Box,{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 t.jsx(vi,{apiActions:l,data:i,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:c,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}=we(),i=o.useSelector(e=>e.AppLayout),{handleGetRequest:r,handlePostRequest:n}=Re(),[a,l]=d.useState([]),c=o.useSelector(e=>e.AppInfo.value),u=()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===c?.enableUINotifications&&er(u,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===i.appDirection?"Notifications":"الاشعارات"]}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Button,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(s.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(s.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(s.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:a.map((e,o)=>t.jsx(or,{...e,showDivider:o<a.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fi}]]],Vr=e=>{const{isUserAuthorized:o,isCurrentOrganizationAuthorizedToModule:i}=we();return e?.applicationModule&&!i(e?.applicationModule)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!o(e.authority)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},zr=()=>{const e=o.useSelector(e=>e.AppLayout),i=o.useSelector(e=>e.AppInfo.value),r=o.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:n}=we(),a=o.useDispatch(),{show:c,hide:u}=Ee(),p=o.useSelector(e=>e.commonStores),[h,m]=d.useState(!1),{isUserAuthorized:f}=we(),{handleGetRequest:g}=Re();d.useEffect(()=>{p?.storeKeys&&(async()=>{c("Loading ... please wait"),m(!1);const e=p.stores,t=p.storeKeys;for(let o of t)void 0!==e[o]?.authority&&null!==e[o]?.authority&&!f(e[o]?.authority)||""==e[o]?.url||!0!==e[o].autoLoad||g({endPointURI:e[o].url,showMask:!1,successCallBkFn:e=>{a(ve({storeKey:o,data:e.data}))},failureCallBkFn:()=>{a(ve({storeKey:o,data:[]}))}});m(!0),u()})()},[p.storeKeys,n?.currentOrganization]);const T=pe();return t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?Er:_r,children:t.jsx(s.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:T?1:3},children:t.jsxs(_.Routes,{children:[i.enableAdministrationModule?Kr.map((e,o)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+o)):null,r.map((e,o)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+o))]})})})},Qr=c.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function $r(e){const{window:i}=e,r=o.useSelector(e=>e.SideBar),n=o.useSelector(e=>e.AppInfo.value),a=o.useDispatch(),l=e=>{a(Ji(e))},d=void 0!==i?()=>i().document.body:void 0;return t.jsx(se,{container:d,anchor:"bottom",open:r.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qr,{}),t.jsx(s.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(yr,{})}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Zr=()=>{const{t:e}=y.useTranslation(),i=o.useSelector(e=>e.loadingMask.value),r=o.useSelector(e=>e.AppLayout);return t.jsxs(s.Backdrop,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:i.isOpened,children:[t.jsx(s.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:i?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Jr=()=>{const e=o.useSelector(e=>e.AppInfo.value),[i,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=o.useSelector(e=>e.UserSession.value),h=o.useDispatch(),m=async()=>{if(null==i||""==i)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:i,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=o.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let o=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=o&&null!=o.data){const e={...o.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsx(s.Box,{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:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:300,m:1},value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},Xr=()=>{const[e,i]=d.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:r}=Re(),n=o.useSelector(e=>e.AppInfo.value);return d.useEffect(()=>{if(n?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{n?.checkLicense?.endpoint&&await r({endPointURI:n.checkLicense?.endpoint,successCallBkFn:e=>{i(e.data)}})})()},n?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[n]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{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:[t.jsx("img",{src:n.appLogo,style:{height:200,width:200}}),t.jsxs(s.Typography,{variant:"h5",children:[n.appName," - ",n.appVersion]}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(s.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(s.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},en=({msalInstance:e})=>{const i=o.useSelector(e=>e.AppInfo.value);o.useSelector(e=>e.UserSession.value);const[r,n]=d.useState(!1),{handleGetRequest:a}=Re(),c=o.useDispatch(),u=async()=>{localStorage.getItem("TOKEN")?i?.apiBaseUrl&&a({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(n(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};c(Ce.setAuthenticated(t))}else c(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{n(!1)}}):(c(Ce.setUnAuthenticated()),n(!1))},p=o.useSelector(e=>e.UserSession.value);d.useEffect(()=>{u()},[i]);const h=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:i?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===i?.loginScreenStyle?.themeMode?i.appTheme?.light?.primaryColor||We:i.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===i?.loginScreenStyle?.themeMode?i.appTheme?.light?.secondaryColor||He:i.appTheme?.dark?.secondaryColor||Ke}}});return t.jsx(l.ThemeProvider,{theme:h,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:`url('/${i?.loginScreenStyle?.backgroundImageNameInPublicFolder}')`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:i?.loginScreenStyle?.backgroundColor,zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:i?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),t.jsx(s.Button,{loading:r,onClick:async()=>{n(!0);const t=await e.acquireTokenPopup({scopes:i?.azureConfiguration?.scopes});t?.accessToken?(localStorage.setItem("TOKEN",t.accessToken),u()):n(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:t.jsx(m.FontAwesomeIcon,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},tn=()=>{const e=o.useSelector(e=>e.AppInfo.value),[i,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=o.useSelector(e=>e.UserSession.value),h=o.useDispatch(),m=async()=>{if(null==i||""==i)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:i,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=o.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let o=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=o&&null!=o.data){const e={...o.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%"},children:[t.jsx("img",{src:e?.appLogo,width:70,height:70}),t.jsx(s.Typography,{sx:{m:1},variant:"caption",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:200,textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:200,m:1},value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:200,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},on=c.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const i=o.useSelector(e=>e.AppLayout),r=c.useTheme(),n=pe();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!n&&t?"calc(100% - 350px)":"100%",direction:i.appDirection,justifyContent:"flex-start",transition:!0===t?r.transitions.create(["margin","width"],{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}):r.transitions.create(["margin","width"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.leavingScreen}),marginLeft:n||"ltr"!==i.appDirection||!0!==t?0:he+"px",marginRight:n||"rtl"!==i.appDirection||!0!==t?0:he+"px"}}),rn=({msalInstance:e})=>{const i=o.useSelector(e=>e.SideBar),r=o.useSelector(e=>e.AppInfo.value),n=pe(),a=o.useSelector(e=>e.UserSession),s=o.useSelector(e=>e.AppLayout);return t.jsxs(_.BrowserRouter,{children:[t.jsx(g.ToastContainer,{rtl:"rtl"===s.appDirection,draggable:!0,position:"bottom-center"}),t.jsx(Zr,{}),!0===a.value.isAuthenticated?t.jsxs(on,{open:i.isOpened,children:[t.jsx(u,{}),t.jsx(ar,{}),n?null:t.jsx(Ir,{}),n?t.jsx($r,{}):null,t.jsx(sr,{}),t.jsx(zr,{}),t.jsx(Xr,{})]}):"AZURE"===r.authenticationMethod?t.jsx(en,{msalInstance:e}):n?t.jsx(tn,{}):t.jsx(Jr,{})]})},nn=f.createSlice({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}}}),an=nn.actions;var sn=nn.reducer;const ln={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"}},dn={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"},cn=200,un=400,pn=400,hn=499,mn=500,fn=599,gn="GET",Tn="POST",An=[dn.OPENID_SCOPE,dn.PROFILE_SCOPE,dn.OFFLINE_ACCESS_SCOPE],yn=[...An,dn.EMAIL_SCOPE],In="Content-Type",_n="Content-Length",En="Retry-After",On="X-AnchorMailbox",Cn="x-ms-request-id",Nn="x-ms-httpver",Rn="active-account-filters",bn="common",wn="organizations",Sn="consumers",Pn="access_token",vn="xms_cc",Ln="login",Mn="select_account",xn="consent",Dn="none",kn="no_session",Un="code",Fn="id_token token refresh_token",Bn="query",qn="fragment",jn="query",Gn="authorization_code",Wn="refresh_token",Hn="MSSTS",Yn="ADFS",Kn="Generic",Vn="-",zn=".",Qn={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},$n="appmetadata",Zn="1",Jn="authority-metadata",Xn=86400,ea="config",ta="cache",oa="network",ia="hardcoded_values",ra={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"},na={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},aa=60,sa=3600,la="throttling",da="retry-after, h429",ca="invalid_grant",ua="client_mismatch",pa="1",ha="3",ma="4",fa="2",ga="4",Ta="5",Aa="0",ya="1",Ia="2",_a="3",Ea="4",Oa="pop",Ca="unexpected_error",Na="post_request_failed",Ra={[Ca]:"Unexpected error in authentication.",[Na]:"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 ba extends Error{constructor(e,t,o){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,ba.prototype),this.errorCode=e||dn.EMPTY_STRING,this.errorMessage=t||dn.EMPTY_STRING,this.subError=o||dn.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function wa(e,t){return new ba(e,t?`${Ra[e]} ${t}`:Ra[e])}
39
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Sa="client_info_decoding_error",Pa="client_info_empty_error",va="token_parsing_error",La="null_or_empty_token",Ma="endpoints_resolution_error",xa="network_error",Da="openid_config_error",ka="hash_not_deserialized",Ua="invalid_state",Fa="state_mismatch",Ba="state_not_found",qa="nonce_mismatch",ja="auth_time_not_found",Ga="max_age_transpired",Wa="multiple_matching_tokens",Ha="multiple_matching_accounts",Ya="multiple_matching_appMetadata",Ka="request_cannot_be_made",Va="cannot_remove_empty_scope",za="cannot_append_scopeset",Qa="empty_input_scopeset",$a="device_code_polling_cancelled",Za="device_code_expired",Ja="device_code_unknown_error",Xa="no_account_in_silent_request",es="invalid_cache_record",ts="invalid_cache_environment",os="no_account_found",is="no_crypto_object",rs="unexpected_credential_type",ns="invalid_assertion",as="invalid_client_credential",ss="token_refresh_required",ls="user_timeout_reached",ds="token_claims_cnf_required_for_signedjwt",cs="authorization_code_missing_from_server_response",us="binding_key_not_removed",ps="end_session_endpoint_not_supported",hs="key_id_missing",ms="no_network_connectivity",fs="user_canceled",gs="missing_tenant_id_error",Ts="method_not_implemented",As="nested_app_auth_bridge_disabled",ys={[Sa]:"The client info could not be parsed/decoded correctly",[Pa]:"The client info was empty",[va]:"Token cannot be parsed",[La]:"The token is null or empty",[Ma]:"Endpoints cannot be resolved",[xa]:"Network request failed",[Da]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[ka]:"The hash parameters could not be deserialized",[Ua]:"State was not the expected format",[Fa]:"State mismatch error",[Ba]:"State not found",[qa]:"Nonce mismatch error",[ja]:"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.",[Ga]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Wa]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Ha]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Ya]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Ka]:"Token request cannot be made without authorization code or refresh token.",[Va]:"Cannot remove null or empty scope from ScopeSet",[za]:"Cannot append ScopeSet",[Qa]:"Empty input ScopeSet cannot be processed",[$a]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Za]:"Device code is expired.",[Ja]:"Device code stopped polling for unknown reasons.",[Xa]:"Please pass an account object, silent flow is not supported without account information",[es]:"Cache record object was null or undefined.",[ts]:"Invalid environment when attempting to create cache entry",[os]:"No account found in cache for given key.",[is]:"No crypto object detected.",[rs]:"Unexpected credential type.",[ns]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[as]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[ss]:"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.",[ls]:"User defined timeout for device code polling reached",[ds]:"Cannot generate a POP jwt if the token_claims are not populated",[cs]:"Server response does not contain an authorization code to proceed",[us]:"Could not remove the credential's binding key from storage.",[ps]:"The provided authority does not support logout",[hs]:"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.",[ms]:"No network connectivity. Check your internet connection.",[fs]:"User cancelled the flow.",[gs]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ts]:"This method has not been implemented",[As]:"The nested app auth bridge is disabled"};class Is extends ba{constructor(e,t){super(e,t?`${ys[e]}: ${t}`:ys[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Is.prototype)}}function _s(e,t){return new Is(e,t)}
40
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Es={createNewGuid:()=>{throw _s(Ts)},base64Decode:()=>{throw _s(Ts)},base64Encode:()=>{throw _s(Ts)},base64UrlEncode:()=>{throw _s(Ts)},encodeKid:()=>{throw _s(Ts)},async getPublicKeyThumbprint(){throw _s(Ts)},async removeTokenBindingKey(){throw _s(Ts)},async clearKeystore(){throw _s(Ts)},async signJwt(){throw _s(Ts)},async hashString(){throw _s(Ts)}};
41
+ /*! @azure/msal-common v15.12.0 2025-08-19 */var Os;!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"}(Os||(Os={}));class Cs{constructor(e,t,o){this.level=Os.Info;const i=e||Cs.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level="number"==typeof i.logLevel?i.logLevel:Os.Info,this.correlationId=i.correlationId||dn.EMPTY_STRING,this.packageName=t||dn.EMPTY_STRING,this.packageVersion=o||dn.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Os.Info}}clone(e,t,o){return new Cs({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:o||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const o=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Os[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,o,t.containsPii||!1)}executeCallback(e,t,o){this.localCallback&&this.localCallback(e,t,o)}error(e,t){this.logMessage(e,{logLevel:Os.Error,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Os.Error,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Os.Warning,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Os.Warning,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Os.Info,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Os.Info,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Os.Verbose,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Os.Verbose,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Os.Trace,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Os.Trace,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
42
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Ns="@azure/msal-common",Rs="15.12.0",bs="none",ws="redirect_uri_empty",Ss="claims_request_parsing_error",Ps="authority_uri_insecure",vs="url_parse_error",Ls="empty_url_error",Ms="empty_input_scopes_error",xs="invalid_claims",Ds="token_request_empty",ks="logout_request_empty",Us="invalid_code_challenge_method",Fs="pkce_params_missing",Bs="invalid_cloud_discovery_metadata",qs="invalid_authority_metadata",js="untrusted_authority",Gs="missing_ssh_jwk",Ws="missing_ssh_kid",Hs="missing_nonce_authentication_header",Ys="invalid_authentication_header",Ks="cannot_set_OIDCOptions",Vs="cannot_allow_platform_broker",zs="authority_mismatch",Qs="invalid_request_method_for_EAR",$s="invalid_authorize_post_body_parameters",Zs={[ws]:"A redirect URI is required for all calls, and none has been set.",[Ss]:"Could not parse the given claims request object.",[Ps]:"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",[vs]:"URL could not be parsed into appropriate segments.",[Ls]:"URL was empty or null.",[Ms]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[xs]:"Given claims parameter must be a stringified JSON object.",[Ds]:"Token request was empty and not found in cache.",[ks]:"The logout request was null or undefined.",[Us]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Fs]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Bs]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[qs]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[js]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Gs]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Ws]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Hs]:"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.",[Ys]:"Invalid authentication header provided",[Ks]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Vs]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[zs]:"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.",[$s]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Qs]:"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 Js extends ba{constructor(e){super(e,Zs[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Js.prototype)}}function Xs(e){return new Js(e)}
43
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class el{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={},o=e.split("&"),i=e=>decodeURIComponent(e.replace(/\+/g," "));return o.forEach(e=>{if(e.trim()){const[o,r]=e.split(/=(.+)/g,2);o&&r&&(t[i(o)]=i(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 tl{constructor(e){const t=e?el.trimArrayEntries([...e]):[],o=t?el.removeEmptyStringsFromArray(t):[];if(!o||!o.length)throw Xs(Ms);this.scopes=new Set,o.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||dn.EMPTY_STRING).split(" ");return new tl(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...An],o=new tl(t);return o.containsOnlyOIDCScopes()?o.removeScope(dn.OFFLINE_ACCESS_SCOPE):o.removeOIDCScopes(),o}containsScope(e){const t=this.printScopesLowerCase().split(" "),o=new tl(t);return!!e&&o.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 yn.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 _s(za)}}removeScope(e){if(!e)throw _s(Va);this.scopes.delete(e.trim())}removeOIDCScopes(){yn.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw _s(Qa);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 _s(Qa);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),o=e.getScopeCount(),i=this.getScopeCount();return t.size<i+o}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 dn.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
45
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function ol(e,t){return!!e&&!!t&&e===t.split(".")[1]}function il(e,t,o,i){if(i){const{oid:t,sub:o,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=i,u=r||a||s||"";return{tenantId:u,localAccountId:t||o||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:ol(u,e)}}return{tenantId:o,localAccountId:t,username:"",isHomeTenant:ol(o,e)}}function rl(e,t,o,i){let r=e;if(t){const{isHomeTenant:o,...i}=t;r={...e,...i}}if(o){const{isHomeTenant:t,...n}=il(e.homeAccountId,e.localAccountId,e.tenantId,o);return r={...r,...n,idTokenClaims:o,idToken:i},r}return r}
46
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function nl(e,t){const o=function(e){if(!e)throw _s(La);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw _s(va);return t[2]}(e);try{const e=t(o);return JSON.parse(e)}catch(e){throw _s(va)}}function al(e,t){if(0===t||Date.now()-3e5>e+t)throw _s(Ga)}
47
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function sl(e){if(!e)return e;let t=e.toLowerCase();return el.endsWith(t,"?")?t=t.slice(0,-1):el.endsWith(t,"?/")&&(t=t.slice(0,-2)),el.endsWith(t,"/")||(t+="/"),t}function ll(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function dl(e){if(!e||e.indexOf("=")<0)return null;try{const t=ll(e),o=Object.fromEntries(new URLSearchParams(t));if(o.code||o.ear_jwe||o.error||o.error_description||o.state)return o}catch(e){throw _s(ka)}return null}function cl(e,t=!0,o){const i=new Array;return e.forEach((e,r)=>{!t&&o&&r in o?i.push(`${r}=${e}`):i.push(`${r}=${encodeURIComponent(e)}`)}),i.join("&")}function ul(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return sl(e.origin+e.pathname+e.search)}catch(e){return sl(t)}}
48
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class pl{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Xs(Ls);e.includes("#")||(this._urlString=pl.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return el.endsWith(t,"?")?t=t.slice(0,-1):el.endsWith(t,"?/")&&(t=t.slice(0,-2)),el.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Xs(vs)}if(!e.HostNameAndPort||!e.PathSegments)throw Xs(vs);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Xs(Ps)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return pl.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),o=t.PathSegments;return!e||0===o.length||o[0]!==bn&&o[0]!==wn||(o[0]=e),pl.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Xs(vs);const o={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=o.AbsolutePath.split("/");return i=i.filter(e=>e&&e.length>0),o.PathSegments=i,o.QueryString&&o.QueryString.endsWith("/")&&(o.QueryString=o.QueryString.substring(0,o.QueryString.length-1)),o}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),o=e.match(t);if(!o)throw Xs(vs);return o[2]}static getAbsoluteUrl(e,t){if(e[0]===dn.FORWARD_SLASH){const o=new pl(t).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new pl(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!dl(e)}}
49
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const hl={"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"}},ml={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"]}]},fl=new Set;function gl(e,t,o,i){if(i?.trace(`getAliasesFromMetadata called with source: ${o}`),e&&t){const r=Tl(t,e);if(r)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${o}, returning aliases`),r.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${o}`)}return null}function Tl(e,t){for(let o=0;o<e.length;o++){const i=e[o];if(i.aliases.includes(t))return i}return null}
50
+ /*! @azure/msal-common v15.12.0 2025-08-19 */ml.metadata.forEach(e=>{e.aliases.forEach(e=>{fl.add(e)})});const Al="cache_quota_exceeded",yl="cache_error_unknown",Il={[Al]:"Exceeded cache storage capacity.",[yl]:"Unexpected error occurred when using cache storage."};class _l extends ba{constructor(e,t){const o=t||(Il[e]?Il[e]:Il[yl]);super(`${e}: ${o}`),Object.setPrototypeOf(this,_l.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=o}}function El(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new _l(Al):new _l(e.name,e.message):new _l(yl)}
51
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Ol{constructor(e,t,o,i,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=o.clone(Ns,Rs),this.staticAuthorityOptions=r,this.performanceClient=i}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 o=this.getAllAccounts(e,t);if(o.length>1){return o.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===o.length?o[0]:null}getBaseAccountInfo(e,t){const o=this.getAccountsFilteredBy(e,t);return o.length>0?o[0].getAccountInfo():null}buildTenantProfiles(e,t,o){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,o?.tenantId,o))}getTenantedAccountInfoByFilter(e,t,o,i,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(o,r))return null;const s=this.getIdToken(e,i,t,o.tenantId);return s&&(n=nl(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=rl(e,o,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,o,i){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(o){const e=n.get(o);if(!e)return[];n=new Map([[o,e]])}const s=[];return n.forEach(e=>{const o=this.getTenantedAccountInfoByFilter(r,a,e,t,i);o&&s.push(o)}),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,o){if(!e)throw _s(es);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==o?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==o?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==o?.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 ba?e:El(e)}}async saveAccessToken(e,t){const o={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},i=this.getTokenKeys(),r=tl.fromString(e.target);i.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,o,!1))return;const i=this.getAccessTokenCredential(e,t);if(i&&this.credentialMatchesFilter(i,o)){tl.fromString(i.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const o=this.getAccountKeys(),i=[];return o.forEach(o=>{const r=this.getAccount(o,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||i.push(r)}),i}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===Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===na.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),o={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const i=this.getAppMetadata(t);i&&(e.environment&&!this.matchEnvironment(i,e.environment)||e.clientId&&!this.matchClientId(i,e.clientId)||(o[t]=i))}),o}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let o=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const i=this.getAuthorityMetadata(t);i&&-1!==i.aliases.indexOf(e)&&(o=i)}),o}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 o=this.getTokenKeys(),i=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);o.idToken.filter(i).forEach(e=>{this.removeIdToken(e,t)}),o.accessToken.filter(i).forEach(e=>{this.removeAccessToken(e,t)}),o.refreshToken.filter(i).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const o=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!o||o.credentialType.toLowerCase()!==Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||o.tokenType!==na.POP)return;const i=o.keyId;i&&this.cryptoImpl.removeTokenBindingKey(i).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${i}`,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,o,i,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Qn.ID_TOKEN,clientId:this.clientId,realm:i},a=this.getIdTokensByFilter(n,t,o),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let o=a;if(!i){const t=new Map;a.forEach((o,i)=>{o.realm===e.tenantId&&t.set(i,o)});const i=t.size;if(i<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===i)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;o=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),o.forEach((e,o)=>{this.removeIdToken(o,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,o){const i=o&&o.idToken||this.getTokenKeys().idToken,r=new Map;return i.forEach(o=>{if(!this.idTokenKeyMatchesFilter(o,{clientId:this.clientId,...e}))return;const i=this.getIdTokenCredential(o,t);i&&this.credentialMatchesFilter(i,e)&&r.set(o,i)}),r}idTokenKeyMatchesFilter(e,t){const o=e.toLowerCase();return(!t.clientId||-1!==o.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==o.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,o,i){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=tl.createSearchScopes(t.scopes),a=t.authenticationScheme||na.BEARER,s=a.toLowerCase()!==na.BEARER.toLowerCase()?Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME:Qn.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:i||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=o&&o.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 u=c.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):u>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,o){const i=e.toLowerCase();if(t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===i.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===i.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===i.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(o&&!i.includes(e[t].toLowerCase()))return!1;if(!o&&i.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const o=this.getTokenKeys(),i=[];return o.accessToken.forEach(o=>{if(!this.accessTokenKeyMatchesFilter(o,e,!0))return;const r=this.getAccessTokenCredential(o,t);r&&this.credentialMatchesFilter(r,e)&&i.push(r)}),i}getRefreshToken(e,t,o,i,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Zn:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Qn.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=i&&i.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,o);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&&o&&r.addFields({multiMatchedRT:d},o),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const o=e.toLowerCase();return(!t.familyId||-1!==o.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==o.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},o=this.getAppMetadataFilteredBy(t),i=Object.keys(o).map(e=>o[e]),r=i.length;if(r<1)return null;if(r>1)throw _s(Ya);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Zn)}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 o=function(e,t){let o;const i=e.canonicalAuthority;if(i){const r=new pl(i).getUrlComponents().HostNameAndPort;o=gl(r,e.cloudDiscoveryMetadata?.metadata,ea,t)||gl(r,ml.metadata,ia,t)||e.knownAuthorities}return o||[]}(this.staticAuthorityOptions,this.commonLogger);if(o.includes(t)&&o.includes(e.environment))return!0}const o=this.getAuthorityMetadataByAlias(t);return!!(o&&o.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!==Qn.ACCESS_TOKEN&&e.credentialType!==Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return tl.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($n)}isAuthorityMetadata(e){return-1!==e.indexOf(Jn)}generateAuthorityMetadataCacheKey(e){return`${Jn}-${this.clientId}-${e}`}static toObject(e,t){for(const o in t)e[o]=t[o];return e}}class Cl extends Ol{async setAccount(){throw _s(Ts)}getAccount(){throw _s(Ts)}async setIdTokenCredential(){throw _s(Ts)}getIdTokenCredential(){throw _s(Ts)}async setAccessTokenCredential(){throw _s(Ts)}getAccessTokenCredential(){throw _s(Ts)}async setRefreshTokenCredential(){throw _s(Ts)}getRefreshTokenCredential(){throw _s(Ts)}setAppMetadata(){throw _s(Ts)}getAppMetadata(){throw _s(Ts)}setServerTelemetry(){throw _s(Ts)}getServerTelemetry(){throw _s(Ts)}setAuthorityMetadata(){throw _s(Ts)}getAuthorityMetadata(){throw _s(Ts)}getAuthorityMetadataKeys(){throw _s(Ts)}setThrottlingCache(){throw _s(Ts)}getThrottlingCache(){throw _s(Ts)}removeItem(){throw _s(Ts)}getKeys(){throw _s(Ts)}getAccountKeys(){throw _s(Ts)}getTokenKeys(){throw _s(Ts)}generateCredentialKey(){throw _s(Ts)}generateAccountKey(){throw _s(Ts)}}
52
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Nl="AAD",Rl="OIDC",bl="EAR",wl="acquireTokenByCode",Sl="acquireTokenByRefreshToken",Pl="acquireTokenSilent",vl="acquireTokenSilentAsync",Ll="acquireTokenPopup",Ml="acquireTokenPreRedirect",xl="acquireTokenRedirect",Dl="cryptoOptsGetPublicKeyThumbprint",kl="cryptoOptsSignJwt",Ul="silentCacheClientAcquireToken",Fl="silentIframeClientAcquireToken",Bl="awaitConcurrentIframe",ql="silentRefreshClientAcquireToken",jl="ssoSilent",Gl="standardInteractionClientGetDiscoveredAuthority",Wl="nativeInteractionClientAcquireToken",Hl="networkClientSendPostRequestAsync",Yl="refreshTokenClientExecutePostToTokenEndpoint",Kl="authorizationCodeClientExecutePostToTokenEndpoint",Vl="refreshTokenClientExecuteTokenRequest",zl="refreshTokenClientAcquireToken",Ql="refreshTokenClientAcquireTokenWithCachedRefreshToken",$l="refreshTokenClientAcquireTokenByRefreshToken",Zl="refreshTokenClientCreateTokenRequestBody",Jl="acquireTokenFromCache",Xl="silentFlowClientAcquireCachedToken",ed="silentFlowClientGenerateResultFromCacheRecord",td="acquireTokenBySilentIframe",od="initializeBaseRequest",id="initializeSilentRequest",rd="initializeClientApplication",nd="initializeCache",ad="silentIframeClientTokenHelper",sd="silentHandlerInitiateAuthRequest",ld="silentHandlerMonitorIframeForHash",dd="silentHandlerLoadFrame",cd="silentHandlerLoadFrameSync",ud="standardInteractionClientCreateAuthCodeClient",pd="standardInteractionClientGetClientConfiguration",hd="standardInteractionClientInitializeAuthorizationRequest",md="getAuthCodeUrl",fd="getStandardParams",gd="handleCodeResponseFromServer",Td="handleCodeResponse",Ad="handleResponseEar",yd="handleResponsePlatformBroker",Id="handleResponseCode",_d="updateTokenEndpointAuthority",Ed="authClientAcquireToken",Od="authClientExecuteTokenRequest",Cd="authClientCreateTokenRequestBody",Nd="popTokenGenerateCnf",Rd="popTokenGenerateKid",bd="handleServerTokenResponse",wd="deserializeResponse",Sd="authorityFactoryCreateDiscoveredInstance",Pd="authorityResolveEndpointsAsync",vd="authorityGetCloudDiscoveryMetadataFromNetwork",Ld="authorityUpdateCloudDiscoveryMetadata",Md="authorityGetEndpointMetadataFromNetwork",xd="authorityUpdateEndpointMetadata",Dd="authorityUpdateMetadataWithRegionalInformation",kd="regionDiscoveryDetectRegion",Ud="regionDiscoveryGetRegionFromIMDS",Fd="regionDiscoveryGetCurrentVersion",Bd="acquireTokenByCodeAsync",qd="handleRedirectPromise",jd="handleNativeRedirectPromise",Gd="nativeMessageHandlerHandshake",Wd="removeHiddenIframe",Hd="clearTokensAndKeysWithClaims",Yd="cacheManagerGetRefreshToken",Kd="importExistingCache",Vd="setUserData",zd="localStorageUpdated",Qd="generatePkceCodes",$d="generateCodeVerifier",Zd="generateCodeChallengeFromVerifier",Jd="sha256Digest",Xd="getRandomValues",ec="generateHKDF",tc="generateBaseKey",oc="base64Decode",ic="urlEncodeArr",rc="encrypt",nc="decrypt",ac="generateEarKey",sc="decryptEarResponse",lc=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 uc{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class pc{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:cc,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new uc}}startPerformanceMeasurement(){return new uc}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 hc={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},mc={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ns.Info,correlationId:un.EMPTY_STRING},fc={claimsBasedCachingEnabled:!1},gc={async sendGetRequestAsync(){throw Os(ys)},async sendPostRequestAsync(){throw Os(ys)}},Tc={sku:un.SKU,version:ws,cpu:un.EMPTY_STRING,os:un.EMPTY_STRING},Ac={clientSecret:un.EMPTY_STRING,clientAssertion:void 0},yc={azureCloudInstance:Ss,tenant:`${un.DEFAULT_COMMON_TENANT}`},Ic={application:{appName:"",appVersion:""}};function _c(e){return e.authOptions.authority.options.protocolMode===wl}
57
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Ec="home_account_id",Oc="UPN";
58
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Cc(e,t){if(!e)throw Os(La);try{const o=t(e);return JSON.parse(o)}catch(e){throw Os(va)}}function Nc(e){if(!e)throw Os(va);const t=e.split($n,2);return{uid:t[0],utid:t.length<2?un.EMPTY_STRING:t[1]}}
59
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Rc="client_id",bc="redirect_uri",wc="token_type",Sc="req_cnf",Pc="return_spa_code",vc="x-client-xtra-sku",Lc="brk_client_id",Mc="brk_redirect_uri",xc="instance_aware";
55
+ class dc{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class cc{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:lc,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new dc}}startPerformanceMeasurement(){return new dc}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 uc={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},pc={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Os.Info,correlationId:dn.EMPTY_STRING},hc={claimsBasedCachingEnabled:!1},mc={async sendGetRequestAsync(){throw _s(Ts)},async sendPostRequestAsync(){throw _s(Ts)}},fc={sku:dn.SKU,version:Rs,cpu:dn.EMPTY_STRING,os:dn.EMPTY_STRING},gc={clientSecret:dn.EMPTY_STRING,clientAssertion:void 0},Tc={azureCloudInstance:bs,tenant:`${dn.DEFAULT_COMMON_TENANT}`},Ac={application:{appName:"",appVersion:""}};function yc(e){return e.authOptions.authority.options.protocolMode===Rl}
57
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Ic="home_account_id",_c="UPN";
58
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Ec(e,t){if(!e)throw _s(Pa);try{const o=t(e);return JSON.parse(o)}catch(e){throw _s(Sa)}}function Oc(e){if(!e)throw _s(Sa);const t=e.split(zn,2);return{uid:t[0],utid:t.length<2?dn.EMPTY_STRING:t[1]}}
59
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Cc="client_id",Nc="redirect_uri",Rc="token_type",bc="req_cnf",wc="return_spa_code",Sc="x-client-xtra-sku",Pc="brk_client_id",vc="brk_redirect_uri",Lc="instance_aware";
60
60
  /*! @azure/msal-common v15.12.0 2025-08-19 */
61
- function Dc(e,t,o){if(!t)return;const i=e.get(Rc);i&&e.has(Lc)&&o?.addFields({embeddedClientId:i,embeddedRedirectUri:e.get(bc)},t)}function kc(e,t){e.set("response_type",t)}function Uc(e,t,o=!0,i=In){!o||i.includes("openid")||t.includes("openid")||i.push("openid");const r=o?[...t||[],...i]:t||[],n=new il(r);e.set("scope",n.printScopes())}function Fc(e,t){e.set(Rc,t)}function Bc(e,t){e.set(bc,t)}function qc(e,t){e.set("login_hint",t)}function jc(e,t){e.set(Nn,`UPN:${t}`)}function Gc(e,t){e.set(Nn,`Oid:${t.uid}@${t.utid}`)}function Wc(e,t){e.set("sid",t)}function Hc(e,t,o){const i=function(e,t){let o;if(e)try{o=JSON.parse(e)}catch(e){throw tl(ks)}else o={};t&&t.length>0&&(o.hasOwnProperty(Ln)||(o[Ln]={}),o[Ln][Mn]={values:t});return JSON.stringify(o)}(t,o);try{JSON.parse(i)}catch(e){throw tl(ks)}e.set("claims",i)}function Yc(e,t){e.set("client-request-id",t)}function Kc(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 Vc(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function zc(e,t){t&&e.set("state",t)}function Qc(e,t,o){if(!t||!o)throw tl(qs);e.set("code_challenge",t),e.set("code_challenge_method",o)}function $c(e,t){e.set("client_secret",t)}function Zc(e,t){t&&e.set("client_assertion",t)}function Jc(e,t){t&&e.set("client_assertion_type",t)}function Xc(e,t){e.set("grant_type",t)}function eu(e){e.set("client_info","1")}function tu(e){e.has(xc)||e.set(xc,"true")}function ou(e,t){Object.entries(t).forEach(([t,o])=>{!e.has(t)&&o&&e.set(t,o)})}function iu(e,t){t&&(e.set(wc,sa.POP),e.set(Sc,t))}function ru(e,t){t&&(e.set(wc,sa.SSH),e.set(Sc,t))}function nu(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function au(e){e.set("x-ms-lib-capability",ua)}function su(e,t,o){e.has(Lc)||e.set(Lc,t),e.has(Mc)||e.set(Mc,o)}
61
+ function Mc(e,t,o){if(!t)return;const i=e.get(Cc);i&&e.has(Pc)&&o?.addFields({embeddedClientId:i,embeddedRedirectUri:e.get(Nc)},t)}function xc(e,t){e.set("response_type",t)}function Dc(e,t,o=!0,i=An){!o||i.includes("openid")||t.includes("openid")||i.push("openid");const r=o?[...t||[],...i]:t||[],n=new tl(r);e.set("scope",n.printScopes())}function kc(e,t){e.set(Cc,t)}function Uc(e,t){e.set(Nc,t)}function Fc(e,t){e.set("login_hint",t)}function Bc(e,t){e.set(On,`UPN:${t}`)}function qc(e,t){e.set(On,`Oid:${t.uid}@${t.utid}`)}function jc(e,t){e.set("sid",t)}function Gc(e,t,o){const i=function(e,t){let o;if(e)try{o=JSON.parse(e)}catch(e){throw Xs(xs)}else o={};t&&t.length>0&&(o.hasOwnProperty(Pn)||(o[Pn]={}),o[Pn][vn]={values:t});return JSON.stringify(o)}(t,o);try{JSON.parse(i)}catch(e){throw Xs(xs)}e.set("claims",i)}function Wc(e,t){e.set("client-request-id",t)}function Hc(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 Yc(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function Kc(e,t){t&&e.set("state",t)}function Vc(e,t,o){if(!t||!o)throw Xs(Fs);e.set("code_challenge",t),e.set("code_challenge_method",o)}function zc(e,t){e.set("client_secret",t)}function Qc(e,t){t&&e.set("client_assertion",t)}function $c(e,t){t&&e.set("client_assertion_type",t)}function Zc(e,t){e.set("grant_type",t)}function Jc(e){e.set("client_info","1")}function Xc(e){e.has(Lc)||e.set(Lc,"true")}function eu(e,t){Object.entries(t).forEach(([t,o])=>{!e.has(t)&&o&&e.set(t,o)})}function tu(e,t){t&&(e.set(Rc,na.POP),e.set(bc,t))}function ou(e,t){t&&(e.set(Rc,na.SSH),e.set(bc,t))}function iu(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function ru(e){e.set("x-ms-lib-capability",da)}function nu(e,t,o){e.has(Pc)||e.set(Pc,t),e.has(vc)||e.set(vc,o)}
62
62
  /*! @azure/msal-common v15.12.0 2025-08-19 */
63
- const lu=0,du=1,cu=2,uu=3;
63
+ const au=0,su=1,lu=2,du=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 pu=(e,t,o,i,r)=>(...n)=>{o.trace(`Executing function ${t}`);const a=i?.startMeasurement(t,r);if(r){const e=t+"CallCount";i?.incrementFields({[e]:1},r)}try{const i=e(...n);return a?.end({success:!0}),o.trace(`Returning result from ${t}`),i}catch(e){o.trace(`Error occurred in ${t}`);try{o.trace(JSON.stringify(e))}catch(e){o.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},hu=(e,t,o,i,r)=>(...n)=>{o.trace(`Executing function ${t}`);const a=i?.startMeasurement(t,r);if(r){const e=t+"CallCount";i?.incrementFields({[e]:1},r)}return i?.setPreQueueTime(t,r),e(...n).then(e=>(o.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{o.trace(`Error occurred in ${t}`);try{o.trace(JSON.stringify(e))}catch(e){o.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};
66
+ const cu=(e,t,o,i,r)=>(...n)=>{o.trace(`Executing function ${t}`);const a=i?.startMeasurement(t,r);if(r){const e=t+"CallCount";i?.incrementFields({[e]:1},r)}try{const i=e(...n);return a?.end({success:!0}),o.trace(`Returning result from ${t}`),i}catch(e){o.trace(`Error occurred in ${t}`);try{o.trace(JSON.stringify(e))}catch(e){o.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},uu=(e,t,o,i,r)=>(...n)=>{o.trace(`Executing function ${t}`);const a=i?.startMeasurement(t,r);if(r){const e=t+"CallCount";i?.incrementFields({[e]:1},r)}return i?.setPreQueueTime(t,r),e(...n).then(e=>(o.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{o.trace(`Error occurred in ${t}`);try{o.trace(JSON.stringify(e))}catch(e){o.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 mu{constructor(e,t,o,i){this.networkInterface=e,this.logger=t,this.performanceClient=o,this.correlationId=i}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(Fd,this.correlationId);let o=e;if(o)t.region_source=fa;else{const e=mu.IMDS_OPTIONS;try{const i=await hu(this.getRegionFromIMDS.bind(this),Bd,this.logger,this.performanceClient,this.correlationId)(un.IMDS_VERSION,e);if(i.status===pn&&(o=i.body,t.region_source=ga),i.status===mn){const i=await hu(this.getCurrentVersion.bind(this),qd,this.logger,this.performanceClient,this.correlationId)(e);if(!i)return t.region_source=ma,null;const r=await hu(this.getRegionFromIMDS.bind(this),Bd,this.logger,this.performanceClient,this.correlationId)(i,e);r.status===pn&&(o=r.body,t.region_source=ga)}}catch(e){return t.region_source=ma,null}}return o||(t.region_source=ma),o||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(Bd,this.correlationId),this.networkInterface.sendGetRequestAsync(`${un.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,un.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(qd,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${un.IMDS_ENDPOINT}?format=json`,e);return t.status===mn&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
68
+ class pu{constructor(e,t,o,i){this.networkInterface=e,this.logger=t,this.performanceClient=o,this.correlationId=i}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(kd,this.correlationId);let o=e;if(o)t.region_source=ha;else{const e=pu.IMDS_OPTIONS;try{const i=await uu(this.getRegionFromIMDS.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(dn.IMDS_VERSION,e);if(i.status===cn&&(o=i.body,t.region_source=ma),i.status===pn){const i=await uu(this.getCurrentVersion.bind(this),Fd,this.logger,this.performanceClient,this.correlationId)(e);if(!i)return t.region_source=pa,null;const r=await uu(this.getRegionFromIMDS.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(i,e);r.status===cn&&(o=r.body,t.region_source=ma)}}catch(e){return t.region_source=pa,null}}return o||(t.region_source=pa),o||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(Ud,this.correlationId),this.networkInterface.sendGetRequestAsync(`${dn.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,dn.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(Fd,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${dn.IMDS_ENDPOINT}?format=json`,e);return t.status===pn&&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 fu(){return Math.round((new Date).getTime()/1e3)}function gu(e){return e.getTime()/1e3}function Tu(e){return e?new Date(1e3*Number(e)):new Date}function Au(e,t){const o=Number(e)||0;return fu()+t>o}function yu(e,t){const o=Number(e)+24*t*60*60*1e3;return Date.now()>o}
70
+ function hu(){return Math.round((new Date).getTime()/1e3)}function mu(e){return e.getTime()/1e3}function fu(e){return e?new Date(1e3*Number(e)):new Date}function gu(e,t){const o=Number(e)||0;return hu()+t>o}function Tu(e,t){const o=Number(e)+24*t*60*60*1e3;return Date.now()>o}
71
71
  /*! @azure/msal-common v15.12.0 2025-08-19 */
72
- function Iu(e,t,o,i,r){return{credentialType:Zn.ID_TOKEN,homeAccountId:e,environment:t,clientId:i,secret:o,realm:r,lastUpdatedAt:Date.now().toString()}}function _u(e,t,o,i,r,n,a,s,l,d,c,u,p,h,m){const f={homeAccountId:e,credentialType:Zn.ACCESS_TOKEN,secret:o,cachedAt:fu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:i,realm:r,target:n,tokenType:c||sa.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(f.userAssertionHash=u),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==sa.BEARER.toLowerCase())switch(f.credentialType=Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case sa.POP:const e=sl(o,l);if(!e?.cnf?.kid)throw Os(us);f.keyId=e.cnf.kid;break;case sa.SSH:f.keyId=p}return f}function Eu(e,t,o,i,r,n,a){const s={credentialType:Zn.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:i,secret:o,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function Ou(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function Cu(e){return!!e&&(Ou(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Zn.ACCESS_TOKEN||e.credentialType===Zn.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Nu(e){return!!e&&(Ou(e)&&e.credentialType===Zn.REFRESH_TOKEN)}function Ru(){return fu()+ta}function bu(e,t,o){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=o,e.jwks_uri=t.jwks_uri}function wu(e,t,o){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=o}function Su(e){return e.expiresAt<=fu()}
73
- /*! @azure/msal-common v15.12.0 2025-08-19 */mu.IMDS_OPTIONS={headers:{Metadata:"true"}};class Pu{constructor(e,t,o,i,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=o,this.authorityOptions=i,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 mu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(un.CIAM_AUTH_URL))return uu;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case un.ADFS:return du;case un.DSTS:return cu}return lu}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 ml(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 Os(Da)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Os(Da)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Os(Da)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Os(ms);return this.replacePath(this.metadata.end_session_endpoint)}throw Os(Da)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Os(Da)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Os(Da)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Pu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===lu&&this.protocolMode!==wl}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const o=new ml(this.metadata.canonical_authority).getUrlComponents(),i=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=i[r];if(0===r&&this.canReplaceTenant(o)){const e=new ml(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===wl&&!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(Ld,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await hu(this.updateCloudDiscoveryMetadata.bind(this),xd,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const o=await hu(this.updateEndpointMetadata.bind(this),kd,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:o}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:o},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:Ru(),jwks_uri:""}),e}updateCachedMetadata(e,t,o){t!==ia&&o?.source!==ia&&(e.expiresAt=Ru(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(kd,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===na&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){bu(e,await hu(this.updateMetadataWithRegionalInformation.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let o=await hu(this.getEndpointMetadataFromNetwork.bind(this),Dd,this.logger,this.performanceClient,this.correlationId)();if(o)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(o=await hu(this.updateMetadataWithRegionalInformation.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(o)),bu(e,o,!0),ra;throw Os(Ua,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"),bu(e,t,!1),{source:oa};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 bu(e,t,!1),{source:na,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const o=Su(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!o?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ia}):(o&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ml(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 tl(Gs)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Dd,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const o=await this.networkInterface.sendGetRequestAsync(t,e),i=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 */(o.body);return i?o.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 fl?fl[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(Ud,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==un.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Ta,this.regionDiscoveryMetadata.region_used=t,Pu.replaceWithRegionalInformation(e,t);const o=await hu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Fd,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(o)return this.regionDiscoveryMetadata.region_outcome=Aa,this.regionDiscoveryMetadata.region_used=o,Pu.replaceWithRegionalInformation(e,o);this.regionDiscoveryMetadata.region_outcome=ya}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(xd,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const o=await hu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Md,this.logger,this.performanceClient,this.correlationId)();if(o)return wu(e,o,!0),ra;throw tl(Ws)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||un.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||un.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||un.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),wu(e,t,!1),oa;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=(o=this.hostnameAndPort,yl(gl.metadata,o));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),wu(e,t,!1),na;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var o;const i=Su(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),ia):(i&&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."),Pu.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=yl(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."),tl(js)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Pu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Md,this.correlationId);const e=`${un.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let o=null;try{const i=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 */(i.body))r=i.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")}(i.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: ${i.status}`),r=i.body,r.error===un.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."),o=yl(n,this.hostnameAndPort)}catch(e){if(e instanceof Sa)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 o||(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."),o=Pu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),o}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&ml.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let o;if(t&&t.azureCloudInstance!==Ss){const e=t.tenant?t.tenant:un.DEFAULT_COMMON_TENANT;o=`${t.azureCloudInstance}/${e}/`}return o||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return un.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Os(Da)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Tl.has(e)}static isPublicCloudAuthority(e){return un.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,o){const i=new ml(e);i.validateAsUri();const r=i.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${un.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=ml.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:n}).urlString;return o?`${a}?${o}`:a}static replaceWithRegionalInformation(e,t){const o={...e};return o.authorization_endpoint=Pu.buildRegionalAuthorityString(o.authorization_endpoint,t),o.token_endpoint=Pu.buildRegionalAuthorityString(o.token_endpoint,t),o.end_session_endpoint&&(o.end_session_endpoint=Pu.buildRegionalAuthorityString(o.end_session_endpoint,t)),o}static transformCIAMAuthority(e){let t=e;const o=new ml(e).getUrlComponents();if(0===o.PathSegments.length&&o.HostNameAndPort.endsWith(un.CIAM_AUTH_URL)){t=`${t}${o.HostNameAndPort.split(".")[0]}${un.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function vu(e){return e.endsWith(un.FORWARD_SLASH)?e:`${e}${un.FORWARD_SLASH}`}
72
+ function Au(e,t,o,i,r){return{credentialType:Qn.ID_TOKEN,homeAccountId:e,environment:t,clientId:i,secret:o,realm:r,lastUpdatedAt:Date.now().toString()}}function yu(e,t,o,i,r,n,a,s,l,d,c,u,p,h,m){const f={homeAccountId:e,credentialType:Qn.ACCESS_TOKEN,secret:o,cachedAt:hu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:i,realm:r,target:n,tokenType:c||na.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(f.userAssertionHash=u),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==na.BEARER.toLowerCase())switch(f.credentialType=Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case na.POP:const e=nl(o,l);if(!e?.cnf?.kid)throw _s(ds);f.keyId=e.cnf.kid;break;case na.SSH:f.keyId=p}return f}function Iu(e,t,o,i,r,n,a){const s={credentialType:Qn.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:i,secret:o,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function _u(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function Eu(e){return!!e&&(_u(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Qn.ACCESS_TOKEN||e.credentialType===Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Ou(e){return!!e&&(_u(e)&&e.credentialType===Qn.REFRESH_TOKEN)}function Cu(){return hu()+Xn}function Nu(e,t,o){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=o,e.jwks_uri=t.jwks_uri}function Ru(e,t,o){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=o}function bu(e){return e.expiresAt<=hu()}
73
+ /*! @azure/msal-common v15.12.0 2025-08-19 */pu.IMDS_OPTIONS={headers:{Metadata:"true"}};class wu{constructor(e,t,o,i,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=o,this.authorityOptions=i,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 pu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(dn.CIAM_AUTH_URL))return du;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case dn.ADFS:return su;case dn.DSTS:return lu}return au}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 pl(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 _s(Ma)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw _s(Ma)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw _s(Ma)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw _s(ps);return this.replacePath(this.metadata.end_session_endpoint)}throw _s(Ma)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw _s(Ma)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw _s(Ma)}canReplaceTenant(e){return 1===e.PathSegments.length&&!wu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===au&&this.protocolMode!==Rl}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const o=new pl(this.metadata.canonical_authority).getUrlComponents(),i=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=i[r];if(0===r&&this.canReplaceTenant(o)){const e=new pl(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===su||this.protocolMode===Rl&&!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(Pd,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await uu(this.updateCloudDiscoveryMetadata.bind(this),Ld,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const o=await uu(this.updateEndpointMetadata.bind(this),xd,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:o}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:o},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:Cu(),jwks_uri:""}),e}updateCachedMetadata(e,t,o){t!==ta&&o?.source!==ta&&(e.expiresAt=Cu(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(xd,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===ia&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Nu(e,await uu(this.updateMetadataWithRegionalInformation.bind(this),Dd,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let o=await uu(this.getEndpointMetadataFromNetwork.bind(this),Md,this.logger,this.performanceClient,this.correlationId)();if(o)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(o=await uu(this.updateMetadataWithRegionalInformation.bind(this),Dd,this.logger,this.performanceClient,this.correlationId)(o)),Nu(e,o,!0),oa;throw _s(Da,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"),Nu(e,t,!1),{source:ea};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 Nu(e,t,!1),{source:ia,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const o=bu(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!o?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ta}):(o&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new pl(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 Xs(qs)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Md,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const o=await this.networkInterface.sendGetRequestAsync(t,e),i=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 */(o.body);return i?o.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 hl?hl[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(Dd,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==dn.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=fa,this.regionDiscoveryMetadata.region_used=t,wu.replaceWithRegionalInformation(e,t);const o=await uu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),kd,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(o)return this.regionDiscoveryMetadata.region_outcome=ga,this.regionDiscoveryMetadata.region_used=o,wu.replaceWithRegionalInformation(e,o);this.regionDiscoveryMetadata.region_outcome=Ta}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Ld,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const o=await uu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),vd,this.logger,this.performanceClient,this.correlationId)();if(o)return Ru(e,o,!0),oa;throw Xs(js)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||dn.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ru(e,t,!1),ea;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=(o=this.hostnameAndPort,Tl(ml.metadata,o));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ru(e,t,!1),ia;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var o;const i=bu(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),ta):(i&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===du)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),wu.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=Tl(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."),Xs(Bs)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),wu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(vd,this.correlationId);const e=`${dn.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let o=null;try{const i=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 */(i.body))r=i.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")}(i.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: ${i.status}`),r=i.body,r.error===dn.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."),o=Tl(n,this.hostnameAndPort)}catch(e){if(e instanceof ba)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 o||(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."),o=wu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),o}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&pl.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let o;if(t&&t.azureCloudInstance!==bs){const e=t.tenant?t.tenant:dn.DEFAULT_COMMON_TENANT;o=`${t.azureCloudInstance}/${e}/`}return o||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return dn.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw _s(Ma)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return fl.has(e)}static isPublicCloudAuthority(e){return dn.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,o){const i=new pl(e);i.validateAsUri();const r=i.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${dn.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=pl.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:n}).urlString;return o?`${a}?${o}`:a}static replaceWithRegionalInformation(e,t){const o={...e};return o.authorization_endpoint=wu.buildRegionalAuthorityString(o.authorization_endpoint,t),o.token_endpoint=wu.buildRegionalAuthorityString(o.token_endpoint,t),o.end_session_endpoint&&(o.end_session_endpoint=wu.buildRegionalAuthorityString(o.end_session_endpoint,t)),o}static transformCIAMAuthority(e){let t=e;const o=new pl(e).getUrlComponents();if(0===o.PathSegments.length&&o.HostNameAndPort.endsWith(dn.CIAM_AUTH_URL)){t=`${t}${o.HostNameAndPort.split(".")[0]}${dn.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function Su(e){return e.endsWith(dn.FORWARD_SLASH)?e:`${e}${dn.FORWARD_SLASH}`}
76
76
  /*! @azure/msal-common v15.12.0 2025-08-19 */
77
- async function Lu(e,t,o,i,r,n,a){a?.addQueueMeasurement(vd,n);const s=Pu.transformCIAMAuthority(vu(e)),l=new Pu(s,t,o,i,r,n,a);try{return await hu(l.resolveEndpointsAsync.bind(l),Ld,r,a,n)(),l}catch(e){throw Os(Da)}}
78
- /*! @azure/msal-common v15.12.0 2025-08-19 */Pu.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Sn,vn,Pn]);class Mu extends Sa{constructor(e,t,o,i,r){super(e,t,o),this.name="ServerError",this.errorNo=i,this.status=r,Object.setPrototypeOf(this,Mu.prototype)}}
79
- /*! @azure/msal-common v15.12.0 2025-08-19 */function xu(e,t,o){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:o,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 Du{static generateThrottlingStorageKey(e){return`${ca}.${JSON.stringify(e)}`}static preProcess(e,t,o){const i=Du.generateThrottlingStorageKey(t),r=e.getThrottlingCache(i);if(r){if(r.throttleTime<Date.now())return void e.removeItem(i,o);throw new Mu(r.errorCodes?.join(" ")||un.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,o,i){if(Du.checkResponseStatus(o)||Du.checkResponseForRetryAfter(o)){const r={throttleTime:Du.calculateThrottleTime(parseInt(o.headers[Cn])),error:o.body.error,errorCodes:o.body.error_codes,errorMessage:o.body.error_description,subError:o.body.suberror};e.setThrottlingCache(Du.generateThrottlingStorageKey(t),r,i)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(Cn)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,o=Date.now()/1e3;return Math.floor(1e3*Math.min(o+(t||la),o+da))}static removeThrottle(e,t,o,i){const r=xu(t,o,i),n=this.generateThrottlingStorageKey(r);e.removeItem(n,o.correlationId)}}
81
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ku extends Sa{constructor(e,t,o){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,ku.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=o}}function Uu(e,t,o,i){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${i?.name}, error.message:${i?.message}`,new ku(e,t,o)}
82
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Fu{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:o,cacheOptions:i,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){const h={...mc,...o};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:yc,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...hc,...t},loggerOptions:h,cacheOptions:{...fc,...i},storageInterface:r||new Rl(e.clientId,Cs,new Rs(h),new pc),networkInterface:n||gc,cryptoInterface:a||Cs,clientCredentials:s||Ac,libraryInfo:{...Tc,...l},telemetry:{...Ic,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};var m}(e),this.logger=new Rs(this.config.loggerOptions,bs,ws),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[En]=un.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Ec:try{const o=Nc(e.credential);t[Nn]=`Oid:${o.uid}@${o.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Oc:t[Nn]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,o,i,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(i,e,{body:t,headers:o},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,o,i){let r;Du.preProcess(this.cacheManager,e,i);try{r=await hu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Kl,this.logger,this.performanceClient,i)(t,o);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[bn]||"",requestId:e[Rn]||""},i)}catch(e){if(e instanceof ku){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[bn]||"",requestId:t[Rn]||"",contentTypeHeader:t[En]||void 0,contentLengthHeader:t[On]||void 0,httpStatus:e.httpStatus},i),e.error}throw e instanceof Sa?e:Os(ka)}return Du.postProcess(this.cacheManager,e,r,i),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Od,t);const o=`https://${e}/${this.authority.tenant}/`,i=await Lu(o,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&ou(t,e.tokenQueryParameters),Yc(t,e.correlationId),Dc(t,e.correlationId,this.performanceClient),pl(t)}}
83
- /*! @azure/msal-common v15.12.0 2025-08-19 */function Bu(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
84
- /*! @azure/msal-common v15.12.0 2025-08-19 */class qu{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,o){const i=new qu;let r;t.authorityType===du?i.authorityType=Vn:t.protocolMode===wl?i.authorityType=zn:i.authorityType=Kn,e.clientInfo&&o&&(r=Cc(e.clientInfo,o)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw Os(is);i.environment=n,i.realm=r?.utid||Bu(e.idTokenClaims)||"",i.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(i.username=a||s||"",i.loginHint=e.idTokenClaims?.login_hint,i.name=e.idTokenClaims?.name||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const t=nl(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[t]}return i}static createFromAccountInfo(e,t,o){const i=new qu;return i.authorityType=e.authorityType||zn,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.loginHint=e.loginHint,i.cloudGraphHostName=t,i.msGraphHost=o,i.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),i}static generateHomeAccountId(e,t,o,i,r){if(t!==du&&t!==cu){if(e)try{const t=Cc(e,i.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}o.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,o){if(!e||!t)return!1;let i=!0;if(o){const o=e.idTokenClaims||{},r=t.idTokenClaims||{};i=o.iat===r.iat&&o.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&&i}}
85
- /*! @azure/msal-common v15.12.0 2025-08-19 */const ju="no_tokens_found",Gu="native_account_unavailable",Wu="refresh_token_expired",Hu="ux_not_allowed",Yu="bad_token",Ku=["interaction_required","consent_required","login_required",Yu,Hu],Vu=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],zu={[ju]:"No refresh token found in the cache. Please sign-in.",[Gu]:"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.",[Wu]:"Refresh token has expired.",[Yu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[Hu]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Qu extends Sa{constructor(e,t,o,i,r,n,a,s){super(e,t,o),Object.setPrototypeOf(this,Qu.prototype),this.timestamp=i||un.EMPTY_STRING,this.traceId=r||un.EMPTY_STRING,this.correlationId=n||un.EMPTY_STRING,this.claims=a||un.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function $u(e,t,o){const i=!!e&&Ku.indexOf(e)>-1,r=!!o&&Vu.indexOf(o)>-1,n=!!t&&Ku.some(e=>t.indexOf(e)>-1);return i||n||r}function Zu(e){return new Qu(e,zu[e])}
86
- /*! @azure/msal-common v15.12.0 2025-08-19 */class Ju{static setRequestState(e,t,o){const i=Ju.generateLibraryState(e,o);return t?`${i}${un.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw Os(ns);const o={id:e.createNewGuid()};t&&(o.meta=t);const i=JSON.stringify(o);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw Os(ns);if(!t)throw Os(Ba);try{const o=t.split(un.RESOURCE_DELIM),i=o[0],r=o.length>1?o.slice(1).join(un.RESOURCE_DELIM):un.EMPTY_STRING,n=e.base64Decode(i),a=JSON.parse(n);return{userRequestState:r||un.EMPTY_STRING,libraryState:a}}catch(e){throw Os(Ba)}}}
87
- /*! @azure/msal-common v15.12.0 2025-08-19 */const Xu="sw";class ep{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(bd,e.correlationId);const o=await hu(this.generateKid.bind(this),bd,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(o));return{kid:o.kid,reqCnfString:i}}async generateKid(e){this.performanceClient?.addQueueMeasurement(wd,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Xu}}async signPopToken(e,t,o){return this.signPayload(e,t,o)}async signPayload(e,t,o,i){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=o,d=n?new ml(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:fu(),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,...i},t,l,o.correlationId)}}
88
- /*! @azure/msal-common v15.12.0 2025-08-19 */class tp{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 op{constructor(e,t,o,i,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=o,this.logger=i,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const o=`Error(s): ${e.error_codes||un.NOT_AVAILABLE} - Timestamp: ${e.timestamp||un.NOT_AVAILABLE} - Description: ${e.error_description||un.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||un.NOT_AVAILABLE} - Trace ID: ${e.trace_id||un.NOT_AVAILABLE}`,i=e.error_codes?.length?e.error_codes[0]:void 0,r=new Mu(e.error,o,e.suberror,i,e.status);if(t&&e.status&&e.status>=gn&&e.status<=Tn)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>=hn&&e.status<=fn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if($u(e.error,e.error_description,e.suberror))throw new Qu(e.error,e.error_description,e.suberror,e.timestamp||un.EMPTY_STRING,e.trace_id||un.EMPTY_STRING,e.correlation_id||un.EMPTY_STRING,e.claims||un.EMPTY_STRING,i);throw r}}async handleServerTokenResponse(e,t,o,i,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(Sd,e.correlation_id),e.id_token){if(d=sl(e.id_token||un.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw Os(Ga);if(i.maxAge||0===i.maxAge){const e=d.auth_time;if(!e)throw Os(Wa);ll(e,i.maxAge)}}this.homeAccountIdentifier=qu.generateHomeAccountId(e.client_info||un.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=Ju.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||i.sshKid||void 0;const u=this.generateCacheRecord(e,t,o,i,d,n,r);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new tp(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),a&&!s&&u.account){const e=this.cacheStorage.generateAccountKey(u.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,i.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await op.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,i.correlationId,i.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return op.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,e,l)}generateCacheRecord(e,t,o,i,r,n,a){const s=t.getPreferredCache();if(!s)throw Os(is);const l=Bu(r);let d,c;e.id_token&&r&&(d=Iu(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=ip(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,i.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let u=null;if(e.access_token){const r=e.scope?il.fromString(e.scope):new il(i.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,p=o+a,h=p+d,m=c&&c>0?o+c:void 0;u=_u(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),p,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,i.claims,i.requestedClaimsHash)}let p=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=o+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}p=Eu(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:u,refreshToken:p,appMetadata:h}}static async generateAuthenticationResult(e,t,o,i,r,n,a,s,l){let d,c,u=un.EMPTY_STRING,p=[],h=null,m=un.EMPTY_STRING;if(o.accessToken){if(o.accessToken.tokenType!==sa.POP||r.popKid)u=o.accessToken.secret;else{const t=new ep(e),{secret:i,keyId:n}=o.accessToken;if(!n)throw Os(fs);u=await t.signPopToken(i,n,r)}p=il.fromString(o.accessToken.target).asArray(),h=Tu(o.accessToken.expiresOn),d=Tu(o.accessToken.extendedExpiresOn),o.accessToken.refreshOn&&(c=Tu(o.accessToken.refreshOn))}o.appMetadata&&(m=o.appMetadata.familyId===Xn?Xn:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&o.account&&(o.account.nativeAccountId=s?.spa_accountid);const T=o.account?al(o.account.getAccountInfo(),void 0,n,o.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:p,account:T,idToken:o?.idToken?.secret||"",idTokenClaims:n||{},accessToken:u,fromCache:i,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||un.EMPTY_STRING,familyId:m,tokenType:o.accessToken?.tokenType||un.EMPTY_STRING,state:a?a.userRequestState:un.EMPTY_STRING,cloudGraphHostName:o.account?.cloudGraphHostName||un.EMPTY_STRING,msGraphHost:o.account?.msGraphHost||un.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function ip(e,t,o,i,r,n,a,s,l,d,c,u){u?.verbose("setCachedAccount called");const p=e.getAccountKeys().find(e=>e.startsWith(o));let h=null;p&&(h=e.getAccount(p,r));const m=h||qu.createAccount({homeAccountId:o,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,i),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=nl(o,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
90
- /*! @azure/msal-common v15.12.0 2025-08-19 */async function rp(e,t,o){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:o})}
91
- /*! @azure/msal-common v15.12.0 2025-08-19 */class np extends Fu{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(Cd,e.correlationId),!e.code)throw Os(za);const o=fu(),i=await hu(this.executeTokenRequest.bind(this),Nd,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=i.headers?.[Rn],n=new op(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(i.body),hu(n.handleServerTokenResponse.bind(n),Sd,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,o,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw tl(Fs);const t=this.createLogoutUrlQueryString(e);return ml.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Nd,t.correlationId);const o=this.createTokenQueryParameters(t),i=ml.appendQueryString(e.tokenEndpoint,o),r=await hu(this.createTokenRequestBody.bind(this),Rd,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=Cc(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${$n}${e.utid}`,type:Ec}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=xu(this.config.authOptions.clientId,t);return hu(this.executePostToTokenEndpoint.bind(this),zl,this.logger,this.performanceClient,t.correlationId)(i,r,a,s,t.correlationId,zl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Rd,e.correlationId);const t=new Map;if(Fc(t,e.embeddedClientId||e.tokenBodyParameters?.[Rc]||this.config.authOptions.clientId),this.includeRedirectUri)Bc(t,e.redirectUri);else if(!e.redirectUri)throw tl(Ps);if(Uc(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Kc(t,this.config.libraryInfo),Vc(t,this.config.telemetry.application),au(t),this.serverTelemetryManager&&!_c(this.config)&&nu(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&$c(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const o=this.config.clientCredentials.clientAssertion;Zc(t,await rp(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Jc(t,o.assertionType)}if(Xc(t,Hn),eu(t),e.authenticationScheme===sa.POP){const o=new ep(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await hu(o.generateCnf.bind(o),bd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}iu(t,i)}else if(e.authenticationScheme===sa.SSH){if(!e.sshJwk)throw tl(Hs);ru(t,e.sshJwk)}let o;if((!ol.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hc(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Cc(e.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${t.uid}${$n}${t.utid}`,type:Ec}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else o=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&o)switch(o.type){case Ec:try{Gc(t,Nc(o.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Oc:jc(t,o.credential)}return e.embeddedClientId&&su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&ou(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[Pc]||ou(t,{[Pc]:"1"}),Dc(t,e.correlationId,this.performanceClient),pl(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&&Yc(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&zc(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&ou(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&tu(t),pl(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
92
- /*! @azure/msal-common v15.12.0 2025-08-19 */class ap extends Fu{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement($l,e.correlationId);const t=fu(),o=await hu(this.executeTokenRequest.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=o.headers?.[Rn],r=new op(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(o.body),hu(r.handleServerTokenResponse.bind(r),Sd,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){if(!e)throw tl(Us);if(this.performanceClient?.addQueueMeasurement(Jl,e.correlationId),!e.account)throw Os(ts);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await hu(this.acquireTokenWithCachedRefreshToken.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const o=t instanceof Qu&&t.errorCode===ju,i=t instanceof Mu&&t.errorCode===pa&&t.subError===ha;if(o||i)return hu(this.acquireTokenWithCachedRefreshToken.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return hu(this.acquireTokenWithCachedRefreshToken.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Zl,e.correlationId);const o=pu(this.cacheManager.getRefreshToken.bind(this.cacheManager),Vd,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!o)throw Zu(ju);if(o.expiresOn&&Au(o.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(o.expiresOn)},e.correlationId),Zu(Wu);const i={...e,refreshToken:o.secret,authenticationScheme:e.authenticationScheme||sa.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Ec}};try{return await hu(this.acquireToken.bind(this),$l,this.logger,this.performanceClient,e.correlationId)(i)}catch(t){if(t instanceof Qu&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(o.expiresOn)},e.correlationId),t.subError===Yu)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(o);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Ql,e.correlationId);const o=this.createTokenQueryParameters(e),i=ml.appendQueryString(t.tokenEndpoint,o),r=await hu(this.createTokenRequestBody.bind(this),Xl,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=xu(this.config.authOptions.clientId,e);return hu(this.executePostToTokenEndpoint.bind(this),Vl,this.logger,this.performanceClient,e.correlationId)(i,r,n,a,e.correlationId,Vl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Xl,e.correlationId);const t=new Map;if(Fc(t,e.embeddedClientId||e.tokenBodyParameters?.[Rc]||this.config.authOptions.clientId),e.redirectUri&&Bc(t,e.redirectUri),Uc(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Xc(t,Yn),eu(t),Kc(t,this.config.libraryInfo),Vc(t,this.config.telemetry.application),au(t),this.serverTelemetryManager&&!_c(this.config)&&nu(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&$c(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const o=this.config.clientCredentials.clientAssertion;Zc(t,await rp(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Jc(t,o.assertionType)}if(e.authenticationScheme===sa.POP){const o=new ep(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await hu(o.generateCnf.bind(o),bd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}iu(t,i)}else if(e.authenticationScheme===sa.SSH){if(!e.sshJwk)throw tl(Hs);ru(t,e.sshJwk)}if((!ol.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hc(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Ec:try{Gc(t,Nc(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Oc:jc(t,e.ccsCredential.credential)}return e.embeddedClientId&&su(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&ou(t,e.tokenBodyParameters),Dc(t,e.correlationId,this.performanceClient),pl(t)}}
93
- /*! @azure/msal-common v15.12.0 2025-08-19 */class sp extends Fu{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(td,e.correlationId);let t=Ia;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!ol.isEmptyObj(e.claims))throw this.setCacheOutcome(_a,e.correlationId),Os(ds);if(!e.account)throw Os(ts);const o=e.account.tenantId||function(e){const t=new ml(e).getUrlComponents(),o=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(o){case Sn:case Pn:case vn:return;default:return o}}(e.authority),i=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,i,o);if(!r)throw this.setCacheOutcome(Ea,e.correlationId),Os(ds);if(n=r.cachedAt,Number(n)>fu()||Au(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Oa,e.correlationId),Os(ds);var n;r.refreshOn&&Au(r.refreshOn,0)&&(t=Ca);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,i,o,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await hu(this.generateResultFromCacheRecord.bind(this),od,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Ia&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let o;if(this.performanceClient?.addQueueMeasurement(od,t.correlationId),e.idToken&&(o=sl(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=o?.auth_time;if(!e)throw Os(Wa);ll(e,t.maxAge)}return op.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,o)}}
94
- /*! @azure/msal-common v15.12.0 2025-08-19 */const lp={sendGetRequestAsync:()=>Promise.reject(Os(ys)),sendPostRequestAsync:()=>Promise.reject(Os(ys))};
95
- /*! @azure/msal-common v15.12.0 2025-08-19 */function dp(e,t,o,i){const r=t.correlationId,n=new Map;Fc(n,t.embeddedClientId||t.extraQueryParameters?.[Rc]||e.clientId);if(Uc(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),Bc(n,t.redirectUri),Yc(n,r),function(e,t){e.set("response_mode",t||Wn)}(n,t.responseMode),eu(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),i?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),i?.addFields({domainHintFromRequest:!0},r)),t.prompt!==Dn)if(t.sid&&t.prompt===Un)o.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),Wc(n,t.sid),i?.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&&(o.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){o.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),qc(n,s),i?.addFields({loginHintFromClaim:!0},r);try{Gc(n,Nc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===Un){o.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),Wc(n,e),i?.addFields({sidFromClaim:!0},r);try{Gc(n,Nc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)o.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),qc(n,t.loginHint),jc(n,t.loginHint),i?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){o.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),qc(n,t.account.username),i?.addFields({loginHintFromUpn:!0},r);try{Gc(n,Nc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(o.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),qc(n,t.loginHint),jc(n,t.loginHint),i?.addFields({loginHintFromRequest:!0},r));else o.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&&zc(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&Hc(n,t.claims,e.clientCapabilities),t.embeddedClientId&&su(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(xc)||tu(n),n}function cp(e,t,o,i){const r=pl(t,o,i);return ml.appendQueryString(e.authorizationEndpoint,r)}function up(e,t){if(!e.state||!t)throw e.state?Os(ja,"Cached State"):Os(ja,"Server State");let o,i;try{o=decodeURIComponent(e.state)}catch(t){throw Os(Ba,e.state)}try{i=decodeURIComponent(t)}catch(t){throw Os(Ba,e.state)}if(o!==i)throw Os(qa);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",o=e.error_uri?.lastIndexOf(t);return o&&o>=0?e.error_uri?.substring(o+t.length):void 0}(e);if($u(e.error,e.error_description,e.suberror))throw new Qu(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Mu(e.error||"",e.error_description,e.suberror,t)}}function pp(e){const{skus:t,libraryName:o,libraryVersion:i,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[o,i]],[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:o,skuName:i,skuVersion:r}=e;if(o>=t.length)return;t[o]=[i,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class hp{constructor(e,t){this.cacheOutcome=Ia,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||un.EMPTY_STRING,this.wrapperVer=e.wrapperVer||un.EMPTY_STRING,this.telemetryCacheKey=aa.CACHE_KEY+Qn+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${aa.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],o=this.getNativeBrokerErrorCode();o?.length&&t.push(`broker_error=${o}`);const i=t.join(aa.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(aa.VALUE_SEPARATOR);return[aa.SCHEMA_VERSION,r,i].join(aa.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=hp.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(aa.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(aa.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?aa.OVERFLOW_TRUE:aa.OVERFLOW_FALSE].join(aa.VALUE_SEPARATOR);return[aa.SCHEMA_VERSION,e.cacheHits,o,i,n].join(aa.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=aa.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 Sa?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(aa.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=hp.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const o={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let t,o=0,i=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||un.EMPTY_STRING,n=e.failedRequests[2*t+1]||un.EMPTY_STRING,a=e.errors[t]||un.EMPTY_STRING;if(i+=r.toString().length+n.toString().length+a.length+3,!(i<aa.MAX_LAST_HEADER_BYTES))break;o+=1}return o}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||un.EMPTY_STRING),e.push(this.regionSource||un.EMPTY_STRING),e.push(this.regionOutcome||un.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 pp(e)}}
97
- /*! @azure/msal-common v15.12.0 2025-08-19 */const mp="missing_kid_error",fp="missing_alg_error",gp={[mp]:"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.",[fp]:"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 Tp extends Sa{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Tp.prototype)}}function Ap(e){return new Tp(e,gp[e])}
98
- /*! @azure/msal-common v15.12.0 2025-08-19 */class yp{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Ap(mp);if(!e.alg)throw Ap(fp);const t=new yp({typ:e.typ||Na,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
99
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Ip="pkce_not_created",_p="ear_jwk_empty",Ep="ear_jwe_empty",Op="crypto_nonexistent",Cp="empty_navigate_uri",Np="hash_empty_error",Rp="no_state_in_hash",bp="hash_does_not_contain_known_properties",wp="unable_to_parse_state",Sp="state_interaction_type_mismatch",Pp="interaction_in_progress",vp="popup_window_error",Lp="empty_window_error",Mp="user_cancelled",xp="monitor_popup_timeout",Dp="monitor_window_timeout",kp="redirect_in_iframe",Up="block_iframe_reload",Fp="block_nested_popups",Bp="iframe_closed_prematurely",qp="silent_logout_unsupported",jp="no_account_error",Gp="silent_prompt_value_error",Wp="no_token_request_cache_error",Hp="unable_to_parse_token_request_cache_error",Yp="auth_request_not_set_error",Kp="invalid_cache_type",Vp="non_browser_environment",zp="database_not_open",Qp="no_network_connectivity",$p="post_request_failed",Zp="get_request_failed",Jp="failed_to_parse_response",Xp="unable_to_load_token",eh="crypto_key_not_found",th="auth_code_required",oh="auth_code_or_nativeAccountId_required",ih="spa_code_and_nativeAccountId_present",rh="database_unavailable",nh="unable_to_acquire_token_from_native_platform",ah="native_handshake_timeout",sh="native_extension_not_installed",lh="native_connection_not_established",dh="uninitialized_public_client_application",ch="native_prompt_not_supported",uh="invalid_base64_string",ph="invalid_pop_token_request",hh="failed_to_build_headers",mh="failed_to_parse_headers",fh="failed_to_decrypt_ear_response",gh="timed_out",Th="For more visit: aka.ms/msaljs/browser-errors",Ah={[Ip]:"The PKCE code challenge and verifier could not be generated.",[_p]:"No EAR encryption key provided. This is unexpected.",[Ep]:"Server response does not contain ear_jwe property. This is unexpected.",[Op]:"The crypto object or function is not available.",[Cp]:"Navigation URI is empty. Please check stack trace for more info.",[Np]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${Th}`,[Rp]:"Hash does not contain state. Please verify that the request originated from msal.",[bp]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${Th}`,[wp]:"Unable to parse state. Please verify that the request originated from msal.",[Sp]:"Hash contains state but the interaction type does not match the caller.",[Pp]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${Th}`,[vp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Lp]:"window.open returned null or undefined window object.",[Mp]:"User cancelled the flow.",[xp]:`Token acquisition in popup failed due to timeout. ${Th}`,[Dp]:`Token acquisition in iframe failed due to timeout. ${Th}`,[kp]:"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.",[Up]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${Th}`,[Fp]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Bp]:"The iframe being monitored was closed prematurely.",[qp]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[jp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Gp]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[Wp]:"No token request found in cache.",[Hp]:"The cached token request could not be parsed.",[Yp]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Kp]:"Invalid cache type",[Vp]:"Login and token requests are not supported in non-browser environments.",[zp]:"Database is not open!",[Qp]:"No network connectivity. Check your internet connection.",[$p]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Zp]:"Network request failed. Please check the network trace to determine root cause.",[Jp]:"Failed to parse network response. Check network trace.",[Xp]:"Error loading token to cache.",[eh]:"Cryptographic Key or Keypair not found in browser storage.",[th]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[oh]:"An authorization code or nativeAccountId must be provided to this flow.",[ih]:"Request cannot contain both spa code and native account id.",[rh]:"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.",[nh]:`Unable to acquire token from native platform. ${Th}`,[ah]:"Timed out while attempting to establish connection to browser extension",[sh]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[lh]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${Th}`,[dh]:`You must call and await the initialize function before attempting to call any other MSAL API. ${Th}`,[ch]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[uh]:"Invalid base64 encoded string.",[ph]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[hh]:"Failed to build request headers object.",[mh]:"Failed to parse response headers",[fh]:"Failed to decrypt ear response",[gh]:"The request timed out."};class yh extends Sa{constructor(e,t){super(e,Ah[e],t),Object.setPrototypeOf(this,yh.prototype),this.name="BrowserAuthError"}}function Ih(e,t){return new yh(e,t)}
100
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const _h="invalid_grant",Eh=483,Oh=600,Ch="msal",Nh=30,Rh="msal.js.browser",bh="53ee284d-920a-4b59-9d30-a60315b26836",wh="ppnbnpeolgkicgegkbkbjmhlideopiji",Sh="MATS",Ph="MicrosoftEntra",vh="DOM API",Lh="get-token-and-sign-out",Mh="PlatformAuthDOMHandler",xh="PlatformAuthExtensionHandler",Dh="Handshake",kh="HandshakeResponse",Uh="GetToken",Fh="Response",Bh="localStorage",qh="sessionStorage",jh="memoryStorage",Gh="GET",Wh="POST",Hh="signin",Yh="signout",Kh="request.origin",Vh="urlHash",zh="request.params",Qh="code.verifier",$h="interaction.status",Zh="request.native",Jh="wrapper.sku",Xh="wrapper.version",em=861,tm=862,om=863,im=865,rm=866,nm=61,am=961,sm=962;var lm;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(lm||(lm={}));const dm="startup",cm="login",um="logout",pm="acquireToken",hm="ssoSilent",mm="handleRedirect",fm="none",gm={scopes:In},Tm="@azure/msal-react",Am="msal.db",ym=`${Am}.keys`,Im=0,_m=1,Em=2,Om=3,Cm=4,Nm=5,Rm=[Im,Nm,Cm];
77
+ async function Pu(e,t,o,i,r,n,a){a?.addQueueMeasurement(Sd,n);const s=wu.transformCIAMAuthority(Su(e)),l=new wu(s,t,o,i,r,n,a);try{return await uu(l.resolveEndpointsAsync.bind(l),Pd,r,a,n)(),l}catch(e){throw _s(Ma)}}
78
+ /*! @azure/msal-common v15.12.0 2025-08-19 */wu.reservedTenantDomains=new Set(["{tenant}","{tenantid}",bn,Sn,wn]);class vu extends ba{constructor(e,t,o,i,r){super(e,t,o),this.name="ServerError",this.errorNo=i,this.status=r,Object.setPrototypeOf(this,vu.prototype)}}
79
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Lu(e,t,o){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:o,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 Mu{static generateThrottlingStorageKey(e){return`${la}.${JSON.stringify(e)}`}static preProcess(e,t,o){const i=Mu.generateThrottlingStorageKey(t),r=e.getThrottlingCache(i);if(r){if(r.throttleTime<Date.now())return void e.removeItem(i,o);throw new vu(r.errorCodes?.join(" ")||dn.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,o,i){if(Mu.checkResponseStatus(o)||Mu.checkResponseForRetryAfter(o)){const r={throttleTime:Mu.calculateThrottleTime(parseInt(o.headers[En])),error:o.body.error,errorCodes:o.body.error_codes,errorMessage:o.body.error_description,subError:o.body.suberror};e.setThrottlingCache(Mu.generateThrottlingStorageKey(t),r,i)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(En)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,o=Date.now()/1e3;return Math.floor(1e3*Math.min(o+(t||aa),o+sa))}static removeThrottle(e,t,o,i){const r=Lu(t,o,i),n=this.generateThrottlingStorageKey(r);e.removeItem(n,o.correlationId)}}
81
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class xu extends ba{constructor(e,t,o){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,xu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=o}}function Du(e,t,o,i){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${i?.name}, error.message:${i?.message}`,new xu(e,t,o)}
82
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class ku{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:o,cacheOptions:i,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){const h={...pc,...o};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Tc,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...uc,...t},loggerOptions:h,cacheOptions:{...hc,...i},storageInterface:r||new Cl(e.clientId,Es,new Cs(h),new cc),networkInterface:n||mc,cryptoInterface:a||Es,clientCredentials:s||gc,libraryInfo:{...fc,...l},telemetry:{...Ac,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};var m}(e),this.logger=new Cs(this.config.loggerOptions,Ns,Rs),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[In]=dn.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Ic:try{const o=Oc(e.credential);t[On]=`Oid:${o.uid}@${o.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:t[On]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,o,i,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(i,e,{body:t,headers:o},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,o,i){let r;Mu.preProcess(this.cacheManager,e,i);try{r=await uu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Hl,this.logger,this.performanceClient,i)(t,o);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[Nn]||"",requestId:e[Cn]||""},i)}catch(e){if(e instanceof xu){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[Nn]||"",requestId:t[Cn]||"",contentTypeHeader:t[In]||void 0,contentLengthHeader:t[_n]||void 0,httpStatus:e.httpStatus},i),e.error}throw e instanceof ba?e:_s(xa)}return Mu.postProcess(this.cacheManager,e,r,i),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(_d,t);const o=`https://${e}/${this.authority.tenant}/`,i=await Pu(o,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&eu(t,e.tokenQueryParameters),Wc(t,e.correlationId),Mc(t,e.correlationId,this.performanceClient),cl(t)}}
83
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function Uu(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
84
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Fu{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,o){const i=new Fu;let r;t.authorityType===su?i.authorityType=Yn:t.protocolMode===Rl?i.authorityType=Kn:i.authorityType=Hn,e.clientInfo&&o&&(r=Ec(e.clientInfo,o)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw _s(ts);i.environment=n,i.realm=r?.utid||Uu(e.idTokenClaims)||"",i.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(i.username=a||s||"",i.loginHint=e.idTokenClaims?.login_hint,i.name=e.idTokenClaims?.name||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const t=il(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[t]}return i}static createFromAccountInfo(e,t,o){const i=new Fu;return i.authorityType=e.authorityType||Kn,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.loginHint=e.loginHint,i.cloudGraphHostName=t,i.msGraphHost=o,i.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),i}static generateHomeAccountId(e,t,o,i,r){if(t!==su&&t!==lu){if(e)try{const t=Ec(e,i.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}o.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,o){if(!e||!t)return!1;let i=!0;if(o){const o=e.idTokenClaims||{},r=t.idTokenClaims||{};i=o.iat===r.iat&&o.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&&i}}
85
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Bu="no_tokens_found",qu="native_account_unavailable",ju="refresh_token_expired",Gu="ux_not_allowed",Wu="bad_token",Hu=["interaction_required","consent_required","login_required",Wu,Gu],Yu=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ku={[Bu]:"No refresh token found in the cache. Please sign-in.",[qu]:"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.",[ju]:"Refresh token has expired.",[Wu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[Gu]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Vu extends ba{constructor(e,t,o,i,r,n,a,s){super(e,t,o),Object.setPrototypeOf(this,Vu.prototype),this.timestamp=i||dn.EMPTY_STRING,this.traceId=r||dn.EMPTY_STRING,this.correlationId=n||dn.EMPTY_STRING,this.claims=a||dn.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function zu(e,t,o){const i=!!e&&Hu.indexOf(e)>-1,r=!!o&&Yu.indexOf(o)>-1,n=!!t&&Hu.some(e=>t.indexOf(e)>-1);return i||n||r}function Qu(e){return new Vu(e,Ku[e])}
86
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class $u{static setRequestState(e,t,o){const i=$u.generateLibraryState(e,o);return t?`${i}${dn.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw _s(is);const o={id:e.createNewGuid()};t&&(o.meta=t);const i=JSON.stringify(o);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw _s(is);if(!t)throw _s(Ua);try{const o=t.split(dn.RESOURCE_DELIM),i=o[0],r=o.length>1?o.slice(1).join(dn.RESOURCE_DELIM):dn.EMPTY_STRING,n=e.base64Decode(i),a=JSON.parse(n);return{userRequestState:r||dn.EMPTY_STRING,libraryState:a}}catch(e){throw _s(Ua)}}}
87
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const Zu="sw";class Ju{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Nd,e.correlationId);const o=await uu(this.generateKid.bind(this),Nd,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(o));return{kid:o.kid,reqCnfString:i}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Rd,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Zu}}async signPopToken(e,t,o){return this.signPayload(e,t,o)}async signPayload(e,t,o,i){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=o,d=n?new pl(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:hu(),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,...i},t,l,o.correlationId)}}
88
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Xu{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 ep{constructor(e,t,o,i,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=o,this.logger=i,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const o=`Error(s): ${e.error_codes||dn.NOT_AVAILABLE} - Timestamp: ${e.timestamp||dn.NOT_AVAILABLE} - Description: ${e.error_description||dn.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||dn.NOT_AVAILABLE} - Trace ID: ${e.trace_id||dn.NOT_AVAILABLE}`,i=e.error_codes?.length?e.error_codes[0]:void 0,r=new vu(e.error,o,e.suberror,i,e.status);if(t&&e.status&&e.status>=mn&&e.status<=fn)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>=un&&e.status<=hn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(zu(e.error,e.error_description,e.suberror))throw new Vu(e.error,e.error_description,e.suberror,e.timestamp||dn.EMPTY_STRING,e.trace_id||dn.EMPTY_STRING,e.correlation_id||dn.EMPTY_STRING,e.claims||dn.EMPTY_STRING,i);throw r}}async handleServerTokenResponse(e,t,o,i,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(bd,e.correlation_id),e.id_token){if(d=nl(e.id_token||dn.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw _s(qa);if(i.maxAge||0===i.maxAge){const e=d.auth_time;if(!e)throw _s(ja);al(e,i.maxAge)}}this.homeAccountIdentifier=Fu.generateHomeAccountId(e.client_info||dn.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=$u.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||i.sshKid||void 0;const u=this.generateCacheRecord(e,t,o,i,d,n,r);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Xu(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),a&&!s&&u.account){const e=this.cacheStorage.generateAccountKey(u.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,i.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await ep.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,i.correlationId,i.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return ep.generateAuthenticationResult(this.cryptoObj,t,u,!1,i,d,c,e,l)}generateCacheRecord(e,t,o,i,r,n,a){const s=t.getPreferredCache();if(!s)throw _s(ts);const l=Uu(r);let d,c;e.id_token&&r&&(d=Au(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=tp(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,i.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let u=null;if(e.access_token){const r=e.scope?tl.fromString(e.scope):new tl(i.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,p=o+a,h=p+d,m=c&&c>0?o+c:void 0;u=yu(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),p,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,i.claims,i.requestedClaimsHash)}let p=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=o+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}p=Iu(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:u,refreshToken:p,appMetadata:h}}static async generateAuthenticationResult(e,t,o,i,r,n,a,s,l){let d,c,u=dn.EMPTY_STRING,p=[],h=null,m=dn.EMPTY_STRING;if(o.accessToken){if(o.accessToken.tokenType!==na.POP||r.popKid)u=o.accessToken.secret;else{const t=new Ju(e),{secret:i,keyId:n}=o.accessToken;if(!n)throw _s(hs);u=await t.signPopToken(i,n,r)}p=tl.fromString(o.accessToken.target).asArray(),h=fu(o.accessToken.expiresOn),d=fu(o.accessToken.extendedExpiresOn),o.accessToken.refreshOn&&(c=fu(o.accessToken.refreshOn))}o.appMetadata&&(m=o.appMetadata.familyId===Zn?Zn:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&o.account&&(o.account.nativeAccountId=s?.spa_accountid);const T=o.account?rl(o.account.getAccountInfo(),void 0,n,o.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:p,account:T,idToken:o?.idToken?.secret||"",idTokenClaims:n||{},accessToken:u,fromCache:i,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||dn.EMPTY_STRING,familyId:m,tokenType:o.accessToken?.tokenType||dn.EMPTY_STRING,state:a?a.userRequestState:dn.EMPTY_STRING,cloudGraphHostName:o.account?.cloudGraphHostName||dn.EMPTY_STRING,msGraphHost:o.account?.msGraphHost||dn.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function tp(e,t,o,i,r,n,a,s,l,d,c,u){u?.verbose("setCachedAccount called");const p=e.getAccountKeys().find(e=>e.startsWith(o));let h=null;p&&(h=e.getAccount(p,r));const m=h||Fu.createAccount({homeAccountId:o,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,i),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=il(o,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
90
+ /*! @azure/msal-common v15.12.0 2025-08-19 */async function op(e,t,o){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:o})}
91
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class ip extends ku{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(Ed,e.correlationId),!e.code)throw _s(Ka);const o=hu(),i=await uu(this.executeTokenRequest.bind(this),Od,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=i.headers?.[Cn],n=new ep(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(i.body),uu(n.handleServerTokenResponse.bind(n),bd,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,o,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw Xs(ks);const t=this.createLogoutUrlQueryString(e);return pl.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Od,t.correlationId);const o=this.createTokenQueryParameters(t),i=pl.appendQueryString(e.tokenEndpoint,o),r=await uu(this.createTokenRequestBody.bind(this),Cd,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=Ec(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${zn}${e.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=Lu(this.config.authOptions.clientId,t);return uu(this.executePostToTokenEndpoint.bind(this),Kl,this.logger,this.performanceClient,t.correlationId)(i,r,a,s,t.correlationId,Kl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Cd,e.correlationId);const t=new Map;if(kc(t,e.embeddedClientId||e.tokenBodyParameters?.[Cc]||this.config.authOptions.clientId),this.includeRedirectUri)Uc(t,e.redirectUri);else if(!e.redirectUri)throw Xs(ws);if(Dc(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Hc(t,this.config.libraryInfo),Yc(t,this.config.telemetry.application),ru(t),this.serverTelemetryManager&&!yc(this.config)&&iu(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&zc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const o=this.config.clientCredentials.clientAssertion;Qc(t,await op(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,o.assertionType)}if(Zc(t,Gn),Jc(t),e.authenticationScheme===na.POP){const o=new Ju(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await uu(o.generateCnf.bind(o),Nd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}tu(t,i)}else if(e.authenticationScheme===na.SSH){if(!e.sshJwk)throw Xs(Gs);ou(t,e.sshJwk)}let o;if((!el.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Gc(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Ec(e.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${t.uid}${zn}${t.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else o=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&o)switch(o.type){case Ic:try{qc(t,Oc(o.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:Bc(t,o.credential)}return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&eu(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[wc]||eu(t,{[wc]:"1"}),Mc(t,e.correlationId,this.performanceClient),cl(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&&Wc(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&Kc(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&eu(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Xc(t),cl(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
92
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class rp extends ku{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(zl,e.correlationId);const t=hu(),o=await uu(this.executeTokenRequest.bind(this),Vl,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=o.headers?.[Cn],r=new ep(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(o.body),uu(r.handleServerTokenResponse.bind(r),bd,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){if(!e)throw Xs(Ds);if(this.performanceClient?.addQueueMeasurement($l,e.correlationId),!e.account)throw _s(Xa);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const o=t instanceof Vu&&t.errorCode===Bu,i=t instanceof vu&&t.errorCode===ca&&t.subError===ua;if(o||i)return uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Ql,e.correlationId);const o=cu(this.cacheManager.getRefreshToken.bind(this.cacheManager),Yd,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!o)throw Qu(Bu);if(o.expiresOn&&gu(o.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(o.expiresOn)},e.correlationId),Qu(ju);const i={...e,refreshToken:o.secret,authenticationScheme:e.authenticationScheme||na.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Ic}};try{return await uu(this.acquireToken.bind(this),zl,this.logger,this.performanceClient,e.correlationId)(i)}catch(t){if(t instanceof Vu&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(o.expiresOn)},e.correlationId),t.subError===Wu)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(o);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Vl,e.correlationId);const o=this.createTokenQueryParameters(e),i=pl.appendQueryString(t.tokenEndpoint,o),r=await uu(this.createTokenRequestBody.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=Lu(this.config.authOptions.clientId,e);return uu(this.executePostToTokenEndpoint.bind(this),Yl,this.logger,this.performanceClient,e.correlationId)(i,r,n,a,e.correlationId,Yl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Zl,e.correlationId);const t=new Map;if(kc(t,e.embeddedClientId||e.tokenBodyParameters?.[Cc]||this.config.authOptions.clientId),e.redirectUri&&Uc(t,e.redirectUri),Dc(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Zc(t,Wn),Jc(t),Hc(t,this.config.libraryInfo),Yc(t,this.config.telemetry.application),ru(t),this.serverTelemetryManager&&!yc(this.config)&&iu(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&zc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const o=this.config.clientCredentials.clientAssertion;Qc(t,await op(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,o.assertionType)}if(e.authenticationScheme===na.POP){const o=new Ju(this.cryptoUtils,this.performanceClient);let i;if(e.popKid)i=this.cryptoUtils.encodeKid(e.popKid);else{i=(await uu(o.generateCnf.bind(o),Nd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}tu(t,i)}else if(e.authenticationScheme===na.SSH){if(!e.sshJwk)throw Xs(Gs);ou(t,e.sshJwk)}if((!el.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Gc(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Ic:try{qc(t,Oc(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:Bc(t,e.ccsCredential.credential)}return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&eu(t,e.tokenBodyParameters),Mc(t,e.correlationId,this.performanceClient),cl(t)}}
93
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class np extends ku{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Xl,e.correlationId);let t=Aa;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!el.isEmptyObj(e.claims))throw this.setCacheOutcome(ya,e.correlationId),_s(ss);if(!e.account)throw _s(Xa);const o=e.account.tenantId||function(e){const t=new pl(e).getUrlComponents(),o=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(o){case bn:case wn:case Sn:return;default:return o}}(e.authority),i=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,i,o);if(!r)throw this.setCacheOutcome(Ia,e.correlationId),_s(ss);if(n=r.cachedAt,Number(n)>hu()||gu(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(_a,e.correlationId),_s(ss);var n;r.refreshOn&&gu(r.refreshOn,0)&&(t=Ea);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,i,o,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await uu(this.generateResultFromCacheRecord.bind(this),ed,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Aa&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let o;if(this.performanceClient?.addQueueMeasurement(ed,t.correlationId),e.idToken&&(o=nl(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=o?.auth_time;if(!e)throw _s(ja);al(e,t.maxAge)}return ep.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,o)}}
94
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const ap={sendGetRequestAsync:()=>Promise.reject(_s(Ts)),sendPostRequestAsync:()=>Promise.reject(_s(Ts))};
95
+ /*! @azure/msal-common v15.12.0 2025-08-19 */function sp(e,t,o,i){const r=t.correlationId,n=new Map;kc(n,t.embeddedClientId||t.extraQueryParameters?.[Cc]||e.clientId);if(Dc(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),Uc(n,t.redirectUri),Wc(n,r),function(e,t){e.set("response_mode",t||jn)}(n,t.responseMode),Jc(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),i?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),i?.addFields({domainHintFromRequest:!0},r)),t.prompt!==Mn)if(t.sid&&t.prompt===Dn)o.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),jc(n,t.sid),i?.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&&(o.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){o.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),Fc(n,s),i?.addFields({loginHintFromClaim:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===Dn){o.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),jc(n,e),i?.addFields({sidFromClaim:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)o.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),Fc(n,t.loginHint),Bc(n,t.loginHint),i?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){o.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),Fc(n,t.account.username),i?.addFields({loginHintFromUpn:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){o.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(o.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),Fc(n,t.loginHint),Bc(n,t.loginHint),i?.addFields({loginHintFromRequest:!0},r));else o.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&&Kc(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&Gc(n,t.claims,e.clientCapabilities),t.embeddedClientId&&nu(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(Lc)||Xc(n),n}function lp(e,t,o,i){const r=cl(t,o,i);return pl.appendQueryString(e.authorizationEndpoint,r)}function dp(e,t){if(!e.state||!t)throw e.state?_s(Ba,"Cached State"):_s(Ba,"Server State");let o,i;try{o=decodeURIComponent(e.state)}catch(t){throw _s(Ua,e.state)}try{i=decodeURIComponent(t)}catch(t){throw _s(Ua,e.state)}if(o!==i)throw _s(Fa);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",o=e.error_uri?.lastIndexOf(t);return o&&o>=0?e.error_uri?.substring(o+t.length):void 0}(e);if(zu(e.error,e.error_description,e.suberror))throw new Vu(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new vu(e.error||"",e.error_description,e.suberror,t)}}function cp(e){const{skus:t,libraryName:o,libraryVersion:i,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[o,i]],[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:o,skuName:i,skuVersion:r}=e;if(o>=t.length)return;t[o]=[i,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class up{constructor(e,t){this.cacheOutcome=Aa,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||dn.EMPTY_STRING,this.wrapperVer=e.wrapperVer||dn.EMPTY_STRING,this.telemetryCacheKey=ra.CACHE_KEY+Vn+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${ra.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],o=this.getNativeBrokerErrorCode();o?.length&&t.push(`broker_error=${o}`);const i=t.join(ra.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(ra.VALUE_SEPARATOR);return[ra.SCHEMA_VERSION,r,i].join(ra.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=up.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(ra.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(ra.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?ra.OVERFLOW_TRUE:ra.OVERFLOW_FALSE].join(ra.VALUE_SEPARATOR);return[ra.SCHEMA_VERSION,e.cacheHits,o,i,n].join(ra.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=ra.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 ba?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(ra.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=up.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const o={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let t,o=0,i=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||dn.EMPTY_STRING,n=e.failedRequests[2*t+1]||dn.EMPTY_STRING,a=e.errors[t]||dn.EMPTY_STRING;if(i+=r.toString().length+n.toString().length+a.length+3,!(i<ra.MAX_LAST_HEADER_BYTES))break;o+=1}return o}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||dn.EMPTY_STRING),e.push(this.regionSource||dn.EMPTY_STRING),e.push(this.regionOutcome||dn.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 cp(e)}}
97
+ /*! @azure/msal-common v15.12.0 2025-08-19 */const pp="missing_kid_error",hp="missing_alg_error",mp={[pp]:"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.",[hp]:"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 fp extends ba{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,fp.prototype)}}function gp(e){return new fp(e,mp[e])}
98
+ /*! @azure/msal-common v15.12.0 2025-08-19 */class Tp{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw gp(pp);if(!e.alg)throw gp(hp);const t=new Tp({typ:e.typ||Oa,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
99
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const Ap="pkce_not_created",yp="ear_jwk_empty",Ip="ear_jwe_empty",_p="crypto_nonexistent",Ep="empty_navigate_uri",Op="hash_empty_error",Cp="no_state_in_hash",Np="hash_does_not_contain_known_properties",Rp="unable_to_parse_state",bp="state_interaction_type_mismatch",wp="interaction_in_progress",Sp="popup_window_error",Pp="empty_window_error",vp="user_cancelled",Lp="monitor_popup_timeout",Mp="monitor_window_timeout",xp="redirect_in_iframe",Dp="block_iframe_reload",kp="block_nested_popups",Up="iframe_closed_prematurely",Fp="silent_logout_unsupported",Bp="no_account_error",qp="silent_prompt_value_error",jp="no_token_request_cache_error",Gp="unable_to_parse_token_request_cache_error",Wp="auth_request_not_set_error",Hp="invalid_cache_type",Yp="non_browser_environment",Kp="database_not_open",Vp="no_network_connectivity",zp="post_request_failed",Qp="get_request_failed",$p="failed_to_parse_response",Zp="unable_to_load_token",Jp="crypto_key_not_found",Xp="auth_code_required",eh="auth_code_or_nativeAccountId_required",th="spa_code_and_nativeAccountId_present",oh="database_unavailable",ih="unable_to_acquire_token_from_native_platform",rh="native_handshake_timeout",nh="native_extension_not_installed",ah="native_connection_not_established",sh="uninitialized_public_client_application",lh="native_prompt_not_supported",dh="invalid_base64_string",ch="invalid_pop_token_request",uh="failed_to_build_headers",ph="failed_to_parse_headers",hh="failed_to_decrypt_ear_response",mh="timed_out",fh="For more visit: aka.ms/msaljs/browser-errors",gh={[Ap]:"The PKCE code challenge and verifier could not be generated.",[yp]:"No EAR encryption key provided. This is unexpected.",[Ip]:"Server response does not contain ear_jwe property. This is unexpected.",[_p]:"The crypto object or function is not available.",[Ep]:"Navigation URI is empty. Please check stack trace for more info.",[Op]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${fh}`,[Cp]:"Hash does not contain state. Please verify that the request originated from msal.",[Np]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${fh}`,[Rp]:"Unable to parse state. Please verify that the request originated from msal.",[bp]:"Hash contains state but the interaction type does not match the caller.",[wp]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${fh}`,[Sp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Pp]:"window.open returned null or undefined window object.",[vp]:"User cancelled the flow.",[Lp]:`Token acquisition in popup failed due to timeout. ${fh}`,[Mp]:`Token acquisition in iframe failed due to timeout. ${fh}`,[xp]:"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.",[Dp]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${fh}`,[kp]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Up]:"The iframe being monitored was closed prematurely.",[Fp]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[Bp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[qp]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[jp]:"No token request found in cache.",[Gp]:"The cached token request could not be parsed.",[Wp]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Hp]:"Invalid cache type",[Yp]:"Login and token requests are not supported in non-browser environments.",[Kp]:"Database is not open!",[Vp]:"No network connectivity. Check your internet connection.",[zp]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Qp]:"Network request failed. Please check the network trace to determine root cause.",[$p]:"Failed to parse network response. Check network trace.",[Zp]:"Error loading token to cache.",[Jp]:"Cryptographic Key or Keypair not found in browser storage.",[Xp]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[eh]:"An authorization code or nativeAccountId must be provided to this flow.",[th]:"Request cannot contain both spa code and native account id.",[oh]:"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.",[ih]:`Unable to acquire token from native platform. ${fh}`,[rh]:"Timed out while attempting to establish connection to browser extension",[nh]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[ah]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${fh}`,[sh]:`You must call and await the initialize function before attempting to call any other MSAL API. ${fh}`,[lh]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[dh]:"Invalid base64 encoded string.",[ch]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[uh]:"Failed to build request headers object.",[ph]:"Failed to parse response headers",[hh]:"Failed to decrypt ear response",[mh]:"The request timed out."};class Th extends ba{constructor(e,t){super(e,gh[e],t),Object.setPrototypeOf(this,Th.prototype),this.name="BrowserAuthError"}}function Ah(e,t){return new Th(e,t)}
100
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const yh="invalid_grant",Ih=483,_h=600,Eh="msal",Oh=30,Ch="msal.js.browser",Nh="53ee284d-920a-4b59-9d30-a60315b26836",Rh="ppnbnpeolgkicgegkbkbjmhlideopiji",bh="MATS",wh="MicrosoftEntra",Sh="DOM API",Ph="get-token-and-sign-out",vh="PlatformAuthDOMHandler",Lh="PlatformAuthExtensionHandler",Mh="Handshake",xh="HandshakeResponse",Dh="GetToken",kh="Response",Uh="localStorage",Fh="sessionStorage",Bh="memoryStorage",qh="GET",jh="POST",Gh="signin",Wh="signout",Hh="request.origin",Yh="urlHash",Kh="request.params",Vh="code.verifier",zh="interaction.status",Qh="request.native",$h="wrapper.sku",Zh="wrapper.version",Jh=861,Xh=862,em=863,tm=865,om=866,im=61,rm=961,nm=962;var am;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(am||(am={}));const sm="startup",lm="login",dm="logout",cm="acquireToken",um="ssoSilent",pm="handleRedirect",hm="none",mm={scopes:An},fm="@azure/msal-react",gm="msal.db",Tm=`${gm}.keys`,Am=0,ym=1,Im=2,_m=3,Em=4,Om=5,Cm=[Am,Om,Em];
101
101
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
102
- function bm(e){return encodeURIComponent(Sm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function wm(e){return Pm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Sm(e){return Pm((new TextEncoder).encode(e))}function Pm(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 vm(e){return(new TextDecoder).decode(Lm(e))}function Lm(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 Ih(uh)}const o=atob(t);return Uint8Array.from(o,e=>e.codePointAt(0)||0)}
104
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Mm="AES-GCM",xm="HKDF",Dm="SHA-256",km=new Uint8Array([1,0,1]),Um="0123456789abcdef",Fm=new Uint32Array(1),Bm="raw",qm="encrypt",jm="decrypt",Gm={name:"RSASSA-PKCS1-v1_5",hash:Dm,modulusLength:2048,publicExponent:km};async function Wm(e,t,o){t?.addQueueMeasurement(ec,o);const i=(new TextEncoder).encode(e);return window.crypto.subtle.digest(Dm,i)}function Hm(e){return window.crypto.getRandomValues(e)}function Ym(){return window.crypto.getRandomValues(Fm),Fm[0]}function Km(){const e=Date.now(),t=1024*Ym()+(1023&Ym()),o=new Uint8Array(16),i=Math.trunc(t/2**30),r=t&2**30-1,n=Ym();o[0]=e/2**40,o[1]=e/2**32,o[2]=e/2**24,o[3]=e/65536,o[4]=e/256,o[5]=e,o[6]=112|i>>>8,o[7]=i,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=n>>>24,o[13]=n>>>16,o[14]=n>>>8,o[15]=n;let a="";for(let e=0;e<o.length;e++)a+=Um.charAt(o[e]>>>4),a+=Um.charAt(15&o[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function Vm(e){return window.crypto.subtle.exportKey("jwk",e)}async function zm(){const e=await $m(),t={alg:"dir",kty:"oct",k:wm(new Uint8Array(e))};return Sm(JSON.stringify(t))}async function Qm(e,t){const o=t.split(".");if(5!==o.length)throw Ih(fh,"jwe_length");const i=await async function(e){const t=vm(e),o=Lm(JSON.parse(t).k);return window.crypto.subtle.importKey(Bm,o,Mm,!1,[jm])}(e).catch(()=>{throw Ih(fh,"import_key")});try{const e=(new TextEncoder).encode(o[0]),t=Lm(o[2]),r=Lm(o[3]),n=Lm(o[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:Mm,iv:t,tagLength:a,additionalData:e},i,s);return(new TextDecoder).decode(l)}catch(e){throw Ih(fh,"decrypt")}}async function $m(){const e=await window.crypto.subtle.generateKey({name:Mm,length:256},!0,[qm,jm]);return window.crypto.subtle.exportKey(Bm,e)}async function Zm(e){return window.crypto.subtle.importKey(Bm,e,xm,!1,["deriveKey"])}async function Jm(e,t,o){return window.crypto.subtle.deriveKey({name:xm,salt:t,hash:Dm,info:(new TextEncoder).encode(o)},e,{name:Mm,length:256},!1,[qm,jm])}async function Xm(e,t,o){const i=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await Jm(e,r,o),a=await window.crypto.subtle.encrypt({name:Mm,iv:new Uint8Array(12)},n,i);return{data:wm(new Uint8Array(a)),nonce:wm(r)}}async function ef(e,t,o,i){const r=Lm(i),n=await Jm(e,Lm(t),o),a=await window.crypto.subtle.decrypt({name:Mm,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function tf(e){const t=await Wm(e);return wm(new Uint8Array(t))}
105
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const of="storage_not_supported",rf="stubbed_public_client_application_called",nf="in_mem_redirect_unavailable",af={[of]:"Given storage configuration option was not supported.",[rf]:"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",[nf]:"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 sf extends Sa{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,sf.prototype)}}function lf(e){return new sf(e,af[e])}
106
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function df(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function cf(){return window.parent!==window}function uf(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function pf(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${Ch}.`))throw Ih(Fp)}function hf(){if("undefined"==typeof window)throw Ih(Vp)}function mf(e){if(!e)throw Ih(dh)}function ff(e){hf(),function(){if(ml.hashContainsKnownProperties(window.location.hash)&&cf())throw Ih(Up)}(),pf(),mf(e)}function gf(e,t){if(ff(e),function(e){if(cf()&&!e)throw Ih(kp)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===jh&&!t.cache.storeAuthStateInCookie)throw lf(nf)}function Tf(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 Nm(e){return encodeURIComponent(bm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Rm(e){return wm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function bm(e){return wm((new TextEncoder).encode(e))}function wm(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 Sm(e){return(new TextDecoder).decode(Pm(e))}function Pm(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 Ah(dh)}const o=atob(t);return Uint8Array.from(o,e=>e.codePointAt(0)||0)}
104
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const vm="AES-GCM",Lm="HKDF",Mm="SHA-256",xm=new Uint8Array([1,0,1]),Dm="0123456789abcdef",km=new Uint32Array(1),Um="raw",Fm="encrypt",Bm="decrypt",qm={name:"RSASSA-PKCS1-v1_5",hash:Mm,modulusLength:2048,publicExponent:xm};async function jm(e,t,o){t?.addQueueMeasurement(Jd,o);const i=(new TextEncoder).encode(e);return window.crypto.subtle.digest(Mm,i)}function Gm(e){return window.crypto.getRandomValues(e)}function Wm(){return window.crypto.getRandomValues(km),km[0]}function Hm(){const e=Date.now(),t=1024*Wm()+(1023&Wm()),o=new Uint8Array(16),i=Math.trunc(t/2**30),r=t&2**30-1,n=Wm();o[0]=e/2**40,o[1]=e/2**32,o[2]=e/2**24,o[3]=e/65536,o[4]=e/256,o[5]=e,o[6]=112|i>>>8,o[7]=i,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=n>>>24,o[13]=n>>>16,o[14]=n>>>8,o[15]=n;let a="";for(let e=0;e<o.length;e++)a+=Dm.charAt(o[e]>>>4),a+=Dm.charAt(15&o[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function Ym(e){return window.crypto.subtle.exportKey("jwk",e)}async function Km(){const e=await zm(),t={alg:"dir",kty:"oct",k:Rm(new Uint8Array(e))};return bm(JSON.stringify(t))}async function Vm(e,t){const o=t.split(".");if(5!==o.length)throw Ah(hh,"jwe_length");const i=await async function(e){const t=Sm(e),o=Pm(JSON.parse(t).k);return window.crypto.subtle.importKey(Um,o,vm,!1,[Bm])}(e).catch(()=>{throw Ah(hh,"import_key")});try{const e=(new TextEncoder).encode(o[0]),t=Pm(o[2]),r=Pm(o[3]),n=Pm(o[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:vm,iv:t,tagLength:a,additionalData:e},i,s);return(new TextDecoder).decode(l)}catch(e){throw Ah(hh,"decrypt")}}async function zm(){const e=await window.crypto.subtle.generateKey({name:vm,length:256},!0,[Fm,Bm]);return window.crypto.subtle.exportKey(Um,e)}async function Qm(e){return window.crypto.subtle.importKey(Um,e,Lm,!1,["deriveKey"])}async function $m(e,t,o){return window.crypto.subtle.deriveKey({name:Lm,salt:t,hash:Mm,info:(new TextEncoder).encode(o)},e,{name:vm,length:256},!1,[Fm,Bm])}async function Zm(e,t,o){const i=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await $m(e,r,o),a=await window.crypto.subtle.encrypt({name:vm,iv:new Uint8Array(12)},n,i);return{data:Rm(new Uint8Array(a)),nonce:Rm(r)}}async function Jm(e,t,o,i){const r=Pm(i),n=await $m(e,Pm(t),o),a=await window.crypto.subtle.decrypt({name:vm,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function Xm(e){const t=await jm(e);return Rm(new Uint8Array(t))}
105
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const ef="storage_not_supported",tf="stubbed_public_client_application_called",of="in_mem_redirect_unavailable",rf={[ef]:"Given storage configuration option was not supported.",[tf]:"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",[of]:"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 nf extends ba{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,nf.prototype)}}function af(e){return new nf(e,rf[e])}
106
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function sf(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function lf(){return window.parent!==window}function df(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function cf(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${Eh}.`))throw Ah(kp)}function uf(){if("undefined"==typeof window)throw Ah(Yp)}function pf(e){if(!e)throw Ah(sh)}function hf(e){uf(),function(){if(pl.hashContainsKnownProperties(window.location.hash)&&lf())throw Ah(Dp)}(),cf(),pf(e)}function mf(e,t){if(hf(e),function(e){if(lf()&&!e)throw Ah(xp)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Bh&&!t.cache.storeAuthStateInCookie)throw af(of)}function ff(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 Af{navigateInternal(e,t){return Af.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Af.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,o)=>{setTimeout(()=>{o(Ih(gh,"failed_to_redirect"))},t.timeout)})}}
109
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class yf{async sendGetRequestAsync(e,t){let o,i={},r=0;const n=If(t);try{o=await fetch(e,{method:Gh,headers:n})}catch(e){throw Uu(Ih(window.navigator.onLine?Zp:Qp),void 0,void 0,e)}i=_f(o.headers);try{return r=o.status,{headers:i,body:await o.json(),status:r}}catch(e){throw Uu(Ih(Jp),r,i,e)}}async sendPostRequestAsync(e,t){const o=t&&t.body||"",i=If(t);let r,n=0,a={};try{r=await fetch(e,{method:Wh,headers:i,body:o})}catch(e){throw Uu(Ih(window.navigator.onLine?$p:Qp),void 0,void 0,e)}a=_f(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw Uu(Ih(Jp),n,a,e)}}}function If(e){try{const t=new Headers;if(!e||!e.headers)return t;const o=e.headers;return Object.entries(o).forEach(([e,o])=>{t.append(e,o)}),t}catch(e){throw Uu(Ih(hh),void 0,void 0,e)}}function _f(e){try{const t={};return e.forEach((e,o)=>{t[o]=e}),t}catch(e){throw Ih(mh)}}
110
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Ef=1e4;
108
+ class gf{navigateInternal(e,t){return gf.defaultNavigateWindow(e,t)}navigateExternal(e,t){return gf.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,o)=>{setTimeout(()=>{o(Ah(mh,"failed_to_redirect"))},t.timeout)})}}
109
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Tf{async sendGetRequestAsync(e,t){let o,i={},r=0;const n=Af(t);try{o=await fetch(e,{method:qh,headers:n})}catch(e){throw Du(Ah(window.navigator.onLine?Qp:Vp),void 0,void 0,e)}i=yf(o.headers);try{return r=o.status,{headers:i,body:await o.json(),status:r}}catch(e){throw Du(Ah($p),r,i,e)}}async sendPostRequestAsync(e,t){const o=t&&t.body||"",i=Af(t);let r,n=0,a={};try{r=await fetch(e,{method:jh,headers:i,body:o})}catch(e){throw Du(Ah(window.navigator.onLine?zp:Vp),void 0,void 0,e)}a=yf(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw Du(Ah($p),n,a,e)}}}function Af(e){try{const t=new Headers;if(!e||!e.headers)return t;const o=e.headers;return Object.entries(o).forEach(([e,o])=>{t.append(e,o)}),t}catch(e){throw Du(Ah(uh),void 0,void 0,e)}}function yf(e){try{const t={};return e.forEach((e,o)=>{t[o]=e}),t}catch(e){throw Ah(ph)}}
110
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const If=1e4;
111
111
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
112
- const Of="4.21.1",Cf="msal",Nf="browser",Rf=`${Cf}.${Nf}.log.level`,bf=`${Cf}.${Nf}.log.pii`,wf=`${Cf}.${Nf}.platform.auth.dom`,Sf=`${Cf}.version`,Pf="account.keys",vf="token.keys";function Lf(e=1){return e<1?`${Cf}.${Pf}`:`${Cf}.${e}.${Pf}`}function Mf(e,t=1){return t<1?`${Cf}.${vf}.${e}`:`${Cf}.${t}.${vf}.${e}`}
113
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class xf{static loggerCallback(e,t){switch(e){case Ns.Error:return void console.error(t);case Ns.Info:return void console.info(t);case Ns.Verbose:return void console.debug(t);case Ns.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:o,telemetry:i},r){const n={clientId:un.EMPTY_STRING,authority:`${un.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:un.EMPTY_STRING,authorityMetadata:un.EMPTY_STRING,redirectUri:"undefined"!=typeof window?uf():"",postLogoutRedirectUri:un.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:bl,OIDCOptions:{serverResponseType:Gn,defaultScopes:[un.OPENID_SCOPE,un.PROFILE_SCOPE,un.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Ss,tenant:un.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:qh,cacheRetentionDays:5,temporaryCacheLocation:qh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==Bh),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Ns.Info,piiLoggingEnabled:!1},l={...{...hc,loggerOptions:s,networkClient:r?new yf:lp,navigationClient:new Af,loadFrameTimeout:0,windowHashTimeout:o?.loadFrameTimeout||6e4,iframeHashTimeout:o?.loadFrameTimeout||Ef,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:o?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Nh},...o,loggerOptions:o?.loggerOptions||s},d={application:{appName:un.EMPTY_STRING,appVersion:un.EMPTY_STRING},client:new pc};e?.protocolMode!==wl&&e?.OIDCOptions&&new Rs(l.loggerOptions).warning(JSON.stringify(tl(zs)));if(e?.protocolMode&&e.protocolMode===wl&&l?.allowPlatformBroker)throw tl(Qs);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...i}}}(e,this.browserEnvironment);try{t=window[qh]}catch(e){}const o=t?.getItem(Rf),i=t?.getItem(bf)?.toLowerCase(),r="true"===i||"false"!==i&&void 0,n={...this.config.system.loggerOptions},a=o&&Object.keys(Ns).includes(o)?Ns[o]:void 0;a&&(n.loggerCallback=xf.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Rs(n,"@azure/msal-browser",Of),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 Df extends xf{getModuleName(){return Df.MODULE_NAME}getId(){return Df.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}Df.MODULE_NAME="",Df.ID="StandardOperatingContext";
112
+ const _f="4.21.1",Ef="msal",Of="browser",Cf=`${Ef}.${Of}.log.level`,Nf=`${Ef}.${Of}.log.pii`,Rf=`${Ef}.${Of}.platform.auth.dom`,bf=`${Ef}.version`,wf="account.keys",Sf="token.keys";function Pf(e=1){return e<1?`${Ef}.${wf}`:`${Ef}.${e}.${wf}`}function vf(e,t=1){return t<1?`${Ef}.${Sf}.${e}`:`${Ef}.${t}.${Sf}.${e}`}
113
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Lf{static loggerCallback(e,t){switch(e){case Os.Error:return void console.error(t);case Os.Info:return void console.info(t);case Os.Verbose:return void console.debug(t);case Os.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:o,telemetry:i},r){const n={clientId:dn.EMPTY_STRING,authority:`${dn.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:dn.EMPTY_STRING,authorityMetadata:dn.EMPTY_STRING,redirectUri:"undefined"!=typeof window?df():"",postLogoutRedirectUri:dn.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Nl,OIDCOptions:{serverResponseType:qn,defaultScopes:[dn.OPENID_SCOPE,dn.PROFILE_SCOPE,dn.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:bs,tenant:dn.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==Uh),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Os.Info,piiLoggingEnabled:!1},l={...{...uc,loggerOptions:s,networkClient:r?new Tf:ap,navigationClient:new gf,loadFrameTimeout:0,windowHashTimeout:o?.loadFrameTimeout||6e4,iframeHashTimeout:o?.loadFrameTimeout||If,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:o?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Oh},...o,loggerOptions:o?.loggerOptions||s},d={application:{appName:dn.EMPTY_STRING,appVersion:dn.EMPTY_STRING},client:new cc};e?.protocolMode!==Rl&&e?.OIDCOptions&&new Cs(l.loggerOptions).warning(JSON.stringify(Xs(Ks)));if(e?.protocolMode&&e.protocolMode===Rl&&l?.allowPlatformBroker)throw Xs(Vs);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...i}}}(e,this.browserEnvironment);try{t=window[Fh]}catch(e){}const o=t?.getItem(Cf),i=t?.getItem(Nf)?.toLowerCase(),r="true"===i||"false"!==i&&void 0,n={...this.config.system.loggerOptions},a=o&&Object.keys(Os).includes(o)?Os[o]:void 0;a&&(n.loggerCallback=Lf.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Cs(n,"@azure/msal-browser",_f),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 Mf extends Lf{getModuleName(){return Mf.MODULE_NAME}getId(){return Mf.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}Mf.MODULE_NAME="",Mf.ID="StandardOperatingContext";
115
115
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
116
- class kf{constructor(){this.dbName=Am,this.version=1,this.tableName=ym,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const o=window.indexedDB.open(this.dbName,this.version);o.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),o.addEventListener("success",t=>{const o=t;this.db=o.target.result,this.dbOpen=!0,e()}),o.addEventListener("error",()=>t(Ih(rh)))})}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,o)=>{if(!this.db)return o(Ih(zp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);i.addEventListener("success",e=>{const o=e;this.closeConnection(),t(o.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((o,i)=>{if(!this.db)return i(Ih(zp));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),o()}),r.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,o)=>{if(!this.db)return o(Ih(zp));const i=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);i.addEventListener("success",()=>{this.closeConnection(),t()}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Ih(zp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();o.addEventListener("success",t=>{const o=t;this.closeConnection(),e(o.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,o)=>{if(!this.db)return o(Ih(zp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);i.addEventListener("success",e=>{const o=e;this.closeConnection(),t(1===o.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const o=window.indexedDB.deleteDatabase(Am),i=setTimeout(()=>t(!1),200);o.addEventListener("success",()=>(clearTimeout(i),e(!0))),o.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),o.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}
117
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class Uf{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,o)=>{e.push(o)}),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 Ff{constructor(e){this.inMemoryCache=new Uf,this.indexedDBCache=new kf,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof yh&&e.errorCode===rh))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 Bf{constructor(e,t,o){this.logger=e,function(e){if(!window)throw Ih(Vp);if(!window.crypto)throw Ih(Op);if(!e&&!window.crypto.subtle)throw Ih(Op,"crypto_subtle_undefined")}(o??!1),this.cache=new Ff(this.logger),this.performanceClient=t}createNewGuid(){return Km()}base64Encode(e){return Sm(e)}base64Decode(e){return vm(e)}base64UrlEncode(e){return bm(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(Ul,e.correlationId),o=await async function(e,t){return window.crypto.subtle.generateKey(Gm,e,t)}(Bf.EXTRACTABLE,Bf.POP_KEY_USAGES),i=await Vm(o.publicKey),r=qf({e:i.e,kty:i.kty,n:i.n}),n=await this.hashString(r),a=await Vm(o.privateKey),s=await async function(e,t,o){return window.crypto.subtle.importKey("jwk",e,Gm,t,o)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:o.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 Os(hs)}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,o,i){const r=this.performanceClient?.startMeasurement(Fl,i),n=await this.cache.getItem(t);if(!n)throw Ih(eh);const a=await Vm(n.publicKey),s=qf(a),l=bm(JSON.stringify({kid:t})),d=bm(yp.getShrHeaderString({...o?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${bm(JSON.stringify(e))}`,u=(new TextEncoder).encode(c),p=await async function(e,t){return window.crypto.subtle.sign(Gm,e,t)}(n.privateKey,u),h=`${c}.${wm(new Uint8Array(p))}`;return r&&r.end({success:!0}),h}async hashString(e){return tf(e)}}function qf(e){return JSON.stringify(e,Object.keys(e).sort())}
120
- /*! @azure/msal-browser v4.21.1 2025-08-27 */Bf.POP_KEY_USAGES=["sign","verify"],Bf.EXTRACTABLE=!0;const jf=864e5,Gf="Lax",Wf="None";class Hf{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,o=document.cookie.split(";");for(let e=0;e<o.length;e++){const i=o[e],[r,...n]=decodeURIComponent(i).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw Os(ys)}setItem(e,t,o,i=!0,r=Gf){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(o){const e=function(e){const t=new Date,o=new Date(t.getTime()+e*jf);return o.toUTCString()}
121
- /*! @azure/msal-browser v4.21.1 2025-08-27 */(o);n+=`expires=${e};`}(i||r===Wf)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(Os(ys))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const o=decodeURIComponent(e).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function Yf(e,t){const o=e.getItem(Lf(t));return o?JSON.parse(o):[]}function Kf(e,t,o){const i=t.getItem(Mf(e,o));if(i){const e=JSON.parse(i);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 Vf(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
123
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const zf="msal.cache.encryption";class Qf{constructor(e,t,o){if(!window.localStorage)throw lf(of);this.memoryStorage=new Uf,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=o,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new Hf,o=t.getItem(zf);let i={key:"",id:""};if(o)try{i=JSON.parse(o)}catch(e){}if(i.key&&i.id){const t=pu(Lm,rc,this.logger,this.performanceClient,e)(i.key);this.encryptionCookie={id:i.id,key:await hu(Zm,oc,this.logger,this.performanceClient,e)(t)}}else{const o=Km(),i=await hu($m,ic,this.logger,this.performanceClient,e)(),r=pu(wm,nc,this.logger,this.performanceClient,e)(new Uint8Array(i));this.encryptionCookie={id:o,key:await hu(Zm,oc,this.logger,this.performanceClient,e)(i)};const n={id:o,key:r};t.setItem(zf,JSON.stringify(n),0,!0,Wf)}await hu(this.importExistingCache.bind(this),zd,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 Ih(dh);return this.memoryStorage.getItem(e)}async decryptData(e,t,o){if(!this.initialized||!this.encryptionCookie)throw Ih(dh);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},o),null;const i=await hu(ef,sc,this.logger,this.performanceClient,o)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!i)return null;try{return JSON.parse(i)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},o),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,o,i){if(!this.initialized||!this.encryptionCookie)throw Ih(dh);const{data:r,nonce:n}=await hu(Xm,ac,this.logger,this.performanceClient,o)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:i};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();Yf(this).forEach(e=>this.removeItem(e));const e=Kf(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(Cf)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=Yf(this);t=await this.importArray(t,e),t.length?this.setItem(Lf(),JSON.stringify(t)):this.removeItem(Lf());const o=Kf(this.clientId,this);o.idToken=await this.importArray(o.idToken,e),o.accessToken=await this.importArray(o.accessToken,e),o.refreshToken=await this.importArray(o.refreshToken,e),o.idToken.length||o.accessToken.length||o.refreshToken.length?this.setItem(Mf(this.clientId),JSON.stringify(o)):this.removeItem(Mf(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const o=this.getItem(e);if(!o)return null;let i;try{i=JSON.parse(o)}catch(e){return null}return Vf(i)?i.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):hu(ef,sc,this.logger,this.performanceClient,t)(this.encryptionCookie.key,i.nonce,this.getContext(e),i.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),i)}async importArray(e,t){const o=[],i=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),o.push(e)):this.removeItem(e)});i.push(r)}),await Promise.all(i),o}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($d);t.add({isBackground:!0});const{key:o,value:i,context:r}=e.data;return o?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(i?(this.memoryStorage.setItem(o,i),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(o),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 $f{constructor(){if(!window.sessionStorage)throw lf(of)}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 Zf="msal:initializeStart",Jf="msal:initializeEnd",Xf="msal:accountAdded",eg="msal:accountRemoved",tg="msal:activeAccountChanged",og="msal:loginStart",ig="msal:loginSuccess",rg="msal:loginFailure",ng="msal:acquireTokenStart",ag="msal:acquireTokenSuccess",sg="msal:acquireTokenFailure",lg="msal:acquireTokenFromNetworkStart",dg="msal:ssoSilentStart",cg="msal:ssoSilentSuccess",ug="msal:ssoSilentFailure",pg="msal:acquireTokenByCodeStart",hg="msal:acquireTokenByCodeSuccess",mg="msal:acquireTokenByCodeFailure",fg="msal:handleRedirectStart",gg="msal:handleRedirectEnd",Tg="msal:popupOpened",Ag="msal:logoutStart",yg="msal:logoutSuccess",Ig="msal:logoutFailure",_g="msal:logoutEnd",Eg="msal:restoreFromBFCache";
126
- /*! @azure/msal-browser v4.21.1 2025-08-27 */function Og(e,t){const o=e.indexOf(t);o>-1&&e.splice(o,1)}
127
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class Cg extends Nl{constructor(e,t,o,i,r,n,a){super(e,o,i,r,a),this.cacheConfig=t,this.logger=i,this.internalStorage=new Uf,this.browserStorage=Ng(e,t.cacheLocation,i,r),this.temporaryCacheStorage=Ng(e,t.temporaryCacheLocation,i,r),this.cookieStorage=new Hf,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=Yf(this.browserStorage,0),o=Kf(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:o.accessToken.length,oldIdCount:o.idToken.length,oldRefreshCount:o.refreshToken.length},e);const i=Yf(this.browserStorage,1),r=Kf(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:i.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,i,e),this.updateV0ToCurrent(1,o.idToken,r.idToken,e),this.updateV0ToCurrent(1,o.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,o.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Lf(0),JSON.stringify(t)):this.browserStorage.removeItem(Lf(0)),i.length>0?this.browserStorage.setItem(Lf(1),JSON.stringify(i)):this.browserStorage.removeItem(Lf(1)),this.setTokenKeys(o,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,o,i){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){Og(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),i));const l=Vf(s)?await this.browserStorage.decryptData(n,s,i):s;let d;if(l&&(Cu(l)||Nu(l))&&(d=l.expiresOn),!l||yu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&Au(d,300))this.browserStorage.removeItem(n),Og(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},i);else if(this.cacheConfig.cacheLocation!==Bh||Vf(s)){const t=`${Cf}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),i,s.lastUpdatedAt).then(()=>{o.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},i)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),i,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},i)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(Sf);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Of&&this.setItem(Sf,Of,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,o){let i=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=i?this.removeAccessTokenKeys(r.slice(0,n),o,0):(this.removeAccessTokenKeys(r.slice(0,i),o,0),this.removeAccessTokenKeys(r.slice(i,n),o)));break}catch(a){const s=Cl(a);if(!(s.errorCode===Il&&n<20))throw s;if(!r.length){const o=e===Mf(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===Mf(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...o,...n],i=o.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],o,!1)}}async setUserData(e,t,o,i){let r=0,n=[];for(let a=0;a<=20;a++)try{await hu(this.browserStorage.setUserData.bind(this.browserStorage),Qd,this.logger,this.performanceClient)(e,t,o,i),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),o,0):(this.removeAccessTokenKeys(n.slice(0,r),o,0),this.removeAccessTokenKeys(n.slice(r,a),o)));break}catch(e){const t=Cl(e);if(!(t.errorCode===Il&&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],o,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const o=this.browserStorage.getUserData(e);if(!o)return this.removeAccountKeyFromMap(e,t),null;const i=this.validateAndParseJson(o);return i&&qu.isAccountEntity(i)?Nl.toObject(new qu,i):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const o=this.generateAccountKey(e.getAccountInfo()),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.addAccountKeyToMap(o,t);this.cacheConfig.cacheLocation===Bh&&r&&this.eventHandler.emitEvent(Xf,void 0,e.getAccountInfo())}getAccountKeys(){return Yf(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const o=this.getAccountKeys();return-1===o.indexOf(e)?(o.push(e),this.setItem(Lf(),JSON.stringify(o),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 o=this.getAccountKeys(),i=o.indexOf(e);if(i>-1){if(o.splice(i,1),0===o.length)return void this.removeItem(Lf());this.setItem(Lf(),JSON.stringify(o),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 o=this.getActiveAccount(t);o?.homeAccountId===e.homeAccountId&&o?.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===Bh&&this.eventHandler.emitEvent(eg,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const o=this.getTokenKeys(),i=o.idToken.indexOf(e);i>-1&&(this.logger.info("idToken removed from tokenKeys map"),o.idToken.splice(i,1),this.setTokenKeys(o,t))}removeAccessToken(e,t,o=!0){super.removeAccessToken(e,t),o&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,o=1){this.logger.trace("removeAccessTokenKey called");const i=this.getTokenKeys(o);let r=0;if(e.forEach(e=>{const t=i.accessToken.indexOf(e);t>-1&&(i.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(i,t,o)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const o=this.getTokenKeys(),i=o.refreshToken.indexOf(e);i>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),o.refreshToken.splice(i,1),this.setTokenKeys(o,t))}getTokenKeys(e=1){return Kf(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,o=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(Mf(this.clientId,o),JSON.stringify(e),t):this.removeItem(Mf(this.clientId,o))}getIdTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const i=this.validateAndParseJson(o);return i&&((r=i)&&Ou(r)&&r.hasOwnProperty("realm")&&r.credentialType===Zn.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys();-1===r.idToken.indexOf(o)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(o),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const i=this.validateAndParseJson(o);return i&&Cu(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys(),n=r.accessToken.indexOf(o);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(o),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const i=this.validateAndParseJson(o);return i&&Nu(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(o)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(o),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 o=this.validateAndParseJson(t);return o&&(i=e,(r=o)&&0===i.indexOf(Jn)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var i,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const o=function({environment:e,clientId:t}){return[Jn,e,t].join(Qn).toLowerCase()}(e);this.setItem(o,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 o=this.validateAndParseJson(t);return o&&function(e,t){const o=0===e.indexOf(aa.CACHE_KEY);let i=!0;return t&&(i=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&i}(e,o)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),o):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),o)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const o=this.validateAndParseJson(t);return o&&function(e,t){return!!t&&0===e.indexOf(ea)&&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,o)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),o):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(Jh,e),this.internalStorage.setItem(Xh,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Jh)||un.EMPTY_STRING,this.internalStorage.getItem(Xh)||un.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(wn),o=this.browserStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const i=this.validateAndParseJson(o);return i?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:i.homeAccountId,localAccountId:i.localAccountId,tenantId:i.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const o=this.generateCacheKey(wn);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:fu().toString()};this.setItem(o,JSON.stringify(i),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o);this.eventHandler.emitEvent(tg)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const o=this.validateAndParseJson(t);return o&&function(e,t){let o=!1;e&&(o=0===e.indexOf(ca));let i=!0;return t&&(i=t.hasOwnProperty("throttleTime")),o&&i}(e,o)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),o):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),o)}getTemporaryCache(e,t){const o=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(o);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const i=this.temporaryCacheStorage.getItem(o);if(!i){if(this.cacheConfig.cacheLocation===Bh){const e=this.browserStorage.getItem(o);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"),i}setTemporaryCache(e,t,o){const i=o?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,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(Cf)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(Cf)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Kd,e);const t=this.getTokenKeys();let o=0;t.accessToken.forEach(t=>{const i=this.getAccessTokenCredential(t,e);i?.requestedClaimsHash&&t.includes(i.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),o++)}),o>0&&this.logger.warning(`${o} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return ol.startsWith(e,Cf)?e:`${Cf}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Zn.REFRESH_TOKEN&&e.familyId||e.clientId,o=e.tokenType&&e.tokenType.toLowerCase()!==sa.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Cf}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",o].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Cf}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(zh)),this.removeTemporaryItem(this.generateCacheKey(Qh)),this.removeTemporaryItem(this.generateCacheKey(Kh)),this.removeTemporaryItem(this.generateCacheKey(Vh)),this.removeTemporaryItem(this.generateCacheKey(Zh)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const o=Sm(JSON.stringify(e));if(this.setTemporaryCache(zh,o,!0),t){const e=Sm(t);this.setTemporaryCache(Qh,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(zh,!0);if(!e)throw Ih(Wp);const t=this.getTemporaryCache(Qh,!0);let o,i="";try{o=JSON.parse(vm(e)),t&&(i=vm(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Ih(Hp)}return[o,i]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Zh,!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=`${Cf}.${$h}`,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(),df(window),null}}setInteractionInProgress(e,t=Hh){const o=`${Cf}.${$h}`;if(e){if(this.getInteractionInProgress())throw Ih(Pp);this.setTemporaryCache(o,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(o)}async hydrateCache(e,t){const o=Iu(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const r={idToken:o,accessToken:_u(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?gu(e.expiresOn):0,e.extExpiresOn?gu(e.extExpiresOn):0,vm,void 0,e.tokenType,void 0,t.sshKid,t.claims,i)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,o){try{await super.saveCacheRecord(e,t,o)}catch(e){if(e instanceof Ol&&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 Ng(e,t,o,i){try{switch(t){case Bh:return new Qf(e,o,i);case qh:return new $f}}catch(e){o.error(e)}return new Uf}class Rg{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Rs({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,o){if("undefined"!=typeof window){const i=o||Km();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,o,i){const r={eventType:e,interactionType:t||null,payload:o||null,error:i||null,timestamp:Date.now()};switch(e){case Xf:case eg:case tg:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,o],i)=>{(0===o.length||o.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${i}: ${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 bg{constructor(e,t,o,i,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Km(),this.logger=i.clone(Rh,Of,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 ml.getAbsoluteUrl(t,uf())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const o={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 hp(o,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,o=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Hl,this.correlationId);const i={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=o?.length?"true"===o:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(ml.getDomainFromUrl(r),t.environment):r,s=Pu.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await hu(Lu,vd,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw tl($s);return l}}
129
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function wg(e,t,o,i){o.addQueueMeasurement(rd,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===sa.SSH){if(!e.sshJwk)throw tl(Hs);if(!e.sshKid)throw tl(Ys)}i.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=sa.BEARER,i.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!ol.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await tf(e.claims)),a}async function Sg(e,t,o,i,r){i.addQueueMeasurement(nd,e.correlationId);const n=await hu(wg,rd,r,i,e.correlationId)(e,o,i,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function Pg(e,t){let o;const i=e.httpMethod;if(t===Sl){if(o=i||yn,o!==yn)throw tl(Zs)}else o=i||An;if(e.authorizePostBodyParameters&&o!==yn)throw tl(Js);return o}
130
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class vg extends bg{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Km(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const o=this.getLogoutHintFromIdTokenClaims(e.account);o&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=o)}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=ml.getAbsoluteUrl(e.postLogoutRedirectUri,uf())):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=ml.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,uf())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ml.getAbsoluteUrl(uf(),uf())),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(hd,this.correlationId);const t=await hu(this.getClientConfiguration.bind(this),md,this.logger,this.performanceClient,this.correlationId)(e);return new np(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:o,requestAzureCloudOptions:i,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(md,this.correlationId);const a=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,this.correlationId)({requestAuthority:o,requestAzureCloudOptions:i,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:Rh,version:Of,cpu:un.EMPTY_STRING,os:un.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(fd,this.correlationId);const o=this.getRedirectUri(e.redirectUri),i={interactionType:t},r=Ju.setRequestState(this.browserCrypto,e&&e.state||un.EMPTY_STRING,i),n={...await hu(wg,rd,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:o,state:r,nonce:e.nonce||Km(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:Pg(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 xf{constructor(){this.dbName=gm,this.version=1,this.tableName=Tm,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const o=window.indexedDB.open(this.dbName,this.version);o.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),o.addEventListener("success",t=>{const o=t;this.db=o.target.result,this.dbOpen=!0,e()}),o.addEventListener("error",()=>t(Ah(oh)))})}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,o)=>{if(!this.db)return o(Ah(Kp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);i.addEventListener("success",e=>{const o=e;this.closeConnection(),t(o.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((o,i)=>{if(!this.db)return i(Ah(Kp));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),o()}),r.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,o)=>{if(!this.db)return o(Ah(Kp));const i=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);i.addEventListener("success",()=>{this.closeConnection(),t()}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Ah(Kp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();o.addEventListener("success",t=>{const o=t;this.closeConnection(),e(o.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,o)=>{if(!this.db)return o(Ah(Kp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);i.addEventListener("success",e=>{const o=e;this.closeConnection(),t(1===o.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const o=window.indexedDB.deleteDatabase(gm),i=setTimeout(()=>t(!1),200);o.addEventListener("success",()=>(clearTimeout(i),e(!0))),o.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),o.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}
117
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Df{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,o)=>{e.push(o)}),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 kf{constructor(e){this.inMemoryCache=new Df,this.indexedDBCache=new xf,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Th&&e.errorCode===oh))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 Uf{constructor(e,t,o){this.logger=e,function(e){if(!window)throw Ah(Yp);if(!window.crypto)throw Ah(_p);if(!e&&!window.crypto.subtle)throw Ah(_p,"crypto_subtle_undefined")}(o??!1),this.cache=new kf(this.logger),this.performanceClient=t}createNewGuid(){return Hm()}base64Encode(e){return bm(e)}base64Decode(e){return Sm(e)}base64UrlEncode(e){return Nm(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(Dl,e.correlationId),o=await async function(e,t){return window.crypto.subtle.generateKey(qm,e,t)}(Uf.EXTRACTABLE,Uf.POP_KEY_USAGES),i=await Ym(o.publicKey),r=Ff({e:i.e,kty:i.kty,n:i.n}),n=await this.hashString(r),a=await Ym(o.privateKey),s=await async function(e,t,o){return window.crypto.subtle.importKey("jwk",e,qm,t,o)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:o.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 _s(us)}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,o,i){const r=this.performanceClient?.startMeasurement(kl,i),n=await this.cache.getItem(t);if(!n)throw Ah(Jp);const a=await Ym(n.publicKey),s=Ff(a),l=Nm(JSON.stringify({kid:t})),d=Nm(Tp.getShrHeaderString({...o?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${Nm(JSON.stringify(e))}`,u=(new TextEncoder).encode(c),p=await async function(e,t){return window.crypto.subtle.sign(qm,e,t)}(n.privateKey,u),h=`${c}.${Rm(new Uint8Array(p))}`;return r&&r.end({success:!0}),h}async hashString(e){return Xm(e)}}function Ff(e){return JSON.stringify(e,Object.keys(e).sort())}
120
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */Uf.POP_KEY_USAGES=["sign","verify"],Uf.EXTRACTABLE=!0;const Bf=864e5,qf="Lax",jf="None";class Gf{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,o=document.cookie.split(";");for(let e=0;e<o.length;e++){const i=o[e],[r,...n]=decodeURIComponent(i).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw _s(Ts)}setItem(e,t,o,i=!0,r=qf){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(o){const e=function(e){const t=new Date,o=new Date(t.getTime()+e*Bf);return o.toUTCString()}
121
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */(o);n+=`expires=${e};`}(i||r===jf)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(_s(Ts))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const o=decodeURIComponent(e).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function Wf(e,t){const o=e.getItem(Pf(t));return o?JSON.parse(o):[]}function Hf(e,t,o){const i=t.getItem(vf(e,o));if(i){const e=JSON.parse(i);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 Yf(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
123
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const Kf="msal.cache.encryption";class Vf{constructor(e,t,o){if(!window.localStorage)throw af(ef);this.memoryStorage=new Df,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=o,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new Gf,o=t.getItem(Kf);let i={key:"",id:""};if(o)try{i=JSON.parse(o)}catch(e){}if(i.key&&i.id){const t=cu(Pm,oc,this.logger,this.performanceClient,e)(i.key);this.encryptionCookie={id:i.id,key:await uu(Qm,ec,this.logger,this.performanceClient,e)(t)}}else{const o=Hm(),i=await uu(zm,tc,this.logger,this.performanceClient,e)(),r=cu(Rm,ic,this.logger,this.performanceClient,e)(new Uint8Array(i));this.encryptionCookie={id:o,key:await uu(Qm,ec,this.logger,this.performanceClient,e)(i)};const n={id:o,key:r};t.setItem(Kf,JSON.stringify(n),0,!0,jf)}await uu(this.importExistingCache.bind(this),Kd,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 Ah(sh);return this.memoryStorage.getItem(e)}async decryptData(e,t,o){if(!this.initialized||!this.encryptionCookie)throw Ah(sh);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},o),null;const i=await uu(Jm,nc,this.logger,this.performanceClient,o)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!i)return null;try{return JSON.parse(i)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},o),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,o,i){if(!this.initialized||!this.encryptionCookie)throw Ah(sh);const{data:r,nonce:n}=await uu(Zm,rc,this.logger,this.performanceClient,o)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:i};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();Wf(this).forEach(e=>this.removeItem(e));const e=Hf(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(Ef)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=Wf(this);t=await this.importArray(t,e),t.length?this.setItem(Pf(),JSON.stringify(t)):this.removeItem(Pf());const o=Hf(this.clientId,this);o.idToken=await this.importArray(o.idToken,e),o.accessToken=await this.importArray(o.accessToken,e),o.refreshToken=await this.importArray(o.refreshToken,e),o.idToken.length||o.accessToken.length||o.refreshToken.length?this.setItem(vf(this.clientId),JSON.stringify(o)):this.removeItem(vf(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const o=this.getItem(e);if(!o)return null;let i;try{i=JSON.parse(o)}catch(e){return null}return Yf(i)?i.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):uu(Jm,nc,this.logger,this.performanceClient,t)(this.encryptionCookie.key,i.nonce,this.getContext(e),i.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),i)}async importArray(e,t){const o=[],i=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),o.push(e)):this.removeItem(e)});i.push(r)}),await Promise.all(i),o}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(zd);t.add({isBackground:!0});const{key:o,value:i,context:r}=e.data;return o?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(i?(this.memoryStorage.setItem(o,i),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(o),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 zf{constructor(){if(!window.sessionStorage)throw af(ef)}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 Qf="msal:initializeStart",$f="msal:initializeEnd",Zf="msal:accountAdded",Jf="msal:accountRemoved",Xf="msal:activeAccountChanged",eg="msal:loginStart",tg="msal:loginSuccess",og="msal:loginFailure",ig="msal:acquireTokenStart",rg="msal:acquireTokenSuccess",ng="msal:acquireTokenFailure",ag="msal:acquireTokenFromNetworkStart",sg="msal:ssoSilentStart",lg="msal:ssoSilentSuccess",dg="msal:ssoSilentFailure",cg="msal:acquireTokenByCodeStart",ug="msal:acquireTokenByCodeSuccess",pg="msal:acquireTokenByCodeFailure",hg="msal:handleRedirectStart",mg="msal:handleRedirectEnd",fg="msal:popupOpened",gg="msal:logoutStart",Tg="msal:logoutSuccess",Ag="msal:logoutFailure",yg="msal:logoutEnd",Ig="msal:restoreFromBFCache";
126
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */function _g(e,t){const o=e.indexOf(t);o>-1&&e.splice(o,1)}
127
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Eg extends Ol{constructor(e,t,o,i,r,n,a){super(e,o,i,r,a),this.cacheConfig=t,this.logger=i,this.internalStorage=new Df,this.browserStorage=Og(e,t.cacheLocation,i,r),this.temporaryCacheStorage=Og(e,t.temporaryCacheLocation,i,r),this.cookieStorage=new Gf,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=Wf(this.browserStorage,0),o=Hf(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:o.accessToken.length,oldIdCount:o.idToken.length,oldRefreshCount:o.refreshToken.length},e);const i=Wf(this.browserStorage,1),r=Hf(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:i.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,i,e),this.updateV0ToCurrent(1,o.idToken,r.idToken,e),this.updateV0ToCurrent(1,o.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,o.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Pf(0),JSON.stringify(t)):this.browserStorage.removeItem(Pf(0)),i.length>0?this.browserStorage.setItem(Pf(1),JSON.stringify(i)):this.browserStorage.removeItem(Pf(1)),this.setTokenKeys(o,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,o,i){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){_g(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),i));const l=Yf(s)?await this.browserStorage.decryptData(n,s,i):s;let d;if(l&&(Eu(l)||Ou(l))&&(d=l.expiresOn),!l||Tu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&gu(d,300))this.browserStorage.removeItem(n),_g(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},i);else if(this.cacheConfig.cacheLocation!==Uh||Yf(s)){const t=`${Ef}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),i,s.lastUpdatedAt).then(()=>{o.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},i)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),i,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},i)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(bf);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==_f&&this.setItem(bf,_f,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,o){let i=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=i?this.removeAccessTokenKeys(r.slice(0,n),o,0):(this.removeAccessTokenKeys(r.slice(0,i),o,0),this.removeAccessTokenKeys(r.slice(i,n),o)));break}catch(a){const s=El(a);if(!(s.errorCode===Al&&n<20))throw s;if(!r.length){const o=e===vf(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===vf(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...o,...n],i=o.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],o,!1)}}async setUserData(e,t,o,i){let r=0,n=[];for(let a=0;a<=20;a++)try{await uu(this.browserStorage.setUserData.bind(this.browserStorage),Vd,this.logger,this.performanceClient)(e,t,o,i),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),o,0):(this.removeAccessTokenKeys(n.slice(0,r),o,0),this.removeAccessTokenKeys(n.slice(r,a),o)));break}catch(e){const t=El(e);if(!(t.errorCode===Al&&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],o,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const o=this.browserStorage.getUserData(e);if(!o)return this.removeAccountKeyFromMap(e,t),null;const i=this.validateAndParseJson(o);return i&&Fu.isAccountEntity(i)?Ol.toObject(new Fu,i):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const o=this.generateAccountKey(e.getAccountInfo()),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.addAccountKeyToMap(o,t);this.cacheConfig.cacheLocation===Uh&&r&&this.eventHandler.emitEvent(Zf,void 0,e.getAccountInfo())}getAccountKeys(){return Wf(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const o=this.getAccountKeys();return-1===o.indexOf(e)?(o.push(e),this.setItem(Pf(),JSON.stringify(o),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 o=this.getAccountKeys(),i=o.indexOf(e);if(i>-1){if(o.splice(i,1),0===o.length)return void this.removeItem(Pf());this.setItem(Pf(),JSON.stringify(o),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 o=this.getActiveAccount(t);o?.homeAccountId===e.homeAccountId&&o?.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===Uh&&this.eventHandler.emitEvent(Jf,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const o=this.getTokenKeys(),i=o.idToken.indexOf(e);i>-1&&(this.logger.info("idToken removed from tokenKeys map"),o.idToken.splice(i,1),this.setTokenKeys(o,t))}removeAccessToken(e,t,o=!0){super.removeAccessToken(e,t),o&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,o=1){this.logger.trace("removeAccessTokenKey called");const i=this.getTokenKeys(o);let r=0;if(e.forEach(e=>{const t=i.accessToken.indexOf(e);t>-1&&(i.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(i,t,o)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const o=this.getTokenKeys(),i=o.refreshToken.indexOf(e);i>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),o.refreshToken.splice(i,1),this.setTokenKeys(o,t))}getTokenKeys(e=1){return Hf(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,o=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(vf(this.clientId,o),JSON.stringify(e),t):this.removeItem(vf(this.clientId,o))}getIdTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const i=this.validateAndParseJson(o);return i&&((r=i)&&_u(r)&&r.hasOwnProperty("realm")&&r.credentialType===Qn.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys();-1===r.idToken.indexOf(o)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(o),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const i=this.validateAndParseJson(o);return i&&Eu(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys(),n=r.accessToken.indexOf(o);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(o),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const o=this.browserStorage.getUserData(e);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const i=this.validateAndParseJson(o);return i&&Ou(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),i):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const o=this.generateCredentialKey(e),i=Date.now().toString();e.lastUpdatedAt=i,await this.setUserData(o,JSON.stringify(e),t,i);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(o)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(o),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 o=this.validateAndParseJson(t);return o&&(i=e,(r=o)&&0===i.indexOf($n)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var i,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const o=function({environment:e,clientId:t}){return[$n,e,t].join(Vn).toLowerCase()}(e);this.setItem(o,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 o=this.validateAndParseJson(t);return o&&function(e,t){const o=0===e.indexOf(ra.CACHE_KEY);let i=!0;return t&&(i=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&i}(e,o)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),o):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),o)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const o=this.validateAndParseJson(t);return o&&function(e,t){return!!t&&0===e.indexOf(Jn)&&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,o)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),o):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem($h,e),this.internalStorage.setItem(Zh,t)}getWrapperMetadata(){return[this.internalStorage.getItem($h)||dn.EMPTY_STRING,this.internalStorage.getItem(Zh)||dn.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Rn),o=this.browserStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const i=this.validateAndParseJson(o);return i?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:i.homeAccountId,localAccountId:i.localAccountId,tenantId:i.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const o=this.generateCacheKey(Rn);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:hu().toString()};this.setItem(o,JSON.stringify(i),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o);this.eventHandler.emitEvent(Xf)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const o=this.validateAndParseJson(t);return o&&function(e,t){let o=!1;e&&(o=0===e.indexOf(la));let i=!0;return t&&(i=t.hasOwnProperty("throttleTime")),o&&i}(e,o)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),o):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),o)}getTemporaryCache(e,t){const o=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(o);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const i=this.temporaryCacheStorage.getItem(o);if(!i){if(this.cacheConfig.cacheLocation===Uh){const e=this.browserStorage.getItem(o);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"),i}setTemporaryCache(e,t,o){const i=o?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,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(Ef)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(Ef)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Hd,e);const t=this.getTokenKeys();let o=0;t.accessToken.forEach(t=>{const i=this.getAccessTokenCredential(t,e);i?.requestedClaimsHash&&t.includes(i.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),o++)}),o>0&&this.logger.warning(`${o} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return el.startsWith(e,Ef)?e:`${Ef}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Qn.REFRESH_TOKEN&&e.familyId||e.clientId,o=e.tokenType&&e.tokenType.toLowerCase()!==na.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Ef}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",o].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Ef}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Kh)),this.removeTemporaryItem(this.generateCacheKey(Vh)),this.removeTemporaryItem(this.generateCacheKey(Hh)),this.removeTemporaryItem(this.generateCacheKey(Yh)),this.removeTemporaryItem(this.generateCacheKey(Qh)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const o=bm(JSON.stringify(e));if(this.setTemporaryCache(Kh,o,!0),t){const e=bm(t);this.setTemporaryCache(Vh,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Kh,!0);if(!e)throw Ah(jp);const t=this.getTemporaryCache(Vh,!0);let o,i="";try{o=JSON.parse(Sm(e)),t&&(i=Sm(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Ah(Gp)}return[o,i]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Qh,!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=`${Ef}.${zh}`,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(),sf(window),null}}setInteractionInProgress(e,t=Gh){const o=`${Ef}.${zh}`;if(e){if(this.getInteractionInProgress())throw Ah(wp);this.setTemporaryCache(o,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(o)}async hydrateCache(e,t){const o=Au(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const r={idToken:o,accessToken:yu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?mu(e.expiresOn):0,e.extExpiresOn?mu(e.extExpiresOn):0,Sm,void 0,e.tokenType,void 0,t.sshKid,t.claims,i)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,o){try{await super.saveCacheRecord(e,t,o)}catch(e){if(e instanceof _l&&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 Og(e,t,o,i){try{switch(t){case Uh:return new Vf(e,o,i);case Fh:return new zf}}catch(e){o.error(e)}return new Df}class Cg{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Cs({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,o){if("undefined"!=typeof window){const i=o||Hm();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,o,i){const r={eventType:e,interactionType:t||null,payload:o||null,error:i||null,timestamp:Date.now()};switch(e){case Zf:case Jf:case Xf:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,o],i)=>{(0===o.length||o.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${i}: ${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 Ng{constructor(e,t,o,i,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Hm(),this.logger=i.clone(Ch,_f,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 pl.getAbsoluteUrl(t,df())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const o={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 up(o,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,o=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Gl,this.correlationId);const i={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=o?.length?"true"===o:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(pl.getDomainFromUrl(r),t.environment):r,s=wu.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await uu(Pu,Sd,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw Xs(zs);return l}}
129
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function Rg(e,t,o,i){o.addQueueMeasurement(od,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===na.SSH){if(!e.sshJwk)throw Xs(Gs);if(!e.sshKid)throw Xs(Ws)}i.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=na.BEARER,i.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!el.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Xm(e.claims)),a}async function bg(e,t,o,i,r){i.addQueueMeasurement(id,e.correlationId);const n=await uu(Rg,od,r,i,e.correlationId)(e,o,i,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function wg(e,t){let o;const i=e.httpMethod;if(t===bl){if(o=i||Tn,o!==Tn)throw Xs(Qs)}else o=i||gn;if(e.authorizePostBodyParameters&&o!==Tn)throw Xs($s);return o}
130
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Sg extends Ng{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Hm(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const o=this.getLogoutHintFromIdTokenClaims(e.account);o&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=o)}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=pl.getAbsoluteUrl(e.postLogoutRedirectUri,df())):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=pl.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,df())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=pl.getAbsoluteUrl(df(),df())),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(ud,this.correlationId);const t=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)(e);return new ip(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:o,requestAzureCloudOptions:i,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(pd,this.correlationId);const a=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,this.correlationId)({requestAuthority:o,requestAzureCloudOptions:i,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:Ch,version:_f,cpu:dn.EMPTY_STRING,os:dn.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(hd,this.correlationId);const o=this.getRedirectUri(e.redirectUri),i={interactionType:t},r=$u.setRequestState(this.browserCrypto,e&&e.state||dn.EMPTY_STRING,i),n={...await uu(Rg,od,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:o,state:r,nonce:e.nonce||Hm(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:wg(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 Lg(e,t,o){const i=ul(e);if(!i)throw cl(e)?(o.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.`),o.errorPii(`The ${t} detected is: ${e}`),Ih(bp)):(o.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.`),Ih(Np));return i}function Mg(e,t,o){if(!e.state)throw Ih(Rp);const i=function(e,t){if(!t)return null;try{return Ju.parseRequestState(e,t).libraryState.meta}catch(e){throw Os(Ba)}}(t,e.state);if(!i)throw Ih(wp);if(i.interactionType!==o)throw Ih(Sp)}
134
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class xg{constructor(e,t,o,i,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=i,this.performanceClient=r}async handleCodeResponse(e,t){let o;this.performanceClient.addQueueMeasurement(yd,t.correlationId);try{o=function(e,t){if(up(e,t),!e.code)throw Os(ps);return e}(e,t.state)}catch(e){throw e instanceof Mu&&e.subError===Mp?Ih(Mp):e}return hu(this.handleCodeResponseFromServer.bind(this),Ad,this.logger,this.performanceClient,t.correlationId)(o,t)}async handleCodeResponseFromServer(e,t,o=!0){if(this.performanceClient.addQueueMeasurement(Ad,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await hu(this.authModule.updateAuthority.bind(this.authModule),Od,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),o&&(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 hu(this.authModule.acquireToken.bind(this.authModule),Cd,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Ec}:e.loginHint?{credential:e.loginHint,type:Oc}:null}}
135
- /*! @azure/msal-browser v4.21.1 2025-08-27 */const Dg="user_switch",kg={[Dg]:"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 Ug extends Sa{constructor(e,t,o){super(e,t),Object.setPrototypeOf(this,Ug.prototype),this.name="NativeAuthError",this.ext=o}}function Fg(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function Bg(e,t,o){if(o&&o.status)switch(o.status){case"ACCOUNT_UNAVAILABLE":return Zu(Gu);case"USER_INTERACTION_REQUIRED":return new Qu(e,t);case"USER_CANCEL":return Ih(Mp);case"NO_NETWORK":return Ih(Qp);case"UX_NOT_ALLOWED":return Zu(Hu)}return new Ug(e,kg[e]||t,o)}
136
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class qg extends vg{async acquireToken(e){this.performanceClient.addQueueMeasurement(Bl,e.correlationId);const t=this.initializeServerTelemetryManager(nm),o=await hu(this.getClientConfiguration.bind(this),md,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new sp(o,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await hu(i.acquireCachedToken.bind(i),td,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof yh&&e.errorCode===eh&&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 jg extends bg{constructor(e,t,o,i,r,n,a,s,l,d,c,u){super(e,t,o,i,r,n,s,l,u),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new qg(e,this.nativeStorageManager,o,i,r,n,s,l,u);const p=this.platformAuthProvider.getExtensionName();this.skus=hp.makeExtraSkuString({libraryName:Rh,libraryVersion:Of,extensionName:p,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[vc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Yl,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const o=this.performanceClient.startMeasurement(Yl,this.correlationId),i=fu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return o.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===_m)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),o.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,i).then(e=>(o.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw o.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof Ug&&r.setNativeBrokerErrorCode(e.errorCode),o.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:il.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Os(rs);const o=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!o)throw Os(rs);try{const e=this.createSilentCacheRequest(t,o),i=await this.silentCacheClient.acquireToken(e),r={...o,idTokenClaims:i?.idTokenClaims,idToken:i?.idToken};return{...i,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...o}=e;delete o.onRedirectNavigate;const i=await this.initializeNativeRequest(o);try{await this.platformAuthProvider.sendMessage(i)}catch(e){if(e instanceof Ug){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),Fg(e))throw e}}this.browserStorage.setTemporaryCache(Zh,JSON.stringify(i),!0);const r={apiId:em,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 o=this.browserStorage.getCachedNativeRequest();if(!o)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:i,...r}=o;i&&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(Zh));const n=fu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),o=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),o}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,o){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=sl(e.id_token,vm),r=this.createHomeAccountIdentifier(e,i),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 Bg(Dg);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=ip(this.browserStorage,a,r,vm,this.correlationId,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,i,s,a.canonicalAuthority,o);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,i,e.access_token,l.tenantId,o),l}createHomeAccountIdentifier(e,t){return qu.generateHomeAccountId(e.client_info||un.EMPTY_STRING,lu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?il.fromString(t):il.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===sa.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const o=new ep(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Os(fs);return o.signPopToken(e.access_token,t.keyId,i)}return e.access_token}async generateAuthenticationResult(e,t,o,i,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||o.oid||o.sub||un.EMPTY_STRING,c=l.TenantId||o.tid||un.EMPTY_STRING,u=al(i.getAccountInfo(),void 0,o,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),h=t.tokenType===sa.POP?sa.POP:sa.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:o,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:Tu(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,o,i,r,n,a){const s=Iu(o,t.authority,e.id_token||"",t.clientId,i.tid||""),l=a+(t.tokenType===sa.POP?un.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:_u(o,t.authority,r,t.clientId,i.tid||n,d.printScopes(),l,0,vm,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===sa.POP?un.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:o,...i}=e,r=new il(o||[]);r.appendScopes(In);const n={...i,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 Ih(ph);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=Sh,e.authenticationScheme===sa.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},o=new ep(this.browserCrypto);let i;if(n.keyId)i=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await hu(o.generateCnf.bind(o),bd,this.logger,this.performanceClient,this.correlationId)(t,this.logger);i=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=i}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 o=new ml(t);return o.validateAsUri(),o}getPrompt(e){switch(this.apiId){case om:case nm:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Un}if(e)switch(e){case Un:case kn:case xn: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`),Ih(ch)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Lc)&&e.extraParameters.hasOwnProperty(Mc)&&e.extraParameters.hasOwnProperty(Rc);if(!e.embeddedClientId&&!t)return;let o="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,o=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[Mc],o=e.extraParameters[Rc]),e.extraParameters={child_client_id:o,child_redirect_uri:i},this.performanceClient?.addFields({embeddedClientId:o,embeddedRedirectUri:i},this.correlationId)}}
138
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function Gg(e,t,o,i,r){const n=dp({...e.auth,authority:t},o,i,r);if(Kc(n,{sku:Rh,version:Of,os:"",cpu:""}),e.auth.protocolMode!==wl&&Vc(n,e.telemetry.application),o.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},o.correlationId),o.authenticationScheme===sa.POP)){const e=new Bf(i,r),t=new ep(e);let a;if(o.popKid)a=e.encodeKid(o.popKid);else{a=(await hu(t.generateCnf.bind(t),bd,i,r,o.correlationId)(o,i)).reqCnfString}iu(n,a)}return Dc(n,o.correlationId,r),n}async function Wg(e,t,o,i,r){if(!o.codeChallenge)throw tl(qs);const n=await hu(Gg,Td,i,r,o.correlationId)(e,t,o,i,r);return kc(n,Bn),Qc(n,o.codeChallenge,un.S256_CODE_CHALLENGE_METHOD),ou(n,o.extraQueryParameters||{}),cp(t,n,e.auth.encodeExtraQueryParams,o.extraQueryParameters)}async function Hg(e,t,o,i,r,n){if(!i.earJwk)throw Ih(_p);const a=await Gg(t,o,i,r,n);kc(a,qn),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,i.earJwk);const s=new Map;ou(s,i.extraQueryParameters||{});return Kg(e,cp(o,s,t.auth.encodeExtraQueryParams,i.extraQueryParameters),a)}async function Yg(e,t,o,i,r,n){const a=await Gg(t,o,i,r,n);kc(a,Bn),Qc(a,i.codeChallenge,i.codeChallengeMethod||un.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,o])=>{o&&e.set(t,o)})}(a,i.authorizePostBodyParameters||{});const s=new Map;ou(s,i.extraQueryParameters||{});return Kg(e,cp(o,s,t.auth.encodeExtraQueryParams,i.extraQueryParameters),a)}function Kg(e,t,o){const i=e.createElement("form");return i.method="post",i.action=t,o.forEach((t,o)=>{const r=e.createElement("input");r.hidden=!0,r.name=o,r.value=t,i.appendChild(r)}),e.body.appendChild(i),i}async function Vg(e,t,o,i,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Ih(lh);const c=new Bf(s,l),u=new jg(i,r,c,s,a,i.system.navigationClient,o,l,d,t,n,e.correlationId),{userRequestState:p}=Ju.parseRequestState(c,e.state);return hu(u.acquireToken.bind(u),Yl,s,l,e.correlationId)({...e,state:p,prompt:void 0})}async function zg(e,t,o,i,r,n,a,s,l,d,c,u){if(Du.removeThrottle(a,r.auth.clientId,e),t.accountId)return hu(Vg,_d,d,c,e.correlationId)(e,t.accountId,i,r,a,s,l,d,c,u);const p={...e,code:t.code||"",codeVerifier:o},h=new xg(n,a,p,d,c);return await hu(h.handleCodeResponse.bind(h),yd,d,c,e.correlationId)(t,e)}async function Qg(e,t,o,i,r,n,a,s,l,d,c){if(Du.removeThrottle(n,i.auth.clientId,e),up(t,e.state),!t.ear_jwe)throw Ih(Ep);if(!e.earJwk)throw Ih(_p);const u=JSON.parse(await hu(Qm,dc,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(u.accountId)return hu(Vg,_d,l,d,e.correlationId)(e,u.accountId,o,i,n,a,s,l,d,c);const p=new op(i.auth.clientId,n,new Bf(l,d),l,null,null,d);p.validateTokenResponse(u);const h={code:"",state:e.state,nonce:e.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await hu(p.handleServerTokenResponse.bind(p),Sd,l,d,e.correlationId)(u,r,fu(),e,h,void 0,void 0,void 0,void 0)}
139
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function $g(e,t,o){e.addQueueMeasurement(Zd,o);const i=pu(Zg,Jd,t,e,o)(e,t,o);return{verifier:i,challenge:await hu(Jg,Xd,t,e,o)(i,e,t,o)}}function Zg(e,t,o){try{const i=new Uint8Array(32);pu(Hm,tc,t,e,o)(i);return wm(i)}catch(e){throw Ih(Ip)}}async function Jg(e,t,o,i){t.addQueueMeasurement(Xd,i);try{const r=await hu(Wm,ec,o,t,i)(e,t,i);return wm(new Uint8Array(r))}catch(e){throw Ih(Ip)}}
140
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class Xg{constructor(e,t,o,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(Hd),this.platformAuthType=xh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:Uh,request:e},o={channel:bh,extensionId:this.extensionId,responseId:Km(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(o)}`),this.messageChannel.port1.postMessage(o);const i=await new Promise((e,t)=>{this.resolvers.set(o.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(i)}static async createProvider(e,t,o){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const i=new Xg(e,t,o,wh);return await i.sendHandshakeRequest(),i}catch(i){const r=new Xg(e,t,o);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:bh,extensionId:this.extensionId,responseId:Km(),body:{method:Dh}};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,o)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:o}),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}),o(Ih(ah)),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===bh&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Dh){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(Ih(sh))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,o=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===Fh){if(!o)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)o.reject(Bg(e.code,e.description,e.ext));else{if(!e.result)throw Pa(Ra,"Event does not contain result.");e.result.code&&e.result.description?o.reject(Bg(e.result.code,e.result.description,e.result.ext)):o.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===kh){if(!i)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}),i.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}`),o?o.reject(t):i&&i.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 Pa(Ra,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===wh?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
141
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class eT{constructor(e,t,o){this.logger=e,this.performanceClient=t,this.correlationId=o,this.platformAuthType=Mh}static async createProvider(e,t,o){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const i=await window.navigator.platformAuthentication.getSupportedContracts(Ph);if(i?.includes(Lh))return e.trace("Platform auth api available in DOM"),new eT(e,t,o)}}getExtensionId(){return Ph}getExtensionVersion(){return""}getExtensionName(){return vh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),o=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(o)}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:o,authority:i,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...u}=e,p=this.getDOMExtraParams(u);return{accountId:t,brokerId:this.getExtensionId(),authority:i,clientId:o,correlationId:a||this.correlationId,extraParameters:{...c,...p},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"),Bg(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 Pa(Ra,"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,o])=>(e[t]=String(o),e),{})}}}
142
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function tT(e,t,o,i){e.trace("getPlatformAuthProvider called",o);const r=function(){let e;try{return e=window[qh],"true"===e?.getItem(wf)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await eT.createProvider(e,t,o)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await Xg.createProvider(e,i||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function oT(e,t,o,i){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!o)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(i)switch(i){case sa.BEARER:case sa.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 iT extends vg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let o;try{if(o={popupName:this.generatePopupName(e.scopes||In,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,o,t);{const i={...e,httpMethod:Pg(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),o.popup=this.openSizedPopup("about:blank",o),this.acquireTokenPopupAsync(i,o,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),o={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},i=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,o,i,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),o.popup=this.openSizedPopup("about:blank",o),this.logoutPopupAsync(t,o,i,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,o){this.logger.verbose("acquireTokenPopupAsync called");const i=await hu(this.initializeAuthorizationRequest.bind(this),fd,this.logger,this.performanceClient,this.correlationId)(e,lm.Popup);t.popup&&Tf(i.authority);const r=oT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return i.platformBroker=r,this.config.auth.protocolMode===Sl?this.executeEarFlow(i,t):this.executeCodeFlow(i,t,o)}async executeCodeFlow(e,t,o){const i=e.correlationId,r=this.initializeServerTelemetryManager(tm),n=o||await hu($g,Zd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),a={...e,codeChallenge:n.challenge};try{const o=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,i)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===yn)return await this.executeCodeFlowWithPost(a,t,o,n.verifier);{const r=await hu(Wg,gd,this.logger,this.performanceClient,i)(this.config,o.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(Tg,lm.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=pu(Lg,Pd,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await hu(zg,Ed,this.logger,this.performanceClient,i)(e,d,n.verifier,tm,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof Sa&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const o=e.correlationId,i=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,o)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await hu(zm,lc,this.logger,this.performanceClient,o)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await Hg(a.document,this.config,i,n,this.logger,this.performanceClient)).submit();const s=await hu(this.monitorPopupForHash.bind(this),cd,this.logger,this.performanceClient,o)(a,t.popupWindowParent),l=pu(Lg,Pd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return hu(Qg,Id,this.logger,this.performanceClient,o)(n,l,tm,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,o,i){const r=e.correlationId,n=await hu(this.getDiscoveredAuthority.bind(this),Hl,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 Yg(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await hu(this.monitorPopupForHash.bind(this),cd,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=pu(Lg,Pd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return hu(zg,Ed,this.logger,this.performanceClient,r)(e,l,i,tm,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,o,i){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Ag,lm.Popup,e);const r=this.initializeServerTelemetryManager(sm);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===wl){if(this.eventHandler.emitEvent(yg,lm.Popup,e),i){const e={apiId:sm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ml.getAbsoluteUrl(i,uf());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(yg,lm.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(Tg,lm.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),i){const e={apiId:sm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ml.getAbsoluteUrl(i,uf());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 Sa&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ig,lm.Popup,null,e),this.eventHandler.emitEvent(_g,lm.Popup),e}this.eventHandler.emitEvent(_g,lm.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"),Ih(Cp)}monitorPopupForHash(e,t){return new Promise((t,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const i=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(i),void o(Ih(Mp));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(i);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===jn?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 o;if(t.popup?(o=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),o.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),o=this.openSizedPopup(e,t)),!o)throw Ih(Lp);return o.focus&&o.focus(),this.currentWindow=o,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),o}catch(e){throw this.logger.error("error opening popup "+e.message),Ih(vp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:o,popupWindowParent:i}){const r=i.screenLeft?i.screenLeft:i.screenX,n=i.screenTop?i.screenTop:i.screenY,a=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=o.popupSize?.width,d=o.popupSize?.height,c=o.popupPosition?.top,u=o.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Eh),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=Oh),(!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-Oh/2+n)),(!u||u<0||u>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),u=Math.max(0,a/2-Eh/2+r)),i.open(e,t,`width=${l}, height=${d}, top=${c}, left=${u}, 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`${Ch}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Ch}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
144
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class rT extends vg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await hu(this.initializeAuthorizationRequest.bind(this),fd,this.logger,this.performanceClient,this.correlationId)(e,lm.Redirect);t.platformBroker=oT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const o=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Eg,lm.Redirect))},i=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${i}`),this.browserStorage.setTemporaryCache(Kh,i,!0),window.addEventListener("pageshow",o);try{this.config.auth.protocolMode===Sl?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof Sa&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),e}}async executeCodeFlow(e,t){const o=e.correlationId,i=this.initializeServerTelemetryManager(em),r=await hu($g,Zd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===yn)return await this.executeCodeFlowWithPost(n);{const o=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await hu(Wg,gd,this.logger,this.performanceClient,e.correlationId)(this.config,o.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof Sa&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,o=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),i=await hu(zm,lc,this.logger,this.performanceClient,t)(),r={...e,earJwk:i};this.browserStorage.cacheAuthorizeRequest(r);return(await Hg(document,this.config,o,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ih(gh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,o=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await Yg(document,this.config,o,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ih(gh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,o,i){const r=this.initializeServerTelemetryManager(im);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}()?i.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Kh,!0)||un.EMPTY_STRING,l=hl(s);if(l===hl(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,o,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,o,r);if(!cf()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Vh,a,!0);const e={apiId:im,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let i=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),i=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new ml(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Kh,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),i=await this.navigationClient.navigateInternal(t,e)}if(!i)return await this.handleResponse(n,t,o,r)}return null}catch(e){throw e instanceof Sa&&(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===jn?window.location.search:window.location.hash);let o=ul(t);if(o){try{Mg(o,this.browserCrypto,lm.Redirect)}catch(e){return e instanceof Sa&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return df(window),this.logger.verbose("Hash contains known properties, returning response hash"),[o,t]}const i=this.browserStorage.getTemporaryCache(Vh,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Vh)),i&&(o=ul(i),o)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[o,i]):[null,""]}async handleResponse(e,t,o,i){if(!e.state)throw Ih(Rp);if(e.ear_jwe){const o=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return hu(Qg,Id,this.logger,this.performanceClient,t.correlationId)(t,e,em,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority});return hu(zg,Ed,this.logger,this.performanceClient,t.correlationId)(t,e,o,em,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 o={apiId:em,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},i=t||this.config.auth.onRedirectNavigate;if("function"==typeof i){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==i(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,o)):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,o)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Ih(Cp)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),o=this.initializeServerTelemetryManager(am);try{this.eventHandler.emitEvent(Ag,lm.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const i={apiId:am,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===wl)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(yg,lm.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(yg,lm.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Yh),void await this.navigationClient.navigateExternal(n,i);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Yh),void await this.navigationClient.navigateExternal(n,i);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof Sa&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ig,lm.Redirect,null,e),this.eventHandler.emitEvent(_g,lm.Redirect),e}this.eventHandler.emitEvent(_g,lm.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ml.getAbsoluteUrl(t,uf())}}
145
- /*! @azure/msal-browser v4.21.1 2025-08-27 */async function nT(e,t,o,i,r){if(t.addQueueMeasurement(dd,i),!e)throw o.info("Navigate url is empty"),Ih(Cp);return r?hu(dT,ud,o,t,i)(e,r,t,i):pu(cT,pd,o,t,i)(e)}async function aT(e,t,o,i,r){const n=uT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Yg(n.contentDocument,e,t,o,i,r)).submit(),n}async function sT(e,t,o,i,r){const n=uT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Hg(n.contentDocument,e,t,o,i,r)).submit(),n}async function lT(e,t,o,i,r,n,a){return i.addQueueMeasurement(cd,n),new Promise((i,n)=>{t<Ef&&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(Ih(Dp))},t),l=window.setInterval(()=>{let t="";const o=e.contentWindow;try{t=o?o.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";o&&(r=a===jn?o.location.search:o.location.hash),window.clearTimeout(s),window.clearInterval(l),i(r)},o)}).finally(()=>{pu(pT,Yd,r,i,n)(e)})}function dT(e,t,o,i){return o.addQueueMeasurement(ud,i),new Promise((o,i)=>{const r=uT();window.setTimeout(()=>{r?(r.src=e,o(r)):i("Unable to load iframe")},t)})}function cT(e){const t=uT();return t.src=e,t}function uT(){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 pT(e){document.body===e.parentNode&&document.body.removeChild(e)}
146
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class hT extends vg{constructor(e,t,o,i,r,n,a,s,l,d,c){super(e,t,o,i,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(ql,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!==Un&&t.prompt!==Fn&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Un}`),t.prompt=Un):t.prompt=Un;const o=await hu(this.initializeAuthorizationRequest.bind(this),fd,this.logger,this.performanceClient,e.correlationId)(t,lm.Silent);return o.platformBroker=oT(this.config,this.logger,this.platformAuthProvider,o.authenticationScheme),Tf(o.authority),this.config.auth.protocolMode===Sl?this.executeEarFlow(o):this.executeCodeFlow(o)}async executeCodeFlow(e){let t;const o=this.initializeServerTelemetryManager(this.apiId);try{return t=await hu(this.createAuthCodeClient.bind(this),hd,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await hu(this.silentTokenHelper.bind(this),ld,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(i){if(i instanceof Sa&&(i.setCorrelationId(this.correlationId),o.cacheFailedRequest(i)),!(t&&i instanceof Sa&&i.errorCode===_h))throw i;return this.performanceClient.addFields({retryError:i.errorCode},this.correlationId),await hu(this.silentTokenHelper.bind(this),ld,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,o=await hu(this.getDiscoveredAuthority.bind(this),Hl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),i=await hu(zm,lc,this.logger,this.performanceClient,t)(),r={...e,earJwk:i},n=await hu(sT,dd,this.logger,this.performanceClient,t)(this.config,o,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await hu(lT,cd,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=pu(Lg,Pd,this.logger,this.performanceClient,t)(s,a,this.logger);return hu(Qg,Id,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(Ih(qp))}async silentTokenHelper(e,t){const o=t.correlationId;this.performanceClient.addQueueMeasurement(ld,o);const i=await hu($g,Zd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),r={...t,codeChallenge:i.challenge};let n;if(t.httpMethod===yn)n=await hu(aT,dd,this.logger,this.performanceClient,o)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await hu(Wg,gd,this.logger,this.performanceClient,o)(this.config,e.authority,r,this.logger,this.performanceClient);n=await hu(nT,dd,this.logger,this.performanceClient,o)(t,this.performanceClient,this.logger,o,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await hu(lT,cd,this.logger,this.performanceClient,o)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,o,a),l=pu(Lg,Pd,this.logger,this.performanceClient,o)(s,a,this.logger);return hu(zg,Ed,this.logger,this.performanceClient,o)(t,l,i.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 mT extends vg{async acquireToken(e){this.performanceClient.addQueueMeasurement(Gl,e.correlationId);const t=await hu(wg,rd,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),o={...e,...t};e.redirectUri&&(o.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(nm),r=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:o.authority,azureCloudOptions:o.azureCloudOptions,account:o.account});return hu(r.acquireTokenByRefreshToken.bind(r),Jl,this.logger,this.performanceClient,e.correlationId)(o).catch(e=>{throw e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e),e})}logout(){return Promise.reject(Ih(qp))}async createRefreshTokenClient(e){const t=await hu(this.getClientConfiguration.bind(this),md,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new ap(t,this.performanceClient)}}
148
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class fT{constructor(e,t,o,i){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=o,this.cryptoObj=i}async loadExternalTokens(e,t,o){if(!this.isBrowserEnvironment)throw Ih(Vp);const i=e.correlationId||Km(),r=t.id_token?sl(t.id_token,vm):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 Pu(Pu.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Km()):void 0,s=await this.loadAccount(e,o.clientInfo||t.client_info||"",i,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,i),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,o,i),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,i);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,o,i,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=qu.createFromAccountInfo(e.account);return await this.storage.setAccount(t,o),t}if(!r||!t&&!i)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Ih(Xp);const n=qu.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,i),a=i?.tid,s=ip(this.storage,r,n,vm,o,i,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,o),s}async loadIdToken(e,t,o,i,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=Iu(t,o,e.id_token,this.config.auth.clientId,i);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,o,i,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?il.fromString(t.scope):new il(e.scopes),l=n.expiresOn||t.expires_in+fu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+fu(),c=_u(o,i,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,vm);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,o,i){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=Eu(t,o,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,i),r}generateAuthenticationResult(e,t,o,i){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=il.fromString(t.accessToken.target).asArray(),s=Tu(t.accessToken.expiresOn),r=Tu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:o||{},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 gT extends np{constructor(e){super(e),this.includeRedirectUri=!1}}
150
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class TT extends vg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw Ih(th);const t=await hu(this.initializeAuthorizationRequest.bind(this),fd,this.logger,this.performanceClient,e.correlationId)(e,lm.Silent),o=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},r=await hu(this.getClientConfiguration.bind(this),md,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new gT(r);this.logger.verbose("Auth code client created");const a=new xg(n,this.browserStorage,i,this.logger,this.performanceClient);return await hu(a.handleCodeResponseFromServer.bind(a),Ad,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 Sa&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Ih(qp))}}
133
+ function Pg(e,t,o){const i=dl(e);if(!i)throw ll(e)?(o.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.`),o.errorPii(`The ${t} detected is: ${e}`),Ah(Np)):(o.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.`),Ah(Op));return i}function vg(e,t,o){if(!e.state)throw Ah(Cp);const i=function(e,t){if(!t)return null;try{return $u.parseRequestState(e,t).libraryState.meta}catch(e){throw _s(Ua)}}(t,e.state);if(!i)throw Ah(Rp);if(i.interactionType!==o)throw Ah(bp)}
134
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Lg{constructor(e,t,o,i,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=i,this.performanceClient=r}async handleCodeResponse(e,t){let o;this.performanceClient.addQueueMeasurement(Td,t.correlationId);try{o=function(e,t){if(dp(e,t),!e.code)throw _s(cs);return e}(e,t.state)}catch(e){throw e instanceof vu&&e.subError===vp?Ah(vp):e}return uu(this.handleCodeResponseFromServer.bind(this),gd,this.logger,this.performanceClient,t.correlationId)(o,t)}async handleCodeResponseFromServer(e,t,o=!0){if(this.performanceClient.addQueueMeasurement(gd,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await uu(this.authModule.updateAuthority.bind(this.authModule),_d,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),o&&(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 uu(this.authModule.acquireToken.bind(this.authModule),Ed,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Ic}:e.loginHint?{credential:e.loginHint,type:_c}:null}}
135
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */const Mg="user_switch",xg={[Mg]:"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 Dg extends ba{constructor(e,t,o){super(e,t),Object.setPrototypeOf(this,Dg.prototype),this.name="NativeAuthError",this.ext=o}}function kg(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function Ug(e,t,o){if(o&&o.status)switch(o.status){case"ACCOUNT_UNAVAILABLE":return Qu(qu);case"USER_INTERACTION_REQUIRED":return new Vu(e,t);case"USER_CANCEL":return Ah(vp);case"NO_NETWORK":return Ah(Vp);case"UX_NOT_ALLOWED":return Qu(Gu)}return new Dg(e,xg[e]||t,o)}
136
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Fg extends Sg{async acquireToken(e){this.performanceClient.addQueueMeasurement(Ul,e.correlationId);const t=this.initializeServerTelemetryManager(im),o=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new np(o,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await uu(i.acquireCachedToken.bind(i),Xl,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Th&&e.errorCode===Jp&&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 Bg extends Ng{constructor(e,t,o,i,r,n,a,s,l,d,c,u){super(e,t,o,i,r,n,s,l,u),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new Fg(e,this.nativeStorageManager,o,i,r,n,s,l,u);const p=this.platformAuthProvider.getExtensionName();this.skus=up.makeExtraSkuString({libraryName:Ch,libraryVersion:_f,extensionName:p,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[Sc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Wl,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const o=this.performanceClient.startMeasurement(Wl,this.correlationId),i=hu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return o.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===ym)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),o.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,i).then(e=>(o.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw o.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof Dg&&r.setNativeBrokerErrorCode(e.errorCode),o.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:tl.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),_s(os);const o=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!o)throw _s(os);try{const e=this.createSilentCacheRequest(t,o),i=await this.silentCacheClient.acquireToken(e),r={...o,idTokenClaims:i?.idTokenClaims,idToken:i?.idToken};return{...i,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...o}=e;delete o.onRedirectNavigate;const i=await this.initializeNativeRequest(o);try{await this.platformAuthProvider.sendMessage(i)}catch(e){if(e instanceof Dg){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),kg(e))throw e}}this.browserStorage.setTemporaryCache(Qh,JSON.stringify(i),!0);const r={apiId:Jh,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 o=this.browserStorage.getCachedNativeRequest();if(!o)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:i,...r}=o;i&&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(Qh));const n=hu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),o=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),o}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,o){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=nl(e.id_token,Sm),r=this.createHomeAccountIdentifier(e,i),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 Ug(Mg);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=tp(this.browserStorage,a,r,Sm,this.correlationId,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,i,s,a.canonicalAuthority,o);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,i,e.access_token,l.tenantId,o),l}createHomeAccountIdentifier(e,t){return Fu.generateHomeAccountId(e.client_info||dn.EMPTY_STRING,au,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?tl.fromString(t):tl.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===na.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const o=new Ju(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw _s(hs);return o.signPopToken(e.access_token,t.keyId,i)}return e.access_token}async generateAuthenticationResult(e,t,o,i,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||o.oid||o.sub||dn.EMPTY_STRING,c=l.TenantId||o.tid||dn.EMPTY_STRING,u=rl(i.getAccountInfo(),void 0,o,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),h=t.tokenType===na.POP?na.POP:na.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:o,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:fu(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,o,i,r,n,a){const s=Au(o,t.authority,e.id_token||"",t.clientId,i.tid||""),l=a+(t.tokenType===na.POP?dn.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:yu(o,t.authority,r,t.clientId,i.tid||n,d.printScopes(),l,0,Sm,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===na.POP?dn.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:o,...i}=e,r=new tl(o||[]);r.appendScopes(An);const n={...i,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 Ah(ch);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=bh,e.authenticationScheme===na.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},o=new Ju(this.browserCrypto);let i;if(n.keyId)i=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await uu(o.generateCnf.bind(o),Nd,this.logger,this.performanceClient,this.correlationId)(t,this.logger);i=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=i}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 o=new pl(t);return o.validateAsUri(),o}getPrompt(e){switch(this.apiId){case em:case im:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Dn}if(e)switch(e){case Dn:case xn:case Ln: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`),Ah(lh)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Pc)&&e.extraParameters.hasOwnProperty(vc)&&e.extraParameters.hasOwnProperty(Cc);if(!e.embeddedClientId&&!t)return;let o="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,o=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[vc],o=e.extraParameters[Cc]),e.extraParameters={child_client_id:o,child_redirect_uri:i},this.performanceClient?.addFields({embeddedClientId:o,embeddedRedirectUri:i},this.correlationId)}}
138
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function qg(e,t,o,i,r){const n=sp({...e.auth,authority:t},o,i,r);if(Hc(n,{sku:Ch,version:_f,os:"",cpu:""}),e.auth.protocolMode!==Rl&&Yc(n,e.telemetry.application),o.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},o.correlationId),o.authenticationScheme===na.POP)){const e=new Uf(i,r),t=new Ju(e);let a;if(o.popKid)a=e.encodeKid(o.popKid);else{a=(await uu(t.generateCnf.bind(t),Nd,i,r,o.correlationId)(o,i)).reqCnfString}tu(n,a)}return Mc(n,o.correlationId,r),n}async function jg(e,t,o,i,r){if(!o.codeChallenge)throw Xs(Fs);const n=await uu(qg,fd,i,r,o.correlationId)(e,t,o,i,r);return xc(n,Un),Vc(n,o.codeChallenge,dn.S256_CODE_CHALLENGE_METHOD),eu(n,o.extraQueryParameters||{}),lp(t,n,e.auth.encodeExtraQueryParams,o.extraQueryParameters)}async function Gg(e,t,o,i,r,n){if(!i.earJwk)throw Ah(yp);const a=await qg(t,o,i,r,n);xc(a,Fn),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,i.earJwk);const s=new Map;eu(s,i.extraQueryParameters||{});return Hg(e,lp(o,s,t.auth.encodeExtraQueryParams,i.extraQueryParameters),a)}async function Wg(e,t,o,i,r,n){const a=await qg(t,o,i,r,n);xc(a,Un),Vc(a,i.codeChallenge,i.codeChallengeMethod||dn.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,o])=>{o&&e.set(t,o)})}(a,i.authorizePostBodyParameters||{});const s=new Map;eu(s,i.extraQueryParameters||{});return Hg(e,lp(o,s,t.auth.encodeExtraQueryParams,i.extraQueryParameters),a)}function Hg(e,t,o){const i=e.createElement("form");return i.method="post",i.action=t,o.forEach((t,o)=>{const r=e.createElement("input");r.hidden=!0,r.name=o,r.value=t,i.appendChild(r)}),e.body.appendChild(i),i}async function Yg(e,t,o,i,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Ah(ah);const c=new Uf(s,l),u=new Bg(i,r,c,s,a,i.system.navigationClient,o,l,d,t,n,e.correlationId),{userRequestState:p}=$u.parseRequestState(c,e.state);return uu(u.acquireToken.bind(u),Wl,s,l,e.correlationId)({...e,state:p,prompt:void 0})}async function Kg(e,t,o,i,r,n,a,s,l,d,c,u){if(Mu.removeThrottle(a,r.auth.clientId,e),t.accountId)return uu(Yg,yd,d,c,e.correlationId)(e,t.accountId,i,r,a,s,l,d,c,u);const p={...e,code:t.code||"",codeVerifier:o},h=new Lg(n,a,p,d,c);return await uu(h.handleCodeResponse.bind(h),Td,d,c,e.correlationId)(t,e)}async function Vg(e,t,o,i,r,n,a,s,l,d,c){if(Mu.removeThrottle(n,i.auth.clientId,e),dp(t,e.state),!t.ear_jwe)throw Ah(Ip);if(!e.earJwk)throw Ah(yp);const u=JSON.parse(await uu(Vm,sc,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(u.accountId)return uu(Yg,yd,l,d,e.correlationId)(e,u.accountId,o,i,n,a,s,l,d,c);const p=new ep(i.auth.clientId,n,new Uf(l,d),l,null,null,d);p.validateTokenResponse(u);const h={code:"",state:e.state,nonce:e.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await uu(p.handleServerTokenResponse.bind(p),bd,l,d,e.correlationId)(u,r,hu(),e,h,void 0,void 0,void 0,void 0)}
139
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function zg(e,t,o){e.addQueueMeasurement(Qd,o);const i=cu(Qg,$d,t,e,o)(e,t,o);return{verifier:i,challenge:await uu($g,Zd,t,e,o)(i,e,t,o)}}function Qg(e,t,o){try{const i=new Uint8Array(32);cu(Gm,Xd,t,e,o)(i);return Rm(i)}catch(e){throw Ah(Ap)}}async function $g(e,t,o,i){t.addQueueMeasurement(Zd,i);try{const r=await uu(jm,Jd,o,t,i)(e,t,i);return Rm(new Uint8Array(r))}catch(e){throw Ah(Ap)}}
140
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Zg{constructor(e,t,o,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(Gd),this.platformAuthType=Lh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:Dh,request:e},o={channel:Nh,extensionId:this.extensionId,responseId:Hm(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(o)}`),this.messageChannel.port1.postMessage(o);const i=await new Promise((e,t)=>{this.resolvers.set(o.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(i)}static async createProvider(e,t,o){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const i=new Zg(e,t,o,Rh);return await i.sendHandshakeRequest(),i}catch(i){const r=new Zg(e,t,o);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Nh,extensionId:this.extensionId,responseId:Hm(),body:{method:Mh}};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,o)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:o}),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}),o(Ah(rh)),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===Nh&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Mh){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(Ah(nh))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,o=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===kh){if(!o)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)o.reject(Ug(e.code,e.description,e.ext));else{if(!e.result)throw wa(Ca,"Event does not contain result.");e.result.code&&e.result.description?o.reject(Ug(e.result.code,e.result.description,e.result.ext)):o.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===xh){if(!i)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}),i.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}`),o?o.reject(t):i&&i.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 wa(Ca,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Rh?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
141
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class Jg{constructor(e,t,o){this.logger=e,this.performanceClient=t,this.correlationId=o,this.platformAuthType=vh}static async createProvider(e,t,o){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const i=await window.navigator.platformAuthentication.getSupportedContracts(wh);if(i?.includes(Ph))return e.trace("Platform auth api available in DOM"),new Jg(e,t,o)}}getExtensionId(){return wh}getExtensionVersion(){return""}getExtensionName(){return Sh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),o=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(o)}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:o,authority:i,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...u}=e,p=this.getDOMExtraParams(u);return{accountId:t,brokerId:this.getExtensionId(),authority:i,clientId:o,correlationId:a||this.correlationId,extraParameters:{...c,...p},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"),Ug(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 wa(Ca,"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,o])=>(e[t]=String(o),e),{})}}}
142
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function Xg(e,t,o,i){e.trace("getPlatformAuthProvider called",o);const r=function(){let e;try{return e=window[Fh],"true"===e?.getItem(Rf)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await Jg.createProvider(e,t,o)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await Zg.createProvider(e,i||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function eT(e,t,o,i){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!o)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(i)switch(i){case na.BEARER:case na.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 tT extends Sg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let o;try{if(o={popupName:this.generatePopupName(e.scopes||An,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,o,t);{const i={...e,httpMethod:wg(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),o.popup=this.openSizedPopup("about:blank",o),this.acquireTokenPopupAsync(i,o,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),o={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},i=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,o,i,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),o.popup=this.openSizedPopup("about:blank",o),this.logoutPopupAsync(t,o,i,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,o){this.logger.verbose("acquireTokenPopupAsync called");const i=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,this.correlationId)(e,am.Popup);t.popup&&ff(i.authority);const r=eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return i.platformBroker=r,this.config.auth.protocolMode===bl?this.executeEarFlow(i,t):this.executeCodeFlow(i,t,o)}async executeCodeFlow(e,t,o){const i=e.correlationId,r=this.initializeServerTelemetryManager(Xh),n=o||await uu(zg,Qd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),a={...e,codeChallenge:n.challenge};try{const o=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,i)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Tn)return await this.executeCodeFlowWithPost(a,t,o,n.verifier);{const r=await uu(jg,md,this.logger,this.performanceClient,i)(this.config,o.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(fg,am.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await uu(Kg,Id,this.logger,this.performanceClient,i)(e,d,n.verifier,Xh,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof ba&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const o=e.correlationId,i=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,o)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await uu(Km,ac,this.logger,this.performanceClient,o)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await Gg(a.document,this.config,i,n,this.logger,this.performanceClient)).submit();const s=await uu(this.monitorPopupForHash.bind(this),ld,this.logger,this.performanceClient,o)(a,t.popupWindowParent),l=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return uu(Vg,Ad,this.logger,this.performanceClient,o)(n,l,Xh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,o,i){const r=e.correlationId,n=await uu(this.getDiscoveredAuthority.bind(this),Gl,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 Wg(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await uu(this.monitorPopupForHash.bind(this),ld,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return uu(Kg,Id,this.logger,this.performanceClient,r)(e,l,i,Xh,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,o,i){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(gg,am.Popup,e);const r=this.initializeServerTelemetryManager(nm);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===Rl){if(this.eventHandler.emitEvent(Tg,am.Popup,e),i){const e={apiId:nm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=pl.getAbsoluteUrl(i,df());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(Tg,am.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(fg,am.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),i){const e={apiId:nm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=pl.getAbsoluteUrl(i,df());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 ba&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ag,am.Popup,null,e),this.eventHandler.emitEvent(yg,am.Popup),e}this.eventHandler.emitEvent(yg,am.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"),Ah(Ep)}monitorPopupForHash(e,t){return new Promise((t,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const i=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(i),void o(Ah(vp));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(i);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===Bn?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 o;if(t.popup?(o=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),o.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),o=this.openSizedPopup(e,t)),!o)throw Ah(Pp);return o.focus&&o.focus(),this.currentWindow=o,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),o}catch(e){throw this.logger.error("error opening popup "+e.message),Ah(Sp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:o,popupWindowParent:i}){const r=i.screenLeft?i.screenLeft:i.screenX,n=i.screenTop?i.screenTop:i.screenY,a=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=o.popupSize?.width,d=o.popupSize?.height,c=o.popupPosition?.top,u=o.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Ih),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=_h),(!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-_h/2+n)),(!u||u<0||u>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),u=Math.max(0,a/2-Ih/2+r)),i.open(e,t,`width=${l}, height=${d}, top=${c}, left=${u}, 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`${Eh}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Eh}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
144
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class oT extends Sg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,this.correlationId)(e,am.Redirect);t.platformBroker=eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const o=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Ig,am.Redirect))},i=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${i}`),this.browserStorage.setTemporaryCache(Hh,i,!0),window.addEventListener("pageshow",o);try{this.config.auth.protocolMode===bl?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof ba&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),e}}async executeCodeFlow(e,t){const o=e.correlationId,i=this.initializeServerTelemetryManager(Jh),r=await uu(zg,Qd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===Tn)return await this.executeCodeFlowWithPost(n);{const o=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await uu(jg,md,this.logger,this.performanceClient,e.correlationId)(this.config,o.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,o=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),i=await uu(Km,ac,this.logger,this.performanceClient,t)(),r={...e,earJwk:i};this.browserStorage.cacheAuthorizeRequest(r);return(await Gg(document,this.config,o,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ah(mh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,o=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await Wg(document,this.config,o,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ah(mh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,o,i){const r=this.initializeServerTelemetryManager(tm);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}()?i.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Hh,!0)||dn.EMPTY_STRING,l=ul(s);if(l===ul(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,o,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,o,r);if(!lf()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Yh,a,!0);const e={apiId:tm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let i=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),i=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new pl(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Hh,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),i=await this.navigationClient.navigateInternal(t,e)}if(!i)return await this.handleResponse(n,t,o,r)}return null}catch(e){throw e instanceof ba&&(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===Bn?window.location.search:window.location.hash);let o=dl(t);if(o){try{vg(o,this.browserCrypto,am.Redirect)}catch(e){return e instanceof ba&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return sf(window),this.logger.verbose("Hash contains known properties, returning response hash"),[o,t]}const i=this.browserStorage.getTemporaryCache(Yh,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Yh)),i&&(o=dl(i),o)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[o,i]):[null,""]}async handleResponse(e,t,o,i){if(!e.state)throw Ah(Cp);if(e.ear_jwe){const o=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return uu(Vg,Ad,this.logger,this.performanceClient,t.correlationId)(t,e,Jh,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority});return uu(Kg,Id,this.logger,this.performanceClient,t.correlationId)(t,e,o,Jh,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 o={apiId:Jh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},i=t||this.config.auth.onRedirectNavigate;if("function"==typeof i){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==i(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,o)):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,o)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Ah(Ep)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),o=this.initializeServerTelemetryManager(rm);try{this.eventHandler.emitEvent(gg,am.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const i={apiId:rm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===Rl)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(Tg,am.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(Tg,am.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Wh),void await this.navigationClient.navigateExternal(n,i);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Wh),void await this.navigationClient.navigateExternal(n,i);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ag,am.Redirect,null,e),this.eventHandler.emitEvent(yg,am.Redirect),e}this.eventHandler.emitEvent(yg,am.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return pl.getAbsoluteUrl(t,df())}}
145
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */async function iT(e,t,o,i,r){if(t.addQueueMeasurement(sd,i),!e)throw o.info("Navigate url is empty"),Ah(Ep);return r?uu(sT,dd,o,t,i)(e,r,t,i):cu(lT,cd,o,t,i)(e)}async function rT(e,t,o,i,r){const n=dT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Wg(n.contentDocument,e,t,o,i,r)).submit(),n}async function nT(e,t,o,i,r){const n=dT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Gg(n.contentDocument,e,t,o,i,r)).submit(),n}async function aT(e,t,o,i,r,n,a){return i.addQueueMeasurement(ld,n),new Promise((i,n)=>{t<If&&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(Ah(Mp))},t),l=window.setInterval(()=>{let t="";const o=e.contentWindow;try{t=o?o.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";o&&(r=a===Bn?o.location.search:o.location.hash),window.clearTimeout(s),window.clearInterval(l),i(r)},o)}).finally(()=>{cu(cT,Wd,r,i,n)(e)})}function sT(e,t,o,i){return o.addQueueMeasurement(dd,i),new Promise((o,i)=>{const r=dT();window.setTimeout(()=>{r?(r.src=e,o(r)):i("Unable to load iframe")},t)})}function lT(e){const t=dT();return t.src=e,t}function dT(){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 cT(e){document.body===e.parentNode&&document.body.removeChild(e)}
146
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class uT extends Sg{constructor(e,t,o,i,r,n,a,s,l,d,c){super(e,t,o,i,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(Fl,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!==Dn&&t.prompt!==kn&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Dn}`),t.prompt=Dn):t.prompt=Dn;const o=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,e.correlationId)(t,am.Silent);return o.platformBroker=eT(this.config,this.logger,this.platformAuthProvider,o.authenticationScheme),ff(o.authority),this.config.auth.protocolMode===bl?this.executeEarFlow(o):this.executeCodeFlow(o)}async executeCodeFlow(e){let t;const o=this.initializeServerTelemetryManager(this.apiId);try{return t=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await uu(this.silentTokenHelper.bind(this),ad,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(i){if(i instanceof ba&&(i.setCorrelationId(this.correlationId),o.cacheFailedRequest(i)),!(t&&i instanceof ba&&i.errorCode===yh))throw i;return this.performanceClient.addFields({retryError:i.errorCode},this.correlationId),await uu(this.silentTokenHelper.bind(this),ad,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,o=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),i=await uu(Km,ac,this.logger,this.performanceClient,t)(),r={...e,earJwk:i},n=await uu(nT,sd,this.logger,this.performanceClient,t)(this.config,o,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await uu(aT,ld,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=cu(Pg,wd,this.logger,this.performanceClient,t)(s,a,this.logger);return uu(Vg,Ad,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(Ah(Fp))}async silentTokenHelper(e,t){const o=t.correlationId;this.performanceClient.addQueueMeasurement(ad,o);const i=await uu(zg,Qd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),r={...t,codeChallenge:i.challenge};let n;if(t.httpMethod===Tn)n=await uu(rT,sd,this.logger,this.performanceClient,o)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await uu(jg,md,this.logger,this.performanceClient,o)(this.config,e.authority,r,this.logger,this.performanceClient);n=await uu(iT,sd,this.logger,this.performanceClient,o)(t,this.performanceClient,this.logger,o,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await uu(aT,ld,this.logger,this.performanceClient,o)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,o,a),l=cu(Pg,wd,this.logger,this.performanceClient,o)(s,a,this.logger);return uu(Kg,Id,this.logger,this.performanceClient,o)(t,l,i.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 pT extends Sg{async acquireToken(e){this.performanceClient.addQueueMeasurement(ql,e.correlationId);const t=await uu(Rg,od,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),o={...e,...t};e.redirectUri&&(o.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(im),r=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:o.authority,azureCloudOptions:o.azureCloudOptions,account:o.account});return uu(r.acquireTokenByRefreshToken.bind(r),$l,this.logger,this.performanceClient,e.correlationId)(o).catch(e=>{throw e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e),e})}logout(){return Promise.reject(Ah(Fp))}async createRefreshTokenClient(e){const t=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new rp(t,this.performanceClient)}}
148
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class hT{constructor(e,t,o,i){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=o,this.cryptoObj=i}async loadExternalTokens(e,t,o){if(!this.isBrowserEnvironment)throw Ah(Yp);const i=e.correlationId||Hm(),r=t.id_token?nl(t.id_token,Sm):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 wu(wu.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Hm()):void 0,s=await this.loadAccount(e,o.clientInfo||t.client_info||"",i,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,i),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,o,i),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,i);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,o,i,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=Fu.createFromAccountInfo(e.account);return await this.storage.setAccount(t,o),t}if(!r||!t&&!i)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Ah(Zp);const n=Fu.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,i),a=i?.tid,s=tp(this.storage,r,n,Sm,o,i,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,o),s}async loadIdToken(e,t,o,i,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=Au(t,o,e.id_token,this.config.auth.clientId,i);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,o,i,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?tl.fromString(t.scope):new tl(e.scopes),l=n.expiresOn||t.expires_in+hu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+hu(),c=yu(o,i,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,Sm);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,o,i){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=Iu(t,o,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,i),r}generateAuthenticationResult(e,t,o,i){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=tl.fromString(t.accessToken.target).asArray(),s=fu(t.accessToken.expiresOn),r=fu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:o||{},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 mT extends ip{constructor(e){super(e),this.includeRedirectUri=!1}}
150
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class fT extends Sg{constructor(e,t,o,i,r,n,a,s,l,d){super(e,t,o,i,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw Ah(Xp);const t=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,e.correlationId)(e,am.Silent),o=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},r=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new mT(r);this.logger.verbose("Auth code client created");const a=new Lg(n,this.browserStorage,i,this.logger,this.performanceClient);return await uu(a.handleCodeResponseFromServer.bind(a),gd,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 ba&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Ah(Fp))}}
151
151
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
152
152
  /*! @azure/msal-browser v4.21.1 2025-08-27 */
153
- function AT(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 yT(e,t){try{ff(e)}catch(e){throw t.end({success:!1},e),e}}class IT{constructor(e){var t,o,i,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 Bf(this.logger,this.performanceClient):Cs,this.eventHandler=new Rg(this.logger),this.browserStorage=this.isBrowserEnvironment?new Cg(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let o;if(t)try{o=JSON.parse(t)}catch(e){throw tl(js)}return{canonicalAuthority:e.authority?vu(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:o}}(this.config.auth)):(t=this.config.auth.clientId,o=this.logger,i=this.performanceClient,r=this.eventHandler,new Cg(t,{cacheLocation:jh,cacheRetentionDays:5,temporaryCacheLocation:jh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},Cs,o,i,r));const n={cacheLocation:jh,cacheRetentionDays:5,temporaryCacheLocation:jh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Cg(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new fT(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 o=new IT(e);return await o.initialize(t),o}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(Jf);const o=e?.correlationId||this.getRequestCorrelationId(),i=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(ad,o);if(this.eventHandler.emitEvent(Zf),!t)try{this.logMultipleInstances(r)}catch{}if(await hu(this.browserStorage.initialize.bind(this.browserStorage),sd,this.logger,this.performanceClient,o)(o),i)try{this.platformAuthProvider=await tT(this.logger,this.performanceClient,o,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"),pu(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Kd,this.logger,this.performanceClient,o)(o)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(o),this.initialized=!0,this.eventHandler.emitEvent(Jf),r.end({allowPlatformBroker:i,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),mf(this.initialized),this.isBrowserEnvironment){const t=e||"";let o=this.redirectResponse.get(t);return void 0===o?(o=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,o),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"),o}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===Yh)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const o=this.getAllAccounts(),i=this.browserStorage.getCachedNativeRequest(),r=i&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(fg,lm.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(kl,i?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new jg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,im,this.performanceClient,this.platformAuthProvider,i.accountId,this.nativeInternalStorage,i.correlationId);a=hu(e.handleRedirectPromise.bind(e),Wd,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,o]=this.browserStorage.getCachedRequest(),i=t.correlationId;n=this.performanceClient.startMeasurement(kl,i),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(i);a=hu(r.handleRedirectPromise.bind(r),Gd,this.logger,this.performanceClient,n.event.correlationId)(e,t,o,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();o.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(ig,lm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(ag,lm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:AT(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(gg,lm.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw o.length>0?this.eventHandler.emitEvent(sg,lm.Redirect,null,t):this.eventHandler.emitEvent(rg,lm.Redirect,null,t),this.eventHandler.emitEvent(gg,lm.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const o=this.performanceClient.startMeasurement(Dl,t);o.add({accountType:AT(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=e=>{const t="function"==typeof i?i(e):void 0;return o.add({navigateCallbackResult:!1!==t}),o.event=o.end({success:!0})||o.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const i="function"==typeof e?e(t):void 0;return o.add({navigateCallbackResult:!1!==i}),o.event=o.end({success:!0})||o.event,i}}const r=this.getAllAccounts().length>0;try{let i;if(gf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Hh),r?this.eventHandler.emitEvent(ng,lm.Redirect,e):this.eventHandler.emitEvent(og,lm.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){i=new jg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,em,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,o).catch(i=>{if(o.add({brokerErrorName:i.name,brokerErrorCode:i.errorCode}),i instanceof Ug&&Fg(i)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(i instanceof Qu){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 i})}else{i=this.createRedirectClient(t).acquireToken(e)}return await i}catch(e){throw this.browserStorage.resetRequestCache(),2===o.event.status?this.performanceClient.startMeasurement(kl,t).end({success:!1},e):o.end({success:!1},e),r?this.eventHandler.emitEvent(sg,lm.Redirect,null,e):this.eventHandler.emitEvent(rg,lm.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(xl,t);o.add({scenarioId:e.scenarioId,accountType:AT(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),yT(this.initialized,o),this.browserStorage.setInteractionInProgress(!0,Hh)}catch(e){return Promise.reject(e)}const i=this.getAllAccounts();let r;i.length>0?this.eventHandler.emitEvent(ng,lm.Popup,e):this.eventHandler.emitEvent(og,lm.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))o.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},tm).then(e=>(o.end({success:!0,accountType:AT(e.account)}),e)).catch(i=>{if(o.add({brokerErrorName:i.name,brokerErrorCode:i.errorCode}),i instanceof Ug&&Fg(i)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(i instanceof Qu){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 i});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(ig,lm.Popup,e):this.eventHandler.emitEvent(ag,lm.Popup,e),o.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:AT(e.account)}),e)).catch(e=>(i.length>0?this.eventHandler.emitEvent(sg,lm.Popup,null,e):this.eventHandler.emitEvent(rg,lm.Popup,null,e),o.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),o={...e,prompt:e.prompt,correlationId:t};let i;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Wl,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:AT(e.account)}),yT(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(dg,lm.Silent,o),this.canUsePlatformBroker(o))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),i=this.acquireTokenNative(o,om).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof Ug&&Fg(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(o.correlationId).acquireToken(o)}throw e});else{i=this.createSilentIframeClient(o.correlationId).acquireToken(o)}return i.then(e=>(this.eventHandler.emitEvent(cg,lm.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:AT(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(ug,lm.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 o=this.performanceClient.startMeasurement(Pl,t);yT(this.initialized,o),this.eventHandler.emitEvent(pg,lm.Silent,e),o.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Ih(ih);if(e.code){const i=e.code;let r=this.hybridAuthCodeResponses.get(i);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),o.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(hg,lm.Silent,e),this.hybridAuthCodeResponses.delete(i),o.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:AT(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(mg,lm.Silent,null,e),o.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(i,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){o.add({isPlatformBrokerRequest:!0});const i=await this.acquireTokenNative({...e,correlationId:t},rm,e.nativeAccountId).catch(e=>{throw e instanceof Ug&&Fg(e)&&(this.platformAuthProvider=void 0),o.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return o.end({accountType:AT(i.account),success:!0}),i}throw Ih(nh)}throw Ih(oh)}catch(e){throw this.eventHandler.emitEvent(mg,lm.Silent,null,e),o.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(jd,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(ed,e.correlationId),t){case Im:case _m:case Em:const t=this.createSilentCacheClient(e.correlationId);return hu(t.acquireToken.bind(t),Bl,this.logger,this.performanceClient,e.correlationId)(e);default:throw Os(ds)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(vl,e.correlationId),t){case Im:case Em:case Om:case Cm:const t=this.createSilentRefreshClient(e.correlationId);return hu(t.acquireToken.bind(t),Gl,this.logger,this.performanceClient,e.correlationId)(e);default:throw Os(ds)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(id,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return hu(t.acquireToken.bind(t),ql,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);gf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Yh);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);ff(this.initialized),this.browserStorage.setInteractionInProgress(!0,Yh);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 gT(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 TT(e,t){try{hf(e)}catch(e){throw t.end({success:!1},e),e}}class AT{constructor(e){var t,o,i,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 Uf(this.logger,this.performanceClient):Es,this.eventHandler=new Cg(this.logger),this.browserStorage=this.isBrowserEnvironment?new Eg(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let o;if(t)try{o=JSON.parse(t)}catch(e){throw Xs(Bs)}return{canonicalAuthority:e.authority?Su(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:o}}(this.config.auth)):(t=this.config.auth.clientId,o=this.logger,i=this.performanceClient,r=this.eventHandler,new Eg(t,{cacheLocation:Bh,cacheRetentionDays:5,temporaryCacheLocation:Bh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},Es,o,i,r));const n={cacheLocation:Bh,cacheRetentionDays:5,temporaryCacheLocation:Bh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Eg(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new hT(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 o=new AT(e);return await o.initialize(t),o}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($f);const o=e?.correlationId||this.getRequestCorrelationId(),i=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(rd,o);if(this.eventHandler.emitEvent(Qf),!t)try{this.logMultipleInstances(r)}catch{}if(await uu(this.browserStorage.initialize.bind(this.browserStorage),nd,this.logger,this.performanceClient,o)(o),i)try{this.platformAuthProvider=await Xg(this.logger,this.performanceClient,o,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"),cu(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Hd,this.logger,this.performanceClient,o)(o)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(o),this.initialized=!0,this.eventHandler.emitEvent($f),r.end({allowPlatformBroker:i,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),pf(this.initialized),this.isBrowserEnvironment){const t=e||"";let o=this.redirectResponse.get(t);return void 0===o?(o=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,o),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"),o}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===Wh)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const o=this.getAllAccounts(),i=this.browserStorage.getCachedNativeRequest(),r=i&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(hg,am.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(xl,i?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,tm,this.performanceClient,this.platformAuthProvider,i.accountId,this.nativeInternalStorage,i.correlationId);a=uu(e.handleRedirectPromise.bind(e),jd,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,o]=this.browserStorage.getCachedRequest(),i=t.correlationId;n=this.performanceClient.startMeasurement(xl,i),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(i);a=uu(r.handleRedirectPromise.bind(r),qd,this.logger,this.performanceClient,n.event.correlationId)(e,t,o,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();o.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(tg,am.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(rg,am.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:gT(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(mg,am.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw o.length>0?this.eventHandler.emitEvent(ng,am.Redirect,null,t):this.eventHandler.emitEvent(og,am.Redirect,null,t),this.eventHandler.emitEvent(mg,am.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const o=this.performanceClient.startMeasurement(Ml,t);o.add({accountType:gT(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=e=>{const t="function"==typeof i?i(e):void 0;return o.add({navigateCallbackResult:!1!==t}),o.event=o.end({success:!0})||o.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const i="function"==typeof e?e(t):void 0;return o.add({navigateCallbackResult:!1!==i}),o.event=o.end({success:!0})||o.event,i}}const r=this.getAllAccounts().length>0;try{let i;if(mf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Gh),r?this.eventHandler.emitEvent(ig,am.Redirect,e):this.eventHandler.emitEvent(eg,am.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){i=new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Jh,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,o).catch(i=>{if(o.add({brokerErrorName:i.name,brokerErrorCode:i.errorCode}),i instanceof Dg&&kg(i)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(i instanceof Vu){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 i})}else{i=this.createRedirectClient(t).acquireToken(e)}return await i}catch(e){throw this.browserStorage.resetRequestCache(),2===o.event.status?this.performanceClient.startMeasurement(xl,t).end({success:!1},e):o.end({success:!1},e),r?this.eventHandler.emitEvent(ng,am.Redirect,null,e):this.eventHandler.emitEvent(og,am.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(Ll,t);o.add({scenarioId:e.scenarioId,accountType:gT(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),TT(this.initialized,o),this.browserStorage.setInteractionInProgress(!0,Gh)}catch(e){return Promise.reject(e)}const i=this.getAllAccounts();let r;i.length>0?this.eventHandler.emitEvent(ig,am.Popup,e):this.eventHandler.emitEvent(eg,am.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))o.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Xh).then(e=>(o.end({success:!0,accountType:gT(e.account)}),e)).catch(i=>{if(o.add({brokerErrorName:i.name,brokerErrorCode:i.errorCode}),i instanceof Dg&&kg(i)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(i instanceof Vu){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 i});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(tg,am.Popup,e):this.eventHandler.emitEvent(rg,am.Popup,e),o.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>(i.length>0?this.eventHandler.emitEvent(ng,am.Popup,null,e):this.eventHandler.emitEvent(og,am.Popup,null,e),o.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),o={...e,prompt:e.prompt,correlationId:t};let i;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(jl,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:gT(e.account)}),TT(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(sg,am.Silent,o),this.canUsePlatformBroker(o))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),i=this.acquireTokenNative(o,em).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof Dg&&kg(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(o.correlationId).acquireToken(o)}throw e});else{i=this.createSilentIframeClient(o.correlationId).acquireToken(o)}return i.then(e=>(this.eventHandler.emitEvent(lg,am.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(dg,am.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 o=this.performanceClient.startMeasurement(wl,t);TT(this.initialized,o),this.eventHandler.emitEvent(cg,am.Silent,e),o.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Ah(th);if(e.code){const i=e.code;let r=this.hybridAuthCodeResponses.get(i);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),o.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(ug,am.Silent,e),this.hybridAuthCodeResponses.delete(i),o.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(pg,am.Silent,null,e),o.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(i,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){o.add({isPlatformBrokerRequest:!0});const i=await this.acquireTokenNative({...e,correlationId:t},om,e.nativeAccountId).catch(e=>{throw e instanceof Dg&&kg(e)&&(this.platformAuthProvider=void 0),o.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return o.end({accountType:gT(i.account),success:!0}),i}throw Ah(ih)}throw Ah(eh)}catch(e){throw this.eventHandler.emitEvent(pg,am.Silent,null,e),o.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Bd,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(Jl,e.correlationId),t){case Am:case ym:case Im:const t=this.createSilentCacheClient(e.correlationId);return uu(t.acquireToken.bind(t),Ul,this.logger,this.performanceClient,e.correlationId)(e);default:throw _s(ss)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(Sl,e.correlationId),t){case Am:case Im:case _m:case Em:const t=this.createSilentRefreshClient(e.correlationId);return uu(t.acquireToken.bind(t),ql,this.logger,this.performanceClient,e.correlationId)(e);default:throw _s(ss)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(td,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return uu(t.acquireToken.bind(t),Fl,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);mf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Wh);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);hf(this.initialized),this.browserStorage.setInteractionInProgress(!0,Wh);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,o,i,r){return e.verbose("getAllAccounts called"),o?t.getAllAccounts(r||{},i):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return function(e,t,o,i){const r=o.getAccountInfoFilteredBy(e,i);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,o,i){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const r=o.getAccountInfoFilteredBy({username:e},i);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,o,i){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=o.getAccountInfoFilteredBy({homeAccountId:e},i);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,o,i){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const r=o.getAccountInfoFilteredBy({localAccountId:e},i);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,o){t.setActiveAccount(e,o)}(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 o=qu.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(o,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,o,i){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Ih(lh);return new jg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,i)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!oT(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 Un:case kn:case xn: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 iT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new rT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new hT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,om,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new qg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new mT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new TT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rm,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return hf(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===Bh?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===Bh?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?Km():un.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||gm})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||gm})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(Ll,t);o.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),yT(this.initialized,o),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw Ih(jp);return o.add({accountType:AT(i)}),this.acquireTokenSilentDeduped(e,i,t).then(i=>(o.end({success:!0,fromCache:i.fromCache,accessTokenSize:i.accessToken.length,idTokenSize:i.idToken.length}),{...i,state:e.state,correlationId:t})).catch(e=>{throw e instanceof Sa&&e.setCorrelationId(t),o.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,o){const i=xu(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(i),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.addFields({deduped:!1},o);const i=hu(this.acquireTokenSilentAsync.bind(this),Ml,this.logger,this.performanceClient,o)({...e,correlationId:o},t);return this.activeSilentTokenRequests.set(r,i),i.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),this.performanceClient.addFields({deduped:!0},o),n}async acquireTokenSilentAsync(e,t){const o=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(Ml,e.correlationId),this.eventHandler.emitEvent(ng,lm.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",o);const i=await hu(Sg,nd,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Im;return this.acquireTokenSilentNoIframe(i,r).catch(async e=>{const t=function(e,t){const o=!(e instanceof Qu&&e.subError!==Yu),i=e.errorCode===_h||e.errorCode===ds,r=o&&i||e.errorCode===ju||e.errorCode===Wu,n=Rm.includes(t);return r&&n}
157
- /*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Nm){const[t,o]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${o}`,i.correlationId);const n=this.performanceClient.startMeasurement(jl,i.correlationId);n.add({awaitIframeCorrelationId:o});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${o} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,r);throw this.logger.info(`Iframe request with correlationId: ${o} 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.",i.correlationId),hu(this.acquireTokenBySilentIframe.bind(this),id,this.logger,this.performanceClient,i.correlationId)(i)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),hu(this.acquireTokenBySilentIframe.bind(this),id,this.logger,this.performanceClient,i.correlationId)(i).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(ag,lm.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(sg,lm.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",o)})}async acquireTokenSilentNoIframe(e,t){return oT(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,nm,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof Ug&&Fg(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Os(ds);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===_m&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),hu(this.acquireTokenFromCache.bind(this),ed,this.logger,this.performanceClient,e.correlationId)(e,t).catch(o=>{if(t===_m)throw o;return this.eventHandler.emitEvent(lg,lm.Silent,e),hu(this.acquireTokenByRefreshToken.bind(this),vl,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await hu($g,Zd,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,o){const i=window.msal?.clientIds||[],r=i.length,n=i.filter(t=>t===e).length;n>1&&o.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 o=Fu.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(o,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,o,i){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Ah(ah);return new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,i)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!eT(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 Dn:case xn:case Ln: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 tT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new oT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new uT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,em,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new pT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new fT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,om,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return uf(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===Uh?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===Uh?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?Hm():dn.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||mm})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||mm})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(Pl,t);o.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),TT(this.initialized,o),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw Ah(Bp);return o.add({accountType:gT(i)}),this.acquireTokenSilentDeduped(e,i,t).then(i=>(o.end({success:!0,fromCache:i.fromCache,accessTokenSize:i.accessToken.length,idTokenSize:i.idToken.length}),{...i,state:e.state,correlationId:t})).catch(e=>{throw e instanceof ba&&e.setCorrelationId(t),o.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,o){const i=Lu(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(i),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.addFields({deduped:!1},o);const i=uu(this.acquireTokenSilentAsync.bind(this),vl,this.logger,this.performanceClient,o)({...e,correlationId:o},t);return this.activeSilentTokenRequests.set(r,i),i.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),this.performanceClient.addFields({deduped:!0},o),n}async acquireTokenSilentAsync(e,t){const o=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(vl,e.correlationId),this.eventHandler.emitEvent(ig,am.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",o);const i=await uu(bg,id,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Am;return this.acquireTokenSilentNoIframe(i,r).catch(async e=>{const t=function(e,t){const o=!(e instanceof Vu&&e.subError!==Wu),i=e.errorCode===yh||e.errorCode===ss,r=o&&i||e.errorCode===Bu||e.errorCode===ju,n=Cm.includes(t);return r&&n}
157
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Om){const[t,o]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${o}`,i.correlationId);const n=this.performanceClient.startMeasurement(Bl,i.correlationId);n.add({awaitIframeCorrelationId:o});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${o} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,r);throw this.logger.info(`Iframe request with correlationId: ${o} 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.",i.correlationId),uu(this.acquireTokenBySilentIframe.bind(this),td,this.logger,this.performanceClient,i.correlationId)(i)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),uu(this.acquireTokenBySilentIframe.bind(this),td,this.logger,this.performanceClient,i.correlationId)(i).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(rg,am.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(ng,am.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",o)})}async acquireTokenSilentNoIframe(e,t){return eT(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,im,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof Dg&&kg(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,_s(ss);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===ym&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),uu(this.acquireTokenFromCache.bind(this),Jl,this.logger,this.performanceClient,e.correlationId)(e,t).catch(o=>{if(t===ym)throw o;return this.eventHandler.emitEvent(ag,am.Silent,e),uu(this.acquireTokenByRefreshToken.bind(this),Sl,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await uu(zg,Qd,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,o){const i=window.msal?.clientIds||[],r=i.length,n=i.filter(t=>t===e).length;n>1&&o.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 _T{static async createPublicClientApplication(e){const t=await async function(e,t){const o=new Df(e);return await o.initialize(),IT.createController(o,t)}(e);return new _T(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new IT(new Df(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 ET={initialize:()=>Promise.reject(lf(rf)),acquireTokenPopup:()=>Promise.reject(lf(rf)),acquireTokenRedirect:()=>Promise.reject(lf(rf)),acquireTokenSilent:()=>Promise.reject(lf(rf)),acquireTokenByCode:()=>Promise.reject(lf(rf)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(lf(rf)),loginPopup:()=>Promise.reject(lf(rf)),loginRedirect:()=>Promise.reject(lf(rf)),logout:()=>Promise.reject(lf(rf)),logoutRedirect:()=>Promise.reject(lf(rf)),logoutPopup:()=>Promise.reject(lf(rf)),ssoSilent:()=>Promise.reject(lf(rf)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw lf(rf)},getLogger:()=>{throw lf(rf)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw lf(rf)},hydrateCache:()=>Promise.reject(lf(rf)),clearCache:()=>Promise.reject(lf(rf))};
161
- /*! @azure/msal-browser v4.21.1 2025-08-27 */class OT{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case og:return cm;case dg:return hm;case ng:if(e.interactionType===lm.Redirect||e.interactionType===lm.Popup)return pm;break;case fg:return mm;case Ag:return um;case cg:case ug:if(t&&t!==hm)break;return fm;case _g:if(t&&t!==um)break;return fm;case gg:if(t&&t!==mm)break;return fm;case ig:case rg:case ag:case sg:case Eg:if(e.interactionType===lm.Redirect||e.interactionType===lm.Popup){if(t&&t!==cm&&t!==pm)break;return fm}}return null}}
162
- /*! @azure/msal-react v3.0.19 2025-08-19 */const CT={instance:ET,inProgress:fm,accounts:[],logger:new Rs({})},NT=ce.createContext(CT);
159
+ class yT{static async createPublicClientApplication(e){const t=await async function(e,t){const o=new Mf(e);return await o.initialize(),AT.createController(o,t)}(e);return new yT(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new AT(new Mf(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 IT={initialize:()=>Promise.reject(af(tf)),acquireTokenPopup:()=>Promise.reject(af(tf)),acquireTokenRedirect:()=>Promise.reject(af(tf)),acquireTokenSilent:()=>Promise.reject(af(tf)),acquireTokenByCode:()=>Promise.reject(af(tf)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(af(tf)),loginPopup:()=>Promise.reject(af(tf)),loginRedirect:()=>Promise.reject(af(tf)),logout:()=>Promise.reject(af(tf)),logoutRedirect:()=>Promise.reject(af(tf)),logoutPopup:()=>Promise.reject(af(tf)),ssoSilent:()=>Promise.reject(af(tf)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw af(tf)},getLogger:()=>{throw af(tf)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw af(tf)},hydrateCache:()=>Promise.reject(af(tf)),clearCache:()=>Promise.reject(af(tf))};
161
+ /*! @azure/msal-browser v4.21.1 2025-08-27 */class _T{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case eg:return lm;case sg:return um;case ig:if(e.interactionType===am.Redirect||e.interactionType===am.Popup)return cm;break;case hg:return pm;case gg:return dm;case lg:case dg:if(t&&t!==um)break;return hm;case yg:if(t&&t!==dm)break;return hm;case mg:if(t&&t!==pm)break;return hm;case tg:case og:case rg:case ng:case Ig:if(e.interactionType===am.Redirect||e.interactionType===am.Popup){if(t&&t!==lm&&t!==cm)break;return hm}}return null}}
162
+ /*! @azure/msal-react v3.0.19 2025-08-19 */const ET={instance:IT,inProgress:hm,accounts:[],logger:new Cs({})},OT=ce.createContext(ET);
163
163
  /*! @azure/msal-react v3.0.19 2025-08-19 */
164
- function RT(e,t){if(e.length!==t.length)return!1;const o=[...t];return e.every(e=>{const t=o.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 */NT.Consumer;const bT="3.0.19",wT="UNBLOCK_INPROGRESS",ST="EVENT",PT=(e,t)=>{const{type:o,payload:i}=t;let r=e.inProgress;switch(o){case wT:e.inProgress===dm&&(r=fm,i.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case ST:const t=i.message,n=OT.getInteractionStatusFromEvent(t,e.inProgress);n&&(i.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${o}`)}if(r===dm)return e;const n=i.instance.getAllAccounts();return r===e.inProgress||RT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:RT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function vT({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(Tm,bT)},[e]);const o=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",bT),[e]),[i,r]=d.useReducer(PT,void 0,()=>({inProgress:dm,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:o,message:t},type:ST})});return o.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:o},type:wT})})}).catch(()=>{}),()=>{t&&(o.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,o]);const n={instance:e,inProgress:i.inProgress,accounts:i.accounts,logger:o};return d.createElement(NT.Provider,{value:n},t)}const LT=e=>{const i=o.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new _T({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #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||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=o.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,i(ln.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...cn}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),i(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(vT,{instance:r,children:t.jsx(an,{msalInstance:r})}):t.jsx(an,{msalInstance:r})})};var MT={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"},xT={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 DT={...MT,...xT,...{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 kT={"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:"عرض"},UT={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 FT={...kT,...UT,...{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"}};i.library.add(r.fab),i.library.add(n.far),i.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return o.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return o.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ai,exports.AttachmentImageViewer=Ti,exports.AttachmentPanel=yi,exports.BaseApp=e=>{const[i,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:dn}),n=f.configureStore({reducer:i}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:dn,...e?.businessReduxReducers};r(e=>({...t}));const o={en:{translation:{...DT,...e?.businessLocals?.en}},ar:{translation:{...FT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(o.Provider,{store:n,children:t.jsx(LT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zi,exports.DashboardViewer=Vi,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mi,exports.FormElement=mi,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Di,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bi,exports.TemplateDataCard=qi,exports.TemplateForm=Ui,exports.TemplateGauge=ji,exports.TemplateGrid=vi,exports.TemplateLineChart=Gi,exports.TemplateLineProgress=Hi,exports.TemplatePieChart=Yi,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ki,exports.WorkflowDocumentTimeLine=Ii,exports.WorkflowRouteComponent=Fi,exports.capitalizeFirstLetter=ui,exports.constructGridColumnsFromFields=ot,exports.constructValidationSchema=it,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=di,exports.isNumeric=ci,exports.isValidEmail=pi,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=hi,exports.useApiActions=xe,exports.useAxios=Re,exports.useCommonStore=e=>{const t=o.useDispatch(),{handleGetRequest:i}=Re(),r=o.useSelector(t=>t?.commonStores?.stores[e]);return{reload:async()=>{r&&r?.url&&await i({endPointURI:r.url,showMask:!0,successCallBkFn:o=>{t(ve({storeKey:e,data:o.data}))},failureCallBkFn:()=>{t(ve({storeKey:e,data:[]}))}})},data:r?.data,store:r}},exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Se,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
164
+ function CT(e,t){if(e.length!==t.length)return!1;const o=[...t];return e.every(e=>{const t=o.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 */OT.Consumer;const NT="3.0.19",RT="UNBLOCK_INPROGRESS",bT="EVENT",wT=(e,t)=>{const{type:o,payload:i}=t;let r=e.inProgress;switch(o){case RT:e.inProgress===sm&&(r=hm,i.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case bT:const t=i.message,n=_T.getInteractionStatusFromEvent(t,e.inProgress);n&&(i.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${o}`)}if(r===sm)return e;const n=i.instance.getAllAccounts();return r===e.inProgress||CT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:CT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ST({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(fm,NT)},[e]);const o=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",NT),[e]),[i,r]=d.useReducer(wT,void 0,()=>({inProgress:sm,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:o,message:t},type:bT})});return o.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:o},type:RT})})}).catch(()=>{}),()=>{t&&(o.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,o]);const n={instance:e,inProgress:i.inProgress,accounts:i.accounts,logger:o};return d.createElement(OT.Provider,{value:n},t)}const PT=e=>{const i=o.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new yT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #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||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #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||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=o.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,i(an.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...ln}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),i(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(ST,{instance:r,children:t.jsx(rn,{msalInstance:r})}):t.jsx(rn,{msalInstance:r})})};var vT={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"},LT={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 MT={...vT,...LT,...{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 xT={"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:"عرض"},DT={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 kT={...xT,...DT,...{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"}};i.library.add(r.fab),i.library.add(n.far),i.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return o.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return o.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ai,exports.AttachmentImageViewer=Ti,exports.AttachmentPanel=yi,exports.BaseApp=e=>{const[i,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn}),n=f.configureStore({reducer:i}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xi,AppInfo:sn,...e?.businessReduxReducers};r(e=>({...t}));const o={en:{translation:{...MT,...e?.businessLocals?.en}},ar:{translation:{...kT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:o,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(o.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zi,exports.DashboardViewer=Vi,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mi,exports.FormElement=mi,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Di,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bi,exports.TemplateDataCard=qi,exports.TemplateForm=Ui,exports.TemplateGauge=ji,exports.TemplateGrid=vi,exports.TemplateLineChart=Gi,exports.TemplateLineProgress=Hi,exports.TemplatePieChart=Yi,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ki,exports.WorkflowDocumentTimeLine=Ii,exports.WorkflowRouteComponent=Fi,exports.capitalizeFirstLetter=ui,exports.constructGridColumnsFromFields=ot,exports.constructValidationSchema=it,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=di,exports.isNumeric=ci,exports.isValidEmail=pi,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=hi,exports.useApiActions=xe,exports.useAxios=Re,exports.useCommonStore=e=>{const t=o.useDispatch(),{handleGetRequest:i}=Re(),r=o.useSelector(t=>t?.commonStores?.stores[e]);return{reload:async()=>{r&&r?.url&&await i({endPointURI:r.url,showMask:!0,successCallBkFn:o=>{t(ve({storeKey:e,data:o.data}))},failureCallBkFn:()=>{t(ve({storeKey:e,data:[]}))}})},data:r?.data,store:r}},exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Se,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
166
166
  //# sourceMappingURL=index.js.map