@remoteoss/remote-flows 0.19.0 → 0.20.1

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 (278) hide show
  1. package/dist/{chunk-ANXYPRBG.js → chunk-2I5DIIJP.js} +2 -2
  2. package/dist/{chunk-7VUILYZ3.js → chunk-2QGDCMCE.js} +2 -2
  3. package/dist/{chunk-E5YN6OT3.js → chunk-3PCSFTM3.js} +2 -2
  4. package/dist/{chunk-Y4C57RXK.js → chunk-4C6O4QTI.js} +2 -2
  5. package/dist/{chunk-27PK3DVV.js → chunk-4KA5AP7X.js} +2 -2
  6. package/dist/chunk-54KJP7WD.js +2 -0
  7. package/dist/chunk-54KJP7WD.js.map +1 -0
  8. package/dist/{chunk-U4HGV7LP.js → chunk-5CGII7CZ.js} +2 -2
  9. package/dist/{chunk-BZIVYUMH.js → chunk-5T25IMZ3.js} +2 -2
  10. package/dist/{chunk-5NDSOA6K.js → chunk-5TUFZVWO.js} +2 -2
  11. package/dist/chunk-663AKXTN.js +2 -0
  12. package/dist/chunk-663AKXTN.js.map +1 -0
  13. package/dist/{chunk-W2PPGQL6.js → chunk-6O6CNAMF.js} +2 -2
  14. package/dist/{chunk-7DKOWSJ3.js → chunk-756MHC7A.js} +2 -2
  15. package/dist/{chunk-7SR3FCW6.js → chunk-76VMCRDE.js} +2 -2
  16. package/dist/{chunk-TXSJL3HC.js → chunk-7IHBNPZK.js} +2 -2
  17. package/dist/{chunk-QW4JPW6J.js → chunk-7XRPOR7L.js} +1 -1
  18. package/dist/chunk-7XRPOR7L.js.map +1 -0
  19. package/dist/{chunk-BE54D4XM.js → chunk-A42AGGNH.js} +2 -2
  20. package/dist/{chunk-5ISPIMTZ.js → chunk-A76UTPRW.js} +2 -2
  21. package/dist/{chunk-TPHCKHYD.js → chunk-A7ZEA2WU.js} +2 -2
  22. package/dist/{chunk-UHS3QRA3.js → chunk-ASKKS4Z3.js} +2 -2
  23. package/dist/{chunk-OMECCA6L.js → chunk-ATC4YO7K.js} +2 -2
  24. package/dist/{chunk-DBDVBJDV.js → chunk-B3WXLC2R.js} +2 -2
  25. package/dist/chunk-BITHG5X4.js +2 -0
  26. package/dist/chunk-BITHG5X4.js.map +1 -0
  27. package/dist/{chunk-PBXZVY22.js → chunk-BP2JYRI7.js} +2 -2
  28. package/dist/{chunk-2ERB4H3T.js → chunk-CKVQ4PIK.js} +2 -2
  29. package/dist/{chunk-73A7SYGH.js → chunk-CVDZ35YA.js} +2 -2
  30. package/dist/{chunk-4RULC3AZ.js → chunk-CWEPL5J3.js} +2 -2
  31. package/dist/{chunk-P6JDGCDA.js → chunk-EGVWFZBR.js} +2 -2
  32. package/dist/chunk-FB2QGVI2.js +2 -0
  33. package/dist/chunk-FB2QGVI2.js.map +1 -0
  34. package/dist/{chunk-7CHZ25AS.js → chunk-FCRW2EG3.js} +2 -2
  35. package/dist/chunk-FHHAGWU5.js +2 -0
  36. package/dist/chunk-FHHAGWU5.js.map +1 -0
  37. package/dist/chunk-FZ7FWFJX.js +1 -0
  38. package/dist/{chunk-F2E56YE2.js → chunk-GGXKORRZ.js} +2 -2
  39. package/dist/{chunk-HQI6W7PR.js → chunk-GNZJOPIS.js} +2 -2
  40. package/dist/{chunk-6F66NTNI.js → chunk-GS5NA664.js} +2 -2
  41. package/dist/{chunk-LBUNJ5J3.js → chunk-HRA6BY3O.js} +2 -2
  42. package/dist/chunk-JB6XA3P6.js +2 -0
  43. package/dist/chunk-JB6XA3P6.js.map +1 -0
  44. package/dist/{chunk-PHGCCQZ2.js → chunk-JWZIWG4T.js} +2 -2
  45. package/dist/{chunk-OD37LQSP.js → chunk-K4VWUMNO.js} +2 -2
  46. package/dist/chunk-KN4F5TMS.js +2 -0
  47. package/dist/chunk-KN4F5TMS.js.map +1 -0
  48. package/dist/{chunk-P5CLILU4.js → chunk-LCIBPBLY.js} +2 -2
  49. package/dist/{chunk-CRXPRR3R.js → chunk-M4EVWRWB.js} +2 -2
  50. package/dist/chunk-M6ATR43P.js +2 -0
  51. package/dist/chunk-M6ATR43P.js.map +1 -0
  52. package/dist/{chunk-LUUUPLTW.js → chunk-MCAK5KPI.js} +2 -2
  53. package/dist/{chunk-INC2YFDP.js → chunk-MDQ6YJMV.js} +2 -2
  54. package/dist/{chunk-XVTAPI3Z.js → chunk-MGOT272R.js} +2 -2
  55. package/dist/{chunk-NVMZDPMF.js → chunk-MORMQBAF.js} +2 -2
  56. package/dist/chunk-NO2TRS5O.js +2 -0
  57. package/dist/chunk-NO2TRS5O.js.map +1 -0
  58. package/dist/chunk-OIBVTGB4.js +2 -0
  59. package/dist/chunk-OIBVTGB4.js.map +1 -0
  60. package/dist/{chunk-7EI4E76I.js → chunk-OJNWWRD5.js} +2 -2
  61. package/dist/{chunk-AHUK7NSK.js → chunk-OZCQ6AOF.js} +2 -2
  62. package/dist/{chunk-RM3HE733.js → chunk-PLWXRCGQ.js} +2 -2
  63. package/dist/{chunk-XJVYASHX.js → chunk-QFZ3XVDT.js} +2 -2
  64. package/dist/{chunk-AS6DCKEJ.js → chunk-QGGKDM3N.js} +2 -2
  65. package/dist/{chunk-6NIRGHFF.js → chunk-QIN5BLVI.js} +2 -2
  66. package/dist/{chunk-GP237GUO.js → chunk-R2VVXLL7.js} +2 -2
  67. package/dist/{chunk-J7JO4GF4.js → chunk-R4LFNFC2.js} +2 -2
  68. package/dist/{chunk-LYF7ISYE.js → chunk-RNNZ5ZKE.js} +2 -2
  69. package/dist/{chunk-H6NMRBGZ.js → chunk-RUMP764Z.js} +2 -2
  70. package/dist/{chunk-FQPU3JBJ.js → chunk-SERAGBDA.js} +2 -2
  71. package/dist/{chunk-3BREUYLG.js → chunk-U23SN7CM.js} +2 -2
  72. package/dist/{chunk-Z6M74RQ7.js → chunk-UBLE2J7V.js} +2 -2
  73. package/dist/{chunk-BM3AKYMT.js → chunk-UQYM3PBZ.js} +2 -2
  74. package/dist/{chunk-KVNG6CWQ.js → chunk-V2PBVCRH.js} +2 -2
  75. package/dist/{chunk-MAHR7HCO.js → chunk-WL3IJ7WA.js} +2 -2
  76. package/dist/{chunk-H77RIB6S.js → chunk-X4GAGLFN.js} +2 -2
  77. package/dist/{chunk-NNM5M4E3.js → chunk-XGMQPLVG.js} +2 -2
  78. package/dist/{chunk-BI6U55BD.js → chunk-XVW2URFK.js} +2 -2
  79. package/dist/{chunk-Y373YLLS.js → chunk-Y7QVIBFX.js} +2 -2
  80. package/dist/chunk-YFEIQZGJ.js +2 -0
  81. package/dist/chunk-YFEIQZGJ.js.map +1 -0
  82. package/dist/{chunk-ZTDKPUB5.js → chunk-ZJ3JHILJ.js} +2 -2
  83. package/dist/{chunk-TDQVKDQW.js → chunk-ZTVYWMBY.js} +2 -2
  84. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  85. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  86. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  87. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +5 -2
  88. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  89. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  90. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  91. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  92. package/dist/flows/ContractAmendment/context.d.ts +5 -5
  93. package/dist/flows/ContractAmendment/hooks.d.ts +7 -4
  94. package/dist/flows/ContractAmendment/hooks.js +1 -1
  95. package/dist/flows/ContractAmendment/index.d.ts +5 -2
  96. package/dist/flows/ContractAmendment/index.js +1 -1
  97. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  98. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  99. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +6 -2
  100. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  101. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +17 -2
  102. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  103. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  104. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  105. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  106. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  107. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  108. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  109. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  110. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  111. package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
  112. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  113. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  114. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
  115. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
  116. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  117. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  118. package/dist/flows/CostCalculator/api.d.ts +17 -2
  119. package/dist/flows/CostCalculator/api.js +1 -1
  120. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  121. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  122. package/dist/flows/CostCalculator/context.d.ts +20 -7
  123. package/dist/flows/CostCalculator/hooks.d.ts +24 -4
  124. package/dist/flows/CostCalculator/hooks.js +1 -1
  125. package/dist/flows/CostCalculator/index.d.ts +7 -6
  126. package/dist/flows/CostCalculator/index.js +1 -1
  127. package/dist/flows/CostCalculator/types.d.ts +1 -1
  128. package/dist/flows/CostCalculator/utils.d.ts +4 -3
  129. package/dist/flows/CostCalculator/utils.js +1 -1
  130. package/dist/flows/Onboarding/OnboardingFlow.d.ts +6 -6
  131. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  132. package/dist/flows/Onboarding/api.d.ts +2 -2
  133. package/dist/flows/Onboarding/api.js +1 -1
  134. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  135. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  136. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +7 -2
  137. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  138. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +3 -3
  139. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  140. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +7 -2
  141. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  142. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  143. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +2 -2
  144. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  145. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +6 -2
  146. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  147. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  148. package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
  149. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +6 -1
  150. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +7 -2
  151. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  152. package/dist/flows/Onboarding/context.d.ts +4 -4
  153. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  154. package/dist/flows/Onboarding/hooks.js +1 -1
  155. package/dist/flows/Onboarding/index.d.ts +7 -7
  156. package/dist/flows/Onboarding/index.js +1 -1
  157. package/dist/flows/Onboarding/types.d.ts +2 -9
  158. package/dist/flows/Onboarding/utils.d.ts +3 -10
  159. package/dist/flows/Onboarding/utils.js +1 -1
  160. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
  161. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  162. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
  163. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  164. package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
  165. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  166. package/dist/flows/Termination/TerminationBack.js +1 -1
  167. package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
  168. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  169. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  170. package/dist/flows/Termination/TerminationFlow.d.ts +6 -3
  171. package/dist/flows/Termination/TerminationFlow.js +1 -1
  172. package/dist/flows/Termination/TerminationForm.d.ts +1 -1
  173. package/dist/flows/Termination/TerminationForm.js +1 -1
  174. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.d.ts +5 -0
  175. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +2 -0
  176. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map +1 -0
  177. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  178. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  179. package/dist/flows/Termination/TimeOff.js +1 -1
  180. package/dist/flows/Termination/context.d.ts +3 -3
  181. package/dist/flows/Termination/hooks.d.ts +6 -3
  182. package/dist/flows/Termination/hooks.js +1 -1
  183. package/dist/flows/Termination/index.d.ts +7 -3
  184. package/dist/flows/Termination/index.js +1 -1
  185. package/dist/flows/Termination/types.d.ts +1 -1
  186. package/dist/flows/api.d.ts +1 -1
  187. package/dist/flows/api.js +1 -1
  188. package/dist/index.css +1 -1
  189. package/dist/index.css.map +1 -1
  190. package/dist/index.d.ts +11 -10
  191. package/dist/index.js +1 -1
  192. package/dist/index.js.map +1 -1
  193. package/dist/internals.js +1 -1
  194. package/dist/{mutations-B6HWH-rZ.d.ts → mutations-BHTJydCx.d.ts} +2 -0
  195. package/dist/{remoteFlows-DZCgZVnE.d.ts → remoteFlows-bfHFRZSe.d.ts} +9 -2
  196. package/dist/{types.gen-BbxQoQYr.d.ts → types.gen-BWjuA7VH.d.ts} +35 -5
  197. package/package.json +2 -2
  198. package/dist/chunk-2EN2X5NU.js +0 -2
  199. package/dist/chunk-2EN2X5NU.js.map +0 -1
  200. package/dist/chunk-3LOVCTCN.js +0 -2
  201. package/dist/chunk-3LOVCTCN.js.map +0 -1
  202. package/dist/chunk-5NPHBFW7.js +0 -2
  203. package/dist/chunk-5NPHBFW7.js.map +0 -1
  204. package/dist/chunk-6NXC6SLB.js +0 -1
  205. package/dist/chunk-E3QWREZF.js +0 -2
  206. package/dist/chunk-E3QWREZF.js.map +0 -1
  207. package/dist/chunk-F66G33YT.js +0 -2
  208. package/dist/chunk-F66G33YT.js.map +0 -1
  209. package/dist/chunk-GPBU6CQP.js +0 -2
  210. package/dist/chunk-GPBU6CQP.js.map +0 -1
  211. package/dist/chunk-JIRA6B5O.js +0 -2
  212. package/dist/chunk-JIRA6B5O.js.map +0 -1
  213. package/dist/chunk-PUSPB4CX.js +0 -2
  214. package/dist/chunk-PUSPB4CX.js.map +0 -1
  215. package/dist/chunk-QW4JPW6J.js.map +0 -1
  216. package/dist/chunk-R2UI3WAJ.js +0 -2
  217. package/dist/chunk-R2UI3WAJ.js.map +0 -1
  218. package/dist/chunk-YDNOMXS7.js +0 -2
  219. package/dist/chunk-YDNOMXS7.js.map +0 -1
  220. /package/dist/{chunk-ANXYPRBG.js.map → chunk-2I5DIIJP.js.map} +0 -0
  221. /package/dist/{chunk-7VUILYZ3.js.map → chunk-2QGDCMCE.js.map} +0 -0
  222. /package/dist/{chunk-E5YN6OT3.js.map → chunk-3PCSFTM3.js.map} +0 -0
  223. /package/dist/{chunk-Y4C57RXK.js.map → chunk-4C6O4QTI.js.map} +0 -0
  224. /package/dist/{chunk-27PK3DVV.js.map → chunk-4KA5AP7X.js.map} +0 -0
  225. /package/dist/{chunk-U4HGV7LP.js.map → chunk-5CGII7CZ.js.map} +0 -0
  226. /package/dist/{chunk-BZIVYUMH.js.map → chunk-5T25IMZ3.js.map} +0 -0
  227. /package/dist/{chunk-5NDSOA6K.js.map → chunk-5TUFZVWO.js.map} +0 -0
  228. /package/dist/{chunk-W2PPGQL6.js.map → chunk-6O6CNAMF.js.map} +0 -0
  229. /package/dist/{chunk-7DKOWSJ3.js.map → chunk-756MHC7A.js.map} +0 -0
  230. /package/dist/{chunk-7SR3FCW6.js.map → chunk-76VMCRDE.js.map} +0 -0
  231. /package/dist/{chunk-TXSJL3HC.js.map → chunk-7IHBNPZK.js.map} +0 -0
  232. /package/dist/{chunk-BE54D4XM.js.map → chunk-A42AGGNH.js.map} +0 -0
  233. /package/dist/{chunk-5ISPIMTZ.js.map → chunk-A76UTPRW.js.map} +0 -0
  234. /package/dist/{chunk-TPHCKHYD.js.map → chunk-A7ZEA2WU.js.map} +0 -0
  235. /package/dist/{chunk-UHS3QRA3.js.map → chunk-ASKKS4Z3.js.map} +0 -0
  236. /package/dist/{chunk-OMECCA6L.js.map → chunk-ATC4YO7K.js.map} +0 -0
  237. /package/dist/{chunk-DBDVBJDV.js.map → chunk-B3WXLC2R.js.map} +0 -0
  238. /package/dist/{chunk-PBXZVY22.js.map → chunk-BP2JYRI7.js.map} +0 -0
  239. /package/dist/{chunk-2ERB4H3T.js.map → chunk-CKVQ4PIK.js.map} +0 -0
  240. /package/dist/{chunk-73A7SYGH.js.map → chunk-CVDZ35YA.js.map} +0 -0
  241. /package/dist/{chunk-4RULC3AZ.js.map → chunk-CWEPL5J3.js.map} +0 -0
  242. /package/dist/{chunk-P6JDGCDA.js.map → chunk-EGVWFZBR.js.map} +0 -0
  243. /package/dist/{chunk-7CHZ25AS.js.map → chunk-FCRW2EG3.js.map} +0 -0
  244. /package/dist/{chunk-6NXC6SLB.js.map → chunk-FZ7FWFJX.js.map} +0 -0
  245. /package/dist/{chunk-F2E56YE2.js.map → chunk-GGXKORRZ.js.map} +0 -0
  246. /package/dist/{chunk-HQI6W7PR.js.map → chunk-GNZJOPIS.js.map} +0 -0
  247. /package/dist/{chunk-6F66NTNI.js.map → chunk-GS5NA664.js.map} +0 -0
  248. /package/dist/{chunk-LBUNJ5J3.js.map → chunk-HRA6BY3O.js.map} +0 -0
  249. /package/dist/{chunk-PHGCCQZ2.js.map → chunk-JWZIWG4T.js.map} +0 -0
  250. /package/dist/{chunk-OD37LQSP.js.map → chunk-K4VWUMNO.js.map} +0 -0
  251. /package/dist/{chunk-P5CLILU4.js.map → chunk-LCIBPBLY.js.map} +0 -0
  252. /package/dist/{chunk-CRXPRR3R.js.map → chunk-M4EVWRWB.js.map} +0 -0
  253. /package/dist/{chunk-LUUUPLTW.js.map → chunk-MCAK5KPI.js.map} +0 -0
  254. /package/dist/{chunk-INC2YFDP.js.map → chunk-MDQ6YJMV.js.map} +0 -0
  255. /package/dist/{chunk-XVTAPI3Z.js.map → chunk-MGOT272R.js.map} +0 -0
  256. /package/dist/{chunk-NVMZDPMF.js.map → chunk-MORMQBAF.js.map} +0 -0
  257. /package/dist/{chunk-7EI4E76I.js.map → chunk-OJNWWRD5.js.map} +0 -0
  258. /package/dist/{chunk-AHUK7NSK.js.map → chunk-OZCQ6AOF.js.map} +0 -0
  259. /package/dist/{chunk-RM3HE733.js.map → chunk-PLWXRCGQ.js.map} +0 -0
  260. /package/dist/{chunk-XJVYASHX.js.map → chunk-QFZ3XVDT.js.map} +0 -0
  261. /package/dist/{chunk-AS6DCKEJ.js.map → chunk-QGGKDM3N.js.map} +0 -0
  262. /package/dist/{chunk-6NIRGHFF.js.map → chunk-QIN5BLVI.js.map} +0 -0
  263. /package/dist/{chunk-GP237GUO.js.map → chunk-R2VVXLL7.js.map} +0 -0
  264. /package/dist/{chunk-J7JO4GF4.js.map → chunk-R4LFNFC2.js.map} +0 -0
  265. /package/dist/{chunk-LYF7ISYE.js.map → chunk-RNNZ5ZKE.js.map} +0 -0
  266. /package/dist/{chunk-H6NMRBGZ.js.map → chunk-RUMP764Z.js.map} +0 -0
  267. /package/dist/{chunk-FQPU3JBJ.js.map → chunk-SERAGBDA.js.map} +0 -0
  268. /package/dist/{chunk-3BREUYLG.js.map → chunk-U23SN7CM.js.map} +0 -0
  269. /package/dist/{chunk-Z6M74RQ7.js.map → chunk-UBLE2J7V.js.map} +0 -0
  270. /package/dist/{chunk-BM3AKYMT.js.map → chunk-UQYM3PBZ.js.map} +0 -0
  271. /package/dist/{chunk-KVNG6CWQ.js.map → chunk-V2PBVCRH.js.map} +0 -0
  272. /package/dist/{chunk-MAHR7HCO.js.map → chunk-WL3IJ7WA.js.map} +0 -0
  273. /package/dist/{chunk-H77RIB6S.js.map → chunk-X4GAGLFN.js.map} +0 -0
  274. /package/dist/{chunk-NNM5M4E3.js.map → chunk-XGMQPLVG.js.map} +0 -0
  275. /package/dist/{chunk-BI6U55BD.js.map → chunk-XVW2URFK.js.map} +0 -0
  276. /package/dist/{chunk-Y373YLLS.js.map → chunk-Y7QVIBFX.js.map} +0 -0
  277. /package/dist/{chunk-ZTDKPUB5.js.map → chunk-ZJ3JHILJ.js.map} +0 -0
  278. /package/dist/{chunk-TDQVKDQW.js.map → chunk-ZTVYWMBY.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-3LOVCTCN.js";import{a as i}from"./chunk-P37U34EQ.js";import*as v from"react";import*as d from"@radix-ui/react-checkbox";import{Check as b}from"lucide-react";import{jsx as p}from"react/jsx-runtime";var y=v.forwardRef(({className:e,...t},s)=>p(d.Root,{ref:s,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-checkbox data-[state=checked]:text-primary",e),...t,children:p(d.Indicator,{className:a("flex items-center justify-center text-current"),children:p(b,{className:"h-4 w-4"})})}));y.displayName=d.Root.displayName;import*as c from"@radix-ui/react-radio-group";import{CircleIcon as R}from"lucide-react";import{jsx as m}from"react/jsx-runtime";function j({className:e,...t}){return m(c.Root,{"data-slot":"radio-group",className:a("grid gap-3",e),...t})}i(j,"RadioGroup");function A({className:e,...t}){return m(c.Item,{"data-slot":"radio-group-item",className:a("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m(c.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m(R,{className:"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}i(A,"RadioGroupItem");import*as o from"@radix-ui/react-select";import{CheckIcon as C,ChevronDownIcon as P,ChevronUpIcon as S}from"lucide-react";import{jsx as r,jsxs as u}from"react/jsx-runtime";function W({...e}){return r(o.Root,{"data-slot":"select",...e})}i(W,"Select");function X({...e}){return r(o.Group,{"data-slot":"select-group",...e})}i(X,"SelectGroup");function E({...e}){return r(o.Value,{"data-slot":"select-value",...e})}i(E,"SelectValue");function J({className:e,children:t,...s}){return u(o.Trigger,{"data-slot":"select-trigger",className:a("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",e),...s,children:[t,r(o.Icon,{asChild:!0,className:"absolute right-4",children:r(P,{className:"size-4"})})]})}i(J,"SelectTrigger");function K({className:e,children:t,position:s="popper",...x}){return r(o.Portal,{children:u(o.Content,{"data-slot":"select-content",className:a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...x,children:[r(h,{}),r(o.Viewport,{className:a(s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),r(D,{})]})})}i(K,"SelectContent");function M({className:e,children:t,...s}){return u(o.Item,{"data-slot":"select-item",className:a("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[r(o.ItemText,{children:t}),r("span",{className:"flex size-3.5 items-center justify-center",children:r(o.ItemIndicator,{children:r(C,{className:"size-4"})})})]})}i(M,"SelectItem");function h({className:e,...t}){return r(o.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(S,{className:"size-4"})})}i(h,"SelectScrollUpButton");function D({className:e,...t}){return r(o.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(P,{className:"size-4"})})}i(D,"SelectScrollDownButton");import*as n from"@radix-ui/react-dialog";import{XIcon as w}from"lucide-react";import{jsx as l,jsxs as f}from"react/jsx-runtime";function te({...e}){return l(n.Root,{"data-slot":"dialog",...e})}i(te,"Dialog");function oe({...e}){return l(n.Trigger,{"data-slot":"dialog-trigger",...e})}i(oe,"DialogTrigger");function N({...e}){return l(n.Portal,{"data-slot":"dialog-portal",...e})}i(N,"DialogPortal");function k({className:e,...t}){return l(n.Overlay,{"data-slot":"dialog-overlay",className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}i(k,"DialogOverlay");function ie({className:e,children:t,...s}){return f(N,{"data-slot":"dialog-portal",children:[l(k,{}),f(n.Content,{"data-slot":"dialog-content",className:a("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[t,f(n.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close",children:[l(w,{}),l("span",{className:"sr-only",children:"Close"})]})]})]})}i(ie,"DialogContent");function ae({className:e,...t}){return l("div",{"data-slot":"dialog-header",className:a("flex flex-col gap-2 text-center sm:text-left",e),...t})}i(ae,"DialogHeader");function re({className:e,...t}){return l("div",{"data-slot":"dialog-footer",className:a("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}i(re,"DialogFooter");function ne({className:e,...t}){return l(n.Title,{"data-slot":"dialog-title",className:a("text-lg leading-none font-semibold",e),...t})}i(ne,"DialogTitle");function se({className:e,...t}){return l(n.Description,{"data-slot":"dialog-description",className:a("text-muted-foreground text-sm",e),...t})}i(se,"DialogDescription");import{cva as I}from"class-variance-authority";import{jsx as g}from"react/jsx-runtime";var z=I("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function ue({className:e,variant:t,...s}){return g("div",{"data-slot":"alert",role:"alert",className:a(z({variant:t}),e),...s})}i(ue,"Alert");function fe({className:e,...t}){return g("div",{"data-slot":"alert-title",className:a("col-start-2 min-h-4 font-medium tracking-tight",e),...t})}i(fe,"AlertTitle");function ge({className:e,...t}){return g("div",{"data-slot":"alert-description",className:a("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}i(ge,"AlertDescription");export{y as a,j as b,A as c,W as d,X as e,E as f,J as g,K as h,M as i,te as j,oe as k,ie as l,ae as m,re as n,ne as o,se as p,ue as q,fe as r,ge as s};
2
- //# sourceMappingURL=chunk-F2E56YE2.js.map
1
+ import{a}from"./chunk-54KJP7WD.js";import{a as i}from"./chunk-P37U34EQ.js";import*as v from"react";import*as d from"@radix-ui/react-checkbox";import{Check as b}from"lucide-react";import{jsx as p}from"react/jsx-runtime";var y=v.forwardRef(({className:e,...t},s)=>p(d.Root,{ref:s,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-checkbox data-[state=checked]:text-primary",e),...t,children:p(d.Indicator,{className:a("flex items-center justify-center text-current"),children:p(b,{className:"h-4 w-4"})})}));y.displayName=d.Root.displayName;import*as c from"@radix-ui/react-radio-group";import{CircleIcon as R}from"lucide-react";import{jsx as m}from"react/jsx-runtime";function j({className:e,...t}){return m(c.Root,{"data-slot":"radio-group",className:a("grid gap-3",e),...t})}i(j,"RadioGroup");function A({className:e,...t}){return m(c.Item,{"data-slot":"radio-group-item",className:a("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m(c.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m(R,{className:"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}i(A,"RadioGroupItem");import*as o from"@radix-ui/react-select";import{CheckIcon as C,ChevronDownIcon as P,ChevronUpIcon as S}from"lucide-react";import{jsx as r,jsxs as u}from"react/jsx-runtime";function W({...e}){return r(o.Root,{"data-slot":"select",...e})}i(W,"Select");function X({...e}){return r(o.Group,{"data-slot":"select-group",...e})}i(X,"SelectGroup");function E({...e}){return r(o.Value,{"data-slot":"select-value",...e})}i(E,"SelectValue");function J({className:e,children:t,...s}){return u(o.Trigger,{"data-slot":"select-trigger",className:a("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",e),...s,children:[t,r(o.Icon,{asChild:!0,className:"absolute right-4",children:r(P,{className:"size-4"})})]})}i(J,"SelectTrigger");function K({className:e,children:t,position:s="popper",...x}){return r(o.Portal,{children:u(o.Content,{"data-slot":"select-content",className:a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...x,children:[r(h,{}),r(o.Viewport,{className:a(s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),r(D,{})]})})}i(K,"SelectContent");function M({className:e,children:t,...s}){return u(o.Item,{"data-slot":"select-item",className:a("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[r(o.ItemText,{children:t}),r("span",{className:"flex size-3.5 items-center justify-center",children:r(o.ItemIndicator,{children:r(C,{className:"size-4"})})})]})}i(M,"SelectItem");function h({className:e,...t}){return r(o.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(S,{className:"size-4"})})}i(h,"SelectScrollUpButton");function D({className:e,...t}){return r(o.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(P,{className:"size-4"})})}i(D,"SelectScrollDownButton");import*as n from"@radix-ui/react-dialog";import{XIcon as w}from"lucide-react";import{jsx as l,jsxs as f}from"react/jsx-runtime";function te({...e}){return l(n.Root,{"data-slot":"dialog",...e})}i(te,"Dialog");function oe({...e}){return l(n.Trigger,{"data-slot":"dialog-trigger",...e})}i(oe,"DialogTrigger");function N({...e}){return l(n.Portal,{"data-slot":"dialog-portal",...e})}i(N,"DialogPortal");function k({className:e,...t}){return l(n.Overlay,{"data-slot":"dialog-overlay",className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}i(k,"DialogOverlay");function ie({className:e,children:t,...s}){return f(N,{"data-slot":"dialog-portal",children:[l(k,{}),f(n.Content,{"data-slot":"dialog-content",className:a("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[t,f(n.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close",children:[l(w,{}),l("span",{className:"sr-only",children:"Close"})]})]})]})}i(ie,"DialogContent");function ae({className:e,...t}){return l("div",{"data-slot":"dialog-header",className:a("flex flex-col gap-2 text-center sm:text-left",e),...t})}i(ae,"DialogHeader");function re({className:e,...t}){return l("div",{"data-slot":"dialog-footer",className:a("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}i(re,"DialogFooter");function ne({className:e,...t}){return l(n.Title,{"data-slot":"dialog-title",className:a("text-lg leading-none font-semibold",e),...t})}i(ne,"DialogTitle");function se({className:e,...t}){return l(n.Description,{"data-slot":"dialog-description",className:a("text-muted-foreground text-sm",e),...t})}i(se,"DialogDescription");import{cva as I}from"class-variance-authority";import{jsx as g}from"react/jsx-runtime";var z=I("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function ue({className:e,variant:t,...s}){return g("div",{"data-slot":"alert",role:"alert",className:a(z({variant:t}),e),...s})}i(ue,"Alert");function fe({className:e,...t}){return g("div",{"data-slot":"alert-title",className:a("col-start-2 min-h-4 font-medium tracking-tight",e),...t})}i(fe,"AlertTitle");function ge({className:e,...t}){return g("div",{"data-slot":"alert-description",className:a("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}i(ge,"AlertDescription");export{y as a,j as b,A as c,W as d,X as e,E as f,J as g,K as h,M as i,te as j,oe as k,ie as l,ae as m,re as n,ne as o,se as p,ue as q,fe as r,ge as s};
2
+ //# sourceMappingURL=chunk-GGXKORRZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-DYB3RWP7.js";import{a as p}from"./chunk-LBUNJ5J3.js";import{a as i,b as l,c as s,d as n,e as c,f as m,g as d}from"./chunk-ANXYPRBG.js";import{b as o}from"./chunk-7VUILYZ3.js";import{a as t}from"./chunk-P37U34EQ.js";import{X as u}from"lucide-react";import{jsx as r,jsxs as a}from"react/jsx-runtime";var y=t(({label:D="Disclaimer"})=>a(i,{children:[r(l,{asChild:!0,children:r(o,{variant:"link",size:"link",children:D})}),a(n,{children:[a(c,{children:[a(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[r(u,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]}),r(m,{children:e?.data.title}),a(d,{children:["For more details read our"," ",r(o,{variant:"link",size:"link",asChild:!0,children:r("a",{href:e?.data.html_url,target:"_blank",rel:"noopener noreferrer",children:"Disclaimer"})})]})]}),r(p,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area",children:r("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:e?.data.body??""}})})]})]}),"CostCalculatorDisclaimer");export{y as a};
2
- //# sourceMappingURL=chunk-HQI6W7PR.js.map
1
+ import{a as e}from"./chunk-DYB3RWP7.js";import{a as p}from"./chunk-HRA6BY3O.js";import{a as i,b as l,c as s,d as n,e as c,f as m,g as d}from"./chunk-2I5DIIJP.js";import{b as o}from"./chunk-2QGDCMCE.js";import{a as t}from"./chunk-P37U34EQ.js";import{X as u}from"lucide-react";import{jsx as r,jsxs as a}from"react/jsx-runtime";var y=t(({label:D="Disclaimer"})=>a(i,{children:[r(l,{asChild:!0,children:r(o,{variant:"link",size:"link",children:D})}),a(n,{children:[a(c,{children:[a(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[r(u,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]}),r(m,{children:e?.data.title}),a(d,{children:["For more details read our"," ",r(o,{variant:"link",size:"link",asChild:!0,children:r("a",{href:e?.data.html_url,target:"_blank",rel:"noopener noreferrer",children:"Disclaimer"})})]})]}),r(p,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area",children:r("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:e?.data.body??""}})})]})]}),"CostCalculatorDisclaimer");export{y as a};
2
+ //# sourceMappingURL=chunk-GNZJOPIS.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-6NIRGHFF.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function p({onSubmit:e}){let{terminationBag:i}=m();return r(n,{onSubmit:o(async t=>{await e?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-6F66NTNI.js.map
1
+ import{a as n}from"./chunk-QIN5BLVI.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function p({onSubmit:e}){let{terminationBag:i}=m();return r(n,{onSubmit:o(async t=>{await e?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-GS5NA664.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-3LOVCTCN.js";import*as c from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as l,jsxs as n}from"react/jsx-runtime";var S=c.forwardRef(({className:o,children:e,...i},a)=>n(r.Root,{ref:a,className:t("relative overflow-hidden",o),...i,children:[l(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),l(m,{}),l(r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>l(r.ScrollAreaScrollbar,{ref:a,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:l(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));m.displayName=r.ScrollAreaScrollbar.displayName;export{S as a};
2
- //# sourceMappingURL=chunk-LBUNJ5J3.js.map
1
+ import{a as t}from"./chunk-54KJP7WD.js";import*as c from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as l,jsxs as n}from"react/jsx-runtime";var S=c.forwardRef(({className:o,children:e,...i},a)=>n(r.Root,{ref:a,className:t("relative overflow-hidden",o),...i,children:[l(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),l(m,{}),l(r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>l(r.ScrollAreaScrollbar,{ref:a,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:l(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));m.displayName=r.ScrollAreaScrollbar.displayName;export{S as a};
2
+ //# sourceMappingURL=chunk-HRA6BY3O.js.map
@@ -0,0 +1,2 @@
1
+ import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-XGMQPLVG.js";import{b as p}from"./chunk-7XRPOR7L.js";import{g as C}from"./chunk-U23SN7CM.js";import{f as E}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
2
+ //# sourceMappingURL=chunk-JB6XA3P6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorForm.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { Form } from '@/src/components/ui/form';\nimport { useCostCalculatorContext } from '@/src/flows/CostCalculator/context';\nimport {\n CostCalculatorEstimationResponse,\n CostCalculatorEstimationFormValues,\n CostCalculatorEstimationSubmitValues,\n EstimationError,\n} from '@/src/flows/CostCalculator/types';\nimport {\n FieldError,\n NormalizedFieldError,\n normalizeFieldErrors,\n} from '@/src/lib/mutations';\nimport { prettifyFormValues } from '@/src/lib/utils';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\n\ntype CostCalculatorFormProps = Partial<{\n /**\n * Callback function that handles form submission. When form is submit, the form values are sent to the consumer app before behind submitted to Remote.\n * @param data - The payload sent to the /cost-calculator/estimation endpoint.\n */\n onSubmit: (\n data: CostCalculatorEstimationSubmitValues,\n ) => Promise<void> | void;\n /**\n * Callback function to handle the success when the estimation succeeds. The CostCalculatorEstimateResponse is sent back to you.\n * @param data - The response data from the /cost-calculator/estimation endpoint.\n */\n onSuccess: (data: CostCalculatorEstimationResponse) => Promise<void> | void;\n /**\n * Callback function to handle the error when the estimation fails.\n * @param error - The error object.\n */\n onError: (error: EstimationError) => void;\n /**\n * Enhanced callback function to handle errors with field-level details.\n * @param error - The error object with field errors.\n */\n onErrorWithFields?: ({\n error,\n fieldErrors,\n }: {\n error: Error;\n fieldErrors: NormalizedFieldError[];\n rawError: Record<string, unknown>;\n }) => void;\n /**\n * Whether to reset the form when the form is successfully submitted.\n */\n shouldResetForm?: boolean;\n\n /**\n * Fields to reset when the form is successfully submitted.\n */\n resetFields?: ('country' | 'currency' | 'salary')[];\n}>;\n\nexport function CostCalculatorForm({\n onSubmit,\n onError,\n onSuccess,\n onErrorWithFields,\n shouldResetForm,\n resetFields,\n}: CostCalculatorFormProps) {\n const { form, formId, costCalculatorBag } = useCostCalculatorContext();\n\n const {\n formState: { isSubmitSuccessful },\n } = form;\n\n useEffect(() => {\n // resets the entire form if the form is successfully submitted and the shouldResetForm prop is true\n if (isSubmitSuccessful && shouldResetForm) {\n costCalculatorBag?.resetForm();\n form.reset();\n return;\n }\n\n // resets the specified fields if the form is successfully submitted and the resetFields prop is provided\n if (isSubmitSuccessful && resetFields) {\n // Reset only the specified fields\n const currentValues = form.getValues();\n const resetValues = { ...currentValues };\n resetFields.forEach((field) => {\n resetValues[field] = '';\n });\n\n costCalculatorBag?.resetForm();\n form.reset(resetValues);\n }\n }, [\n isSubmitSuccessful,\n form,\n shouldResetForm,\n costCalculatorBag,\n resetFields,\n ]);\n\n const handleSubmit = async (values: CostCalculatorEstimationFormValues) => {\n try {\n const parsedValues = costCalculatorBag?.parseFormValues(\n values,\n ) as CostCalculatorEstimationSubmitValues;\n\n if (costCalculatorBag?.meta?.fields) {\n costCalculatorBag.meta.fields = prettifyFormValues(\n values,\n costCalculatorBag.fields,\n );\n costCalculatorBag.meta.fields['employer_currency_slug'] =\n costCalculatorBag.meta.fields['currency'];\n }\n\n const costCalculatorResults =\n await costCalculatorBag?.onSubmit(parsedValues);\n\n // if this rejects, catch will handle it\n await onSubmit?.(parsedValues);\n\n if (costCalculatorResults?.data && !costCalculatorResults.error) {\n const responseWithTitle = {\n data: {\n ...costCalculatorResults.data.data,\n employments: (\n costCalculatorResults as $TSFixMe\n ).data.data.employments?.map((employment: $TSFixMe) => ({\n ...employment,\n title: parsedValues.estimation_title,\n })),\n },\n };\n await onSuccess?.(responseWithTitle);\n } else {\n throw {\n data: null,\n error: costCalculatorResults?.error,\n fieldErrors: costCalculatorResults?.fieldErrors,\n rawError: costCalculatorResults?.rawError,\n };\n }\n } catch (err) {\n // Handles here the errors caused by the API\n const error = err as {\n data: null;\n error: EstimationError;\n fieldErrors: FieldError[];\n rawError: Record<string, unknown>;\n };\n\n const fieldErrors = error.fieldErrors;\n\n if (onErrorWithFields) {\n // Create field metadata for better error messages\n const fieldsMeta = costCalculatorBag?.meta?.fields;\n\n // Normalize field errors with user-friendly labels\n const normalizedFieldErrors = normalizeFieldErrors(\n fieldErrors,\n fieldsMeta,\n );\n\n onErrorWithFields({\n error: error.error as Error,\n rawError: error.rawError as Record<string, unknown>,\n fieldErrors: normalizedFieldErrors,\n });\n } else {\n // Fall back to the original error handler\n onError?.(error.error);\n }\n }\n };\n\n return (\n <Form {...form}>\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleSubmit)}\n className='space-y-4 RemoteFlows__CostCalculatorForm'\n >\n <JSONSchemaFormFields fields={costCalculatorBag?.fields ?? []} />\n </form>\n </Form>\n );\n}\n"],"mappings":"gPAAA,OAAS,aAAAA,MAAiB,QAuLlB,cAAAC,MAAA,oBA5HD,SAASC,EAAmB,CACjC,SAAAC,EACA,QAAAC,EACA,UAAAC,EACA,kBAAAC,EACA,gBAAAC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IAAMsB,EAAajB,GAAmB,MAAM,OAGtCkB,EAAwBC,EAC5BH,EACAC,CACF,EAEAtB,EAAkB,CAChB,MAAOoB,EAAM,MACb,SAAUA,EAAM,SAChB,YAAaG,CACf,CAAC,CACH,MAEEzB,IAAUsB,EAAM,KAAK,CAEzB,CACF,EAzEqB,gBA2ErB,OACEzB,EAAC8B,EAAA,CAAM,GAAGtB,EACR,SAAAR,EAAC,QACC,GAAIS,EACJ,SAAUD,EAAK,aAAaQ,CAAY,EACxC,UAAU,4CAEV,SAAAhB,EAAC+B,EAAA,CAAqB,OAAQrB,GAAmB,QAAU,CAAC,EAAG,EACjE,EACF,CAEJ,CAhIgBO,EAAAhB,EAAA","names":["useEffect","jsx","CostCalculatorForm","onSubmit","onError","onSuccess","onErrorWithFields","shouldResetForm","resetFields","form","formId","costCalculatorBag","useCostCalculatorContext","isSubmitSuccessful","useEffect","resetValues","field","handleSubmit","__name","values","parsedValues","prettifyFormValues","costCalculatorResults","responseWithTitle","employment","err","error","fieldErrors","fieldsMeta","normalizedFieldErrors","normalizeFieldErrors","Form","JSONSchemaFormFields"]}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-7VUILYZ3.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({children:t,...o}){let{formId:n}=i(),{components:f}=u(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(e,{...o,form:n,children:t})}m(d,"ContractAmendmentSubmit");export{d as a};
2
- //# sourceMappingURL=chunk-PHGCCQZ2.js.map
1
+ import{b as e}from"./chunk-2QGDCMCE.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({children:t,...o}){let{formId:n}=i(),{components:f}=u(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(e,{...o,form:n,children:t})}m(d,"ContractAmendmentSubmit");export{d as a};
2
+ //# sourceMappingURL=chunk-JWZIWG4T.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-J7JO4GF4.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
2
- //# sourceMappingURL=chunk-OD37LQSP.js.map
1
+ import{a as s}from"./chunk-R4LFNFC2.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
2
+ //# sourceMappingURL=chunk-K4VWUMNO.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as o,jsxs as t}from"react/jsx-runtime";var a=[{label:"Misconduct",description:"The employee is being dismissed due to unacceptable or improper behavior."},{label:"Performance",description:"When dismissing an employee for poor performance, employers are required by law to do so fairly. This means giving the employee reasonable opportunity to improve their performance prior to termination."},{label:"Workforce reduction",description:"The employee\u2019s position is being made redundant, and a layoff is underway."},{label:"Values",description:"The employee is misaligned with the company\u2019s values."},{label:"Compliance issue",description:"Use this option if the employee violated key policies, processes or procedures. For example, they failed to comply with their employment agreement\u2019s confidentiality clause."},{label:"Incapacity to perform inherent duties",description:"Use this option if the employee is physically or mentally unable to fulfill the work requirements of their role."},{label:"Mutual agreement",description:"Employee and employer made a mutual decision to end the relationship."},{label:"Decision to cancel hiring before the employee started",description:"Use this option only if the employee has not started work yet."},{label:"Job abandonment",description:"The employee has failed to appear for work; the Employer has been unsuccessful in establishing communications with the employee and does not know the employee\u2019s whereabouts."},{label:"Dissatisfaction with EOR service",description:t("span",{children:["We\u2019re sorry to see you go. If there is anything we can do to improve or if there is any remaining feedback you want to give us, please reach out to"," ",o("a",{href:"mailto:help@remote.com",target:"_blank",rel:"noopener noreferrer",children:"help@remote.com"}),"."]})},{label:"End of fixed-term contract",description:"Use this option when the employee fixed-term contract is coming to an end and will not be renewed or extended."}],r=n(()=>t(s,{children:[t("h3",{className:e("RemoteFlows__TerminationReasonsDetailContent__Title"),children:[" ","Why is this important?"]}),o("p",{className:e("RemoteFlows__TerminationReasonsDetailContent__Description"),children:"We're here to help you follow all applicable labor laws when terminating an employee. Here are all the legal reasons for termination. Please read them to make sure you enter the correct reason in the platform."}),o("h4",{className:e("RemoteFlows__TerminationReasonsDetailContent__Subtitle"),children:"Termination Reasons"}),o("ul",{className:e("RemoteFlows__TerminationReasonsDetailContent__List list-disc list-inside"),children:a.map(i=>t("li",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItem"),children:[o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemLabel"),children:i.label}),o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemDescription"),children:i.description})]},i.label))})]}),"TerminationReasonsDetailContent");export{r as a};
2
+ //# sourceMappingURL=chunk-KN4F5TMS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.tsx"],"sourcesContent":["import { cn } from '@/src/lib/utils';\n\nconst terminationReasonsList = [\n {\n label: 'Misconduct',\n description:\n 'The employee is being dismissed due to unacceptable or improper behavior.',\n },\n {\n label: 'Performance',\n description:\n 'When dismissing an employee for poor performance, employers are required by law to do so fairly. This means giving the employee reasonable opportunity to improve their performance prior to termination.',\n },\n {\n label: 'Workforce reduction',\n description:\n 'The employee’s position is being made redundant, and a layoff is underway.',\n },\n {\n label: 'Values',\n description: 'The employee is misaligned with the company’s values.',\n },\n {\n label: 'Compliance issue',\n description:\n 'Use this option if the employee violated key policies, processes or procedures. For example, they failed to comply with their employment agreement’s confidentiality clause.',\n },\n {\n label: 'Incapacity to perform inherent duties',\n description:\n 'Use this option if the employee is physically or mentally unable to fulfill the work requirements of their role.',\n },\n {\n label: 'Mutual agreement',\n description:\n 'Employee and employer made a mutual decision to end the relationship.',\n },\n {\n label: 'Decision to cancel hiring before the employee started',\n description:\n 'Use this option only if the employee has not started work yet.',\n },\n {\n label: 'Job abandonment',\n description:\n 'The employee has failed to appear for work; the Employer has been unsuccessful in establishing communications with the employee and does not know the employee’s whereabouts.',\n },\n {\n label: 'Dissatisfaction with EOR service',\n description: (\n <span>\n We’re sorry to see you go. If there is anything we can do to improve or\n if there is any remaining feedback you want to give us, please reach out\n to{' '}\n <a\n href='mailto:help@remote.com'\n target='_blank'\n rel='noopener noreferrer'\n >\n help@remote.com\n </a>\n .\n </span>\n ),\n },\n {\n label: 'End of fixed-term contract',\n description:\n 'Use this option when the employee fixed-term contract is coming to an end and will not be renewed or extended.',\n },\n];\nexport const TerminationReasonsDetailContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationReasonsDetailContent__Title')}>\n {' '}\n Why is this important?\n </h3>\n <p\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__Description',\n )}\n >\n We're here to help you follow all applicable labor laws when terminating\n an employee. Here are all the legal reasons for termination. Please read\n them to make sure you enter the correct reason in the platform.\n </p>\n\n <h4\n className={cn('RemoteFlows__TerminationReasonsDetailContent__Subtitle')}\n >\n Termination Reasons\n </h4>\n <ul\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__List list-disc list-inside',\n )}\n >\n {terminationReasonsList.map((reason) => (\n <li\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItem',\n )}\n key={reason.label}\n >\n <span\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItemLabel',\n )}\n >\n {reason.label}\n </span>\n <span\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItemDescription',\n )}\n >\n {reason.description}\n </span>\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gFAkDM,OAuBF,YAAAA,EAnBI,OAAAC,EAJF,QAAAC,MAAA,oBAhDN,IAAMC,EAAyB,CAC7B,CACE,MAAO,aACP,YACE,2EACJ,EACA,CACE,MAAO,cACP,YACE,2MACJ,EACA,CACE,MAAO,sBACP,YACE,iFACJ,EACA,CACE,MAAO,SACP,YAAa,4DACf,EACA,CACE,MAAO,mBACP,YACE,mLACJ,EACA,CACE,MAAO,wCACP,YACE,kHACJ,EACA,CACE,MAAO,mBACP,YACE,uEACJ,EACA,CACE,MAAO,wDACP,YACE,gEACJ,EACA,CACE,MAAO,kBACP,YACE,oLACJ,EACA,CACE,MAAO,mCACP,YACED,EAAC,QAAK,qKAGD,IACHD,EAAC,KACC,KAAK,yBACL,OAAO,SACP,IAAI,sBACL,2BAED,EAAI,KAEN,CAEJ,EACA,CACE,MAAO,6BACP,YACE,gHACJ,CACF,EACaG,EAAkCC,EAAA,IAE3CH,EAAAF,EAAA,CACE,UAAAE,EAAC,MAAG,UAAWI,EAAG,qDAAqD,EACpE,cAAI,0BAEP,EACAL,EAAC,KACC,UAAWK,EACT,2DACF,EACD,6NAID,EAEAL,EAAC,MACC,UAAWK,EAAG,wDAAwD,EACvE,+BAED,EACAL,EAAC,MACC,UAAWK,EACT,0EACF,EAEC,SAAAH,EAAuB,IAAKI,GAC3BL,EAAC,MACC,UAAWI,EACT,wDACF,EAGA,UAAAL,EAAC,QACC,UAAWK,EACT,6DACF,EAEC,SAAAC,EAAO,MACV,EACAN,EAAC,QACC,UAAWK,EACT,mEACF,EAEC,SAAAC,EAAO,YACV,IAfKA,EAAO,KAgBd,CACD,EACH,GACF,EAnD2C","names":["Fragment","jsx","jsxs","terminationReasonsList","TerminationReasonsDetailContent","__name","cn","reason"]}
@@ -1,2 +1,2 @@
1
- import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-AS6DCKEJ.js";import{a as m}from"./chunk-QW4JPW6J.js";import{b as E}from"./chunk-7VUILYZ3.js";import{b as y}from"./chunk-3ZWDIEEM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as R}from"react/jsx-runtime";function A({onSubmit:S,onSuccess:d,onError:o,render:u,...r}){let{components:I}=y(),{onboardingBag:t,setCreditScore:c}=g(),n=f(),i=w(),{mutateAsync:b}=m(n),{mutateAsync:_}=m(i),l=a(async()=>{try{if(await S?.(),t.creditRiskStatus==="deposit_required"&&t.employmentId&&t.employment?.status&&!t.isEmploymentReadOnly){let e=await _({employment_slug:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),c?.(s=>({...s,showReserveInvoice:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(t.employmentId){let e=await b({employment_id:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"invited"}),c?.(s=>({...s,showInviteSuccessful:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){o?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),p=t.creditRiskStatus==="deposit_required"&&t.employment?.status&&!t.isEmploymentReadOnly,v=I?.button;return v?R(v,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:e=>{l(),r.onClick?.(e)},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})}):R(E,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:()=>{l()},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})})}a(A,"OnboardingInvite");export{A as a};
2
- //# sourceMappingURL=chunk-P5CLILU4.js.map
1
+ import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-QGGKDM3N.js";import{a as m}from"./chunk-7XRPOR7L.js";import{b as E}from"./chunk-2QGDCMCE.js";import{b as y}from"./chunk-3ZWDIEEM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as R}from"react/jsx-runtime";function A({onSubmit:S,onSuccess:d,onError:o,render:u,...r}){let{components:I}=y(),{onboardingBag:t,setCreditScore:c}=g(),n=f(),i=w(),{mutateAsync:b}=m(n),{mutateAsync:_}=m(i),l=a(async()=>{try{if(await S?.(),t.creditRiskStatus==="deposit_required"&&t.employmentId&&t.employment?.status&&!t.isEmploymentReadOnly){let e=await _({employment_slug:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),c?.(s=>({...s,showReserveInvoice:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(t.employmentId){let e=await b({employment_id:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"invited"}),c?.(s=>({...s,showInviteSuccessful:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){o?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),p=t.creditRiskStatus==="deposit_required"&&t.employment?.status&&!t.isEmploymentReadOnly,v=I?.button;return v?R(v,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:e=>{l(),r.onClick?.(e)},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})}):R(E,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:()=>{l()},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})})}a(A,"OnboardingInvite");export{A as a};
2
+ //# sourceMappingURL=chunk-LCIBPBLY.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-3LOVCTCN.js";import{a as s}from"./chunk-P37U34EQ.js";import*as t from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function r({className:e,...i}){return n(t.Root,{"data-slot":"tabs",className:o("flex flex-col gap-2",e),...i})}s(r,"Tabs");function c({className:e,...i}){return n(t.List,{"data-slot":"tabs-list",className:o("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...i})}s(c,"TabsList");function l({className:e,...i}){return n(t.Trigger,{"data-slot":"tabs-trigger",className:o("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}s(l,"TabsTrigger");function m({className:e,...i}){return n(t.Content,{"data-slot":"tabs-content",className:o("flex-1 outline-none",e),...i})}s(m,"TabsContent");export{r as a,c as b,l as c,m as d};
2
- //# sourceMappingURL=chunk-CRXPRR3R.js.map
1
+ import{a as o}from"./chunk-54KJP7WD.js";import{a as s}from"./chunk-P37U34EQ.js";import*as t from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function r({className:e,...i}){return n(t.Root,{"data-slot":"tabs",className:o("flex flex-col gap-2",e),...i})}s(r,"Tabs");function c({className:e,...i}){return n(t.List,{"data-slot":"tabs-list",className:o("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",e),...i})}s(c,"TabsList");function l({className:e,...i}){return n(t.Trigger,{"data-slot":"tabs-trigger",className:o("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}s(l,"TabsTrigger");function m({className:e,...i}){return n(t.Content,{"data-slot":"tabs-content",className:o("flex-1 outline-none",e),...i})}s(m,"TabsContent");export{r as a,c as b,l as c,m as d};
2
+ //# sourceMappingURL=chunk-M4EVWRWB.js.map
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-32GSS4UM.js";import{a as l}from"./chunk-R4LFNFC2.js";import{a as m}from"./chunk-A76UTPRW.js";import{c}from"./chunk-U23SN7CM.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:y.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(l,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-M6ATR43P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"mMAIA,OAAS,aAAAA,MAAiB,QA8BpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAbC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOP,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACe,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBX,EAAkB,oBAAsBI,EAAM,KAC9DQ,EAAsBZ,EACxBI,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAIb,EAAiB,CACnB,IAAMc,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCF,IAETE,EAAS,oBAAqBF,CAAY,EAC1CE,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BD,IAETE,EAASD,EAAM,KAAMD,CAAY,EACjCE,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACJ,EAAiBG,EAAcE,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEV,EAACsB,EAAA,CACE,GAAGZ,EACJ,eAAgBN,EAChB,eAAgBC,EAChB,cAAeY,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBN,EAClB,CAEJ,EAnE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-7VUILYZ3.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
- //# sourceMappingURL=chunk-LUUUPLTW.js.map
1
+ import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
+ //# sourceMappingURL=chunk-MCAK5KPI.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-UH3E6HSQ.js";import{a as n}from"./chunk-XFD3ULUF.js";import{b as i}from"./chunk-E3QWREZF.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as r}from"./chunk-P37U34EQ.js";import{modify as c}from"@remoteoss/json-schema-form";import{useMutation as l,useQuery as p}from"@tanstack/react-query";import{createHeadlessForm as y}from"@remoteoss/json-schema-form";var V=r(()=>{let{client:o}=a();return l({mutationFn:r(e=>i({client:o,body:e}),"mutationFn")})},"useCreateTermination"),M=r(({formValues:o,jsfModify:e,step:m})=>p({queryKey:["rmt-flows-termination-schema",m],queryFn:r(()=>s[m]??n,"queryFn"),select:r(({data:f})=>{let t=f?.schema||{};if(e){let{schema:u}=c(t,e);t=u}return y(t||{},{initialValues:o||{}})},"select")}),"useTerminationSchema");export{V as a,M as b};
2
- //# sourceMappingURL=chunk-INC2YFDP.js.map
1
+ import{a as s}from"./chunk-UH3E6HSQ.js";import{a as n}from"./chunk-XFD3ULUF.js";import{b as i}from"./chunk-FHHAGWU5.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as r}from"./chunk-P37U34EQ.js";import{modify as c}from"@remoteoss/json-schema-form";import{useMutation as l,useQuery as p}from"@tanstack/react-query";import{createHeadlessForm as y}from"@remoteoss/json-schema-form";var V=r(()=>{let{client:o}=a();return l({mutationFn:r(e=>i({client:o,body:e}),"mutationFn")})},"useCreateTermination"),M=r(({formValues:o,jsfModify:e,step:m})=>p({queryKey:["rmt-flows-termination-schema",m],queryFn:r(()=>s[m]??n,"queryFn"),select:r(({data:f})=>{let t=f?.schema||{};if(e){let{schema:u}=c(t,e);t=u}return y(t||{},{initialValues:o||{}})},"select")}),"useTerminationSchema");export{V as a,M as b};
2
+ //# sourceMappingURL=chunk-MDQ6YJMV.js.map
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk-TDQVKDQW.js";import{a as A}from"./chunk-QW4JPW6J.js";import{a as l,b as _}from"./chunk-3AEKPMIN.js";import{c as E,n as w,x as b}from"./chunk-E3QWREZF.js";import{a as M}from"./chunk-PJBAQZ6G.js";import{d}from"./chunk-3ZWDIEEM.js";import{a as j,c as S}from"./chunk-PAQW5BFW.js";import{a as t}from"./chunk-P37U34EQ.js";import{createHeadlessForm as I,modify as R}from"@remoteoss/json-schema-form";import{useMutation as Q,useQuery as B}from"@tanstack/react-query";var J=t(({countryCode:a,employment:r,fieldValues:n,options:e})=>{let{client:u}=d(),m=e?.jsonSchemaVersion?.contract_amendments?{json_schema_version:e.jsonSchemaVersion.contract_amendments}:{};return B({queryKey:["contract-amendment-schema"],retry:!1,queryFn:t(async()=>{let o=await E({client:u,headers:{Authorization:""},query:{employment_id:r?.data?.employment?.id,country_code:a,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:t(({data:o})=>{let c=o?.data||{};if(e&&e.jsfModify){let{schema:f}=R(c,e.jsfModify);c=f}let s={...n,annual_gross_salary:n?.annual_gross_salary?j(n?.annual_gross_salary):void 0},y=Object.keys(s).length>0;return I(c,{initialValues:y?s:_(r)})},"select")})},"useContractAmendmentSchemaQuery"),K=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>w({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useCreateContractAmendmentMutation"),U=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>b({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),ae=t(({employmentId:a,countryCode:r,options:n})=>{let{fieldValues:e,setFieldValues:u,stepState:m,nextStep:o,previousStep:c}=M(l),{data:s,isLoading:y,isError:V,error:f}=v({employmentId:a}),{data:i,isLoading:q,isError:L,error:T}=J({employment:s,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...e},options:n}),k=_(s,i?.fields),F=K(n),g=U(n);async function O(p){let h=S(p,i?.fields||[],{isPartialValidation:!1}),P={employment_id:s?.data.employment?.id,amendment_contract_id:s?.data.employment?.active_contract_id,contract_amendment:{...h}};switch(m.currentStep.name){case l.form.name:{let{mutateAsync:C}=A(g),H=await C(P);return o(),H}case l.confirmation_form.name:{let{mutateAsync:C}=A(F);return C(P)}default:throw new Error("Invalid step state")}}t(O,"onSubmit");function z(p){if(i){let h=S(p,i?.fields);return i?.handleValidation(h)}return null}t(z,"handleValidation");function x(){c()}return t(x,"back"),{stepState:m,fields:i?.fields||[],isLoading:y||q,isError:V||L,error:f||T,isSubmitting:g.isPending||F.isPending,initialValues:k,values:e,handleValidation:z,checkFieldUpdates:u,onSubmit:O,back:x}},"useContractAmendment");export{ae as a};
2
- //# sourceMappingURL=chunk-XVTAPI3Z.js.map
1
+ import{a as v}from"./chunk-ZTVYWMBY.js";import{a as A}from"./chunk-7XRPOR7L.js";import{a as l,b as _}from"./chunk-3AEKPMIN.js";import{c as E,n as w,y as b}from"./chunk-FHHAGWU5.js";import{a as M}from"./chunk-PJBAQZ6G.js";import{d}from"./chunk-3ZWDIEEM.js";import{a as j,c as S}from"./chunk-PAQW5BFW.js";import{a as t}from"./chunk-P37U34EQ.js";import{createHeadlessForm as I,modify as R}from"@remoteoss/json-schema-form";import{useMutation as Q,useQuery as B}from"@tanstack/react-query";var J=t(({countryCode:a,employment:r,fieldValues:n,options:e})=>{let{client:u}=d(),m=e?.jsonSchemaVersion?.contract_amendments?{json_schema_version:e.jsonSchemaVersion.contract_amendments}:{};return B({queryKey:["contract-amendment-schema"],retry:!1,queryFn:t(async()=>{let o=await E({client:u,headers:{Authorization:""},query:{employment_id:r?.data?.employment?.id,country_code:a,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:t(({data:o})=>{let c=o?.data||{};if(e&&e.jsfModify){let{schema:f}=R(c,e.jsfModify);c=f}let s={...n,annual_gross_salary:n?.annual_gross_salary?j(n?.annual_gross_salary):void 0},y=Object.keys(s).length>0;return I(c,{initialValues:y?s:_(r)})},"select")})},"useContractAmendmentSchemaQuery"),K=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>w({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useCreateContractAmendmentMutation"),U=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>b({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),ae=t(({employmentId:a,countryCode:r,options:n})=>{let{fieldValues:e,setFieldValues:u,stepState:m,nextStep:o,previousStep:c}=M(l),{data:s,isLoading:y,isError:V,error:f}=v({employmentId:a}),{data:i,isLoading:q,isError:L,error:T}=J({employment:s,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...e},options:n}),k=_(s,i?.fields),F=K(n),g=U(n);async function O(p){let h=S(p,i?.fields||[],{isPartialValidation:!1}),P={employment_id:s?.data.employment?.id,amendment_contract_id:s?.data.employment?.active_contract_id,contract_amendment:{...h}};switch(m.currentStep.name){case l.form.name:{let{mutateAsync:C}=A(g),H=await C(P);return o(),H}case l.confirmation_form.name:{let{mutateAsync:C}=A(F);return C(P)}default:throw new Error("Invalid step state")}}t(O,"onSubmit");function z(p){if(i){let h=S(p,i?.fields);return i?.handleValidation(h)}return null}t(z,"handleValidation");function x(){c()}return t(x,"back"),{stepState:m,fields:i?.fields||[],isLoading:y||q,isError:V||L,error:f||T,isSubmitting:g.isPending||F.isPending,initialValues:k,values:e,handleValidation:z,checkFieldUpdates:u,onSubmit:O,back:x}},"useContractAmendment");export{ae as a};
2
+ //# sourceMappingURL=chunk-MGOT272R.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-XJVYASHX.js";import{b as e}from"./chunk-3LOVCTCN.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as r,jsxs as o}from"react/jsx-runtime";function m({indirectTax:i,currency:n}){return o("div",{children:[o("div",{className:"flex justify-between items-center mb-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Indirect Tax"}),r("span",{className:"font-semibold text-lg",children:e(i,n)})]}),r(a,{})]})}t(m,"CostCalculatorIndirectTax");export{m as a};
2
- //# sourceMappingURL=chunk-NVMZDPMF.js.map
1
+ import{a}from"./chunk-QFZ3XVDT.js";import{b as e}from"./chunk-54KJP7WD.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as r,jsxs as o}from"react/jsx-runtime";function m({indirectTax:i,currency:n}){return o("div",{children:[o("div",{className:"flex justify-between items-center mb-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Indirect Tax"}),r("span",{className:"font-semibold text-lg",children:e(i,n)})]}),r(a,{})]})}t(m,"CostCalculatorIndirectTax");export{m as a};
2
+ //# sourceMappingURL=chunk-MORMQBAF.js.map
@@ -0,0 +1,2 @@
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-CWEPL5J3.js";import{a as C}from"./chunk-ZE3YT3Q6.js";import{a as f}from"./chunk-32GSS4UM.js";import{a as B}from"./chunk-ASKKS4Z3.js";import{a as w}from"./chunk-A76UTPRW.js";import{b as F}from"./chunk-2QGDCMCE.js";import{a as i,b as n}from"./chunk-54KJP7WD.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as M}from"lucide-react";import{useState as G}from"react";import{Fragment as P,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=G(!1);return T("div",{className:i("relative",r),children:[g(F,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(M,{className:"h-4 w-4"})}),_&&T(P,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(E,"ActionsDropdown");import{ChevronDown as I,Info as U}from"lucide-react";import $ from"react-flagpack";import{useState as S}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var j={GB:"GB-UKM"},Z=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o($,{code:j[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),K=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:f.employeeOnboardingTimeline}),"getOnboardingTimelineData");function V({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(w,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(V,"OnboardingTimeline");function Y({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(Y,"HiringSection");function q({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(q,"EstimationHeaders");function L({label:e,amounts:r,className:l,children:a}){let[_,m]=S(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(I,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(L,"EstimationRow");function J({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=S(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(I,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(C,{content:t(b,{children:[o("span",{children:e.tooltip})," ",e.zendeskId&&o(w,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(U,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(J,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(J,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var ye=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||Y,u=l?.OnboardingTimeline||V,O=l?.Header||Z,h=l?.Footer,z=K(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,H=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(B,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(O,{title:r,annualGrossSalary:H,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(q,{isMultipleCurrency:p,className:"mb-3"}),o(L,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:f.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(L,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:z})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{ye as a};
2
+ //# sourceMappingURL=chunk-NO2TRS5O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/shared/actions-dropdown/ActionsDropdown.tsx","../src/flows/CostCalculator/EstimationResults/EstimationResults.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport { cn } from '@/src/lib/utils';\nimport { MoreHorizontal } from 'lucide-react';\nimport { useState, type ReactNode } from 'react';\n\nexport interface DropdownAction {\n label: string;\n icon?: ReactNode;\n onClick: () => void;\n separator?: boolean;\n disabled?: boolean;\n}\n\ninterface ActionsDropdownProps {\n actions?: DropdownAction[];\n label?: string;\n className?: string;\n 'data-testid'?: string;\n}\n\nexport function ActionsDropdown({\n actions = [],\n className,\n label,\n 'data-testid': dataSelector,\n}: ActionsDropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <div className={cn('relative', className)}>\n <Button\n data-testid={dataSelector}\n variant='ghost'\n aria-label={label}\n className='h-8 w-8 p-0'\n onClick={() => setIsOpen(!isOpen)}\n >\n <MoreHorizontal className='h-4 w-4' />\n </Button>\n\n {isOpen && (\n <>\n <div\n className='fixed inset-0 z-40'\n onClick={() => setIsOpen(false)}\n />\n <div className='absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]'>\n {actions.map((action, index) => (\n <button\n key={index}\n data-testid={`${dataSelector}-${action.label.toLowerCase().replace(' ', '-')}`}\n className={cn(\n 'w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100',\n action.disabled && 'opacity-50 cursor-not-allowed',\n )}\n onClick={() => {\n action.onClick();\n setIsOpen(false);\n }}\n disabled={action.disabled}\n >\n {action.label}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n );\n}\n","import { MinimalCountry, MinimalRegion } from '@/src/client';\nimport { ActionsDropdown } from '@/src/components/shared/actions-dropdown/ActionsDropdown';\nimport { Card } from '@/src/components/ui/card';\nimport { ChevronDown, Info } from 'lucide-react';\nimport Flag from 'react-flagpack';\nimport { useState } from 'react';\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/src/components/ui/accordion';\nimport { cn, formatCurrency } from '@/src/lib/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { BasicTooltip } from '@/src/components/ui/basic-tooltip';\nimport { CostCalculatorEstimation } from '@/src/flows/CostCalculator/types';\n\nconst FLAG_CODE_MAPPING: Record<string, string> = {\n GB: 'GB-UKM',\n};\n\nconst EstimationResultsHeader = ({\n title,\n country,\n region,\n annualGrossSalary,\n onDelete,\n onExportPdf,\n onEdit,\n}: {\n title: string;\n country: MinimalCountry;\n region?: MinimalRegion;\n annualGrossSalary: string;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n}) => {\n const actions = [\n {\n label: 'Edit',\n onClick: onEdit,\n },\n {\n label: 'Export',\n onClick: onExportPdf,\n },\n {\n label: 'Delete',\n onClick: onDelete,\n },\n ];\n return (\n <div className='RemoteFlows__EstimationResults__Header flex justify-between'>\n <div className='flex flex-row items-center gap-6'>\n <div className='RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]'>\n <Flag\n code={\n FLAG_CODE_MAPPING[country.alpha_2_code] || country.alpha_2_code\n }\n />\n </div>\n <div className='space-y-1'>\n <h2\n data-testid='estimation-results-header-title'\n className='RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]'\n >\n {title}\n </h2>\n <p className='RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]'>\n {country.name} {region ? ` (${region.name})` : ''}\n </p>\n <p\n data-testid='estimation-results-header-annual-gross-salary'\n className='RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]'\n >\n <span className='text-[#181818]'>\n Employee annual gross salary:\n </span>{' '}\n {annualGrossSalary}\n </p>\n </div>\n </div>\n <ActionsDropdown\n label='Actions'\n className='RemoteFlows__EstimationResults__ActionsDropdown'\n actions={actions}\n />\n </div>\n );\n};\n\ninterface OnboardingTimelineStep {\n title: string;\n description: string;\n id: string;\n}\n\ninterface OnboardingTimelineData {\n steps: OnboardingTimelineStep[];\n helpText: string;\n zendeskArticleId?: number;\n}\n\nconst getOnboardingTimelineData = (): OnboardingTimelineData => {\n return {\n steps: [\n {\n id: 'add-employment-details',\n title: 'Add employment details',\n description: 'You add employee employments details.',\n },\n {\n id: 'invite-employee',\n title: 'Invite employee',\n description:\n 'Hire receives an email invitation from Remote to start the self-enrollment process.',\n },\n {\n id: 'verify-information',\n title: 'Verify information',\n description:\n 'Remote prepares the Employment Agreement and verifies all the information.',\n },\n {\n id: 'sign-contract',\n title: 'Sign contract',\n description:\n 'All parties sign the Employment Agreement and are ready to start. 🎉',\n },\n ],\n helpText:\n \"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.\",\n zendeskArticleId: zendeskArticles.employeeOnboardingTimeline,\n };\n};\n\nfunction OnboardingTimeline({\n minimumOnboardingDays,\n data,\n className,\n}: {\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n className?: string;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__OnboardingTimeline w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__OnboardingTimeline__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]'>\n Onboarding timeline\n </span>\n {minimumOnboardingDays != null && (\n <span className='RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4'>\n {minimumOnboardingDays} days\n </span>\n )}\n </div>\n </AccordionTrigger>\n <AccordionContent className='px-0 pb-4'>\n <ul className='RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2'>\n {data.steps.map((step) => (\n <li key={step.id}>\n <strong className='font-medium text-[#09090B]'>\n {step.title}\n </strong>{' '}\n - {step.description}\n </li>\n ))}\n </ul>\n <p className='RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4'>\n {data.helpText}\n {data.zendeskArticleId && (\n <ZendeskTriggerButton zendeskId={data.zendeskArticleId}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </p>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction HiringSection({\n className,\n countryBenefitsUrl,\n countryGuideUrl,\n country,\n}: {\n className?: string;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n country: MinimalCountry;\n}) {\n return (\n <Accordion\n type='single'\n collapsible\n className={cn(\n 'RemoteFlows__EstimationResults__HiringSection w-full',\n className,\n )}\n >\n <AccordionItem\n value='timeline'\n className='RemoteFlows__HiringSection__AccordionItem border-border'\n >\n <AccordionTrigger className='RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4'>\n <div className='flex items-center justify-between w-full'>\n <span className='text-base font-medium text-[#0F172A]'>\n Hiring in {country.name}\n </span>\n </div>\n </AccordionTrigger>\n <AccordionContent>\n <div className='flex flex-col gap-1'>\n {countryGuideUrl && (\n <a\n href={countryGuideUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our complete guide ↗\n </a>\n )}\n {countryBenefitsUrl && (\n <a\n href={countryBenefitsUrl}\n target='_blank'\n className='RemoteFlows__Link'\n >\n Explore our available benefits ↗\n </a>\n )}\n </div>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n\nfunction EstimationHeaders({\n isMultipleCurrency,\n className,\n}: {\n isMultipleCurrency: boolean;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n 'RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center',\n className,\n )}\n >\n <span aria-hidden />\n {isMultipleCurrency ? (\n <>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employee currency\n </span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Employer currency\n </span>\n </>\n ) : (\n <>\n <span></span>\n <span className='RemoteFlows__EstimationResults__Headers__Label'>\n Amount\n </span>\n </>\n )}\n </div>\n );\n}\n\nfunction EstimationRow({\n label,\n amounts,\n className,\n children,\n}: {\n label: string | React.ReactNode;\n amounts: string | string[];\n className?: string;\n children?: React.ReactNode;\n}) {\n const [isOpen, setIsOpen] = useState(true);\n\n return (\n <div className={cn('RemoteFlows__EstimationResults__Row', className)}>\n <div className='RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center'>\n <div className='RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2'>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]',\n )}\n >\n {label}\n </span>\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded'\n >\n <ChevronDown\n className={`h-4 w-4 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n </div>\n\n {Array.isArray(amounts) ? (\n amounts.map((amount, index) => (\n <span\n key={index}\n className={cn(\n 'RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amount}\n </span>\n ))\n ) : (\n <>\n <span></span>\n <span\n className={cn(\n 'RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]',\n )}\n >\n {amounts}\n </span>\n </>\n )}\n </div>\n\n {/* Collapsible content */}\n {isOpen && children && (\n <div className='RemoteFlows__EstimationRow__CollapsibleContent mt-4'>\n {children}\n </div>\n )}\n </div>\n );\n}\n\ninterface BreakdownItem {\n label: string;\n tooltip?: string;\n dataSelector?: string;\n regionalAmount?: string;\n employerAmount?: string;\n description?: string;\n zendeskId?: string;\n isCollapsible?: boolean;\n children?: BreakdownItem[];\n}\n\nfunction BreakdownListItem({\n item,\n isMultipleCurrency,\n level = 0,\n}: {\n item: BreakdownItem;\n isMultipleCurrency: boolean;\n level?: number;\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const hasChildren = item.children && item.children.length > 0;\n const isNested = level > 0;\n const isCollapsible = item.isCollapsible || hasChildren;\n\n return (\n <li\n className={cn(\n 'RemoteFlows__BreakdownList__Item pb-3',\n isNested && 'pb-1',\n )}\n >\n <div\n className={cn(\n isMultipleCurrency\n ? 'RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between'\n : 'RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between',\n )}\n >\n <div\n className={cn(\n 'RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2',\n isNested && 'pl-3',\n )}\n >\n {!isNested && (\n <span\n className='RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0'\n aria-hidden='true'\n />\n )}\n\n {isCollapsible ? (\n <button\n onClick={() => setIsOpen(!isOpen)}\n className='RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1'\n >\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]',\n )}\n >\n {item.label}\n </span>\n <ChevronDown\n className={`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n ) : (\n <span\n className={cn(\n isNested\n ? 'RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]'\n : 'RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1',\n )}\n >\n {item.label}\n </span>\n )}\n\n {item.tooltip && (\n <BasicTooltip\n content={\n <>\n <span>{item.tooltip}</span>{' '}\n {item.zendeskId && (\n <ZendeskTriggerButton zendeskId={Number(item.zendeskId)}>\n Learn more\n </ZendeskTriggerButton>\n )}\n </>\n }\n >\n <button className='RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded'>\n <Info\n className={cn(\n 'RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground',\n isNested ? 'h-3 w-3' : 'h-4 w-4',\n )}\n />\n </button>\n </BasicTooltip>\n )}\n </div>\n\n {isMultipleCurrency ? (\n <>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employee-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n <span\n data-testid={\n item.dataSelector && item.dataSelector + '-employer-amount'\n }\n className={cn(\n 'RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.employerAmount || '—'}\n </span>\n </>\n ) : (\n <span\n data-testid={item.dataSelector}\n className={cn(\n 'RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right',\n isNested\n ? 'RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]'\n : 'RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]',\n )}\n >\n {item.regionalAmount || '—'}\n </span>\n )}\n </div>\n\n {hasChildren && isOpen && (\n <div className='mt-1'>\n <BreakdownList\n items={item.children!}\n isMultipleCurrency={isMultipleCurrency}\n level={level + 1}\n />\n </div>\n )}\n </li>\n );\n}\n\ninterface BreakdownListProps {\n items: BreakdownItem[];\n isMultipleCurrency: boolean;\n className?: string;\n level?: number;\n}\n\nfunction BreakdownList({\n items,\n isMultipleCurrency,\n className,\n level,\n}: BreakdownListProps) {\n return (\n <ul className={cn('RemoteFlows__BreakdownList list-none', className)}>\n {items.map((item, index) => (\n <BreakdownListItem\n key={index}\n item={item}\n isMultipleCurrency={isMultipleCurrency}\n level={level}\n />\n ))}\n </ul>\n );\n}\n\ntype EstimationResultsComponents = {\n HiringSection?: React.ComponentType<{\n country: MinimalCountry;\n countryBenefitsUrl: string;\n countryGuideUrl: string;\n }>;\n OnboardingTimeline?: React.ComponentType<{\n minimumOnboardingDays: number | null;\n data: OnboardingTimelineData;\n }>;\n Header?: React.ComponentType<{\n title: string;\n region?: MinimalRegion;\n country: MinimalCountry;\n onDelete: () => void;\n onExportPdf: () => void;\n }>;\n Footer?: React.ComponentType;\n};\n\ntype EstimationResultsProps = {\n estimation: CostCalculatorEstimation;\n title: string;\n components?: EstimationResultsComponents;\n onDelete: () => void;\n onExportPdf: () => void;\n onEdit: () => void;\n};\n\nexport const EstimationResults = ({\n estimation,\n title,\n components,\n onDelete,\n onExportPdf,\n onEdit,\n}: EstimationResultsProps) => {\n const CustomHiringSection = components?.HiringSection || HiringSection;\n const CustomOnboardingTimeline =\n components?.OnboardingTimeline || OnboardingTimeline;\n const CustomHeader = components?.Header || EstimationResultsHeader;\n const CustomFooter = components?.Footer;\n\n const onboardingTimelineData = getOnboardingTimelineData();\n\n const isMultipleCurrency =\n estimation.employer_currency_costs.currency.code !==\n estimation.regional_currency_costs.currency.code;\n\n const hasManagementFee =\n estimation.employer_currency_costs.monthly_management_fee;\n\n const hasRegion = estimation.region.code !== estimation.country.code;\n\n const formattedSalary = formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n );\n\n return (\n <Card className='RemoteFlows__EstimationResults__Card p-10'>\n <div className='RemoteFlows__Separator'>\n <CustomHeader\n title={title}\n annualGrossSalary={formattedSalary}\n region={hasRegion ? estimation.region : undefined}\n country={estimation.country}\n onDelete={onDelete}\n onExportPdf={onExportPdf}\n onEdit={onEdit}\n />\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationHeaders\n isMultipleCurrency={isMultipleCurrency}\n className='mb-3'\n />\n <EstimationRow\n label='Monthly total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.monthly_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.monthly_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross monthly salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: zendeskArticles.extraPayments.toString(),\n tooltip:\n 'This country respects extra payments on top of the gross salary.',\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_contributions_breakdown?.map(\n (item, index) => {\n return {\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n };\n },\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.monthly_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.monthly_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.monthly_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Monthly fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .monthly_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .monthly_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <EstimationRow\n label='Annual total cost'\n amounts={\n isMultipleCurrency\n ? [\n formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n formatCurrency(\n estimation.employer_currency_costs.annual_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n ]\n : formatCurrency(\n estimation.regional_currency_costs.annual_total,\n estimation.regional_currency_costs.currency.symbol,\n )\n }\n >\n <BreakdownList\n items={[\n {\n label: 'Gross annual salary',\n dataSelector: 'annual-gross-salary',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_gross_salary,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_gross_salary,\n estimation.employer_currency_costs.currency.symbol,\n ),\n },\n {\n label: 'Mandatory employer costs',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_contributions_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_contributions_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_contributions_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_contributions_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Benefits',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs.annual_benefits_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs.annual_benefits_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.annual_benefits_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_benefits_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n {\n label: 'Extra statutory payments',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_total,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .extra_statutory_payments_total,\n estimation.employer_currency_costs.currency.symbol,\n ),\n children:\n estimation.employer_currency_costs.extra_statutory_payments_breakdown?.map(\n (item, index) => ({\n label: item.name,\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .extra_statutory_payments_breakdown?.[index]?.amount,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n item.amount,\n estimation.employer_currency_costs.currency.symbol,\n ),\n zendeskId: item.zendesk_article_id || undefined,\n tooltip: item.description || undefined,\n }),\n ) || [],\n },\n ...(hasManagementFee\n ? [\n {\n label: 'Annual fee',\n regionalAmount: formatCurrency(\n estimation.regional_currency_costs\n .annual_management_fee,\n estimation.regional_currency_costs.currency.symbol,\n ),\n employerAmount: formatCurrency(\n estimation.employer_currency_costs\n .annual_management_fee,\n estimation.employer_currency_costs.currency.symbol,\n ),\n tooltip:\n 'Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more.',\n },\n ]\n : []),\n ]}\n isMultipleCurrency={isMultipleCurrency}\n />\n </EstimationRow>\n </div>\n <div className='RemoteFlows__Separator'>\n <CustomOnboardingTimeline\n minimumOnboardingDays={estimation.minimum_onboarding_time}\n data={onboardingTimelineData}\n />\n </div>\n\n <CustomHiringSection\n countryBenefitsUrl={estimation.country_benefits_details_url as string}\n countryGuideUrl={estimation.country_guide_url as string}\n country={estimation.country}\n />\n\n {CustomFooter && <CustomFooter />}\n </Card>\n );\n};\n"],"mappings":"4VAEA,OAAS,kBAAAA,MAAsB,eAC/B,OAAS,YAAAC,MAAgC,QAkCjC,OAIA,YAAAC,EAJA,OAAAC,EAIA,QAAAC,MAJA,oBAjBD,SAASC,EAAgB,CAC9B,QAAAC,EAAU,CAAC,EACX,UAAAC,EACA,MAAAC,EACA,cAAeC,CACjB,EAAyB,CACvB,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAE1C,OACER,EAAC,OAAI,UAAWS,EAAG,WAAYN,CAAS,EACtC,UAAAJ,EAACW,EAAA,CACC,cAAaL,EACb,QAAQ,QACR,aAAYD,EACZ,UAAU,cACV,QAAS,IAAMG,EAAU,CAACD,CAAM,EAEhC,SAAAP,EAACY,EAAA,CAAe,UAAU,UAAU,EACtC,EAECL,GACCN,EAAAF,EAAA,CACE,UAAAC,EAAC,OACC,UAAU,qBACV,QAAS,IAAMQ,EAAU,EAAK,EAChC,EACAR,EAAC,OAAI,UAAU,wGACZ,SAAAG,EAAQ,IAAI,CAACU,EAAQC,IACpBd,EAAC,UAEC,cAAa,GAAGM,CAAY,IAAIO,EAAO,MAAM,YAAY,EAAE,QAAQ,IAAK,GAAG,CAAC,GAC5E,UAAWH,EACT,yDACAG,EAAO,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ACE,MAAO,2BACP,eAAgBoB,EACdV,EAAW,wBACR,+BACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdV,EAAW,wBACR,+BACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,SACEA,EAAW,wBAAwB,oCAAoC,IACrE,CAACV,EAAMF,KAAW,CAChB,MAAOE,EAAK,KACZ,eAAgBoB,EACdV,EAAW,wBACR,qCAAqCZ,CAAK,GAAG,OAChDY,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdpB,EAAK,OACLU,EAAW,wBAAwB,SAAS,MAC9C,EACA,UAAWV,EAAK,oBAAsB,OACtC,QAASA,EAAK,aAAe,MAC/B,EACF,GAAK,CAAC,CACV,EACA,GAAIiB,EACA,CACE,CACE,MAAO,aACP,eAAgBG,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,eAAgBU,EACdV,EAAW,wBACR,sBACHA,EAAW,wBAAwB,SAAS,MAC9C,EACA,QACE,qIACJ,CACF,EACA,CAAC,CACP,EACA,mBAAoBtB,EACtB,EACF,EACF,EACAhC,EAAC,OAAI,UAAU,yBACb,SAAAA,EAACyD,EAAA,CACC,sBAAuBH,EAAW,wBAClC,KAAMM,EACR,EACF,EAEA5D,EAACwD,EAAA,CACC,mBAAoBF,EAAW,6BAC/B,gBAAiBA,EAAW,kBAC5B,QAASA,EAAW,QACtB,EAECK,GAAgB3D,EAAC2D,EAAA,EAAa,GACjC,CAEJ,EAzUiC","names":["MoreHorizontal","useState","Fragment","jsx","jsxs","ActionsDropdown","actions","className","label","dataSelector","isOpen","setIsOpen","useState","cn","Button","MoreHorizontal","action","index","__name","ChevronDown","Info","Flag","useState","Fragment","jsx","jsxs","FLAG_CODE_MAPPING","EstimationResultsHeader","__name","title","country","region","annualGrossSalary","onDelete","onExportPdf","onEdit","actions","Flag","ActionsDropdown","getOnboardingTimelineData","zendeskArticles","OnboardingTimeline","minimumOnboardingDays","data","className","Accordion","cn","AccordionItem","AccordionTrigger","AccordionContent","step","ZendeskTriggerButton","HiringSection","countryBenefitsUrl","countryGuideUrl","EstimationHeaders","isMultipleCurrency","EstimationRow","label","amounts","children","isOpen","setIsOpen","useState","ChevronDown","amount","index","BreakdownListItem","item","level","hasChildren","isNested","isCollapsible","BasicTooltip","Info","BreakdownList","items","EstimationResults","estimation","components","CustomHiringSection","CustomOnboardingTimeline","CustomHeader","CustomFooter","onboardingTimelineData","hasManagementFee","hasRegion","formattedSalary","formatCurrency","Card"]}
@@ -0,0 +1,2 @@
1
+ import{a as i,b as d,c as p,d as R}from"./chunk-CWEPL5J3.js";import{a as w}from"./chunk-ASKKS4Z3.js";import{a as _,b as y}from"./chunk-54KJP7WD.js";import{a as m}from"./chunk-P37U34EQ.js";import{ChevronDown as A,Globe as N}from"lucide-react";import{useState as h}from"react";import{Fragment as C,jsx as e,jsxs as r}from"react/jsx-runtime";var v=m(t=>{if(t.length<2)return{currency:null,costsPerCountry:[],employeesCost:null};let o=t[0]?.employer_currency_costs.currency,u=t.reduce((l,s)=>{let a=s.country.name;return l[a]={country:s.country,monthlyTotal:(l[a]?.monthlyTotal||0)+s.employer_currency_costs.monthly_total,annualTotal:(l[a]?.annualTotal||0)+s.employer_currency_costs.annual_total},l},{}),n=Object.values(u).map(({country:l,monthlyTotal:s,annualTotal:a})=>({country:l,monthlyCost:y(s,o.symbol),annualCost:y(a,o.symbol)})),c={monthlyTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.monthly_total,0),o.symbol),annualTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.annual_total,0),o.symbol)};return{currency:o,costsPerCountry:n,employeesCost:c}},"useSummaryResults"),f=m(({currency:t,title:o})=>e("div",{className:"RemoteFlows__SummaryResults__Header flex items-center justify-between w-full",children:r("div",{className:"RemoteFlows__SummaryHeader__Container flex flex-row items-center gap-6",children:[e("div",{className:"RemoteFlows__SummaryHeader__IconContainer flex h-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]",children:e(N,{className:"RemoteFlows__SummaryHeader__Icon h-6 w-6 text-[#000000]"})}),r("div",{className:"RemoteFlows__SummaryHeader__Content space-y-1",children:[e("h2",{className:"RemoteFlows__SummaryHeader__Title text-lg font-medium leading-none text-[#181818]",children:o}),r("p",{className:"RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]",children:["Employer billing currency: ",t.code]})]})]})}),"SummaryHeader"),g=m(({label:t,columns:o,rows:u,defaultValue:n="accordion",className:c})=>{let l=o.length===1?"grid-cols-2":"grid-cols-3";return e(i,{type:"single",collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",c),children:r(d,{value:n,className:"RemoteFlows__SummaryResults__AccordionItem border-none",children:[e(p,{className:"RemoteFlows__SummaryResults__AccordionTrigger hover:no-underline px-0 py-3 [&>svg]:hidden group",children:r("div",{className:_("RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full",l),children:[r("div",{className:"RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2",children:[t,e(A,{className:"RemoteFlows__SummaryResults__ChevronDown h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:o[0]}):o.map((s,a)=>e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:s},a))]})}),e(R,{className:"RemoteFlows__SummaryResults__AccordionContent px-0 pb-4",children:e("div",{className:"RemoteFlows__SummaryResults__AccordionRows space-y-3",children:u.map((s,a)=>r("div",{className:_("RemoteFlows__SummaryResults__AccordionRow grid items-center",l),children:[e("div",{className:"flex items-center gap-2",children:s.label}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:s.values[0]}):s.values.map((F,x)=>e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:F},x))]},a))})})]})})},"MultiColumnAccordion"),b=m(({employeesCost:t})=>e(g,{label:e("span",{className:"RemoteFlows__CostForAllEmployees__Label text-sm font-medium text-[#0F172A]",children:"Cost for all employees"}),columns:["Total cost"],rows:[{label:r(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__MonthlyLabel text-sm text-[#09090B]",children:"Monthly cost"})]}),values:[t.monthlyTotal]},{label:r(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__AnnualLabel text-sm text-[#09090B]",children:"Annual cost"})]}),values:[t.annualTotal]}],defaultValue:"cost-breakdown"}),"CostForAllEmployees"),S=m(({costsPerCountry:t})=>e(g,{label:e("span",{className:"RemoteFlows__CostsPerCountry__Label text-sm font-medium text-[#0F172A]",children:"Cost per country"}),columns:["Monthly cost","Annual cost"],rows:t.map(o=>({label:r(C,{children:[e("span",{className:"RemoteFlows__CostsPerCountry__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostsPerCountry__CountryName text-sm text-[#09090B]",children:o.country.name})]}),values:[o.monthlyCost,o.annualCost]})),defaultValue:"country-breakdown"}),"CostsPerCountry"),k=m(({estimations:t})=>{let{currency:o,costsPerCountry:u,employeesCost:n}=v(t),[c,l]=h("summary");return!o||u.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(i,{type:"single",collapsible:!0,defaultValue:c,onValueChange:l,className:"RemoteFlows__SummaryResults__Accordion w-full",children:r(d,{value:"summary",className:"RemoteFlows__SummaryResults__AccordionItem border-border",children:[e("div",{className:_("RemoteFlows__SummaryResults__AccordionTriggerContainer",{RemoteFlows__Separator:c==="summary"}),children:e(p,{iconClassName:"size-6",className:"RemoteFlows__SummaryResults__MainAccordionTrigger hover:no-underline px-0 py-4",children:e(f,{currency:o,title:"Summary Overview"})})}),r(R,{className:"RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6",children:[e("div",{className:"RemoteFlows__Separator",children:e(b,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(S,{costsPerCountry:u})})]})]})})})},"SummaryResults");export{k as a};
2
+ //# sourceMappingURL=chunk-OIBVTGB4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/CostCalculator/SummaryResults/SummaryResults.tsx"],"sourcesContent":["import { Currency } from '@/src/client';\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/src/components/ui/accordion';\nimport { Card } from '@/src/components/ui/card';\nimport { CostCalculatorEstimation } from '@/src/flows/CostCalculator/types';\nimport { cn, formatCurrency } from '@/src/lib/utils';\nimport { ChevronDown, Globe } from 'lucide-react';\nimport { useState } from 'react';\n\nconst useSummaryResults = (estimations: CostCalculatorEstimation[]) => {\n if (estimations.length < 2) {\n return {\n currency: null,\n costsPerCountry: [],\n employeesCost: null,\n };\n }\n const currency = estimations[0]?.employer_currency_costs.currency;\n const costsPerCountry = estimations.reduce(\n (acc, estimation) => {\n const countryName = estimation.country.name;\n\n acc[countryName] = {\n country: estimation.country,\n monthlyTotal:\n (acc[countryName]?.monthlyTotal || 0) +\n estimation.employer_currency_costs.monthly_total,\n annualTotal:\n (acc[countryName]?.annualTotal || 0) +\n estimation.employer_currency_costs.annual_total,\n };\n\n return acc;\n },\n {} as Record<\n string,\n {\n country: (typeof estimations)[0]['country'];\n monthlyTotal: number;\n annualTotal: number;\n }\n >,\n );\n\n const groupedCostsPerCountry = Object.values(costsPerCountry).map(\n ({ country, monthlyTotal, annualTotal }) => ({\n country,\n monthlyCost: formatCurrency(monthlyTotal, currency.symbol),\n annualCost: formatCurrency(annualTotal, currency.symbol),\n }),\n );\n\n const employeesCost = {\n monthlyTotal: formatCurrency(\n estimations.reduce((acc, estimation) => {\n return acc + estimation.employer_currency_costs.monthly_total;\n }, 0),\n currency.symbol,\n ),\n annualTotal: formatCurrency(\n estimations.reduce((acc, estimation) => {\n return acc + estimation.employer_currency_costs.annual_total;\n }, 0),\n currency.symbol,\n ),\n };\n return { currency, costsPerCountry: groupedCostsPerCountry, employeesCost };\n};\n\nconst SummaryHeader = ({\n currency,\n title,\n}: {\n currency: Currency;\n title: string;\n}) => {\n return (\n <div className='RemoteFlows__SummaryResults__Header flex items-center justify-between w-full'>\n <div className='RemoteFlows__SummaryHeader__Container flex flex-row items-center gap-6'>\n <div className='RemoteFlows__SummaryHeader__IconContainer flex h-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]'>\n <Globe className='RemoteFlows__SummaryHeader__Icon h-6 w-6 text-[#000000]' />\n </div>\n <div className='RemoteFlows__SummaryHeader__Content space-y-1'>\n <h2 className='RemoteFlows__SummaryHeader__Title text-lg font-medium leading-none text-[#181818]'>\n {title}\n </h2>\n <p className='RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]'>\n Employer billing currency: {currency.code}\n </p>\n </div>\n </div>\n </div>\n );\n};\n\nconst MultiColumnAccordion = ({\n label,\n columns,\n rows,\n defaultValue = 'accordion',\n className,\n}: {\n label: React.ReactNode;\n columns: string[];\n rows: Array<{\n label: React.ReactNode;\n values: string[];\n }>;\n defaultValue?: string;\n className?: string;\n}) => {\n const gridCols = columns.length === 1 ? 'grid-cols-2' : 'grid-cols-3';\n\n return (\n <Accordion\n type='single'\n collapsible\n defaultValue={defaultValue}\n className={cn(\n 'RemoteFlows__SummaryResults__MultiColumnAccordion w-full',\n className,\n )}\n >\n <AccordionItem\n value={defaultValue}\n className='RemoteFlows__SummaryResults__AccordionItem border-none'\n >\n <AccordionTrigger className='RemoteFlows__SummaryResults__AccordionTrigger hover:no-underline px-0 py-3 [&>svg]:hidden group'>\n <div\n className={cn(\n 'RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full',\n gridCols,\n )}\n >\n <div className='RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2'>\n {label}\n <ChevronDown className='RemoteFlows__SummaryResults__ChevronDown h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180' />\n </div>\n {columns.length === 1 ? (\n <span className='RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right'>\n {columns[0]}\n </span>\n ) : (\n columns.map((column, index) => (\n <span\n key={index}\n className='RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right'\n >\n {column}\n </span>\n ))\n )}\n </div>\n </AccordionTrigger>\n\n <AccordionContent className='RemoteFlows__SummaryResults__AccordionContent px-0 pb-4'>\n <div className='RemoteFlows__SummaryResults__AccordionRows space-y-3'>\n {rows.map((row, index) => (\n <div\n key={index}\n className={cn(\n 'RemoteFlows__SummaryResults__AccordionRow grid items-center',\n gridCols,\n )}\n >\n <div className='flex items-center gap-2'>{row.label}</div>\n {columns.length === 1 ? (\n <span className='RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right'>\n {row.values[0]}\n </span>\n ) : (\n row.values.map((value, valueIndex) => (\n <span\n key={valueIndex}\n className='RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right'\n >\n {value}\n </span>\n ))\n )}\n </div>\n ))}\n </div>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n};\n\nconst CostForAllEmployees = ({\n employeesCost,\n}: {\n employeesCost: { monthlyTotal: string; annualTotal: string };\n}) => {\n return (\n <MultiColumnAccordion\n label={\n <span className='RemoteFlows__CostForAllEmployees__Label text-sm font-medium text-[#0F172A]'>\n Cost for all employees\n </span>\n }\n columns={['Total cost']}\n rows={[\n {\n label: (\n <>\n <span className='RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0' />\n <span className='RemoteFlows__CostForAllEmployees__MonthlyLabel text-sm text-[#09090B]'>\n Monthly cost\n </span>\n </>\n ),\n values: [employeesCost.monthlyTotal],\n },\n {\n label: (\n <>\n <span className='RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0' />\n <span className='RemoteFlows__CostForAllEmployees__AnnualLabel text-sm text-[#09090B]'>\n Annual cost\n </span>\n </>\n ),\n values: [employeesCost.annualTotal],\n },\n ]}\n defaultValue='cost-breakdown'\n />\n );\n};\n\nconst CostsPerCountry = ({\n costsPerCountry,\n}: {\n costsPerCountry: Array<{\n country: { name: string };\n monthlyCost: string;\n annualCost: string;\n }>;\n}) => {\n return (\n <MultiColumnAccordion\n label={\n <span className='RemoteFlows__CostsPerCountry__Label text-sm font-medium text-[#0F172A]'>\n Cost per country\n </span>\n }\n columns={['Monthly cost', 'Annual cost']}\n rows={costsPerCountry.map((cost) => ({\n label: (\n <>\n <span className='RemoteFlows__CostsPerCountry__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0' />\n <span className='RemoteFlows__CostsPerCountry__CountryName text-sm text-[#09090B]'>\n {cost.country.name}\n </span>\n </>\n ),\n values: [cost.monthlyCost, cost.annualCost],\n }))}\n defaultValue='country-breakdown'\n />\n );\n};\n\ntype SummaryResultsProps = {\n /**\n * Array of employments to compare costs for.\n * 2 estimations required for the component to render\n */\n estimations: CostCalculatorEstimation[];\n};\n\n/**\n * Displays a summary comparison of costs across multiple estimations.\n * The component will return null if you pass less than 2 estimations.\n */\nexport const SummaryResults = ({ estimations }: SummaryResultsProps) => {\n const { currency, costsPerCountry, employeesCost } =\n useSummaryResults(estimations);\n\n const [accordionValue, setAccordionValue] = useState('summary');\n\n if (\n !currency ||\n costsPerCountry.length === 0 ||\n Object.keys(employeesCost).length === 0\n ) {\n return null;\n }\n\n return (\n <Card className='RemoteFlows__SummaryResults__Card p-10'>\n <Accordion\n type='single'\n collapsible\n defaultValue={accordionValue}\n onValueChange={setAccordionValue}\n className='RemoteFlows__SummaryResults__Accordion w-full'\n >\n <AccordionItem\n value='summary'\n className='RemoteFlows__SummaryResults__AccordionItem border-border'\n >\n <div\n className={cn(\n 'RemoteFlows__SummaryResults__AccordionTriggerContainer',\n {\n RemoteFlows__Separator: accordionValue === 'summary',\n },\n )}\n >\n <AccordionTrigger\n iconClassName='size-6'\n className='RemoteFlows__SummaryResults__MainAccordionTrigger hover:no-underline px-0 py-4'\n >\n <SummaryHeader currency={currency} title='Summary Overview' />\n </AccordionTrigger>\n </div>\n <AccordionContent className='RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6'>\n <div className='RemoteFlows__Separator'>\n <CostForAllEmployees employeesCost={employeesCost} />\n </div>\n <div className='RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6'>\n <CostsPerCountry costsPerCountry={costsPerCountry} />\n </div>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n </Card>\n );\n};\n"],"mappings":"4LAUA,OAAS,eAAAA,EAAa,SAAAC,MAAa,eACnC,OAAS,YAAAC,MAAgB,QAyEf,OA6HE,YAAAC,EA7HF,OAAAC,EAMA,QAAAC,MANA,oBAvEV,IAAMC,EAAoBC,EAACC,GAA4C,CACrE,GAAIA,EAAY,OAAS,EACvB,MAAO,CACL,SAAU,KACV,gBAAiB,CAAC,EAClB,cAAe,IACjB,EAEF,IAAMC,EAAWD,EAAY,CAAC,GAAG,wBAAwB,SACnDE,EAAkBF,EAAY,OAClC,CAACG,EAAKC,IAAe,CACnB,IAAMC,EAAcD,EAAW,QAAQ,KAEvC,OAAAD,EAAIE,CAAW,EAAI,CACjB,QAASD,EAAW,QACpB,cACGD,EAAIE,CAAW,GAAG,cAAgB,GACnCD,EAAW,wBAAwB,cACrC,aACGD,EAAIE,CAAW,GAAG,aAAe,GAClCD,EAAW,wBAAwB,YACvC,EAEOD,CACT,EACA,CAAC,CAQH,EAEMG,EAAyB,OAAO,OAAOJ,CAAe,EAAE,IAC5D,CAAC,CAAE,QAAAK,EAAS,aAAAC,EAAc,YAAAC,CAAY,KAAO,CAC3C,QAAAF,EACA,YAAaG,EAAe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E,4BAEzF,EAEF,QAAS,CAAC,eAAgB,aAAa,EACvC,KAAMM,EAAgB,IAAKiC,IAAU,CACnC,MACEtC,EAAAF,EAAA,CACE,UAAAC,EAAC,QAAK,UAAU,uFAAuF,EACvGA,EAAC,QAAK,UAAU,mEACb,SAAAuC,EAAK,QAAQ,KAChB,GACF,EAEF,OAAQ,CAACA,EAAK,YAAaA,EAAK,UAAU,CAC5C,EAAE,EACF,aAAa,oBACf,EA7BoB,mBA6CXC,EAAiBrC,EAAA,CAAC,CAAE,YAAAC,CAAY,IAA2B,CACtE,GAAM,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,cAAAS,CAAc,EAC/Cb,EAAkBE,CAAW,EAEzB,CAACqC,EAAgBC,CAAiB,EAAIC,EAAS,SAAS,EAE9D,MACE,CAACtC,GACDC,EAAgB,SAAW,GAC3B,OAAO,KAAKS,CAAa,EAAE,SAAW,EAE/B,KAIPf,EAAC4C,EAAA,CAAK,UAAU,yCACd,SAAA5C,EAAC0B,EAAA,CACC,KAAK,SACL,YAAW,GACX,aAAce,EACd,cAAeC,EACf,UAAU,gDAEV,SAAAzC,EAAC2B,EAAA,CACC,MAAM,UACN,UAAU,2DAEV,UAAA5B,EAAC,OACC,UAAW2B,EACT,yDACA,CACE,uBAAwBc,IAAmB,SAC7C,CACF,EAEA,SAAAzC,EAAC6B,EAAA,CACC,cAAc,SACd,UAAU,iFAEV,SAAA7B,EAACgB,EAAA,CAAc,SAAUX,EAAU,MAAM,mBAAmB,EAC9D,EACF,EACAJ,EAACgC,EAAA,CAAiB,UAAU,mEAC1B,UAAAjC,EAAC,OAAI,UAAU,yBACb,SAAAA,EAACqC,EAAA,CAAoB,cAAetB,EAAe,EACrD,EACAf,EAAC,OAAI,UAAU,6DACb,SAAAA,EAACsC,EAAA,CAAgB,gBAAiBhC,EAAiB,EACrD,GACF,GACF,EACF,EACF,CAEJ,EAtD8B","names":["ChevronDown","Globe","useState","Fragment","jsx","jsxs","useSummaryResults","__name","estimations","currency","costsPerCountry","acc","estimation","countryName","groupedCostsPerCountry","country","monthlyTotal","annualTotal","formatCurrency","employeesCost","SummaryHeader","title","Globe","MultiColumnAccordion","label","columns","rows","defaultValue","className","gridCols","Accordion","cn","AccordionItem","AccordionTrigger","ChevronDown","column","index","AccordionContent","row","value","valueIndex","CostForAllEmployees","CostsPerCountry","cost","SummaryResults","accordionValue","setAccordionValue","useState","Card"]}
@@ -1,2 +1,2 @@
1
- import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-7VUILYZ3.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as c}from"./chunk-3LOVCTCN.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function R({children:e,...t}){let{form:r,formId:n,costCalculatorBag:s}=l(),{components:f}=i(),m=f?.button;return m?a(m,{...t,type:"reset",form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e}):a(C,{...t,type:"reset",className:c("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e})}u(R,"CostCalculatorResetButton");export{R as a};
2
- //# sourceMappingURL=chunk-7EI4E76I.js.map
1
+ import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-2QGDCMCE.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as c}from"./chunk-54KJP7WD.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function R({children:e,...t}){let{form:r,formId:n,costCalculatorBag:s}=l(),{components:f}=i(),m=f?.button;return m?a(m,{...t,type:"reset",form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e}):a(C,{...t,type:"reset",className:c("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e})}u(R,"CostCalculatorResetButton");export{R as a};
2
+ //# sourceMappingURL=chunk-OJNWWRD5.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-E5PSJ75C.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-QW4JPW6J.js";import{a as u}from"./chunk-5ISPIMTZ.js";import{a as g,b as V}from"./chunk-INC2YFDP.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-3LOVCTCN.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({fields:{risk_assesment_info:f("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",U(Z,{children:["In most cases, we must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",K(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
2
- //# sourceMappingURL=chunk-AHUK7NSK.js.map
1
+ import{a as S}from"./chunk-E5PSJ75C.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-7XRPOR7L.js";import{a as u}from"./chunk-A76UTPRW.js";import{a as g,b as V}from"./chunk-MDQ6YJMV.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({fields:{risk_assesment_info:f("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",U(Z,{children:["In most cases, we must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",K(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
2
+ //# sourceMappingURL=chunk-OZCQ6AOF.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-XJVYASHX.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as o}from"./chunk-5ISPIMTZ.js";import{b as i}from"./chunk-7VUILYZ3.js";import{b as r}from"./chunk-3LOVCTCN.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
- //# sourceMappingURL=chunk-RM3HE733.js.map
1
+ import{a as l}from"./chunk-QFZ3XVDT.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as o}from"./chunk-A76UTPRW.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as r}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
+ //# sourceMappingURL=chunk-PLWXRCGQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-3LOVCTCN.js";import{a as o}from"./chunk-P37U34EQ.js";import*as r from"@radix-ui/react-separator";import{jsx as p}from"react/jsx-runtime";function m({className:a,orientation:i="horizontal",decorative:e=!0,...n}){return p(r.Root,{"data-slot":"separator-root",decorative:e,orientation:i,className:t("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...n})}o(m,"Separator");export{m as a};
2
- //# sourceMappingURL=chunk-XJVYASHX.js.map
1
+ import{a as t}from"./chunk-54KJP7WD.js";import{a as o}from"./chunk-P37U34EQ.js";import*as r from"@radix-ui/react-separator";import{jsx as p}from"react/jsx-runtime";function m({className:a,orientation:i="horizontal",decorative:e=!0,...n}){return p(r.Root,{"data-slot":"separator-root",decorative:e,orientation:i,className:t("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...n})}o(m,"Separator");export{m as a};
2
+ //# sourceMappingURL=chunk-QFZ3XVDT.js.map
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-WVJDCDGZ.js";import{d as F,e as C,h as g,i as S,j,l as w,m as v,o as E,q as O,r as q,s as P,u as x,v as V,w as M,z as k}from"./chunk-E3QWREZF.js";import{b as U}from"./chunk-Z5WMKCRJ.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-PAQW5BFW.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as p,modify as d}from"@remoteoss/json-schema-form";import{useMutation as m,useQuery as f}from"@tanstack/react-query";var $=n(t=>{let{client:r}=a();return f({queryKey:["employment",t],retry:!1,enabled:!!t,select:n(({data:e})=>e?.data.employment,"select"),queryFn:n(async()=>{let e=await q({client:r,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn")})},"useEmployment"),ee=n(t=>{let{client:r}=a();return f({queryKey:["company",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let e=await v({client:r,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn"),select:n(({data:e})=>e.data.company,"select")})},"useCompany"),te=n(t=>{let{client:r}=a();return f({queryKey:["benefit-offers",t],retry:!1,enabled:!!t,queryFn:n(async()=>g({client:r,path:{employment_id:t}}).then(e=>{if(e.error||!e.data)throw new Error("Failed to fetch benefit offers data");return e}),"queryFn"),select:n(({data:e})=>e?.data?.reduce((o,s)=>({...o,[s.benefit_group.slug]:{value:s.benefit_tier?.slug??"no",...s.benefit_group?.filter?.slug?{filter:s.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),ne=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>k({client:t,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),re=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>w({client:t,body:r}),"mutationFn")})},"useCreateReserveInvoice"),oe=n(({countryCode:t,form:r,fieldValues:e,options:o,query:s={}})=>{let{client:i}=a(),c=o?.jsonSchemaVersion?.form_schema?.[r]?{json_schema_version:o.jsonSchemaVersion.form_schema[r]}:{};return f({queryKey:["onboarding-json-schema-form",t,r],retry:!1,queryFn:n(async()=>{let l=await E({client:i,headers:{Authorization:""},path:{country_code:t,form:r},query:{skip_benefits:!0,...s,...c}});if(l.error||!l.data)throw new Error("Failed to fetch onboarding schema");return l},"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:l})=>{let u=l?.data||{};if(o&&o.jsfModify){let{schema:y}=d(u,o.jsfModify);u=y}let z=U(u.properties||{},"money").reduce((y,_)=>(y[_]=b(e[_]),y),{}),A={...e,...z};return{meta:{"x-jsf-fieldsets":u["x-jsf-fieldsets"]},...p(u,{initialValues:A})}},"select")})},"useJSONSchemaForm"),se=n((t,r,e)=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:s}=a();return f({queryKey:["benefit-offers-schema",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let i=await O({client:s,path:{employment_id:t},query:o});if(i.error||!i.data)throw new Error("Failed to fetch benefit offers schema");return i},"queryFn"),select:n(({data:i})=>{let c=i?.data?.schema||{};if(e&&e.jsfModify?.benefits){let{schema:h}=d(c,e.jsfModify.benefits);c=h}let l=Object.keys(r).length>0;return p(c,{initialValues:l?{...r}:{}})},"select")})},"useBenefitOffersSchema"),ae=n(t=>{let{client:r}=a(),e=t?.jsonSchemaVersion?.form_schema?.employment_basic_information?{json_schema_version:t.jsonSchemaVersion.form_schema.employment_basic_information}:{};return m({mutationFn:n(o=>C({client:r,headers:{Authorization:""},body:o,query:{...e}}),"mutationFn")})},"useCreateEmployment"),ie=n(t=>{let{client:r}=a(),e={employment_basic_information_json_schema_version:t?.jsonSchemaVersion?.form_schema?.employment_basic_information,employment_contract_details_json_schema_version:t?.jsonSchemaVersion?.form_schema?.contract_details},o=Object.fromEntries(Object.entries(e).filter(([,s])=>s!==void 0));return m({mutationFn:n(({employmentId:s,...i})=>P({client:r,headers:{Authorization:""},body:i,path:{employment_id:s},query:{skip_benefits:!0,...o}}),"mutationFn")})},"useUpdateEmployment"),me=n(t=>{let{client:r}=a();return m({mutationFn:n(({employmentId:e,...o})=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{};return S({client:r,body:o,path:{employment_id:e},query:{...s}})},"mutationFn")})},"useUpdateBenefitsOffers"),ce=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>j({client:t,headers:{Authorization:""},body:r}),"mutationFn")})},"useMagicLink"),B=n(t=>{let{client:r}=a();return f({...t,queryKey:["countries"],retry:!1,queryFn:n(async()=>{let e=await V({client:r,headers:{Authorization:""}});if(e.error||!e.data)throw new Error("Failed to fetch supported countries");return e},"queryFn"),select:n(({data:e})=>e?.data?.filter(o=>o.eor_onboarding).map(o=>({label:o.name,value:o.code}))||[],"select")})},"useCountries"),le=n(t=>{let{data:r,isLoading:e}=B(t?.queryOptions),{schema:o}=d(R.data.schema,t?.jsfModify||{}),s=p(o);if(r){let i=s.fields.find(c=>c.name==="country");i&&(i.options=r)}return{isLoading:e,selectCountryForm:s}},"useCountriesSchemaField"),ue=n(({type:t="spread"})=>{let{client:r}=a();return m({mutationFn:n(e=>(t==="no_spread"?F:M)({client:r,body:e}),"mutationFn")})},"useConvertCurrency"),fe=n(()=>{let{client:t}=a();return m({mutationFn:n(({employmentId:r,...e})=>x({client:t,path:{employment_id:r},body:e}),"mutationFn")})},"useUpsertContractEligibility");export{$ as a,ee as b,te as c,ne as d,re as e,oe as f,se as g,ae as h,ie as i,me as j,ce as k,le as l,ue as m,fe as n};
2
- //# sourceMappingURL=chunk-AS6DCKEJ.js.map
1
+ import{a as R}from"./chunk-WVJDCDGZ.js";import{A as k,d as F,e as C,h as g,i as S,j,l as w,m as v,o as E,q as O,r as q,s as P,u as x,v as V,x as M}from"./chunk-FHHAGWU5.js";import{b as U}from"./chunk-Z5WMKCRJ.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-PAQW5BFW.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as p,modify as d}from"@remoteoss/json-schema-form";import{useMutation as m,useQuery as f}from"@tanstack/react-query";var $=n(t=>{let{client:r}=a();return f({queryKey:["employment",t],retry:!1,enabled:!!t,select:n(({data:e})=>e?.data.employment,"select"),queryFn:n(async()=>{let e=await q({client:r,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn")})},"useEmployment"),ee=n(t=>{let{client:r}=a();return f({queryKey:["company",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let e=await v({client:r,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn"),select:n(({data:e})=>e.data.company,"select")})},"useCompany"),te=n(t=>{let{client:r}=a();return f({queryKey:["benefit-offers",t],retry:!1,enabled:!!t,queryFn:n(async()=>g({client:r,path:{employment_id:t}}).then(e=>{if(e.error||!e.data)throw new Error("Failed to fetch benefit offers data");return e}),"queryFn"),select:n(({data:e})=>e?.data?.reduce((o,s)=>({...o,[s.benefit_group.slug]:{value:s.benefit_tier?.slug??"no",...s.benefit_group?.filter?.slug?{filter:s.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),ne=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>k({client:t,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),re=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>w({client:t,body:r}),"mutationFn")})},"useCreateReserveInvoice"),oe=n(({countryCode:t,form:r,fieldValues:e,options:o,query:s={}})=>{let{client:i}=a(),c=o?.jsonSchemaVersion?.form_schema?.[r]?{json_schema_version:o.jsonSchemaVersion.form_schema[r]}:{};return f({queryKey:["onboarding-json-schema-form",t,r],retry:!1,queryFn:n(async()=>{let l=await E({client:i,headers:{Authorization:""},path:{country_code:t,form:r},query:{skip_benefits:!0,...s,...c}});if(l.error||!l.data)throw new Error("Failed to fetch onboarding schema");return l},"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:l})=>{let u=l?.data||{};if(o&&o.jsfModify){let{schema:y}=d(u,o.jsfModify);u=y}let z=U(u.properties||{},"money").reduce((y,_)=>(y[_]=b(e[_]),y),{}),A={...e,...z};return{meta:{"x-jsf-fieldsets":u["x-jsf-fieldsets"]},...p(u,{initialValues:A})}},"select")})},"useJSONSchemaForm"),se=n((t,r,e)=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:s}=a();return f({queryKey:["benefit-offers-schema",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let i=await O({client:s,path:{employment_id:t},query:o});if(i.error||!i.data)throw new Error("Failed to fetch benefit offers schema");return i},"queryFn"),select:n(({data:i})=>{let c=i?.data?.schema||{};if(e&&e.jsfModify?.benefits){let{schema:h}=d(c,e.jsfModify.benefits);c=h}let l=Object.keys(r).length>0;return p(c,{initialValues:l?{...r}:{}})},"select")})},"useBenefitOffersSchema"),ae=n(t=>{let{client:r}=a(),e=t?.jsonSchemaVersion?.form_schema?.employment_basic_information?{json_schema_version:t.jsonSchemaVersion.form_schema.employment_basic_information}:{};return m({mutationFn:n(o=>C({client:r,headers:{Authorization:""},body:o,query:{...e}}),"mutationFn")})},"useCreateEmployment"),ie=n(t=>{let{client:r}=a(),e={employment_basic_information_json_schema_version:t?.jsonSchemaVersion?.form_schema?.employment_basic_information,employment_contract_details_json_schema_version:t?.jsonSchemaVersion?.form_schema?.contract_details},o=Object.fromEntries(Object.entries(e).filter(([,s])=>s!==void 0));return m({mutationFn:n(({employmentId:s,...i})=>P({client:r,headers:{Authorization:""},body:i,path:{employment_id:s},query:{skip_benefits:!0,...o}}),"mutationFn")})},"useUpdateEmployment"),me=n(t=>{let{client:r}=a();return m({mutationFn:n(({employmentId:e,...o})=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{};return S({client:r,body:o,path:{employment_id:e},query:{...s}})},"mutationFn")})},"useUpdateBenefitsOffers"),ce=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>j({client:t,headers:{Authorization:""},body:r}),"mutationFn")})},"useMagicLink"),B=n(t=>{let{client:r}=a();return f({...t,queryKey:["countries"],retry:!1,queryFn:n(async()=>{let e=await V({client:r,headers:{Authorization:""}});if(e.error||!e.data)throw new Error("Failed to fetch supported countries");return e},"queryFn"),select:n(({data:e})=>e?.data?.filter(o=>o.eor_onboarding).map(o=>({label:o.name,value:o.code}))||[],"select")})},"useCountries"),le=n(t=>{let{data:r,isLoading:e}=B(t?.queryOptions),{schema:o}=d(R.data.schema,t?.jsfModify||{}),s=p(o);if(r){let i=s.fields.find(c=>c.name==="country");i&&(i.options=r)}return{isLoading:e,selectCountryForm:s}},"useCountriesSchemaField"),ue=n(({type:t="spread"})=>{let{client:r}=a();return m({mutationFn:n(e=>(t==="no_spread"?F:M)({client:r,body:e}),"mutationFn")})},"useConvertCurrency"),fe=n(()=>{let{client:t}=a();return m({mutationFn:n(({employmentId:r,...e})=>x({client:t,path:{employment_id:r},body:e}),"mutationFn")})},"useUpsertContractEligibility");export{$ as a,ee as b,te as c,ne as d,re as e,oe as f,se as g,ae as h,ie as i,me as j,ce as k,le as l,ue as m,fe as n};
2
+ //# sourceMappingURL=chunk-QGGKDM3N.js.map