@zeniai/web-app-ui 5.1.61-qa → 5.1.62-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DvuqFlm5.js +1 -0
- package/dist/assets/AddressScreen-D7DCNUGo.js +9 -0
- package/dist/assets/{AiCfoScreen-It5Iqwvu.js → AiCfoScreen-Bv6DgXwH.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-BzW0b3Z-.js → BillPayApprovalRoutes-DxIJLeU6.js} +1 -1
- package/dist/assets/{BillPayRoutes-BM10Ap-2.js → BillPayRoutes-CxAjptk9.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-tq2Pq8-k.js → BusinessVerificationPageScreen-HLhTZBjl.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-BQXIEsXX.js +14 -0
- package/dist/assets/{ChargeCardRoutes-BKpbGgWX.js → ChargeCardRoutes-CF9hoDo5.js} +11 -11
- package/dist/assets/CompanyPassportScreen-Dd-P8T6z.js +1 -0
- package/dist/assets/ConnectionAuthScreen-BWQPD0qS.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BycVZ7K6.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DC4e3Ogu.js → CustomerOnboardingRoutes-B4tFhrDj.js} +4 -4
- package/dist/assets/{DashboardRoutes-BpHU2Qkf.js → DashboardRoutes-uPgpLI1W.js} +3 -3
- package/dist/assets/{DefaultTenantHome-TmE6YsRf.js → DefaultTenantHome-Bhp_uriR.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-YZRErnfJ.js +18 -0
- package/dist/assets/DrawerScreen-BqYmVuny.js +1 -0
- package/dist/assets/EntityDetailRoutes-DbpAgwXS.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CGrxhlUE.js → ExpenseAutomationRoutes-ChVJkArc.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-kp5WtNsg.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BAfTUuIq.js +1 -0
- package/dist/assets/MagicLinkRoutes-CGh8IMWW.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BFMyglUM.js +12 -0
- package/dist/assets/MobileAppDrawer-BuakBUGx.js +1 -0
- package/dist/assets/NotFoundScreen-AsC21qGx.js +1 -0
- package/dist/assets/NotificationRoutes-B06j6V42.js +1 -0
- package/dist/assets/{OAuthConsentScreen-DXJTz5MU.js → OAuthConsentScreen-B6euKfvQ.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DfEV7guz.js +1 -0
- package/dist/assets/{PeopleRoutes-DM0B31yg.js → PeopleRoutes-qz_hXV4C.js} +4 -4
- package/dist/assets/{PerformanceRoutes-yT4nKfMt.js → PerformanceRoutes-v5FcQW2N.js} +1 -1
- package/dist/assets/{Preview-DgYvT3D-.js → Preview-lrK4F27Y.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Dxk5EKMF.js → QBOConnectionScreen-Cx74YOuE.js} +1 -1
- package/dist/assets/ReferralListScreen-G8WgDfU8.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-yvcY1FyR.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Btjx5v4l.js → ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CLjD-rz3.js → ReimbursementRoutes-vHQ3hpWm.js} +11 -11
- package/dist/assets/{ReportsRoutes-DIvKwgKT.js → ReportsRoutes-DIUc8s5q.js} +1 -1
- package/dist/assets/RewardsRoutes-lnm6cAkX.js +1 -0
- package/dist/assets/ScreenRoutes-CAtz09zv.js +2 -0
- package/dist/assets/{SettingsRoutes-CwZJeFhH.js → SettingsRoutes-B4g8CJnG.js} +8 -8
- package/dist/assets/{SetupPagesScreen-DHP6inkV.js → SetupPagesScreen-BkPb95y9.js} +5 -5
- package/dist/assets/SignInScreen-Dhh5qz65.js +1 -0
- package/dist/assets/SignOutScreen-3sXSL_QM.js +9 -0
- package/dist/assets/TaskListScreen-DGOHeeuZ.js +9 -0
- package/dist/assets/TaskRoutes-CDomkVrp.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-DWs1Egcj.js → TransactionDetailRoutes-BXwhj2nX.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BbsGsqi_.js → TransactionDetailScreen-DUZV5JDK.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Co9duxwX.js → TransactionListRoutes-CDDcflri.js} +1 -1
- package/dist/assets/TreasuryRoutes-CZyF8G2k.js +37 -0
- package/dist/assets/{VendorsRoutes-puD2Dgk7.js → VendorsRoutes-B0mGOZoL.js} +23 -23
- package/dist/assets/WiseConfirmationScreen-B3-wTx7l.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CbulRVVe.js → ZeniAccountRoutes-BeZsG6M5.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-CU5lpB3Y.js +9 -0
- package/dist/assets/{accountMappingHelper-BPz1owqi.js → accountMappingHelper-CSvCSQoY.js} +1 -1
- package/dist/assets/{analytics-C-A3qVJh.js → analytics-DCrhd8oB.js} +1 -1
- package/dist/assets/{analyticsHelper-CewoJ3Hu.js → analyticsHelper-CQXeRvKo.js} +1 -1
- package/dist/assets/{core-SRRzy8qJ.js → core-DmAftQ4g.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bz-26BXW.js → decodeURIComponentSafe-C70tsXnj.js} +1 -1
- package/dist/assets/{dnd-CR8sMRK3.js → dnd-3F1D24DQ.js} +1 -1
- package/dist/assets/{empty-BjaZv87n.js → empty-B3YzB_Zh.js} +1 -1
- package/dist/assets/{empty-Btqk4ZK3.js → empty-CDCfsLV4.js} +1 -1
- package/dist/assets/{emptyVideoElement-CcSCePHi.js → emptyVideoElement-CFNhZ55F.js} +1 -1
- package/dist/assets/epic-Bmb0p0Me.js +2 -0
- package/dist/assets/getLocaleForTenant-C55KVru2.js +1 -0
- package/dist/assets/{index-CejiZfG4.js → index-B2dyNLwa.js} +1 -1
- package/dist/assets/{index-JPErnqsm.js → index-BJ17Ijlb.js} +2 -2
- package/dist/assets/{index-CxtVVz4g.js → index-BTn1WqO7.js} +1 -1
- package/dist/assets/{index-CEFX9nem.js → index-BpGaPboJ.js} +1 -1
- package/dist/assets/{index-rTYnRLvf.js → index-DPrh5XVZ.js} +1 -1
- package/dist/assets/{index-6PBzTIZ2.js → index-DniSRtks.js} +1 -1
- package/dist/assets/{index-BnX1nS7p.js → index-DsVH62ZK.js} +13159 -13147
- package/dist/assets/{index-DiKyQs4W.js → index-EyTFjAAZ.js} +1 -1
- package/dist/assets/{lexical-qJrDnJMV.js → lexical-PVlNGkpS.js} +1 -1
- package/dist/assets/{liveblocks-DS8sOLD1.js → liveblocks-evjZPqs_.js} +1 -1
- package/dist/assets/{lottie-Coq2aDEW.js → lottie-CmTLY-9t.js} +1 -1
- package/dist/assets/{mui-DQ-jfgFM.js → mui-PcDpEhsm.js} +1 -1
- package/dist/assets/{pathToGoBack-BmSmVqnZ.js → pathToGoBack-Dt8AwbCr.js} +1 -1
- package/dist/assets/{pdf-D2Xq7623.js → pdf-CbXlPYUs.js} +4 -4
- package/dist/assets/{pdf-lib-fB9Fkl6A.js → pdf-lib-CU5FhbnZ.js} +1 -1
- package/dist/assets/{plaid-DWZgMqW3.js → plaid-DSnXUEUK.js} +1 -1
- package/dist/assets/{pusher-Xj81uOBz.js → pusher-Cwyg5VVV.js} +1 -1
- package/dist/assets/{react-eGjCUI9Z.js → react-CDqmK3AW.js} +1 -1
- package/dist/assets/{react-BlqDZveQ.js → react-CJ1HWQ69.js} +1 -1
- package/dist/assets/{react-CgdBA-iC.js → react-CY1ZQ6op.js} +1 -1
- package/dist/assets/{react-DRyTZBkZ.js → react-Cf5hLxOq.js} +1 -1
- package/dist/assets/{react-DyXk5i5q.js → react-EoTfQhVb.js} +1 -1
- package/dist/assets/{react-DrjKWElm.js → react-ymB_cbpE.js} +1 -1
- package/dist/assets/{recharts-CHATJmXy.js → recharts-CgEqsrFw.js} +1 -1
- package/dist/assets/routePaths-Dq5U7lhs.js +1 -0
- package/dist/assets/{sentry-B2Aew07S.js → sentry-CCZGmBkl.js} +1 -1
- package/dist/assets/{url-BOKPP8B2.js → url-9kg5cual.js} +1 -1
- package/dist/assets/{url-BfvldWlU.js → url-BKaTO14S.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DiiAXpvy.js → useAiCfoDashboardSuggestedQuestionsChips-BzB3gTK8.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-RYFll1PC.js → useAskAiCfoHostNavButtonProps-uVGdd0zj.js} +1 -1
- package/dist/assets/useCashManagementBanner-BB3WgTJ-.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-iVaYEDl9.js → useChargeCardPusherEvents-BOkZNaGv.js} +1 -1
- package/dist/assets/{useDeviceId-obtSvxuy.js → useDeviceId-DGJPBja9.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-FRZ2xd4V.js +1 -0
- package/dist/assets/{useInitialThreadRequest-8loDIspA.js → useInitialThreadRequest-D9ebiXdA.js} +1 -1
- package/dist/assets/{utils-D8kKiFqT.js → utils--mWNe9J7.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CpddR0Hs.js → withTransactionSidePanel-iGXE6khP.js} +2 -2
- package/dist/assets/{zeni-epic-state-DcKqCCCg.js → zeni-epic-state-vtQ66nN6.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-DYu6X0mE.js +0 -1
- package/dist/assets/AddressScreen-DmitYkw7.js +0 -9
- package/dist/assets/CardsAiCfoScreen-DWCPoMx2.js +0 -14
- package/dist/assets/CompanyPassportScreen-CdbgEPbH.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B6ApFE5A.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BC6kPGo0.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-Bg4mE0II.js +0 -18
- package/dist/assets/DrawerScreen-Q_Fkogtz.js +0 -1
- package/dist/assets/EntityDetailRoutes-FVCOQ4xF.js +0 -1
- package/dist/assets/FeaturePreviewScreen-D35UAPet.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CqLWzeL5.js +0 -1
- package/dist/assets/MagicLinkRoutes-Cy9sY1KO.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CTQVJ1D1.js +0 -12
- package/dist/assets/MobileAppDrawer-DChLZMjE.js +0 -1
- package/dist/assets/NotFoundScreen-DRRoMVDk.js +0 -1
- package/dist/assets/NotificationRoutes-DC-UVqrq.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DtN54cOv.js +0 -1
- package/dist/assets/ReferralListScreen-DoZyTHjO.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-AEJXMIeN.js +0 -1
- package/dist/assets/RewardsRoutes-B_SjWYxl.js +0 -1
- package/dist/assets/ScreenRoutes-DrzMUCeq.js +0 -2
- package/dist/assets/SignInScreen-B5h77NMY.js +0 -1
- package/dist/assets/SignOutScreen-MsTaSP0q.js +0 -9
- package/dist/assets/TaskListScreen-BDTDGrzi.js +0 -9
- package/dist/assets/TaskRoutes-CNamnrYQ.js +0 -9
- package/dist/assets/TreasuryRoutes-B_Dv4GZ7.js +0 -37
- package/dist/assets/WiseConfirmationScreen-DAi_rrl_.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DbJvbotJ.js +0 -9
- package/dist/assets/epic-DDYIjE2A.js +0 -2
- package/dist/assets/getLocaleForTenant-DHWNDQcY.js +0 -1
- package/dist/assets/routePaths-DyfF54Mg.js +0 -1
- package/dist/assets/useCashManagementBanner-DeSZsTvv.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-DEaO6bJX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-CCZGmBkl.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-evjZPqs_.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CCZGmBkl.js";import{L as dt,bY as Tc,eW as Ac,LT as Rc,Ml as kl,c6 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-vtQ66nN6.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils--mWNe9J7.js";import{r as un}from"./empty-CDCfsLV4.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CU5FhbnZ.js";import{r as Gl}from"./index-EyTFjAAZ.js";import{r as zl}from"./index-DniSRtks.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DmAftQ4g.js";import{u as Kl,z as Pc,L as Wl,J as Jl,K as Xl,i as Ql,c as tf}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import{d as Pe}from"./decodeURIComponentSafe-C70tsXnj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="10fdb429-6ec2-4132-b97f-61cdd49a9b5b",t._sentryDebugIdIdentifier="sentry-dbid-10fdb429-6ec2-4132-b97f-61cdd49a9b5b")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{a as o}from"./sentry-CCZGmBkl.js";import{j as f,h as L,u as _,g as F,n as V}from"./core-DmAftQ4g.js";import{m as W,Z as z,z as P,be as M,y as N,X as U,_ as $,x as X,c as l,e as q,a7 as Z,bf as G}from"./index-DsVH62ZK.js";import{fF as J,eW as K,Pj as R,Pk as Q,vE as Y,vu as g,fH as ee,bS as ae,vz as re,Pl as ne}from"./zeni-epic-state-vtQ66nN6.js";import{D as te,e as se,n as oe,S as ie}from"./mui-PcDpEhsm.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-uVGdd0zj.js";import{M as ce}from"./MobileAppDrawer-BuakBUGx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="9c11f605-c27a-4a80-b676-bd08165c1fdf",e._sentryDebugIdIdentifier="sentry-dbid-9c11f605-c27a-4a80-b676-bd08165c1fdf")}catch{}})();const de={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=z();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>J(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(M,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,I="refer-and-earn-status-update",we=V(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Z(G));function ye({isReferralDrawerOpen:e}){const a=L(),r=_(),n=F(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=P.getSignedInUser(),h=f(t=>K(t)),m=f(t=>R(t)),v=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),b=Q([m,p]),{areTenantIdsInSync:d}=U();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Y()),E(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&d&&(u(!0),r(g(!0)))},[v,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});$({isDataReady:b===!0});const O={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx(X,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...O})]})}export{ye as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-evjZPqs_.js";import _ from"./NotFoundScreen-AsC21qGx.js";import{a as p}from"./sentry-CCZGmBkl.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as F,p as b}from"./core-DmAftQ4g.js";import{eW as I,Qd as S,Qt as g,FA as V,EJ as U,Fz as d,Fq as B,QH as L,FC as O}from"./zeni-epic-state-vtQ66nN6.js";import{z as N,a7 as T,bZ as Q,af as $,bC as z,b_ as q}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import{u as H,R as A}from"./ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="8de84aec-aa26-4801-86e1-bf9c6019223a",e._sentryDebugIdIdentifier="sentry-dbid-8de84aec-aa26-4801-86e1-bf9c6019223a")}catch{}})();const y="reimbursement-approval-rule-update",J=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:g(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{$(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(T(Q)),K=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>S(a)),v=u(a=>g(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,W,R)=>{a.endsWith(y)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(J,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",Z=k(function(e){const o=S(e),s=g(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{$(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(O(t,!0))}}})(T(q)),G=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(K,{isLoading:s})},M=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>S(a));H();const v=u(a=>g(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,W,R)=>{a.endsWith(j)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Z,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(F,{children:[r.jsx(b,{path:"/",element:r.jsx(G,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as b}from"./liveblocks-
|
|
1
|
+
import{j as b}from"./liveblocks-evjZPqs_.js";import{a as f}from"./sentry-CCZGmBkl.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-DmAftQ4g.js";import{kX as L,Qt as w,Qd as C,Ft as V,FF as B,FA as A,FB as E,Qu as j,eW as z,Fz as W}from"./zeni-epic-state-vtQ66nN6.js";import{z as P,m as N,B as Q,bP as K,af as $,bC as X,bQ as G}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f508ecbd-bc24-41e4-8e12-23eb16b10570",e._sentryDebugIdIdentifier="sentry-dbid-f508ecbd-bc24-41e4-8e12-23eb16b10570")}catch{}})();function H(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const J=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach(u=>{const I=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),R=u.actors.selectedNonUsers.map(m=>{const y=(S=m.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=I.concat(R);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(K);function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>C(n)),[a,d]=f.useState(!1);if(f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(y=>{const S=y.actorKind?.selectedOption,U=y.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=h?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(G);function ne(){const e=g(t=>z(t)),{isApprovalRulesV3Enabled:s}=X(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(M,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>C(n)),[a,d]=f.useState(!1);if(H(),f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DS8sOLD1.js";import{h as W,u as re,g as Z,i as X,j as E,N as _,n as K,l as mt,o as ct,p as C}from"./core-SRRzy8qJ.js";import{eV as H,QH as le,c6 as me,ED as Be,kF as dt,EQ as ne,EP as ae,QI as ut,bn as ce,gm as Te,QJ as pt,N4 as bt,ku as je,N5 as Se,N6 as gt,jp as ht,P_ as ft,jE as St,Er as It,u8 as Rt,jw as yt,Fb as Fe,QK as De,QL as At,QM as kt,QN as vt,QO as Ct,QP as Et,EX as Ie,jK as wt,Q7 as xt,ER as Bt,EB as Tt,QQ as jt,EA as Ft,QR as Dt,EJ as Re,E$ as Ut,E_ as Lt,EW as Pt,QS as Ue,Ka as $t,bq as Mt,EM as _t,Ft as Nt,QT as Qt,QU as Ot,F7 as Gt,F4 as ye,Pt as zt,Ey as Zt,QV as Le,FV as Ae,G1 as Ht,QW as Vt,QX as G,QY as Wt,QZ as Pe,Q_ as Kt,Q$ as $e,R0 as Me,Fj as se,bu as qt,bK as de,cG as ue,fA as _e,fy as Ne,R1 as Jt,fv as Xt,PG as Yt,R2 as en,R3 as Qe,PK as tn,Qs as nn,R4 as an,QG as sn,F_ as ke,FZ as on,R5 as rn,R6 as ln,R7 as mn,R8 as cn,R9 as dn,Qd as un,FQ as pn,FU as bn,bs as gn,bJ as hn,cA as fn,co as Sn,bt as In,LU as Rn,cQ as yn,cS as An,cR as kn,cz as vn}from"./zeni-epic-state-DcKqCCCg.js";import{$ as Oe,q as Ge,W as Y,U as k,z as $,b$ as ze,x as ee,d as v,aK as ve,o as F,au as J,A as Cn,a as Ze,c0 as En,s as z,Z as He,c1 as wn,I as te,c2 as xn,V as Bn,y as Tn,w as pe,f as Ve,a7 as jn,bn as Fn,a2 as Dn,m as We,c3 as Un,a9 as Ln}from"./index-BnX1nS7p.js";import{n as N,S as Pn}from"./mui-DQ-jfgFM.js";import ie from"./NotFoundScreen-DRRoMVDk.js";import{S as Ce}from"./SetupPagesScreen-DHP6inkV.js";import{F as Ke}from"./FeaturePreviewScreen-D35UAPet.js";import{a as f}from"./sentry-B2Aew07S.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-RYFll1PC.js";import{u as qe}from"./useInitialThreadRequest-8loDIspA.js";import{D as $n}from"./DrawerScreen-Q_Fkogtz.js";import{M as Je}from"./MobileAppDrawer-DChLZMjE.js";import{R as Mn}from"./ReimbursementApprovalRoutes-AEJXMIeN.js";import{FallBackRoute as _n}from"./ScreenRoutes-DrzMUCeq.js";import"./recharts-CHATJmXy.js";import"./analytics-C-A3qVJh.js";import"./plaid-DWZgMqW3.js";import"./dnd-CR8sMRK3.js";import"./stripe-DMRn4zHo.js";import"./lottie-Coq2aDEW.js";import"./lexical-qJrDnJMV.js";import"./pdf-D2Xq7623.js";import"./utils-D8kKiFqT.js";import"./analyticsHelper-CewoJ3Hu.js";import"./routePaths-DyfF54Mg.js";import"./BusinessVerificationPageScreen-tq2Pq8-k.js";import"./ReimbursementApprovalRuleDetailScreen-Btjx5v4l.js";import"./getLocaleForTenant-DHWNDQcY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="798ec063-10f2-4126-9760-2a08eb0469c9",e._sentryDebugIdIdentifier="sentry-dbid-798ec063-10f2-4126-9760-2a08eb0469c9")}catch{}})();const Xe=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Qn=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Re(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Re(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(De()),e(At());const i=Xe(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Fe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=Z(),{reimbursementId:r}=X(),d=Oe(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,j=w.includes("edit"),A=w.includes("reimbursement/new"),[D,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>H(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,y,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(ze,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Qn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-evjZPqs_.js";import{h as W,u as re,g as H,i as X,j as E,N as _,n as K,l as mt,o as ct,p as C}from"./core-DmAftQ4g.js";import{eW as Z,QI as le,c6 as me,EE as Be,kG as dt,ER as ne,EQ as ae,QJ as ut,bn as ce,gn as Te,QK as pt,N5 as bt,kv as Fe,N6 as Se,N7 as gt,jq as ht,P$ as ft,jF as St,Es as It,u9 as Rt,jx as yt,Fc as je,QL as De,QM as At,QN as kt,QO as vt,QP as Ct,QQ as Et,EY as Ie,jL as wt,Q8 as xt,ES as Bt,EC as Tt,QR as Ft,EB as jt,QS as Dt,EK as Re,F0 as Ut,E$ as Lt,EX as Pt,QT as Ue,Kb as $t,bq as Mt,EN as _t,Fu as Nt,QU as Qt,QV as Ot,F8 as zt,F5 as ye,Pu as Gt,Ez as Ht,QW as Le,FW as Ae,G2 as Zt,QX as Vt,QY as z,QZ as Wt,Q_ as Pe,Q$ as Kt,R0 as $e,R1 as Me,Fk as se,bu as qt,bK as de,cG as ue,fB as _e,fz as Ne,R2 as Jt,fw as Xt,PH as Yt,R3 as en,R4 as Qe,PL as tn,Qt as nn,R5 as an,QH as sn,F$ as ke,F_ as on,R6 as rn,R7 as ln,R8 as mn,R9 as cn,Ra as dn,Qe as un,FR as pn,FV as bn,bs as gn,bJ as hn,cA as fn,co as Sn,bt as In,LV as Rn,cQ as yn,cS as An,cR as kn,cz as vn}from"./zeni-epic-state-vtQ66nN6.js";import{v as Oe,Z as ze,W as Y,U as k,z as $,b$ as Ge,x as ee,c as v,aK as ve,o as j,au as J,C as Cn,O as He,c0 as En,q as G,_ as Ze,c1 as wn,I as te,c2 as xn,X as Bn,y as Tn,B as pe,e as Ve,a7 as Fn,bn as jn,a2 as Dn,m as We,c3 as Un,a9 as Ln}from"./index-DsVH62ZK.js";import{n as N,S as Pn}from"./mui-PcDpEhsm.js";import ie from"./NotFoundScreen-AsC21qGx.js";import{S as Ce}from"./SetupPagesScreen-BkPb95y9.js";import{F as Ke}from"./FeaturePreviewScreen-kp5WtNsg.js";import{a as f}from"./sentry-CCZGmBkl.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-uVGdd0zj.js";import{u as qe}from"./useInitialThreadRequest-D9ebiXdA.js";import{D as $n}from"./DrawerScreen-BqYmVuny.js";import{M as Je}from"./MobileAppDrawer-BuakBUGx.js";import{R as Mn}from"./ReimbursementApprovalRoutes-yvcY1FyR.js";import{FallBackRoute as _n}from"./ScreenRoutes-CAtz09zv.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./analyticsHelper-CQXeRvKo.js";import"./routePaths-Dq5U7lhs.js";import"./BusinessVerificationPageScreen-HLhTZBjl.js";import"./ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js";import"./getLocaleForTenant-C55KVru2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5316dca9-0939-4498-ae2d-24fe5defa88c",e._sentryDebugIdIdentifier="sentry-dbid-5316dca9-0939-4498-ae2d-24fe5defa88c")}catch{}})();const Xe=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),Qn=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Re(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Re(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(De()),e(At());const i=Xe(o),l=G(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=H(),{reimbursementId:r}=X(),d=Oe(),c=ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,F=w.includes("edit"),A=w.includes("reimbursement/new"),[D,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>Z(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!D||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,y,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ge,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Gn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Zn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Qn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
5
5
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,zn=N.div`
|
|
8
8
|
position: fixed;
|
|
9
9
|
top: 0;
|
|
10
10
|
left: 0;
|
|
@@ -12,7 +12,7 @@ import{j as s}from"./liveblocks-DS8sOLD1.js";import{h as W,u as re,g as Z,i as X
|
|
|
12
12
|
bottom: 0;
|
|
13
13
|
background-color: ${Cn.overlayBackgroundBlack};
|
|
14
14
|
z-index: 5;
|
|
15
|
-
`,
|
|
15
|
+
`,Gn=N.div`
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: 0;
|
|
18
18
|
left: 0;
|
|
@@ -22,7 +22,7 @@ import{j as s}from"./liveblocks-DS8sOLD1.js";import{h as W,u as re,g as Z,i as X
|
|
|
22
22
|
display: flex;
|
|
23
23
|
background-color: transparent;
|
|
24
24
|
overflow: hidden;
|
|
25
|
-
`,
|
|
25
|
+
`,Hn=N.div`
|
|
26
26
|
position: fixed;
|
|
27
27
|
top: 0;
|
|
28
28
|
left: 0;
|
|
@@ -33,27 +33,27 @@ import{j as s}from"./liveblocks-DS8sOLD1.js";import{h as W,u as re,g as Z,i as X
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
overflow-y: auto;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,
|
|
36
|
+
`,Zn=N.button`
|
|
37
37
|
align-self: flex-end;
|
|
38
38
|
background: none;
|
|
39
39
|
border: none;
|
|
40
40
|
cursor: pointer;
|
|
41
|
-
padding: ${
|
|
41
|
+
padding: ${j.sp2} ${j.sp3};
|
|
42
42
|
line-height: 1;
|
|
43
43
|
color: ${e=>e.theme.colors.hero};
|
|
44
44
|
&:hover {
|
|
45
45
|
color: ${e=>e.theme.colors.primary};
|
|
46
46
|
}
|
|
47
47
|
svg {
|
|
48
|
-
width: ${
|
|
49
|
-
height: ${
|
|
48
|
+
width: ${j.sp4};
|
|
49
|
+
height: ${j.sp4};
|
|
50
50
|
}
|
|
51
51
|
`,Vn=N.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Wn=K(function(e,t){const n=Ue(e,t.reimbursementId),r=$.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Qt(n.remiActivities,Ot(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:
|
|
56
|
+
`,Wn=K(function(e,t){const n=Ue(e,t.reimbursementId),r=$.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Qt(n.remiActivities,Ot(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(De());const a=Xe(o),i=G(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Gt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ye(n,a.type,"")):e(ye(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=G(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(zt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Kn(){const e=W(),t=re(),n=H(),r=n.hash.substring(1),d=Oe(),{reimbursementId:c}=X(),m=$.getSignedInUser(),o=E(R=>Z(R)),a=E(R=>Ue(R,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=be({mobileExploreReferrer:"Reimbursement Details"});Ze({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Y(),{isFeatureEnabled:T}=h(k.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[F,A]=f.useState(!1),[D,x]=f.useState(!1),{isFeatureEnabled:B}=h(k.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(k.isShowDeletedReimbursementsFeatureEnabled),g=E(R=>le(R,c??"")),P=$t(o),U=Mt(o.userRole),M=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(_t(c,!1,I)))},[u,c,t,M]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&P===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(R=>R.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,P,m]),f.useEffect(()=>{F||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))},[F,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(_,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Ge,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:R=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(R)}),s.jsx(Wn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:D,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const qn=K(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(z())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Zt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(xn);function Jn(){const e=W(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:v,isAdmin:d})}const O=tn(),Ye="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Xn,common:we}=He.getLocalizedStrings(),xe=Xn.reimbursement.bulkActions,Yn=N.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-DS8sOLD1.js";import{h as W,u as re,g as Z,i as X
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=K(function(e,t){const n=Me(e,O,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=
|
|
64
|
+
`,ea=K(function(e,t){const n=Me(e,O,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=Z(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:O,spendManagementEndPoint:`${Dn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(z()),e(Pe(o))},onSubtabChange:o=>{e(z()),e($e(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=G(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=G(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=G(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(ke("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ke("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Ye&&e(an())}}})(Fn(jn));function ta(){const e=W(),t=re(),n=H(),r=n.state,d=ze(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Wt(r.tab.toString());S!=null?t(Pe(S)):console.log("Warning:Not a valid remiListTab");const Q=Kt(r.subTab.toString());Q!=null?t($e(Q)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(z())}},[]);const{useFeatureGate:a}=Y(),{isFeatureEnabled:i}=a(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(k.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(k.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(k.isReimbursementBulkActionEnabled),T=$.getSignedInUser(),u=E(S=>Z(S)),[w,F]=f.useState(!1),[A,D]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>Me(S,O,h)),{areTenantIdsInSync:g}=Bn(),P=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:M}=be({mobileExploreReferrer:"Reimbursement List"});if(Ze({isDataReady:P==="Completed"}),f.useEffect(()=>{!A&&g&&(D(!0),t(se(O,!0,l,!1,!0)))},[A,O,t,g]),T==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&qt(u),p=de(x?.loggedInUserRoleMap),V=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>Te(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{F(S)},{isFeatureEnabled:it}=a(k.isDebitCardFeatureEnabled),ot=_e(it,u),rt=Ne(u),{remisProcessed:q,remisProcessing:he}=E(S=>Jt(S));f.useEffect(()=>{q===he&&c!=null&&(t(Xt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:q>1?xe.reports:xe.report},{variableName:"_has_",variableValue:q>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(en()),setTimeout(()=>{t(se(O,!0,l,!1,!0,!0))},3e3),m(null))},[q,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Ye}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,Q,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):Q.entity_type==="reimbursement"&&(m(Q.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Ke,{}):tt&&(!R||p)||V&&et?s.jsxs(s.Fragment,{children:[P==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(Q=>Q.trackPageLoaded(Ve.Event.reimbursementHome))(S)}):null,s.jsx(Je,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Yn,{windowSize:d,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(z())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Jn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:O,isAdmin:B,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:M,...lt})]})]}):nt&&p?s.jsx(_,{to:"../setup"}):x!=null&&Qe(u,x.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=N(Pn)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,ia=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=W(),t=
|
|
68
|
+
`,ia=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=W(),t=H(),{tenantEmailDomain:n}=X(),r=We(),[d,c]=f.useState(!1),m=E(A=>Z(A)),o=$.getSignedInUserTenant(n)?.companyId??m.companyId,a=$.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),y=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,F=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(_,{to:"../../../reimbursements"}):w&&y?s.jsx(_,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:A=>(D=>D.trackPageLoaded(Ve.Event.reimbursementPromoPage))(A)}),s.jsx(Je,{isAppContentDrawerOpen:d,handleDrawerToggle:F}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{F(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=E(V=>Z(V)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=We(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=Y(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=_e(a,e),l=Ne(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=T&&u,{isFeatureEnabled:F}=m(k.isDepositAccountsFeatureEnabled),A=F&&!b&&Sn(t?.loggedInUserRoleMap),D=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=Rn(t?.loggedInUserRoleMap),B=yn(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),g=kn(t?.loggedInUserRoleMap),P=vn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:M}=X(),R=H(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[R.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"verification",element:s.jsx(Ce,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(C,{path:"setup",element:s.jsx(Ce,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"setup"})}),s.jsx(C,{path:"promo",element:s.jsx(oa,{})}),s.jsx(C,{path:"approval-rules/*",element:w?s.jsx(Mn,{}):s.jsx(_n,{isUserHasZeniAccountsAccess:B,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:P,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:M??""})}),p&&s.jsx(C,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(C,{path:"/*",element:s.jsx(Ke,{})}),t!=null&&Qe(e,t?.loggedInUserRoleMap)&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../promo"})}),d&&u&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../setup"})})]}):R.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"new",element:s.jsx(Ee,{})}),s.jsx(C,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(C,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(C,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(C,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(C,{path:"*",element:s.jsx(ie,{})})]})}export{Pa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DS8sOLD1.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as Y}from"./core-SRRzy8qJ.js";import{eV as v,fP as I,Ml as Te,ku as K,qO as W,rD as A,ki as Re,jm as Me,v7 as X,rI as Oe,bs as Ae,Mm as ke,bn as Fe,wg as De,Mn as je,Mo as Ee,u$ as Pe,Mp as H,Mq as ve,Mr as Le,Ms as Be,Mt as Ve,Mu as w,Mv as k,Mw as F,Mx as N,My as D,Mz as j,dI as Ue,vY as xe,vM as q,vN as $,w2 as ze,vR as Z,w8 as Ge,MA as Ye,MB as He,MC as Ne,MD as qe,ME as $e,fA as Ze,fy as Qe}from"./zeni-epic-state-DcKqCCCg.js";import{J as Je,K as Ke,N as We,Q as Xe,q as ea,W as ee,U as E,z as ae,V as aa,I as sa,c as ta,X as oa,Z as na,x as ra,d as P,f as ia,_ as la,s as se,a0 as ca,a1 as da,a2 as pa}from"./index-BnX1nS7p.js";import"./mui-DQ-jfgFM.js";import fa from"./NotFoundScreen-DRRoMVDk.js";import{F as ma}from"./FeaturePreviewScreen-D35UAPet.js";import{a as _}from"./sentry-B2Aew07S.js";import{u as ua}from"./useInitialThreadRequest-8loDIspA.js";import{t as Q,a as J,b as _a}from"./routePaths-DyfF54Mg.js";import{M as ha}from"./MobileAppDrawer-DChLZMjE.js";import"./recharts-CHATJmXy.js";import"./analytics-C-A3qVJh.js";import"./plaid-DWZgMqW3.js";import"./dnd-CR8sMRK3.js";import"./stripe-DMRn4zHo.js";import"./lottie-Coq2aDEW.js";import"./lexical-qJrDnJMV.js";import"./pdf-D2Xq7623.js";import"./utils-D8kKiFqT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5013603f-d13b-4bef-a871-0a315317d792",e._sentryDebugIdIdentifier="sentry-dbid-5013603f-d13b-4bef-a871-0a315317d792")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ne()),e(qe()),e($e())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>K(n)),M=d(n=>W(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Je(he??"")==="reports",be=Ke(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);We({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ca,{})}),p.jsx(Y,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-evjZPqs_.js";import{g as G,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as Y}from"./core-DmAftQ4g.js";import{eW as v,fQ as w,Mm as Te,kv as W,qP as X,rE as A,kj as Re,jn as Me,v8 as K,rJ as Oe,bs as Ae,Mn as Fe,bn as ke,wh as De,Mo as je,Mp as Ee,v0 as Pe,Mq as H,Mr as ve,Ms as Le,Mt as Be,Mu as Ve,Mv as I,Mw as F,Mx as k,My as N,Mz as D,MA as j,dJ as Ue,vZ as xe,vN as q,vO as $,w3 as ze,vS as Z,w9 as Ge,MB as Ye,MC as He,MD as Ne,ME as qe,MF as $e,fB as Ze,fz as Qe}from"./zeni-epic-state-vtQ66nN6.js";import{N as Je,Q as We,R as Xe,V as Ke,Z as ea,W as ee,U as E,z as ae,X as aa,I as sa,a as ta,Y as oa,_ as na,x as ra,c as P,e as ia,$ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import fa from"./NotFoundScreen-AsC21qGx.js";import{F as ma}from"./FeaturePreviewScreen-kp5WtNsg.js";import{a as _}from"./sentry-CCZGmBkl.js";import{u as ua}from"./useInitialThreadRequest-D9ebiXdA.js";import{t as Q,a as J,b as _a}from"./routePaths-Dq5U7lhs.js";import{M as ba}from"./MobileAppDrawer-BuakBUGx.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="a941a05f-92ab-44db-aebe-8bbf0f3e8fb2",e._sentryDebugIdIdentifier="sentry-dbid-a941a05f-92ab-44db-aebe-8bbf0f3e8fb2")}catch{}})();const ha=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ne()),e(qe()),e($e())},ga=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:b}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>W(n)),M=d(n=>X(n)),le=d(n=>w(n).isCompareModeOn),h=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&b&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,b]),_.useEffect(()=>{i&&!L&&C==="Completed"&&b&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,L,C,b]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(h.timeframe));break;case"profit_and_loss_by_projects":M&&s(K());break;case"balance_sheet":s(Me(h.timeframe));break;case"cash_flow":s(Re(h.timeframe))}},[i,R,O,b,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:be}=G(),z=Je(be??"")==="reports",he=We(_e),ye=_.useMemo(()=>z?ha:void 0,[z]);Xe({canFetchSuggestedQuestions:he,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ba,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:h,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ca,{})}),p.jsx(Y,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-evjZPqs_.js";import{W as C,z as j,aQ as b,x as I,c as p,e as F,d6 as P,U as T}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import m from"./NotFoundScreen-AsC21qGx.js";import{a as f}from"./sentry-CCZGmBkl.js";import{u as L,j as y,h as U,g as V,n as A,o as R,p as d}from"./core-DmAftQ4g.js";import{eW as z,TB as w,PU as W,TC as v,vE as Y,fH as B,TD as G,vC as H}from"./zeni-epic-state-vtQ66nN6.js";import{R as x}from"./ReferralListScreen-G8WgDfU8.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";import"./useAskAiCfoHostNavButtonProps-uVGdd0zj.js";import"./MobileAppDrawer-BuakBUGx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1b65cfcb-d311-4ffb-8bfc-6917d7c851a6",e._sentryDebugIdIdentifier="sentry-dbid-1b65cfcb-d311-4ffb-8bfc-6917d7c851a6")}catch{}})();const O=A(function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(H())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Q=()=>{const e=L(),[t,n]=f.useState(!1),[i,s]=f.useState(!1),r=y(o=>z(o)),c=U(),D=V(),{useDynamicConfig:g}=C(),u=j.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=y(o=>w(o)),_=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:k}=g(b.zeniAccountsConfig),N=W(k);f.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),f.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(B(!0)))},[l.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:D,currentTenant:r,companyName:S,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(R,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Q,{}):a.jsx(m,{})}),a.jsx(d,{path:"*",element:a.jsx(m,{})})]})}export{de as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-uPgpLI1W.js","assets/sentry-CCZGmBkl.js","assets/core-DmAftQ4g.js","assets/zeni-epic-state-vtQ66nN6.js","assets/index-DsVH62ZK.js","assets/mui-PcDpEhsm.js","assets/analytics-DCrhd8oB.js","assets/utils--mWNe9J7.js","assets/withTransactionSidePanel-iGXE6khP.js","assets/useAskAiCfoHostNavButtonProps-uVGdd0zj.js","assets/TransactionDetailScreen-DUZV5JDK.js","assets/decodeURIComponentSafe-C70tsXnj.js","assets/routePaths-Dq5U7lhs.js","assets/NotFoundScreen-AsC21qGx.js","assets/useInitialThreadRequest-D9ebiXdA.js","assets/analyticsHelper-CQXeRvKo.js","assets/CompanyPassportScreen-Dd-P8T6z.js","assets/MobileAppDrawer-BuakBUGx.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BzB3gTK8.js","assets/FeaturePreviewScreen-kp5WtNsg.js","assets/ReferralListScreen-G8WgDfU8.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-CxAjptk9.js","assets/AddressScreen-D7DCNUGo.js","assets/DomesticWireDetailScreen-YZRErnfJ.js","assets/DrawerScreen-BqYmVuny.js","assets/SetupPagesScreen-BkPb95y9.js","assets/BusinessVerificationPageScreen-HLhTZBjl.js","assets/BillPayApprovalRoutes-DxIJLeU6.js","assets/ReimbursementApprovalRuleDetailScreen-s9Cc-PAW.js","assets/getLocaleForTenant-C55KVru2.js","assets/ReimbursementRoutes-vHQ3hpWm.js","assets/ReimbursementApprovalRoutes-yvcY1FyR.js","assets/TransactionListRoutes-CDDcflri.js","assets/ZeniAccountStatementScreen-CU5lpB3Y.js","assets/SettingsRoutes-B4g8CJnG.js","assets/accountMappingHelper-CSvCSQoY.js","assets/QBOConnectionScreen-Cx74YOuE.js","assets/empty-CDCfsLV4.js","assets/index-EyTFjAAZ.js","assets/url-9kg5cual.js","assets/index-DniSRtks.js","assets/useEmailConnectResultRefresh-FRZ2xd4V.js","assets/ReportsRoutes-DIUc8s5q.js","assets/ChargeCardRoutes-CF9hoDo5.js","assets/useChargeCardPusherEvents-BOkZNaGv.js","assets/PeopleRoutes-qz_hXV4C.js","assets/ExpenseAutomationRoutes-ChVJkArc.js","assets/TreasuryRoutes-CZyF8G2k.js","assets/useCashManagementBanner-BB3WgTJ-.js","assets/VendorsRoutes-B0mGOZoL.js","assets/pathToGoBack-Dt8AwbCr.js","assets/ZeniAccountRoutes-BeZsG6M5.js","assets/AddressRoutes-DvuqFlm5.js","assets/PandLWithForecastRoutes-DfEV7guz.js","assets/CustomerOnboardingRoutes-B4tFhrDj.js","assets/TransactionDetailRoutes-BXwhj2nX.js","assets/EntityDetailRoutes-DbpAgwXS.js","assets/NotificationRoutes-B06j6V42.js","assets/PerformanceRoutes-v5FcQW2N.js","assets/RewardsRoutes-lnm6cAkX.js","assets/TaskRoutes-CDomkVrp.js","assets/TaskListScreen-DGOHeeuZ.js","assets/AiCfoScreen-Bv6DgXwH.js","assets/CardsAiCfoScreen-BQXIEsXX.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bn as is,eW as rs,fB as os,fz as ls,fA as cs,gi as ds,fo as ms,cT as xe,cA as us,fR as _s,cs as ps,bE as As,bo as Es,fW as xs,v as gs,LU as Is,bs as Ts,LV as js,bK as hs,fT as Us,bJ as Rs,bt as bs,co as Hs,LW as Ds,LX as fs,cQ as ys,cS as Cs,cR as vs,cz as Os,cG as Ps,o7 as ge,fx as Ie,gs as Fs,f_ as Te,gp as je,gq as he,f$ as Ls}from"./zeni-epic-state-vtQ66nN6.js";import{j as e}from"./liveblocks-evjZPqs_.js";import{a as v}from"./sentry-CCZGmBkl.js";import{u as ks,h as Bs,i as Vs,g as Ss,j as G,l as Ue,N as c,o as Ns,p as t}from"./core-DmAftQ4g.js";import{m as Ms,u as Zs,z as b,W as ws,a as zs,n as Gs,U as B,I as $s,L as F,O as Re,t as _,P as Ws,c as ee,l}from"./index-DsVH62ZK.js";import"./mui-PcDpEhsm.js";import{f as be}from"./analyticsHelper-CQXeRvKo.js";import{t as Ys}from"./getLocaleForTenant-C55KVru2.js";import"./recharts-CgEqsrFw.js";import"./analytics-DCrhd8oB.js";import"./plaid-DSnXUEUK.js";import"./dnd-3F1D24DQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CmTLY-9t.js";import"./lexical-PVlNGkpS.js";import"./pdf-CbXlPYUs.js";import"./utils--mWNe9J7.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="06f5cf64-14bb-4452-b6f8-0781336049ed",i._sentryDebugIdIdentifier="sentry-dbid-06f5cf64-14bb-4452-b6f8-0781336049ed")}catch{}})();const qs={dashboard:()=>a(()=>import("./DashboardRoutes-uPgpLI1W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-CxAjptk9.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-vHQ3hpWm.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-CDDcflri.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-B4g8CJnG.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,42,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-DIUc8s5q.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-CF9hoDo5.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>a(()=>import("./PeopleRoutes-qz_hXV4C.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-ChVJkArc.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-CZyF8G2k.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-B0mGOZoL.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-BeZsG6M5.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],se=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ks=l(()=>a(()=>import("./ReportsRoutes-DIUc8s5q.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Qs=l(()=>a(()=>import("./AddressRoutes-DvuqFlm5.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),Xs=l(()=>a(()=>import("./PeopleRoutes-qz_hXV4C.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),ea=l(()=>a(()=>import("./PandLWithForecastRoutes-DfEV7guz.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),sa=l(()=>a(()=>import("./CustomerOnboardingRoutes-B4tFhrDj.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,42,45,21]))),aa=l(()=>a(()=>import("./VendorsRoutes-B0mGOZoL.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),na=l(()=>a(()=>import("./TransactionDetailRoutes-BXwhj2nX.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-DbpAgwXS.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),ta=l(()=>a(()=>import("./DashboardRoutes-uPgpLI1W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),De=l(()=>a(()=>import("./BillPayRoutes-CxAjptk9.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ia=l(()=>a(()=>import("./SettingsRoutes-B4g8CJnG.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,42,28,29,32,21]))),fe=l(()=>a(()=>import("./ReimbursementRoutes-vHQ3hpWm.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ra=l(()=>a(()=>import("./ZeniAccountRoutes-BeZsG6M5.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),oa=l(()=>a(()=>import("./TreasuryRoutes-CZyF8G2k.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),la=l(()=>a(()=>import("./TransactionListRoutes-CDDcflri.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ca=l(()=>a(()=>import("./ChargeCardRoutes-CF9hoDo5.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),da=l(()=>a(()=>import("./NotificationRoutes-B06j6V42.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),ma=l(()=>a(()=>import("./PerformanceRoutes-v5FcQW2N.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),ua=l(()=>a(()=>import("./ExpenseAutomationRoutes-ChVJkArc.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_a=l(()=>a(()=>import("./RewardsRoutes-lnm6cAkX.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),pa=l(()=>a(()=>import("./TaskRoutes-CDomkVrp.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),Aa=l(()=>a(()=>import("./AiCfoScreen-Bv6DgXwH.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-BQXIEsXX.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),D=l(()=>a(()=>import("./NotFoundScreen-AsC21qGx.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ea=l(()=>a(()=>import("./TaskListScreen-DGOHeeuZ.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function Na({setTenantEmailDomain:i}){const U=ks(),V=Bs(),{tenantEmailDomain:o}=Vs(),S=Ms().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=Zs(),f=b.getSignedInUserTenant(o)?.tenantId,j=b.getSignedInUser(),ae=is(j),$=Ss(),[N,ve]=v.useState(!1),r=G(n=>rs(n)),{useFeatureGate:L}=ws(),w=zs(),ne=Gs(),{isFeatureEnabled:Oe}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=L(B.isTreasuryEnabled),{isFeatureEnabled:Fe}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=L(B.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),A=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||h==="Completed"?os(te,r):void 0,W=A==="Completed"||h==="Completed"?ls(r):void 0,Le=A==="Completed"||h==="Completed"?cs(r):void 0,ke=Fe||te||!!Le||!!W||!!u,{isFeatureEnabled:Be}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:K}=L(B.isAiCfoFileUploadEnabled),Y=G(n=>ds(n));if(o!=null){const n=b.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},ie=ms(),p=$s(),Ve=r.company==null||p?.loggedInUserRoleMap!=null&&xe(p.loggedInUserRole),Se=us(p?.loggedInUserRoleMap),re=v.useRef(!0),oe=Ue("/:tenantEmailDomain/onboarding/*")!==null,Q=Ue("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ne=G(n=>z.tenantId!=null?_s(n,z.tenantId):void 0);v.useEffect(()=>{y(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&f!=null){const n=Q.params.selectedPeriod;if(n!=null){const R=n.split("-");if(R.length===2){const d=ps(Number(R[0])),s=Number(R[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,Re.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Es();m.isAfter(M,"month")===!1?U(xs(f,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,f]),v.useEffect(()=>{N||(ve(!0),y(F.TENANT_FETCHING)),re.current?re.current=!1:!gs(ie,z)&&b.isSignedIn()&&(y(F.TENANT_FETCHING),function(n,R,d,s){if(Ie(R?.userId,R?.zeniSessionId,n.tenantId),d(Fs(!0)),d(Te(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=b.getSignedInUserTenantWithId(n.tenantId);s&&Re.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?ee.identify(n.userId,{tenant_id:n.tenantId}):ee.resetUserIdentity()}(z,j,U,Ne))},[z,ie,j,U,b]),v.useEffect(()=>{b.isSignedIn()&&(y(F.TENANT_FETCHING),function(n,R,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,as=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,ts=d!=null&&d.externalConnections==null;if(q&&as){k(Te(s));const J=b.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(J?.tenantEmailDomain),Ie(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(je(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(he(m.userId,s)))}else q&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(je(m.userId,s))),q&&ts&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(he(m.userId,s)));if(q){ee.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(R==="Completed"||R==="Error");n==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(F.TENANT_FETCHING),k(Ls(m.userId,s,m.zeniSessionId))),J&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(ge(m.userId,m.zeniSessionId)))}}(h,A,r,f,j,y,U))},[f,A]),v.useEffect(()=>{b.isSignedIn()&&h==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(F.TENANT_FETCHING),b.saveSignedInUserTenants(Is(Y.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,Y.tenantsBaseInOrder))},[Y,h,r,j]),v.useEffect(()=>{A==="In-Progress"&&y(F.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&f!=null?(O(),_.markActiveTenantFetchCompleted(f)):A==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),Z(F.TENANT_FETCHING),Z(F.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[A,h,f,N]);const le=v.useRef(!1);v.useEffect(()=>{!le.current&&A==="Completed"&&N&&(le.current=!0,function(n=Js,R=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=qs[m];M!=null?M().then(()=>se(()=>d(s+1))).catch(()=>se(()=>d(s+1))):d(s+1)};se(()=>d(0))},R)}())},[A,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Me}=L(B.isReferralFeatureEnabled),Ze=r?.userRole!=null&&r.userRole.includes("charge_card_user"),we=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&xe(r.userRole),ce=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,de=ke&&!C,ze=js(p?.loggedInUserRoleMap),Ge=r.externalConnections?.accounting[0]?.isValid,me=r.company?.companyOnboardingInfo.isOnboardingCompleted,ue=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,_e=ue&&hs(p?.loggedInUserRoleMap),pe=Oe&&!C,$e=r.company!=null&&Us(r.company),We=Pe&&$e===!0&&!C,Ye=ce&&Rs(p?.loggedInUserRoleMap),qe=de&&bs(p?.loggedInUserRoleMap),Je=pe&&Hs(p?.loggedInUserRoleMap),Ke=Ds(p?.loggedInUserRoleMap),Qe=fs(p?.loggedInUserRoleMap),E=ys(p?.loggedInUserRoleMap),x=Cs(p?.loggedInUserRoleMap),g=vs(p?.loggedInUserRoleMap),I=Os(p?.loggedInUserRoleMap),T=Ps(p?.loggedInUserRoleMap),Ae=ce&&I,Ee=ue&&T,Xe=pe&&E,es=We&&x,X=de&&g,ss=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Se===!0||ze===!0||Ke===!0||Qe===!0;return b.isSignedIn()?f==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(ge(j.userId,j.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||h==="Completed"?(me===!0||ae&&!oe)&&Ge===!1&&u===!1&&W===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||me!==!1||oe||ae?N&&r?.userRole&&u!=null&&W!=null&&o!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:W})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(ta,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ks,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ss||P?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(ea,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(sa,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ze||we?e.jsx(na,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(la,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ea,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:Ye||_e||Je||qe?e.jsx(Qs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Xe?e.jsx(ra,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:es?e.jsx(oa,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ne===!0?e.jsx(ma,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ne===!0&&C===!1?e.jsx(ua,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(da,{})}),e.jsx(t,{path:"vendors/*",element:Ve?e.jsx(aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ae?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ae?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(fe,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(fe,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(ia,{hasAdminLevelAccess:_e}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:X&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:X&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:X?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:Me?e.jsx(_a,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(Aa,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(ja,{tenantEmailDomain:O}):S?e.jsx(Ta,{tenantEmailDomain:O}):U?e.jsx(ha,{tenantEmailDomain:O}):V?e.jsx(Ia,{tenantEmailDomain:O}):o?e.jsx(ga,{tenantEmailDomain:O}):e.jsx(D,{}),ga=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Ia=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Ce=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,Na as default};
|