@zeniai/web-app-ui 5.1.77-qa → 5.1.78-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.
Files changed (110) hide show
  1. package/dist/assets/AddressRoutes-D0r3QPI4.js +1 -0
  2. package/dist/assets/{AddressScreen-DjHFWXZd.js → AddressScreen-CLqHIzyX.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-Coov-9Lq.js → AiCfoScreen-qoxT0tW7.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-5yoLyMdf.js → BillPayApprovalRoutes-CZBhRNrs.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-BJdksoIS.js → BillPayRoutes-C6exGqkN.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CxMuID_0.js → BusinessVerificationPageScreen-BN8pHa0i.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen-7MbovH-h.js → CardsAiCfoScreen-B0XBkar3.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-ZORkbkMi.js → ChargeCardRoutes-DE9-vLEE.js} +1 -1
  9. package/dist/assets/{CompanyPassportScreen-3LH__AFc.js → CompanyPassportScreen-3yTQ9U1p.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-E5uYsUYy.js → ConnectionAuthScreen-Cj6ASnFW.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-D3_jNbPY.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-BbhWhhzo.js +30 -0
  13. package/dist/assets/DashboardRoutes-BcHQSPfi.js +20 -0
  14. package/dist/assets/{DefaultTenantHome-D9TcJdht.js → DefaultTenantHome-gaEkRiQO.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-DZ8naknM.js → DomesticWireDetailScreen-DeiqcEkq.js} +1 -1
  16. package/dist/assets/{DrawerScreen-enq1kex3.js → DrawerScreen-BkDOJtg1.js} +1 -1
  17. package/dist/assets/{EntityDetailRoutes-1jh84Y19.js → EntityDetailRoutes-VjvPi57p.js} +1 -1
  18. package/dist/assets/{ExpenseAutomationRoutes-CCWIfo0Y.js → ExpenseAutomationRoutes-B6hzZS_w.js} +1 -1
  19. package/dist/assets/{FeaturePreviewScreen-9qGkTofX.js → FeaturePreviewScreen-CW2ZZwGb.js} +1 -1
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-DV60QBAP.js → HubSpotOAuthCallbackScreen-C0zLWVIW.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-ZrciaOYE.js → MagicLinkRoutes-DTr6uAW9.js} +1 -1
  22. package/dist/assets/{MagicLinkSignInScreen-Bx2G9lAV.js → MagicLinkSignInScreen-FAIwPzgV.js} +1 -1
  23. package/dist/assets/MobileAppDrawer-DXoZqPdU.js +1 -0
  24. package/dist/assets/NotFoundScreen-BPydeesy.js +1 -0
  25. package/dist/assets/{NotificationRoutes-DMjWy9uH.js → NotificationRoutes-D79yRJe0.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-g04Ja_FY.js → OAuthConsentScreen-DOLoK6bY.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-CQW3cuEJ.js → PandLWithForecastRoutes-lKoniDxv.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-C4dcMrZ_.js → PeopleRoutes-CBv7SQ8D.js} +1 -1
  29. package/dist/assets/{PerformanceRoutes-C70AcB2c.js → PerformanceRoutes-DOGdmtlY.js} +1 -1
  30. package/dist/assets/{Preview-C-vmj6G_.js → Preview-OwLuXuSq.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-CXuCwnVv.js → QBOConnectionScreen-BlVFH5zG.js} +1 -1
  32. package/dist/assets/{ReferralListScreen-CAuT5MkH.js → ReferralListScreen-8JSWVt-7.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRoutes-D7K2CtZa.js → ReimbursementApprovalRoutes-CgceXA7l.js} +1 -1
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js → ReimbursementApprovalRuleDetailScreen-BImN24-1.js} +1 -1
  35. package/dist/assets/{ReimbursementRoutes-Dc6yhpRS.js → ReimbursementRoutes-BeU8Hdsy.js} +1 -1
  36. package/dist/assets/{ReportsRoutes-0B9PMrKM.js → ReportsRoutes-BuuKCsLq.js} +1 -1
  37. package/dist/assets/{RewardsRoutes-BIy5lqI9.js → RewardsRoutes-CcenAkjt.js} +1 -1
  38. package/dist/assets/{ScreenRoutes-S4iuOC-S.js → ScreenRoutes-IcWHAutY.js} +2 -2
  39. package/dist/assets/{SettingsRoutes-Bo4skXXS.js → SettingsRoutes-CH1mDc7s.js} +1 -1
  40. package/dist/assets/{SetupPagesScreen-C5uQEz7K.js → SetupPagesScreen-C_NeLXz4.js} +1 -1
  41. package/dist/assets/{SignInScreen-DNgt_9L_.js → SignInScreen-BIhK8HqQ.js} +1 -1
  42. package/dist/assets/SignOutScreen-2bXu_Cpe.js +9 -0
  43. package/dist/assets/{TaskListScreen-DF5lH-3k.js → TaskListScreen-CUCFe3fy.js} +1 -1
  44. package/dist/assets/{TaskRoutes-8GtswDRs.js → TaskRoutes-DCWybM7c.js} +1 -1
  45. package/dist/assets/{TransactionDetailRoutes-BaHmdvMt.js → TransactionDetailRoutes-nODyFQ1G.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-D6QDGxGu.js → TransactionDetailScreen-BFCNfSuj.js} +1 -1
  47. package/dist/assets/{TransactionListRoutes-Bhdw74c5.js → TransactionListRoutes-CyMeQZ7M.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-Tn0wVhtU.js → TreasuryRoutes-BhnV8hs8.js} +1 -1
  49. package/dist/assets/{VendorsRoutes-COmvFuAL.js → VendorsRoutes-C8TiJ3ID.js} +1 -1
  50. package/dist/assets/{WiseConfirmationScreen-BSHHYeUX.js → WiseConfirmationScreen-UeyKmLiH.js} +1 -1
  51. package/dist/assets/{ZeniAccountRoutes-CteciRDO.js → ZeniAccountRoutes-EJgKENeX.js} +1 -1
  52. package/dist/assets/{ZeniAccountStatementScreen-WWIAEGl-.js → ZeniAccountStatementScreen-B7tQCRYA.js} +1 -1
  53. package/dist/assets/{accountMappingHelper-talErUKy.js → accountMappingHelper-xxDKbgY6.js} +1 -1
  54. package/dist/assets/{analytics-ChMmdjNV.js → analytics-D9LLahJK.js} +1 -1
  55. package/dist/assets/{analyticsHelper-Bq2cX6hw.js → analyticsHelper-BA_yiiPD.js} +1 -1
  56. package/dist/assets/{core-BoNEfvLs.js → core-BXHWSH6o.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-v7XwPgPo.js → decodeURIComponentSafe-DEgBTC44.js} +1 -1
  58. package/dist/assets/{dnd-DvJtEb2B.js → dnd-D1FusWvE.js} +1 -1
  59. package/dist/assets/{empty-dNqnyFZ3.js → empty-D3a7Terp.js} +1 -1
  60. package/dist/assets/{empty-b5TFvQkm.js → empty-rUUW8qXy.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CHUUTLZE.js → emptyVideoElement-ByolhRbs.js} +1 -1
  62. package/dist/assets/{epic-DBs37iOr.js → epic-BZy2OdlW.js} +1 -1
  63. package/dist/assets/{getLocaleForTenant-B4Of7eQD.js → getLocaleForTenant-DXvFXHW9.js} +1 -1
  64. package/dist/assets/{index-drCPF-LE.js → index-BPjVdT23.js} +1 -1
  65. package/dist/assets/{index-DcWwIWd7.js → index-BSQcTnEi.js} +1 -1
  66. package/dist/assets/{index-BkGSE7D5.js → index-CMicf90d.js} +7 -7
  67. package/dist/assets/{index-CJO1bhSt.js → index-CdUum8m9.js} +2 -2
  68. package/dist/assets/{index-DM4yT559.js → index-CqsQnZaN.js} +1 -1
  69. package/dist/assets/{index-VwB1TFIZ.js → index-CrFsG-Kl.js} +1 -1
  70. package/dist/assets/{index-BvFLIInY.js → index-DFuZY6AH.js} +1 -1
  71. package/dist/assets/{index-HOeFcz85.js → index-DkEoBUP0.js} +1 -1
  72. package/dist/assets/{lexical-D_KbwLmW.js → lexical-M5lTJAid.js} +1 -1
  73. package/dist/assets/{liveblocks-CsaY8yYO.js → liveblocks-CIemOhG-.js} +1 -1
  74. package/dist/assets/{lottie-DbDVmnvZ.js → lottie-B2gqVn8r.js} +1 -1
  75. package/dist/assets/{mui-CblpH0Ha.js → mui-CDOihXSU.js} +1 -1
  76. package/dist/assets/{pathToGoBack-j1V7r3Mn.js → pathToGoBack-CtOd2xg3.js} +1 -1
  77. package/dist/assets/{pdf-D2egRSjc.js → pdf-NpxYPuZF.js} +3 -3
  78. package/dist/assets/{pdf-lib-DMbxzmyG.js → pdf-lib-DWrkZXLc.js} +1 -1
  79. package/dist/assets/{plaid-74upgTWR.js → plaid-DnBvUvOI.js} +1 -1
  80. package/dist/assets/{pusher-CjiDlk8e.js → pusher-BFMykl2k.js} +1 -1
  81. package/dist/assets/{react-sFkWW8vV.js → react-CLF6YQJD.js} +1 -1
  82. package/dist/assets/{react-Dvg14ilb.js → react-CLIVy0Jg.js} +1 -1
  83. package/dist/assets/{react-B9xrzEYj.js → react-D0hKuvBj.js} +1 -1
  84. package/dist/assets/{react-Bdgrv6d7.js → react-DkRh_xsn.js} +1 -1
  85. package/dist/assets/{react-otWFcO3Y.js → react-Dy_Hydyd.js} +1 -1
  86. package/dist/assets/{react-lDmXKsDH.js → react-I9iDEUuR.js} +1 -1
  87. package/dist/assets/{recharts-NoTYHO1X.js → recharts-D7dc1KPB.js} +1 -1
  88. package/dist/assets/{routePaths-DlT4djwo.js → routePaths-CIGM6tzV.js} +1 -1
  89. package/dist/assets/{sentry-BUYxAJ0R.js → sentry-238zX06J.js} +1 -1
  90. package/dist/assets/{url-SyvMap6d.js → url-BN4Uf0Cp.js} +1 -1
  91. package/dist/assets/{url-5YtRx5NC.js → url-Duo8Rf1y.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BOfvB1qP.js → useAiCfoDashboardSuggestedQuestionsChips-CDMT-TGN.js} +1 -1
  93. package/dist/assets/{useAskAiCfoHostNavButtonProps-BNRHSSlT.js → useAskAiCfoHostNavButtonProps-QHf32w33.js} +1 -1
  94. package/dist/assets/{useCashManagementBanner-BqwuaRBx.js → useCashManagementBanner-CwqRCL0P.js} +1 -1
  95. package/dist/assets/{useChargeCardPusherEvents-ek7O5vue.js → useChargeCardPusherEvents-B0-Of6tK.js} +1 -1
  96. package/dist/assets/{useDeviceId-LzGT5z98.js → useDeviceId-CbBc59Iy.js} +1 -1
  97. package/dist/assets/{useEmailConnectResultRefresh-C_KtOMfR.js → useEmailConnectResultRefresh-DiBfHc_1.js} +1 -1
  98. package/dist/assets/{useInitialThreadRequest-tlPkIpCr.js → useInitialThreadRequest-B2VhczBO.js} +1 -1
  99. package/dist/assets/{utils-D-CJm-xs.js → utils-BaZQaz5F.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-D-rC67hx.js → withTransactionSidePanel-Bmg5vkAc.js} +1 -1
  101. package/dist/assets/{zeni-epic-state-DcOrwCh7.js → zeni-epic-state-Xn27LBb6.js} +5 -5
  102. package/dist/index.html +1 -1
  103. package/package.json +2 -2
  104. package/dist/assets/AddressRoutes-DVAWy_gb.js +0 -1
  105. package/dist/assets/CustomerOnboardingAuthScreen-Bkbz75T7.js +0 -1
  106. package/dist/assets/CustomerOnboardingRoutes-CGaSQM6e.js +0 -30
  107. package/dist/assets/DashboardRoutes-Ckr_4PFZ.js +0 -20
  108. package/dist/assets/MobileAppDrawer-CmiSBVZw.js +0 -1
  109. package/dist/assets/NotFoundScreen-BTmOJXuO.js +0 -1
  110. package/dist/assets/SignOutScreen-CnFKE_oa.js +0 -9
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-CsaY8yYO.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BUYxAJ0R.js";import{L as dt,bY as Tc,eX as Ac,LW as Rc,Mo as kl,c6 as Tl,g1 as Al,g2 as Rl}from"./zeni-epic-state-DcOrwCh7.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-D-CJm-xs.js";import{r as un}from"./empty-b5TFvQkm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DMbxzmyG.js";import{r as Gl}from"./index-HOeFcz85.js";import{r as zl}from"./index-DM4yT559.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BoNEfvLs.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,n as Ql,f as tf}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{d as Pe}from"./decodeURIComponentSafe-v7XwPgPo.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]="f68ed07f-fb50-43a1-bda6-575803ec12f2",t._sentryDebugIdIdentifier="sentry-dbid-f68ed07f-fb50-43a1-bda6-575803ec12f2")}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(`
1
+ import{j as Ol}from"./liveblocks-CIemOhG-.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-238zX06J.js";import{L as dt,bY as Tc,eX as Ac,LW as Rc,Mo as kl,c6 as Tl,g1 as Al,g2 as Rl}from"./zeni-epic-state-Xn27LBb6.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-BaZQaz5F.js";import{r as un}from"./empty-rUUW8qXy.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DWrkZXLc.js";import{r as Gl}from"./index-DkEoBUP0.js";import{r as zl}from"./index-CqsQnZaN.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BXHWSH6o.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,n as Ql,f as tf}from"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import{d as Pe}from"./decodeURIComponentSafe-DEgBTC44.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]="f68ed07f-fb50-43a1-bda6-575803ec12f2",t._sentryDebugIdIdentifier="sentry-dbid-f68ed07f-fb50-43a1-bda6-575803ec12f2")}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
 
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CsaY8yYO.js";import{a as o}from"./sentry-BUYxAJ0R.js";import{j as f,h as V,u as H,g as F,n as N}from"./core-BoNEfvLs.js";import{m as W,Z as _,z as P,bf as $,D as M,Y as U,$ as z,J,f as l,h as K,a8 as X,bg as Y}from"./index-BkGSE7D5.js";import{fI as Z,eX as q,Pm as R,Pn as G,vI as Q,vy as g,fK as ee,bS as ae,vD as re,Po as ne}from"./zeni-epic-state-DcOrwCh7.js";import{D as te,e as se,n as oe,S as ie}from"./mui-CblpH0Ha.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{M as de}from"./MobileAppDrawer-CmiSBVZw.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]="71dde029-2a00-4ea5-88ed-1894f7a168ec",e._sentryDebugIdIdentifier="sentry-dbid-71dde029-2a00-4ea5-88ed-1894f7a168ec")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>Z(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.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:d=>d.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
1
+ import{j as s}from"./liveblocks-CIemOhG-.js";import{a as o}from"./sentry-238zX06J.js";import{j as f,h as V,u as H,g as F,n as N}from"./core-BXHWSH6o.js";import{m as W,Z as _,z as P,bf as $,D as M,Y as U,$ as z,J,f as l,h as K,a8 as X,bg as Y}from"./index-CMicf90d.js";import{fI as Z,eX as q,Pm as R,Pn as G,vI as Q,vy as g,fK as ee,bS as ae,vD as re,Po as ne}from"./zeni-epic-state-Xn27LBb6.js";import{D as te,e as se,n as oe,S as ie}from"./mui-CDOihXSU.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-QHf32w33.js";import{M as de}from"./MobileAppDrawer-DXoZqPdU.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]="71dde029-2a00-4ea5-88ed-1894f7a168ec",e._sentryDebugIdIdentifier="sentry-dbid-71dde029-2a00-4ea5-88ed-1894f7a168ec")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>Z(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.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:d=>d.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-CsaY8yYO.js";import _ from"./NotFoundScreen-BTmOJXuO.js";import{a as p}from"./sentry-BUYxAJ0R.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-BoNEfvLs.js";import{eX as I,Qg as g,Qw as S,FD as V,EM as U,FC as d,Ft as $,QK as B,FF as W}from"./zeni-epic-state-DcOrwCh7.js";import{z as N,a8 as L,b_ as Q,af as T,bD as K,b$ as z}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{u as M,R as A}from"./ReimbursementApprovalRuleDetailScreen-Co6mqX7V.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]="f2e90a39-cb30-4858-8382-0bbe66f676d6",e._sentryDebugIdIdentifier="sentry-dbid-f2e90a39-cb30-4858-8382-0bbe66f676d6")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(L(Q)),q=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(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||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=g(e),s=S(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(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}})(L(z)),H=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=K(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(q,{isLoading:s})},J=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));M();const v=u(a=>S(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||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),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
+ import{j as r}from"./liveblocks-CIemOhG-.js";import _ from"./NotFoundScreen-BPydeesy.js";import{a as p}from"./sentry-238zX06J.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-BXHWSH6o.js";import{eX as I,Qg as g,Qw as S,FD as V,EM as U,FC as d,Ft as $,QK as B,FF as W}from"./zeni-epic-state-Xn27LBb6.js";import{z as N,a8 as L,b_ as Q,af as T,bD as K,b$ as z}from"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import{u as M,R as A}from"./ReimbursementApprovalRuleDetailScreen-BImN24-1.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]="f2e90a39-cb30-4858-8382-0bbe66f676d6",e._sentryDebugIdIdentifier="sentry-dbid-f2e90a39-cb30-4858-8382-0bbe66f676d6")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(L(Q)),q=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(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||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=g(e),s=S(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(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}})(L(z)),H=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=K(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(q,{isLoading:s})},J=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));M();const v=u(a=>S(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||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),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-CsaY8yYO.js";import{a as f}from"./sentry-BUYxAJ0R.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-BoNEfvLs.js";import{k_ as L,Qw as E,Qg as x,Fw as V,FI as B,FD as A,FE as w,Qx as j,eX as z,FC as K}from"./zeni-epic-state-DcOrwCh7.js";import{z as N,m as P,y as Q,bQ as W,af as $,bD as X,bR as G}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.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]="f7ce4f81-f9fb-4847-ba89-0f70d768fb65",e._sentryDebugIdIdentifier="sentry-dbid-f7ce4f81-f9fb-4847-ba89-0f70d768fb65")}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=F(function(e,s){const t=E(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(w(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(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("../")}}})(W);function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(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=F(function(e,s){const t=E(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:x(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,C=y.selectedRole?.selectedOption;let D=[];S==="role"&&C!=null?D=[{type:"attribute",subType:C,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 U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="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(w(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(w(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(K(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}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(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
+ import{j as b}from"./liveblocks-CIemOhG-.js";import{a as f}from"./sentry-238zX06J.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-BXHWSH6o.js";import{k_ as L,Qw as E,Qg as x,Fw as V,FI as B,FD as A,FE as w,Qx as j,eX as z,FC as K}from"./zeni-epic-state-Xn27LBb6.js";import{z as N,m as P,y as Q,bQ as W,af as $,bD as X,bR as G}from"./index-CMicf90d.js";import"./mui-CDOihXSU.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]="f7ce4f81-f9fb-4847-ba89-0f70d768fb65",e._sentryDebugIdIdentifier="sentry-dbid-f7ce4f81-f9fb-4847-ba89-0f70d768fb65")}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=F(function(e,s){const t=E(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(w(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(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("../")}}})(W);function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(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=F(function(e,s){const t=E(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:x(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,C=y.selectedRole?.selectedOption;let D=[];S==="role"&&C!=null?D=[{type:"attribute",subType:C,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 U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="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(w(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(w(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(K(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}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(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,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CsaY8yYO.js";import{h as W,u as me,g as H,i as Y,j as w,N as _,n as K,l as mt,o as ct,p as E}from"./core-BoNEfvLs.js";import{eX as V,QL as ce,c6 as de,EH as je,kJ as dt,EU as se,ET as ie,QM as ut,bn as ue,gq as Fe,QN as pt,N8 as bt,ky as De,N9 as Re,Na as gt,jt as ht,Q2 as ft,jI as St,Ev as It,uc as Rt,jA as yt,Ff as Ue,QO as Le,QP as At,QQ as vt,QR as kt,QS as Ct,QT as Et,E$ as ye,jO as wt,Qb as xt,EV as Bt,EF as Tt,QU as jt,EE as Ft,QV as Dt,EN as Ae,F3 as Ut,F2 as Lt,E_ as Pt,QW as Pe,Ke as $t,bq as Mt,EQ as _t,Fx as Nt,QX as Ot,QY as Qt,Fb as zt,F8 as ve,Px as Gt,EC as Zt,QZ as $e,FZ as ke,G5 as Ht,Q_ as Vt,Q$ as G,R0 as Wt,R1 as Me,R2 as Kt,R3 as _e,R4 as Ne,Fn as oe,bu as qt,bK as pe,cG as be,fE as Oe,fC as Qe,R5 as Jt,fz as Yt,PK as Xt,R6 as en,R7 as ze,PO as tn,Qw as nn,R8 as an,QK as sn,G2 as Ce,G1 as on,R9 as rn,Ra as ln,Rb as mn,Rc as cn,Rd as dn,Qh as un,FU as pn,FY as bn,bs as gn,bJ as hn,cA as fn,co as Sn,bt as In,LY as Rn,cQ as yn,cT as An,cS as vn,cz as kn}from"./zeni-epic-state-DcOrwCh7.js";import{A as Ge,Z as Ze,Q as X,e as v,z as M,c0 as He,J as ee,f as k,aL as Ee,o as F,at as J,H as Cn,a as Ve,c1 as En,v as Z,$ as We,c2 as wn,I as te,c3 as xn,Y as Bn,D as Tn,y as ge,h as Ke,a8 as jn,bo as Fn,a3 as Dn,m as qe,c4 as Un,i as Ln}from"./index-BkGSE7D5.js";import{n as N,S as Pn}from"./mui-CblpH0Ha.js";import re from"./NotFoundScreen-BTmOJXuO.js";import{S as we}from"./SetupPagesScreen-C5uQEz7K.js";import{F as Je}from"./FeaturePreviewScreen-9qGkTofX.js";import{a as f}from"./sentry-BUYxAJ0R.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{u as Ye}from"./useInitialThreadRequest-tlPkIpCr.js";import{D as $n}from"./DrawerScreen-enq1kex3.js";import{M as Xe}from"./MobileAppDrawer-CmiSBVZw.js";import{R as Mn}from"./ReimbursementApprovalRoutes-D7K2CtZa.js";import{FallBackRoute as _n}from"./ScreenRoutes-S4iuOC-S.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./analyticsHelper-Bq2cX6hw.js";import"./routePaths-DlT4djwo.js";import"./BusinessVerificationPageScreen-CxMuID_0.js";import"./ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js";import"./getLocaleForTenant-B4Of7eQD.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]="e7d8beff-8eda-4333-a3e1-d50cd7e6fae3",e._sentryDebugIdIdentifier="sentry-dbid-e7d8beff-8eda-4333-a3e1-d50cd7e6fae3")}catch{}})();const et=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:U}}}=Ve.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=M.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(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:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!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(Ae(!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(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e(Ue(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(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(En);function xe(){const e=W(),t=me(),n=H(),{reimbursementId:r}=Y(),d=Ge(),c=Ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(v.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=H().pathname,j=x.includes("edit"),A=x.includes("reimbursement/new"),[D,B]=f.useState(!1),C=M.getSignedInUser(),I=w(p=>V(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(je(!1,b,y,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==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"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(ee,{analytics:k,onLoad:p=>(z=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&z.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Gn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({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:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({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:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
1
+ import{j as s}from"./liveblocks-CIemOhG-.js";import{h as W,u as me,g as H,i as Y,j as w,N as _,n as K,l as mt,o as ct,p as E}from"./core-BXHWSH6o.js";import{eX as V,QL as ce,c6 as de,EH as je,kJ as dt,EU as se,ET as ie,QM as ut,bn as ue,gq as Fe,QN as pt,N8 as bt,ky as De,N9 as Re,Na as gt,jt as ht,Q2 as ft,jI as St,Ev as It,uc as Rt,jA as yt,Ff as Ue,QO as Le,QP as At,QQ as vt,QR as kt,QS as Ct,QT as Et,E$ as ye,jO as wt,Qb as xt,EV as Bt,EF as Tt,QU as jt,EE as Ft,QV as Dt,EN as Ae,F3 as Ut,F2 as Lt,E_ as Pt,QW as Pe,Ke as $t,bq as Mt,EQ as _t,Fx as Nt,QX as Ot,QY as Qt,Fb as zt,F8 as ve,Px as Gt,EC as Zt,QZ as $e,FZ as ke,G5 as Ht,Q_ as Vt,Q$ as G,R0 as Wt,R1 as Me,R2 as Kt,R3 as _e,R4 as Ne,Fn as oe,bu as qt,bK as pe,cG as be,fE as Oe,fC as Qe,R5 as Jt,fz as Yt,PK as Xt,R6 as en,R7 as ze,PO as tn,Qw as nn,R8 as an,QK as sn,G2 as Ce,G1 as on,R9 as rn,Ra as ln,Rb as mn,Rc as cn,Rd as dn,Qh as un,FU as pn,FY as bn,bs as gn,bJ as hn,cA as fn,co as Sn,bt as In,LY as Rn,cQ as yn,cT as An,cS as vn,cz as kn}from"./zeni-epic-state-Xn27LBb6.js";import{A as Ge,Z as Ze,Q as X,e as v,z as M,c0 as He,J as ee,f as k,aL as Ee,o as F,at as J,H as Cn,a as Ve,c1 as En,v as Z,$ as We,c2 as wn,I as te,c3 as xn,Y as Bn,D as Tn,y as ge,h as Ke,a8 as jn,bo as Fn,a3 as Dn,m as qe,c4 as Un,i as Ln}from"./index-CMicf90d.js";import{n as N,S as Pn}from"./mui-CDOihXSU.js";import re from"./NotFoundScreen-BPydeesy.js";import{S as we}from"./SetupPagesScreen-C_NeLXz4.js";import{F as Je}from"./FeaturePreviewScreen-CW2ZZwGb.js";import{a as f}from"./sentry-238zX06J.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-QHf32w33.js";import{u as Ye}from"./useInitialThreadRequest-B2VhczBO.js";import{D as $n}from"./DrawerScreen-BkDOJtg1.js";import{M as Xe}from"./MobileAppDrawer-DXoZqPdU.js";import{R as Mn}from"./ReimbursementApprovalRoutes-CgceXA7l.js";import{FallBackRoute as _n}from"./ScreenRoutes-IcWHAutY.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./analyticsHelper-BA_yiiPD.js";import"./routePaths-CIGM6tzV.js";import"./BusinessVerificationPageScreen-BN8pHa0i.js";import"./ReimbursementApprovalRuleDetailScreen-BImN24-1.js";import"./getLocaleForTenant-DXvFXHW9.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]="e7d8beff-8eda-4333-a3e1-d50cd7e6fae3",e._sentryDebugIdIdentifier="sentry-dbid-e7d8beff-8eda-4333-a3e1-d50cd7e6fae3")}catch{}})();const et=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:U}}}=Ve.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=M.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(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:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!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(Ae(!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(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e(Ue(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(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(En);function xe(){const e=W(),t=me(),n=H(),{reimbursementId:r}=Y(),d=Ge(),c=Ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(v.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=H().pathname,j=x.includes("edit"),A=x.includes("reimbursement/new"),[D,B]=f.useState(!1),C=M.getSignedInUser(),I=w(p=>V(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(je(!1,b,y,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==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"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(ee,{analytics:k,onLoad:p=>(z=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&z.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Gn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({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:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({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:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as p}from"./liveblocks-CsaY8yYO.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-BoNEfvLs.js";import{eX as v,fT as w,Mp as Te,ky as Z,qS as J,rH as A,km as Re,jq as Me,vc as K,rM as Oe,bs as Ae,Mq as Fe,bn as ke,wl as De,Mr as Ee,Ms as je,v4 as Pe,Mt as Y,Mu as ve,Mv as Le,Mw as Be,Mx as Ve,My as I,Mz as F,MA as k,MB as q,MC as D,MD as E,dK as Ue,w1 as xe,vR as N,vS as $,w7 as ze,vW as Q,wd as Ge,ME as He,MF as Ye,MG as qe,MH as Ne,MI as $e,fE as Qe,fC as We}from"./zeni-epic-state-DcOrwCh7.js";import{U as Xe,V as Ze,W as Je,X as Ke,Z as ea,Q as ee,e as j,z as ae,Y as aa,I as sa,c as ta,_ as oa,$ as na,J as ra,f as P,h as ia,a0 as la,v as se,a1 as ca,a2 as da,a3 as pa}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import fa from"./NotFoundScreen-BTmOJXuO.js";import{F as ma}from"./FeaturePreviewScreen-9qGkTofX.js";import{a as _}from"./sentry-BUYxAJ0R.js";import{u as ua}from"./useInitialThreadRequest-tlPkIpCr.js";import{t as W,a as X,b as _a}from"./routePaths-DlT4djwo.js";import{M as ha}from"./MobileAppDrawer-CmiSBVZw.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.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]="08ad8127-a9bf-46a9-89ba-02c51f6650f9",e._sentryDebugIdIdentifier="sentry-dbid-08ad8127-a9bf-46a9-89ba-02c51f6650f9")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(qe()),e(Ne()),e($e())},Ca=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:Z(e),isAccountingProjectsEnabled:J(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(He(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(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(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(Q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Q(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(N(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 W(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return X(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?X(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?W(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(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(q({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(E({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(q({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(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.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),g=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Z(n)),M=d(n=>J(n)),le=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&g==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,L,g,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(K());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=Xe(he??"")==="reports",be=Ze(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Je({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{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(j.isDebitCardFeatureEnabled),u=Qe(f,e),a=We(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
1
+ import{j as p}from"./liveblocks-CIemOhG-.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-BXHWSH6o.js";import{eX as v,fT as w,Mp as Te,ky as Z,qS as J,rH as A,km as Re,jq as Me,vc as K,rM as Oe,bs as Ae,Mq as Fe,bn as ke,wl as De,Mr as Ee,Ms as je,v4 as Pe,Mt as Y,Mu as ve,Mv as Le,Mw as Be,Mx as Ve,My as I,Mz as F,MA as k,MB as q,MC as D,MD as E,dK as Ue,w1 as xe,vR as N,vS as $,w7 as ze,vW as Q,wd as Ge,ME as He,MF as Ye,MG as qe,MH as Ne,MI as $e,fE as Qe,fC as We}from"./zeni-epic-state-Xn27LBb6.js";import{U as Xe,V as Ze,W as Je,X as Ke,Z as ea,Q as ee,e as j,z as ae,Y as aa,I as sa,c as ta,_ as oa,$ as na,J as ra,f as P,h as ia,a0 as la,v as se,a1 as ca,a2 as da,a3 as pa}from"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import fa from"./NotFoundScreen-BPydeesy.js";import{F as ma}from"./FeaturePreviewScreen-CW2ZZwGb.js";import{a as _}from"./sentry-238zX06J.js";import{u as ua}from"./useInitialThreadRequest-B2VhczBO.js";import{t as W,a as X,b as _a}from"./routePaths-CIGM6tzV.js";import{M as ha}from"./MobileAppDrawer-DXoZqPdU.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="08ad8127-a9bf-46a9-89ba-02c51f6650f9",e._sentryDebugIdIdentifier="sentry-dbid-08ad8127-a9bf-46a9-89ba-02c51f6650f9")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(qe()),e(Ne()),e($e())},Ca=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:Z(e),isAccountingProjectsEnabled:J(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(He(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(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(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(Q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Q(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(N(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 W(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return X(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?X(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?W(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(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(q({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(E({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(q({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(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.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),g=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Z(n)),M=d(n=>J(n)),le=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&g==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,L,g,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(K());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=Xe(he??"")==="reports",be=Ze(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Je({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{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(j.isDebitCardFeatureEnabled),u=Qe(f,e),a=We(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
@@ -1 +1 @@
1
- import{j as e}from"./liveblocks-CsaY8yYO.js";import{Q as j,z as w,aR as y,J as E,f as p,h as F,d7 as P,e as T}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import m from"./NotFoundScreen-BTmOJXuO.js";import{a as u}from"./sentry-BUYxAJ0R.js";import{u as L,j as b,h as R,g as V,n as A,o as U,p as f}from"./core-BoNEfvLs.js";import{eX as z,TD as C,PX as G,TE as v,vI as X,fK as Y,TF as J,vG as K}from"./zeni-epic-state-DcOrwCh7.js";import{R as x}from"./ReferralListScreen-CAuT5MkH.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import"./MobileAppDrawer-CmiSBVZw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a2f34c47-1650-4482-b036-92ac5b1cc031",a._sentryDebugIdIdentifier="sentry-dbid-a2f34c47-1650-4482-b036-92ac5b1cc031")}catch{}})();const O=A(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(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)}a(K())},onUpdateInviteFormLocalData:s=>{a(J({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Q=()=>{const a=L(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=R(),D=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),_=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),I=G(k);u.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(X()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(Y(!0)))},[l.fetchState,a]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(O,{navigate:c,location:D,currentTenant:r,companyName:N,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function fa(){const{useFeatureGate:a}=j(),{isFeatureEnabled:t}=a(T.isReferralFeatureEnabled);return e.jsxs(U,{children:[e.jsx(f,{path:"/",element:t?e.jsx(x,{}):e.jsx(m,{})}),e.jsx(f,{path:"how-it-works",element:t?e.jsx(x,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(f,{path:"refer/*",element:t?e.jsx(Q,{}):e.jsx(m,{})}),e.jsx(f,{path:"*",element:e.jsx(m,{})})]})}export{fa as default};
1
+ import{j as e}from"./liveblocks-CIemOhG-.js";import{Q as j,z as w,aR as y,J as E,f as p,h as F,d7 as P,e as T}from"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import m from"./NotFoundScreen-BPydeesy.js";import{a as u}from"./sentry-238zX06J.js";import{u as L,j as b,h as R,g as V,n as A,o as U,p as f}from"./core-BXHWSH6o.js";import{eX as z,TD as C,PX as G,TE as v,vI as X,fK as Y,TF as J,vG as K}from"./zeni-epic-state-Xn27LBb6.js";import{R as x}from"./ReferralListScreen-8JSWVt-7.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./useAskAiCfoHostNavButtonProps-QHf32w33.js";import"./MobileAppDrawer-DXoZqPdU.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a2f34c47-1650-4482-b036-92ac5b1cc031",a._sentryDebugIdIdentifier="sentry-dbid-a2f34c47-1650-4482-b036-92ac5b1cc031")}catch{}})();const O=A(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(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)}a(K())},onUpdateInviteFormLocalData:s=>{a(J({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Q=()=>{const a=L(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=R(),D=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),_=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),I=G(k);u.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(X()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(Y(!0)))},[l.fetchState,a]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(O,{navigate:c,location:D,currentTenant:r,companyName:N,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function fa(){const{useFeatureGate:a}=j(),{isFeatureEnabled:t}=a(T.isReferralFeatureEnabled);return e.jsxs(U,{children:[e.jsx(f,{path:"/",element:t?e.jsx(x,{}):e.jsx(m,{})}),e.jsx(f,{path:"how-it-works",element:t?e.jsx(x,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(f,{path:"refer/*",element:t?e.jsx(Q,{}):e.jsx(m,{})}),e.jsx(f,{path:"*",element:e.jsx(m,{})})]})}export{fa as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-Ckr_4PFZ.js","assets/sentry-BUYxAJ0R.js","assets/core-BoNEfvLs.js","assets/zeni-epic-state-DcOrwCh7.js","assets/index-BkGSE7D5.js","assets/mui-CblpH0Ha.js","assets/analytics-ChMmdjNV.js","assets/utils-D-CJm-xs.js","assets/withTransactionSidePanel-D-rC67hx.js","assets/useAskAiCfoHostNavButtonProps-BNRHSSlT.js","assets/TransactionDetailScreen-D6QDGxGu.js","assets/decodeURIComponentSafe-v7XwPgPo.js","assets/routePaths-DlT4djwo.js","assets/NotFoundScreen-BTmOJXuO.js","assets/useInitialThreadRequest-tlPkIpCr.js","assets/analyticsHelper-Bq2cX6hw.js","assets/CompanyPassportScreen-3LH__AFc.js","assets/MobileAppDrawer-CmiSBVZw.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BOfvB1qP.js","assets/FeaturePreviewScreen-9qGkTofX.js","assets/ReferralListScreen-CAuT5MkH.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-BJdksoIS.js","assets/AddressScreen-DjHFWXZd.js","assets/DomesticWireDetailScreen-DZ8naknM.js","assets/DrawerScreen-enq1kex3.js","assets/SetupPagesScreen-C5uQEz7K.js","assets/BusinessVerificationPageScreen-CxMuID_0.js","assets/BillPayApprovalRoutes-5yoLyMdf.js","assets/ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js","assets/getLocaleForTenant-B4Of7eQD.js","assets/ReimbursementRoutes-Dc6yhpRS.js","assets/ReimbursementApprovalRoutes-D7K2CtZa.js","assets/TransactionListRoutes-Bhdw74c5.js","assets/ZeniAccountStatementScreen-WWIAEGl-.js","assets/SettingsRoutes-Bo4skXXS.js","assets/accountMappingHelper-talErUKy.js","assets/useEmailConnectResultRefresh-C_KtOMfR.js","assets/QBOConnectionScreen-CXuCwnVv.js","assets/empty-b5TFvQkm.js","assets/index-HOeFcz85.js","assets/url-SyvMap6d.js","assets/index-DM4yT559.js","assets/ReportsRoutes-0B9PMrKM.js","assets/ChargeCardRoutes-ZORkbkMi.js","assets/useChargeCardPusherEvents-ek7O5vue.js","assets/PeopleRoutes-C4dcMrZ_.js","assets/ExpenseAutomationRoutes-CCWIfo0Y.js","assets/TreasuryRoutes-Tn0wVhtU.js","assets/useCashManagementBanner-BqwuaRBx.js","assets/VendorsRoutes-COmvFuAL.js","assets/pathToGoBack-j1V7r3Mn.js","assets/ZeniAccountRoutes-CteciRDO.js","assets/AddressRoutes-DVAWy_gb.js","assets/PandLWithForecastRoutes-CQW3cuEJ.js","assets/CustomerOnboardingRoutes-CGaSQM6e.js","assets/TransactionDetailRoutes-BaHmdvMt.js","assets/EntityDetailRoutes-1jh84Y19.js","assets/NotificationRoutes-DMjWy9uH.js","assets/PerformanceRoutes-C70AcB2c.js","assets/RewardsRoutes-BIy5lqI9.js","assets/TaskRoutes-8GtswDRs.js","assets/TaskListScreen-DF5lH-3k.js","assets/AiCfoScreen-Coov-9Lq.js","assets/CardsAiCfoScreen-7MbovH-h.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as as,eX as rs,fE as is,fC as os,gl as ls,fr as cs,cU as Ae,cA as ds,fU as us,cs as ms,bE as _s,bo as Es,fZ as ps,v as As,LX as hs,bs as gs,LY as xs,bK as Is,fW as Ts,bJ as js,bt as Rs,co as Us,LZ as bs,L_ as Ds,cQ as ys,cT as fs,cS as Cs,cz as Hs,cG as vs,oa as he,fA as ge,gv as Os,g1 as xe,gs as Ie,gt as Te,g2 as Ps}from"./zeni-epic-state-DcOrwCh7.js";import{j as e}from"./liveblocks-CsaY8yYO.js";import{a as v}from"./sentry-BUYxAJ0R.js";import{u as Fs,h as Ls,i as ks,g as Bs,j as G,l as je,N as c,o as Vs,p as a}from"./core-BoNEfvLs.js";import{m as Ss,u as Ns,z as b,Q as ws,c as Zs,d as Ms,e as B,i as zs,I as Gs,L as F,a as Re,t as _,P as $s,f as K,l}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{f as Ue}from"./analyticsHelper-Bq2cX6hw.js";import{t as Ys}from"./getLocaleForTenant-B4Of7eQD.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new r.Error().stack;j&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[j]="d12ddbae-3599-4eef-a3a2-1b0cda60a666",r._sentryDebugIdIdentifier="sentry-dbid-d12ddbae-3599-4eef-a3a2-1b0cda60a666")}catch{}})();const Ws={dashboard:()=>n(()=>import("./DashboardRoutes-Ckr_4PFZ.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:()=>n(()=>import("./BillPayRoutes-BJdksoIS.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:()=>n(()=>import("./ReimbursementRoutes-Dc6yhpRS.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:()=>n(()=>import("./TransactionListRoutes-Bhdw74c5.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-Bo4skXXS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-0B9PMrKM.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-ZORkbkMi.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>n(()=>import("./PeopleRoutes-C4dcMrZ_.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CCWIfo0Y.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-Tn0wVhtU.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-COmvFuAL.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CteciRDO.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=r=>{"requestIdleCallback"in window?requestIdleCallback(r):setTimeout(r,100)},Qs=l(()=>n(()=>import("./ReportsRoutes-0B9PMrKM.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Xs=l(()=>n(()=>import("./AddressRoutes-DVAWy_gb.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),Js=l(()=>n(()=>import("./PeopleRoutes-C4dcMrZ_.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),Ks=l(()=>n(()=>import("./PandLWithForecastRoutes-CQW3cuEJ.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-CGaSQM6e.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-COmvFuAL.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-BaHmdvMt.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),be=l(()=>n(()=>import("./EntityDetailRoutes-1jh84Y19.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),tn=l(()=>n(()=>import("./DashboardRoutes-Ckr_4PFZ.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(()=>n(()=>import("./BillPayRoutes-BJdksoIS.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]))),an=l(()=>n(()=>import("./SettingsRoutes-Bo4skXXS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21]))),ye=l(()=>n(()=>import("./ReimbursementRoutes-Dc6yhpRS.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]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-CteciRDO.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-Tn0wVhtU.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-Bhdw74c5.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-ZORkbkMi.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-DMjWy9uH.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),un=l(()=>n(()=>import("./PerformanceRoutes-C70AcB2c.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),mn=l(()=>n(()=>import("./ExpenseAutomationRoutes-CCWIfo0Y.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-BIy5lqI9.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),En=l(()=>n(()=>import("./TaskRoutes-8GtswDRs.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-Coov-9Lq.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),fe=l(()=>n(()=>import("./CardsAiCfoScreen-7MbovH-h.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),y=l(()=>n(()=>import("./NotFoundScreen-BTmOJXuO.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),An=l(()=>n(()=>import("./TaskListScreen-DF5lH-3k.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:r}){const j=Fs(),V=Ls(),{tenantEmailDomain:o}=ks(),S=Ss().mode,{setLoading:C,clearAllLoading:O,clearLoading:N}=Ns(),f=b.getSignedInUserTenant(o)?.tenantId,I=b.getSignedInUser(),se=as(I),$=Bs(),[w,He]=v.useState(!1),i=G(t=>rs(t)),{useFeatureGate:L}=ws(),M=Zs(),ne=Ms(),{isFeatureEnabled:ve}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Oe}=L(B.isTreasuryEnabled),{isFeatureEnabled:Pe}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=L(B.isDebitCardFeatureEnabled),R=G(t=>t.tenantState.fetchState),T=G(t=>t.tenantState.activeTenantFetchState.fetchState),E=T==="Completed"||R==="Completed"?is(te,i):void 0,Q=T==="Completed"||R==="Completed"?os(i):void 0,Fe=zs(i,Pe,te),{isFeatureEnabled:Le}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=L(B.isAiCfoFileUploadEnabled),Y=G(t=>ls(t));if(o!=null){const t=b.getSignedInUserTenant(o);I!=null&&t!=null&&Ue(I,i,S)}const z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ae=cs(),p=Gs(),ke=i.company==null||p?.loggedInUserRoleMap!=null&&Ae(p.loggedInUserRole),Be=ds(p?.loggedInUserRoleMap),re=v.useRef(!0),ie=je("/:tenantEmailDomain/onboarding/*")!==null,J=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(t=>z.tenantId!=null?us(t,z.tenantId):void 0);v.useEffect(()=>{C(F.TENANT_FETCHING),r(o)},[o]),v.useEffect(()=>{if(J!=null&&f!=null){const t=J.params.selectedPeriod;if(t!=null){const U=t.split("-");if(U.length===2){const d=ms(Number(U[0])),s=Number(U[1]),u=_s(`01-${d<10?`0${d}`:d}-${s}`,Re.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=Es();u.isAfter(Z,"month")===!1?j(ps(f,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[J,f]),v.useEffect(()=>{w||(He(!0),C(F.TENANT_FETCHING)),re.current?re.current=!1:!As(ae,z)&&b.isSignedIn()&&(C(F.TENANT_FETCHING),function(t,U,d,s){if(ge(U?.userId,U?.zeniSessionId,t.tenantId),d(Os(!0)),d(xe(t.tenantId)),t.tenantId!=null&&_.clearTenant(t.tenantId),t.tenantId!=null){const u=b.getSignedInUserTenantWithId(t.tenantId);s&&Re.updateAppLocaleID(Ys(s)),u?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(u?.tenantEmailDomain)}t.userId!=null?K.identify(t.userId,{tenant_id:t.tenantId}):K.resetUserIdentity()}(z,I,j,Ve))},[z,ae,I,j,b]),v.useEffect(()=>{b.isSignedIn()&&(C(F.TENANT_FETCHING),function(t,U,d,s,u,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&u?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,ts=d!=null&&d.externalConnections==null;if(W&&ss){k(xe(s));const q=b.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(u?.userId,u?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(u.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(u.userId,s)))}else W&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(u.userId,s))),W&&ts&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(u.userId,s)));if(W){K.identify(u.userId,{tenant_id:s});const q=s==null||s!=null&&(U==="Completed"||U==="Error");t==="Completed"||U!=="Not-Started"&&U!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Ps(u.userId,s,u.zeniSessionId))),q&&(t==="Not-Started"||t==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(he(u.userId,u.zeniSessionId)))}}(R,T,i,f,I,C,j))},[f,T]),v.useEffect(()=>{b.isSignedIn()&&R==="Completed"&&Y.tenantsBaseInOrder.length>0&&(N(F.TENANT_FETCHING),b.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),I!=null&&Ue(I,i,S,void 0,Y.tenantsBaseInOrder))},[Y,R,i,I]),v.useEffect(()=>{T==="In-Progress"&&C(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&f!=null?(O(),_.markActiveTenantFetchCompleted(f)):T==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),N(F.TENANT_FETCHING),N(F.TENANT_SWITCHING))),R!=="Completed"&&R!=="Error"||(R==="Completed"?_.markAllTenantsFetchCompleted():R==="Error"&&_.markAllTenantsFetchFailed())},[T,R,f,w]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&T==="Completed"&&w&&(oe.current=!0,function(t=qs,U=3e3){setTimeout(()=>{const d=s=>{if(s>=t.length)return;const u=t[s],Z=Ws[u];Z!=null?Z().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},U)}())},[T,w]);const H=i?.userRole!=null&&gs(i?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ne=i?.userRole!=null&&i.userRole.includes("charge_card_user"),we=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&Ae(i.userRole),le=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!H,ce=Fe&&!H,Ze=xs(p?.loggedInUserRoleMap),Me=i.externalConnections?.accounting[0]?.isValid,de=i.company?.companyOnboardingInfo.isOnboardingCompleted,ue=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!H,me=ue&&Is(p?.loggedInUserRoleMap),_e=ve&&!H,ze=i.company!=null&&Ts(i.company),Ge=Oe&&ze===!0&&!H,$e=le&&js(p?.loggedInUserRoleMap),Ye=ce&&Rs(p?.loggedInUserRoleMap),We=_e&&Us(p?.loggedInUserRoleMap),qe=bs(p?.loggedInUserRoleMap),Qe=Ds(p?.loggedInUserRoleMap),A=ys(p?.loggedInUserRoleMap),h=fs(p?.loggedInUserRoleMap),Xe=Cs(p?.loggedInUserRoleMap),g=Hs(p?.loggedInUserRoleMap),x=vs(p?.loggedInUserRoleMap),Ee=le&&g,pe=ue&&x,Je=_e&&A,Ke=Ge&&h,m=ce&&Xe,es=i.excludedResources?.resources?.find(t=>t.resource==="/invites")!=null||Be===!0||Ze===!0||qe===!0||Qe===!0;return b.isSignedIn()?f==null?R==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&R!=="In-Progress"&&j(he(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||R==="Completed"?(de===!0||se&&!ie)&&Me===!1&&E===!1&&Q===!1?(r(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!w||de!==!1||ie||se?w&&i?.userRole&&E!=null&&Q!=null&&o!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Vs,{children:e.jsxs(a,{element:e.jsx($s,{}),children:[e.jsx(a,{path:"/",element:e.jsx(hn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(tn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(Qs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"people/*",element:es||P?e.jsx(Js,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(Ks,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(a,{path:"transaction/*",element:P&&H===!1||Ne||we?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"transactions/*",element:P&&H===!1?e.jsx(ln,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"customer/*",element:P&&H===!1?e.jsx(be,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,isUserHasTreasuryAccess:h,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"vendor/*",element:P&&H===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"tasks",element:e.jsx(An,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(En,{})}),e.jsx(a,{path:"address/*",element:$e||me||We||Ye?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"checking/*",element:Je?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:Ke?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:ne===!0?e.jsx(un,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:ne===!0&&H===!1?e.jsx(mn,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(a,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(a,{path:"vendors/*",element:ke?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"bills/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(ye,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(ye,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"settings/*",element:Le?e.jsx(an,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(fe,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(fe,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(pn,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):null:(r(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),r(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const hn=({isDashboardAccess:r,isUserHasZeniAccountsAccess:j,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:C,isTenantCardsOnly:O,showChargeCardRoute:N})=>C===!0&&j?e.jsx(c,{to:"checking"}):O===!0&&N?e.jsx(c,{to:"cards"}):r?e.jsx(c,{to:"dashboard"}):j?e.jsx(c,{to:"checking"}):S?e.jsx(c,{to:"treasury"}):N?e.jsx(c,{to:"cards"}):V?e.jsx(c,{to:"bills"}):o?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:r,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:V,isUserHasTreasuryAccess:o,isTenantBankingOnly:S,showChargeCardRoute:C,tenantEmailDomain:O})=>S===!0||r?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):C?e.jsx(jn,{tenantEmailDomain:O}):j?e.jsx(xn,{tenantEmailDomain:O}):V?e.jsx(gn,{tenantEmailDomain:O}):e.jsx(y,{}),gn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/reimbursements`}),xn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/bills`}),In=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/treasury`}),Tn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/checking`}),jn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/cards`}),Ce=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/dashboard`});export{D as FallBackRoute,Nn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BcHQSPfi.js","assets/sentry-238zX06J.js","assets/core-BXHWSH6o.js","assets/zeni-epic-state-Xn27LBb6.js","assets/index-CMicf90d.js","assets/mui-CDOihXSU.js","assets/analytics-D9LLahJK.js","assets/utils-BaZQaz5F.js","assets/withTransactionSidePanel-Bmg5vkAc.js","assets/useAskAiCfoHostNavButtonProps-QHf32w33.js","assets/TransactionDetailScreen-BFCNfSuj.js","assets/decodeURIComponentSafe-DEgBTC44.js","assets/routePaths-CIGM6tzV.js","assets/NotFoundScreen-BPydeesy.js","assets/useInitialThreadRequest-B2VhczBO.js","assets/analyticsHelper-BA_yiiPD.js","assets/CompanyPassportScreen-3yTQ9U1p.js","assets/MobileAppDrawer-DXoZqPdU.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CDMT-TGN.js","assets/FeaturePreviewScreen-CW2ZZwGb.js","assets/ReferralListScreen-8JSWVt-7.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-C6exGqkN.js","assets/AddressScreen-CLqHIzyX.js","assets/DomesticWireDetailScreen-DeiqcEkq.js","assets/DrawerScreen-BkDOJtg1.js","assets/SetupPagesScreen-C_NeLXz4.js","assets/BusinessVerificationPageScreen-BN8pHa0i.js","assets/BillPayApprovalRoutes-CZBhRNrs.js","assets/ReimbursementApprovalRuleDetailScreen-BImN24-1.js","assets/getLocaleForTenant-DXvFXHW9.js","assets/ReimbursementRoutes-BeU8Hdsy.js","assets/ReimbursementApprovalRoutes-CgceXA7l.js","assets/TransactionListRoutes-CyMeQZ7M.js","assets/ZeniAccountStatementScreen-B7tQCRYA.js","assets/SettingsRoutes-CH1mDc7s.js","assets/accountMappingHelper-xxDKbgY6.js","assets/useEmailConnectResultRefresh-DiBfHc_1.js","assets/QBOConnectionScreen-BlVFH5zG.js","assets/empty-rUUW8qXy.js","assets/index-DkEoBUP0.js","assets/url-BN4Uf0Cp.js","assets/index-CqsQnZaN.js","assets/ReportsRoutes-BuuKCsLq.js","assets/ChargeCardRoutes-DE9-vLEE.js","assets/useChargeCardPusherEvents-B0-Of6tK.js","assets/PeopleRoutes-CBv7SQ8D.js","assets/ExpenseAutomationRoutes-B6hzZS_w.js","assets/TreasuryRoutes-BhnV8hs8.js","assets/useCashManagementBanner-CwqRCL0P.js","assets/VendorsRoutes-C8TiJ3ID.js","assets/pathToGoBack-CtOd2xg3.js","assets/ZeniAccountRoutes-EJgKENeX.js","assets/AddressRoutes-D0r3QPI4.js","assets/PandLWithForecastRoutes-lKoniDxv.js","assets/CustomerOnboardingRoutes-BbhWhhzo.js","assets/TransactionDetailRoutes-nODyFQ1G.js","assets/EntityDetailRoutes-VjvPi57p.js","assets/NotificationRoutes-D79yRJe0.js","assets/PerformanceRoutes-DOGdmtlY.js","assets/RewardsRoutes-CcenAkjt.js","assets/TaskRoutes-DCWybM7c.js","assets/TaskListScreen-CUCFe3fy.js","assets/AiCfoScreen-qoxT0tW7.js","assets/CardsAiCfoScreen-B0XBkar3.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as as,eX as rs,fE as is,fC as os,gl as ls,fr as cs,cU as Ae,cA as ds,fU as us,cs as ms,bE as _s,bo as Es,fZ as ps,v as As,LX as hs,bs as gs,LY as xs,bK as Is,fW as Ts,bJ as js,bt as Rs,co as Us,LZ as bs,L_ as Ds,cQ as ys,cT as fs,cS as Cs,cz as Hs,cG as vs,oa as he,fA as ge,gv as Os,g1 as xe,gs as Ie,gt as Te,g2 as Ps}from"./zeni-epic-state-Xn27LBb6.js";import{j as e}from"./liveblocks-CIemOhG-.js";import{a as v}from"./sentry-238zX06J.js";import{u as Fs,h as Ls,i as ks,g as Bs,j as G,l as je,N as c,o as Vs,p as a}from"./core-BXHWSH6o.js";import{m as Ss,u as Ns,z as b,Q as ws,c as Zs,d as Ms,e as B,i as zs,I as Gs,L as F,a as Re,t as _,P as $s,f as K,l}from"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import{f as Ue}from"./analyticsHelper-BA_yiiPD.js";import{t as Ys}from"./getLocaleForTenant-DXvFXHW9.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new r.Error().stack;j&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[j]="d12ddbae-3599-4eef-a3a2-1b0cda60a666",r._sentryDebugIdIdentifier="sentry-dbid-d12ddbae-3599-4eef-a3a2-1b0cda60a666")}catch{}})();const Ws={dashboard:()=>n(()=>import("./DashboardRoutes-BcHQSPfi.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:()=>n(()=>import("./BillPayRoutes-C6exGqkN.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:()=>n(()=>import("./ReimbursementRoutes-BeU8Hdsy.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:()=>n(()=>import("./TransactionListRoutes-CyMeQZ7M.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-CH1mDc7s.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-BuuKCsLq.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DE9-vLEE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>n(()=>import("./PeopleRoutes-CBv7SQ8D.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-B6hzZS_w.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BhnV8hs8.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-C8TiJ3ID.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-EJgKENeX.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=r=>{"requestIdleCallback"in window?requestIdleCallback(r):setTimeout(r,100)},Qs=l(()=>n(()=>import("./ReportsRoutes-BuuKCsLq.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Xs=l(()=>n(()=>import("./AddressRoutes-D0r3QPI4.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),Js=l(()=>n(()=>import("./PeopleRoutes-CBv7SQ8D.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),Ks=l(()=>n(()=>import("./PandLWithForecastRoutes-lKoniDxv.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-BbhWhhzo.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-C8TiJ3ID.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-nODyFQ1G.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),be=l(()=>n(()=>import("./EntityDetailRoutes-VjvPi57p.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),tn=l(()=>n(()=>import("./DashboardRoutes-BcHQSPfi.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(()=>n(()=>import("./BillPayRoutes-C6exGqkN.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]))),an=l(()=>n(()=>import("./SettingsRoutes-CH1mDc7s.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21]))),ye=l(()=>n(()=>import("./ReimbursementRoutes-BeU8Hdsy.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]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-EJgKENeX.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BhnV8hs8.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-CyMeQZ7M.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-DE9-vLEE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-D79yRJe0.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),un=l(()=>n(()=>import("./PerformanceRoutes-DOGdmtlY.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),mn=l(()=>n(()=>import("./ExpenseAutomationRoutes-B6hzZS_w.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-CcenAkjt.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),En=l(()=>n(()=>import("./TaskRoutes-DCWybM7c.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-qoxT0tW7.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),fe=l(()=>n(()=>import("./CardsAiCfoScreen-B0XBkar3.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),y=l(()=>n(()=>import("./NotFoundScreen-BPydeesy.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),An=l(()=>n(()=>import("./TaskListScreen-CUCFe3fy.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:r}){const j=Fs(),V=Ls(),{tenantEmailDomain:o}=ks(),S=Ss().mode,{setLoading:C,clearAllLoading:O,clearLoading:N}=Ns(),f=b.getSignedInUserTenant(o)?.tenantId,I=b.getSignedInUser(),se=as(I),$=Bs(),[w,He]=v.useState(!1),i=G(t=>rs(t)),{useFeatureGate:L}=ws(),M=Zs(),ne=Ms(),{isFeatureEnabled:ve}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Oe}=L(B.isTreasuryEnabled),{isFeatureEnabled:Pe}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=L(B.isDebitCardFeatureEnabled),R=G(t=>t.tenantState.fetchState),T=G(t=>t.tenantState.activeTenantFetchState.fetchState),E=T==="Completed"||R==="Completed"?is(te,i):void 0,Q=T==="Completed"||R==="Completed"?os(i):void 0,Fe=zs(i,Pe,te),{isFeatureEnabled:Le}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=L(B.isAiCfoFileUploadEnabled),Y=G(t=>ls(t));if(o!=null){const t=b.getSignedInUserTenant(o);I!=null&&t!=null&&Ue(I,i,S)}const z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ae=cs(),p=Gs(),ke=i.company==null||p?.loggedInUserRoleMap!=null&&Ae(p.loggedInUserRole),Be=ds(p?.loggedInUserRoleMap),re=v.useRef(!0),ie=je("/:tenantEmailDomain/onboarding/*")!==null,J=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(t=>z.tenantId!=null?us(t,z.tenantId):void 0);v.useEffect(()=>{C(F.TENANT_FETCHING),r(o)},[o]),v.useEffect(()=>{if(J!=null&&f!=null){const t=J.params.selectedPeriod;if(t!=null){const U=t.split("-");if(U.length===2){const d=ms(Number(U[0])),s=Number(U[1]),u=_s(`01-${d<10?`0${d}`:d}-${s}`,Re.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=Es();u.isAfter(Z,"month")===!1?j(ps(f,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[J,f]),v.useEffect(()=>{w||(He(!0),C(F.TENANT_FETCHING)),re.current?re.current=!1:!As(ae,z)&&b.isSignedIn()&&(C(F.TENANT_FETCHING),function(t,U,d,s){if(ge(U?.userId,U?.zeniSessionId,t.tenantId),d(Os(!0)),d(xe(t.tenantId)),t.tenantId!=null&&_.clearTenant(t.tenantId),t.tenantId!=null){const u=b.getSignedInUserTenantWithId(t.tenantId);s&&Re.updateAppLocaleID(Ys(s)),u?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(u?.tenantEmailDomain)}t.userId!=null?K.identify(t.userId,{tenant_id:t.tenantId}):K.resetUserIdentity()}(z,I,j,Ve))},[z,ae,I,j,b]),v.useEffect(()=>{b.isSignedIn()&&(C(F.TENANT_FETCHING),function(t,U,d,s,u,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&u?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,ts=d!=null&&d.externalConnections==null;if(W&&ss){k(xe(s));const q=b.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(u?.userId,u?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(u.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(u.userId,s)))}else W&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(u.userId,s))),W&&ts&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Te(u.userId,s)));if(W){K.identify(u.userId,{tenant_id:s});const q=s==null||s!=null&&(U==="Completed"||U==="Error");t==="Completed"||U!=="Not-Started"&&U!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Ps(u.userId,s,u.zeniSessionId))),q&&(t==="Not-Started"||t==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(he(u.userId,u.zeniSessionId)))}}(R,T,i,f,I,C,j))},[f,T]),v.useEffect(()=>{b.isSignedIn()&&R==="Completed"&&Y.tenantsBaseInOrder.length>0&&(N(F.TENANT_FETCHING),b.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),I!=null&&Ue(I,i,S,void 0,Y.tenantsBaseInOrder))},[Y,R,i,I]),v.useEffect(()=>{T==="In-Progress"&&C(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&f!=null?(O(),_.markActiveTenantFetchCompleted(f)):T==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),N(F.TENANT_FETCHING),N(F.TENANT_SWITCHING))),R!=="Completed"&&R!=="Error"||(R==="Completed"?_.markAllTenantsFetchCompleted():R==="Error"&&_.markAllTenantsFetchFailed())},[T,R,f,w]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&T==="Completed"&&w&&(oe.current=!0,function(t=qs,U=3e3){setTimeout(()=>{const d=s=>{if(s>=t.length)return;const u=t[s],Z=Ws[u];Z!=null?Z().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},U)}())},[T,w]);const H=i?.userRole!=null&&gs(i?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ne=i?.userRole!=null&&i.userRole.includes("charge_card_user"),we=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&Ae(i.userRole),le=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!H,ce=Fe&&!H,Ze=xs(p?.loggedInUserRoleMap),Me=i.externalConnections?.accounting[0]?.isValid,de=i.company?.companyOnboardingInfo.isOnboardingCompleted,ue=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!H,me=ue&&Is(p?.loggedInUserRoleMap),_e=ve&&!H,ze=i.company!=null&&Ts(i.company),Ge=Oe&&ze===!0&&!H,$e=le&&js(p?.loggedInUserRoleMap),Ye=ce&&Rs(p?.loggedInUserRoleMap),We=_e&&Us(p?.loggedInUserRoleMap),qe=bs(p?.loggedInUserRoleMap),Qe=Ds(p?.loggedInUserRoleMap),A=ys(p?.loggedInUserRoleMap),h=fs(p?.loggedInUserRoleMap),Xe=Cs(p?.loggedInUserRoleMap),g=Hs(p?.loggedInUserRoleMap),x=vs(p?.loggedInUserRoleMap),Ee=le&&g,pe=ue&&x,Je=_e&&A,Ke=Ge&&h,m=ce&&Xe,es=i.excludedResources?.resources?.find(t=>t.resource==="/invites")!=null||Be===!0||Ze===!0||qe===!0||Qe===!0;return b.isSignedIn()?f==null?R==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&R!=="In-Progress"&&j(he(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||R==="Completed"?(de===!0||se&&!ie)&&Me===!1&&E===!1&&Q===!1?(r(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!w||de!==!1||ie||se?w&&i?.userRole&&E!=null&&Q!=null&&o!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Vs,{children:e.jsxs(a,{element:e.jsx($s,{}),children:[e.jsx(a,{path:"/",element:e.jsx(hn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(tn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(Qs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"people/*",element:es||P?e.jsx(Js,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(Ks,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(a,{path:"transaction/*",element:P&&H===!1||Ne||we?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"transactions/*",element:P&&H===!1?e.jsx(ln,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"customer/*",element:P&&H===!1?e.jsx(be,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,isUserHasTreasuryAccess:h,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"vendor/*",element:P&&H===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"tasks",element:e.jsx(An,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(En,{})}),e.jsx(a,{path:"address/*",element:$e||me||We||Ye?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"checking/*",element:Je?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:Ke?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:ne===!0?e.jsx(un,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:ne===!0&&H===!1?e.jsx(mn,{}):e.jsx(Ce,{tenantEmailDomain:o})}),e.jsx(a,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(a,{path:"vendors/*",element:ke?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"bills/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(ye,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(ye,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:h,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:o})}),e.jsx(a,{path:"settings/*",element:Le?e.jsx(an,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(fe,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(fe,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(pn,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):null:(r(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),r(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const hn=({isDashboardAccess:r,isUserHasZeniAccountsAccess:j,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:C,isTenantCardsOnly:O,showChargeCardRoute:N})=>C===!0&&j?e.jsx(c,{to:"checking"}):O===!0&&N?e.jsx(c,{to:"cards"}):r?e.jsx(c,{to:"dashboard"}):j?e.jsx(c,{to:"checking"}):S?e.jsx(c,{to:"treasury"}):N?e.jsx(c,{to:"cards"}):V?e.jsx(c,{to:"bills"}):o?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:r,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:V,isUserHasTreasuryAccess:o,isTenantBankingOnly:S,showChargeCardRoute:C,tenantEmailDomain:O})=>S===!0||r?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):C?e.jsx(jn,{tenantEmailDomain:O}):j?e.jsx(xn,{tenantEmailDomain:O}):V?e.jsx(gn,{tenantEmailDomain:O}):e.jsx(y,{}),gn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/reimbursements`}),xn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/bills`}),In=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/treasury`}),Tn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/checking`}),jn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/cards`}),Ce=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/dashboard`});export{D as FallBackRoute,Nn as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-CsaY8yYO.js";import{a as d}from"./sentry-BUYxAJ0R.js";import{h as z,g as Q,u as O,j as b,s as ce,n as $,i as G,o as W,p as k}from"./core-BoNEfvLs.js";import{bn as Pe,eX as D,gq as De,n0 as le,Og as Me,hG as he,O7 as Ue,qS as Te,ky as fe,mY as _e,hI as Fe,O9 as Oe,O8 as Re,Qy as Be,zj as Ve,EM as ze,Q7 as Le,Qg as Ne,c6 as ne,cL as Qe,cM as $e,M7 as Ge,Qz as He,M8 as Ze,xL as Ke,QA as qe,Hb as Ye,Es as Je,Ej as be,Eg as Xe,xP as Se,Em as ye,Ep as Ce,Ev as te,uc as ae,xO as We,ka as Y,kd as Ie,QB as en,le as nn,y2 as tn,M$ as an,N0 as on,k8 as sn,QC as cn,kb as ln,rk as rn,MW as dn,MX as un,ro as pn,hr as gn,Mg as X,hj as re,hg as mn,ho as hn,Mh as fn,x$ as bn,QD as Sn,QE as yn,EJ as Cn,fC as Ee,fE as xe,QF as In,ge as En,Mq as xn,x_ as de,gj as ue,gi as An,xZ as vn,gh as kn,gg as wn,QG as jn,fH as Ae,QH as Pn,QI as Dn,y5 as Mn,xY as pe,QJ as Un,fY as Tn,xV as _n,bZ as Fn,c5 as On,c4 as Rn,b_ as Bn,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as Qn}from"./zeni-epic-state-DcOrwCh7.js";import{Q as J,e as F,z as P,af as ve,bS as $n,f as H,h as Gn,bD as Hn,I as Z,y as oe,bT as Zn,i as ke,bU as Kn,aq as qn,n as we,bV as Yn,bW as Jn,bX as Xn,Y as Wn,bY as et,v as nt,bZ as tt}from"./index-BkGSE7D5.js";import{n as B}from"./mui-CblpH0Ha.js";import{M as R}from"./MobileAppDrawer-CmiSBVZw.js";import{a as K,g as q,m as at}from"./accountMappingHelper-talErUKy.js";import{t as ot,A as st}from"./AddressScreen-DjHFWXZd.js";import N from"./NotFoundScreen-BTmOJXuO.js";import{g as it}from"./analyticsHelper-Bq2cX6hw.js";import{B as ct}from"./BusinessVerificationPageScreen-CxMuID_0.js";import{C as lt}from"./CompanyPassportScreen-3LH__AFc.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-C_KtOMfR.js";import{q as ge}from"./QBOConnectionScreen-CXuCwnVv.js";import{B as ut}from"./BillPayApprovalRoutes-5yoLyMdf.js";import{R as pt}from"./ReimbursementApprovalRoutes-D7K2CtZa.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./routePaths-DlT4djwo.js";import"./empty-b5TFvQkm.js";import"./pdf-lib-DMbxzmyG.js";import"./index-HOeFcz85.js";import"./url-SyvMap6d.js";import"./index-DM4yT559.js";import"./decodeURIComponentSafe-v7XwPgPo.js";import"./ReimbursementApprovalRuleDetailScreen-Co6mqX7V.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]="91e20577-a9bf-4b57-bdba-c109e17acf77",e._sentryDebugIdIdentifier="sentry-dbid-91e20577-a9bf-4b57-bdba-c109e17acf77")}catch{}})();const gt=B.div`
1
+ import{j as o}from"./liveblocks-CIemOhG-.js";import{a as d}from"./sentry-238zX06J.js";import{h as z,g as Q,u as O,j as b,s as ce,n as $,i as G,o as W,p as k}from"./core-BXHWSH6o.js";import{bn as Pe,eX as D,gq as De,n0 as le,Og as Me,hG as he,O7 as Ue,qS as Te,ky as fe,mY as _e,hI as Fe,O9 as Oe,O8 as Re,Qy as Be,zj as Ve,EM as ze,Q7 as Le,Qg as Ne,c6 as ne,cL as Qe,cM as $e,M7 as Ge,Qz as He,M8 as Ze,xL as Ke,QA as qe,Hb as Ye,Es as Je,Ej as be,Eg as Xe,xP as Se,Em as ye,Ep as Ce,Ev as te,uc as ae,xO as We,ka as Y,kd as Ie,QB as en,le as nn,y2 as tn,M$ as an,N0 as on,k8 as sn,QC as cn,kb as ln,rk as rn,MW as dn,MX as un,ro as pn,hr as gn,Mg as X,hj as re,hg as mn,ho as hn,Mh as fn,x$ as bn,QD as Sn,QE as yn,EJ as Cn,fC as Ee,fE as xe,QF as In,ge as En,Mq as xn,x_ as de,gj as ue,gi as An,xZ as vn,gh as kn,gg as wn,QG as jn,fH as Ae,QH as Pn,QI as Dn,y5 as Mn,xY as pe,QJ as Un,fY as Tn,xV as _n,bZ as Fn,c5 as On,c4 as Rn,b_ as Bn,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as Qn}from"./zeni-epic-state-Xn27LBb6.js";import{Q as J,e as F,z as P,af as ve,bS as $n,f as H,h as Gn,bD as Hn,I as Z,y as oe,bT as Zn,i as ke,bU as Kn,aq as qn,n as we,bV as Yn,bW as Jn,bX as Xn,Y as Wn,bY as et,v as nt,bZ as tt}from"./index-CMicf90d.js";import{n as B}from"./mui-CDOihXSU.js";import{M as R}from"./MobileAppDrawer-DXoZqPdU.js";import{a as K,g as q,m as at}from"./accountMappingHelper-xxDKbgY6.js";import{t as ot,A as st}from"./AddressScreen-CLqHIzyX.js";import N from"./NotFoundScreen-BPydeesy.js";import{g as it}from"./analyticsHelper-BA_yiiPD.js";import{B as ct}from"./BusinessVerificationPageScreen-BN8pHa0i.js";import{C as lt}from"./CompanyPassportScreen-3yTQ9U1p.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-DiBfHc_1.js";import{q as ge}from"./QBOConnectionScreen-BlVFH5zG.js";import{B as ut}from"./BillPayApprovalRoutes-CZBhRNrs.js";import{R as pt}from"./ReimbursementApprovalRoutes-CgceXA7l.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./routePaths-CIGM6tzV.js";import"./empty-rUUW8qXy.js";import"./pdf-lib-DWrkZXLc.js";import"./index-DkEoBUP0.js";import"./url-BN4Uf0Cp.js";import"./index-CqsQnZaN.js";import"./decodeURIComponentSafe-DEgBTC44.js";import"./ReimbursementApprovalRuleDetailScreen-BImN24-1.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]="91e20577-a9bf-4b57-bdba-c109e17acf77",e._sentryDebugIdIdentifier="sentry-dbid-91e20577-a9bf-4b57-bdba-c109e17acf77")}catch{}})();const gt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CsaY8yYO.js";import{h as Y,g as ee,u as ne,i as G,j as P,N as B,n as W,t as en}from"./core-BoNEfvLs.js";import{bJ as nn,co as Ce,PX as ye,eX as V,cA as tn,zz as Q,zj as an,Q7 as sn,Qa as on,rD as te,rr as ae,l6 as ie,tK as L,Qc as Ie,gi as $e,gh as Ge,gg as We,Qd as cn,zI as rn,Es as Ae,Ej as ke,Eg as _e,D_ as X,Em as ve,Ep as Ee,Ev as Pe,uc as Te,gx as un,cv as dn,fE as ln,fC as pn,fD as mn,bt as yn,Qe as fn,C_ as le,DC as gn,Qf as Sn,bK as bn,FL as pe,EM as hn,Qg as Cn,Qh as In,FP as An,FT as kn,tD as _n,Kh as vn,Go as he,Ho as me,Qi as En,Qj as Pn,Qk as Tn,Ql as He,Qm as wn,MK as Dn,Pk as Un,MZ as On,Qn as Ke,E2 as Fn,M_ as Vn,E6 as xn,Qo as Oe,GK as qe,le as Bn,ru as Xe,tM as jn,bE as Re,tY as ze,cy as Rn,Qp as Je,fX as zn,G6 as Ln,Ga as Nn,Qq as Mn,Gr as Le,Qr as Zn,Qs as Qn,Qt as $n,Qu as Gn,gq as Wn,AT as Hn,Qv as Kn,AY as qn,AX as Xn}from"./zeni-epic-state-DcOrwCh7.js";import{I as se,Q as oe,e as q,m as we,aR as J,bD as Ye,z as U,J as ce,f as O,y as De,h as $,bE as Jn,at as re,bF as x,bG as Yn,bH as et,af as Be,bI as nt,v as Ne,au as Me,Z as tt,D as at,bJ as it,bK as st,bL as ot,a8 as ct}from"./index-BkGSE7D5.js";import{a as h}from"./sentry-BUYxAJ0R.js";import{n as Fe,D as rt,S as ut}from"./mui-CblpH0Ha.js";import{M as fe}from"./MobileAppDrawer-CmiSBVZw.js";import z from"./NotFoundScreen-BTmOJXuO.js";import{a as Ze}from"./analyticsHelper-Bq2cX6hw.js";import{d as Qe}from"./routePaths-DlT4djwo.js";import{B as Ue}from"./BusinessVerificationPageScreen-CxMuID_0.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]="8daa82f3-efc6-4fd1-b70b-8803a585e670",e._sentryDebugIdIdentifier="sentry-dbid-8daa82f3-efc6-4fd1-b70b-8803a585e670")}catch{}})();const dt=Fe.div`
1
+ import{j as u}from"./liveblocks-CIemOhG-.js";import{h as Y,g as ee,u as ne,i as G,j as P,N as B,n as W,t as en}from"./core-BXHWSH6o.js";import{bJ as nn,co as Ce,PX as ye,eX as V,cA as tn,zz as Q,zj as an,Q7 as sn,Qa as on,rD as te,rr as ae,l6 as ie,tK as L,Qc as Ie,gi as $e,gh as Ge,gg as We,Qd as cn,zI as rn,Es as Ae,Ej as ke,Eg as _e,D_ as X,Em as ve,Ep as Ee,Ev as Pe,uc as Te,gx as un,cv as dn,fE as ln,fC as pn,fD as mn,bt as yn,Qe as fn,C_ as le,DC as gn,Qf as Sn,bK as bn,FL as pe,EM as hn,Qg as Cn,Qh as In,FP as An,FT as kn,tD as _n,Kh as vn,Go as he,Ho as me,Qi as En,Qj as Pn,Qk as Tn,Ql as He,Qm as wn,MK as Dn,Pk as Un,MZ as On,Qn as Ke,E2 as Fn,M_ as Vn,E6 as xn,Qo as Oe,GK as qe,le as Bn,ru as Xe,tM as jn,bE as Re,tY as ze,cy as Rn,Qp as Je,fX as zn,G6 as Ln,Ga as Nn,Qq as Mn,Gr as Le,Qr as Zn,Qs as Qn,Qt as $n,Qu as Gn,gq as Wn,AT as Hn,Qv as Kn,AY as qn,AX as Xn}from"./zeni-epic-state-Xn27LBb6.js";import{I as se,Q as oe,e as q,m as we,aR as J,bD as Ye,z as U,J as ce,f as O,y as De,h as $,bE as Jn,at as re,bF as x,bG as Yn,bH as et,af as Be,bI as nt,v as Ne,au as Me,Z as tt,D as at,bJ as it,bK as st,bL as ot,a8 as ct}from"./index-CMicf90d.js";import{a as h}from"./sentry-238zX06J.js";import{n as Fe,D as rt,S as ut}from"./mui-CDOihXSU.js";import{M as fe}from"./MobileAppDrawer-DXoZqPdU.js";import z from"./NotFoundScreen-BPydeesy.js";import{a as Ze}from"./analyticsHelper-BA_yiiPD.js";import{d as Qe}from"./routePaths-CIGM6tzV.js";import{B as Ue}from"./BusinessVerificationPageScreen-BN8pHa0i.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]="8daa82f3-efc6-4fd1-b70b-8803a585e670",e._sentryDebugIdIdentifier="sentry-dbid-8daa82f3-efc6-4fd1-b70b-8803a585e670")}catch{}})();const dt=Fe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CsaY8yYO.js";import{a as u,b as M,q as T}from"./sentry-BUYxAJ0R.js";import{u as A,h as z,j as l,g as D,N as j,n as O}from"./core-BoNEfvLs.js";import{u as P,z as s,m as F,f as E,a as B,g as _,h as N,j as V,k as W,G as X,n as v}from"./index-BkGSE7D5.js";import{eX as Y,LW as $,LX as q,fA as G,g1 as J,M0 as H,gp as K,cY as Q,M1 as b,M2 as R,M3 as Z,bY as y}from"./zeni-epic-state-DcOrwCh7.js";import"./mui-CblpH0Ha.js";import{u as ee}from"./useDeviceId-LzGT5z98.js";import{f as te}from"./analyticsHelper-Bq2cX6hw.js";import{t as ne}from"./getLocaleForTenant-B4Of7eQD.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6aa4f04a-9ef1-4e86-978a-1b2f79c6406a",t._sentryDebugIdIdentifier="sentry-dbid-6aa4f04a-9ef1-4e86-978a-1b2f79c6406a")}catch{}})();const ae=O(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{T({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const c=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:i,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(R(n,i)))},clearSignInError:()=>{t(b())}}})(X),ie=M.memo(ae);function ve({setTenantEmailDomain:t}){const a=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const i=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>Y(e)),I=l(e=>$(e)),m=D(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),a(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ie,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>a(b()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-CIemOhG-.js";import{a as u,b as M,q as T}from"./sentry-238zX06J.js";import{u as A,h as z,j as l,g as D,N as j,n as O}from"./core-BXHWSH6o.js";import{u as P,z as s,m as F,f as E,a as B,g as _,h as N,j as V,k as W,G as X,n as v}from"./index-CMicf90d.js";import{eX as Y,LW as $,LX as q,fA as G,g1 as J,M0 as H,gp as K,cY as Q,M1 as b,M2 as R,M3 as Z,bY as y}from"./zeni-epic-state-Xn27LBb6.js";import"./mui-CDOihXSU.js";import{u as ee}from"./useDeviceId-CbBc59Iy.js";import{f as te}from"./analyticsHelper-BA_yiiPD.js";import{t as ne}from"./getLocaleForTenant-DXvFXHW9.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6aa4f04a-9ef1-4e86-978a-1b2f79c6406a",t._sentryDebugIdIdentifier="sentry-dbid-6aa4f04a-9ef1-4e86-978a-1b2f79c6406a")}catch{}})();const ae=O(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{T({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const c=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:i,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(R(n,i)))},clearSignInError:()=>{t(b())}}})(X),ie=M.memo(ae);function ve({setTenantEmailDomain:t}){const a=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const i=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>Y(e)),I=l(e=>$(e)),m=D(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),a(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ie,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>a(b()),unlockDate:k}):null]})}export{ve as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-CIemOhG-.js";import{a as s}from"./sentry-238zX06J.js";import{u as d,g as u,N as c}from"./core-BXHWSH6o.js";import{z as n,f as a,h as m,y as p}from"./index-CMicf90d.js";import{gu as g,Mi as y}from"./zeni-epic-state-Xn27LBb6.js";import{n as b}from"./mui-CDOihXSU.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="238de91e-9066-486b-90e7-13b539a97fe7",e._sentryDebugIdIdentifier="sentry-dbid-238de91e-9066-486b-90e7-13b539a97fe7")}catch{}})();function N(){const e=d(),t=u(),r=s.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return s.useEffect(()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}},[o,e]),o?i.jsx(h,{children:i.jsx(p,{fetchState:"In-Progress"})}):i.jsx(c,{to:"../",replace:!0})}const h=b.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;export{N as default};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-CsaY8yYO.js";import{a as b}from"./sentry-BUYxAJ0R.js";import{h as v,u as z,g as K,j as G,i as J,n as _}from"./core-BoNEfvLs.js";import{z as R,Q as M,e as p,$ as O,J as Q,f as V,h as W,da as Z,v as g,s as q}from"./index-BkGSE7D5.js";import{eX as H,TK as F,J3 as I,TL as x,TG as X,Ir as y,TM as Y,Iz as E,HV as aa,J4 as S,TN as B,fz as ea,IW as ta,I$ as sa,IO as oa,IM as w,J0 as na,IJ as ia,TO as la,TP as ra,TQ as ka,TR as ca,TS as T,ej as ua,TT as da,TU as pa}from"./zeni-epic-state-DcOrwCh7.js";import{n as Ta}from"./mui-CblpH0Ha.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{M as ga}from"./MobileAppDrawer-CmiSBVZw.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.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]="3e281e39-b228-4be2-962a-b7c52923cf4e",e._sentryDebugIdIdentifier="sentry-dbid-3e281e39-b228-4be2-962a-b7c52923cf4e")}catch{}})();const fa=Ta.div`
1
+ import{j as d}from"./liveblocks-CIemOhG-.js";import{a as b}from"./sentry-238zX06J.js";import{h as v,u as z,g as K,j as G,i as J,n as _}from"./core-BXHWSH6o.js";import{z as R,Q as M,e as p,$ as O,J as Q,f as V,h as W,da as Z,v as g,s as q}from"./index-CMicf90d.js";import{eX as H,TK as F,J3 as I,TL as x,TG as X,Ir as y,TM as Y,Iz as E,HV as aa,J4 as S,TN as B,fz as ea,IW as ta,I$ as sa,IO as oa,IM as w,J0 as na,IJ as ia,TO as la,TP as ra,TQ as ka,TR as ca,TS as T,ej as ua,TT as da,TU as pa}from"./zeni-epic-state-Xn27LBb6.js";import{n as Ta}from"./mui-CDOihXSU.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-QHf32w33.js";import{M as ga}from"./MobileAppDrawer-DXoZqPdU.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.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]="3e281e39-b228-4be2-962a-b7c52923cf4e",e._sentryDebugIdIdentifier="sentry-dbid-3e281e39-b228-4be2-962a-b7c52923cf4e")}catch{}})();const fa=Ta.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CsaY8yYO.js";import se from"./NotFoundScreen-BTmOJXuO.js";import{a as l}from"./sentry-BUYxAJ0R.js";import{h as M,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as le,p as g}from"./core-BoNEfvLs.js";import{I6 as Z,I9 as ce,I3 as de,eX as H,TG as J,In as Q,I0 as pe,IT as ue,IM as ke,TH as K,TI as V,HY as me,HV as ge,rD as fe,rr as he,l6 as Ie,Ih as Se,TJ as Te,Iy as be,Iv as Ee,Ic as Ge,Is as Ce,Ir as De}from"./zeni-epic-state-DcOrwCh7.js";import{z as C,d8 as xe,A as ye,Q as je,e as b,s as W,v as w,J as ve,f as z,h as we,d9 as Re,n as A,at as Fe}from"./index-BkGSE7D5.js";import{n as Be}from"./mui-CblpH0Ha.js";import{u as Pe}from"./useInitialThreadRequest-tlPkIpCr.js";import{M as Ue}from"./MobileAppDrawer-CmiSBVZw.js";import Le from"./TaskListScreen-DF5lH-3k.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./useAskAiCfoHostNavButtonProps-BNRHSSlT.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]="995b98a7-a614-4634-891a-387a0d26b138",e._sentryDebugIdIdentifier="sentry-dbid-995b98a7-a614-4634-891a-387a0d26b138")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),c=l.useCallback(()=>{t(Z())},[t]),k=l.useCallback((o,h,I)=>{t(ce({name:o,content:h,cannedResponseId:I}))},[t]),a=l.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:c,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=H(e),c=r.taskGroupId??u,k=c!=null?V(e.taskGroupState,c):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>V(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=f(i=>H(i)),k=Pe(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=l.useState(!1),[p,X]=l.useState(!1),[F,Y]=l.useState(!1),[B,ee]=l.useState(!1),[P,y]=l.useState(!1),T=l.useRef(!1),G=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>J(i)),L=f(i=>i.taskGroupViewState.fetchState);l.useEffect(()=>{p||(X(!0),t(Q(!1,r)))},[p,t]),l.useEffect(()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))},[F,t,U.fetchState]),l.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=l.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);l.useEffect(()=>{if(P)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,G,c,s,e]);const $=f(i=>K(i,r)),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=Be.div`
1
+ import{j as n}from"./liveblocks-CIemOhG-.js";import se from"./NotFoundScreen-BPydeesy.js";import{a as l}from"./sentry-238zX06J.js";import{h as M,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as le,p as g}from"./core-BXHWSH6o.js";import{I6 as Z,I9 as ce,I3 as de,eX as H,TG as J,In as Q,I0 as pe,IT as ue,IM as ke,TH as K,TI as V,HY as me,HV as ge,rD as fe,rr as he,l6 as Ie,Ih as Se,TJ as Te,Iy as be,Iv as Ee,Ic as Ge,Is as Ce,Ir as De}from"./zeni-epic-state-Xn27LBb6.js";import{z as C,d8 as xe,A as ye,Q as je,e as b,s as W,v as w,J as ve,f as z,h as we,d9 as Re,n as A,at as Fe}from"./index-CMicf90d.js";import{n as Be}from"./mui-CDOihXSU.js";import{u as Pe}from"./useInitialThreadRequest-B2VhczBO.js";import{M as Ue}from"./MobileAppDrawer-DXoZqPdU.js";import Le from"./TaskListScreen-CUCFe3fy.js";import"./recharts-D7dc1KPB.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./useAskAiCfoHostNavButtonProps-QHf32w33.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]="995b98a7-a614-4634-891a-387a0d26b138",e._sentryDebugIdIdentifier="sentry-dbid-995b98a7-a614-4634-891a-387a0d26b138")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),c=l.useCallback(()=>{t(Z())},[t]),k=l.useCallback((o,h,I)=>{t(ce({name:o,content:h,cannedResponseId:I}))},[t]),a=l.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:c,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=H(e),c=r.taskGroupId??u,k=c!=null?V(e.taskGroupState,c):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>V(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=f(i=>H(i)),k=Pe(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=l.useState(!1),[p,X]=l.useState(!1),[F,Y]=l.useState(!1),[B,ee]=l.useState(!1),[P,y]=l.useState(!1),T=l.useRef(!1),G=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>J(i)),L=f(i=>i.taskGroupViewState.fetchState);l.useEffect(()=>{p||(X(!0),t(Q(!1,r)))},[p,t]),l.useEffect(()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))},[F,t,U.fetchState]),l.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=l.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);l.useEffect(()=>{if(P)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,G,c,s,e]);const $=f(i=>K(i,r)),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-CsaY8yYO.js";import i from"./NotFoundScreen-BTmOJXuO.js";import{T as r}from"./TransactionDetailScreen-D6QDGxGu.js";import"./sentry-BUYxAJ0R.js";import{o as s,p as o}from"./core-BoNEfvLs.js";import"./zeni-epic-state-DcOrwCh7.js";import"./recharts-NoTYHO1X.js";import"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import"./decodeURIComponentSafe-v7XwPgPo.js";import"./routePaths-DlT4djwo.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
1
+ import{j as t}from"./liveblocks-CIemOhG-.js";import i from"./NotFoundScreen-BPydeesy.js";import{T as r}from"./TransactionDetailScreen-BFCNfSuj.js";import"./sentry-238zX06J.js";import{o as s,p as o}from"./core-BXHWSH6o.js";import"./zeni-epic-state-Xn27LBb6.js";import"./recharts-D7dc1KPB.js";import"./index-CMicf90d.js";import"./mui-CDOihXSU.js";import"./analytics-D9LLahJK.js";import"./plaid-DnBvUvOI.js";import"./dnd-D1FusWvE.js";import"./stripe-DMRn4zHo.js";import"./lottie-B2gqVn8r.js";import"./lexical-M5lTJAid.js";import"./pdf-NpxYPuZF.js";import"./utils-BaZQaz5F.js";import"./useAskAiCfoHostNavButtonProps-QHf32w33.js";import"./decodeURIComponentSafe-DEgBTC44.js";import"./routePaths-CIGM6tzV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};