(this["webpackJsonpdoforms-workforce-manager"]=this["webpackJsonpdoforms-workforce-manager"]||[]).push([[5],{112:function(e,a,t){"use strict";t.d(a,"c",(function(){return s})),t.d(a,"a",(function(){return l})),t.d(a,"d",(function(){return c})),t.d(a,"b",(function(){return u}));var n=t(41),o=t.n(n),r=t(25),i=t.n(r),s=function(e){var a=o()(),t=[];switch(e){case"ALL":case"EMPTY":case"NOTEMPTY":t=[null];break;case"TODAY":t=[a.clone().startOf("day")];break;case"YESTERDAY":t=[a.clone().subtract(1,"day")];break;case"TOMORROW":t=[a.clone().add(1,"day")];break;case"THISWEEK":t=[a.clone().startOf("week"),a.clone().endOf("week")];break;case"THISMONTH":t=[a.clone().startOf("month"),a.clone().endOf("month")];break;case"LASTWEEK":t=[a.clone().subtract(1,"week").startOf("week"),a.clone().subtract(1,"week").endOf("week")];break;case"LASTMONTH":t=[a.clone().subtract(1,"month").startOf("month"),a.clone().subtract(1,"month").endOf("month")];break;case"LAST7DAYS":t=[a.clone().subtract(6,"days"),a.clone()];break;case"LAST30DAYS":t=[a.clone().subtract(29,"days"),a.clone()];break;case"NEXTWEEK":t=[a.clone().add(1,"week").startOf("week"),a.clone().add(1,"week").endOf("week")];break;case"NEXTMONTH":t=[a.clone().add(1,"month").startOf("month"),a.clone().add(1,"month").endOf("month")];break;case"NEXT7DAYS":t=[a.clone().add(1,"day"),a.clone().add(7,"days")];break;case"NEXT30DAYS":t=[a.clone().add(1,"day"),a.clone().add(29,"days")]}return t},l=function(e,a){return(o()(e).valueOf()||0)-(o()(a).valueOf()||0)},c=function(e,a,t){if(null==e||""==e)return"";var n=new Date(e),r=o()(n),s="M/D/YYYY h:mm a";return t&&(s=i.a.has(t,"date")?t.date:t),null!=a&&r.utcOffset(a),r.isValid()?r.format(s):""},d=function(e,a){if(!("string"==typeof e||e instanceof Date||o.a.isMoment(e)))throw new Error("invalid argument: date must be of type string, Date or moment");a=a||0;var t=Math.trunc(Math.abs(a/60)),n=Math.abs(a)%60,r=o()(e);if(!r.isValid())throw new Error("invalid argument: date produces invalid moment");var i=r.format("YYYY-MM-DDTHH:mm:ss")+(a<0?"-":"+")+(t<10?"0":"")+t.toString()+":"+(n<10?"0":"")+n.toString();return o.a.parseZone(i,o.a.ISO_8601)},u=function(e,a){var t,n;if(Array.isArray(e)){if(t=d(e[0],a).startOf("day"),n=d(e[1],a).startOf("day").add(1,"day"),t.isAfter(n))throw new Error("invalid argument: date[0] must come before date[1]")}else n=(t=d(e,a).startOf("day")).clone().add(1,"day");return[t.toISOString(!0),n.toISOString(!0)]}},116:function(e,a,t){"use strict";t.d(a,"c",(function(){return c})),t.d(a,"a",(function(){return d})),t.d(a,"b",(function(){return u}));var n=t(19),o=t(26),r=t(61),i=(t(153),t(21)),s=t.n(i),l="".concat(r.a,"/api/v2"),c=function(){var e=Object(o.a)(Object(n.a)().mark((function e(a){var t;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={headers:{Accept:"application/json","Content-Type":"application/json"}},e.next=3,s.a.post("".concat(l,"/tokens/user"),a,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),d=function(){var e=Object(o.a)(Object(n.a)().mark((function e(a){var t,o;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={headers:{Accept:"application/json","Content-Type":"application/json"}},o={username:a},e.next=4,s.a.post("".concat(l,"/credentials/recover"),o,t);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),u=function(e){"undefined"!==typeof window&&sessionStorage.removeItem("jwt"),e()}},121:function(e,a,t){"use strict";var n=t(4),o=t(0),r=t(194),i=t(25),s=t.n(i),l=t(397),c=t(393),d=t(406),u=t(78),m=t(35),p=t(30),h=t(89),f=t(32),b=t(1),g=Object(r.a)((function(){return{root:{width:"100%"}}}));a.a=function(e){var a=e.linkViewInfo,t=e.message,r=e.severity,i=e.onMessageClosed,v=Object(p.c)(),j=g(),O=Object(m.g)(),y=Object(o.useState)(!0),S=Object(n.a)(y,2),E=S[0],x=S[1],T=function(){x(!1),i()};return Object(o.useEffect)((function(){}),[t]),Object(b.jsx)("div",{className:j.root,children:Object(b.jsx)(l.a,{open:E,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1e4,style:{height:"20%"},onClose:T,children:Object(b.jsxs)(c.a,{onClose:T,severity:r,children:[Object(b.jsx)(d.a,{children:s.a.capitalize(r)}),t,(null===a||void 0===a?void 0:a.name)&&Object(b.jsx)(u.a,{sx:{textDecoration:"underline",display:"inline-block","&:hover":{opacity:.9,cursor:"pointer"}},onClick:function(){v({type:h.a.VIEW_SELECTED,payload:a}),v({type:h.a.ACTION,payload:"audit"}),v({type:f.a.HAS_NEW_VIEW,payload:!0}),O.push("/views")},children:null===a||void 0===a?void 0:a.name})]})})})}},122:function(e,a,t){"use strict";t.d(a,"a",(function(){return s}));var n=t(24),o=t(3),r=t(25),i=t.n(r),s={ACTION:"FORM_ACTIONS",FORM_COLUMNS:"FORM_COLUMNS",FORM_FILTER_CONDITIONS:"FORM_FILTER_CONDITIONS",FORM_SELECTED:"FORM_SELECTED",FORM_DIALOG_SELECTED:"FORM_DIALOG_SELECTED",FORM_SELECTED_COLUMNS:"FORM_SELECTED_COLUMNS",FORM_VIEW:"FORM_VIEW",FORM_VIEW_SESSION:"FORM_VIEW_SESSION",FORM_REFRESH:"FORM_REFRESH",FORM_DELETE_SELECTION:"FORM_DELETE_SELECTION",FORM_RESTORE_PRODUCER:"FORM_RESTORE_PRODUCER",DATA_GRID:"FORM_DATA_GRID",NO_FORMS_PROJECTS:"FORM_NO_FORMS_PROJECTS",LOAD_MORE_RECORDS:"FORM_LOAD_MORE_RECORDS",RECORDS_CHANGED:"FORM_RECORDS_CHANGED",DONE_LOAD_MORE_RECORDS:"FORM_DONE_LOAD_MORE_RECORDS",QUERY_BUILD_APPLIED:"FORM_QUERY_BUILD_APPLIED",VIEW_DATA:"FORM_VIEW_DATA",VIEW_UPDATE:"FORM_VIEW_UPDATE",VIEW_CREATE:"FORM_VIEW_CREATE",RESET:"FORM_RESET",TAB_CHANGE:"FORM_TAB_CHANGE",NAME:"Forms",ROWS_PER_PAGE:"FORM_ROWS_PER_PAGE",CLIENT_FILTERS:"FORM_CLIENT_FILTERS"},l={action:null,formSelected:{},formDialogSelected:{},formView:{},formViewSession:!1,formFilterConditions:{},formColumns:[],formSelectedColumns:[],formRefresh:!1,formDeleteSelection:[],noFormsProjects:[],loadMoreRecords:!1,doneLoadMoreRecords:!1,queryBuildApplied:!1,viewUpdate:{},viewCreate:{},viewData:{},dispatchRecord4Map:null,showMapCloseIcon:!1,recordsChanged:!1,dataGrid:{title:null,query:{columns:[],filter:{conditions:[{preset:"TODAY",target:"@StartTime",type:"EQ"},{preset:"ALL",target:"@UserStatus",type:"EQ"}]}},queryView:{},columns:[],records:[],viewSession:!1},rowsPerPage:100,clientFilters:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case s.ACTION:return Object(o.a)(Object(o.a)({},e),{},{action:a.payload,dispatchRecord4Map:a.dispatchRecord?a.dispatchRecord:null,showMapCloseIcon:!!a.dispatchRecord&&a.dispatchRecord});case s.DATA_GRID:return Object(o.a)(Object(o.a)({},e),{},{dataGrid:Object(o.a)(Object(o.a)({},e.dataGrid),a.payload)});case s.FORM_SELECTED:return Object(o.a)(Object(o.a)({},e),{},{formSelected:a.payload,dataGrid:i.a.cloneDeep(l.dataGrid)});case s.FORM_DIALOG_SELECTED:return Object(o.a)(Object(o.a)({},e),{},{formDialogSelected:a.payload});case s.FORM_VIEW:return Object(o.a)(Object(o.a)({},e),{},{formView:a.payload});case s.FORM_VIEW_SESSION:return Object(o.a)(Object(o.a)({},e),{},{formViewSession:a.payload});case s.FORM_FILTER_CONDITIONS:return Object(o.a)(Object(o.a)({},e),{},{formFilterConditions:a.payload});case s.FORM_COLUMNS:return Object(o.a)(Object(o.a)({},e),{},{formColumns:a.payload});case s.FORM_SELECTED_COLUMNS:return Object(o.a)(Object(o.a)({},e),{},{formSelectedColumns:a.payload});case s.NO_FORMS_PROJECTS:return Object(o.a)(Object(o.a)({},e),{},{noFormsProjects:[].concat(Object(n.a)(e.noFormsProjects),[a.payload])});case s.FORM_REFRESH:return Object(o.a)(Object(o.a)({},e),{},{formRefresh:a.payload});case s.FORM_DELETE_SELECTION:return Object(o.a)(Object(o.a)({},e),{},{formDeleteSelection:a.payload});case s.LOAD_MORE_RECORDS:return Object(o.a)(Object(o.a)({},e),{},{loadMoreRecords:a.payload});case s.DONE_LOAD_MORE_RECORDS:return Object(o.a)(Object(o.a)({},e),{},{doneLoadMoreRecords:a.payload});case s.RECORDS_CHANGED:return Object(o.a)(Object(o.a)({},e),{},{recordsChanged:a.payload});case s.QUERY_BUILD_APPLIED:return Object(o.a)(Object(o.a)({},e),{},{queryBuildApplied:a.payload});case s.VIEW_DATA:return Object(o.a)(Object(o.a)({},e),{},{viewData:a.payload});case s.VIEW_UPDATE:return Object(o.a)(Object(o.a)({},e),{},{viewUpdate:a.payload});case s.VIEW_CREATE:return Object(o.a)(Object(o.a)({},e),{},{viewCreate:a.payload});case s.RESET:return l;case s.FORM_RESTORE_PRODUCER:var t;return Object(o.a)(Object(o.a)({},e),{},{action:a.payload.action,formSelected:a.payload.formSelected||{},formDialogSelected:a.payload.formDialogSelected||{},formView:a.payload.formView||{},formViewSession:a.payload.formViewSession,formFilterConditions:a.payload.formFilterConditions||{},formColumns:a.payload.formColumns||[],formColumnsUpdate:a.payload.formColumnsUpdate||[],formSelectedColumns:a.payload.formSelectedColumns||[],formRefresh:a.payload.formRefresh,formDeleteSelection:a.payload.formDeleteSelection||[],formTitle:a.payload.formTitle,noFormsProjects:a.payload.noFormsProjects||[],loadMoreRecords:a.payload.loadMoreRecords,doneLoadMoreRecords:a.payload.doneLoadMoreRecords,queryBuildApplied:a.payload.queryBuildApplied,viewUpdate:a.payload.viewUpdate||{},viewCreate:a.payload.viewCreate||{},viewData:a.payload.viewData||{},dispatchRecord4Map:a.payload.dispatchRecord4Map,dataGrid:a.payload.dataGrid||l.dataGrid,rowsPerPage:(null===a||void 0===a||null===(t=a.payload)||void 0===t?void 0:t.rowsPerPage)||100});case s.TAB_CHANGE:return s.NAME===a.payload?e:Object(o.a)({},e);case s.ROWS_PER_PAGE:return Object(o.a)(Object(o.a)({},e),{},{rowsPerPage:a.payload});case s.CLIENT_FILTERS:return Object(o.a)(Object(o.a)({},e),{},{clientFilters:a.payload});default:return e}}},123:function(e,a,t){"use strict";t.d(a,"a",(function(){return i}));var n=t(3),o=t(25),r=t.n(o),i={ACTION:"DEVICES_ACTION",DEVICE_SELECTED:"DEVICES_DEVICE_SELECTED",DEVICE_REFRESH:"DEVICES_DEVICE_REFRESH",DATA_GRID:"DEVICES_DATA_GRID",FORM_SELECTED:"DEVICES_FORM_SELECTED",FORM_COLUMNS:"DEVICES_FORM_COLUMNS",FORM_FILTER_CONDITIONS:"DEVICES_FORM_FILTER_CONDITIONS",FORM_DELETE_SELECTION:"DEVICES_FORM_DELETE_SELECTION",VIEW_DATA:"DEVICES_VIEW_DATA",VIEW_UPDATE:"DEVICES_VIEW_UPDATE",VIEW_CREATE:"DEVICES_VIEW_CREATE",RESET:"DEVICES_RESET",DEVICES_RESTORE_PRODUCER:"DEVICES_RESTORE_PRODUCER",DEVICES_OPEN_NEW_SCREEN_MAP:"DEVICES_OPEN_NEW_SCREEN_MAP",TAB_CHANGE:"DEVICES_TAB_CHANGE",NAME:"Devices",ROWS_PER_PAGE:"DEVICES_ROWS_PER_PAGE",UPDATE_FORM_SELECTED:"DEVICES_UPDATE_FORM_SELECTED",OLD_FORM_SELECTED:"DEVICES_OLD_FORM_SELECTED",CLIENT_FILTERS:"DEVICES_CLIENT_FILTERS"},s={action:null,deviceSelected:{},formColumns:[],formFilterConditions:{},formDeleteSelection:[],deviceRefresh:!1,viewUpdate:{},viewCreate:{},viewData:{},openNewScreenMap:!1,formSelected:{},showMapCloseIcon:!1,dataGrid:{title:null,query:{columns:[],filter:{conditions:[{preset:"TODAY",target:"@StartTime",type:"EQ"},{preset:"ALL",target:"@UserStatus",type:"EQ"}]}},queryView:{},columns:[],records:[],viewSession:!1},rowsPerPage:100,oldFormSelected:{},clientFilters:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case i.ACTION:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload,showMapCloseIcon:!1});case i.DEVICE_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{deviceSelected:a.payload,dataGrid:r.a.cloneDeep(s.dataGrid)});case i.FORM_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{formSelected:a.payload});case i.UPDATE_FORM_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{formSelected:Object(n.a)(Object(n.a)({},e.formSelected),a.payload)});case i.OLD_FORM_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{oldFormSelected:a.payload});case i.FORM_COLUMNS:return Object(n.a)(Object(n.a)({},e),{},{formColumns:a.payload});case i.FORM_FILTER_CONDITIONS:return Object(n.a)(Object(n.a)({},e),{},{formFilterConditions:a.payload});case i.VIEW_DATA:return Object(n.a)(Object(n.a)({},e),{},{viewData:a.payload});case i.VIEW_UPDATE:return Object(n.a)(Object(n.a)({},e),{},{viewUpdate:a.payload});case i.VIEW_CREATE:return Object(n.a)(Object(n.a)({},e),{},{viewCreate:a.payload});case i.DEVICE_REFRESH:return Object(n.a)(Object(n.a)({},e),{},{deviceRefresh:a.payload});case i.FORM_DELETE_SELECTION:return Object(n.a)(Object(n.a)({},e),{},{formDeleteSelection:a.payload});case i.DATA_GRID:return Object(n.a)(Object(n.a)({},e),{},{dataGrid:Object(n.a)(Object(n.a)({},e.dataGrid),a.payload)});case i.RESET:return s;case i.DEVICES_RESTORE_PRODUCER:var t;return Object(n.a)(Object(n.a)({},e),{},{action:a.payload.action,deviceSelected:a.payload.deviceSelected||{},formColumns:a.payload.formColumns||[],formFilterConditions:a.payload.formFilterConditions||{},formDeleteSelection:a.payload.formDeleteSelection||[],deviceRefresh:a.payload.deviceRefresh,viewUpdate:a.payload.viewUpdate||{},viewCreate:a.payload.viewCreate||{},viewData:a.payload.viewData||{},dataGrid:a.payload.dataGrid||s.dataGrid,rowsPerPage:(null===a||void 0===a||null===(t=a.payload)||void 0===t?void 0:t.rowsPerPage)||100});case i.DEVICES_OPEN_NEW_SCREEN_MAP:return Object(n.a)(Object(n.a)({},e),{},{openNewScreenMap:a.payload});case i.TAB_CHANGE:return i.NAME===a.payload?e:Object(n.a)({},e);case i.ROWS_PER_PAGE:return Object(n.a)(Object(n.a)({},e),{},{rowsPerPage:a.payload});case i.CLIENT_FILTERS:return Object(n.a)(Object(n.a)({},e),{},{clientFilters:a.payload});default:return e}}},124:function(e,a,t){"use strict";t.d(a,"a",(function(){return i}));var n=t(3),o=t(25),r=t.n(o),i={ACTION:"LOOKUPS_ACTION",FORM_SELECTED:"LOOKUPS_FORM_SELECTED",FORM_COLUMNS:"LOOKUPS_FORM_COLUMNS",FORM_FILTER_CONDITIONS:"LOOKUPS_FORM_FILTER_CONDITIONS",FORM_DELETE_SELECTION:"LOOKUPS_FORM_DELETE_SELECTION",DATA_GRID:"LOOKUPS_DATA_GRID",LOOKUPS_PROJECT:"LOOKUPS_PROJECT",LOOKUPS_REFRESH:"LOOKUPS_REFRESH",VIEW_DATA:"LOOKUPS_VIEW_DATA",VIEW_UPDATE:"LOOKUPS_VIEW_UPDATE",VIEW_CREATE:"LOOKUPS_VIEW_CREATE",RESET:"LOOKUPS_RESET",LOOKUPS_RESTORE_PRODUCER:"LOOKUPS_RESTORE_PRODUCER",TAB_CHANGE:"LOOKUPS_TAB_CHANGE",NAME:"Lookups",ROWS_PER_PAGE:"LOOKUPS_ROWS_PER_PAGE",CLIENT_FILTERS:"LOOKUPS_CLIENT_FILTERS"},s={action:null,formColumns:[],formColumnsChanged:!1,formSelected:{},formDeleteSelection:[],formFilterConditions:{},lookupsProject:{},lookupsRefresh:!1,viewUpdate:{},viewCreate:{},viewData:{},dataGrid:{title:null,query:{columns:[],filter:{conditions:[{preset:"TODAY",target:"@StartTime",type:"EQ"},{preset:"ALL",target:"@UserStatus",type:"EQ"}]}},queryView:{},records:[],viewSession:!1},rowsPerPage:100,clientFilters:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case i.ACTION:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload});case i.DATA_GRID:return Object(n.a)(Object(n.a)({},e),{},{dataGrid:Object(n.a)(Object(n.a)({},e.dataGrid),a.payload)});case i.FORM_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{formSelected:a.payload,dataGrid:r.a.cloneDeep(s.dataGrid)});case i.FORM_FILTER_CONDITIONS:return Object(n.a)(Object(n.a)({},e),{},{formFilterConditions:a.payload});case i.FORM_COLUMNS:return Object(n.a)(Object(n.a)({},e),{},{formColumns:a.payload});case i.FORM_DELETE_SELECTION:return Object(n.a)(Object(n.a)({},e),{},{formDeleteSelection:a.payload});case i.LOOKUPS_PROJECT:return Object(n.a)(Object(n.a)({},e),{},{lookupsProject:a.payload});case i.VIEW_DATA:return Object(n.a)(Object(n.a)({},e),{},{viewData:a.payload});case i.VIEW_UPDATE:return Object(n.a)(Object(n.a)({},e),{},{viewUpdate:a.payload});case i.VIEW_CREATE:return Object(n.a)(Object(n.a)({},e),{},{viewCreate:a.payload});case i.LOOKUPS_REFRESH:return Object(n.a)(Object(n.a)({},e),{},{lookupsRefresh:a.payload});case i.RESET:return s;case i.LOOKUPS_RESTORE_PRODUCER:var t;return Object(n.a)(Object(n.a)({},e),{},{action:a.payload.action,formColumns:a.payload.formColumns||[],formSelected:a.payload.formSelected||{},formDeleteSelection:a.payload.formDeleteSelection||[],formFilterConditions:a.payload.formFilterConditions||{},lookupsProject:a.payload.lookupsProject||{},lookupsRefresh:a.payload.lookupsRefresh,viewUpdate:a.payload.viewUpdate||{},viewCreate:a.payload.viewCreate||{},viewData:a.payload.viewData||{},dataGrid:a.payload.dataGrid||s.dataGrid,rowsPerPage:(null===a||void 0===a||null===(t=a.payload)||void 0===t?void 0:t.rowsPerPage)||100});case i.TAB_CHANGE:return i.NAME===a.payload?e:Object(n.a)(Object(n.a)({},e),{},{formSelected:{}});case i.ROWS_PER_PAGE:return Object(n.a)(Object(n.a)({},e),{},{rowsPerPage:a.payload});case i.CLIENT_FILTERS:return Object(n.a)(Object(n.a)({},e),{},{clientFilters:a.payload});default:return e}}},127:function(e,a,t){"use strict";t.d(a,"a",(function(){return o}));var n=t(3),o={ACTION:"REPORTS_ACTION",REPORT_SELECTED:"REPORTS_REPORT_SELECTED",RESET:"REPORTS_RESET",REPORT_RESTORE_PRODUCER:"REPORTS_REPORT_RESTORE_PRODUCER",TAB_CHANGE:"REPORTS_TAB_CHANGE",NAME:"Reports"},r={action:null,reportSelected:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case o.ACTION:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload});case o.REPORT_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{reportSelected:a.payload});case o.RESET:return r;case o.REPORT_RESTORE_PRODUCER:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload.action,reportSelected:a.payload.reportSelected});case o.TAB_CHANGE:return o.NAME===a.payload?e:Object(n.a)(Object(n.a)({},e),{},{reportSelected:{}});default:return e}}},130:function(e,a,t){"use strict";t.d(a,"a",(function(){return m})),t.d(a,"b",(function(){return b})),t.d(a,"c",(function(){return O}));var n=t(19),o=t(3),r=t(4),i=t(26),s=t(47),l=t(21),c=t.n(l),d=t(200),u=Object(s.a)(),m=function(){var e=Object(i.a)(Object(n.a)().mark((function e(a,t){var i,s,l,c,u,m,O,S,E,x,T,C,D,R,k,w,A,_,I,L,M,P,F,N,V,z,H,U;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([p(a),h(a),f(a),b(a),g(a),v(a),j(),y(a)]);case 2:return E=e.sent,x=Object(r.a)(E,8),T=x[0],C=x[1],D=x[2],R=x[3],k=x[4],w=x[5],A=x[6],_=x[7],I={},"fulfilled"===(null===T||void 0===T?void 0:T.status)&&(I.account=null===T||void 0===T||null===(L=T.value)||void 0===L?void 0:L.data),"fulfilled"===(null===C||void 0===C?void 0:C.status)&&(I.theme=null===C||void 0===C||null===(M=C.value)||void 0===M?void 0:M.data),"fulfilled"===(null===D||void 0===D?void 0:D.status)&&(I.userCurrent=null===D||void 0===D||null===(P=D.value)||void 0===P?void 0:P.data),"fulfilled"===(null===R||void 0===R?void 0:R.status)&&(I.devices=null===R||void 0===R||null===(F=R.value)||void 0===F?void 0:F.data),"fulfilled"===(null===k||void 0===k?void 0:k.status)&&(I.owners=(null===k||void 0===k||null===(N=k.value)||void 0===N?void 0:N.data.length)&&(null===k||void 0===k||null===(V=k.value)||void 0===V?void 0:V.data.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{name:e.name?e.name:Object(d.d)(e.type,t)})})))),"fulfilled"===(null===w||void 0===w?void 0:w.status)&&(I.translations=null===w||void 0===w||null===(z=w.value)||void 0===z?void 0:z.data),"fulfilled"===(null===A||void 0===A?void 0:A.status)&&(I.links=null===A||void 0===A||null===(H=A.value)||void 0===H?void 0:H.data),"fulfilled"===(null===_||void 0===_?void 0:_.status)&&(I.settings=null===_||void 0===_||null===(U=_.value)||void 0===U?void 0:U.data),e.abrupt("return",{account:null!==(i=null===I||void 0===I?void 0:I.account)&&void 0!==i?i:{},theme:null!==(s=null===I||void 0===I?void 0:I.theme)&&void 0!==s?s:{},userCurrent:null!==(l=null===I||void 0===I?void 0:I.userCurrent)&&void 0!==l?l:{},devices:null!==(c=null===I||void 0===I?void 0:I.devices)&&void 0!==c?c:{},owners:null!==(u=null===I||void 0===I?void 0:I.owners)&&void 0!==u?u:[],translations:null!==(m=null===I||void 0===I?void 0:I.translations)&&void 0!==m?m:{},links:null!==(O=null===I||void 0===I?void 0:I.links)&&void 0!==O?O:[],settings:null!==(S=null===I||void 0===I?void 0:I.settings)&&void 0!==S?S:{}});case 22:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),p=function(e){return c()("".concat(u,"/accounts/current"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},h=function(e){return c()("".concat(u,"/themes/portal"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},f=function(e){return c()("".concat(u,"/users/current"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},b=function(e){return c()("".concat(u,"/devices"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},g=function(e){return c()("".concat(u,"/owners"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},v=function(e){return c()("".concat(u,"/translations/current"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})},j=function(){return c()("".concat(u,"/links"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}})},O=function(){var e=Object(i.a)(Object(n.a)().mark((function e(a,t){var o;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={headers:{Accept:"application/json",Authorization:"Bearer ".concat(t)}},e.next=3,c.a.put("".concat(u,"/users/current"),a,o);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),y=function(e){return c()("".concat(u,"/settings"),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}})}},135:function(e,a,t){"use strict";t.d(a,"a",(function(){return n})),t.d(a,"b",(function(){return o}));var n=function(e){"undefined"!==typeof window&&sessionStorage.setItem("jwt",JSON.stringify(e))},o=function(){return"undefined"!=typeof window&&(!!sessionStorage.getItem("jwt")&&JSON.parse(sessionStorage.getItem("jwt")))}},137:function(e,a,t){"use strict";t.d(a,"a",(function(){return Ve})),t.d(a,"b",(function(){return ze}));var n=t(3),o=t(4),r=t(298),i=t.n(r),s=t(297),l=t.n(s),c=t(295),d=t.n(c),u=t(299),m=t.n(u),p=t(296),h=t.n(p),f=t(1019),b=t(203),g=t(25),v=t.n(g),j=t(0),O=t(30),y=t(46),S=t(289),E=t.n(S),x=t(288),T=t.n(x),C=t(287),D=t.n(C),R=t(1030),k=t(997),w=t(399),A=t(1031),_=t(217),I=t(306),L=t(1033),M=t(194),P=t(196),F=t(72),N=t(231),V=t(90),z=t(32),H=(t(319),t(1)),U=Object(M.a)((function(){return{menuAppbar:function(e){return{background:e.backgroundColor,minHeight:"30px",border:"none",display:"flex",alignItems:"center",paddingLeft:0,marginBottom:0,listStyle:"none"}},toolbar:{minHeight:"fit-content"},menuNavLink:function(e){return{display:"flex",padding:"0.2rem 1rem",color:e.color,"&:hover":{backgroundColor:e.active.backgroundColor,color:e.active.color,textDecoration:"none",cursor:"pointer"}}},menuNavIconLink:function(e){return{display:"flex",padding:"0.2rem 0.5rem",color:e.isActive?e.active.color:e.color,backgroundColor:e.isActive?e.active.backgroundColor:void 0,"&:hover, &.isActive":{cursor:"pointer",backgroundColor:e.active.backgroundColor,color:e.active.color,textDecoration:"none"}}},selected:function(e){return{backgroundColor:e.active.backgroundColor,color:e.active.color}},icon:function(e){return{fontSize:"1.5em"}}}})),G="https://support.doforms.com/hc/en-us/articles/1500007337962",W="https://support.doforms.com/hc/en-us/articles/1500007337942",B="https://support.doforms.com/hc/en-us/articles/360046564933",q="https://support.doforms.com/hc/en-us/articles/1500005519222",K="https://support.doforms.com/hc/en-us/articles/1500005483522",Y="https://support.doforms.com/hc/en-us/articles/1500005519862",J="https://www.doforms.com/video-library/",Q="https://mydoforms.appspot.com/previewSubmit?id=ag9zfm15ZG9mb3Jtcy1ocmRyGAsSC1Byb2plY3RGb3JtGICAsNeX65sJDA&embedhtml=null&embedlink=null&email=null&hideToolbar=null&viewmode=null&hideLogo=null&mobileUserKey=&recordKey=&view=null&ornt=null&size=null&formlink=null&canSave=null&canSchedule=null&hideComplete=&hideSubmit=",Z="https://www.doforms.com/marketplace/";function X(e){var a,t,n,o,r,i,s=e.tab,l=Object(O.d)((function(e){return e})).environment,c=Object(j.useContext)(V.a).coreValues.theme.menuBar,d=U(c);if(!s)return null;var u,m="page"===(null===s||void 0===s?void 0:s.type),p="scheduler"===(null===s||void 0===s||null===(a=s.page)||void 0===a||null===(t=a.path)||void 0===t?void 0:t.slice(1));return Object(H.jsxs)("li",{className:"nav-item",children:[p?Object(H.jsx)("span",{className:d.menuNavLink,onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),void(window.open(l.renderHost+"?target=scheduler&token="+l.apiToken).document.title="doForms");var a},children:s.name}):Object(H.jsx)(F.b,{className:d.menuNavLink,activeClassName:d.selected,to:m?function(e){var a=null===e||void 0===e?void 0:e.slice(1);return"/dis/default/".concat(a)}(null===s||void 0===s||null===(n=s.page)||void 0===n?void 0:n.path):(u=null===s||void 0===s||null===(o=s.dashboard)||void 0===o?void 0:o.key,"/dis/".concat(u)),children:s.name}),(null===s||void 0===s||null===(r=s.items)||void 0===r?void 0:r.length)>0&&Object(H.jsx)("ul",{className:"menu-dropdown-list",style:{backgroundColor:c.backgroundColor},children:null===s||void 0===s||null===(i=s.items)||void 0===i?void 0:i.map((function(e,a){return Object(H.jsx)(X,{tab:e},a)}))})]})}var $=function(e){var a=e.menuItemList,t=e.isShowAllMenus,n=e.setIsShowAllMenus,r=e.isShowIconLoading,i=e.getMenuSettings,s=e.setCurrentMenu,l=e.listAllMenu,c=Object(N.a)().get("fullscreen"),d=Object(j.useContext)(V.a).coreValues,u=Object(O.d)((function(e){return e})).environment,m=d.translations,p=d.theme.menuBar,h=U(p),f=Object(P.a)("common"),b=Object(o.a)(f,1)[0],g=Object(j.useState)(null),v=Object(o.a)(g,2),S=v[0],x=v[1],C=Object(j.useState)(!1),M=Object(o.a)(C,2),$=M[0],ee=M[1],ae=Object(j.useState)(null),te=Object(o.a)(ae,2),ne=te[0],oe=te[1],re=Object(j.useState)("1"===c),ie=Object(o.a)(re,2),se=ie[0],le=ie[1],ce=Object(j.useState)(!1),de=Object(o.a)(ce,2),ue=de[0],me=de[1],pe=Object(j.useState)(!1),he=Object(o.a)(pe,2),fe=he[0],be=he[1],ge=Object(O.c)(),ve=Object(y.c)(null===u||void 0===u?void 0:u.userCurrent),je="show-menu-items",Oe=function(e,a){le(a),ge({type:z.a.TOGGLE_FULLSCREEN_MODE,payload:a}),a?setTimeout((function(){me(!1)}),500):setTimeout((function(){be(!1)}),500)},ye=function(e,a){switch(x(e.currentTarget),oe(a),a){case je:case"question":case"video":case"headset":case"contruction":case"setting":break;default:return}ee(!0)},Se=function(){x(null),ee(!1)};return Object(H.jsxs)(R.a,{sx:{"& li":{listStyle:"none"}},children:[Object(H.jsxs)(k.a,{className:h.menuAppbar,direction:"row",justifyContent:"space-between",children:[Object(H.jsx)(R.a,{component:"ul",sx:{display:"flex",alignItems:"center",flexWrap:"wrap",p:0,m:0},children:(null===a||void 0===a?void 0:a.length)>0&&a.map((function(e,a){return Object(H.jsx)(X,{tab:e},a)}))}),Object(H.jsx)(k.a,{direction:"row",children:Object(H.jsxs)(R.a,{component:"ul",sx:{display:"flex",alignItems:"center",mb:"0 !important"},children:[ve&&Object(H.jsxs)(H.Fragment,{children:[Object(H.jsx)("li",{className:"nav-item",children:r?Object(H.jsx)(w.a,{sx:{position:"relative",top:"3px",mr:1},color:"warning",size:20}):Object(H.jsx)(A.a,{title:"Show menu items",arrow:!0,placement:"bottom-start",children:Object(H.jsx)(H.Fragment,{children:Object(H.jsx)("div",{onClick:function(e){return ye(e,je)},className:"".concat(h.menuNavIconLink," ").concat(t?"isActive":""),children:Object(H.jsx)(D.a,{})})})},je)}),Object(H.jsx)("li",{className:"nav-item",children:Object(H.jsx)(A.a,{title:b("common:dis.menuManager"),arrow:!0,placement:"bottom-start",children:Object(H.jsx)(F.b,{className:h.menuNavIconLink,to:"/dis/menu-manager",children:Object(H.jsxs)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1.4em",width:"1.4em",xmlns:"http://www.w3.org/2000/svg",children:[Object(H.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Object(H.jsx)("path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6"}),Object(H.jsx)("path",{d:"M4 10h16"}),Object(H.jsx)("path",{d:"M10 4v9"}),Object(H.jsx)("path",{d:"M5.281 18.5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),Object(H.jsx)("path",{d:"M5.281 15v1.5"}),Object(H.jsx)("path",{d:"M5.281 20.5v1.5"}),Object(H.jsx)("path",{d:"M8.312 16.75l-1.299 .75"}),Object(H.jsx)("path",{d:"M3.55 19.5l-1.3 .75"}),Object(H.jsx)("path",{d:"M2.25 16.75l1.3 .75"}),Object(H.jsx)("path",{d:"M7.013 19.5l1.3 .75"})]})})},"menu-manager")})]}),Object(H.jsx)("li",{className:"nav-item",children:se?Object(H.jsx)(A.a,{title:"".concat(b("tooltip.expand")),arrow:!0,placement:"bottom-start",disableInteractive:!0,disableHoverListener:!0,open:!ue&&fe,children:Object(H.jsx)(F.b,{className:h.menuNavIconLink,to:"#",onClick:function(e){return Oe(0,!se)},onMouseEnter:function(){return be(!0)},onMouseLeave:function(){return be(!1)},children:Object(H.jsx)(T.a,{className:h.icon})})},"expand"):Object(H.jsx)(A.a,{title:"".concat(b("tooltip.fullscreen")),arrow:!0,placement:"bottom-start",disableInteractive:!0,disableHoverListener:!0,open:!fe&&ue,children:Object(H.jsx)(F.b,{className:h.menuNavIconLink,to:"#",onClick:function(e){return Oe(0,!se)},onMouseEnter:function(){return me(!0)},onMouseLeave:function(){return me(!1)},children:Object(H.jsx)(E.a,{className:h.icon})})},"fullscreen")}),ze.map((function(e,a){var t=e.icon;return Object(H.jsx)("li",{className:"nav-item",children:Object(H.jsx)("div",{hidden:!i.includes(e.name),className:h.menuNavIconLink,onClick:function(a){return ye(a,e.name)},children:Object(H.jsx)(t,{className:h.icon})})},a)}))]})})]}),ne===je&&Object(H.jsx)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:null===l||void 0===l?void 0:l.map((function(e,a){return Object(H.jsx)(L.a,{onClick:function(a){s(e.key),n(!e.isDefault),Se()},children:e.name},a)}))}),"question"===ne&&Object(H.jsxs)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:[Object(H.jsx)(L.a,{onClick:function(){window.open(G,"_blank"),Se()},children:m.mnDevices?m.mnDevices:b("common:tabs.devices")}),Object(H.jsx)(L.a,{onClick:function(){window.open(W,"_blank"),Se()},children:m.mnForms?m.mnForms:b("common:tabs.forms")}),Object(H.jsx)(L.a,{onClick:function(){window.open(B,"_blank"),Se()},children:m.mnScheduler?m.mnScheduler:b("common:tabs.scheduler")}),Object(H.jsx)(L.a,{onClick:function(){window.open(q,"_blank"),Se()},children:m.mnLookups?m.mnLookups:b("common:tabs.lookups")}),Object(H.jsx)(L.a,{onClick:function(){window.open(K,"_blank"),Se()},children:m.mnView?m.mnView:b("common:tabs.views")}),Object(H.jsx)(L.a,{onClick:function(){window.open(Y,"_blank"),Se()},children:m.mnReports?m.mnReports:b("common:tabs.reports")})]}),"video"===ne&&Object(H.jsx)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:Object(H.jsx)(L.a,{onClick:function(){window.open(J,"_blank"),Se()},children:m.mnVideos?m.mnVideos:b("common:tabs.videos")})}),"headset"===ne&&Object(H.jsxs)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:[Object(H.jsx)(L.a,{onClick:function(){window.open(Q,"supportwindow","menubar=1,resizable=1,width=1000,height=1000"),Se()},children:b("common:tabs.openSupportTicket")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.olark("api.box.expand"),void Se();var a},children:b("common:tabs.chatWithSupport")})]}),"contruction"===ne&&Object(H.jsxs)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:[Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=buildforms&token="+u.apiToken).document.title="doForms",void Se();var a},children:b("common:tabs.buildForms")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=buildreports&token="+u.apiToken).document.title="doForms",void Se();var a},children:b("common:tabs.buildReports")})]}),"setting"===ne&&Object(H.jsxs)(I.a,{id:"fade-menu",MenuListProps:{"aria-labelledby":"fade-button"},anchorEl:S,open:$,onClose:Se,TransitionComponent:_.a,children:[Object(H.jsx)(L.a,{onClick:function(){window.open(Z,"_blank"),Se()},children:m.mnMarketplace?m.mnMarketplace:b("common:tabs.marketplace")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=devices&token="+u.apiToken).document.title="doForms",void Se();var a},children:b("common:tabs.manageMobile")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=users&token="+u.apiToken).document.title="doForms",void Se();var a},children:b("common:tabs.manageWeb")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=manage&token="+u.apiToken).document.title="doForms",void Se();var a},children:m.mnConfigureSystem?m.mnConfigureSystem:b("common:tabs.configureSystem")}),Object(H.jsx)(L.a,{onClick:function(e){return(a=e).preventDefault(),a.stopPropagation(),window.open(u.renderHost+"?target=account&token="+u.apiToken).document.title="doForms",void Se();var a},children:m.mnManageAccount?m.mnManageAccount:b("common:tabs.manageAccount")})]})]})},ee=t(1009),ae=t(405),te=t(78),ne=t(197),oe=t(1038),re=t(400),ie=t(1039),se=t(1040),le=t(108),ce=t(1021),de=t(1010),ue=t(59),me=t(243),pe=t(121),he=function(){return[{name:"English",value:"en"},{name:"French",value:"fr"},{name:"Greek",value:"el"},{name:"Indonesian",value:"id"},{name:"Italian",value:"it"},{name:"Japanese",value:"ja"},{name:"Portuguese",value:"pt"},{name:"Russian",value:"ru"},{name:"Serbian",value:"sr"},{name:"Spanish",value:"es"},{name:"Vietnamese",value:"vi"},{name:"Hebrew",value:"he"}]},fe=t(1022),be=Object(M.a)((function(){return{root:{"label + &":{marginTop:"16px"},"& .MuiOutlinedInput-notchedOutline":{"& legend":{display:"none"}}}}})),ge=function(){var e=be(),a=he(),t=Object(P.a)("common"),n=Object(o.a)(t,2),r=n[0],i=n[1],s=Object(j.useState)("en"),l=Object(o.a)(s,2),c=l[0],d=l[1];return Object(j.useEffect)((function(){d(i.language)}),[]),Object(H.jsx)(H.Fragment,{children:Object(H.jsxs)(ae.a,{sx:{mt:1,mb:1,width:"400px"},variant:"outlined",fullWidth:!0,className:e.root,children:[Object(H.jsx)(te.a,{variant:"subtitle1",children:r("misc.language")}),Object(H.jsx)(fe.a,{labelId:"language-select-label",id:"language-select",value:c,onChange:function(e){d(e.target.value),i.changeLanguage(e.target.value)},size:"small",children:a.map((function(e,a){return Object(H.jsx)(L.a,{value:e.value,onMouseDown:function(e){return e.stopPropagation()},children:r("common:languages.".concat(e.name))},a)}))})]})})},ve=t(181),je=t(130),Oe=t(19),ye=t(26),Se=t(5),Ee=t(1037),xe=t(1004),Te=t(234),Ce=t(264),De=t(35);var Re=function(){var e,a=Object(P.a)("common"),t=Object(o.a)(a,1)[0],r=Object(O.d)((function(e){return e.environment})),i=Object(De.g)(),s=Object(De.h)(),l=Object(j.useState)(!1),c=Object(o.a)(l,2),d=c[0],u=c[1],m=Object(j.useState)({username:"",password:"",account:""}),p=Object(o.a)(m,2),h=p[0],f=p[1],b=Object(j.useState)(""),g=Object(o.a)(b,2),S=g[0],E=g[1],x=Object(j.useState)(!1),T=Object(o.a)(x,2),C=T[0],D=T[1],w=Object(y.l)(),A=!v.a.isEmpty(w),_=function(){u(!1)},I=function(){var e=Object(ye.a)(Object(Oe.a)().mark((function e(a){var n,o,l,c,d,u;return Object(Oe.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a.preventDefault(),h.username&&h.password&&h.account){e.next=5;break}return E(t("common:dis.pleaseFillInformation")),e.abrupt("return");case 5:return l={userName:h.username,password:h.password,account:{code:null!==(n=null===r||void 0===r||null===(o=r.account)||void 0===o?void 0:o.code)&&void 0!==n?n:"dftest"},database:h.account},E(""),D(!0),e.next=10,Te.a.login(l);case 10:if(c=e.sent,d=null===c||void 0===c?void 0:c.data,_(),d){e.next=15;break}return e.abrupt("return");case 15:localStorage.setItem(ue.m,JSON.stringify(d)),(u=new URLSearchParams(s.search)).delete("isMapLogout"),i.push({pathname:s.path,search:u.toString()}),e.next=25;break;case 21:e.prev=21,e.t0=e.catch(0),Object(y.x)(e.t0),E(null===e.t0||void 0===e.t0?void 0:e.t0.message);case 25:return e.prev=25,D(!1),e.finish(25);case 28:case"end":return e.stop()}}),e,null,[[0,21,25,28]])})));return function(a){return e.apply(this,arguments)}}(),L=function(){var e=Object(ye.a)(Object(Oe.a)().mark((function e(){var a;return Object(Oe.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D(!0),localStorage.removeItem(ue.m),(a=new URLSearchParams(s.search)).set("isMapLogout",!0),i.push({pathname:s.path,search:a.toString()}),D(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(H.jsxs)(R.a,{sx:{pb:2,width:"100%"},children:[Object(H.jsx)(te.a,{variant:"subtitle1",children:"Geotab"}),A?Object(H.jsxs)(k.a,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[Object(H.jsx)(te.a,{children:null===w||void 0===w||null===(e=w.credentials)||void 0===e?void 0:e.userName}),Object(H.jsx)(Ee.a,{variant:"outlined",onClick:L,disabled:C,loading:C,children:"Logout"})]}):Object(H.jsxs)(H.Fragment,{children:[Object(H.jsx)(le.a,{variant:"contained",onClick:function(){u(!0)},children:"Login"}),Object(H.jsx)(xe.a,{open:d,onClose:_,fullWidth:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(H.jsx)(Ce.a,{isLoading:C,onSubmit:I,onChangeInput:function(e){var a=e.target,t=a.name,o=a.value;f((function(e){return Object(n.a)(Object(n.a)({},e),{},Object(Se.a)({},t,o))}))},errorMsg:S})})]})]})},ke=Object(M.a)((function(){return{root:function(e){return{background:e.backgroundColor,color:"white","& .MuiButton-root":{textTransform:"none !important",color:e.color,borderColor:"white !important","&:hover":{color:e.active.color,backgroundColor:"transparent"}},"& .MuiTypography-root":{color:e.color}}},toolbar:{minHeight:15,maxHeight:24,justifyContent:"end",padding:0,WebkitFontSmoothing:"antialiased"},button:{display:"inline-block",fontSize:"12px",lineHeight:"24px",fontWeight:"normal",margin:"0 7px",letterSpacing:0,paddingTop:0,paddingBottom:0},label:{display:"inline-block",fontSize:"12px",lineHeight:"24px",margin:"0 15px",letterSpacing:0},separator:function(e){return{display:"inline-block",fontSize:"12px",lineHeight:"24px",marginTop:"-3px",color:e.color}},helperIcon:{zIndex:1e3}}})),we=function(){var e=Object(P.a)("common"),a=Object(o.a)(e,1)[0],t=Object(j.useContext)(V.a).coreValues,r=t.theme,i=t.account,s=t.translations,l=t.userCurrent,c=Object(O.d)((function(e){return e.environment})),d=ke(r.topBar),u=Object(j.useState)(null),m=Object(o.a)(u,2),p=m[0],h=m[1],f=Object(j.useState)(!1),b=Object(o.a)(f,2),g=b[0],v=b[1],y=Object(j.useState)(c.userCurrent.autoRefresh||"off"),S=Object(o.a)(y,2),E=S[0],x=S[1],T=Object(j.useState)(null),C=Object(o.a)(T,2),D=C[0],R=C[1],w=Boolean(p),_=Object(O.c)(),I=[{name:"on",title:a("common:nav.on")},{name:"notify",title:a("common:nav.notify")},{name:"off",title:a("common:nav.off")}],M=function(){R(null)},F=function(){window.open(ue.l,"_blank")},N=function(e){x(e.target.value||"off");var a=Object(n.a)(Object(n.a)({},c.userCurrent),{},{autoRefresh:e.target.value||"off"});Object(je.c)(a,c.apiToken).then((function(e){_({type:z.a.AUTO_REFRESH_UPDATE,payload:a.autoRefresh})})).catch((function(e){})).finally((function(){}))},U=function(){if(!i||!i.whatsNew||!i.whatsNew.expires)return!1;var e=new Date,a=new Date(i.whatsNew.expires);return e.getTime()0&&(null!==(a=null===t||void 0===t?void 0:t.flatMap((function(e){var a;return null===e||void 0===e||null===(a=e.items)||void 0===a?void 0:a.map((function(a){return Object(n.a)(Object(n.a)({},a),{},{menuKey:e.key})}))})))&&void 0!==a)?a:[]}var o,r;return null!==(o=null===S||void 0===S||null===(r=S.data)||void 0===r?void 0:r.items)&&void 0!==o?o:[]}catch(i){return[]}}),[null===S||void 0===S?void 0:S.data,null===T||void 0===T?void 0:T.data,l,m]),k=Object(j.useMemo)((function(){return Object(Ne.g)(R)}),[R]);return Object(H.jsxs)(H.Fragment,{children:[Object(H.jsx)(Fe,{}),Object(H.jsx)($,{menuItemList:k,isShowAllMenus:l,setIsShowAllMenus:c,isShowIconLoading:E||C,getMenuSettings:D,setCurrentMenu:p,listAllMenu:null!==(a=null===T||void 0===T?void 0:T.data)&&void 0!==a?a:[]}),t]})}},153:function(e,a){},181:function(e,a,t){"use strict";var n=t(4),o=t(0),r=t(194),i=t(116),s=t(58),l=t(30),c=t(196),d=t(108),u=t(312),m=t(32),p=t(123),h=t(122),f=t(124),b=t(89),g=t(127),v=t(35),j=t(1),O=Object(r.a)((function(){return{root:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center","& .MuiButton-root":{textTransform:"none !important"}},paper:{position:"absolute",padding:"16px 32px 24px",borderRadius:"5px"}}}));a.a=function(e){var a=Object(c.a)("common"),t=Object(n.a)(a,1)[0],r=e.open,y=e.theme,S=e.translations,E=e.source,x=e.onClose,T=Object(v.g)(),C=O(y.topBar),D=Object(o.useState)(!1),R=Object(n.a)(D,2),k=R[0],w=R[1],A=[{color:y.icons.color},{"&:hover":{color:y.icons.active.color}}],_=Object(l.c)(),I=function(e,a){"backdropClick"!==a&&"escapeKeyDown"!==a&&x()},L=function(e){e.preventDefault(),w(!0),Object(i.b)((function(){_({type:m.a.SIGN_OUT}),_({type:p.a.RESET}),_({type:h.a.RESET}),_({type:f.a.RESET}),_({type:b.a.RESET}),_({type:g.a.RESET}),w(!1)})),T.push("/")},M=Object(j.jsxs)("div",{className:C.paper,style:{backgroundColor:"white"},children:["timeout"===E?Object(j.jsxs)("div",{children:[Object(j.jsx)("p",{children:Object(j.jsx)("b",{children:t("signOut.sessionExpired")})}),Object(j.jsx)(d.a,{sx:A,onClick:L,children:t("misc.close")})]}):Object(j.jsxs)("div",{children:[Object(j.jsx)("p",{children:t("signOut.messageConfirm")}),Object(j.jsx)(d.a,{sx:A,onClick:L,children:S.lbSignOut?S.lbSignOut:t("nav.signOut")}),Object(j.jsx)(d.a,{sx:A,onClick:I,children:S.btCancel?S.btCancel:t("misc.cancel")})]}),k&&Object(j.jsx)(s.a,{})]});return Object(j.jsx)("div",{children:Object(j.jsx)(u.a,{open:r,onClose:I,className:C.root,children:M})})}},199:function(e,a,t){"use strict";t.d(a,"s",(function(){return g})),t.d(a,"k",(function(){return v})),t.d(a,"d",(function(){return j})),t.d(a,"e",(function(){return O})),t.d(a,"l",(function(){return y})),t.d(a,"t",(function(){return S})),t.d(a,"i",(function(){return E})),t.d(a,"h",(function(){return x})),t.d(a,"g",(function(){return T})),t.d(a,"f",(function(){return C})),t.d(a,"o",(function(){return D})),t.d(a,"m",(function(){return R})),t.d(a,"j",(function(){return k})),t.d(a,"x",(function(){return w})),t.d(a,"v",(function(){return A})),t.d(a,"A",(function(){return _})),t.d(a,"u",(function(){return I})),t.d(a,"q",(function(){return L})),t.d(a,"b",(function(){return M})),t.d(a,"r",(function(){return P})),t.d(a,"p",(function(){return F})),t.d(a,"z",(function(){return N})),t.d(a,"w",(function(){return V})),t.d(a,"y",(function(){return z})),t.d(a,"a",(function(){return H})),t.d(a,"B",(function(){return U})),t.d(a,"C",(function(){return G})),t.d(a,"c",(function(){return W})),t.d(a,"n",(function(){return B}));var n=t(24),o=t(3),r=t(19),i=t(26),s=t(21),l=t.n(s),c=t(293),d=t(41),u=t.n(d),m=t(47);Object(c.a)(l.a,{retries:3});var p,h=l.a.CancelToken,f=Object(m.a)(),b=function(e){return{Accept:"application/json",Authorization:"Bearer ".concat(e)}},g=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,n,o,i){var s;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n?"".concat(f,"/records/view?@projectKey=").concat(t,"&@formKey=").concat(a,"&@viewSession=").concat(n):"".concat(f,"/records/view?@projectKey=").concat(t,"&@formKey=").concat(a),e.next=3,l.a.get(s,{headers:b(o),cancelToken:null===i||void 0===i?void 0:i.token});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t,n,o,r){return e.apply(this,arguments)}}(),v=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,n,o,i,s){var c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=o?"".concat(f,"/records/view?@projectKey=").concat(t,"&@formKey=").concat(a,"&@deviceNumber=").concat(n,"&@viewSession=").concat(o):"".concat(f,"/records/view?@projectKey=").concat(t,"&@formKey=").concat(a,"&@deviceNumber=").concat(n),e.next=3,l.a.get(c,{headers:b(i),cancelToken:null===s||void 0===s?void 0:s.token});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t,n,o,r,i){return e.apply(this,arguments)}}(),j=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,n){var o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="".concat(f,"/records/view?@type=activity&@deviceKey=").concat(a),e.next=3,l.a.get(o,{headers:b(t),cancelToken:null===n||void 0===n?void 0:n.token});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t,n){return e.apply(this,arguments)}}(),O=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(f,"/records/view?@type=activity"),e.next=3,l.a.get(n,{headers:b(a),cancelToken:null===t||void 0===t?void 0:t.token});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),y=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(f,"/activity/").concat(a),e.next=3,l.a.get(n,{headers:b(t)});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),S=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a){var t,n,o,i,s,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.viewKey,n=a.viewSession,o=a.token,i=a.shouldRemoveViewSession,s=i?"":"?@viewSession=".concat(n),c="".concat(f,"/views/").concat(t).concat(s),e.next=5,l.a.get(c,{headers:b(o)});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),E=function(e){return l.a.get("".concat(f,"/teams"),{headers:b(e)})},x=function(e){return l.a.get("".concat(f,"/reports/my"),{headers:b(e)})},T=function(e,a){return l.a.get("".concat(f,"/projects"),{headers:b(e),cancelToken:null===a||void 0===a?void 0:a.token})},C=function(e){return l.a.get("".concat(f,"/owners"),{headers:b(e)})},D=function(e,a){return l.a.get("".concat(f,"/projects/").concat(e,"/forms?@abandoned=true"),{headers:b(a)})},R=function(e,a){return l.a.get("".concat(f,"/owners/").concat(e,"/views"),{headers:b(a)})},k=function(e){return l.a.get("".concat(f,"/views"),{headers:b(e)})},w=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("".concat(f,"/forms/").concat(a),{headers:b(t)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),A=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("".concat(f,"/forms/").concat(a,"/columns"),{headers:b(t)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),_=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("".concat(f,"/forms/").concat(a,"/columns/all"),{headers:b(t)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),I=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("".concat(f,"/activity/columns"),{headers:b(a)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),L=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.get("".concat(f,"/reports/").concat(a,"/results"),{headers:b(t)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),M=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:b(t)},e.next=3,l.a.post("".concat(f,"/views"),a,n);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),P=function(e,a,t){return"".concat(f,"/reports/").concat(e,"/results/").concat(a,"/pdf?token=").concat(t)},F=function(e,a,t){return"".concat(f,"/reports/").concat(e,"/results/").concat(a,"/xlsx?token=").concat(t)},N=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,n,i){var s,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={headers:b(i),cancelToken:new h((function(e){p=e}))},c={filter:n,viewKey:a},t&&(c=Object(o.a)(Object(o.a)({},c),{},{viewSession:t})),e.next=5,l.a.post("".concat(f,"/records/query"),c,s);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(a,t,n,o){return e.apply(this,arguments)}}(),V=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,i,s,c,d){var u,m,p,h;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u={headers:b(c)},m=s.conditions.filter((function(e){return"@DeviceNumber"!==e.target})),d||null!==(p=m.filter((function(e){return"@UserStatus"===e.target})))&&0!==p.length||(m=[].concat(Object(n.a)(m),[{target:"@UserStatus",type:"EQ",preset:"ALL"}])),h={deviceNumber:t,filter:{conditions:m},viewKey:a},i&&(h=Object(o.a)(Object(o.a)({},h),{},{viewSession:i})),e.next=7,l.a.post("".concat(f,"/records/query"),h,u);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})));return function(a,t,n,o,r,i){return e.apply(this,arguments)}}(),z=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t,n){var i,s,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={headers:b(n),cancelToken:new h((function(e){p=e}))},s=new u.a,a.begin=s,c={view:a},t&&(c=Object(o.a)(Object(o.a)({},c),{},{viewSession:t})),e.next=7,l.a.post("".concat(f,"/records/query"),c,i);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})));return function(a,t,n){return e.apply(this,arguments)}}(),H=function(){var e;null===(e=p)||void 0===e||e()},U=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a){var t,n,o,i,s,c,d;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.viewKey,n=a.columnsArr,o=a.viewSession,i=a.token,s=a.shouldRemoveViewSession,c={headers:b(i)},d=s?"":"?@viewSession=".concat(o),e.next=5,l.a.put("".concat(f,"/views/").concat(t,"/columns").concat(d),n,c);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),G=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a,t){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:b(t)},e.next=3,l.a.put("".concat(f,"/views/").concat(a.key),a,n);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),W=function(e,a){var t={headers:b(a)};return l.a.delete("".concat(f,"/views/").concat(e),t)},B=function(e,a){return l.a.get("".concat(f,"/projects/").concat(e),{headers:b(a)})}},200:function(e,a,t){"use strict";t.d(a,"k",(function(){return C})),t.d(a,"m",(function(){return D})),t.d(a,"l",(function(){return R})),t.d(a,"g",(function(){return k})),t.d(a,"f",(function(){return w})),t.d(a,"a",(function(){return L})),t.d(a,"h",(function(){return M})),t.d(a,"i",(function(){return P})),t.d(a,"e",(function(){return F})),t.d(a,"n",(function(){return N})),t.d(a,"b",(function(){return V})),t.d(a,"c",(function(){return z})),t.d(a,"d",(function(){return H})),t.d(a,"j",(function(){return U}));var n=t(3),o=t(19),r=t(26),i=t(4),s=t(195),l=t(305),c=t(189),d=t(395),u=t(392),m=t(205),p=t(92),h=t(25),f=t.n(h),b=t(41),g=t.n(b),v=t(0),j=t(196),O=t(59),y=t(112),S=t(1),E=function(e){switch(e){case"DATETIME":return"dateTime";case"DATE":return"date";case"BOOLEAN":return"boolean";case"FLOAT":case"INTEGER":return"number";default:return"string"}},x=function(e){var a=Object(j.a)("common"),l=Object(i.a)(a,1)[0],u=e.item,h=e.applyValue,f=(e.focusElementRef,Object(v.useState)(null)),b=Object(i.a)(f,2),O=(b[0],b[1],Object(v.useState)(p.a)),y=Object(i.a)(O,2),E=y[0],x=y[1];Object(v.useEffect)((function(){var e=function(){var e=Object(r.a)(Object(o.a)().mark((function e(){var a;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(233)("./".concat(l("common:languages.dateFnsLocale"),"/index.js"));case 2:a=e.sent,x(a.default);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();E.code!==l("common:languages.dateFnsLocale")&&e()}),[l("common:languages.dateFnsLocale")]);return Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(c.a,{dateAdapter:m.a,locale:E,children:Object(S.jsx)(d.a,{label:l("common:filters.value"),value:u.value,onChange:function(e){var a=g()(e);a.isValid()&&h(Object(n.a)(Object(n.a)({},u),{},{value:a.format("YYYY-MM-DDTHH:mm")}))},renderInput:function(e){return Object(S.jsx)(s.a,Object(n.a)(Object(n.a)({},e),{},{variant:"standard",focused:!0}))}})})})},T=function(e){var a=Object(j.a)("common"),l=Object(i.a)(a,1)[0],d=e.item,h=e.applyValue,f=(e.focusElementRef,Object(v.useState)(null)),b=Object(i.a)(f,2),O=(b[0],b[1],Object(v.useState)(p.a)),y=Object(i.a)(O,2),E=y[0],x=y[1];Object(v.useEffect)((function(){var e=function(){var e=Object(r.a)(Object(o.a)().mark((function e(){var a;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(233)("./".concat(l("common:languages.dateFnsLocale"),"/index.js"));case 2:a=e.sent,x(a.default);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();E.code!==l("common:languages.dateFnsLocale")&&e()}),[l("common:languages.dateFnsLocale")]);return Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(c.a,{dateAdapter:m.a,locale:E,children:Object(S.jsx)(u.a,{label:l("common:filters.value"),value:d.value,onChange:function(e){var a=g()(e);a.isValid()&&h(Object(n.a)(Object(n.a)({},d),{},{value:a.format("YYYY-MM-DDTHH:mm")}))},renderInput:function(e){return Object(S.jsx)(s.a,Object(n.a)(Object(n.a)({},e),{},{variant:"standard",focused:!0}))}})})})},C=function(e,a,t){var o,r,i=null===e||void 0===e||null===(o=e.userCurrent)||void 0===o||null===(r=o.time)||void 0===r?void 0:r.useOneTimezone;return(t||[]).map((function(t){var o,r,s=null!==(o=null===t||void 0===t||null===(r=t.format)||void 0===r?void 0:r.date)&&void 0!==o?o:"MM/DD/YYYY h:mm A",c=U(e,a),d=!Object(h.isEmpty)(null===t||void 0===t?void 0:t.format);return"DATE"===t.type?{aggregate:null===t||void 0===t?void 0:t.aggregate,group:null===t||void 0===t?void 0:t.group,field:t.name,headerName:t.title,title:t.title,type:E(t.type),orgType:t.type,headerAlign:"left",align:"left",hide:!!t.hidden&&t.hidden,format:t.format,width:t.width||170,filterOperators:Object(l.a)().map((function(e){return Object(n.a)(Object(n.a)({},e),{},{InputComponent:e.InputComponent?x:void 0,InputComponentProps:{type:"date"}})})),sortComparator:y.a,valueFormatter:function(e){var a,t=e.value;return f.a.isEmpty(t)?t:g()(null===t||void 0===t||null===(a=t.split("T"))||void 0===a?void 0:a[0]).format(s)},valueGetter:function(e){var a,t=e.value;return f.a.isEmpty(t)?t:g()(null===t||void 0===t||null===(a=t.split("T"))||void 0===a?void 0:a[0]).format(s)}}:["TIME","DATETIME"].includes(t.type)?{aggregate:null===t||void 0===t?void 0:t.aggregate,group:null===t||void 0===t?void 0:t.group,field:t.name,headerName:t.title,title:t.title,type:E(t.type),orgType:t.type,headerAlign:"left",align:"left",hide:!!t.hidden&&t.hidden,format:t.format,width:t.width||170,filterOperators:Object(l.a)().map((function(e){return Object(n.a)(Object(n.a)({},e),{},{InputComponent:e.InputComponent?T:void 0,InputComponentProps:{type:"dateTime"}})})),sortComparator:y.a,valueFormatter:function(e){var a=e.value;return!1===i||f.a.isEmpty(a)?a:Object(y.d)(a,c,s)},valueGetter:function(e){var a=e.value;return!1===i||f.a.isEmpty(a)?a:Object(y.d)(a,c,s)}}:d?{aggregate:null===t||void 0===t?void 0:t.aggregate,group:null===t||void 0===t?void 0:t.group,field:t.name,headerName:t.title,title:t.title,type:E(t.type),orgType:t.type,headerAlign:"left",align:"left",hide:!!t.hidden&&t.hidden,format:t.format,width:t.width||170,valueFormatter:function(e){var a,o,r=e.value;return isNaN(r)?r?"".concat(r):"":(o=new Intl.NumberFormat(null===t||void 0===t||null===(a=t.format)||void 0===a?void 0:a.currency,Object(n.a)(Object(n.a)({},t.format),{},{minimumFractionDigits:Number.isInteger(r)?0:void 0})).format(r),r?o:"")}}:{aggregate:null===t||void 0===t?void 0:t.aggregate,group:null===t||void 0===t?void 0:t.group,field:t.name,headerName:t.title,title:t.title,type:E(t.type),orgType:t.type,headerAlign:"left",align:"left",hide:!!t.hidden&&t.hidden,format:t.format,width:t.width||170}}))},D=function(e){return e.map((function(e){return{name:null===e||void 0===e?void 0:e.field,title:null===e||void 0===e?void 0:e.headerName,type:null===e||void 0===e?void 0:e.orgType,width:null===e||void 0===e?void 0:e.width,format:null===e||void 0===e?void 0:e.format}}))},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,o=e.map((function(e,o){return Object(n.a)({id:o+1,"@displayId":o+1,recordKey:"DISPATCH"===e.type?e.dispatchKey:e.submissionKey,recordType:e.type},A(a,e,t))}));return o},k=function(e){var a=e.records,t=e.columns,o=e.columnCheckList;return(a||[]).map((function(e,a){return Object(n.a)({id:a+1,"@displayId":a+1,recordKey:"DISPATCH"===e.type?e.dispatchKey:e.submissionKey,recordType:e.type},_({columns:t,record:e,columnCheckList:o}))}))},w=function(e){var a=e.records,t=e.columns,o=e.environment,r=e.columnCheckList;return(a||[]).map((function(e,a){return Object(n.a)({id:a+1,"@displayId":a+1,recordKey:"DISPATCH"===e.type?e.dispatchKey:e.submissionKey,recordType:e.type},I({columns:t,record:e,environment:o,columnCheckList:r}))}))},A=function(e,a,t){var n,o,r,i,s=a.values;!1===(null===t||void 0===t||null===(n=t.userCurrent)||void 0===n||null===(o=n.time)||void 0===o?void 0:o.useOneTimezone)?r=null===a||void 0===a||null===(i=a.meta)||void 0===i?void 0:i.offset:r=U(t,a);for(var l=new Map,c=0;ct&&(t=i),l>n&&(n=l)}}catch(c){o.e(c)}finally{o.f()}return{x:t,y:n}}function f(e){return 0===(null===e||void 0===e?void 0:e.length)?[]:e.map((function(e){var a=p(e.position),t=Object(i.a)(a,4),n=t[0],o=t[1],s=t[2],l=t[3];return Object(r.a)(Object(r.a)({},e),{},{i:e.name,x:n,y:o,w:s,h:l})}))}function b(){return Math.random().toString(36).substring(2)}function g(e,a,t){try{if(0===(null===e||void 0===e?void 0:e.length)||0===(null===a||void 0===a?void 0:a.length))return[];var n=[],o=!1,r=function(r){var i,s=t.find((function(e){return e.id===r})),l=Boolean(s),c=null===a||void 0===a||null===(i=a[null===s||void 0===s?void 0:s.tileKey])||void 0===i?void 0:i[null===s||void 0===s?void 0:s.key];c&&l&&(o=!0,n.push({field:e[r],operator:"contains",value:c,id:b()}))};for(var i in e)r(i);return{filterConfigs:n,hasPrimaryKey:o}}catch(s){return{filterConfigs:[],hasPrimaryKey:!1}}}var v=function(){var e=Object(o.a)(Object(n.a)().mark((function e(a){var t,o,i,s,l,u,m,p;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=a.copiedMenu,l=a.dashboardResponse,u=a.token,e.next=3,c.a.get(null===s||void 0===s||null===(t=s.dashboard)||void 0===t?void 0:t.key,u);case 3:(null===(m=e.sent)||void 0===m||null===(o=m.data)||void 0===o||null===(i=o.tiles)||void 0===i?void 0:i.length)>0&&(null===m||void 0===m||null===(p=m.data)||void 0===p?void 0:p.tiles.map((function(e){return Object(r.a)(Object(r.a)({},e),{},{key:void 0,dashboardKey:l.data.key})}))).forEach((function(e){d.a.add({dashboardKey:l.data.key,data:e,token:u})}));case 5:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),j=function(){var e=Object(o.a)(Object(n.a)().mark((function e(a,t){var o,i,l,d,m,p,h,f,b;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==a&&void 0!==a&&a.items){e.next=3;break}return e.abrupt("return",[]);case 3:i=null===a||void 0===a||null===(o=a.items)||void 0===o?void 0:o.map((function(e){return Object(r.a)(Object(r.a)({},e),{},{name:e.name,position:e.position,dashboard:e.dashboard})})),l=[],d=Object(s.a)(i),e.prev=6,d.s();case 8:if((m=d.n()).done){e.next=27;break}return p=m.value,h=Object(r.a)(Object(r.a)({},p),{},{name:p.name,position:p.position}),e.prev=11,e.next=14,c.a.add(h,t);case 14:if(!(f=e.sent).data){e.next=20;break}return b=Object(r.a)(Object(r.a)({},h),{},{dashboard:{key:f.data.key}}),e.next=19,v({copiedMenu:p,dashboardResponse:f,token:t});case 19:l.push(b);case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(11),Object(u.x)(e.t0);case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),d.e(e.t1);case 32:return e.prev=32,d.f(),e.finish(32);case 35:return e.abrupt("return",l);case 38:return e.prev=38,e.t2=e.catch(0),e.abrupt("return",[]);case 41:case"end":return e.stop()}}),e,null,[[0,38],[6,29,32,35],[11,22]])})));return function(a,t){return e.apply(this,arguments)}}()},228:function(e,a,t){"use strict";t.d(a,"a",(function(){return o}));var n=t(3),o={ACTION:"ACTIVITY_ACTION",ACTIVITY_REFRESH:"ACTIVITY_ACTIVITY_REFRESH",DATA_GRID:"ACTIVITY_DATA_GRID",FORM_SELECTED:"ACTIVITY_FORM_SELECTED",FORM_COLUMNS:"ACTIVITY_FORM_COLUMNS",FORM_FILTER_CONDITIONS:"ACTIVITY_FORM_FILTER_CONDITIONS",FORM_DELETE_SELECTION:"ACTIVITY_FORM_DELETE_SELECTION",VIEW_DATA:"ACTIVITY_VIEW_DATA",VIEW_UPDATE:"ACTIVITY_VIEW_UPDATE",VIEW_CREATE:"ACTIVITY_VIEW_CREATE",RESET:"ACTIVITY_RESET",ACTIVITY_RESTORE_PRODUCER:"ACTIVITY_RESTORE_PRODUCER",ACTIVITY_OPEN_NEW_SCREEN_MAP:"ACTIVITY_OPEN_NEW_SCREEN_MAP",TAB_CHANGE:"ACTIVITY_TAB_CHANGE",NAME:"Activity",ROWS_PER_PAGE:"ACTIVITY_ROWS_PER_PAGE",CLIENT_FILTERS:"ACTIVITY_CLIENT_FILTERS"},r={action:"activity-page",formColumns:[],formFilterConditions:{},formDeleteSelection:[],formSelected:{},activityRefresh:!1,viewUpdate:{},viewCreate:{},viewData:{},dataGrid:{title:null,query:{columns:[],filter:{conditions:[{preset:"TODAY",target:"@StartTime",type:"EQ"},{preset:"ALL",target:"@UserStatus",type:"EQ"}]}},queryView:{},columns:[],records:[],viewSession:!1},rowsPerPage:100,clientFilters:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case o.ACTION:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload});case o.FORM_COLUMNS:return Object(n.a)(Object(n.a)({},e),{},{formColumns:a.payload});case o.FORM_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{formSelected:a.payload});case o.FORM_FILTER_CONDITIONS:return Object(n.a)(Object(n.a)({},e),{},{formFilterConditions:a.payload});case o.VIEW_DATA:return Object(n.a)(Object(n.a)({},e),{},{viewData:a.payload});case o.VIEW_UPDATE:return Object(n.a)(Object(n.a)({},e),{},{viewUpdate:a.payload});case o.VIEW_CREATE:return Object(n.a)(Object(n.a)({},e),{},{viewCreate:a.payload});case o.ACTIVITY_REFRESH:return Object(n.a)(Object(n.a)({},e),{},{activityRefresh:a.payload});case o.FORM_DELETE_SELECTION:return Object(n.a)(Object(n.a)({},e),{},{formDeleteSelection:a.payload});case o.DATA_GRID:return Object(n.a)(Object(n.a)({},e),{},{dataGrid:Object(n.a)(Object(n.a)({},e.dataGrid),a.payload)});case o.RESET:return r;case o.ACTIVITY_RESTORE_PRODUCER:var t,i,s,l,c,d,u,m,p,h,f;return Object(n.a)(Object(n.a)({},e),{},{action:(null===a||void 0===a||null===(t=a.payload)||void 0===t?void 0:t.action)||r.action,activitySelected:(null===a||void 0===a||null===(i=a.payload)||void 0===i?void 0:i.activitySelected)||{},formColumns:(null===a||void 0===a||null===(s=a.payload)||void 0===s?void 0:s.formColumns)||[],formFilterConditions:(null===a||void 0===a||null===(l=a.payload)||void 0===l?void 0:l.formFilterConditions)||{},formDeleteSelection:(null===a||void 0===a||null===(c=a.payload)||void 0===c?void 0:c.formDeleteSelection)||[],activityRefresh:null===a||void 0===a||null===(d=a.payload)||void 0===d?void 0:d.activityRefresh,viewUpdate:(null===a||void 0===a||null===(u=a.payload)||void 0===u?void 0:u.viewUpdate)||{},viewCreate:(null===a||void 0===a||null===(m=a.payload)||void 0===m?void 0:m.viewCreate)||{},viewData:(null===a||void 0===a||null===(p=a.payload)||void 0===p?void 0:p.viewData)||{},dataGrid:(null===a||void 0===a||null===(h=a.payload)||void 0===h?void 0:h.dataGrid)||r.dataGrid,rowsPerPage:(null===a||void 0===a||null===(f=a.payload)||void 0===f?void 0:f.rowsPerPage)||100});case o.TAB_CHANGE:return o.NAME===a.payload?e:Object(n.a)({},e);case o.ROWS_PER_PAGE:return Object(n.a)(Object(n.a)({},e),{},{rowsPerPage:a.payload});case o.CLIENT_FILTERS:return Object(n.a)(Object(n.a)({},e),{},{clientFilters:a.payload});default:return e}}},230:function(e,a,t){"use strict";var n=t(21),o=t.n(n),r=t(47),i=Object(r.a)(),s=function(e){return{Accept:"application/json",Authorization:"Bearer ".concat(e)}},l={getAll:function(e,a){return o.a.get("".concat(i,"/dashboards/").concat(e,"/tiles"),{headers:s(a)})},get:function(e,a,t,n){return o.a.get("".concat(i,"/dashboards/").concat(e,"/tiles/").concat(a),{headers:s(t),cancelToken:null===n||void 0===n?void 0:n.token})},add:function(e){var a=e.dashboardKey,t=e.data,n=e.token;return o.a.post("".concat(i,"/dashboards/").concat(a,"/tiles"),t,{headers:s(n)})},update:function(e){var a=e.dashboardKey,t=e.tileKey,n=e.data,r=e.token;return o.a.put("".concat(i,"/dashboards/").concat(a,"/tiles/").concat(t),n,{headers:s(r)})},updateAll:function(e){var a=e.dashboardKey,t=e.data,n=e.token;return o.a.put("".concat(i,"/dashboards/").concat(a,"/tiles"),t,{headers:s(n)})},remove:function(e){var a=e.dashboardKey,t=e.tileKey,n=e.token;return o.a.delete("".concat(i,"/dashboards/").concat(a,"/tiles/").concat(t),{headers:s(n)})}};a.a=l},231:function(e,a,t){"use strict";t.d(a,"a",(function(){return r}));var n=t(0),o=t(35),r=function(){var e=Object(o.h)().search;return Object(n.useMemo)((function(){return new URLSearchParams(e)}),[e])}},233:function(e,a,t){var n={"./_lib/buildFormatLongFn/index.js":[410,374],"./_lib/buildLocalizeFn/index.js":[411,375],"./_lib/buildMatchFn/index.js":[412,376],"./_lib/buildMatchPatternFn/index.js":[413,377],"./af/_lib/formatDistance/index.js":[443,378],"./af/_lib/formatLong/index.js":[444,200],"./af/_lib/formatRelative/index.js":[445,379],"./af/_lib/localize/index.js":[446,291],"./af/_lib/match/index.js":[447,119],"./af/index.js":[861,21],"./ar-DZ/_lib/formatDistance/index.js":[453,380],"./ar-DZ/_lib/formatLong/index.js":[454,201],"./ar-DZ/_lib/formatRelative/index.js":[455,381],"./ar-DZ/_lib/localize/index.js":[456,292],"./ar-DZ/_lib/match/index.js":[457,120],"./ar-DZ/index.js":[863,22],"./ar-EG/_lib/formatDistance/index.js":[458,382],"./ar-EG/_lib/formatLong/index.js":[459,202],"./ar-EG/_lib/formatRelative/index.js":[460,383],"./ar-EG/_lib/localize/index.js":[461,293],"./ar-EG/_lib/match/index.js":[462,121],"./ar-EG/index.js":[864,23],"./ar-MA/_lib/formatDistance/index.js":[463,384],"./ar-MA/_lib/formatLong/index.js":[464,203],"./ar-MA/_lib/formatRelative/index.js":[465,385],"./ar-MA/_lib/localize/index.js":[466,294],"./ar-MA/_lib/match/index.js":[467,122],"./ar-MA/index.js":[865,24],"./ar-SA/_lib/formatDistance/index.js":[468,386],"./ar-SA/_lib/formatLong/index.js":[469,204],"./ar-SA/_lib/formatRelative/index.js":[470,387],"./ar-SA/_lib/localize/index.js":[471,295],"./ar-SA/_lib/match/index.js":[472,123],"./ar-SA/index.js":[866,25],"./ar-TN/_lib/formatDistance/index.js":[473,388],"./ar-TN/_lib/formatLong/index.js":[474,205],"./ar-TN/_lib/formatRelative/index.js":[475,389],"./ar-TN/_lib/localize/index.js":[476,296],"./ar-TN/_lib/match/index.js":[477,124],"./ar-TN/index.js":[867,26],"./ar/_lib/formatDistance/index.js":[448,390],"./ar/_lib/formatLong/index.js":[449,206],"./ar/_lib/formatRelative/index.js":[450,391],"./ar/_lib/localize/index.js":[451,297],"./ar/_lib/match/index.js":[452,125],"./ar/index.js":[862,27],"./az/_lib/formatDistance/index.js":[478,392],"./az/_lib/formatLong/index.js":[479,207],"./az/_lib/formatRelative/index.js":[480,393],"./az/_lib/localize/index.js":[481,298],"./az/_lib/match/index.js":[482,126],"./az/index.js":[868,28],"./be-tarask/_lib/formatDistance/index.js":[489,394],"./be-tarask/_lib/formatLong/index.js":[490,208],"./be-tarask/_lib/formatRelative/index.js":[491,0,395],"./be-tarask/_lib/localize/index.js":[492,299],"./be-tarask/_lib/match/index.js":[493,127],"./be-tarask/index.js":[870,0,112],"./be/_lib/formatDistance/index.js":[483,396],"./be/_lib/formatLong/index.js":[484,209],"./be/_lib/formatRelative/index.js":[485,0,397],"./be/_lib/localize/index.js":[487,300],"./be/_lib/match/index.js":[488,128],"./be/index.js":[869,0,113],"./bg/_lib/formatDistance/index.js":[494,398],"./bg/_lib/formatLong/index.js":[495,210],"./bg/_lib/formatRelative/index.js":[496,102],"./bg/_lib/localize/index.js":[497,301],"./bg/_lib/match/index.js":[498,129],"./bg/index.js":[871,8],"./bn/_lib/formatDistance/index.js":[499,117],"./bn/_lib/formatLong/index.js":[500,211],"./bn/_lib/formatRelative/index.js":[501,399],"./bn/_lib/localize/index.js":[428,302],"./bn/_lib/match/index.js":[502,130],"./bn/index.js":[872,29],"./bs/_lib/formatDistance/index.js":[503,400],"./bs/_lib/formatLong/index.js":[504,212],"./bs/_lib/formatRelative/index.js":[505,401],"./bs/_lib/localize/index.js":[506,303],"./bs/_lib/match/index.js":[507,131],"./bs/index.js":[873,30],"./ca/_lib/formatDistance/index.js":[508,402],"./ca/_lib/formatLong/index.js":[509,213],"./ca/_lib/formatRelative/index.js":[510,403],"./ca/_lib/localize/index.js":[511,304],"./ca/_lib/match/index.js":[512,132],"./ca/index.js":[874,31],"./cs/_lib/formatDistance/index.js":[513,404],"./cs/_lib/formatLong/index.js":[514,214],"./cs/_lib/formatRelative/index.js":[515,405],"./cs/_lib/localize/index.js":[516,305],"./cs/_lib/match/index.js":[517,133],"./cs/index.js":[875,32],"./cy/_lib/formatDistance/index.js":[518,406],"./cy/_lib/formatLong/index.js":[519,215],"./cy/_lib/formatRelative/index.js":[520,407],"./cy/_lib/localize/index.js":[521,306],"./cy/_lib/match/index.js":[522,134],"./cy/index.js":[876,33],"./da/_lib/formatDistance/index.js":[523,408],"./da/_lib/formatLong/index.js":[524,216],"./da/_lib/formatRelative/index.js":[525,409],"./da/_lib/localize/index.js":[526,307],"./da/_lib/match/index.js":[527,135],"./da/index.js":[877,34],"./de-AT/_lib/localize/index.js":[529,308],"./de-AT/index.js":[879,35],"./de/_lib/formatDistance/index.js":[432,410],"./de/_lib/formatLong/index.js":[433,217],"./de/_lib/formatRelative/index.js":[434,411],"./de/_lib/localize/index.js":[528,309],"./de/_lib/match/index.js":[435,136],"./de/index.js":[878,36],"./el/_lib/formatDistance/index.js":[530,412],"./el/_lib/formatLong/index.js":[531,218],"./el/_lib/formatRelative/index.js":[532,413],"./el/_lib/localize/index.js":[533,310],"./el/_lib/match/index.js":[534,137],"./el/index.js":[880,37],"./en-AU/_lib/formatLong/index.js":[535,219],"./en-AU/index.js":[881,38],"./en-CA/_lib/formatDistance/index.js":[536,414],"./en-CA/_lib/formatLong/index.js":[537,220],"./en-CA/index.js":[882,39],"./en-GB/_lib/formatLong/index.js":[436,221],"./en-GB/index.js":[883,40],"./en-IE/index.js":[884,41],"./en-IN/_lib/formatLong/index.js":[538,222],"./en-IN/index.js":[885,42],"./en-NZ/_lib/formatLong/index.js":[539,223],"./en-NZ/index.js":[886,43],"./en-US/_lib/formatDistance/index.js":[418,415],"./en-US/_lib/formatLong/index.js":[431,224],"./en-US/_lib/formatRelative/index.js":[415,416],"./en-US/_lib/localize/index.js":[416,311],"./en-US/_lib/match/index.js":[417,138],"./en-US/index.js":[486,44],"./en-ZA/_lib/formatLong/index.js":[540,225],"./en-ZA/index.js":[887,45],"./eo/_lib/formatDistance/index.js":[541,417],"./eo/_lib/formatLong/index.js":[542,226],"./eo/_lib/formatRelative/index.js":[543,418],"./eo/_lib/localize/index.js":[544,312],"./eo/_lib/match/index.js":[545,139],"./eo/index.js":[888,46],"./es/_lib/formatDistance/index.js":[546,419],"./es/_lib/formatLong/index.js":[547,227],"./es/_lib/formatRelative/index.js":[548,420],"./es/_lib/localize/index.js":[549,313],"./es/_lib/match/index.js":[550,140],"./es/index.js":[889,47],"./et/_lib/formatDistance/index.js":[551,421],"./et/_lib/formatLong/index.js":[552,228],"./et/_lib/formatRelative/index.js":[553,422],"./et/_lib/localize/index.js":[554,314],"./et/_lib/match/index.js":[555,141],"./et/index.js":[890,48],"./eu/_lib/formatDistance/index.js":[556,423],"./eu/_lib/formatLong/index.js":[557,229],"./eu/_lib/formatRelative/index.js":[558,424],"./eu/_lib/localize/index.js":[559,315],"./eu/_lib/match/index.js":[560,142],"./eu/index.js":[891,49],"./fa-IR/_lib/formatDistance/index.js":[561,425],"./fa-IR/_lib/formatLong/index.js":[562,230],"./fa-IR/_lib/formatRelative/index.js":[563,426],"./fa-IR/_lib/localize/index.js":[564,316],"./fa-IR/_lib/match/index.js":[565,143],"./fa-IR/index.js":[892,50],"./fi/_lib/formatDistance/index.js":[566,427],"./fi/_lib/formatLong/index.js":[567,231],"./fi/_lib/formatRelative/index.js":[568,428],"./fi/_lib/localize/index.js":[569,317],"./fi/_lib/match/index.js":[570,144],"./fi/index.js":[893,51],"./fr-CA/_lib/formatLong/index.js":[572,232],"./fr-CA/index.js":[895,52],"./fr-CH/_lib/formatLong/index.js":[573,233],"./fr-CH/_lib/formatRelative/index.js":[574,429],"./fr-CH/index.js":[896,53],"./fr/_lib/formatDistance/index.js":[425,430],"./fr/_lib/formatLong/index.js":[571,234],"./fr/_lib/formatRelative/index.js":[437,431],"./fr/_lib/localize/index.js":[426,318],"./fr/_lib/match/index.js":[427,145],"./fr/index.js":[894,54],"./fy/_lib/formatDistance/index.js":[575,432],"./fy/_lib/formatLong/index.js":[576,235],"./fy/_lib/formatRelative/index.js":[577,433],"./fy/_lib/localize/index.js":[578,319],"./fy/_lib/match/index.js":[579,146],"./fy/index.js":[897,55],"./gd/_lib/formatDistance/index.js":[580,434],"./gd/_lib/formatLong/index.js":[581,236],"./gd/_lib/formatRelative/index.js":[582,435],"./gd/_lib/localize/index.js":[583,320],"./gd/_lib/match/index.js":[584,147],"./gd/index.js":[898,56],"./gl/_lib/formatDistance/index.js":[585,436],"./gl/_lib/formatLong/index.js":[586,237],"./gl/_lib/formatRelative/index.js":[587,437],"./gl/_lib/localize/index.js":[588,321],"./gl/_lib/match/index.js":[589,148],"./gl/index.js":[899,57],"./gu/_lib/formatDistance/index.js":[590,438],"./gu/_lib/formatLong/index.js":[591,238],"./gu/_lib/formatRelative/index.js":[592,439],"./gu/_lib/localize/index.js":[593,322],"./gu/_lib/match/index.js":[594,149],"./gu/index.js":[900,58],"./he/_lib/formatDistance/index.js":[595,440],"./he/_lib/formatLong/index.js":[596,239],"./he/_lib/formatRelative/index.js":[597,441],"./he/_lib/localize/index.js":[598,323],"./he/_lib/match/index.js":[599,150],"./he/index.js":[901,59],"./hi/_lib/formatDistance/index.js":[600,118],"./hi/_lib/formatLong/index.js":[601,240],"./hi/_lib/formatRelative/index.js":[602,442],"./hi/_lib/localize/index.js":[421,324],"./hi/_lib/match/index.js":[603,115],"./hi/index.js":[902,60],"./hr/_lib/formatDistance/index.js":[604,443],"./hr/_lib/formatLong/index.js":[605,241],"./hr/_lib/formatRelative/index.js":[606,444],"./hr/_lib/localize/index.js":[607,325],"./hr/_lib/match/index.js":[608,151],"./hr/index.js":[903,61],"./ht/_lib/formatDistance/index.js":[609,445],"./ht/_lib/formatLong/index.js":[610,242],"./ht/_lib/formatRelative/index.js":[611,446],"./ht/_lib/localize/index.js":[612,326],"./ht/_lib/match/index.js":[613,152],"./ht/index.js":[904,62],"./hu/_lib/formatDistance/index.js":[614,447],"./hu/_lib/formatLong/index.js":[615,243],"./hu/_lib/formatRelative/index.js":[616,448],"./hu/_lib/localize/index.js":[617,327],"./hu/_lib/match/index.js":[618,153],"./hu/index.js":[905,63],"./hy/_lib/formatDistance/index.js":[619,449],"./hy/_lib/formatLong/index.js":[620,244],"./hy/_lib/formatRelative/index.js":[621,450],"./hy/_lib/localize/index.js":[622,328],"./hy/_lib/match/index.js":[623,154],"./hy/index.js":[906,64],"./id/_lib/formatDistance/index.js":[624,451],"./id/_lib/formatLong/index.js":[625,245],"./id/_lib/formatRelative/index.js":[626,452],"./id/_lib/localize/index.js":[627,329],"./id/_lib/match/index.js":[628,155],"./id/index.js":[907,65],"./is/_lib/formatDistance/index.js":[629,453],"./is/_lib/formatLong/index.js":[630,246],"./is/_lib/formatRelative/index.js":[631,454],"./is/_lib/localize/index.js":[632,330],"./is/_lib/match/index.js":[633,156],"./is/index.js":[908,66],"./it-CH/_lib/formatLong/index.js":[635,247],"./it-CH/index.js":[910,9],"./it/_lib/formatDistance/index.js":[438,455],"./it/_lib/formatLong/index.js":[634,248],"./it/_lib/formatRelative/index.js":[439,103],"./it/_lib/localize/index.js":[440,331],"./it/_lib/match/index.js":[441,157],"./it/index.js":[909,10],"./ja-Hira/_lib/formatDistance/index.js":[641,456],"./ja-Hira/_lib/formatLong/index.js":[642,249],"./ja-Hira/_lib/formatRelative/index.js":[643,457],"./ja-Hira/_lib/localize/index.js":[644,332],"./ja-Hira/_lib/match/index.js":[645,158],"./ja-Hira/index.js":[912,67],"./ja/_lib/formatDistance/index.js":[636,458],"./ja/_lib/formatLong/index.js":[637,250],"./ja/_lib/formatRelative/index.js":[638,459],"./ja/_lib/localize/index.js":[639,333],"./ja/_lib/match/index.js":[640,159],"./ja/index.js":[911,68],"./ka/_lib/formatDistance/index.js":[646,460],"./ka/_lib/formatLong/index.js":[647,251],"./ka/_lib/formatRelative/index.js":[648,461],"./ka/_lib/localize/index.js":[649,334],"./ka/_lib/match/index.js":[650,160],"./ka/index.js":[913,69],"./kk/_lib/formatDistance/index.js":[651,462],"./kk/_lib/formatLong/index.js":[652,252],"./kk/_lib/formatRelative/index.js":[653,104],"./kk/_lib/localize/index.js":[654,335],"./kk/_lib/match/index.js":[655,161],"./kk/index.js":[914,11],"./km/_lib/formatDistance/index.js":[656,463],"./km/_lib/formatLong/index.js":[657,253],"./km/_lib/formatRelative/index.js":[658,464],"./km/_lib/localize/index.js":[659,336],"./km/_lib/match/index.js":[660,162],"./km/index.js":[915,70],"./kn/_lib/formatDistance/index.js":[661,465],"./kn/_lib/formatLong/index.js":[662,254],"./kn/_lib/formatRelative/index.js":[663,466],"./kn/_lib/localize/index.js":[664,337],"./kn/_lib/match/index.js":[665,163],"./kn/index.js":[916,71],"./ko/_lib/formatDistance/index.js":[666,467],"./ko/_lib/formatLong/index.js":[667,255],"./ko/_lib/formatRelative/index.js":[668,468],"./ko/_lib/localize/index.js":[669,338],"./ko/_lib/match/index.js":[670,164],"./ko/index.js":[917,72],"./lb/_lib/formatDistance/index.js":[671,469],"./lb/_lib/formatLong/index.js":[672,256],"./lb/_lib/formatRelative/index.js":[673,470],"./lb/_lib/localize/index.js":[674,339],"./lb/_lib/match/index.js":[675,165],"./lb/index.js":[918,73],"./lt/_lib/formatDistance/index.js":[676,471],"./lt/_lib/formatLong/index.js":[677,257],"./lt/_lib/formatRelative/index.js":[678,472],"./lt/_lib/localize/index.js":[679,340],"./lt/_lib/match/index.js":[680,166],"./lt/index.js":[919,74],"./lv/_lib/formatDistance/index.js":[681,473],"./lv/_lib/formatLong/index.js":[682,258],"./lv/_lib/formatRelative/index.js":[683,105],"./lv/_lib/localize/index.js":[684,341],"./lv/_lib/match/index.js":[685,167],"./lv/index.js":[920,12],"./mk/_lib/formatDistance/index.js":[686,474],"./mk/_lib/formatLong/index.js":[687,259],"./mk/_lib/formatRelative/index.js":[688,106],"./mk/_lib/localize/index.js":[689,342],"./mk/_lib/match/index.js":[690,168],"./mk/index.js":[921,13],"./mn/_lib/formatDistance/index.js":[691,475],"./mn/_lib/formatLong/index.js":[692,260],"./mn/_lib/formatRelative/index.js":[693,476],"./mn/_lib/localize/index.js":[694,343],"./mn/_lib/match/index.js":[695,169],"./mn/index.js":[922,75],"./ms/_lib/formatDistance/index.js":[696,477],"./ms/_lib/formatLong/index.js":[697,261],"./ms/_lib/formatRelative/index.js":[698,478],"./ms/_lib/localize/index.js":[699,344],"./ms/_lib/match/index.js":[700,170],"./ms/index.js":[923,76],"./mt/_lib/formatDistance/index.js":[701,479],"./mt/_lib/formatLong/index.js":[702,262],"./mt/_lib/formatRelative/index.js":[703,480],"./mt/_lib/localize/index.js":[704,345],"./mt/_lib/match/index.js":[705,171],"./mt/index.js":[924,77],"./nb/_lib/formatDistance/index.js":[706,481],"./nb/_lib/formatLong/index.js":[707,263],"./nb/_lib/formatRelative/index.js":[708,482],"./nb/_lib/localize/index.js":[709,346],"./nb/_lib/match/index.js":[710,172],"./nb/index.js":[925,78],"./nl-BE/_lib/formatDistance/index.js":[716,483],"./nl-BE/_lib/formatLong/index.js":[717,264],"./nl-BE/_lib/formatRelative/index.js":[718,484],"./nl-BE/_lib/localize/index.js":[719,347],"./nl-BE/_lib/match/index.js":[720,173],"./nl-BE/index.js":[927,79],"./nl/_lib/formatDistance/index.js":[711,485],"./nl/_lib/formatLong/index.js":[712,265],"./nl/_lib/formatRelative/index.js":[713,486],"./nl/_lib/localize/index.js":[714,348],"./nl/_lib/match/index.js":[715,174],"./nl/index.js":[926,80],"./nn/_lib/formatDistance/index.js":[721,487],"./nn/_lib/formatLong/index.js":[722,266],"./nn/_lib/formatRelative/index.js":[723,488],"./nn/_lib/localize/index.js":[724,349],"./nn/_lib/match/index.js":[725,175],"./nn/index.js":[928,81],"./oc/_lib/formatDistance/index.js":[726,489],"./oc/_lib/formatLong/index.js":[727,267],"./oc/_lib/formatRelative/index.js":[728,490],"./oc/_lib/localize/index.js":[729,350],"./oc/_lib/match/index.js":[730,176],"./oc/index.js":[929,82],"./pl/_lib/formatDistance/index.js":[731,491],"./pl/_lib/formatLong/index.js":[732,268],"./pl/_lib/formatRelative/index.js":[733,107],"./pl/_lib/localize/index.js":[734,351],"./pl/_lib/match/index.js":[735,177],"./pl/index.js":[930,14],"./pt-BR/_lib/formatDistance/index.js":[741,492],"./pt-BR/_lib/formatLong/index.js":[742,269],"./pt-BR/_lib/formatRelative/index.js":[743,493],"./pt-BR/_lib/localize/index.js":[744,352],"./pt-BR/_lib/match/index.js":[745,178],"./pt-BR/index.js":[932,83],"./pt/_lib/formatDistance/index.js":[736,494],"./pt/_lib/formatLong/index.js":[737,270],"./pt/_lib/formatRelative/index.js":[738,495],"./pt/_lib/localize/index.js":[739,353],"./pt/_lib/match/index.js":[740,179],"./pt/index.js":[931,84],"./ro/_lib/formatDistance/index.js":[746,496],"./ro/_lib/formatLong/index.js":[747,271],"./ro/_lib/formatRelative/index.js":[748,497],"./ro/_lib/localize/index.js":[749,354],"./ro/_lib/match/index.js":[750,180],"./ro/index.js":[933,85],"./ru/_lib/formatDistance/index.js":[751,498],"./ru/_lib/formatLong/index.js":[752,272],"./ru/_lib/formatRelative/index.js":[753,108],"./ru/_lib/localize/index.js":[754,355],"./ru/_lib/match/index.js":[755,181],"./ru/index.js":[934,15],"./sk/_lib/formatDistance/index.js":[756,499],"./sk/_lib/formatLong/index.js":[757,273],"./sk/_lib/formatRelative/index.js":[758,109],"./sk/_lib/localize/index.js":[759,356],"./sk/_lib/match/index.js":[760,182],"./sk/index.js":[935,16],"./sl/_lib/formatDistance/index.js":[761,500],"./sl/_lib/formatLong/index.js":[762,274],"./sl/_lib/formatRelative/index.js":[763,501],"./sl/_lib/localize/index.js":[764,357],"./sl/_lib/match/index.js":[765,183],"./sl/index.js":[936,86],"./sq/_lib/formatDistance/index.js":[766,502],"./sq/_lib/formatLong/index.js":[767,275],"./sq/_lib/formatRelative/index.js":[768,503],"./sq/_lib/localize/index.js":[769,358],"./sq/_lib/match/index.js":[770,184],"./sq/index.js":[937,87],"./sr-Latn/_lib/formatDistance/index.js":[776,504],"./sr-Latn/_lib/formatLong/index.js":[777,276],"./sr-Latn/_lib/formatRelative/index.js":[778,505],"./sr-Latn/_lib/localize/index.js":[779,359],"./sr-Latn/_lib/match/index.js":[780,185],"./sr-Latn/index.js":[939,88],"./sr/_lib/formatDistance/index.js":[771,506],"./sr/_lib/formatLong/index.js":[772,277],"./sr/_lib/formatRelative/index.js":[773,507],"./sr/_lib/localize/index.js":[774,360],"./sr/_lib/match/index.js":[775,186],"./sr/index.js":[938,89],"./sv/_lib/formatDistance/index.js":[781,508],"./sv/_lib/formatLong/index.js":[782,278],"./sv/_lib/formatRelative/index.js":[783,509],"./sv/_lib/localize/index.js":[784,361],"./sv/_lib/match/index.js":[785,187],"./sv/index.js":[940,90],"./ta/_lib/formatDistance/index.js":[786,510],"./ta/_lib/formatLong/index.js":[787,279],"./ta/_lib/formatRelative/index.js":[788,511],"./ta/_lib/localize/index.js":[789,362],"./ta/_lib/match/index.js":[790,188],"./ta/index.js":[941,91],"./te/_lib/formatDistance/index.js":[791,512],"./te/_lib/formatLong/index.js":[792,280],"./te/_lib/formatRelative/index.js":[793,513],"./te/_lib/localize/index.js":[794,363],"./te/_lib/match/index.js":[795,189],"./te/index.js":[942,92],"./th/_lib/formatDistance/index.js":[796,514],"./th/_lib/formatLong/index.js":[797,281],"./th/_lib/formatRelative/index.js":[798,515],"./th/_lib/localize/index.js":[799,364],"./th/_lib/match/index.js":[800,190],"./th/index.js":[943,93],"./tr/_lib/formatDistance/index.js":[801,516],"./tr/_lib/formatLong/index.js":[802,282],"./tr/_lib/formatRelative/index.js":[803,517],"./tr/_lib/localize/index.js":[804,365],"./tr/_lib/match/index.js":[805,191],"./tr/index.js":[944,94],"./ug/_lib/formatDistance/index.js":[806,518],"./ug/_lib/formatLong/index.js":[807,283],"./ug/_lib/formatRelative/index.js":[808,519],"./ug/_lib/localize/index.js":[809,366],"./ug/_lib/match/index.js":[810,192],"./ug/index.js":[945,95],"./uk/_lib/formatDistance/index.js":[811,520],"./uk/_lib/formatLong/index.js":[812,284],"./uk/_lib/formatRelative/index.js":[813,0,521],"./uk/_lib/localize/index.js":[814,367],"./uk/_lib/match/index.js":[815,193],"./uk/index.js":[946,0,114],"./uz-Cyrl/_lib/formatDistance/index.js":[821,522],"./uz-Cyrl/_lib/formatLong/index.js":[822,285],"./uz-Cyrl/_lib/formatRelative/index.js":[823,523],"./uz-Cyrl/_lib/localize/index.js":[824,368],"./uz-Cyrl/_lib/match/index.js":[825,194],"./uz-Cyrl/index.js":[948,96],"./uz/_lib/formatDistance/index.js":[816,524],"./uz/_lib/formatLong/index.js":[817,286],"./uz/_lib/formatRelative/index.js":[818,525],"./uz/_lib/localize/index.js":[819,369],"./uz/_lib/match/index.js":[820,195],"./uz/index.js":[947,97],"./vi/_lib/formatDistance/index.js":[826,526],"./vi/_lib/formatLong/index.js":[827,287],"./vi/_lib/formatRelative/index.js":[828,527],"./vi/_lib/localize/index.js":[829,370],"./vi/_lib/match/index.js":[830,196],"./vi/index.js":[949,98],"./zh-CN/_lib/formatDistance/index.js":[831,528],"./zh-CN/_lib/formatLong/index.js":[832,288],"./zh-CN/_lib/formatRelative/index.js":[833,110],"./zh-CN/_lib/localize/index.js":[834,371],"./zh-CN/_lib/match/index.js":[835,197],"./zh-CN/index.js":[950,17],"./zh-HK/_lib/formatDistance/index.js":[836,529],"./zh-HK/_lib/formatLong/index.js":[837,289],"./zh-HK/_lib/formatRelative/index.js":[838,530],"./zh-HK/_lib/localize/index.js":[839,372],"./zh-HK/_lib/match/index.js":[840,198],"./zh-HK/index.js":[951,99],"./zh-TW/_lib/formatDistance/index.js":[841,531],"./zh-TW/_lib/formatLong/index.js":[842,290],"./zh-TW/_lib/formatRelative/index.js":[843,532],"./zh-TW/_lib/localize/index.js":[844,373],"./zh-TW/_lib/match/index.js":[845,199],"./zh-TW/index.js":[952,100]};function o(e){if(!t.o(n,e))return Promise.resolve().then((function(){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}));var a=n[e],o=a[0];return Promise.all(a.slice(1).map(t.e)).then((function(){return t.t(o,7)}))}o.keys=function(){return Object.keys(n)},o.id=233,e.exports=o},234:function(e,a,t){"use strict";var n=t(3),o=t(21),r=t.n(o),i=t(46),s=t(47),l=Object(s.a)(),c=function(e){return{Accept:"application/json",Authorization:"Bearer ".concat(e)}},d={login:function(e){return r.a.post("".concat(l,"/integrations/20/auth"),e,{headers:{Accept:"application/json"}})},resetSession:function(e){return r.a.post("".concat(l,"/integrations/20/sessions"),void 0,{headers:c(e)})},getAllDevices:function(e){return r.a.post("".concat(l,"/integrations/20/devices/query"),Object(n.a)(Object(n.a)({},e),{},{returnUser:!1,returnDevice:!0,returnDeviceStatus:!1,returnVin:!1,returnAddress:!1,returnZone:!1,returnOdometer:!1,returnEngineHours:!1,returnFuelLevel:!1}))},getVehicleLocationFromMygeotab:function(e){var a=e.userInfo,t=e.vehicleId,n=e.fromDate,o=e.toDate,l=Object(i.h)(),c=l.fromDate,d=l.toDate,u=n?new Date(n):c,m=o?new Date(o):d;return r.a.post(s.b,{method:"Get",params:{typeName:"LogRecord",search:{deviceSearch:{id:t},fromDate:u,toDate:m},sort:{sortby:"datetime",sortdirection:"asc"},credentials:a.credentials}})},getStopLocationFromMygeotab:function(e){var a=e.userInfo,t=e.vehicleId,n=e.fromDate,o=e.toDate,l=Object(i.h)(),c=l.fromDate,d=l.toDate,u=n?new Date(n):c,m=o?new Date(o):d;return r.a.post(s.b,{method:"Get",params:{typeName:"Trip",search:{deviceSearch:{id:t},fromDate:u,toDate:m,includeoverlappedtrips:!0},sort:{sortby:"datetime",sortdirection:"asc"},credentials:a.credentials}})},getAdditionalLocationFromMygeotab:function(e){var a=e.userInfo,t=e.vehicleId,n=e.fromDate,o=e.fromVersion,l=Object(i.h)().fromDate,c=n?new Date(n):l;return r.a.post(s.b,{method:"GetFeed",params:{typeName:"LogRecord",search:{deviceSearch:{id:t},fromDate:o?void 0:c},fromVersion:null!==o&&void 0!==o?o:void 0,credentials:a.credentials}})},getCurrentVehicleFromMygeotab:function(e){var a=e.userInfo,t=e.vehicleId;return r.a.post(s.b,{method:"Get",params:{typeName:"DeviceStatusInfo",search:{deviceSearch:{id:t},fromDate:(new Date).toISOString()},credentials:a.credentials}})},getCurrentUserFromMygeotab:function(e){var a=e.userInfo,t=(e.vehicleId,a.credentials);return r.a.post(s.b,{method:"Get",params:{typeName:"User",search:{deviceSearch:{name:null===t||void 0===t?void 0:t.userName},fromDate:(new Date).toISOString()},credentials:t}})}};a.a=d},243:function(e,a,t){"use strict";var n=t(3),o=t(24),r=t(19),i=t(26),s=t(4),l=t(218),c=t(219),d=t(400),u=t(402),m=t(310),p=t(311),h=t(78),f=t(407),b=t(195),g=t(405),v=t(194),j=t(25),O=t.n(j),y=t(0),S=t(196),E=t(30),x=t(46),T=t(130),C=t(199),D=t(32),R=t(121),k=t(58),w=t(1),A=Object(v.a)((function(){return{root:{"label + &":{marginTop:"16px"},"& .MuiOutlinedInput-input":{cursor:"pointer"},"& .MuiOutlinedInput-notchedOutline":{"& legend":{display:"none"}}},devicesDisplayRoot:{"label + &":{marginTop:"16px"},"& .MuiOutlinedInput-input":{cursor:"pointer"}}}})),_={projectKey:null,formKey:null};a.a=function(e){var a,t=e.tab,v=e.source,j=Object(S.a)("common"),I=Object(s.a)(j,1)[0],L=Object(E.d)((function(e){return e.environment})),M=null===L||void 0===L||null===(a=L.userCurrent)||void 0===a?void 0:a.rights,P=A(),F=Object(y.useState)(null),N=Object(s.a)(F,2),V=N[0],z=N[1],H=Boolean(V),U=Object(y.useState)([]),G=Object(s.a)(U,2),W=G[0],B=G[1],q=Object(y.useState)(!1),K=Object(s.a)(q,2),Y=K[0],J=K[1],Q=Object(y.useState)(null),Z=Object(s.a)(Q,2),X=Z[0],$=Z[1],ee=Object(y.useState)(_),ae=Object(s.a)(ee,2),te=ae[0],ne=ae[1],oe=Object(y.useState)(_),re=Object(s.a)(oe,2),ie=(re[0],re[1]),se=Object(y.useState)(_),le=Object(s.a)(se,2),ce=(le[0],le[1]),de=Object(E.c)(),ue=Object(y.useRef)(!0);Object(y.useEffect)((function(){return ue.current=!0,function(){return ue.current=!1}}),[]),Object(y.useEffect)((function(){t&&(L.isProjectFormsLoaded||me())}),[t]);var me=function(){J(!0),de({type:D.a.IS_LOADING_PROJECTS,payload:!0}),he().then((function(e){var a=O.a.sortBy(e.data,"name");pe(a)})).catch((function(e){$("Code "+e.response.data.code+": "+e.response.data.message)})).finally((function(){de({type:D.a.IS_PROJECT_FORMS_LOADED,payload:!0})}))},pe=function(e){fe(e).then((function(e){var a=O.a.sortBy(e,"name");de({type:D.a.SET_NEW_PROJECTS,payload:a})})).catch((function(e){$("Code "+e.response.data.code+": "+e.response.data.message)})).finally((function(){ue.current&&J(!1),de({type:D.a.IS_LOADING_PROJECTS,payload:!1})}))},he=function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(C.g)(L.apiToken);case 2:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=Object(i.a)(Object(r.a)().mark((function e(a){var t,n,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=[],n=function(e){var n=Object(C.o)(a[e].key,L.apiToken).then((function(t){var n={key:a[e].key,name:a[e].name,forms:[]};return null!==t&&void 0!==t&&t.data&&O.a.isArray(t.data)&&t.data.length&&(n.forms=O.a.sortBy(t.data,"name"),de({type:D.a.GET_FORMS,payload:n.forms})),n}));t.push(n)},o=0;o0&&void 0!==arguments[0]?arguments[0]:c,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case l.INITIALIZED_ENVIRONMENT:return Object(o.a)(Object(o.a)({},e),{},{isInitialized:!0});case l.CORE_DATA_LOAD:var t=a.payload;if(null!=t.environment)return Object(o.a)({},t.environment);var r,i,d,u,m,p=(null===t||void 0===t?void 0:t.account)||{},h=(null===t||void 0===t?void 0:t.theme)||{},f=(null===t||void 0===t?void 0:t.userCurrent)||{},b=(null===t||void 0===t?void 0:t.devices)||{},g=(null===t||void 0===t?void 0:t.owners)||[],v=(null===t||void 0===t?void 0:t.translations)||{},j=(null===t||void 0===t?void 0:t.links)||[],O=(null===t||void 0===t?void 0:t.settings)||{};return Object(o.a)(Object(o.a)({},e),{},{account:p,theme:h,userCurrent:f,dispatchForm:null!==f&&void 0!==f&&f.projectForm?f.projectForm:{},devices:b,owners:g,translations:v,links:j,settings:O,iconsTheme:[{color:null!==h&&void 0!==h&&null!==(r=h.icons)&&void 0!==r&&r.color?null===h||void 0===h||null===(i=h.icons)||void 0===i?void 0:i.color:"black"},{"&:hover":{color:null!==h&&void 0!==h&&null!==(d=h.icons)&&void 0!==d&&d.active?null===h||void 0===h||null===(u=h.icons)||void 0===u||null===(m=u.active)||void 0===m?void 0:m.color:"black",backgroundColor:"transparent"}}],isLoaded:!0});case l.LINKS:return Object(o.a)(Object(o.a)({},e),{},{links:a.payload});case l.GET_ACCOUNT:return Object(o.a)(Object(o.a)({},e),{},{account:a.payload});case l.GET_THEME:return Object(o.a)(Object(o.a)({},e),{},{theme:a.payload});case l.GET_TEAMS:return Object(o.a)(Object(o.a)({},e),{},{teams:a.payload});case l.GET_DEVICES:return Object(o.a)(Object(o.a)({},e),{},{devices:s.a.union(e.devices,a.payload)});case l.GET_PROJECTS:return Object(o.a)(Object(o.a)({},e),{},{projects:a.payload});case l.GET_LOOKUPS:return Object(o.a)(Object(o.a)({},e),{},{lookups:a.payload});case l.GET_FORMS:return Object(o.a)(Object(o.a)({},e),{},{forms:s.a.union(e.forms,a.payload)});case l.GET_VIEWS:return Object(o.a)(Object(o.a)({},e),{},{views:s.a.union(e.views,a.payload)});case l.ADD_NEW_VIEW:var y=a.payload,S=e.owners.reduce((function(e,a){var t=a.key,o=a.name,r=a.views;return t===y.ownerKey&&e.push({key:t,name:o,views:[].concat(Object(n.a)(r),[y])}),e}),[]);return Object(o.a)(Object(o.a)({},e),{},{owners:S,views:s.a.union(e.views,y)});case l.GET_PROJECT_FORMS:return Object(o.a)(Object(o.a)({},e),{},{projectForms:s.a.union(e.projectForms,a.payload)});case l.GET_LOOKUPS_FORMS:return Object(o.a)(Object(o.a)({},e),{},{lookupsForms:[].concat(Object(n.a)(e.lookupsForms),[a.payload])});case l.GET_USER:var E=a.payload.user;return Object(o.a)(Object(o.a)({},e),{},{user:E,apiToken:E.token,isAuthenticated:!0,isLoggedIn:!0});case l.GET_USER_CURRENT:var x=a.payload;return Object(o.a)(Object(o.a)({},e),{},{userCurrent:x,deviceAuditForm:x.projectForm?x.projectForm:{},dispatchForm:x.projectForm?x.projectForm:{}});case l.UPDATE_DEFAULT_FORM:var T=a.payload;return Object(o.a)(Object(o.a)({},e),{},{userCurrent:T});case l.GET_OWNERS:return Object(o.a)(Object(o.a)({},e),{},{owners:a.payload});case l.GET_REPORTS:return Object(o.a)(Object(o.a)({},e),{},{reports:a.payload});case l.HAS_NEW_VIEW:return Object(o.a)(Object(o.a)({},e),{},{hasNewView:a.payload});case l.REMOVE_FROM_VIEW:var C=a.payload,D=e.views.filter((function(e){return e.key!==C.key}));return Object(o.a)(Object(o.a)({},e),{},{views:D});case l.GET_TRANSLATIONS:return Object(o.a)(Object(o.a)({},e),{},{translations:a.payload});case l.DISPATCH_FORM:return Object(o.a)(Object(o.a)({},e),{},{dispatchForm:a.payload});case l.DEVICE_AUDIT_FORM:return Object(o.a)(Object(o.a)({},e),{},{deviceAuditForm:a.payload});case l.MAIN_CONTENTS:if(!e.mainContents.length)return;var R={tab:a.payload.tab,content:a.payload.content},k=e.mainContents.findIndex((function(e){return e.tab===a.payload.tab}));if(k>-1){var w=e.mainContents;return w[k]=R,Object(o.a)(Object(o.a)({},e),{},{mainContents:w})}return Object(o.a)(Object(o.a)({},e),{},{mainContents:[].concat(Object(n.a)(e.mainContents),[R])});case l.SET_NEW_PROJECTS:var A=a.payload,_=A.filter((function(e){return"lookups"!==e.name.toLowerCase()})),I=A.filter((function(e){return"lookups"===e.name.toLowerCase()}));return Object(o.a)(Object(o.a)({},e),{},{projects:_,lookups:I});case l.REFRESH:return Object(o.a)(Object(o.a)({},e),{},{refresh:a.payload});case l.AUTO_REFRESH_UPDATE:return Object(o.a)(Object(o.a)({},e),{},{userCurrent:Object(o.a)(Object(o.a)({},e.userCurrent),{},{autoRefresh:a.payload})});case l.FORMS_TAB_LOADED:return Object(o.a)(Object(o.a)({},e),{},{formsTabLoaded:a.payload});case l.IS_LOADED:return Object(o.a)(Object(o.a)({},e),{},{isLoaded:a.payload});case l.IS_PROJECT_FORMS_LOADED:return Object(o.a)(Object(o.a)({},e),{},{isProjectFormsLoaded:a.payload});case l.IS_LOADING_PROJECTS:return Object(o.a)(Object(o.a)({},e),{},{isLoadingProjects:a.payload});case l.CLEAR_DEVICES:return Object(o.a)(Object(o.a)({},e),{},{teams:[],devices:[]});case l.CLEAR_FORMS:return Object(o.a)(Object(o.a)({},e),{},{isProjectFormsLoaded:!1,projects:[],forms:[]});case l.CLEAR_LOOKUPS:return Object(o.a)(Object(o.a)({},e),{},{lookups:[]});case l.CLEAR_REPORTS:return Object(o.a)(Object(o.a)({},e),{},{reports:[]});case l.CLEAR_VIEWS:return Object(o.a)(Object(o.a)({},e),{},{owners:[],views:[]});case l.SIGN_OUT:return c;case l.CHART_DS:return Object(o.a)(Object(o.a)({},e),{},{chartDS:a.payload});case l.TOGGLE_FULLSCREEN_MODE:return Object(o.a)(Object(o.a)({},e),{},{fullscreenMode:a.payload,showLeftPanel:!a.payload});case l.TOGGLE_LEFT_PANEL:return Object(o.a)(Object(o.a)({},e),{},{showLeftPanel:a.payload});case l.FORM_COLUMNS_CHANGED:return Object(o.a)(Object(o.a)({},e),{},{formColumnsChanged:a.payload});case l.SHOW_CREATE_SUBMISSION:return Object(o.a)(Object(o.a)({},e),{},{showCreateSubmission:a.payload});case l.SHOW_SEND_DISPATCH:return Object(o.a)(Object(o.a)({},e),{},{showSendDispatch:a.payload,showSendDispatchRefresh:!e.showSendDispatchRefresh});default:return e}}},381:function(e,a,t){"use strict";t.r(a);var n,o,r=t(1016),i=t(215),s=t(42),l=t.n(s),c=t(1015),d=t(166),u=t(32),m=t(122),p=t(124),h=t(89),f=t(123),b=t(127),g=t(228),v=Object(d.a)({environment:u.b,devicesModule:f.b,formsModule:m.b,lookupsModule:p.b,viewsModule:h.b,reportsModule:b.b,activityModule:g.b}),j=t(266),O=t(267),y=t(268),S=t(269),E=t(270),x=t(271),T=t(272),C=t(273),D=t(274),R=t(275),k=t(276),w=t(277),A=t(30),_=t(860),I=t(246),L=t(4),M=t(0),P=t.n(M),F=t(194),N=t(19),V=t(26),z=t(3),H=t(1020),U=t(235),G=t(301),W=t(196),B=t(281),q=t(72),K=t(35),Y=t(137),J=t(58),Q=t(1),Z=Object(M.lazy)((function(){return t.e(19).then(t.bind(null,2132))})),X=Object(M.lazy)((function(){return t.e(18).then(t.bind(null,2133))})),$=Object(M.lazy)((function(){return Promise.all([t.e(1),t.e(3),t.e(2),t.e(4),t.e(101)]).then(t.bind(null,1188))})),ee=Object(M.lazy)((function(){return Promise.all([t.e(1),t.e(2),t.e(20)]).then(t.bind(null,2123))})),ae=function(){return Object(Q.jsx)(M.Suspense,{fallback:Object(Q.jsx)(J.a,{}),children:Object(Q.jsxs)(K.d,{children:[Object(Q.jsx)(K.b,{exact:!0,path:"/dis",render:function(){return Object(Q.jsx)(Y.c,{})}}),Object(Q.jsx)(K.b,{exact:!0,path:"/dis/menu-manager",render:function(){return Object(Q.jsx)(Y.c,{children:Object(Q.jsx)(Z,{})})}}),Object(Q.jsx)(K.b,{exact:!0,path:"/dis/menu-manager/:id",render:function(){return Object(Q.jsx)(Y.c,{children:Object(Q.jsx)(X,{})})}}),Object(Q.jsx)(K.b,{exact:!0,path:"/dis/:id",render:function(){return Object(Q.jsx)(Y.c,{children:Object(Q.jsx)($,{})})}}),Object(Q.jsx)(K.b,{exact:!0,path:"/dis/default/:id",render:function(){return Object(Q.jsx)(Y.c,{children:Object(Q.jsx)(ee,{})})}}),Object(Q.jsx)(K.b,{path:"*",children:Object(Q.jsx)(K.a,{to:"/dis"})})]})})},te=t(116),ne=t(121),oe=t(90),re=t(1026),ie=t(997),se=t(25),le=t.n(se),ce=Object(F.a)((function(){return{root:{display:"flex",alignItems:"stretch",height:"100vh"},topBar:{transform:"none"},main:{display:"flex",alignItems:"stretch",flex:"1 1 auto"},leftPanel:{display:"flex",height:"auto"},rightPanel:{display:"flex",height:"auto",flex:"1 1 auto"}}})),de=function(){var e=ce(),a=Object(se.toNumber)(localStorage.getItem("left_panel_width"))||400;return Object(Q.jsxs)(ie.a,{className:e.root,children:[Object(Q.jsx)(re.a,{className:e.topBar,animation:"wave",variant:"text",height:24}),Object(Q.jsx)("div",{style:{display:"flex",marginTop:10},children:Object(Q.jsx)(re.a,{animation:"wave",variant:"circular",width:100,height:100,sx:{ml:2}})}),Object(Q.jsx)(re.a,{animation:"wave",variant:"text",height:50}),Object(Q.jsxs)("div",{className:e.main,children:[Object(Q.jsx)(re.a,{className:e.leftPanel,animation:"wave",variant:"rectangular",width:a}),Object(Q.jsx)(re.a,{className:e.rightPanel,animation:"wave",variant:"rectangular",sx:{ml:1}})]})]})},ue=t(130),me=t(181),pe=(t(200),new H.a({defaultOptions:{queries:{refetchOnWindowFocus:!1}}})),he=function(e){var a=e.isAuthenticated,t=e.apiToken,n=e.timeoutMinutes,o=e.lockEnabled,r=Object(W.a)("common"),i=Object(L.a)(r,1)[0],s=Object(M.useState)({account:null,theme:null,userCurrent:null,translations:[],isSignedIn:!1,error:null,loading:!0,loaded:!1}),l=Object(L.a)(s,2),c=l[0],d=l[1],g=c.error,v=c.loading,j=c.loaded,O=Object(M.useState)(!1),y=Object(L.a)(O,2),S=y[0],E=y[1],x=Object(A.c)(),T=function(){d(Object(z.a)(Object(z.a)({},c),{},{error:null}))},C=Object(B.a)({timeout:o&&n?6e4*n:144e5,onIdle:function(e){console.log("user is idle",e),console.log("last active",C()),E(!0)},debounce:500}).getLastActiveTime,D=function(){var e=Object(V.a)(Object(N.a)().mark((function e(){var a,n,o,r,s,l;return Object(N.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(a=localStorage.getItem("newFullScreenData_env"))){e.next=10;break}return n=JSON.parse(a),o=n.environment,r={account:o.account,theme:o.theme,userCurrent:o.userCurrent,translations:o.translations,devices:o.devices,owners:o.owners,links:o.links,settings:o.settings,isProjectFormsLoaded:o.isProjectFormsLoaded,environment:o},x({type:u.a.CORE_DATA_LOAD,payload:r}),d(Object(z.a)(Object(z.a)({},c),{},{account:r.account||[],theme:r.theme||{},userCurrent:r.userCurrent||{},translations:r.translations||[],isSignedIn:!0,loaded:!0,loading:!1})),x({type:u.a.GET_TEAMS,payload:o.teams}),localStorage.removeItem("newFullScreenData_env"),e.abrupt("return");case 10:return d(Object(z.a)(Object(z.a)({},c),{},{loaded:!1,loading:!0})),e.prev=11,e.next=14,Object(ue.a)(t,i);case 14:if(401!==(null===(l=e.sent)||void 0===l||null===(s=l.userCurrent)||void 0===s?void 0:s.code)){e.next=18;break}return Object(te.b)((function(){x({type:u.a.SIGN_OUT}),x({type:f.a.RESET}),x({type:m.a.RESET}),x({type:p.a.RESET}),x({type:h.a.RESET}),x({type:b.a.RESET})})),e.abrupt("return");case 18:x({type:u.a.CORE_DATA_LOAD,payload:l}),d(Object(z.a)(Object(z.a)({},c),{},{account:(null===l||void 0===l?void 0:l.account)||[],theme:(null===l||void 0===l?void 0:l.theme)||{},userCurrent:(null===l||void 0===l?void 0:l.userCurrent)||{},translations:(null===l||void 0===l?void 0:l.translations)||[],isSignedIn:!0,loaded:!0,loading:!1})),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(11),d(Object(z.a)(Object(z.a)({},c),{},{error:e.t0,loading:!1}));case 25:case"end":return e.stop()}}),e,null,[[11,22]])})));return function(){return e.apply(this,arguments)}}();return Object(M.useEffect)((function(){a&&D()}),[a]),Object(Q.jsxs)(Q.Fragment,{children:[v&&Object(Q.jsxs)(Q.Fragment,{children:[Object(Q.jsx)(J.a,{}),Object(Q.jsx)(de,{})]}),g&&Object(Q.jsx)(ne.a,{message:g,severity:"error",onMessageClosed:T}),j&&Object(Q.jsxs)(U.a,{client:pe,children:[Object(Q.jsx)(oe.b,{values:c,children:Object(Q.jsx)(q.a,{children:Object(Q.jsx)(ae,{})})}),Object(Q.jsx)(G.a,{initialIsOpen:!1})]}),S&&Object(Q.jsx)(me.a,{open:S,theme:c.theme,translations:c.translations,source:"timeout",onClose:function(){return E(!1)}})]})},fe=t(135),be=t(5),ge=t(1037),ve=t(303),je=t(1011),Oe=t(393),ye=t(1004),Se=t(1012),Ee=t(1034),xe=t(1041),Te=t(398),Ce=t(108),De=t(403),Re=t(1029),ke=t(1042),we=t(397),Ae=t(406),_e=t(78),Ie=t(1013),Le=t(1030),Me=t(195),Pe=t(1025),Fe=t(408),Ne=t(1038),Ve=t(1023),ze=t(1028),He=t.p+"static/media/powered_by_doforms.22e0f283.png",Ue=Object(F.a)((function(){return{root:{"& .MuiButton-root":{textTransform:"none !important"}}}})),Ge=function(e){var a=Ue(),t=Object(W.a)("common"),n=Object(L.a)(t,1)[0],o=Object(M.useState)(null),r=Object(L.a)(o,2),i=r[0],s=r[1],l=e.open,c=e.loading,d=e.onClose,u=e.onConfirmed,m=function(){d()};return Object(Q.jsxs)(ye.a,{open:l,onClose:m,className:a.root,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Q.jsxs)(Ee.a,{children:[Object(Q.jsx)(xe.a,{id:"alert-dialog-description",children:n("common:signIn.forgotPasswordMessage")}),Object(Q.jsx)(Me.a,{value:i,onChange:function(e){s(e.target.value)},margin:"normal",required:!0,fullWidth:!0,name:"username",label:n("common:signIn.username"),type:"username",id:"username"})]}),Object(Q.jsxs)(De.a,{children:[Object(Q.jsx)(ge.a,{onClick:function(e){e.preventDefault(),e.target.username=i,u(e)},loading:c,disabled:!i,autoFocus:!0,children:n("common:signIn.reset")}),Object(Q.jsx)(Ce.a,{onClick:m,children:n("common:signIn.cancel")})]})]})},We=Object(F.a)((function(){return{root:{"& .MuiButton-root":{textTransform:"none !important"}},buttonsGroup:{marginTop:"8px"},logo:{width:"8em"},signInButton:{"&:hover":{backgroundColor:"#F86900",color:"#fff"}},selectPortalButton:{textTransform:"none"},cancelButton:{textTransform:"none"}}})),Be=Object(ve.a)(),qe=P.a.forwardRef((function(e,a){return Object(Q.jsx)(je.a,Object(z.a)({direction:"up",ref:a},e))})),Ke=function(){var e=We(),a=Object(W.a)("common"),t=Object(L.a)(a,1)[0],n=Object(A.c)(),o=Object(A.d)((function(e){return e})).environment,r="false"!==localStorage.getItem("sign_in_specify_account"),i={user:null,username:"",password:"",account:null,code:null,isAuthenticated:!1},s=Object(M.useState)(i),l=Object(L.a)(s,2),c=l[0],d=l[1],m=Object(M.useState)(!1),p=Object(L.a)(m,2),h=p[0],f=p[1],b=Object(M.useState)(null),g=Object(L.a)(b,2),v=g[0],j=g[1],O=Object(M.useState)(null),y=Object(L.a)(O,2),S=y[0],E=y[1],x=Object(M.useState)([]),T=Object(L.a)(x,2),C=T[0],D=T[1],R=Object(M.useState)([]),k=Object(L.a)(R,2),w=k[0],_=k[1],I=Object(M.useState)(r),P=Object(L.a)(I,2),F=P[0],N=P[1],V=Object(M.useState)(!1),H=Object(L.a)(V,2),U=H[0],G=H[1],B=Object(M.useState)(!1),q=Object(L.a)(B,2),K=q[0],Y=q[1],J=Object(M.useState)(!1),Z=Object(L.a)(J,2),X=Z[0],$=Z[1],ee=Object(M.useState)(!1),ae=Object(L.a)(ee,2),ne=ae[0],oe=ae[1],re=Object(M.useRef)(null),ie=c.user,se=c.username,ce=c.password,de=c.account,ue=c.code,me=c.isAuthenticated,pe=se.length>0&&ce.length>0;Object(M.useEffect)((function(){me&&(Object(fe.a)(ie),n({type:u.a.GET_USER,payload:{user:ie}}))}),[ie]);var he=Object(M.useCallback)((function(){return v?Object(Q.jsx)(Oe.a,{severity:"error",onClose:function(){j(null)},children:v}):null}),[v]),ve=Object(M.useCallback)((function(){return S?Object(Q.jsx)(Oe.a,{severity:"warning",onClose:function(){E(null)},children:S}):null}),[S]),je=function(){Y(!1)},Ue=function(e){return function(a){d(Object(z.a)(Object(z.a)({},c),{},Object(be.a)({},e,a.target.value)))}},Ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;window.location.href="".concat(o.renderHost,"?token=").concat((e||C).token)},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d(Object(z.a)(Object(z.a)({},c),{},{user:e||C,isAuthenticated:!0}))},Je=function(){$(!1)},Qe=function(e,a){e.preventDefault(),"old"===a?Ke():Ye()},Ze=function(e){"Enter"===e.key&&re.current.click(),"Escape"===e.key&&Je()},Xe=function(){oe(!1)};return Object(Q.jsx)(Q.Fragment,{children:Object(Q.jsx)(Re.a,{theme:Be,children:Object(Q.jsxs)(ke.a,{component:"main",maxWidth:"xs",className:e.root,children:[ne&&Object(Q.jsx)(we.a,{open:ne,anchorOrigin:{vertical:"top",horizontal:"right"},style:{height:"20%"},onClose:Xe,children:Object(Q.jsxs)(Oe.a,{onClose:Xe,severity:"info",children:[Object(Q.jsx)(Ae.a,{children:"Info"}),"Please log in at"," ",Object(Q.jsx)(_e.a,{sx:{textDecoration:"underline",display:"inline-block","&:hover":{opacity:.9,cursor:"pointer"}},onClick:function(){Ke(),oe(!1)},children:"mydoforms.com"})]})}),Object(Q.jsx)(Ie.a,{}),Object(Q.jsxs)(Le.a,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[Object(Q.jsx)(_e.a,{component:"h1",variant:"h5",children:t("common:nav.signIn")}),Object(Q.jsxs)(Le.a,{mt:2,children:[he(),ve()]}),Object(Q.jsxs)(Le.a,{component:"form",onSubmit:function(e){e.preventDefault(),E(null),j(null),f(!0),Object(te.c)({username:null===se||void 0===se?void 0:se.trim(),password:ce,account:de,code:ue}).then((function(e){var a=e.data,t=a.loginNewPortal,n=a.loginOldPortal;D(e.data),t?Ye(e.data):!t&&n&&oe(!0)})).catch((function(e){console.log(e),300===e.response.data.code?(N(!0),_(le.a.sortBy(e.response.data.accounts)),E(t("common:signIn.includeAccount"))):968===e.response.data.code?(G(!0),E(t("common:signIn.enterCode"))):j(e.response.data.message)})).finally((function(){f(!1)}))},noValidate:!0,sx:{mt:1},children:[Object(Q.jsx)(Me.a,{value:se,onChange:Ue("username"),fullWidth:!0,margin:"normal",id:"username",label:t("common:signIn.username"),name:"username",autoComplete:"username",required:!0,autoFocus:!0}),Object(Q.jsx)(Me.a,{value:ce,onChange:Ue("password"),margin:"normal",required:!0,fullWidth:!0,name:"password",label:t("common:signIn.password"),type:"password",id:"password",autoComplete:"password"}),U&&Object(Q.jsx)(Me.a,{value:ue,onChange:Ue("code"),variant:"outlined",margin:"normal",fullWidth:!0,name:"code",label:t("common:signIn.code"),id:"code"}),F&&Object(Q.jsx)(Pe.a,{id:"account",freeSolo:!0,options:w.map((function(e){return e})),fullWidth:!0,onChange:function(e,a){d(Object(z.a)(Object(z.a)({},c),{},{account:a}))},onInputChange:function(e,a,t){d("reset"!==t&&"clear"!==t?Object(z.a)(Object(z.a)({},c),{},{account:a}):Object(z.a)(Object(z.a)({},c),{},{account:null}))},sx:{mt:2},renderInput:function(e){return Object(Q.jsx)(Me.a,Object(z.a)(Object(z.a)({},e),{},{label:t("common:signIn.account")}))}}),Object(Q.jsx)(Fe.a,{children:Object(Q.jsx)(Ne.a,{control:Object(Q.jsx)(Ve.a,{value:"specifyAccount",color:"primary",checked:F,onChange:function(){localStorage.setItem("sign_in_specify_account",!F),N(!F)}}),label:t("common:signIn.specifyAccount")})}),Object(Q.jsxs)(Te.a,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,className:e.buttonsGroup,children:[Object(Q.jsx)(Te.a,{item:!0,xs:6,children:Object(Q.jsx)(ge.a,{type:"submit",variant:"contained",loading:h,className:e.signInButton,color:"inherit",disabled:!pe,fullWidth:!0,children:t("common:nav.signIn")})}),Object(Q.jsx)(Te.a,{item:!0,xs:6,children:Object(Q.jsx)(Ce.a,{id:"clearButton",variant:"contained",color:"inherit",onClick:function(e){e.preventDefault(),d(i),_([]),N(!1),G(!1)},fullWidth:!0,children:t("common:signIn.clear")})})]}),Object(Q.jsx)(Te.a,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",sx:{mt:2},children:Object(Q.jsx)(Te.a,{item:!0,xs:12,children:Object(Q.jsx)(Ce.a,{variant:"text",onClick:function(){Y(!0)},fullWidth:!0,children:t("common:signIn.forgotPassword")})})}),Object(Q.jsx)(Te.a,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",sx:{mt:2},children:Object(Q.jsx)(Te.a,{item:!0,xs:12,children:Object(Q.jsx)("br",{})})}),Object(Q.jsx)(Te.a,{container:!0,style:{justifyContent:"space-around"},children:Object(Q.jsx)(Te.a,{item:!0,xs:6,style:{textAlign:"center"},children:Object(Q.jsx)(ze.a,{target:"_blank",href:"https://www.doforms.com",children:Object(Q.jsx)("img",{id:"doformsLogo",alt:"doformsLogo",src:He,className:e.logo})})})})]})]}),K&&Object(Q.jsx)(Ge,{open:K,loading:h,onClose:je,onConfirmed:function(e){e.preventDefault();var a=e.target.username;f(!0),d(Object(z.a)({},i)),Object(te.a)(a).then((function(){E(t("common:signIn.recoveredAccountMessage")),je()})).catch((function(e){j("Error ".concat(e.response.status,". Please check your username again and retry.")),je()})).finally((function(){f(!1)}))}}),Object(Q.jsxs)(ye.a,{open:X,onKeyUp:Ze,onClose:Je,TransitionComponent:qe,"aria-labelledby":"select-portal-dialog-title","aria-describedby":"select-portal-dialog-description",children:[Object(Q.jsx)(Se.a,{id:"select-portal-dialog-title",children:t("signIn.selectPortalMessage")}),Object(Q.jsx)(Ee.a,{children:Object(Q.jsx)(xe.a,{component:"div",id:"select-portal-dialog-description",children:Object(Q.jsxs)(Te.a,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,className:e.buttonsGroup,children:[Object(Q.jsx)(Te.a,{item:!0,xs:6,children:Object(Q.jsx)(Ce.a,{ref:re,className:e.selectPortalButton,variant:"contained",size:"large",color:"inherit",fullWidth:!0,onClick:function(e){return Qe(e,"new")},autoFocus:!0,children:"Workforce Manager portal.doforms.com"})}),Object(Q.jsx)(Te.a,{item:!0,xs:6,children:Object(Q.jsx)(Ce.a,{className:e.selectPortalButton,variant:"contained",size:"large",color:"inherit",fullWidth:!0,onClick:function(e){return Qe(e,"old")},children:"Administrative site mydoforms.appspot.com"})})]})})}),Object(Q.jsx)(De.a,{children:Object(Q.jsx)(Ce.a,{className:e.cancelButton,onClick:Je,children:t("signIn.cancel")})})]})]})})})},Ye=t(239),Je=t.n(Ye),Qe=Object(F.a)((function(){return{layoutFullscreen:{display:"flex",flexDirection:"column",alignItems:"stretch",position:"relative",height:"100vh"}}})),Ze=Object(A.b)((function(e){return{environment:e.environment,formsModule:e.formsModule,lookupsModule:e.lookupsModule}}))((function(){var e=Qe(),a=Object(A.d)((function(e){return e.environment})),t=Object(A.c)(),n=Object(M.useState)(Object(fe.b)()),o=Object(L.a)(n,2),r=o[0],i=o[1];return Object(M.useEffect)((function(){t({type:u.a.INITIALIZED_ENVIRONMENT}),r&&t({type:u.a.GET_USER,payload:{user:r}})}),[]),Object(M.useEffect)((function(){i(a.isAuthenticated)}),[a.isAuthenticated]),Object(M.useEffect)((function(){var e=new URL(document.location).searchParams,a=Je.a.parse(e.toString());if(!le.a.isEmpty(a)&&a.isFromGeotab){sessionStorage.setItem("jwt",JSON.stringify(a));var t=new URL(window.location.href);t.search="";var n=t.toString();window.location.href=n}}),[]),Object(Q.jsxs)("div",{className:e.layoutFullscreen,children:[a.isLoading&&Object(Q.jsx)(J.a,{}),function(){var e,t,n,o,i,s;return r?Object(Q.jsx)(he,{isAuthenticated:a.isAuthenticated,apiToken:a.apiToken,timeoutMinutes:null===a||void 0===a||null===(e=a.settings)||void 0===e||null===(t=e.portal)||void 0===t||null===(n=t.security)||void 0===n?void 0:n.timeoutMinutes,lockEnabled:null===a||void 0===a||null===(o=a.settings)||void 0===o||null===(i=o.portal)||void 0===i||null===(s=i.security)||void 0===s?void 0:s.lockEnabled}):Object(Q.jsx)(Ke,{})}()]})})),Xe=t(61),$e=null===(n=(o=window).__REDUX_DEVTOOLS_EXTENSION__)||void 0===n?void 0:n.call(o),ea=Object(d.b)(v,$e),aa=navigator.language.substring(0,2);_.a.setLicenseKey("".concat(Xe.b)),i.a.init({interpolation:{escapeValue:!1},lng:aa,resources:{en:{common:O},es:{common:y},el:{common:j},fr:{common:S},id:{common:x},it:{common:T},pt:{common:D},ru:{common:R},sr:{common:k},ja:{common:C},vi:{common:w},he:{common:E}}}),l.a.render(Object(Q.jsx)(A.a,{store:ea,children:Object(Q.jsx)(c.a,{i18n:i.a,children:Object(Q.jsx)(r.a,{injectFirst:!0,children:Object(Q.jsx)(I.c,{id:"script-loader",googleMapsApiKey:"".concat(Xe.d),children:Object(Q.jsx)(Ze,{id:"app"})})})})}),document.getElementById("root"))},46:function(e,a,t){"use strict";t.d(a,"m",(function(){return s})),t.d(a,"k",(function(){return l})),t.d(a,"i",(function(){return c})),t.d(a,"e",(function(){return d})),t.d(a,"y",(function(){return u})),t.d(a,"s",(function(){return m})),t.d(a,"b",(function(){return h})),t.d(a,"v",(function(){return f})),t.d(a,"d",(function(){return b})),t.d(a,"j",(function(){return g})),t.d(a,"r",(function(){return v})),t.d(a,"x",(function(){return j})),t.d(a,"o",(function(){return O})),t.d(a,"h",(function(){return S})),t.d(a,"f",(function(){return E})),t.d(a,"l",(function(){return x})),t.d(a,"c",(function(){return T})),t.d(a,"w",(function(){return C})),t.d(a,"q",(function(){return D})),t.d(a,"p",(function(){return R})),t.d(a,"t",(function(){return k})),t.d(a,"g",(function(){return w})),t.d(a,"n",(function(){return A})),t.d(a,"a",(function(){return _})),t.d(a,"u",(function(){return I}));var n=t(24),o=t(41),r=t.n(o),i=t(59),s=function(e,a){if(e&&a&&a.length){var t=a.find((function(a){return a.key===e}));return t?t.name:""}},l=function(e,a){if(e&&a&&a.length){var t=a.find((function(a){return a.key===e}));return t?t.name:""}},c=function(e,a){if(e&&a&&a.length){var t=a.find((function(a){return a.key===e}));return t?t.name:""}},d=function(e){var a=window.sessionStorage.getItem("full_columns_keys"),t=a?JSON.parse(a):[];return 0!==t.length&&e.some((function(e){return!t.includes(e)}))};function u(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,t=new Date(a.getTime());return t.setSeconds(t.getSeconds()-e),t}function m(e,a){return e.length===a.length&&JSON.stringify(e)!==JSON.stringify(a)}function p(e){var a,t=null!==(a=JSON.parse(sessionStorage.getItem(e)))&&void 0!==a?a:{},n=function(){sessionStorage.setItem(e,JSON.stringify(t))},o={get:function(e){return t[e]},set:function(e,a){t[e]=a,n()},remove:function(e){delete t[e],n()}};return o}var h=p(i.e),f=p(i.n);var b=function(e){var a,t=null!==(a=JSON.parse(localStorage.getItem(e)))&&void 0!==a?a:{},n=function(){localStorage.setItem(e,JSON.stringify(t))},o={get:function(e){return t[e]},set:function(e,a){t[e]=a,n()},remove:function(e){delete t[e],n()}};return o}(i.f),g=function(e){var a;return Array.isArray(e)&&0!==(null===e||void 0===e?void 0:e.length)&&null!==(a=null===e||void 0===e?void 0:e.filter((function(e){return!i.p.includes(e.type)})))&&void 0!==a?a:[]};function v(e){if(!e)return!1;try{JSON.parse(e)}catch(a){return!1}return!0}function j(e){console.error("\ud83d\udca5 ERROR::",e)}function O(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function y(e){var a={timeZone:O()};return new Date(e.toLocaleString("en-US",a))}function S(){var e=new Date,a=new Date(e);a.setDate(e.getDate()+1);var t=y(e),n=y(a);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),{fromDate:t,toDate:n}}function E(e){if("number"!==typeof e)return 0;var a=e/1.60934;return Math.round(a)}function x(){try{return localStorage.getItem(i.m)?JSON.parse(localStorage.getItem(i.m)):null}catch(e){return null}}function T(e){var a,t;return null===e||void 0===e||null===(a=e.rights)||void 0===a||null===(t=a.manage)||void 0===t?void 0:t.includes("update")}function C(e){var a,t;return(null===e||void 0===e||null===(a=e.dispatch)||void 0===a?void 0:a.includes("create"))||(null===e||void 0===e||null===(t=e.submission)||void 0===t?void 0:t.includes("create"))}function D(e){var a;return null===e||void 0===e||null===(a=e.submission)||void 0===a?void 0:a.includes("update")}function R(e){var a;return null===e||void 0===e||null===(a=e.submission)||void 0===a?void 0:a.includes("create")}function k(e){return!!e&&!isNaN(e)}function w(e){var a={};return e.forEach((function(e){var t;e.aggregate&&(a[null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:null===e||void 0===e?void 0:e.field]=e.aggregate)})),a}function A(e){var a=[];return e.forEach((function(e){e.group&&a.push(e.group)})),Object(n.a)(new Set(a))}function _(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"MM/DD/YYYY HH:mm:ss",n=r()(e,t),o=r()(a,t);return n.format("mm:ss")===o.format("mm:ss")}function I(e){console.error("\ud83d\udca5 ERROR::",e)}},47:function(e,a,t){"use strict";t.d(a,"a",(function(){return o})),t.d(a,"b",(function(){return r})),t.d(a,"c",(function(){return i}));var n=t(61),o=function(){return"".concat(n.a,"/api/v2")},r="https://my.geotab.com/apiv1",i=function(){return"".concat((n.a,n.c))}},58:function(e,a,t){"use strict";t(0);var n=t(194),o=t(30),r=t(399),i=t(1),s=Object(n.a)((function(){return{root:{display:"flex",flexDirection:"column",justifyContent:"center",zIndex:"99999"},icon:{position:"absolute",top:"50%",left:"50%",zIndex:"99999"}}}));a.a=function(e){var a=e.withStyle,t=e.size,n=s(),l=Object(o.d)((function(e){return e.environment.iconsTheme}));return Object(i.jsx)("div",{className:!1===a?null:n.root,children:Object(i.jsx)(r.a,{className:!1===a?null:n.icon,size:t||40,style:{color:l[0]&&l[0].color?l[0].color:"#F86900"}})})}},59:function(e,a,t){"use strict";t.d(a,"j",(function(){return n})),t.d(a,"i",(function(){return o})),t.d(a,"l",(function(){return r})),t.d(a,"k",(function(){return i})),t.d(a,"n",(function(){return s})),t.d(a,"e",(function(){return l})),t.d(a,"f",(function(){return c})),t.d(a,"d",(function(){return d})),t.d(a,"h",(function(){return u})),t.d(a,"a",(function(){return m})),t.d(a,"b",(function(){return p})),t.d(a,"c",(function(){return h})),t.d(a,"g",(function(){return f})),t.d(a,"p",(function(){return b})),t.d(a,"m",(function(){return g})),t.d(a,"o",(function(){return v}));var n="https://support.doforms.com/hc/en-us/articles/4403449163667-Charts",o="https://support.doforms.com/hc/en-us/articles/1500006746162-Queries-filters-sorts-and-columns",r="https://support.doforms.com/hc/en-us/articles/11788168076051",i="https://support.doforms.com/hc/en-us/articles/1500005712281-Maps",s="search-input-storage",l="call-records-storage",c="check-load-column-storage",d="ACTIVITY_CUSTOMER",u="ACTIVITY_DEVICE",m=[u,d],p="@ActivityReceiveTime",h="userSessions/viewActivity/customerKey/",f="userSessions/viewActivity/mobileKey/",b=["ACTIVITY_CUSTOMER","ACTIVITY_DEVICE","ACTIVITY_FORM"],g="map-logged-in-info",v={MobileUnits:"Mobile units",Forms:"Forms",Activity:"Activity",Lookups:"Lookups",Views:"Views",Reports:"Reports"}},61:function(e,a,t){"use strict";t.d(a,"a",(function(){return n})),t.d(a,"c",(function(){return o})),t.d(a,"e",(function(){return r})),t.d(a,"d",(function(){return i})),t.d(a,"b",(function(){return s}));var n="https://beta-dot-mydoforms-hrd.appspot.com",o="https://beta-dot-mydoforms-hrd.appspot.com",r="https://beta-dot-mydoforms-hrd.appspot.com",i="AIzaSyB1RdFHdKixvkcUfDf8QHNrSgiSaIFfd2k",s="f7f57d7b3fa014d8f793bd94f90a802eTz03Njk2MixFPTE3MjkzNDQxNTcwMDAsUz1wcmVtaXVtLExNPXN1YnNjcmlwdGlvbixLVj0y"},89:function(e,a,t){"use strict";t.d(a,"a",(function(){return i}));var n=t(3),o=t(25),r=t.n(o),i={ACTION:"VIEWS_ACTION",FORM_COLUMNS:"VIEWS_FORM_COLUMNS",FORM_FILTER_CONDITIONS:"VIEWS_FORM_FILTER_CONDITIONS",FORM_DELETE_SELECTION:"VIEWS_FORM_DELETE_SELECTION",DATA_GRID:"VIEWS_DATA_GRID",HAS_DELETED_VIEW:"VIEWS_HAS_DELETED_VIEW",HAS_NEW_VIEW:"VIEWS_HAS_NEW_VIEW",VIEW_DELETED:"VIEWS_VIEW_DELETED",VIEW_SELECTED:"VIEWS_VIEW_SELECTED",VIEW_REFRESH:"VIEWS_VIEW_REFRESH",VIEW_UNAVAILABLE:"VIEWS_VIEW_UNAVAILABLE",VIEW_DATA:"VIEWS_VIEW_DATA",VIEW_UPDATE:"VIEWS_VIEW_UPDATE",VIEW_CREATE:"VIEWS_VIEW_CREATE",RESET:"VIEWS_RESET",VIEW_RESTORE_PRODUCER:"VIEWS_VIEW_RESTORE_PRODUCER",TAB_CHANGE:"VIEWS_TAB_CHANGE",NAME:"Views",ROWS_PER_PAGE:"VIEWS_ROWS_PER_PAGE",UPDATE_VIEW_SELECTED_KEY:"VIEWS_UPDATE_VIEW_SELECTED_KEY",OLD_VIEW_SELECTED_KEY:"VIEWS_OLD_VIEW_SELECTED_KEY",CLIENT_FILTERS:"VIEWS_CLIENT_FILTERS"},s={action:null,formColumns:[],formFilterConditions:{},formDeleteSelection:[],hasDeletedView:!1,hasNewView:!1,viewDeleted:{view:{},state:!1},viewSelected:{},viewRefresh:!1,viewUnavailable:!1,viewUpdate:{},viewCreate:{},viewData:{},dataGrid:{title:null,titleFooter:null,query:{columns:[],filter:{conditions:[{preset:"TODAY",target:"@StartTime",type:"EQ"},{preset:"ALL",target:"@UserStatus",type:"EQ"}]}},queryView:{},columns:[],records:[],viewSession:!1},rowsPerPage:100,oldViewSelectedKey:null,clientFilters:{}};a.b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case i.ACTION:return Object(n.a)(Object(n.a)({},e),{},{action:a.payload});case i.FORM_COLUMNS:return Object(n.a)(Object(n.a)({},e),{},{formColumns:a.payload});case i.FORM_FILTER_CONDITIONS:return Object(n.a)(Object(n.a)({},e),{},{formFilterConditions:a.payload});case i.FORM_DELETE_SELECTION:return Object(n.a)(Object(n.a)({},e),{},{formDeleteSelection:a.payload});case i.DATA_GRID:return Object(n.a)(Object(n.a)({},e),{},{dataGrid:Object(n.a)(Object(n.a)({},e.dataGrid),a.payload)});case i.HAS_DELETED_VIEW:return Object(n.a)(Object(n.a)({},e),{},{hasDeletedView:a.payload});case i.HAS_NEW_VIEW:return Object(n.a)(Object(n.a)({},e),{},{hasNewView:a.payload});case i.VIEW_DELETED:return Object(n.a)(Object(n.a)({},e),{},{viewDeleted:!1===a.payload?s.viewDeleted:a.payload});case i.VIEW_SELECTED:return Object(n.a)(Object(n.a)({},e),{},{viewSelected:a.payload,dataGrid:r.a.cloneDeep(s.dataGrid)});case i.UPDATE_VIEW_SELECTED_KEY:return Object(n.a)(Object(n.a)({},e),{},{viewSelected:Object(n.a)(Object(n.a)({},e.viewSelected),{},{key:a.payload})});case i.OLD_VIEW_SELECTED_KEY:return Object(n.a)(Object(n.a)({},e),{},{oldViewSelectedKey:a.payload});case i.VIEW_DATA:return Object(n.a)(Object(n.a)({},e),{},{viewData:a.payload});case i.VIEW_UNAVAILABLE:return Object(n.a)(Object(n.a)({},e),{},{viewUnavailable:a.payload});case i.VIEW_UPDATE:return Object(n.a)(Object(n.a)({},e),{},{viewUpdate:a.payload});case i.VIEW_CREATE:return Object(n.a)(Object(n.a)({},e),{},{viewCreate:a.payload});case i.VIEW_REFRESH:return Object(n.a)(Object(n.a)({},e),{},{viewRefresh:a.payload});case i.RESET:return s;case i.VIEW_RESTORE_PRODUCER:var t;return Object(n.a)(Object(n.a)({},e),{},{action:a.payload.action,formColumns:a.payload.formColumns||[],formFilterConditions:a.payload.formFilterConditions||{},formDeleteSelection:a.payload.formDeleteSelection||[],hasDeletedView:a.payload.hasDeletedView,hasNewView:a.payload.hasNewView,viewDeleted:a.payload.viewDeleted||{},viewSelected:a.payload.viewSelected||{},viewRefresh:a.payload.viewRefresh,viewUpdate:a.payload.viewUpdate||{},viewCreate:a.payload.viewCreate||{},viewData:a.payload.viewData||{},dataGrid:a.payload.dataGrid||s.dataGrid,rowsPerPage:(null===a||void 0===a||null===(t=a.payload)||void 0===t?void 0:t.rowsPerPage)||100});case i.TAB_CHANGE:return i.NAME===a.payload?e:Object(n.a)(Object(n.a)({},e),{},{viewSelected:{}});case i.ROWS_PER_PAGE:return Object(n.a)(Object(n.a)({},e),{},{rowsPerPage:a.payload});case i.CLIENT_FILTERS:return Object(n.a)(Object(n.a)({},e),{},{clientFilters:a.payload});default:return e}}},90:function(e,a,t){"use strict";t.d(a,"a",(function(){return i})),t.d(a,"b",(function(){return s}));var n=t(4),o=t(0),r=t(1),i=Object(o.createContext)(),s=function(e){var a=e.values,t=Object(o.useState)(a),s=Object(n.a)(t,2),l=s[0],c=s[1];return Object(r.jsx)(i.Provider,{value:{coreValues:l,setCoreValues:c},children:e.children})}}},[[381,6,7]]]); //# sourceMappingURL=main.759382c6.chunk.js.map