@zeniai/web-app-ui 5.0.70-prod → 5.0.71-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 (141) hide show
  1. package/dist/assets/AddressRoutes-DkpE57wD.js +1 -0
  2. package/dist/assets/AddressScreen-IPMb-Lqg.js +9 -0
  3. package/dist/assets/AiCfoScreen-DxwryQBf.js +11 -0
  4. package/dist/assets/BillPayApprovalRoutes-B33P7K39.js +1 -0
  5. package/dist/assets/{BillPayRoutes-BtFNSiDK.js → BillPayRoutes-D2OQNHTr.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-BGdNNp1F.js → BusinessVerificationPageScreen-BI3GYpKu.js} +2 -2
  7. package/dist/assets/ChargeCardRoutes-DZTXpkWd.js +71 -0
  8. package/dist/assets/CompanyPassportScreen-kKTXGF13.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-CYS4bJsi.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-CFcE03ug.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-jk197VvK.js +23 -0
  12. package/dist/assets/{DashboardRoutes-BaEBgxmc.js → DashboardRoutes-Ckl1eEC2.js} +3 -3
  13. package/dist/assets/DefaultTenantHome-TLtEW787.js +1 -0
  14. package/dist/assets/DomesticWireDetailScreen-BkEDowN8.js +18 -0
  15. package/dist/assets/DrawerScreen-B_tMe04S.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-DlKVqtyC.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-BqK3TSEk.js +25 -0
  18. package/dist/assets/FeaturePreviewScreen-aYYY9m7f.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-BLaYeloO.js +72 -0
  20. package/dist/assets/{MagicLinkSignInScreen-CmXunfk5.js → MagicLinkSignInScreen-CUegQSoi.js} +1 -1
  21. package/dist/assets/MobileAppDrawer-BDT0TmvR.js +1 -0
  22. package/dist/assets/NotFoundScreen-C4aqnA8_.js +1 -0
  23. package/dist/assets/{NotificationRoutes-CFQ9T25M.js → NotificationRoutes-BblXuLTj.js} +1 -1
  24. package/dist/assets/OAuthConsentScreen-sykQomv8.js +1 -0
  25. package/dist/assets/PandLWithForecastRoutes-CBrTW5wX.js +1 -0
  26. package/dist/assets/{PeopleRoutes-QnA9W9te.js → PeopleRoutes-B9d9GdEF.js} +5 -5
  27. package/dist/assets/PerformanceRoutes-BFJ-jyRc.js +1 -0
  28. package/dist/assets/{Preview-C0AoVNkg.js → Preview-IJkS64Sk.js} +1 -1
  29. package/dist/assets/{QBOConnectionScreen-CyYMqomX.js → QBOConnectionScreen-DQkFbpJH.js} +1 -1
  30. package/dist/assets/ReferralListScreen-CyoB8VnU.js +5 -0
  31. package/dist/assets/ReimbursementApprovalRoutes-B00fD8b9.js +1 -0
  32. package/dist/assets/ReimbursementApprovalRuleDetailScreen-DMdpETrG.js +1 -0
  33. package/dist/assets/{ReimbursementRoutes-JoYsNcyp.js → ReimbursementRoutes-u-qnVfy0.js} +7 -7
  34. package/dist/assets/ReportsRoutes-CqNp_xpd.js +1 -0
  35. package/dist/assets/RewardsRoutes-R2VgDdnw.js +1 -0
  36. package/dist/assets/ScreenRoutes-9MMqpDv8.js +2 -0
  37. package/dist/assets/{SettingsRoutes-nEcXq9VR.js → SettingsRoutes-KHzSnNUm.js} +7 -7
  38. package/dist/assets/{SetupPagesScreen-CvciPhAb.js → SetupPagesScreen-Cdo59_U5.js} +5 -5
  39. package/dist/assets/SignInScreen-DX4DUgMU.js +1 -0
  40. package/dist/assets/SignOutScreen-DOTJzbce.js +9 -0
  41. package/dist/assets/TaskListScreen-C1G-Z2qb.js +9 -0
  42. package/dist/assets/TaskRoutes-DeZTJnM4.js +9 -0
  43. package/dist/assets/TransactionDetailRoutes-CxGTwTQr.js +1 -0
  44. package/dist/assets/TransactionDetailScreen-DbXqL9Dv.js +5 -0
  45. package/dist/assets/{TransactionListRoutes-CASYn9ig.js → TransactionListRoutes-r3XEp13P.js} +1 -1
  46. package/dist/assets/{TreasuryRoutes-S6m6I4Ob.js → TreasuryRoutes-Cp7F7y4J.js} +6 -6
  47. package/dist/assets/{VendorsRoutes-CcrRaFs8.js → VendorsRoutes-BBf47BBb.js} +15 -15
  48. package/dist/assets/WiseConfirmationScreen-BZsn9iwu.js +12 -0
  49. package/dist/assets/{ZeniAccountRoutes-By17jtiK.js → ZeniAccountRoutes--fSibHTb.js} +12 -12
  50. package/dist/assets/ZeniAccountStatementScreen-BKbkGQh4.js +9 -0
  51. package/dist/assets/{accountMappingHelper--Nd4AzD5.js → accountMappingHelper-COFGwnKa.js} +1 -1
  52. package/dist/assets/{analytics-CBVce51h.js → analytics-CgF6EPDF.js} +1 -1
  53. package/dist/assets/{analyticsHelper-CchhXxa7.js → analyticsHelper-DUlInMOD.js} +1 -1
  54. package/dist/assets/{core-BiO8az_8.js → core-C_ZreJAw.js} +1 -1
  55. package/dist/assets/{decodeURIComponentSafe-Drs0EkRs.js → decodeURIComponentSafe-BP018w8C.js} +1 -1
  56. package/dist/assets/{dnd-DEqqrbnG.js → dnd-C3uQO7Bn.js} +1 -1
  57. package/dist/assets/empty-D-N5n4Nc.js +1 -0
  58. package/dist/assets/{empty-DIbsZE_-.js → empty-wr1Sjolf.js} +1 -1
  59. package/dist/assets/{emptyVideoElement-B-nTkhqj.js → emptyVideoElement-DDjbVU1E.js} +1 -1
  60. package/dist/assets/epic-DKrR9LyJ.js +2 -0
  61. package/dist/assets/getLocaleForTenant-C-vhBCTM.js +1 -0
  62. package/dist/assets/index-BYIPlMHr.js +2 -0
  63. package/dist/assets/{index-DhM1NMcw.js → index-CGS6zWWp.js} +17206 -15688
  64. package/dist/assets/index-CUa_5F-3.js +1 -0
  65. package/dist/assets/{index-__PpJYcl.js → index-CWsQVRWF.js} +1 -1
  66. package/dist/assets/{index-dsZtT2Le.js → index-CnROQyBG.js} +2 -2
  67. package/dist/assets/index-DJtUADrm.js +1 -0
  68. package/dist/assets/{index-CWkdTmQL.js → index-DpCPl3KC.js} +1 -1
  69. package/dist/assets/{index-WTq_uesm.js → index-T4vVJHIk.js} +1 -1
  70. package/dist/assets/{lexical-BcUhE2s3.js → lexical-E_ubWL4u.js} +1 -1
  71. package/dist/assets/{liveblocks-iYXuwnNJ.js → liveblocks-BdePShct.js} +1 -1
  72. package/dist/assets/{lottie-crYXxJIl.js → lottie-CUKBWgbe.js} +1 -1
  73. package/dist/assets/{mui-Wsw1v_RJ.js → mui-BtnH6ELy.js} +1 -1
  74. package/dist/assets/{pathToGoBack-mF5zZGNy.js → pathToGoBack-Bg0yBLYd.js} +1 -1
  75. package/dist/assets/{pdf-BB9eCt-A.js → pdf-CH0jWS01.js} +4 -4
  76. package/dist/assets/{pdf-lib-FxBSZOu8.js → pdf-lib-th4agIPv.js} +1 -1
  77. package/dist/assets/{plaid-YevEbNem.js → plaid-CLHQ0yLv.js} +1 -1
  78. package/dist/assets/{pusher-DcEB1EIs.js → pusher-DTlPALAn.js} +1 -1
  79. package/dist/assets/{react-CEVNSt9Z.js → react-4Ap2VUmu.js} +1 -1
  80. package/dist/assets/{react-Dxc9sTnE.js → react-B1z9ZoMC.js} +1 -1
  81. package/dist/assets/{react-Cyny6kHD.js → react-BYz405pF.js} +1 -1
  82. package/dist/assets/{react-BHXMCFc8.js → react-Bxo6GPqK.js} +1 -1
  83. package/dist/assets/{react-BRhSxuPy.js → react-COj3_dzF.js} +1 -1
  84. package/dist/assets/{react-CGu-TC09.js → react-CcfFphdJ.js} +1 -1
  85. package/dist/assets/{recharts-_jQKodaN.js → recharts-CHr9O26_.js} +1 -1
  86. package/dist/assets/{routePaths-DZQ5pfqe.js → routePaths-DZkWYInw.js} +1 -1
  87. package/dist/assets/{sentry-C0ycLLNj.js → sentry-CX_3yQh7.js} +1 -1
  88. package/dist/assets/{url-BaUJdhZo.js → url-BBCQjahk.js} +1 -1
  89. package/dist/assets/{url-lQlWCduk.js → url-CcaHVDFu.js} +1 -1
  90. package/dist/assets/useAskAiCfoHostNavButtonProps-Nsv7MqoG.js +1 -0
  91. package/dist/assets/{useDeviceId-CNwwT5y9.js → useDeviceId-DtlEyHOn.js} +1 -1
  92. package/dist/assets/useFetchSuggestedQuestionsWhenReady-C86A67zi.js +1 -0
  93. package/dist/assets/useInitialThreadRequest-AyrSL871.js +1 -0
  94. package/dist/assets/{utils-84J_wB9-.js → utils-Dw8b4HCO.js} +1 -1
  95. package/dist/assets/{withTransactionSidePanel-BlWzkOQ0.js → withTransactionSidePanel-BmH5jBz_.js} +2 -2
  96. package/dist/assets/zeni-epic-state-H6DZSSlf.js +13 -0
  97. package/dist/index.html +1 -1
  98. package/package.json +4 -4
  99. package/dist/assets/AddressRoutes-CSwoj3Tc.js +0 -1
  100. package/dist/assets/AddressScreen-CT6TP3Z1.js +0 -9
  101. package/dist/assets/AiCfoScreen-BWS36jvF.js +0 -11
  102. package/dist/assets/BillPayApprovalRoutes-ss8zp9B4.js +0 -1
  103. package/dist/assets/ChargeCardRoutes-y2uX_nrx.js +0 -71
  104. package/dist/assets/CompanyPassportScreen-CxsYYjMZ.js +0 -1
  105. package/dist/assets/ConnectionAuthScreen-B2gLg7lc.js +0 -11
  106. package/dist/assets/CustomerOnboardingAuthScreen-Mkc8Qg4L.js +0 -1
  107. package/dist/assets/CustomerOnboardingRoutes-DyOkPrNA.js +0 -23
  108. package/dist/assets/DefaultTenantHome-ceU-YxNe.js +0 -1
  109. package/dist/assets/DomesticWireDetailScreen-C7eUBEYW.js +0 -18
  110. package/dist/assets/DrawerScreen-CFX9aNCU.js +0 -1
  111. package/dist/assets/EntityDetailRoutes-BnUqJDu6.js +0 -1
  112. package/dist/assets/ExpenseAutomationRoutes-zrWAZ6A-.js +0 -25
  113. package/dist/assets/FeaturePreviewScreen-Chy-C2bY.js +0 -1
  114. package/dist/assets/MagicLinkRoutes-D1guk6IX.js +0 -72
  115. package/dist/assets/MobileAppDrawer-DkH2rucX.js +0 -1
  116. package/dist/assets/NotFoundScreen-CoCyTXNP.js +0 -1
  117. package/dist/assets/PandLWithForecastRoutes-C6ob6CWy.js +0 -1
  118. package/dist/assets/PerformanceRoutes-CscGDV-a.js +0 -1
  119. package/dist/assets/ReferralListScreen-DOkwApTO.js +0 -5
  120. package/dist/assets/ReimbursementApprovalRoutes-B7OZneq9.js +0 -1
  121. package/dist/assets/ReimbursementApprovalRuleDetailScreen-C096muhL.js +0 -1
  122. package/dist/assets/ReportsRoutes-DoEMUl54.js +0 -1
  123. package/dist/assets/RewardsRoutes-3vkMk0d3.js +0 -1
  124. package/dist/assets/ScreenRoutes-CFYjn9UY.js +0 -2
  125. package/dist/assets/SignInScreen-D0vIN08v.js +0 -1
  126. package/dist/assets/SignOutScreen-Bxw8G7ep.js +0 -9
  127. package/dist/assets/TaskListScreen-Babx6Iz5.js +0 -9
  128. package/dist/assets/TaskRoutes-C8PZpDeD.js +0 -9
  129. package/dist/assets/TransactionDetailRoutes-BSH_Iaci.js +0 -1
  130. package/dist/assets/TransactionDetailScreen-B5S0aVL7.js +0 -5
  131. package/dist/assets/WiseConfirmationScreen-Dd0le7LT.js +0 -12
  132. package/dist/assets/ZeniAccountStatementScreen-D6WwbD40.js +0 -9
  133. package/dist/assets/empty-CjJ6NPQs.js +0 -1
  134. package/dist/assets/epic-BkjwplcH.js +0 -2
  135. package/dist/assets/getLocaleForTenant-DZ_PqUgv.js +0 -1
  136. package/dist/assets/index-BALn8uen.js +0 -1
  137. package/dist/assets/index-CPuEfxmi.js +0 -1
  138. package/dist/assets/useAskAiCfoHostNavButtonProps-DoU7lqQS.js +0 -1
  139. package/dist/assets/useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js +0 -1
  140. package/dist/assets/useInitialThreadRequest-COC1d6YZ.js +0 -1
  141. package/dist/assets/zeni-epic-state-sw_lecJS.js +0 -14
@@ -0,0 +1,72 @@
1
+ import{j as t}from"./liveblocks-BdePShct.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-C_ZreJAw.js";import{IP as k,IQ as v,IR as T,yU as B,yG as G,IS as D,IT as oe,IU as se,yK as ie,eP as I,yR as le,yO as re}from"./zeni-epic-state-H6DZSSlf.js";import{Z as g,o as r,M as de,c as j,i as M,O as ce,q as me,r as pe,s as H,y as ue,$ as he,v as xe,V as ge,m as fe,x as we,B as be,A as ye,j as Se,S as ke,C as ve,E as je,F as Ie}from"./index-CGS6zWWp.js";import{n as m}from"./mui-BtnH6ELy.js";import f from"./NotFoundScreen-C4aqnA8_.js";import{a as $}from"./sentry-CX_3yQh7.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="c974ca31-fb17-4372-a598-f87e27fd1cdd",e._sentryDebugIdIdentifier="sentry-dbid-c974ca31-fb17-4372-a598-f87e27fd1cdd")}catch{}})();const $e=m.div`
2
+ display: flex;
3
+ height: 100%;
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
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=y();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
11
+ display: flex;
12
+ height: 100vh;
13
+ width: 100%;
14
+ flex: 1 1 auto;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ background-color: ${e=>e.theme.colors.grey4};
18
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Ae({isSubPage:e}){const a=C(),n=S(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
+ display: flex;
21
+ height: 100%;
22
+ width: 100%;
23
+ flex: 1 1 auto;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ background-color: ${e=>e.theme.colors.grey4};
27
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Ne=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=S(),n=g(),{vendorId:o,billId:s}=y();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
+ display: flex;
30
+ height: 100%;
31
+ width: 100%;
32
+ flex: 1 1 auto;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ background-color: ${e=>e.theme.colors.grey4};
36
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=S(),n=g(),{vendorId:o,billId:s}=y(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Me={containerWidth:new je(100,58)},He=m(ke)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
+ cursor: pointer;
44
+ position: absolute;
45
+ color: ${e=>e.theme.colors.brandColorJade};
46
+ `,Ke=m.div`
47
+ display: flex;
48
+ height: 100vh;
49
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
+ width: 100vw;
51
+ overflow-y: scroll;
52
+ background-color: ${e=>e.theme.colors.grey4};
53
+ `,Ue=m.div`
54
+ display: flex;
55
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
+ flex-direction: column;
57
+ width: ${e=>`${Me.containerWidth.value(e.windowSize)}%`};
58
+ ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
+ `,Ve=m.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
+ height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
+ overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
+ width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
+ background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
+ margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
+ `,_e=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=S(),{tenantEmailDomain:o,vendorId:s,billId:l}=y(),[i]=te(),d=i.get("token"),K=n.pathname.includes("address"),w=g(),U=ge(),A=fe(),b=we(),V=()=>{U.toggle()},_=E(u=>k(u)),W=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:q,billFetchState:P,companyName:J,currencySymbol:Q,amount:R}=_,{tenantId:z,userId:L,sessionId:N}=O,{fetchState:Z,internationalBankAccountCreateStatus:X}=W;return $.useEffect(()=>{I()},[]),$.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),$.useEffect(()=>{b&&c==="Completed"&&(I(L,N,z),l!=null&&a(re(l)))},[c,b,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?(I(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(ye,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",J,l??"",We(n.pathname),Q,R))(u)}),t.jsxs(Ke,{windowSize:w,children:[w!=="small"?t.jsx(He,{onClick:V}):null,t.jsx(Ve,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?t.jsx(Se,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:q,type:"bill"})}),t.jsx(Ue,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return t.jsx(Ie,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Oe,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Ae,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-iYXuwnNJ.js";import{a as g}from"./sentry-C0ycLLNj.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-BiO8az_8.js";import{z as r,h as P,D as V,d as A,c as N,e as q,k as G,I as R,g as W}from"./index-DhM1NMcw.js";import{eN as $,Ii as B,Is as H,Ij as J,eO as K,fh as Q,Io as X,fG as Y,cS as Z,It as ee,Iu as te}from"./zeni-epic-state-sw_lecJS.js";import{n as ne}from"./mui-Wsw1v_RJ.js";import{u as se}from"./useDeviceId-CNwwT5y9.js";import{f as ae}from"./analyticsHelper-CchhXxa7.js";import{t as ie}from"./getLocaleForTenant-DZ_PqUgv.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./utils-84J_wB9-.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]="bc4ea456-e862-49a1-bcdb-f043476450fb",t._sentryDebugIdIdentifier="sentry-dbid-bc4ea456-e862-49a1-bcdb-f043476450fb")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
1
+ import{j as u}from"./liveblocks-BdePShct.js";import{a as g}from"./sentry-CX_3yQh7.js";import{h as O,u as w,j as _,q as M,g as l,N as T}from"./core-C_ZreJAw.js";import{z as r,m as P,D as A,e as V,c as N,f as q,w as B,j as G,h as H}from"./index-CGS6zWWp.js";import{eO as K,IA as R,IK as W,IB as $,eP as J,fi as Q,IG as X,fH as Y,cT as Z,IL as ee,IM as te}from"./zeni-epic-state-H6DZSSlf.js";import{n as ne}from"./mui-BtnH6ELy.js";import{u as se}from"./useDeviceId-DtlEyHOn.js";import{f as ae}from"./analyticsHelper-DUlInMOD.js";import{t as ie}from"./getLocaleForTenant-C-vhBCTM.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="e58fe2b6-67ba-408c-8296-e16c1a364969",t._sentryDebugIdIdentifier="sentry-dbid-e58fe2b6-67ba-408c-8296-e16c1a364969")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=w(),m=_(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>K(e)),b=l(e=>R(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(W(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants($(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=H();e!=null&&V(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(B,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
2
  position: fixed;
3
3
  top: 0;
4
4
  left: 0;
@@ -0,0 +1 @@
1
+ import{j as V}from"./liveblocks-BdePShct.js";import{a as c}from"./sentry-CX_3yQh7.js";import{h as be,g as s,l as qe,u as Je,j as Ke,i as P}from"./core-C_ZreJAw.js";import{eO as he,eV as ea,eW as Se,eQ as aa,bn as ta,f3 as na,eX as sa,eY as oa,e_ as ia,f1 as ra,fb as da,f2 as g,f5 as la,f6 as ue,f9 as ca,f7 as ua,f8 as fa,fa as ma,cI as pa,fd as ba,cO as ha,bv as Sa,eN as ga,fi as Ea,fj as ka,fh as Ca}from"./zeni-epic-state-H6DZSSlf.js";import{a3 as ya,a4 as Ia,V as Ta,y as _a,z as k,a5 as wa,Q as Aa,x as Fa,u as Da,$ as r,a6 as va,a7 as $a,k as Ba,a as Ma,a8 as xa,X as Pa,a9 as Ra,aa as Na,ab as fe,ac as me,L as Va,ad as Oa,ae as pe,c as R,s as w,af as N,ag as Ua}from"./index-CGS6zWWp.js";import{D as Ga}from"./mui-BtnH6ELy.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="1244417f-eae2-43c3-933b-340c79960904",f._sentryDebugIdIdentifier="sentry-dbid-1244417f-eae2-43c3-933b-340c79960904")}catch{}})();const ja=ya(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Je(),C=Ta(),o=Ke(),O=aa(),m=be(),{useFeatureGate:i}=_a(),U=k.getSignedInUser(),A=ta(U),n=s(e=>he(e)),ge=wa(),Ee=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:ke}=Aa(),G=s(e=>na(e)),j=G.uiState.currentChatSessionId,y=Fa(),{setLoading:Ce}=Da(),[F,L]=c.useState(void 0),D=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ye}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ie=va(n,ye,H),{isFeatureEnabled:Te}=i(r.isSettingsFeatureEnabled),Q=s(e=>sa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>oa(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(ia(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),_e=s(e=>$.fetchState==="Completed"?ra(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:we}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ae}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabledV2),X=Z||W&&A,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Be}=i(r.isTreasuryEnabled),{isFeatureEnabled:Me}=i(r.isTaskManagerCustomerUserAccessEnabled),xe=A||!A&&Me,Pe=n.company!=null&&da(n.company),_=Be&&Pe,Re=s(e=>g(e).totalUnreadCount),Ne=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),J=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ve=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Oe}=$a();c.useEffect(()=>{const e=setTimeout(()=>Oe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ve.fetchState==="Not-Started"&&O.tenantId!=null&&m(la("task_manager","dashboard"))},[y,O.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Ne,count:Re},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ca(e,ne.tenantId):void 0),S=[];we===!1&&S.push("accounts_payable_aging"),Ae===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),X===!1&&S.push("expense_automation_card");const Ge=Ba(),oe=s(e=>ua(e,S,h,Z,W,_).fetchState),ie=s(e=>fa(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Le=c.useMemo(()=>ma(n.userRole),[n.userRole]),ze=pa(Le),Ye=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&Q.fetchState==="Completed"&&ba(Q.notificationSettings,h.userEmail,H,n),re=Ma(),Qe=re&&xa(t),de=ha(Ge?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>_&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Pa(t.pathname)!=="treasury",[_,de,le,t.pathname,a]),[We,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Ra(Ze);return V.jsx(Ga,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(Na,{signedInUser:U,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?_e:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:Te,isVendorsTabVisible:ze,isZeniAccountEnabled:Y,isChargeCardEnabled:Ie,isTreasuryEnabled:_,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:We,isNotificationsTabVisible:He,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:X&&Sa(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ye,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&J>0?"notifications/comments":"notifications/tasks";me(t)&&(e=q===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=w(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const p=w(t.state?.pathnameStackToGoBack,t.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),Ee?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}}):void(ge?ke(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=w(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Ua(e.type);pe(e.type)?(j!=null&&m(Ca()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{Ce(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Oa(l)?b+="settings/my_profile":pe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Ea(e.tenantId)),m(ka(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Qe,aiCfoView:G,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ga({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:xe,thanksGivingAnimationEnabled:De,christmasAnimationEnabled:ve,newYearAnimationEnabled:$e})})}),Za=f=>{const d=be(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ia(o)&&ea(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(ja,{...f,...t})};export{Za as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-BdePShct.js";import{j as r,k as i}from"./core-C_ZreJAw.js";import{K as n}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import"./sentry-CX_3yQh7.js";import"./zeni-epic-state-H6DZSSlf.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8be0e406-e338-494a-8e0a-372030582bac",o._sentryDebugIdIdentifier="sentry-dbid-8be0e406-e338-494a-8e0a-372030582bac")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-iYXuwnNJ.js";import lt from"./NotFoundScreen-CoCyTXNP.js";import{a as k}from"./sentry-C0ycLLNj.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as H}from"./core-BiO8az_8.js";import{cp as St,eW as K,eN as Q,f9 as bt,f1 as b,OF as X,f5 as d,eV as y,qq as M,vE as It,OG as Ct,eU as Tt,fc as yt,qv as At,OH as F,bq as $,gC as x,qz as J,OI as Et,cA as _t,cu as Nt}from"./zeni-epic-state-sw_lecJS.js";import{N as Bt,z as wt,p as xt,m as vt,cr as Rt,y as N,a1 as Ut,cs as Dt,a2 as Gt,w as Pt}from"./index-DhM1NMcw.js";import"./mui-Wsw1v_RJ.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DoU7lqQS.js";import{c as $t}from"./useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./utils-84J_wB9-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="0538f2ee-8846-4df8-910a-1fb43e7a6a25",t._sentryDebugIdIdentifier="sentry-dbid-0538f2ee-8846-4df8-910a-1fb43e7a6a25")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(X(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Pt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Ut(Dt)),qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Q(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});$t({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:V,isLoading:O,fetchMore:W,isFetchingMore:L,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(q!==i&&i!=null&&s(X(i)),i==null){const e=`../${q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=A||D===!0||C!==!0||A||D===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&O===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const P=V.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||z===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,D,L,C,z,O,w?.length]);const st={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return _.jsxs(gt,{children:[_.jsx(H,{path:"/:selectedTab",element:_.jsx(qt,{})}),_.jsx(H,{path:"*",element:_.jsx(lt,{})})]})}export{ie as default};
1
+ import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-BdePShct.js";import lt from"./NotFoundScreen-C4aqnA8_.js";import{a as k}from"./sentry-CX_3yQh7.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as X}from"./core-C_ZreJAw.js";import{cq as St,eX as H,eO as K,fa as bt,f2 as b,P0 as Q,f6 as d,eW as y,qr as M,vF as It,P1 as Ct,eV as Tt,fd as yt,qw as At,P2 as $,bq as F,gD as x,qA as J,P3 as Et,cB as _t,cv as Nt}from"./zeni-epic-state-H6DZSSlf.js";import{R as Bt,z as wt,y as xt,$ as Pt,cu as vt,s as N,a3 as Rt,cv as Dt,a4 as Ut,q as Gt}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as Ft}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="c7171229-5ebe-4823-9d23-e5db3748ff38",t._sentryDebugIdIdentifier="sentry-dbid-c7171229-5ebe-4823-9d23-e5db3748ff38")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=H(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=K(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Gt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Rt(Dt)),qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,P]=k.useState(!1),a=S(e=>H(e)),o=S(e=>K(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ft({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),q=S(e=>b(e).currentTab),v=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:V,isLoading:W,fetchMore:z,isFetchingMore:L,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(q!==i&&i!=null&&s(Q(i)),i==null){const e=`../${q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=A||D===!0||C!==!0||A||D===!0||C!==!0;k.useEffect(()=>{U&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,R]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&W===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const G=V.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(L||O===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,D,L,C,O,W,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ut(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];v==="all"?E.push("read","unread"):v!=="mentions"&&E.push(v),s(M("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return _.jsxs(gt,{children:[_.jsx(X,{path:"/:selectedTab",element:_.jsx(qt,{})}),_.jsx(X,{path:"*",element:_.jsx(lt,{})})]})}export{ie as default};
@@ -0,0 +1 @@
1
+ import{j as p}from"./liveblocks-BdePShct.js";import{a as r}from"./sentry-CX_3yQh7.js";import{h as A,u as j,g as o,N as C}from"./core-C_ZreJAw.js";import{IX as P,eO as x,f1 as z,IY as D,IZ as M,I_ as R,I$ as L,mm as k,HV as N}from"./zeni-epic-state-H6DZSSlf.js";import{z as h,_ as g}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="6cc61e16-0dff-4f19-af19-88d28e69cb77",n._sentryDebugIdIdentifier="sentry-dbid-6cc61e16-0dff-4f19-af19-88d28e69cb77")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo(()=>P(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>x(e)),l=o(e=>z(e)),d=o(e=>e.tenantState.fetchState),y=o(D),v=o(M),c=o(R),[S,b]=r.useState(null),[_,E]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const I=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!I.current&&(d!=="Not-Started"&&d!=="Error"||(I.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=S??U;return i!=null?p.jsx(g,{variant:"invalid_params",paramsError:i}):f?p.jsx(g,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:_??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):p.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-BdePShct.js";import{j as Y,h as Z,u as z,l as K,g as d,k as H,n as Q,o as I}from"./core-C_ZreJAw.js";import{eO as U,qf as R,pP as X,Ju as v,pK as S,bv as ee,bn as ae,bS as te,pL as se,Jv as oe,Jg as C,dC as re,tC as ne,Jw as ie,tZ as ce,eU as le,eS as de}from"./zeni-epic-state-H6DZSSlf.js";import{z as me,R as fe,k as pe,y as w,$ as M,A as ue,c as $,al as he,s as ge}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import Fe from"./NotFoundScreen-C4aqnA8_.js";import{F as be}from"./FeaturePreviewScreen-aYYY9m7f.js";import{a as g}from"./sentry-CX_3yQh7.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{u as Se}from"./useInitialThreadRequest-AyrSL871.js";import{t as ye}from"./routePaths-DZkWYInw.js";import{M as Te}from"./MobileAppDrawer-BDT0TmvR.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="1a2e42ea-03a5-442d-9504-4059cab8f859",s._sentryDebugIdIdentifier="sentry-dbid-1a2e42ea-03a5-442d-9504-4059cab8f859")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function O(){const s=Y(),e=Z(),a=z(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),T=d(t=>U(t)),q=T.company?.companyInfo.firstMonthOfFY??1,c=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,j,P)=>j!=null?f.forecasts.findIndex(b=>b.id===j):P!=null?f.forecasts.findIndex(b=>b.id===P):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),y(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,R,S,F]);const D=pe(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:E}=G(M.isReportsCommentingEnabled),J=Se(E?T?.companyId:void 0,{clearParams:l&&m}),[V,W]=g.useState(!1),L=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:V,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:q,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:J,onClickMenuIcon:()=>{L(!0)}})]})}function Ye(){const s=d(i=>U(i)),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
@@ -1,22 +1,22 @@
1
- import{j as a}from"./liveblocks-iYXuwnNJ.js";import{J2 as te,eN as q,jq as z,eT as Y,eR as ne,GD as Q,IH as oe,sJ as Ee,J3 as M,sx as ke,sS as Ie,sM as ie,sB as re,sQ as Pe,sN as je,J4 as le,un as Te,J5 as Le,fw as ve,J6 as G,sG as de,sE as ce,sV as Fe,c0 as Re}from"./zeni-epic-state-sw_lecJS.js";import{r as pe,p as X,m as E,z as K,a5 as ue,H as me,ag as ge,ah as Ae,F as he,o as A,J as fe,D as Ce,ai as Oe,N as Ve,C as Ue,c as be,e as Be,y as Ze,aj as $e,j as Ge}from"./index-DhM1NMcw.js";import{D as ye,n as W,S as we}from"./mui-Wsw1v_RJ.js";import se from"./NotFoundScreen-CoCyTXNP.js";import{a as r}from"./sentry-C0ycLLNj.js";import{h as ee,l as Je,g as m,j as He,u as ze,k as Ke,n as ae,o as $}from"./core-BiO8az_8.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DoU7lqQS.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js";import{M as _e}from"./MobileAppDrawer-DkH2rucX.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./utils-84J_wB9-.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="db480121-dd2d-42d7-8413-a22f5660e17a",s._sentryDebugIdIdentifier="sentry-dbid-db480121-dd2d-42d7-8413-a22f5660e17a")}catch{}})();const Me={overlayWidth:new he(100,100,48)},J=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:D}=Je(),d=m(e=>te(e)),u=m(e=>q(e)),S=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&S&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(M()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:S,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&D!=null&&p(Ee(D))},[x,D]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Me.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(De,{children:J.discardTitle}),descriptionComponent:a.jsx(Se,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:i,isEditPopup:!0}):null,a.jsx(Ae,{...b})]})})},Ye=W(we)`
1
+ import{j as a}from"./liveblocks-BdePShct.js";import{Jp as te,eO as Q,jr as z,eU as Y,eS as ne,GS as q,J3 as oe,sK as Ee,Jq as N,sy as ke,sT as Ie,sN as ie,sC as re,sR as Pe,sO as je,Jr as le,uo as Te,Js as Le,fx as ve,Jt as G,sH as de,sF as ce,sW as Fe,c1 as Re}from"./zeni-epic-state-H6DZSSlf.js";import{Z as pe,y as X,$ as E,z as K,a6 as ue,G as me,ah as ge,ai as Ae,E as he,o as A,H as fe,D as Ce,aj as Oe,R as Ve,A as Ue,c as be,f as Ze,s as Be,ak as $e,k as Ge}from"./index-CGS6zWWp.js";import{D as ye,n as M,S as we}from"./mui-BtnH6ELy.js";import se from"./NotFoundScreen-C4aqnA8_.js";import{a as r}from"./sentry-CX_3yQh7.js";import{h as ee,l as He,g as m,j as Je,u as ze,k as Ke,n as ae,o as $}from"./core-C_ZreJAw.js";import{u as Me}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as We}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{M as _e}from"./MobileAppDrawer-BDT0TmvR.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="71d1ae35-02a0-483e-af97-b94ff225b342",s._sentryDebugIdIdentifier="sentry-dbid-71d1ae35-02a0-483e-af97-b94ff225b342")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=He(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:H.discardTitle}),descriptionComponent:a.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:i,isEditPopup:!0}):null,a.jsx(Ae,{...b})]})})},Ye=M(we)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,De=W(fe.H6Regular)`
5
+ `,Se=M(fe.H6Regular)`
6
6
  margin-top: ${A.sp7};
7
7
  padding-left: ${A.sp8};
8
8
  padding-right: ${A.sp8};
9
9
  color: ${s=>s.theme.colors.primary};
10
10
  word-break: break-word;
11
- `,Se=W(fe.LargeRegularSp)`
11
+ `,De=M(fe.LargeRegularSp)`
12
12
  color: ${s=>s.theme.colors.hero};
13
13
  padding-left: ${A.sp8};
14
14
  padding-right: ${A.sp8};
15
15
  margin-bottom: 30px;
16
16
  margin-top: ${A.sp4};
17
17
  white-space: pre-line;
18
- `,Qe={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),D=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>z(i)),{useFeatureGate:S}=X(),{isFeatureEnabled:f}=S(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(M())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=S(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=S(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:R}=S(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(s):je())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{D.invitePersonState.fetchState==="Completed"&&(y(),p(M()))},[D.invitePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(es,{onClick:i=>i.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(De,{children:H.discardTitle}),descriptionComponent:a.jsx(Se,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,a.jsx(Oe,{...b})]})})},es=W(we)`
18
+ `,qe={overlayWidth:new he(100,100,48)},J=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Q(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(s):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(es,{onClick:i=>i.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:J.discardTitle}),descriptionComponent:a.jsx(De,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:F}):null,a.jsx(Oe,{...b})]})})},es=M(we)`
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,ss=Ke(function(s,t){const l=le(s),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(s),analytics:be}},function(s,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{s(re(o,y))},onResendInvite:o=>{s(Fe(o))},onReloadPeople:()=>{s(de()),s(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{s(G({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{s(G({searchText:o}))}}}})($e);function _({isInvitePeopleDrawerOpen:s,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Y(O,h)&&V,w=Q(h),D=h?.tenantId,{tenantEmailDomain:d}=h,[u,S]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ne({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),S(!0),n(de()))},[u,y,D,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(s!=null&&s===!0),L(t!=null&&t===!0&&t)},[s,t]),r.useEffect(()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Be.Event.members)}):null,f===!0?a.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?a.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,a.jsx(_e,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(ss,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,N)=>{n(G({sortKey:e,sortOrder:N}))},onRowClick:e=>{const N=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ze(g.state?.pathnameStackToGoBack,g.pathname);l(N,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function Ds(){const s=Ge();return Re(s?.loggedInUserRole??[])?a.jsxs(ae,{children:[a.jsx($,{path:"/",element:a.jsx(_,{})}),a.jsx($,{path:"new",element:a.jsx(_,{isInvitePeopleDrawerOpen:!0})}),a.jsx($,{path:":userId/edit",element:a.jsx(_,{isEditPeopleDrawerOpen:!0})}),a.jsx($,{path:"*",element:a.jsx(se,{})})]}):a.jsx(ae,{children:a.jsx($,{path:"*",element:a.jsx(se,{})})})}export{Ds as default};
22
+ `,ss=Ke(function(s,t){const l=le(s),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(s),analytics:be}},function(s,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{s(re(o,y))},onResendInvite:o=>{s(Fe(o))},onReloadPeople:()=>{s(de()),s(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{s(G({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{s(G({searchText:o}))}}}})($e);function _({isInvitePeopleDrawerOpen:s,isEditPeopleDrawerOpen:t}){const l=Je(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Y(O,h)&&V,w=q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=Me({mobileExploreReferrer:"People"}),c=m(e=>le(e));We({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(s!=null&&s===!0),L(t!=null&&t===!0&&t)},[s,t]),r.useEffect(()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?a.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,a.jsx(_e,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(ss,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(G({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Ss(){const s=Ge();return Re(s?.loggedInUserRole??[])?a.jsxs(ae,{children:[a.jsx($,{path:"/",element:a.jsx(_,{})}),a.jsx($,{path:"new",element:a.jsx(_,{isInvitePeopleDrawerOpen:!0})}),a.jsx($,{path:":userId/edit",element:a.jsx(_,{isEditPeopleDrawerOpen:!0})}),a.jsx($,{path:"*",element:a.jsx(se,{})})]}):a.jsx(ae,{children:a.jsx($,{path:"*",element:a.jsx(se,{})})})}export{Ss as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BdePShct.js";import E from"./NotFoundScreen-C4aqnA8_.js";import{a as r}from"./sentry-CX_3yQh7.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as V,o as h}from"./core-C_ZreJAw.js";import{eO as z,P4 as b,bo as F,bn as N,h7 as B,gD as $}from"./zeni-epic-state-H6DZSSlf.js";import{V as q,z as I,cw as G}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as J}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{M as K}from"./MobileAppDrawer-BDT0TmvR.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="1e58511b-9df2-4760-a9e4-f03e58143003",e._sentryDebugIdIdentifier="sentry-dbid-1e58511b-9df2-4760-a9e4-f03e58143003")}catch{}})();const L=O(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),Q=()=>{const e=_(),t=v(),c=q(),o=p(a=>z(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(d),x=S||k||D,l=r.useCallback((a,i,T)=>{u(B({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return J({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function pe(){return s.jsxs(V,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-C0ycLLNj.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-CX_3yQh7.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-iYXuwnNJ.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-C0ycLLNj.js";import{L as dt,bR as Tc,eN as Ac,Ii as Rc,I_ as kl,c0 as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-sw_lecJS.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,n as Yt,o as ue,p as Dl}from"./utils-84J_wB9-.js";import{r as un}from"./empty-DIbsZE_-.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-FxBSZOu8.js";import{r as Gl}from"./index-WTq_uesm.js";import{r as zl}from"./index-BALn8uen.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-BiO8az_8.js";import{u as Kl,z as Pc,L as Wl,V as Jl,W as Xl,i as Ql,c as tf}from"./index-DhM1NMcw.js";import"./mui-Wsw1v_RJ.js";import{d as Pe}from"./decodeURIComponentSafe-Drs0EkRs.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]="b76d1050-3c93-4f98-8da8-ab087f0f4e70",t._sentryDebugIdIdentifier="sentry-dbid-b76d1050-3c93-4f98-8da8-ab087f0f4e70")}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-BdePShct.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CX_3yQh7.js";import{L as dt,bS as Tc,eO as Ac,IA as Rc,J0 as kl,c1 as Tl,fi as Al,fj as Rl}from"./zeni-epic-state-H6DZSSlf.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,n as Yt,o as ue,p as Dl}from"./utils-Dw8b4HCO.js";import{r as un}from"./empty-wr1Sjolf.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-th4agIPv.js";import{r as Gl}from"./index-T4vVJHIk.js";import{r as zl}from"./index-CUa_5F-3.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-C_ZreJAw.js";import{u as Kl,z as Pc,L as Wl,I as Jl,J as Xl,i as Ql,c as tf}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import{d as Pe}from"./decodeURIComponentSafe-BP018w8C.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]="4ac5fc05-002d-4438-9a4e-04f87986fb32",t._sentryDebugIdIdentifier="sentry-dbid-4ac5fc05-002d-4438-9a4e-04f87986fb32")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4
 
@@ -0,0 +1,5 @@
1
+ import{j as s}from"./liveblocks-BdePShct.js";import{a as o}from"./sentry-CX_3yQh7.js";import{g as f,j as H,h as V,u as W,k as _}from"./core-C_ZreJAw.js";import{m as F,Z as N,z as R,b4 as U,E as M,R as $,A as z,c as l,f as Y,a3 as Q,b5 as Z}from"./index-CGS6zWWp.js";import{eY as q,eO as G,LU as P,LV as J,ts as K,ti as g,e_ as X,bN as ee,tn as re,LW as ae}from"./zeni-epic-state-H6DZSSlf.js";import{D as ne,e as te,n as se,S as oe}from"./mui-BtnH6ELy.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{M as ce}from"./MobileAppDrawer-BDT0TmvR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b2c207b7-35f4-4532-ad03-18753c228ecc",e._sentryDebugIdIdentifier="sentry-dbid-b2c207b7-35f4-4532-ad03-18753c228ecc")}catch{}})();const de={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(c=>q(c));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,I="refer-and-earn-status-update",pe=_(function(e){const r=P(e),a=e.referralViewState.rewardsPlanFetchState,n=ee([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ae({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Q(Z));function Se({isReferralDrawerOpen:e}){const r=H(),a=V(),n=W(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,m]=o.useState(!1),p=R.getSignedInUser(),C=f(t=>G(t)),h=f(t=>P(t)),b=h.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=J([h,w]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(K()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&d&&(u(!0),a(g(!0)))},[b,a,d]),o.useEffect(()=>{!c&&w.fetchState==="Not-Started"&&d&&(x(!0),a(X(!0)))},[w,a,d]),o.useEffect(()=>{m(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:L,onAskAiCfoClick:T}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:y===!0});const O={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{m(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:L,onAskAiCfoClick:T,...O})]})}export{Se as R};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-BdePShct.js";import x from"./NotFoundScreen-C4aqnA8_.js";import{a as p}from"./sentry-CX_3yQh7.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as c}from"./core-C_ZreJAw.js";import{eO as T,MO as b,N2 as S,Cp as V,By as N,Co as m,Cf as O,Nh as U}from"./zeni-epic-state-H6DZSSlf.js";import{m as _,z as B,B as $,a3 as W,bK as z,ac as K}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import{R as g}from"./ReimbursementApprovalRuleDetailScreen-DMdpETrG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="cea33806-e397-46a9-9f2d-2089a7fa6f82",e._sentryDebugIdIdentifier="sentry-dbid-cea33806-e397-46a9-9f2d-2089a7fa6f82")}catch{}})();const f="reimbursement-approval-rule-update",M=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(U(!1))},onBackClick:()=>{K(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(W(z)),P=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),h=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=_(),i=u(n=>b(n)),v=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(V())},[v]),p.useEffect(()=>{l||h!=="Not-Started"||(s(!0),a(N(!0)))},[l,h,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${f}`]:[],eventCallback:(n,q,R)=>{n.endsWith(f)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx($,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(M,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(P,{})}),t.jsx(c,{path:"/new",element:t.jsx(g,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(g,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -0,0 +1 @@
1
+ import{j as g}from"./liveblocks-BdePShct.js";import{a as y}from"./sentry-CX_3yQh7.js";import{j as w,h as A,u as C,l as T,g as b,k as U}from"./core-C_ZreJAw.js";import{N2 as R,MO as E,Ci as x,Cr as _,Cp as S,Cq as h,N3 as B}from"./zeni-epic-state-H6DZSSlf.js";import{z as k,m as V,B as N,bB as O,ac as j}from"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.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]="33ed4f87-75cb-4bc0-9f0e-362234c77f6f",e._sentryDebugIdIdentifier="sentry-dbid-33ed4f87-75cb-4bc0-9f0e-362234c77f6f")}catch{}})();function F(e){return B(e)==null}const $=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=j(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const f=[];return p.forEach(u=>{const D=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const m=!!F(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=D.concat(I);f.push({action:u.stepType.selectedOption,actors:v,operator:v.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(O);function H(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(N,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,F as i};