@zeniai/web-app-ui 5.1.58-qa → 5.1.59-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 (160) hide show
  1. package/dist/assets/AddressRoutes-1t80Lwwm.js +1 -0
  2. package/dist/assets/AddressScreen-fWJCm4zs.js +9 -0
  3. package/dist/assets/AiCfoScreen-RA-P0Ele.js +22 -0
  4. package/dist/assets/BillPayApprovalRoutes-Bv9HP5Ed.js +1 -0
  5. package/dist/assets/BillPayRoutes-DM71-NMQ.js +119 -0
  6. package/dist/assets/BusinessVerificationPageScreen-9FWcKpyL.js +9 -0
  7. package/dist/assets/CardsAiCfoScreen-CJUAzHrT.js +14 -0
  8. package/dist/assets/ChargeCardRoutes-BKCoQWOu.js +71 -0
  9. package/dist/assets/CompanyPassportScreen-Z-knYrxv.js +1 -0
  10. package/dist/assets/ConnectionAuthScreen-Cev1gkS_.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-GZfWR-j7.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-BTm1Abhx.js +30 -0
  13. package/dist/assets/DashboardRoutes-wMhkTYla.js +20 -0
  14. package/dist/assets/DefaultTenantHome-ClYhyRXO.js +1 -0
  15. package/dist/assets/DomesticWireDetailScreen-Cl_7XBwW.js +18 -0
  16. package/dist/assets/DrawerScreen-DqnvN1tq.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-Dy54l33K.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-BAwf_5XR.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-DCDhII3I.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-rLAbttjN.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-B-PPv0PR.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-DlEpGGzi.js +12 -0
  23. package/dist/assets/MobileAppDrawer-CDYOk1Tu.js +1 -0
  24. package/dist/assets/NotFoundScreen-DTvgxtkb.js +1 -0
  25. package/dist/assets/NotificationRoutes-ye5VX3PS.js +1 -0
  26. package/dist/assets/OAuthConsentScreen-DF7q2wgy.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-DZnjcm2C.js +1 -0
  28. package/dist/assets/PeopleRoutes-Cshc61GL.js +22 -0
  29. package/dist/assets/PerformanceRoutes-UE1AlGRc.js +1 -0
  30. package/dist/assets/{Preview-KE8R1SN3.js → Preview-COCp1vn_.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-CGgBpuke.js → QBOConnectionScreen-ClD_YrtC.js} +1 -1
  32. package/dist/assets/ReferralListScreen-BQiDRb4Q.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-B02Z7OIU.js +1 -0
  34. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CrNxSCRL.js +1 -0
  35. package/dist/assets/{ReimbursementRoutes-MbRZIHuu.js → ReimbursementRoutes-BDTp98VH.js} +12 -12
  36. package/dist/assets/ReportsRoutes-utyUVcdp.js +1 -0
  37. package/dist/assets/RewardsRoutes-B0tydv2M.js +1 -0
  38. package/dist/assets/ScreenRoutes-C_5gtCcR.js +2 -0
  39. package/dist/assets/SettingsRoutes-CItpcp8o.js +57 -0
  40. package/dist/assets/SetupPagesScreen-Cb_h1N2q.js +29 -0
  41. package/dist/assets/SignInScreen-DayaVPul.js +1 -0
  42. package/dist/assets/SignOutScreen-DfnourF6.js +9 -0
  43. package/dist/assets/TaskListScreen-DVU-iHmP.js +9 -0
  44. package/dist/assets/TaskRoutes-DECOOPQm.js +9 -0
  45. package/dist/assets/TransactionDetailRoutes-Ln9HzXsS.js +1 -0
  46. package/dist/assets/TransactionDetailScreen-qgLSqSNT.js +5 -0
  47. package/dist/assets/TransactionListRoutes-BqwHG3AV.js +1 -0
  48. package/dist/assets/TreasuryRoutes-DxBKr4aJ.js +37 -0
  49. package/dist/assets/{VendorsRoutes-BjMVmZbA.js → VendorsRoutes-BvKCtUVO.js} +26 -26
  50. package/dist/assets/WiseConfirmationScreen-DGdciAcq.js +12 -0
  51. package/dist/assets/ZeniAccountRoutes-4nzGey-r.js +73 -0
  52. package/dist/assets/ZeniAccountStatementScreen-C-juTt6c.js +9 -0
  53. package/dist/assets/{accountMappingHelper-B_qiWmeW.js → accountMappingHelper-BFxOrTVK.js} +1 -1
  54. package/dist/assets/{analytics-BUNQWYXz.js → analytics-BToIaEuE.js} +1 -1
  55. package/dist/assets/{analyticsHelper-DNuTbD5B.js → analyticsHelper-DE1SyLO3.js} +1 -1
  56. package/dist/assets/{core-C8Y7fm3n.js → core-CJUY0MOY.js} +2 -2
  57. package/dist/assets/{decodeURIComponentSafe-pK1yrQsS.js → decodeURIComponentSafe-BXzU7C-M.js} +1 -1
  58. package/dist/assets/dnd-LV5QvpgJ.js +6 -0
  59. package/dist/assets/{empty-CTn7RkAu.js → empty-BrON4VTN.js} +1 -1
  60. package/dist/assets/{index-DhPN3gNQ.js → empty-DZsqgfyL.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-BE2d8kYR.js → emptyVideoElement-D28OtmxE.js} +1 -1
  62. package/dist/assets/epic-DUxvu9Sx.js +2 -0
  63. package/dist/assets/getLocaleForTenant-BxE1cnSw.js +1 -0
  64. package/dist/assets/index-3T7v0Kjw.js +1 -0
  65. package/dist/assets/{index-CyWBxegb.js → index-6y2Ha7q4.js} +1 -1
  66. package/dist/assets/{index-C_oqefR-.js → index-7lEXxVMw.js} +1 -1
  67. package/dist/assets/{index-C3-objML.js → index-B2ukUPdb.js} +44600 -39007
  68. package/dist/assets/{index-DjeTRCsF.js → index-BUVIqiRA.js} +1 -1
  69. package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
  70. package/dist/assets/{index-eBlD3uTi.js → index-CQBukgOK.js} +1 -1
  71. package/dist/assets/index-LSEqxgWI.js +1 -0
  72. package/dist/assets/{index-Cv6pmWIm.js → index-N--zv7t4.js} +2 -2
  73. package/dist/assets/{lexical-CPmqnx9k.js → lexical-Cmpx8sPR.js} +1 -1
  74. package/dist/assets/{liveblocks-fDjf6Tur.js → liveblocks-qa_6WStS.js} +1 -1
  75. package/dist/assets/{lottie-DmArr_jQ.js → lottie-zGjtu-Uw.js} +1 -1
  76. package/dist/assets/{mui-Ky-KJxLh.js → mui-CkYYTJAV.js} +1 -1
  77. package/dist/assets/{pathToGoBack-9QBEItSt.js → pathToGoBack-BPCNomFS.js} +1 -1
  78. package/dist/assets/{pdf-NvioK7wV.js → pdf-CZjXUklc.js} +3 -3
  79. package/dist/assets/{pdf-lib-6uw_qC-k.js → pdf-lib-1-yXS4qt.js} +1 -1
  80. package/dist/assets/{plaid-D50ZkdQf.js → plaid-1xV6OFdB.js} +1 -1
  81. package/dist/assets/{pusher-CAUUsTgW.js → pusher-D2ak7eHg.js} +1 -1
  82. package/dist/assets/{react-C7YWBeDO.js → react-BQ9185Ee.js} +1 -1
  83. package/dist/assets/{react-CzlxEg73.js → react-BSs2nIas.js} +1 -1
  84. package/dist/assets/{react-CHUA3ysh.js → react-BihdrB0K.js} +1 -1
  85. package/dist/assets/{react-BX04XLg-.js → react-CBo1BYNF.js} +1 -1
  86. package/dist/assets/{react-DsRQdKTx.js → react-COkOWomn.js} +1 -1
  87. package/dist/assets/{react-BzVo9cuE.js → react-CVnQTP0R.js} +1 -1
  88. package/dist/assets/{recharts-CgIjuHOA.js → recharts-D3JK2Byj.js} +3 -3
  89. package/dist/assets/{routePaths-B8EWQXPr.js → routePaths-DbnM8jAc.js} +1 -1
  90. package/dist/assets/{sentry-DjzU4p1F.js → sentry-BTf2Dtmp.js} +1 -1
  91. package/dist/assets/{url-mCw4Y0mb.js → url-CnoP6Bkx.js} +1 -1
  92. package/dist/assets/{url-DBETAWzw.js → url-DbiWYN-9.js} +1 -1
  93. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-C9aknKEV.js +1 -0
  94. package/dist/assets/{useAskAiCfoHostNavButtonProps-DDzinN2F.js → useAskAiCfoHostNavButtonProps-DUCZkKew.js} +1 -1
  95. package/dist/assets/useCashManagementBanner-Bqm1UKHq.js +1 -0
  96. package/dist/assets/useChargeCardPusherEvents-Bxg7wg9x.js +1 -0
  97. package/dist/assets/{useDeviceId-DBHwhChu.js → useDeviceId-D5q7Ex2B.js} +1 -1
  98. package/dist/assets/useEmailConnectResultRefresh-BGSh8M-E.js +1 -0
  99. package/dist/assets/useInitialThreadRequest-CcPLE3h6.js +1 -0
  100. package/dist/assets/{utils-Djk4rnCT.js → utils-Bd6aVUzu.js} +2 -2
  101. package/dist/assets/withTransactionSidePanel-RlHJMQ4A.js +21 -0
  102. package/dist/assets/zeni-epic-state-Da9EwYbz.js +13 -0
  103. package/dist/index.html +1 -1
  104. package/package.json +4 -4
  105. package/dist/assets/AddressRoutes-CPX14XSj.js +0 -1
  106. package/dist/assets/AddressScreen-V8qhbu9d.js +0 -9
  107. package/dist/assets/AiCfoScreen-B2v4oX4h.js +0 -22
  108. package/dist/assets/BillPayApprovalRoutes-B6jqtEYg.js +0 -1
  109. package/dist/assets/BillPayRoutes-CKtJupU-.js +0 -119
  110. package/dist/assets/BusinessVerificationPageScreen-DO1Qhw6D.js +0 -9
  111. package/dist/assets/ChargeCardRoutes-BHdVO9a5.js +0 -71
  112. package/dist/assets/CompanyPassportScreen-DkvfpbMw.js +0 -1
  113. package/dist/assets/ConnectionAuthScreen-DaGPpRPO.js +0 -11
  114. package/dist/assets/CustomerOnboardingAuthScreen-CD5LwsDH.js +0 -1
  115. package/dist/assets/CustomerOnboardingRoutes-CTpQNO2Q.js +0 -23
  116. package/dist/assets/DashboardRoutes-jRDsqXRC.js +0 -20
  117. package/dist/assets/DefaultTenantHome-_pdrgccv.js +0 -1
  118. package/dist/assets/DomesticWireDetailScreen-CCXVWOri.js +0 -18
  119. package/dist/assets/DrawerScreen-B7V2OyqL.js +0 -1
  120. package/dist/assets/EntityDetailRoutes-DfRfi9XQ.js +0 -1
  121. package/dist/assets/ExpenseAutomationRoutes-cFT1NB2O.js +0 -25
  122. package/dist/assets/FeaturePreviewScreen-2R9FJdWJ.js +0 -1
  123. package/dist/assets/HubSpotOAuthCallbackScreen-rd4Kj3vC.js +0 -1
  124. package/dist/assets/MagicLinkRoutes-BO0Lexxe.js +0 -72
  125. package/dist/assets/MagicLinkSignInScreen-BAuy3KLO.js +0 -12
  126. package/dist/assets/MobileAppDrawer-DIls_BW2.js +0 -1
  127. package/dist/assets/NotFoundScreen-D4Av36kV.js +0 -1
  128. package/dist/assets/NotificationRoutes-lCQFJz0z.js +0 -1
  129. package/dist/assets/OAuthConsentScreen-COgy1n70.js +0 -1
  130. package/dist/assets/PandLWithForecastRoutes-Bkidve9i.js +0 -1
  131. package/dist/assets/PeopleRoutes-B7wvEYYp.js +0 -22
  132. package/dist/assets/PerformanceRoutes-CjXTt9vm.js +0 -1
  133. package/dist/assets/ReferralListScreen-BA5RvLF7.js +0 -5
  134. package/dist/assets/ReimbursementApprovalRoutes-BGkN9M7Q.js +0 -1
  135. package/dist/assets/ReimbursementApprovalRuleDetailScreen-6mUow2wt.js +0 -1
  136. package/dist/assets/ReportsRoutes-BBKUYNc0.js +0 -1
  137. package/dist/assets/RewardsRoutes-BbXQsLmk.js +0 -1
  138. package/dist/assets/ScreenRoutes-BxoMc-Es.js +0 -2
  139. package/dist/assets/SettingsRoutes-DLxDXOLE.js +0 -57
  140. package/dist/assets/SetupPagesScreen-DLtasQoq.js +0 -29
  141. package/dist/assets/SignInScreen-CJnKhy_P.js +0 -1
  142. package/dist/assets/SignOutScreen-DNLOQn_i.js +0 -9
  143. package/dist/assets/TaskListScreen-G6lL0uD5.js +0 -9
  144. package/dist/assets/TaskRoutes-DQA7zeTW.js +0 -9
  145. package/dist/assets/TransactionDetailRoutes-yWhhHCBD.js +0 -1
  146. package/dist/assets/TransactionDetailScreen-gAhskOIn.js +0 -5
  147. package/dist/assets/TransactionListRoutes-CzgCZLFm.js +0 -1
  148. package/dist/assets/TreasuryRoutes-BmIGoFg4.js +0 -37
  149. package/dist/assets/WiseConfirmationScreen-Co4RuLhn.js +0 -12
  150. package/dist/assets/ZeniAccountRoutes-C_Otg4hI.js +0 -57
  151. package/dist/assets/ZeniAccountStatementScreen-BbupcIsJ.js +0 -9
  152. package/dist/assets/dnd-RzzQg6oJ.js +0 -6
  153. package/dist/assets/empty-Bs_WirIs.js +0 -1
  154. package/dist/assets/epic-CPnluZX0.js +0 -2
  155. package/dist/assets/getLocaleForTenant-CYgluMQL.js +0 -1
  156. package/dist/assets/index-BCOcxjVj.js +0 -1
  157. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DN1K5TAQ.js +0 -1
  158. package/dist/assets/useInitialThreadRequest-X7WpfR49.js +0 -1
  159. package/dist/assets/withTransactionSidePanel-BvWwtSm-.js +0 -21
  160. package/dist/assets/zeni-epic-state-DvHgUD1-.js +0 -13
@@ -1,57 +0,0 @@
1
- import{j as n}from"./liveblocks-fDjf6Tur.js";import{h as ne,g as W,u as M,i as q,j as w,n as Y,N as X,o as Ve,p as k}from"./core-C8Y7fm3n.js";import{eQ as U,Pa as Ce,Pb as $e,ck as ee,cl as Ze,fh as Ne,xp as ke,BC as He,xj as Tn,Pc as Fn,Pd as Bn,xm as On,xt as ge,xg as Ln,xd as Rn,NX as le,Pe as Un,F2 as _n,L2 as zn,F4 as Mn,ko as Fe,Pf as Vn,qK as Ge,qy as We,kf as qe,ki as Be,L3 as Oe,L4 as $n,Pg as Zn,kh as Nn,kE as Hn,k6 as Gn,iF as Wn,iE as qn,Ph as Yn,Pi as ye,EL as Jn,Pj as Kn,Pk as Qn,NQ as we,Pl as Le,Pm as Xn,Ff as ea,OA as na,Cw as Ye,tb as Je,Pn as aa,Fc as ta,Po as Ke,cL as Ae,Fj as Qe,fi as oa,eZ as Xe,e$ as De,Fh as sa,Cq as ra,F9 as ia,Pp as en,Pq as nn,EN as an,EX as Re,Pr as ca,On as la,Fk as da,bs as ua,bF as pa,cw as ma,bG as ha,bt as fa,JZ as ga}from"./zeni-epic-state-DvHgUD1-.js";import{k as ae,s as Z,z as S,U as O,m as _,B as de,bY as ya,a2 as Ie,J as V,A as J,p as tn,aq as xa,af as Ue,c as L,bZ as Ca,at as Se,b_ as ka,x as ue,b$ as wa,e as be,aN as G,c0 as Aa,Y as Da,_ as on,ac as Ia,c1 as _e,c2 as Sa,q as ce,c3 as ba,c4 as Pa,c5 as Ea,a9 as va,o as ja}from"./index-C3-objML.js";import{n as z,D as K,S as Q}from"./mui-Ky-KJxLh.js";import ie from"./NotFoundScreen-D4Av36kV.js";import{S as ze}from"./SetupPagesScreen-DLtasQoq.js";import{F as sn}from"./FeaturePreviewScreen-2R9FJdWJ.js";import{a as d}from"./sentry-DjzU4p1F.js";import{M as pe}from"./MobileAppDrawer-DIls_BW2.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-CCXVWOri.js";import{A as Oa}from"./AddressScreen-V8qhbu9d.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-DDzinN2F.js";import{Z as La}from"./ZeniAccountStatementScreen-BbupcIsJ.js";import"./recharts-CgIjuHOA.js";import"./analytics-BUNQWYXz.js";import"./plaid-D50ZkdQf.js";import"./dnd-RzzQg6oJ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DmArr_jQ.js";import"./lexical-CPmqnx9k.js";import"./pdf-NvioK7wV.js";import"./utils-Djk4rnCT.js";import"./analyticsHelper-DNuTbD5B.js";import"./routePaths-B8EWQXPr.js";import"./BusinessVerificationPageScreen-DO1Qhw6D.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]="60c7ea59-6f92-44a1-8984-63159afdae69",e._sentryDebugIdIdentifier="sentry-dbid-60c7ea59-6f92-44a1-8984-63159afdae69")}catch{}})();const Ra=z.div`
2
- display: flex;
3
- min-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
- `,Ua=Y(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(ke(t))},onCreateRule:()=>{e(Rn())},onUpdateRule:t=>{e(ge(t))},onDeleteClick:t=>{e(Ln(t))},onPauseClick:t=>{e(ge(t,!0,!1))},onResumeClick:t=>{e(ge(t,!1,!0))},onActivityClick:(t,r)=>{e(On(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(Fn())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function Me({isEditDrawerOpen:e}){const a=ne(),s=W(),o=M(),t=ae(),{ruleId:r,tenantEmailDomain:u}=q(),{useFeatureGate:l}=Z(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=w(y=>U(y)),m=w(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=w(y=>$e(y)),f=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ze(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(O.isTreasuryEnabled),g=c?.company!=null&&Ne(c.company),I=D&&g,F=S.getSignedInUser(),R=c.tenantId,j={userId:F?.userId??"",sessionId:F?.zeniSessionId??"",tenantId:R??""},E=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&f&&(i(!0),o(ke(!0)))},[x,C,f,o]);const P=y=>{h(y)},T=_(),v=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Ra,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:E,handleDrawerToggle:P,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:v})]})}const _a={overlayWidth:new J(100,100,58)},za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:_a.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ma,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},Ma=z(Q)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,Va={overlayWidth:new J(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=M(),o=_(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Za,{onClick:r=>r.stopPropagation(),children:n.jsx(Oa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Za=z(Q)`
14
- display: flex;
15
- min-height: 100%;
16
- flex-direction: column;
17
- `,Na={overlayWidth:new J(100,100,58)},Ha=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Na.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Fa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=z(Q)`
18
- display: flex;
19
- min-height: 100%;
20
- flex-direction: column;
21
- `,Wa=z.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${e=>e.theme.colors.grey4};
29
- `,qa=Y(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Hn(o))},initializeVendorAddress:()=>{e(Nn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Oe("common"))},onCancelAutoComplete:()=>{e(Oe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=q(),h=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>U(y)),c=w(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,f]=d.useState(!1),[A,D]=d.useState(!1),[g,I]=d.useState(!1),F=tn(t.state?.pathnameStackToGoBack),{poppedPathname:R}=F,j=R?.split("/"),E=j?.[j.length-1];d.useEffect(()=>{e===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const P=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{P==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&v()},[P,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},v=()=>{f(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(za,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:b}):null,A===!0?n.jsx(Ha,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:A}):null,g===!0?n.jsx($a,{closeDrawerHandler:v,isDrawerOpen:g}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(qa,{navigate:o,location:t,companyId:C,accountId:E,analytics:L,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Ya={overlayWidth:new J(100,100,58)},Ja=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=_(),u=V(),l=w(i=>$e(i)),p=w(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{t(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:Ya.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Ka,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})},Ka=z(Q)`
30
- display: flex;
31
- min-height: 100%;
32
- flex-direction: column;
33
- `,Qa={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=V(),t=M(),r=w(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=w(i=>Yn(i)),x={analytics:L,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(Kn(i))},updateFilesEntity:i=>{t(qe({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(Jn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:Qa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Xa,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})]})},Xa=z(Q)`
34
- display: flex;
35
- min-height: 100%;
36
- flex-direction: column;
37
- `,et={overlayWidth:new J(100,100,58)},nt=Y(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(Ye(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=w(g=>Qn(g)),u=w(g=>U(g)),l=_(),p=V(),h=M(),{accountId:x}=q(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=Z(),{configValue:f}=b(G.zeniAccountsConfig),A=we(f),D=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:g=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:g=>g.stopPropagation(),children:n.jsx(nt,{analytics:L,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:g=>{h(Xn(g))},onAnotherTransferClick:()=>{C(!1),h(Le())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=z(Q)`
38
- display: flex;
39
- min-height: 100%;
40
- flex-direction: column;
41
- `,tt=z.div`
42
- display: flex;
43
- min-height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,ot=Y(function(e,a){return{zeniAccountListView:Ke(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(Je("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ye(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=M(),r=V(),{tenantEmailDomain:u}=q(),{useDynamicConfig:l,useFeatureGate:p}=Z(),h=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:c}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),f=w(B=>U(B)),A=f.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),g=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(f.tenantId),[I,F]=d.useState(!1),[R,j]=d.useState(!1),[E,P]=d.useState(!1),[T,v]=d.useState(!1),y=w(B=>Ke(B)),$=y.fetchState,te=w(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,N=ae(),H=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,fn=ee(N?.loggedInUserRoleMap),gn=Ae(N?.loggedInUserRoleMap),yn=!!f.companyBillPayInfo?.info?.isBillPayEnabled,Pe=S.getSignedInUser(),xn={userId:Pe?.userId??"",sessionId:Pe?.zeniSessionId??"",tenantId:f.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:Ee}=Da();d.useEffect(()=>{!I&&Ee&&(F(!0),t(Qe(!1)))},[I,t,$,Ee]),d.useEffect(()=>{!R&&oe==="Not-Started"&&A&&(j(!0),t(ke(!0)))},[R,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{v(a!=null&&a===!0)},[a]);const ve=()=>{P(!1),o("..")},[kn,wn]=d.useState(!1),je=B=>{wn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=f.company!=null&&Ne(f.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),fe=w(B=>B.treasurySetupViewState.treasuryFundsDetails),Pn=fe.fundsDetails,En=Ia(Pn);d.useEffect(()=>{he!==!0||Sn||fe?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[fe.fetchStatus,t]);const vn=Xe(f),jn=De(c,f);return vn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&E===!1&&T===!1?n.jsx(ue,{analytics:L,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,E===!0?n.jsx(ln,{closeDrawerHandler:ve,isTransferDrawerOpen:E,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:ve,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:f,location:s,companyId:A,analytics:L,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:En,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&fn?n.jsx(X,{to:"../setup"}):f.companyZeniAccountInfo?.info&&!H&&gn?n.jsx(X,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=z.div`
50
- display: flex;
51
- width: 100%;
52
- flex: 1 1 auto;
53
- flex-direction: column;
54
- align-items: center;
55
- min-height: 100vh;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,it=Y(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(h=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Re(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Re(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=q(),{useDynamicConfig:h}=Z(),{useFeatureGate:x}=Z(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(O.isCheckingCommentingEnabled),m=w(H=>U(H)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),f=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,g={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[F,R]=d.useState(!1),[j,E]=d.useState(!1),[P,T]=d.useState(!1),[v,y]=d.useState(!1),$=w(H=>nn(H,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{F||(r(an(p??"",!1)),R(!0))},[F,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const N=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[v===!0&&$.accountDetail!=null?n.jsx(Ja,{authParams:g,downloadAccountDetailEndPoint:I,closeDrawerHandler:N,isAccountInfoDrawerOpen:v,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:N,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:I}):null,P===!0?n.jsx(cn,{closeDrawerHandler:N,isCheckDepositDrawerOpen:P}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:f,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=Y(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ea),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=q(),{useDynamicConfig:o}=Z(),t=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=w(g=>U(g)),{configValue:x}=o(G.zeniAccountsConfig),i=we(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=g=>{u(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const f=ae(),A=ee(f?.loggedInUserRoleMap),D=Ae(f?.loggedInUserRoleMap);if(C&&A)return n.jsx(X,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const g=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Pa,{showConfetti:l}),n.jsx(ue,{analytics:L,onLoad:g=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:L,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function zt(){const e=W(),a=w(v=>U(v)),s=_(),{useFeatureGate:o,useDynamicConfig:t}=Z(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),c=Xe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),f=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ha(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(O.isDepositAccountsFeatureEnabled),g=D&&!C,{configValue:I}=t(G.expressPayConfig),F=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:R}=o(O.isAutoTransferRuleEnabled),j=va(a,x,i)&&!C&&fa(r?.loggedInUserRoleMap),E=ga(r?.loggedInUserRoleMap),P=g&&ee(r?.loggedInUserRoleMap),T=P||Ze(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),R?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ie,{})}),F&&u?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(k,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(k,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(re,{})}),n.jsx(k,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"statements",element:n.jsx(La,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]})}export{zt as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-fDjf6Tur.js";import{a as f}from"./sentry-DjzU4p1F.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-C8Y7fm3n.js";import{Jd as s,Jc as j,Ps as v,eQ as C,Pt as T}from"./zeni-epic-state-DvHgUD1-.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,p as U}from"./index-C3-objML.js";import{n as _}from"./mui-Ky-KJxLh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3969c5d8-4024-45bd-ae4e-c8dfe4760280",e._sentryDebugIdIdentifier="sentry-dbid-3969c5d8-4024-45bd-ae4e-c8dfe4760280")}catch{}})();const J=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function q(){const e=x(),n=B(),d=z(),l=P();let{accountId:a}=$(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,h]=f.useState(!1),y=D();f.useEffect(()=>{u||(h(!0),n(j(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>C(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(J,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{q as Z};
@@ -1,6 +0,0 @@
1
- import{a as v,p as ae,c as V,g as ce,b as et}from"./sentry-DjzU4p1F.js";import{b as ue}from"./core-C8Y7fm3n.js";import{j as de}from"./liveblocks-fDjf6Tur.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="e378fd9b-1174-40ce-8839-da91dfd3673e",r._sentryDebugIdIdentifier="sentry-dbid-e378fd9b-1174-40ce-8839-da91dfd3673e")}catch{}})();function Yt(r){let t=null;return()=>(t==null&&(t=r()),t)}class he{enter(t){const e=this.entered.length;return this.entered=function(i,n){const s=new Set,o=c=>s.add(c);i.forEach(o),n.forEach(o);const a=[];return s.forEach(c=>a.push(c)),a}(this.entered.filter(i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t))),[t]),e===0&&this.entered.length>0}leave(t){const e=this.entered.length;var i,n;return this.entered=(i=this.entered.filter(this.isNodeInDocument),n=t,i.filter(s=>s!==n)),e>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class le{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})})}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach(i=>{const n=this.config.exposeProperties[i];n!=null&&(e[i]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const $t="__NATIVE_FILE__",Xt="__NATIVE_URL__",qt="__NATIVE_TEXT__",Gt="__NATIVE_HTML__",It=Object.freeze(Object.defineProperty({__proto__:null,FILE:$t,HTML:Gt,TEXT:qt,URL:Xt},Symbol.toStringTag,{value:"Module"}));function rt(r,t,e){const i=t.reduce((n,s)=>n||r.getData(s),"");return i??e}const ut={[$t]:{exposeProperties:{files:r=>Array.prototype.slice.call(r.files),items:r=>r.items,dataTransfer:r=>r},matchesTypes:["Files"]},[Gt]:{exposeProperties:{html:(r,t)=>rt(r,t,""),dataTransfer:r=>r},matchesTypes:["Html","text/html"]},[Xt]:{exposeProperties:{urls:(r,t)=>rt(r,t,"").split(`
2
- `),dataTransfer:r=>r},matchesTypes:["Url","text/uri-list"]},[qt]:{exposeProperties:{text:(r,t)=>rt(r,t,""),dataTransfer:r=>r},matchesTypes:["Text","text/plain"]}};function nt(r){if(!r)return null;const t=Array.prototype.slice.call(r.types||[]);return Object.keys(ut).filter(e=>{const i=ut[e];return!!i?.matchesTypes&&i.matchesTypes.some(n=>t.indexOf(n)>-1)})[0]||null}const ge=Yt(()=>/firefox/i.test(navigator.userAgent)),Ct=Yt(()=>!!window.safari);class Nt{interpolate(t){const{xs:e,ys:i,c1s:n,c2s:s,c3s:o}=this;let a=e.length-1;if(t===e[a])return i[a];let c,u=0,d=o.length-1;for(;u<=d;){c=Math.floor(.5*(u+d));const h=e[c];if(h<t)u=c+1;else{if(!(h>t))return i[c];d=c-1}}a=Math.max(0,d);const g=t-e[a],f=g*g;return i[a]+n[a]*g+s[a]*f+o[a]*g*f}constructor(t,e){const{length:i}=t,n=[];for(let h=0;h<i;h++)n.push(h);n.sort((h,m)=>t[h]<t[m]?-1:1);const s=[],o=[];let a,c;for(let h=0;h<i-1;h++)a=t[h+1]-t[h],c=e[h+1]-e[h],s.push(a),o.push(c/a);const u=[o[0]];for(let h=0;h<s.length-1;h++){const m=o[h],y=o[h+1];if(m*y<=0)u.push(0);else{a=s[h];const S=s[h+1],O=a+S;u.push(3*O/((O+S)/m+(O+a)/y))}}u.push(o[o.length-1]);const d=[],g=[];let f;for(let h=0;h<u.length-1;h++){f=o[h];const m=u[h],y=1/s[h],S=m+u[h+1]-f-f;d.push((f-m-S)*y),g.push(S*y*y)}this.xs=t,this.ys=e,this.c1s=u,this.c2s=d,this.c3s=g}}function Kt(r){const t=r.nodeType===1?r:r.parentElement;if(!t)return null;const{top:e,left:i}=t.getBoundingClientRect();return{x:i,y:e}}function X(r){return{x:r.clientX,y:r.clientY}}function fe(r,t,e,i,n){const s=(o=t).nodeName==="IMG"&&(ge()||!(!((a=document.documentElement)===null||a===void 0)&&a.contains(o)));var o,a;const c=Kt(s?r:t),u={x:e.x-c.x,y:e.y-c.y},{offsetWidth:d,offsetHeight:g}=r,{anchorX:f,anchorY:h}=i,{dragPreviewWidth:m,dragPreviewHeight:y}=function(b,L,tt,A){let H=b?L.width:tt,_=b?L.height:A;return Ct()&&b&&(_/=window.devicePixelRatio,H/=window.devicePixelRatio),{dragPreviewWidth:H,dragPreviewHeight:_}}(s,t,d,g),{offsetX:S,offsetY:O}=n,D=O===0||O;return{x:S===0||S?S:new Nt([0,.5,1],[u.x,u.x/d*m,u.x+m-d]).interpolate(f),y:D?O:(()=>{let b=new Nt([0,.5,1],[u.y,u.y/g*y,u.y+y-g]).interpolate(h);return Ct()&&s&&(b+=(window.devicePixelRatio-1)*y),b})()}}let pe=class{get window(){return this.globalContext?this.globalContext:typeof window<"u"?window:void 0}get document(){var r;return!((r=this.globalContext)===null||r===void 0)&&r.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var r;return((r=this.optionsArgs)===null||r===void 0?void 0:r.rootElement)||this.window}constructor(r,t){this.ownerDocument=null,this.globalContext=r,this.optionsArgs=t}};function ve(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Pt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){ve(r,n,e[n])})}return r}class me{profile(){var t,e;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;var e;t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&((e=this.window)===null||e===void 0||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(t,e,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,i){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,i);const n=o=>this.handleDragStart(o,t),s=o=>this.handleSelectStart(o);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",s),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const i=o=>this.handleDragEnter(o,t),n=o=>this.handleDragOver(o,t),s=o=>this.handleDrop(o,t);return e.addEventListener("dragenter",i),e.addEventListener("dragover",n),e.addEventListener("drop",s),()=>{e.removeEventListener("dragenter",i),e.removeEventListener("dragover",n),e.removeEventListener("drop",s)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return Pt({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return Pt({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(It).some(e=>It[e]===t)}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(i,n){const s=ut[i];if(!s)throw new Error(`native type ${i} has no configuration`);const o=new le(s);return o.loadDataTransfer(n),o}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)===null||e===void 0?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;return this.currentDragSourceNode=null,this.rootElement&&((t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,i){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=n=>{const s=this.sourceNodes.get(n);return s&&Kt(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{const n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=n=>{if(n.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const o=X(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=n,c=nt(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),g=this.sourceNodes.get(d),f=this.sourcePreviewNodes.get(d)||g;if(f){const{anchorX:h,anchorY:m,offsetX:y,offsetY:S}=this.getCurrentSourcePreviewNodeOptions(),O=fe(g,f,o,{anchorX:h,anchorY:m},{offsetX:y,offsetY:S});a.setDragImage(f,O.x,O.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(a&&!a.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{var s;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&((s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer)),!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;const{dataTransfer:o}=n,a=nt(o);a&&this.beginDragNativeItem(a,o)},this.handleTopDragEnter=n=>{const{dragEnterTargetIds:s}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,s.length>0&&this.actions.hover(s,{clientOffset:X(n)}),s.some(o=>this.monitor.canDropOnTarget(o))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{var s;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&((s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer))},this.handleTopDragOver=n=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return n.preventDefault(),void(n.dataTransfer&&(n.dataTransfer.dropEffect="none"));this.altKeyPressed=n.altKey,this.lastClientOffset=X(n),this.scheduleHover(s),(s||[]).some(o=>this.monitor.canDropOnTarget(o))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{var s;this.dropTargetIds=[],this.isDraggingNativeItem()?(n.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer)):nt(n.dataTransfer)&&n.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:X(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{const s=n.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(n.preventDefault(),s.dragDrop()))},this.options=new pe(e,i),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new he(this.isNodeInDocument)}}const Sr=function(r,t,e){return new me(r,t,e)};var M,zt=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)},l=(r,t,e)=>(zt(r,t,"read from private field"),e?e.call(r):t.get(r)),E=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},x=(r,t,e,i)=>(zt(r,t,"write to private field"),t.set(r,e),e),ye=class{constructor(){E(this,M,void 0),this.register=r=>{l(this,M).push(r)},this.unregister=r=>{let t;for(;(t=l(this,M).indexOf(r))!==-1;)l(this,M).splice(t,1)},this.backendChanged=r=>{for(let t of l(this,M))t.backendChanged(r)},x(this,M,[])}};M=new WeakMap;var T,B,w,C,N,dt,ht,lt,G,K,W,z=class{constructor(r,t,e){if(E(this,T,void 0),E(this,B,void 0),E(this,w,void 0),E(this,C,void 0),E(this,N,void 0),E(this,dt,(i,n,s)=>{if(!s.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(s)}`);let o=s.backend(i,n,s.options),a=s.id,c=!s.id&&o&&o.constructor;if(c&&(a=o.constructor.name),!a)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(s)}
3
- see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(c&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
4
- This might be unsupported in the future, please specify 'id' explicitely for every backend.`),l(this,w)[a])throw new Error(`You must specify a unique 'id' property in your Backend entry:
5
- ${JSON.stringify(s)} (conflicts with: ${JSON.stringify(l(this,w)[a])})`);return{id:a,instance:o,preview:s.preview??!1,transition:s.transition,skipDispatchOnTransition:s.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>"u")){if(z.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");z.isSetUp=!0,l(this,ht).call(this,window),l(this,w)[l(this,T)].instance.setup()}},this.teardown=()=>{typeof window>"u"||(z.isSetUp=!1,l(this,lt).call(this,window),l(this,w)[l(this,T)].instance.teardown())},this.connectDragSource=(i,n,s)=>l(this,W).call(this,"connectDragSource",i,n,s),this.connectDragPreview=(i,n,s)=>l(this,W).call(this,"connectDragPreview",i,n,s),this.connectDropTarget=(i,n,s)=>l(this,W).call(this,"connectDropTarget",i,n,s),this.profile=()=>l(this,w)[l(this,T)].instance.profile(),this.previewEnabled=()=>l(this,w)[l(this,T)].preview,this.previewsList=()=>l(this,B),this.backendsList=()=>l(this,C),E(this,ht,i=>{l(this,C).forEach(n=>{n.transition&&i.addEventListener(n.transition.event,l(this,G))})}),E(this,lt,i=>{l(this,C).forEach(n=>{n.transition&&i.removeEventListener(n.transition.event,l(this,G))})}),E(this,G,i=>{let n=l(this,T);if(l(this,C).some(s=>!(s.id===l(this,T)||!s.transition||!s.transition.check(i))&&(x(this,T,s.id),!0)),l(this,T)!==n){l(this,w)[n].instance.teardown(),Object.keys(l(this,N)).forEach(a=>{let c=l(this,N)[a];c.unsubscribe(),c.unsubscribe=l(this,K).call(this,c.func,...c.args)}),l(this,B).backendChanged(this);let s=l(this,w)[l(this,T)];if(s.instance.setup(),s.skipDispatchOnTransition)return;let o=new i.constructor(i.type,i);i.target?.dispatchEvent(o)}}),E(this,K,(i,n,s,o)=>l(this,w)[l(this,T)].instance[i](n,s,o)),E(this,W,(i,n,s,o)=>{let a=`${i}_${n}`,c=l(this,K).call(this,i,n,s,o);return l(this,N)[a]={func:i,args:[n,s,o],unsubscribe:c},()=>{l(this,N)[a].unsubscribe(),delete l(this,N)[a]}}),!e||!e.backends||e.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
6
- see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);x(this,B,new ye),x(this,w,{}),x(this,C,[]),e.backends.forEach(i=>{let n=l(this,dt).call(this,r,t,i);l(this,w)[n.id]=n,l(this,C).push(n)}),x(this,T,l(this,C)[0].id),x(this,N,{})}},Vt=z;T=new WeakMap,B=new WeakMap,w=new WeakMap,C=new WeakMap,N=new WeakMap,dt=new WeakMap,ht=new WeakMap,lt=new WeakMap,G=new WeakMap,K=new WeakMap,W=new WeakMap,Vt.isSetUp=!1;var De=(r,t,e)=>new Vt(r,t,e),Jt=(r,t)=>({event:r,check:t}),Or=Jt("touchstart",r=>{let t=r;return t.touches!==null&&t.touches!==void 0}),Tr=Jt("mousedown",r=>r.type.indexOf("touch")===-1&&r.type.indexOf("mouse")!==-1);const mt=v.createContext({dragDropManager:void 0});function p(r,t,...e){if(ae!==void 0&&t===void 0)throw new Error("invariant requires an error message argument");if(!r){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;i=new Error(t.replace(/%s/g,function(){return e[n++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function Zt(r){return typeof r=="object"}const yt="dnd-core/INIT_COORDS",Dt="dnd-core/BEGIN_DRAG",Qt="dnd-core/PUBLISH_DRAG_SOURCE",Z="dnd-core/HOVER",bt="dnd-core/DROP",St="dnd-core/END_DRAG";function Mt(r,t){return{type:yt,payload:{sourceClientOffset:t||null,clientOffset:r||null}}}const be={type:yt,payload:{clientOffset:null,sourceClientOffset:null}};function Se(r){return function(t=[],e={publishSource:!0}){const{publishSource:i=!0,clientOffset:n,getSourceClientOffset:s}=e,o=r.getMonitor(),a=r.getRegistry();r.dispatch(Mt(n)),function(f,h,m){p(!h.isDragging(),"Cannot call beginDrag while dragging."),f.forEach(function(y){p(m.getSource(y),"Expected sourceIds to be registered.")})}(t,o,a);const c=function(f,h){let m=null;for(let y=f.length-1;y>=0;y--)if(h.canDragSource(f[y])){m=f[y];break}return m}(t,o);if(c==null)return void r.dispatch(be);let u=null;if(n){if(!s)throw new Error("getSourceClientOffset must be defined");(function(f){p(typeof f=="function","When clientOffset is provided, getSourceClientOffset must be a function.")})(s),u=s(c)}r.dispatch(Mt(n,u));const d=a.getSource(c).beginDrag(o,c);if(d==null)return;(function(f){p(Zt(f),"Item must be an object.")})(d),a.pinSource(c);const g=a.getSourceType(c);return{type:Dt,payload:{itemType:g,item:d,sourceId:c,clientOffset:n||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Oe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Te(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Oe(r,n,e[n])})}return r}function we(r){return function(t={}){const e=r.getMonitor(),i=r.getRegistry();(function(s){p(s.isDragging(),"Cannot call drop while not dragging."),p(!s.didDrop(),"Cannot call drop twice during one drag operation.")})(e),function(s){const o=s.getTargetIds().filter(s.canDropOnTarget,s);return o.reverse(),o}(e).forEach((s,o)=>{const a=function(u,d,g,f){const h=g.getTarget(u);let m=h?h.drop(f,u):void 0;return function(y){p(y===void 0||Zt(y),"Drop result must either be an object or undefined.")}(m),m===void 0&&(m=d===0?{}:f.getDropResult()),m}(s,o,i,e),c={type:bt,payload:{dropResult:Te({},t,a)}};r.dispatch(c)})}}function Ee(r){return function(){const t=r.getMonitor(),e=r.getRegistry();(function(n){p(n.isDragging(),"Cannot call endDrag while not dragging.")})(t);const i=t.getSourceId();return i!=null&&(e.getSource(i,!0).endDrag(t,i),e.unpinSource()),{type:St}}}function gt(r,t){return t===null?r===null:Array.isArray(r)?r.some(e=>e===t):r===t}function Ie(r){return function(t,{clientOffset:e}={}){(function(o){p(Array.isArray(o),"Expected targetIds to be an array.")})(t);const i=t.slice(0),n=r.getMonitor(),s=r.getRegistry();return function(o,a,c){for(let u=o.length-1;u>=0;u--){const d=o[u];gt(a.getTargetType(d),c)||o.splice(u,1)}}(i,s,n.getItemType()),function(o,a,c){p(a.isDragging(),"Cannot call hover while not dragging."),p(!a.didDrop(),"Cannot call hover after drop.");for(let u=0;u<o.length;u++){const d=o[u];p(o.lastIndexOf(d)===u,"Expected targetIds to be unique in the passed array."),p(c.getTarget(d),"Expected targetIds to be registered.")}}(i,n,s),function(o,a,c){o.forEach(function(u){c.getTarget(u).hover(a,u)})}(i,n,s),{type:Z,payload:{targetIds:i,clientOffset:e||null}}}}function Ce(r){return function(){if(r.getMonitor().isDragging())return{type:Qt}}}class Ne{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:e}=this.store,i=function(n){return{beginDrag:Se(n),publishDragSource:Ce(n),hover:Ie(n),drop:we(n),endDrag:Ee(n)}}(this);return Object.keys(i).reduce((n,s)=>{const o=i[s];var a;return n[s]=(a=o,(...c)=>{const u=a.apply(t,c);u!==void 0&&e(u)}),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function xt(r,t){return{x:r.x-t.x,y:r.y-t.y}}const Y=[],Ot=[];Y.__IS_NONE__=!0,Ot.__IS_ALL__=!0;class Pe{subscribeToStateChange(t,e={}){const{handlerIds:i}=e;p(typeof t=="function","listener must be a function."),p(i===void 0||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{const s=this.store.getState(),o=s.stateId;try{o===n||o===n+1&&!function(c,u){if(c===Y)return!1;if(c===Ot||u===void 0)return!0;const d=(g=c,u.filter(f=>g.indexOf(f)>-1));var g;return d.length>0}(s.dirtyHandlerIds,i)||t()}finally{n=o}})}subscribeToOffsetChange(t){p(typeof t=="function","listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe(()=>{const i=this.store.getState().dragOffset;i!==e&&(e=i,t())})}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);return p(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop()?!1:gt(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);return p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic()?!1:this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:i}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),s=this.getItemType();if(s&&!gt(n,s))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(t);return i?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(t){const{clientOffset:e,initialClientOffset:i,initialSourceClientOffset:n}=t;return e&&i&&n?xt(function(s,o){return{x:s.x+o.x,y:s.y+o.y}}(e,n),i):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:i}=t;return e&&i?xt(e,i):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const kt=V!==void 0?V:self,Rt=kt.MutationObserver||kt.WebKitMutationObserver;function te(r){return function(){const t=setTimeout(i,0),e=setInterval(i,50);function i(){clearTimeout(t),clearInterval(e),r()}}}const Me=typeof Rt=="function"?function(r){let t=1;const e=new Rt(r),i=document.createTextNode("");return e.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}:te;class xe{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const ee=new class{enqueueTask(r){const{queue:t,requestFlush:e}=this;t.length||(e(),this.flushing=!0),t[t.length]=r}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:r}=this;for(;this.index<r.length;){const t=this.index;if(this.index++,r[t].call(),this.index>this.capacity){for(let e=0,i=r.length-this.index;e<i;e++)r[e]=r[e+this.index];r.length-=this.index,this.index=0}}r.length=0,this.index=0,this.flushing=!1},this.registerPendingError=r=>{this.pendingErrors.push(r),this.requestErrorThrow()},this.requestFlush=Me(this.flush),this.requestErrorThrow=te(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},ke=new class{create(r){const t=this.freeTasks,e=t.length?t.pop():new xe(this.onError,i=>t[t.length]=i);return e.task=r,e}constructor(r){this.onError=r,this.freeTasks=[]}}(ee.registerPendingError),Tt="dnd-core/ADD_SOURCE",wt="dnd-core/ADD_TARGET",Et="dnd-core/REMOVE_SOURCE",Q="dnd-core/REMOVE_TARGET";function ft(r,t){t&&Array.isArray(r)?r.forEach(e=>ft(e,!1)):p(typeof r=="string"||typeof r=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var I;(function(r){r.SOURCE="SOURCE",r.TARGET="TARGET"})(I||(I={}));let Re=0;function Le(r){const t=(Re++).toString();switch(r){case I.SOURCE:return`S${t}`;case I.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${r}`)}}function Lt(r){switch(r[0]){case"S":return I.SOURCE;case"T":return I.TARGET;default:throw new Error(`Cannot parse handler ID: ${r}`)}}function _t(r,t){const e=r.entries();let i=!1;do{const{done:n,value:[,s]}=e.next();if(s===t)return!0;i=!!n}while(!i);return!1}class _e{addSource(t,e){ft(t),function(n){p(typeof n.canDrag=="function","Expected canDrag to be a function."),p(typeof n.beginDrag=="function","Expected beginDrag to be a function."),p(typeof n.endDrag=="function","Expected endDrag to be a function.")}(e);const i=this.addHandler(I.SOURCE,t,e);return this.store.dispatch(function(n){return{type:Tt,payload:{sourceId:n}}}(i)),i}addTarget(t,e){ft(t,!0),function(n){p(typeof n.canDrop=="function","Expected canDrop to be a function."),p(typeof n.hover=="function","Expected hover to be a function."),p(typeof n.drop=="function","Expected beginDrag to be a function.")}(e);const i=this.addHandler(I.TARGET,t,e);return this.store.dispatch(function(n){return{type:wt,payload:{targetId:n}}}(i)),i}containsHandler(t){return _t(this.dragSources,t)||_t(this.dropTargets,t)}getSource(t,e=!1){return p(this.isSourceId(t),"Expected a valid source ID."),e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return p(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Lt(t)===I.SOURCE}isTargetId(t){return Lt(t)===I.TARGET}removeSource(t){var e;p(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(i){return{type:Et,payload:{sourceId:i}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},ee.enqueueTask(ke.create(e))}removeTarget(t){p(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(e){return{type:Q,payload:{targetId:e}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);p(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){p(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,i){const n=Le(t);return this.types.set(n,e),t===I.SOURCE?this.dragSources.set(n,i):t===I.TARGET&&this.dropTargets.set(n,i),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const je=(r,t)=>r===t;function Ae(r=Y,t){switch(t.type){case Z:break;case Tt:case wt:case Q:case Et:return Y;default:return Ot}const{targetIds:e=[],prevTargetIds:i=[]}=t.payload,n=function(c,u){const d=new Map,g=h=>{d.set(h,d.has(h)?d.get(h)+1:1)};c.forEach(g),u.forEach(g);const f=[];return d.forEach((h,m)=>{h===1&&f.push(m)}),f}(e,i);if(!(n.length>0||!function(c,u,d=je){if(c.length!==u.length)return!1;for(let g=0;g<c.length;++g)if(!d(c[g],u[g]))return!1;return!0}(e,i)))return Y;const o=i[i.length-1],a=e[e.length-1];return o!==a&&(o&&n.push(o),a&&n.push(a)),n}function He(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}const jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ue(r=jt,t){const{payload:e}=t;switch(t.type){case yt:case Dt:return{initialSourceClientOffset:e.sourceClientOffset,initialClientOffset:e.clientOffset,clientOffset:e.clientOffset};case Z:return i=r.clientOffset,n=e.clientOffset,!i&&!n||i&&n&&i.x===n.x&&i.y===n.y?r:function(s){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{},c=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(c=c.concat(Object.getOwnPropertySymbols(a).filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable}))),c.forEach(function(u){He(s,u,a[u])})}return s}({},r,{clientOffset:e.clientOffset});case St:case bt:return jt;default:return r}var i,n}function Fe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function j(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Fe(r,n,e[n])})}return r}const Be={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function We(r=Be,t){const{payload:e}=t;switch(t.type){case Dt:return j({},r,{itemType:e.itemType,item:e.item,sourceId:e.sourceId,isSourcePublic:e.isSourcePublic,dropResult:null,didDrop:!1});case Qt:return j({},r,{isSourcePublic:!0});case Z:return j({},r,{targetIds:e.targetIds});case Q:return r.targetIds.indexOf(e.targetId)===-1?r:j({},r,{targetIds:(i=r.targetIds,n=e.targetId,i.filter(s=>s!==n))});case bt:return j({},r,{dropResult:e.dropResult,didDrop:!0,targetIds:[]});case St:return j({},r,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}var i,n}function Ye(r=0,t){switch(t.type){case Tt:case wt:return r+1;case Et:case Q:return r-1;default:return r}}function $e(r=0){return r+1}function Xe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function qe(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Xe(r,n,e[n])})}return r}function Ge(r={},t){return{dirtyHandlerIds:Ae(r.dirtyHandlerIds,{type:t.type,payload:qe({},t.payload,{prevTargetIds:(e=r,i="dragOperation.targetIds",n=[],i.split(".").reduce((s,o)=>s&&s[o]?s[o]:n||null,e))})}),dragOffset:Ue(r.dragOffset,t),refCount:Ye(r.refCount,t),dragOperation:We(r.dragOperation,t),stateId:$e(r.stateId)};var e,i,n}function Ke(r,t=void 0,e={},i=!1){const n=function(c){const u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return ue(Ge,c&&u&&u({name:"dnd-core",instanceId:"dnd-core"}))}(i),s=new Pe(n,new _e(n)),o=new Ne(n,s),a=r(o,t,e);return o.receiveBackend(a),o}function ze(r,t){if(r==null)return{};var e,i,n=function(o,a){if(o==null)return{};var c,u,d={},g=Object.keys(o);for(u=0;u<g.length;u++)c=g[u],a.indexOf(c)>=0||(d[c]=o[c]);return d}(r,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)e=s[i],t.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(n[e]=r[e])}return n}let At=0;const q=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ht,Ut,Ve=v.memo(function(r){var{children:t}=r,e=ze(r,["children"]);const[i,n]=function(s){if("manager"in s)return[{dragDropManager:s.manager},!1];const o=function(c,u=Ft(),d,g){const f=u;return f[q]||(f[q]={dragDropManager:Ke(c,u,d,g)}),f[q]}(s.backend,s.context,s.options,s.debugMode),a=!s.context;return[o,a]}(e);return v.useEffect(()=>{if(n){const s=Ft();return++At,()=>{--At==0&&(s[q]=null)}}},[]),de.jsx(mt.Provider,{value:i,children:t})});function Ft(){return V!==void 0?V:window}var Je=(Ut||(Ut=1,Ht=function r(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var i,n,s;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;n--!=0;)if(!r(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;n--!=0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=i;n--!=0;){var o=s[n];if(!r(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}),Ht);const Ze=ce(Je),k=typeof window<"u"?v.useLayoutEffect:v.useEffect;function re(r,t,e){const[i,n]=v.useState(()=>t(r)),s=v.useCallback(()=>{const o=t(r);Ze(i,o)||(n(o),e&&e())},[i,r,e]);return k(s),[i,s]}function ne(r,t,e){return function(i,n,s){const[o,a]=re(i,n,s);return k(function(){const c=i.getHandlerId();if(c!=null)return i.subscribeToStateChange(a,{handlerIds:[c]})},[i,a]),o}(t,r||(()=>({})),()=>e.reconnect())}function ie(r,t){const e=[];return typeof r!="function"&&e.push(r),v.useMemo(()=>typeof r=="function"?r():r,e)}function Qe(r){return v.useMemo(()=>r.hooks.dragSource(),[r])}function tr(r){return v.useMemo(()=>r.hooks.dragPreview(),[r])}let it=!1,st=!1;class er{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){p(!it,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return it=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{it=!1}}isDragging(){if(!this.sourceId)return!1;p(!st,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return st=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{st=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let ot=!1;class rr{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;p(!ot,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ot=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ot=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function pt(r,t,e,i){let n;if(n!==void 0)return!!n;if(r===t)return!0;if(typeof r!="object"||!r||typeof t!="object"||!t)return!1;const s=Object.keys(r),o=Object.keys(t);if(s.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<s.length;c++){const u=s[c];if(!a(u))return!1;const d=r[u],g=t[u];if(n=void 0,n===!1||n===void 0&&d!==g)return!1}return!0}function vt(r){return r!==null&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"current")}function nr(r){return(t=null,e=null)=>{if(!v.isValidElement(t)){const n=t;return r(n,e),n}const i=t;return function(n){if(typeof n.type=="string")return;const s=n.type.displayName||n.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${s} into a <div>, or turn it into a drag source or a drop target itself.`)}(i),function(n,s){const o=n.ref;return p(typeof o!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),o?v.cloneElement(n,{ref:a=>{Bt(o,a),Bt(s,a)}}):v.cloneElement(n,{ref:s})}(i,e?n=>r(n,e):r)}}function se(r){const t={};return Object.keys(r).forEach(e=>{const i=r[e];if(e.endsWith("Ref"))t[e]=r[e];else{const n=nr(i);t[e]=()=>n}}),t}function Bt(r,t){typeof r=="function"?r(t):r.current=t}class ir{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();i&&this.disconnectDragPreview(),this.handlerId&&(e?i&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!pt(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!pt(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=se({dragSource:(e,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,vt(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,vt(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class sr{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!pt(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=se({dropTarget:(e,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,vt(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function R(){const{dragDropManager:r}=v.useContext(mt);return p(r!=null,"Expected drag drop context"),r}class or{beginDrag(){const t=this.spec,e=this.monitor;let i=null;return i=typeof t.item=="object"?t.item:typeof t.item=="function"?t.item(e):{},i??null}canDrag(){const t=this.spec,e=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag!="function"||t.canDrag(e)}isDragging(t,e){const i=this.spec,n=this.monitor,{isDragging:s}=i;return s?s(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,i=this.connector,{end:n}=t;n&&n(e.getItem(),e),i.reconnect()}constructor(t,e,i){this.spec=t,this.monitor=e,this.connector=i}}function ar(r,t,e){const i=R(),n=function(o,a,c){const u=v.useMemo(()=>new or(o,a,c),[a,c]);return v.useEffect(()=>{u.spec=o},[o]),u}(r,t,e),s=function(o){return v.useMemo(()=>{const a=o.type;return p(a!=null,"spec.type must be defined"),a},[o])}(r);k(function(){if(s!=null){const[o,a]=function(c,u,d){const g=d.getRegistry(),f=g.addSource(c,u);return[f,()=>g.removeSource(f)]}(s,n,i);return t.receiveHandlerId(o),e.receiveHandlerId(o),a}},[i,t,e,n,s])}function wr(r,t){const e=ie(r);p(!e.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const s=R();return v.useMemo(()=>new er(s),[s])}(),n=function(s,o){const a=R(),c=v.useMemo(()=>new ir(a.getBackend()),[a]);return k(()=>(c.dragSourceOptions=s||null,c.reconnect(),()=>c.disconnectDragSource()),[c,s]),k(()=>(c.dragPreviewOptions=o||null,c.reconnect(),()=>c.disconnectDragPreview()),[c,o]),c}(e.options,e.previewOptions);return ar(e,i,n),[ne(e.collect,i,n),Qe(n),tr(n)]}function cr(r){return v.useMemo(()=>r.hooks.dropTarget(),[r])}class ur{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function dr(r,t,e){const i=R(),n=function(o,a){const c=v.useMemo(()=>new ur(o,a),[a]);return v.useEffect(()=>{c.spec=o},[o]),c}(r,t),s=function(o){const{accept:a}=o;return v.useMemo(()=>(p(o.accept!=null,"accept must be defined"),Array.isArray(a)?a:[a]),[a])}(r);k(function(){const[o,a]=function(c,u,d){const g=d.getRegistry(),f=g.addTarget(c,u);return[f,()=>g.removeTarget(f)]}(s,n,i);return t.receiveHandlerId(o),e.receiveHandlerId(o),a},[i,t,n,e,s.map(o=>o.toString()).join("|")])}function Er(r,t){const e=ie(r),i=function(){const s=R();return v.useMemo(()=>new rr(s),[s])}(),n=function(s){const o=R(),a=v.useMemo(()=>new sr(o.getBackend()),[o]);return k(()=>(a.dropTargetOptions=s||null,a.reconnect(),()=>a.disconnectDropTarget()),[s]),a}(e.options);return dr(e,i,n),[ne(e.collect,i,n),cr(n)]}var at=(r,t)=>({x:r.x-t.x,y:r.y-t.y}),hr=(r,t)=>{let e=r.getClientOffset();if(e===null)return null;if(!t.current||!t.current.getBoundingClientRect)return at(e,(s=>{let o=s.getInitialClientOffset(),a=s.getInitialSourceClientOffset();return o===null||a===null?{x:0,y:0}:at(o,a)})(r));let i=t.current.getBoundingClientRect(),n={x:i.width/2,y:i.height/2};return at(e,n)},lr=r=>{let t=`translate(${r.x.toFixed(1)}px, ${r.y.toFixed(1)}px)`;return{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t}},gr=()=>{let r=v.useRef(null),t=function(e){const i=R().getMonitor(),[n,s]=re(i,e);return v.useEffect(()=>i.subscribeToOffsetChange(s)),v.useEffect(()=>i.subscribeToStateChange(s)),n}(e=>({currentOffset:hr(e,r),isDragging:e.isDragging(),itemType:e.getItemType(),item:e.getItem(),monitor:e}));return t.isDragging&&t.currentOffset!==null?{display:!0,itemType:t.itemType,item:t.item,style:lr(t.currentOffset),monitor:t.monitor,ref:r}:{display:!1}};v.createContext(void 0);var P,fr=v.createContext(null),Ir=({portal:r,...t})=>{let[e,i]=v.useState(null);return et.createElement(fr.Provider,{value:r??e},et.createElement(Ve,{backend:De,...t}),r?null:et.createElement("div",{ref:i}))},Cr=()=>{let r=(()=>{let[e,i]=v.useState(!1),n=v.useContext(mt);return v.useEffect(()=>{let s=n?.dragDropManager?.getBackend(),o={backendChanged:a=>{i(a.previewEnabled())}};return i(s.previewEnabled()),s.previewsList().register(o),()=>{s.previewsList().unregister(o)}},[n,n.dragDropManager]),e})(),t=gr();return r?t:{display:!1}};(function(r){r.mouse="mouse",r.touch="touch",r.keyboard="keyboard"})(P||(P={}));class pr{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0&&t}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0&&t}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0&&t}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0&&t}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)===null||t===void 0||t}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,e,i,n;return(n=(i=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&i!==void 0?i:(e=this.args)===null||e===void 0?void 0:e.delay)!==null&&n!==void 0?n:0}get delayMouseStart(){var t,e,i,n;return(n=(i=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&i!==void 0?i:(e=this.args)===null||e===void 0?void 0:e.delay)!==null&&n!==void 0?n:0}get window(){return this.context&&this.context.window?this.context.window:typeof window<"u"?window:void 0}get document(){var t;return!((t=this.context)===null||t===void 0)&&t.document?this.context.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,e){this.args=t,this.context=e}}const vr=1,mr=0;function ct(r){return r.button===void 0||r.button===mr}function oe(r){return!!r.targetTouches}function J(r,t){return oe(r)?function(e,i){return e.targetTouches.length===1?J(e.targetTouches[0]):i&&e.touches.length===1&&e.touches[0].target===i.target?J(e.touches[0]):void 0}(r,t):{x:r.clientX,y:r.clientY}}const Wt=(()=>{let r=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get:()=>(r=!0,!0)}))}catch{}return r})(),F={[P.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[P.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[P.keyboard]:{keydown:"keydown"}};class ${profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(p(!$.isSetUp,"Cannot have two Touch backends at the same time."),$.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&($.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,e,i,n=!1){const s=Wt?{capture:n,passive:!1}:n;this.listenerTypes.forEach(function(o){const a=F[o][e];a&&t.addEventListener(a,i,s)})}removeEventListener(t,e,i,n=!1){const s=Wt?{capture:n,passive:!1}:n;this.listenerTypes.forEach(function(o){const a=F[o][e];a&&t.removeEventListener(a,i,s)})}connectDragSource(t,e){const i=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,e),this.addEventListener(e,"start",i),()=>{this.sourceNodes.delete(t),this.removeEventListener(e,"start",i)}}connectDragPreview(t,e,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,e){const i=this.options.rootElement;if(!this.document||!i)return()=>{};const n=s=>{if(!this.document||!i||!this.monitor.isDragging())return;let o;switch(s.type){case F.mouse.move:o={x:s.clientX,y:s.clientY};break;case F.touch.move:var a,c;o={x:((a=s.touches[0])===null||a===void 0?void 0:a.clientX)||0,y:((c=s.touches[0])===null||c===void 0?void 0:c.clientY)||0}}const u=o!=null?this.document.elementFromPoint(o.x,o.y):void 0,d=u&&e.contains(u);return u===e||d?this.handleMove(s,t):void 0};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(t,e),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",n))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),t&&t.parentElement&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,e,i){this.getSourceClientOffset=n=>{const s=this.sourceNodes.get(n);return s&&function(o){const a=o.nodeType===1?o:o.parentElement;if(!a)return;const{top:c,left:u}=a.getBoundingClientRect();return{x:u,y:c}}(s)},this.handleTopMoveStartCapture=n=>{ct(n)&&(this.moveStartSourceIds=[])},this.handleMoveStart=n=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(n)},this.handleTopMoveStart=n=>{if(!ct(n))return;const s=J(n);s&&(oe(n)&&(this.lastTargetTouchFallback=n.targetTouches[0]),this._mouseClientOffset=s),this.waitingForDelay=!1},this.handleTopMoveStartDelay=n=>{if(!ct(n))return;const s=n.type===F.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,n),s),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(n,s)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(s)},this.handleTopMove=n=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:s,dragOverTargetIds:o}=this,a=this.options.enableHoverOutsideTarget,c=J(n,this.lastTargetTouchFallback);if(!c)return;if(this._isScrolling||!this.monitor.isDragging()&&function(D,b,L,tt,A){if(!A)return!1;const H=180*Math.atan2(tt-b,L-D)/Math.PI+180;for(let _=0;_<A.length;++_){const U=A[_];if(U&&(U.start==null||H>=U.start)&&(U.end==null||H<=U.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var u,d,g,f;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&s&&(u=this._mouseClientOffset.x||0,d=this._mouseClientOffset.y||0,g=c.x,f=c.y,Math.sqrt(Math.pow(Math.abs(g-u),2)+Math.pow(Math.abs(f-d),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(s,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const h=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(h),this.actions.publishDragSource(),n.cancelable&&n.preventDefault();const m=(o||[]).map(D=>this.targetNodes.get(D)).filter(D=>!!D),y=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(c.x,c.y,m):this.document.elementsFromPoint(c.x,c.y),S=[];for(const D in y){if(!y.hasOwnProperty(D))continue;let b=y[D];for(b!=null&&S.push(b);b;)b=b.parentElement,b&&S.indexOf(b)===-1&&S.push(b)}const O=S.filter(D=>m.indexOf(D)>-1).map(D=>this._getDropTargetId(D)).filter(D=>!!D).filter((D,b,L)=>L.indexOf(D)===b);if(a)for(const D in this.targetNodes){const b=this.targetNodes.get(D);if(h&&b&&b.contains(h)&&O.indexOf(D)===-1){O.unshift(D);break}}O.reverse(),this.actions.hover(O,{clientOffset:c})},this._getDropTargetId=n=>{const s=this.targetNodes.keys();let o=s.next();for(;o.done===!1;){const a=o.value;if(n===this.targetNodes.get(a))return a;o=s.next()}},this.handleTopMoveEndCapture=n=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(s){return s.buttons===void 0||!(s.buttons&vr)}(n)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(n.cancelable&&n.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=n=>{n.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new pr(i,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(P.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(P.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(P.keyboard)}}const Nr=function(r,t={},e={}){return new $(r,t,e)};export{Sr as H,Tr as O,Or as S,Nr as T,Cr as a,wr as b,Ir as g,Er as u};
@@ -1 +0,0 @@
1
- import{g as i}from"./sentry-DjzU4p1F.js";import{r as a}from"./empty-CTn7RkAu.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]="ba2de560-ec3d-4f77-9dc7-083cc80bdf0a",e._sentryDebugIdIdentifier="sentry-dbid-ba2de560-ec3d-4f77-9dc7-083cc80bdf0a")}catch{}})();function c(e,t){for(var o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const d=Object.getOwnPropertyDescriptor(r,n);d&&Object.defineProperty(e,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var f=a();const l=c({__proto__:null,default:i(f)},[f]);export{l as e};