@remoteoss/remote-flows 1.11.0 → 1.13.0

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 (420) hide show
  1. package/dist/ButtonDefault-C5BX67YU.js +2 -0
  2. package/dist/CheckboxFieldDefault-HEIDOSI7.js +2 -0
  3. package/dist/CountryFieldDefault-BBMP6LHE.js +2 -0
  4. package/dist/DatePickerFieldDefault-LBR6A7BF.js +2 -0
  5. package/dist/DrawerDefault-I7PMYMPK.js +2 -0
  6. package/dist/EmailFieldDefault-T7YHR6EN.js +2 -0
  7. package/dist/FieldsetToggleButtonDefault-4JT4HGZ5.js +2 -0
  8. package/dist/FileUploadFieldDefault-66JYQDRY.js +2 -0
  9. package/dist/MultiSelectFieldDefault-ZECWDTTO.js +2 -0
  10. package/dist/NumberFieldDefault-IOL6KD5M.js +2 -0
  11. package/dist/PDFPreviewDefault-LVWCRQ6A.js +2 -0
  12. package/dist/RadioGroupFieldDefault-5GHWP2P6.js +2 -0
  13. package/dist/SelectFieldDefault-HYT2DRK4.js +2 -0
  14. package/dist/StatementDefault-HUOZEIEC.js +2 -0
  15. package/dist/TableFieldDefault-OACG7RGJ.js +2 -0
  16. package/dist/TextAreaFieldDefault-KCPQWVZX.js +2 -0
  17. package/dist/TextFieldDefault-MUGUO7GT.js +2 -0
  18. package/dist/WorkScheduleFieldDefault-CHW2ODQK.js +2 -0
  19. package/dist/ZendeskDrawerDefault-NYESVAZM.js +2 -0
  20. package/dist/{chunk-QPJFFMXN.js → chunk-2DCJODMR.js} +2 -2
  21. package/dist/chunk-2PUPF2EN.js +2 -0
  22. package/dist/chunk-2PUPF2EN.js.map +1 -0
  23. package/dist/{chunk-SBUJLXJH.js → chunk-32EHLWZC.js} +2 -2
  24. package/dist/chunk-3I3XSAYV.js +2 -0
  25. package/dist/chunk-3I3XSAYV.js.map +1 -0
  26. package/dist/{chunk-NB3TN7O3.js → chunk-3KS3MSNS.js} +2 -2
  27. package/dist/{chunk-J63QA2JC.js → chunk-3PIJOIYR.js} +2 -2
  28. package/dist/{chunk-XSNWW3V4.js → chunk-3PVZEAGI.js} +2 -2
  29. package/dist/{chunk-CMFZEZEK.js → chunk-46QJ44CZ.js} +2 -2
  30. package/dist/{chunk-4ECYU3L5.js → chunk-4AM73KSF.js} +2 -2
  31. package/dist/{chunk-PKXMKBP4.js → chunk-4DZWRQWY.js} +2 -2
  32. package/dist/{chunk-YUYHK6WD.js → chunk-4YPJKEHT.js} +2 -2
  33. package/dist/{chunk-QE76JNNE.js → chunk-4ZQ7NOAL.js} +2 -2
  34. package/dist/{chunk-4JIHEEKX.js → chunk-5GAFQRDA.js} +2 -2
  35. package/dist/{chunk-5PVNZ6VO.js → chunk-5NZJD6CA.js} +2 -2
  36. package/dist/{chunk-WQSCAHR6.js → chunk-5R66NDTQ.js} +2 -2
  37. package/dist/{chunk-XJILW6K3.js → chunk-66PXQJK6.js} +2 -2
  38. package/dist/{chunk-XZLVP6EN.js → chunk-6VQEAU6A.js} +2 -2
  39. package/dist/{chunk-4APMRCE7.js → chunk-6YEAHKT6.js} +2 -2
  40. package/dist/{chunk-7G4JI6ZU.js → chunk-7S2QQQDH.js} +2 -2
  41. package/dist/{chunk-4XJEVGPI.js → chunk-7SVSJ7NG.js} +2 -2
  42. package/dist/{chunk-BDJLITVT.js → chunk-AA3QOH66.js} +2 -2
  43. package/dist/{chunk-XNRPT3WP.js → chunk-AFJIZDZG.js} +2 -2
  44. package/dist/{chunk-6SVKW2DC.js → chunk-AMWQ5P7T.js} +2 -2
  45. package/dist/{chunk-GK3QRXNY.js → chunk-APFUKV75.js} +2 -2
  46. package/dist/{chunk-CCE3EAVC.js → chunk-AS4ND5IO.js} +2 -2
  47. package/dist/{chunk-64D4GLTO.js → chunk-ATPZXVQD.js} +2 -2
  48. package/dist/{chunk-GZ2JKPBY.js → chunk-BBOEQU3O.js} +2 -2
  49. package/dist/{chunk-ERPXDFKC.js → chunk-BDMCADQ6.js} +2 -2
  50. package/dist/{chunk-XYO67D3V.js → chunk-BDNJNMR5.js} +2 -2
  51. package/dist/{chunk-DAE2FMZ5.js → chunk-BUVW6LTT.js} +2 -2
  52. package/dist/{chunk-PJ6ZEFWD.js → chunk-BYX2YS2B.js} +3 -3
  53. package/dist/chunk-BYX2YS2B.js.map +1 -0
  54. package/dist/{chunk-GRWTCP42.js → chunk-CD6F3H7B.js} +2 -2
  55. package/dist/{chunk-PV7FROZ7.js → chunk-CU3WQ2KN.js} +2 -2
  56. package/dist/{chunk-GWR2JBG2.js → chunk-D5NBOIPS.js} +2 -2
  57. package/dist/{chunk-EGDWVDXM.js → chunk-D67Z4NEP.js} +2 -2
  58. package/dist/{chunk-NVX4O45S.js → chunk-DBUX7M4A.js} +2 -2
  59. package/dist/{chunk-C36DEJTU.js → chunk-DT72SNYW.js} +2 -2
  60. package/dist/{chunk-U7MQPLGK.js → chunk-EASVLA7B.js} +2 -2
  61. package/dist/chunk-EM5VOM56.js +2 -0
  62. package/dist/chunk-EM5VOM56.js.map +1 -0
  63. package/dist/{chunk-L53XOWY6.js → chunk-FBE7F5HU.js} +2 -2
  64. package/dist/{chunk-2YNDS45E.js → chunk-FI2MVRZR.js} +2 -2
  65. package/dist/{chunk-3LZR4D3V.js → chunk-FJMBBAVQ.js} +2 -2
  66. package/dist/chunk-FKLBLQIH.js +2 -0
  67. package/dist/chunk-FKLBLQIH.js.map +1 -0
  68. package/dist/{chunk-JZWOMKR3.js → chunk-GOOMCQBE.js} +2 -2
  69. package/dist/{chunk-2RBFD5MM.js → chunk-GRHZMIP5.js} +2 -2
  70. package/dist/{chunk-I3KFOOF6.js → chunk-GVK4VLLD.js} +2 -2
  71. package/dist/{chunk-5FUJICAO.js → chunk-H2PKQ3ML.js} +2 -2
  72. package/dist/{chunk-JAHRIQVL.js → chunk-HMMFY4PV.js} +2 -2
  73. package/dist/{chunk-FUPQCC4B.js → chunk-ILH332UR.js} +2 -2
  74. package/dist/{chunk-THBDZR3D.js → chunk-IRVF252A.js} +2 -2
  75. package/dist/{chunk-XDILBY5Y.js → chunk-IUCFOQAD.js} +2 -2
  76. package/dist/{chunk-XSUQM562.js → chunk-IVY2QYWG.js} +2 -2
  77. package/dist/{chunk-UNBAXL4W.js → chunk-JEULZR34.js} +2 -2
  78. package/dist/{chunk-KESYJ5QG.js → chunk-JJEFWMLY.js} +2 -2
  79. package/dist/{chunk-7V3YVPIK.js → chunk-KCTY6YAP.js} +2 -2
  80. package/dist/{chunk-55QKFWY5.js → chunk-L5VZ3XT7.js} +2 -2
  81. package/dist/{chunk-43RCLG2R.js → chunk-LWGNRGU3.js} +2 -2
  82. package/dist/{chunk-SUWJZ3QR.js → chunk-M4X3WYJY.js} +2 -2
  83. package/dist/{chunk-Z4JMMKSU.js → chunk-MCGUHRQL.js} +2 -2
  84. package/dist/{chunk-VNN6IP6P.js → chunk-MPYZD3SN.js} +2 -2
  85. package/dist/{chunk-QSOCKFUS.js → chunk-N2UBBJBK.js} +2 -2
  86. package/dist/{chunk-3JQROVRG.js → chunk-NHJT3DJU.js} +2 -2
  87. package/dist/{chunk-WOW74M7R.js → chunk-NWWR6SBR.js} +2 -2
  88. package/dist/{chunk-H5LGAIMM.js → chunk-O3XMCNHE.js} +2 -2
  89. package/dist/{chunk-XJDX3ZH6.js → chunk-O5ENJKI6.js} +2 -2
  90. package/dist/{chunk-4V6AV3DC.js → chunk-OCTMRR2C.js} +2 -2
  91. package/dist/{chunk-GINFFWVY.js → chunk-OJ3HJ7QL.js} +2 -2
  92. package/dist/{chunk-AU376LE2.js → chunk-OK3CYSHV.js} +2 -2
  93. package/dist/{chunk-7EMWT6EU.js → chunk-OPWMRKZP.js} +2 -2
  94. package/dist/{chunk-TXVEFBFM.js → chunk-OV7TLEE6.js} +2 -2
  95. package/dist/{chunk-4YAFRXR5.js → chunk-PTNHB5BY.js} +2 -2
  96. package/dist/{chunk-BHXCYFC4.js → chunk-Q7JVXGC6.js} +2 -2
  97. package/dist/{chunk-3KD533T6.js → chunk-QIBRRCQX.js} +2 -2
  98. package/dist/{chunk-GTJMTF2R.js → chunk-RM7W6QA7.js} +2 -2
  99. package/dist/{chunk-N6XY7NC3.js → chunk-RN6B2HER.js} +2 -2
  100. package/dist/{chunk-KFWZDRDD.js → chunk-RQRODRCR.js} +2 -2
  101. package/dist/chunk-SATHKK5B.js +2 -0
  102. package/dist/chunk-SATHKK5B.js.map +1 -0
  103. package/dist/{chunk-RBJ5MFDE.js → chunk-T7CGGZOK.js} +2 -2
  104. package/dist/{chunk-ZWO4HX27.js → chunk-TRR7P5XQ.js} +2 -2
  105. package/dist/{chunk-HYVK643F.js → chunk-TZCNONDA.js} +2 -2
  106. package/dist/{chunk-UFTA5ATE.js → chunk-UTNKUPL5.js} +2 -2
  107. package/dist/{chunk-SIP2BFZJ.js → chunk-UVAK3ZEO.js} +2 -2
  108. package/dist/{chunk-2O6Z2KGG.js → chunk-UXHMIIOB.js} +2 -2
  109. package/dist/{chunk-VH4D3E42.js → chunk-UXP2IITO.js} +2 -2
  110. package/dist/{chunk-NIQXQZ6X.js → chunk-W2PJUNWX.js} +2 -2
  111. package/dist/{chunk-6MJ5MIUI.js → chunk-W5EXVAEO.js} +2 -2
  112. package/dist/{chunk-GOEEA34E.js → chunk-WLMHGJWB.js} +2 -2
  113. package/dist/{chunk-G6BR4JI6.js → chunk-WQYW6TGP.js} +2 -2
  114. package/dist/{chunk-6AXMBMQI.js → chunk-WROEWNZE.js} +2 -2
  115. package/dist/chunk-X6ZAR7ZL.js +2 -0
  116. package/dist/chunk-X6ZAR7ZL.js.map +1 -0
  117. package/dist/{chunk-Q445EJX6.js → chunk-XY2IEZHC.js} +2 -2
  118. package/dist/{chunk-QLB4FSLX.js → chunk-XZLBYJZJ.js} +2 -2
  119. package/dist/{chunk-LGIHVJA5.js → chunk-Y7GCA66L.js} +2 -2
  120. package/dist/chunk-Y7QMIMYP.js +2 -0
  121. package/dist/chunk-Y7QMIMYP.js.map +1 -0
  122. package/dist/{chunk-A3TXUJUO.js → chunk-YA2G4A3K.js} +2 -2
  123. package/dist/{chunk-E7JOGKEV.js → chunk-YAJCRUQL.js} +2 -2
  124. package/dist/{chunk-2Q57B73D.js → chunk-ZIXR3VSB.js} +2 -2
  125. package/dist/{chunk-4XV4INW5.js → chunk-ZKS7DJDT.js} +2 -2
  126. package/dist/{chunk-MIK6GCO2.js → chunk-ZPDZ6V5R.js} +2 -2
  127. package/dist/{chunk-UAACHXXX.js → chunk-ZPG6GRAX.js} +2 -2
  128. package/dist/{chunk-H5CNWMEM.js → chunk-ZSJ6YADQ.js} +2 -2
  129. package/dist/{chunk-IVUCPXEC.js → chunk-ZZJPAKGP.js} +2 -2
  130. package/dist/default-components.d.ts +2 -2
  131. package/dist/default-components.js +1 -1
  132. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  133. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  134. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  135. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  136. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  137. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  138. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  139. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  140. package/dist/flows/ContractAmendment/hooks.js +1 -1
  141. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  142. package/dist/flows/ContractAmendment/index.js +1 -1
  143. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  144. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  145. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +7 -7
  146. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  147. package/dist/flows/ContractorOnboarding/api.d.ts +55 -7
  148. package/dist/flows/ContractorOnboarding/api.js +1 -1
  149. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  150. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  151. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +7 -7
  152. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  153. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  154. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  155. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.js +1 -1
  156. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +7 -7
  157. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  158. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -6
  159. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  160. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +23 -0
  161. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +2 -0
  162. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js.map +1 -0
  163. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  164. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  165. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +7 -7
  166. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  167. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  168. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  169. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
  170. package/dist/flows/ContractorOnboarding/context.d.ts +24 -8
  171. package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -6
  172. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  173. package/dist/flows/ContractorOnboarding/index.d.ts +7 -7
  174. package/dist/flows/ContractorOnboarding/index.js +1 -1
  175. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +7 -7
  176. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  177. package/dist/flows/ContractorOnboarding/types.d.ts +6 -6
  178. package/dist/flows/ContractorOnboarding/utils.d.ts +36 -4
  179. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  180. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  181. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  182. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  183. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  184. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  185. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  186. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  187. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  188. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  189. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  190. package/dist/flows/CostCalculator/api.d.ts +2 -2
  191. package/dist/flows/CostCalculator/api.js +1 -1
  192. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  193. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  194. package/dist/flows/CostCalculator/context.d.ts +3 -3
  195. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  196. package/dist/flows/CostCalculator/hooks.js +1 -1
  197. package/dist/flows/CostCalculator/index.d.ts +3 -3
  198. package/dist/flows/CostCalculator/index.js +1 -1
  199. package/dist/flows/CostCalculator/types.d.ts +2 -2
  200. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  201. package/dist/flows/CostCalculator/utils.js +1 -1
  202. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  203. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  204. package/dist/flows/Onboarding/api.d.ts +4 -4
  205. package/dist/flows/Onboarding/api.js +1 -1
  206. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  207. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  208. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  209. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  210. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  211. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  212. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  213. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  214. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  215. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  216. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  217. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  218. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  219. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  220. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  221. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  222. package/dist/flows/Onboarding/context.d.ts +5 -5
  223. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  224. package/dist/flows/Onboarding/hooks.js +1 -1
  225. package/dist/flows/Onboarding/index.d.ts +4 -4
  226. package/dist/flows/Onboarding/index.js +1 -1
  227. package/dist/flows/Onboarding/types.d.ts +4 -4
  228. package/dist/flows/Onboarding/utils.d.ts +4 -4
  229. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  230. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  231. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  232. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  233. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  234. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  235. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  236. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  237. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  238. package/dist/flows/Termination/TerminationFlow.js +1 -1
  239. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  240. package/dist/flows/Termination/TerminationForm.js +1 -1
  241. package/dist/flows/Termination/api.d.ts +5 -5
  242. package/dist/flows/Termination/api.js +1 -1
  243. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
  244. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  245. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  246. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  247. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  248. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  249. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  250. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  251. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  252. package/dist/flows/Termination/context.d.ts +4 -4
  253. package/dist/flows/Termination/hooks.d.ts +4 -4
  254. package/dist/flows/Termination/hooks.js +1 -1
  255. package/dist/flows/Termination/index.d.ts +6 -6
  256. package/dist/flows/Termination/index.js +1 -1
  257. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  258. package/dist/flows/Termination/types.d.ts +4 -4
  259. package/dist/flows/Termination/utils.d.ts +4 -4
  260. package/dist/flows/Termination/utils.js +1 -1
  261. package/dist/flows/types.d.ts +2 -2
  262. package/dist/index.d.ts +10 -10
  263. package/dist/index.js +2 -2
  264. package/dist/index.js.map +1 -1
  265. package/dist/internals.d.ts +3 -3
  266. package/dist/internals.js +1 -1
  267. package/dist/{mutations-CSKL2ADz.d.ts → mutations-DD5sJUOe.d.ts} +1 -1
  268. package/dist/{remoteFlows-8JqicJKg.d.ts → remoteFlows-XefHitC9.d.ts} +1 -1
  269. package/dist/{types-ixtOeG_U.d.ts → types-A0hYlRII.d.ts} +2 -2
  270. package/dist/{types-P-Kidj6s.d.ts → types-CUjmrc0L.d.ts} +5 -5
  271. package/dist/{types-Ch9BHKQe.d.ts → types-CVZaJm8w.d.ts} +1 -1
  272. package/dist/{types-BL_cUn9Q.d.ts → types-PBjnmC_s.d.ts} +50 -9
  273. package/dist/{types.gen-BBKMFRSu.d.ts → types.gen-BGBO30Fw.d.ts} +66 -1
  274. package/dist/{utils-Cfo-6z-L.d.ts → utils-YCgjlF1V.d.ts} +1 -1
  275. package/package.json +1 -1
  276. package/dist/ButtonDefault-W7RPNNTH.js +0 -2
  277. package/dist/CheckboxFieldDefault-JXZ6UY5T.js +0 -2
  278. package/dist/CountryFieldDefault-V7LUYGQV.js +0 -2
  279. package/dist/DatePickerFieldDefault-OMSU42DG.js +0 -2
  280. package/dist/DrawerDefault-V3GEL6Z5.js +0 -2
  281. package/dist/EmailFieldDefault-A3D5VQPS.js +0 -2
  282. package/dist/FieldsetToggleButtonDefault-BKIDTISL.js +0 -2
  283. package/dist/FileUploadFieldDefault-OQ4FGPDM.js +0 -2
  284. package/dist/MultiSelectFieldDefault-EZA25KXD.js +0 -2
  285. package/dist/NumberFieldDefault-BDSRZWXH.js +0 -2
  286. package/dist/PDFPreviewDefault-TV775MOQ.js +0 -2
  287. package/dist/RadioGroupFieldDefault-4IA7HESJ.js +0 -2
  288. package/dist/SelectFieldDefault-3XQ5FPO2.js +0 -2
  289. package/dist/StatementDefault-CCLTSJLJ.js +0 -2
  290. package/dist/TableFieldDefault-ADKV3M23.js +0 -2
  291. package/dist/TextAreaFieldDefault-LVZXGUKB.js +0 -2
  292. package/dist/TextFieldDefault-YQMWGOV2.js +0 -2
  293. package/dist/WorkScheduleFieldDefault-IW4VDBCH.js +0 -2
  294. package/dist/ZendeskDrawerDefault-DKSZSN6N.js +0 -2
  295. package/dist/chunk-3X36ZFNP.js +0 -2
  296. package/dist/chunk-3X36ZFNP.js.map +0 -1
  297. package/dist/chunk-FC2V3NUT.js +0 -2
  298. package/dist/chunk-FC2V3NUT.js.map +0 -1
  299. package/dist/chunk-KXOVDXNX.js +0 -2
  300. package/dist/chunk-KXOVDXNX.js.map +0 -1
  301. package/dist/chunk-PJ6ZEFWD.js.map +0 -1
  302. package/dist/chunk-TCLY24DF.js +0 -2
  303. package/dist/chunk-TCLY24DF.js.map +0 -1
  304. package/dist/chunk-U7PGN7TL.js +0 -2
  305. package/dist/chunk-U7PGN7TL.js.map +0 -1
  306. package/dist/chunk-ZL6FKICW.js +0 -2
  307. package/dist/chunk-ZL6FKICW.js.map +0 -1
  308. /package/dist/{ButtonDefault-W7RPNNTH.js.map → ButtonDefault-C5BX67YU.js.map} +0 -0
  309. /package/dist/{CheckboxFieldDefault-JXZ6UY5T.js.map → CheckboxFieldDefault-HEIDOSI7.js.map} +0 -0
  310. /package/dist/{CountryFieldDefault-V7LUYGQV.js.map → CountryFieldDefault-BBMP6LHE.js.map} +0 -0
  311. /package/dist/{DatePickerFieldDefault-OMSU42DG.js.map → DatePickerFieldDefault-LBR6A7BF.js.map} +0 -0
  312. /package/dist/{DrawerDefault-V3GEL6Z5.js.map → DrawerDefault-I7PMYMPK.js.map} +0 -0
  313. /package/dist/{EmailFieldDefault-A3D5VQPS.js.map → EmailFieldDefault-T7YHR6EN.js.map} +0 -0
  314. /package/dist/{FieldsetToggleButtonDefault-BKIDTISL.js.map → FieldsetToggleButtonDefault-4JT4HGZ5.js.map} +0 -0
  315. /package/dist/{FileUploadFieldDefault-OQ4FGPDM.js.map → FileUploadFieldDefault-66JYQDRY.js.map} +0 -0
  316. /package/dist/{MultiSelectFieldDefault-EZA25KXD.js.map → MultiSelectFieldDefault-ZECWDTTO.js.map} +0 -0
  317. /package/dist/{NumberFieldDefault-BDSRZWXH.js.map → NumberFieldDefault-IOL6KD5M.js.map} +0 -0
  318. /package/dist/{PDFPreviewDefault-TV775MOQ.js.map → PDFPreviewDefault-LVWCRQ6A.js.map} +0 -0
  319. /package/dist/{RadioGroupFieldDefault-4IA7HESJ.js.map → RadioGroupFieldDefault-5GHWP2P6.js.map} +0 -0
  320. /package/dist/{SelectFieldDefault-3XQ5FPO2.js.map → SelectFieldDefault-HYT2DRK4.js.map} +0 -0
  321. /package/dist/{StatementDefault-CCLTSJLJ.js.map → StatementDefault-HUOZEIEC.js.map} +0 -0
  322. /package/dist/{TableFieldDefault-ADKV3M23.js.map → TableFieldDefault-OACG7RGJ.js.map} +0 -0
  323. /package/dist/{TextAreaFieldDefault-LVZXGUKB.js.map → TextAreaFieldDefault-KCPQWVZX.js.map} +0 -0
  324. /package/dist/{TextFieldDefault-YQMWGOV2.js.map → TextFieldDefault-MUGUO7GT.js.map} +0 -0
  325. /package/dist/{WorkScheduleFieldDefault-IW4VDBCH.js.map → WorkScheduleFieldDefault-CHW2ODQK.js.map} +0 -0
  326. /package/dist/{ZendeskDrawerDefault-DKSZSN6N.js.map → ZendeskDrawerDefault-NYESVAZM.js.map} +0 -0
  327. /package/dist/{chunk-QPJFFMXN.js.map → chunk-2DCJODMR.js.map} +0 -0
  328. /package/dist/{chunk-SBUJLXJH.js.map → chunk-32EHLWZC.js.map} +0 -0
  329. /package/dist/{chunk-NB3TN7O3.js.map → chunk-3KS3MSNS.js.map} +0 -0
  330. /package/dist/{chunk-J63QA2JC.js.map → chunk-3PIJOIYR.js.map} +0 -0
  331. /package/dist/{chunk-XSNWW3V4.js.map → chunk-3PVZEAGI.js.map} +0 -0
  332. /package/dist/{chunk-CMFZEZEK.js.map → chunk-46QJ44CZ.js.map} +0 -0
  333. /package/dist/{chunk-4ECYU3L5.js.map → chunk-4AM73KSF.js.map} +0 -0
  334. /package/dist/{chunk-PKXMKBP4.js.map → chunk-4DZWRQWY.js.map} +0 -0
  335. /package/dist/{chunk-YUYHK6WD.js.map → chunk-4YPJKEHT.js.map} +0 -0
  336. /package/dist/{chunk-QE76JNNE.js.map → chunk-4ZQ7NOAL.js.map} +0 -0
  337. /package/dist/{chunk-4JIHEEKX.js.map → chunk-5GAFQRDA.js.map} +0 -0
  338. /package/dist/{chunk-5PVNZ6VO.js.map → chunk-5NZJD6CA.js.map} +0 -0
  339. /package/dist/{chunk-WQSCAHR6.js.map → chunk-5R66NDTQ.js.map} +0 -0
  340. /package/dist/{chunk-XJILW6K3.js.map → chunk-66PXQJK6.js.map} +0 -0
  341. /package/dist/{chunk-XZLVP6EN.js.map → chunk-6VQEAU6A.js.map} +0 -0
  342. /package/dist/{chunk-4APMRCE7.js.map → chunk-6YEAHKT6.js.map} +0 -0
  343. /package/dist/{chunk-7G4JI6ZU.js.map → chunk-7S2QQQDH.js.map} +0 -0
  344. /package/dist/{chunk-4XJEVGPI.js.map → chunk-7SVSJ7NG.js.map} +0 -0
  345. /package/dist/{chunk-BDJLITVT.js.map → chunk-AA3QOH66.js.map} +0 -0
  346. /package/dist/{chunk-XNRPT3WP.js.map → chunk-AFJIZDZG.js.map} +0 -0
  347. /package/dist/{chunk-6SVKW2DC.js.map → chunk-AMWQ5P7T.js.map} +0 -0
  348. /package/dist/{chunk-GK3QRXNY.js.map → chunk-APFUKV75.js.map} +0 -0
  349. /package/dist/{chunk-CCE3EAVC.js.map → chunk-AS4ND5IO.js.map} +0 -0
  350. /package/dist/{chunk-64D4GLTO.js.map → chunk-ATPZXVQD.js.map} +0 -0
  351. /package/dist/{chunk-GZ2JKPBY.js.map → chunk-BBOEQU3O.js.map} +0 -0
  352. /package/dist/{chunk-ERPXDFKC.js.map → chunk-BDMCADQ6.js.map} +0 -0
  353. /package/dist/{chunk-XYO67D3V.js.map → chunk-BDNJNMR5.js.map} +0 -0
  354. /package/dist/{chunk-DAE2FMZ5.js.map → chunk-BUVW6LTT.js.map} +0 -0
  355. /package/dist/{chunk-GRWTCP42.js.map → chunk-CD6F3H7B.js.map} +0 -0
  356. /package/dist/{chunk-PV7FROZ7.js.map → chunk-CU3WQ2KN.js.map} +0 -0
  357. /package/dist/{chunk-GWR2JBG2.js.map → chunk-D5NBOIPS.js.map} +0 -0
  358. /package/dist/{chunk-EGDWVDXM.js.map → chunk-D67Z4NEP.js.map} +0 -0
  359. /package/dist/{chunk-NVX4O45S.js.map → chunk-DBUX7M4A.js.map} +0 -0
  360. /package/dist/{chunk-C36DEJTU.js.map → chunk-DT72SNYW.js.map} +0 -0
  361. /package/dist/{chunk-U7MQPLGK.js.map → chunk-EASVLA7B.js.map} +0 -0
  362. /package/dist/{chunk-L53XOWY6.js.map → chunk-FBE7F5HU.js.map} +0 -0
  363. /package/dist/{chunk-2YNDS45E.js.map → chunk-FI2MVRZR.js.map} +0 -0
  364. /package/dist/{chunk-3LZR4D3V.js.map → chunk-FJMBBAVQ.js.map} +0 -0
  365. /package/dist/{chunk-JZWOMKR3.js.map → chunk-GOOMCQBE.js.map} +0 -0
  366. /package/dist/{chunk-2RBFD5MM.js.map → chunk-GRHZMIP5.js.map} +0 -0
  367. /package/dist/{chunk-I3KFOOF6.js.map → chunk-GVK4VLLD.js.map} +0 -0
  368. /package/dist/{chunk-5FUJICAO.js.map → chunk-H2PKQ3ML.js.map} +0 -0
  369. /package/dist/{chunk-JAHRIQVL.js.map → chunk-HMMFY4PV.js.map} +0 -0
  370. /package/dist/{chunk-FUPQCC4B.js.map → chunk-ILH332UR.js.map} +0 -0
  371. /package/dist/{chunk-THBDZR3D.js.map → chunk-IRVF252A.js.map} +0 -0
  372. /package/dist/{chunk-XDILBY5Y.js.map → chunk-IUCFOQAD.js.map} +0 -0
  373. /package/dist/{chunk-XSUQM562.js.map → chunk-IVY2QYWG.js.map} +0 -0
  374. /package/dist/{chunk-UNBAXL4W.js.map → chunk-JEULZR34.js.map} +0 -0
  375. /package/dist/{chunk-KESYJ5QG.js.map → chunk-JJEFWMLY.js.map} +0 -0
  376. /package/dist/{chunk-7V3YVPIK.js.map → chunk-KCTY6YAP.js.map} +0 -0
  377. /package/dist/{chunk-55QKFWY5.js.map → chunk-L5VZ3XT7.js.map} +0 -0
  378. /package/dist/{chunk-43RCLG2R.js.map → chunk-LWGNRGU3.js.map} +0 -0
  379. /package/dist/{chunk-SUWJZ3QR.js.map → chunk-M4X3WYJY.js.map} +0 -0
  380. /package/dist/{chunk-Z4JMMKSU.js.map → chunk-MCGUHRQL.js.map} +0 -0
  381. /package/dist/{chunk-VNN6IP6P.js.map → chunk-MPYZD3SN.js.map} +0 -0
  382. /package/dist/{chunk-QSOCKFUS.js.map → chunk-N2UBBJBK.js.map} +0 -0
  383. /package/dist/{chunk-3JQROVRG.js.map → chunk-NHJT3DJU.js.map} +0 -0
  384. /package/dist/{chunk-WOW74M7R.js.map → chunk-NWWR6SBR.js.map} +0 -0
  385. /package/dist/{chunk-H5LGAIMM.js.map → chunk-O3XMCNHE.js.map} +0 -0
  386. /package/dist/{chunk-XJDX3ZH6.js.map → chunk-O5ENJKI6.js.map} +0 -0
  387. /package/dist/{chunk-4V6AV3DC.js.map → chunk-OCTMRR2C.js.map} +0 -0
  388. /package/dist/{chunk-GINFFWVY.js.map → chunk-OJ3HJ7QL.js.map} +0 -0
  389. /package/dist/{chunk-AU376LE2.js.map → chunk-OK3CYSHV.js.map} +0 -0
  390. /package/dist/{chunk-7EMWT6EU.js.map → chunk-OPWMRKZP.js.map} +0 -0
  391. /package/dist/{chunk-TXVEFBFM.js.map → chunk-OV7TLEE6.js.map} +0 -0
  392. /package/dist/{chunk-4YAFRXR5.js.map → chunk-PTNHB5BY.js.map} +0 -0
  393. /package/dist/{chunk-BHXCYFC4.js.map → chunk-Q7JVXGC6.js.map} +0 -0
  394. /package/dist/{chunk-3KD533T6.js.map → chunk-QIBRRCQX.js.map} +0 -0
  395. /package/dist/{chunk-GTJMTF2R.js.map → chunk-RM7W6QA7.js.map} +0 -0
  396. /package/dist/{chunk-N6XY7NC3.js.map → chunk-RN6B2HER.js.map} +0 -0
  397. /package/dist/{chunk-KFWZDRDD.js.map → chunk-RQRODRCR.js.map} +0 -0
  398. /package/dist/{chunk-RBJ5MFDE.js.map → chunk-T7CGGZOK.js.map} +0 -0
  399. /package/dist/{chunk-ZWO4HX27.js.map → chunk-TRR7P5XQ.js.map} +0 -0
  400. /package/dist/{chunk-HYVK643F.js.map → chunk-TZCNONDA.js.map} +0 -0
  401. /package/dist/{chunk-UFTA5ATE.js.map → chunk-UTNKUPL5.js.map} +0 -0
  402. /package/dist/{chunk-SIP2BFZJ.js.map → chunk-UVAK3ZEO.js.map} +0 -0
  403. /package/dist/{chunk-2O6Z2KGG.js.map → chunk-UXHMIIOB.js.map} +0 -0
  404. /package/dist/{chunk-VH4D3E42.js.map → chunk-UXP2IITO.js.map} +0 -0
  405. /package/dist/{chunk-NIQXQZ6X.js.map → chunk-W2PJUNWX.js.map} +0 -0
  406. /package/dist/{chunk-6MJ5MIUI.js.map → chunk-W5EXVAEO.js.map} +0 -0
  407. /package/dist/{chunk-GOEEA34E.js.map → chunk-WLMHGJWB.js.map} +0 -0
  408. /package/dist/{chunk-G6BR4JI6.js.map → chunk-WQYW6TGP.js.map} +0 -0
  409. /package/dist/{chunk-6AXMBMQI.js.map → chunk-WROEWNZE.js.map} +0 -0
  410. /package/dist/{chunk-Q445EJX6.js.map → chunk-XY2IEZHC.js.map} +0 -0
  411. /package/dist/{chunk-QLB4FSLX.js.map → chunk-XZLBYJZJ.js.map} +0 -0
  412. /package/dist/{chunk-LGIHVJA5.js.map → chunk-Y7GCA66L.js.map} +0 -0
  413. /package/dist/{chunk-A3TXUJUO.js.map → chunk-YA2G4A3K.js.map} +0 -0
  414. /package/dist/{chunk-E7JOGKEV.js.map → chunk-YAJCRUQL.js.map} +0 -0
  415. /package/dist/{chunk-2Q57B73D.js.map → chunk-ZIXR3VSB.js.map} +0 -0
  416. /package/dist/{chunk-4XV4INW5.js.map → chunk-ZKS7DJDT.js.map} +0 -0
  417. /package/dist/{chunk-MIK6GCO2.js.map → chunk-ZPDZ6V5R.js.map} +0 -0
  418. /package/dist/{chunk-UAACHXXX.js.map → chunk-ZPG6GRAX.js.map} +0 -0
  419. /package/dist/{chunk-H5CNWMEM.js.map → chunk-ZSJ6YADQ.js.map} +0 -0
  420. /package/dist/{chunk-IVUCPXEC.js.map → chunk-ZZJPAKGP.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as t,b as n,c as l,d as i,e as s,f as d}from"./chunk-NIQXQZ6X.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({open:w,onClose:D,data:o,isLoading:m,error:p,zendeskURL:f,Trigger:c}){return r(t,{open:w,onOpenChange:g=>!g&&D(),direction:"right",children:[e(n,{asChild:!0,children:c}),e(l,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:r("div",{className:"h-full flex flex-col",children:[r(i,{children:[e(s,{children:o?.title}),r(d,{children:["For more details see our"," ",e("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&e("div",{children:"Loading..."}),p&&e("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),e("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:o?.body||""}})]})})]})}a(h,"ZendeskDrawerDefault");export{h as a};
2
- //# sourceMappingURL=chunk-TXVEFBFM.js.map
1
+ import{a as t,b as n,c as l,d as i,e as s,f as d}from"./chunk-W2PJUNWX.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({open:w,onClose:D,data:o,isLoading:m,error:p,zendeskURL:f,Trigger:c}){return r(t,{open:w,onOpenChange:g=>!g&&D(),direction:"right",children:[e(n,{asChild:!0,children:c}),e(l,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:r("div",{className:"h-full flex flex-col",children:[r(i,{children:[e(s,{children:o?.title}),r(d,{children:["For more details see our"," ",e("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&e("div",{children:"Loading..."}),p&&e("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),e("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:o?.body||""}})]})})]})}a(h,"ZendeskDrawerDefault");export{h as a};
2
+ //# sourceMappingURL=chunk-OV7TLEE6.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-U7PGN7TL.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{j as n}from"./chunk-J63QA2JC.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as f}from"react/jsx-runtime";function b({onSubmit:m,onSuccess:d,onError:c}){let{contractorOnboardingBag:o}=e(),p=t(async i=>{try{let a=await o.parseFormValues(i);await m?.(a);let r=await o.onSubmit(i);if(r?.data){await d?.(r?.data),o?.next();return}}catch(a){let r=n(a,o.meta?.fields?.basic_information);c?.(r)}},"handleSubmit"),l=o.stepState.values?.basic_information||o.initialValues.basic_information;return f(s,{defaultValues:l,onSubmit:p})}t(b,"BasicInformationStep");export{b as a};
2
- //# sourceMappingURL=chunk-4YAFRXR5.js.map
1
+ import{a as s}from"./chunk-2PUPF2EN.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{j as n}from"./chunk-3PIJOIYR.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as f}from"react/jsx-runtime";function b({onSubmit:m,onSuccess:d,onError:c}){let{contractorOnboardingBag:o}=e(),p=t(async i=>{try{let a=await o.parseFormValues(i);await m?.(a);let r=await o.onSubmit(i);if(r?.data){await d?.(r?.data),o?.next();return}}catch(a){let r=n(a,o.meta?.fields?.basic_information);c?.(r)}},"handleSubmit"),l=o.stepState.values?.basic_information||o.initialValues.basic_information;return f(s,{defaultValues:l,onSubmit:p})}t(b,"BasicInformationStep");export{b as a};
2
+ //# sourceMappingURL=chunk-PTNHB5BY.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-Q445EJX6.js";import{a as d,b as w}from"./chunk-EAF6XPH6.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as C}from"./chunk-T7O3YYOG.js";import{J as F,d as _,u as P}from"./chunk-PJ6ZEFWD.js";import{a as h}from"./chunk-3X36ZFNP.js";import{a as j}from"./chunk-5BRMLRS7.js";import{d as c}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
2
- //# sourceMappingURL=chunk-BHXCYFC4.js.map
1
+ import{a as d,b as w}from"./chunk-EAF6XPH6.js";import{a as g}from"./chunk-XY2IEZHC.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as C}from"./chunk-T7O3YYOG.js";import{K as F,d as _,u as P}from"./chunk-BYX2YS2B.js";import{a as h}from"./chunk-X6ZAR7ZL.js";import{a as j}from"./chunk-5BRMLRS7.js";import{d as c}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
2
+ //# sourceMappingURL=chunk-Q7JVXGC6.js.map
@@ -1,2 +1,2 @@
1
- import{a as Be}from"./chunk-VAIBLWOY.js";import{a as De}from"./chunk-U7MQPLGK.js";import{b as Ve,c as xe,f as Pe,g as Oe,h as Me,i as Te,j as we,k as Re,m as Le}from"./chunk-4ECYU3L5.js";import{a as ge,b as Ee,c as Ce,d as Fe,f as he}from"./chunk-STF3NTPS.js";import{a as ve}from"./chunk-Q445EJX6.js";import{e as O,f as L,h as $}from"./chunk-T7O3YYOG.js";import{h as P}from"./chunk-J63QA2JC.js";import{a as R}from"./chunk-3X36ZFNP.js";import{a as ke}from"./chunk-5BRMLRS7.js";import{a as o}from"./chunk-P37U34EQ.js";import{useCallback as gt,useEffect as Et,useMemo as p,useRef as Ct,useState as Ae}from"react";import Ft from"lodash.mergewith";import{createContext as mt,useContext as ft,useMemo as pt,useCallback as yt,useRef as _t}from"react";import{jsx as St}from"react/jsx-runtime";var qe=mt(void 0);function Tt({children:r}){let u=_t({}),c=yt(i=>{u.current={...u.current,...i}},[]),E=pt(()=>({errorContextRef:u,updateContext:c}),[c]);return St(qe.Provider,{value:E,children:r})}o(Tt,"ErrorContextProvider");var Je=o(()=>{let r=ft(qe);if(!r)throw new Error("useErrorContext must be used within ErrorContextProvider");return r},"useErrorContext");import{useEffect as je,useMemo as bt}from"react";function Ne(r){let{updateContext:u,errorContextRef:c}=Je();return je(()=>{r&&(c.current=r)},[]),je(()=>()=>{c.current={}},[c]),{...bt(()=>({updateErrorContext:o(i=>{u(i)},"updateErrorContext"),clearErrorContext:o(()=>{c.current={}},"clearErrorContext")}),[]),errorContext:c}}o(Ne,"useErrorReporting");import{jsx as Ie}from"react/jsx-runtime";var ht={employment_basic_information:"basic_information",contract_details:"contract_details"},Vt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},xt=o(({isLoadingBasicInformationForm:r,isLoadingContractDetailsForm:u,isLoadingEmployment:c,isLoadingBenefitsOffersSchema:E,isLoadingBenefitOffers:i,isLoadingCompany:N,isLoadingCountries:M,employmentStatus:s,employmentId:v,currentStepName:A,basicInformationFields:I,contractDetailsFields:y})=>{let t=r||u||c||E||i||N||M,k=s&&Ce.includes(s),U=s&&!Fe.includes(s),D=!!(v&&k&&A!=="review"),T=t||D,B=!!(D&&!t&&I.length>0&&y.length>0);return{isLoading:T,isNavigatingToReview:B,isEmploymentReadOnly:k,canInvite:U}},"getLoadingStates"),Qt=o(({employmentId:r,companyId:u,countryCode:c,type:E,options:i,skipSteps:N,externalId:M,initialValues:s})=>{let{updateErrorContext:v}=Ne({flow:"onboarding",metadata:{employmentId:r,companyId:u,isUpdating:!!r}}),A=N?.includes("select_country")?Ee:ge,I=gt(e=>{v({step:e.name})},[v]),{fieldValues:y,stepState:t,setFieldValues:k,previousStep:U,nextStep:D,goToStep:T,setStepValues:B}=ke(A,I),q=Ct({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[d,Ue]=Ae(r),[l,z]=Ae(c||null),{data:m,isLoading:K,refetch:He}=ve({employmentId:d,queryParams:{exclude_files:!0}});r&&m?.country?.code&&!l&&z(m.country.code);let{data:Q,isLoading:Y}=xe(d),{data:J,isLoading:X,refetch:We}=Ve(u),{selectCountryForm:j,isLoading:Z}=Re({jsfModify:i?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),ee=Me(),te=Te(l,i),ne=we(i),oe=Le(),{mutateAsync:Ge}=R(ee),{mutateAsync:re}=R(te),{mutateAsync:$e}=R(ne),{mutateAsync:ze}=R(oe),Ke=Vt[t.currentStep.name]||"employment_basic_information",Qe=ht[Ke],Ye=m?.[Qe]||{},ie=o(({form:e,options:a={},query:f={},jsonSchemaVersion:x})=>{let W=Object.keys(y).length>0?{...s,...t.values?.[t.currentStep.name],...y}:{...s,...Ye};return Pe({countryCode:l,form:e,fieldValues:W,query:f,options:{...a,queryOptions:{enabled:a.queryOptions?.enabled??!0}},jsonSchemaVersion:x})},"useJSONSchema"),Xe=!!(l&&(t.currentStep.name==="basic_information"||r)),Ze=!!(l&&(t.currentStep.name==="contract_details"||r)),{data:_,isLoading:ae}=ie({form:"employment_basic_information",options:{jsfModify:i?.jsfModify?.basic_information,queryOptions:{enabled:Xe}},jsonSchemaVersion:1}),C=i?.jsfModify?.contract_details?.fields?.annual_gross_salary,H=C&&typeof C=="object"&&"presentation"in C?C.presentation:void 0,se=i?.jsfModify?.contract_details?.fields?.equity_compensation,et=p(()=>({fields:{annual_gross_salary:{...C,presentation:{annual_gross_salary_conversion_properties:{label:H?.annual_gross_salary_conversion_properties?.label,description:H?.annual_gross_salary_conversion_properties?.description},desiredCurrency:J?.desired_currency,Component:o(e=>Ie(De,{desiredCurrency:J?.desired_currency||"",...e}),"Component")}},equity_compensation:{...se,presentation:{calculateDynamicProperties:o((e,a)=>{let f=e.equity_compensation?.offer_equity_compensation,x=a?.meta?.cost;return{extra:Ie(Be,{offerEquity:f,equityCost:x})}},"calculateDynamicProperties")}}}}),[C,H,J?.desired_currency,se]),tt=he(i,l),{data:S,isLoading:ce}=ie({form:"contract_details",query:{employment_id:d},options:{jsfModify:{...i?.jsfModify?.contract_details,fields:{...i?.jsfModify?.contract_details?.fields,...et.fields}},queryOptions:{enabled:Ze}},jsonSchemaVersion:tt}),{data:w,isLoading:le}=Oe(d,y,i),de=p(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Ft({},Q,e)}return{}},[t.currentStep.name,Q,t.values,y]),n=p(()=>({select_country:j?.fields||[],basic_information:_?.fields||[],contract_details:S?.fields||[],benefits:w?.fields||[],review:[]}),[j?.fields,_?.fields,S?.fields,w?.fields]),nt={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:ot,basic_information:ue={},contract_details:me={},status:fe}=m||{},pe=ot?.code,ye=t.currentStep.name,F=p(()=>L(n.select_country,{country:l||pe||""}),[n.select_country,l,pe]),h=p(()=>{let e={...s,...ue};return L(n.basic_information,e)},[n.basic_information,ue,s]),g=p(()=>{let e={...s,...me};return L(n.contract_details,e)},[n.contract_details,me,s]),V=p(()=>{let e={...s,...de};return L(n.benefits,e)},[n.benefits,de,s]),rt=p(()=>m?{select_country:F,basic_information:$(n.basic_information,h),contract_details:m?.contract_details!==null?$(n.contract_details,g):g,benefits:V}:{select_country:F,basic_information:h,contract_details:g,benefits:V},[F,h,g,V,m,n]),{isLoading:it,isNavigatingToReview:_e,isEmploymentReadOnly:at,canInvite:st}=p(()=>xt({isLoadingBasicInformationForm:ae,isLoadingContractDetailsForm:ce,isLoadingEmployment:K,isLoadingBenefitsOffersSchema:le,isLoadingBenefitOffers:Y,isLoadingCompany:X,isLoadingCountries:Z,employmentId:r,employmentStatus:fe,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:ye}),[ae,ce,K,le,Y,X,Z,r,fe,n.basic_information,n.contract_details,ye]);Et(()=>{_e&&(q.current={select_country:P(F,n.select_country),basic_information:P(h,n.basic_information),contract_details:P(g,n.contract_details),benefits:P(V,n.benefits)},B({select_country:F,basic_information:h,contract_details:g,benefits:V,review:{}}),T("review"))},[h,V,g,T,_e,F,B,n.basic_information,n.benefits,n.contract_details,n.select_country]);let Se=o(async e=>j&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await O(e,_?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await O(e,S?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function ct(e){let a=t.currentStep.name;a in q.current&&(q.current[a]=P(e,n[a]));let f=await Se(e);switch(We(),t.currentStep.name){case"select_country":return z(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let x=!d&&l,be=d&&l&&m?.country&&m?.country.code!==l;if(x||be){let W={basic_information:f,type:E,country_code:l,external_id:M};try{let b=await Ge(W);if(b.error)return b;if(b.data){let G=b.data?.data?.employment?.id;return G&&(Ue(G),await ze({employmentId:G,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),b}}catch(b){throw console.error("Error creating onboarding:",b),b}}else if(d)return re({employmentId:d,basic_information:f,pricing_plan_details:{frequency:"monthly"},external_id:M});return}case"contract_details":return re({employmentId:d,external_id:M,...{contract_details:f,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return $e({employmentId:d,...e})}}o(ct,"onSubmit");function lt(){U()}o(lt,"back");function dt(){D()}o(dt,"next");function ut(e){T(e)}return o(ut,"goTo"),{employmentId:d,creditRiskStatus:J?.default_legal_entity_credit_risk_status,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:it,isSubmitting:ee.isPending||te.isPending||ne.isPending||oe.isPending,initialValues:rt,handleValidation:o(async e=>{if(t.currentStep.name==="select_country")return j.handleValidation(e);if(t.currentStep.name==="benefits"&&w){let a=await O(e,w?.fields,{isPartialValidation:!1});return w?.handleValidation(a)}if(_&&t.currentStep.name==="basic_information"){let a=await O(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(a)}if(S&&t.currentStep.name==="contract_details"){let a=await O(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:k,parseFormValues:Se,onSubmit:ct,back:lt,next:dt,goTo:ut,meta:{fields:q.current,fieldsets:nt[t.currentStep.name]},refetchEmployment:He,employment:m,isEmploymentReadOnly:at,canInvite:st}},"useOnboarding");export{qe as a,Tt as b,Qt as c};
2
- //# sourceMappingURL=chunk-3KD533T6.js.map
1
+ import{a as Be}from"./chunk-VAIBLWOY.js";import{a as De}from"./chunk-EASVLA7B.js";import{b as Ve,c as xe,f as Pe,g as Oe,h as Me,i as Te,j as we,k as Re,m as Le}from"./chunk-4AM73KSF.js";import{a as ge,b as Ee,c as Ce,d as Fe,f as he}from"./chunk-STF3NTPS.js";import{a as ve}from"./chunk-XY2IEZHC.js";import{e as O,f as L,h as $}from"./chunk-T7O3YYOG.js";import{h as P}from"./chunk-3PIJOIYR.js";import{a as R}from"./chunk-X6ZAR7ZL.js";import{a as ke}from"./chunk-5BRMLRS7.js";import{a as o}from"./chunk-P37U34EQ.js";import{useCallback as gt,useEffect as Et,useMemo as p,useRef as Ct,useState as Ae}from"react";import Ft from"lodash.mergewith";import{createContext as mt,useContext as ft,useMemo as pt,useCallback as yt,useRef as _t}from"react";import{jsx as St}from"react/jsx-runtime";var qe=mt(void 0);function Tt({children:r}){let u=_t({}),c=yt(i=>{u.current={...u.current,...i}},[]),E=pt(()=>({errorContextRef:u,updateContext:c}),[c]);return St(qe.Provider,{value:E,children:r})}o(Tt,"ErrorContextProvider");var Je=o(()=>{let r=ft(qe);if(!r)throw new Error("useErrorContext must be used within ErrorContextProvider");return r},"useErrorContext");import{useEffect as je,useMemo as bt}from"react";function Ne(r){let{updateContext:u,errorContextRef:c}=Je();return je(()=>{r&&(c.current=r)},[]),je(()=>()=>{c.current={}},[c]),{...bt(()=>({updateErrorContext:o(i=>{u(i)},"updateErrorContext"),clearErrorContext:o(()=>{c.current={}},"clearErrorContext")}),[]),errorContext:c}}o(Ne,"useErrorReporting");import{jsx as Ie}from"react/jsx-runtime";var ht={employment_basic_information:"basic_information",contract_details:"contract_details"},Vt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},xt=o(({isLoadingBasicInformationForm:r,isLoadingContractDetailsForm:u,isLoadingEmployment:c,isLoadingBenefitsOffersSchema:E,isLoadingBenefitOffers:i,isLoadingCompany:N,isLoadingCountries:M,employmentStatus:s,employmentId:v,currentStepName:A,basicInformationFields:I,contractDetailsFields:y})=>{let t=r||u||c||E||i||N||M,k=s&&Ce.includes(s),U=s&&!Fe.includes(s),D=!!(v&&k&&A!=="review"),T=t||D,B=!!(D&&!t&&I.length>0&&y.length>0);return{isLoading:T,isNavigatingToReview:B,isEmploymentReadOnly:k,canInvite:U}},"getLoadingStates"),Qt=o(({employmentId:r,companyId:u,countryCode:c,type:E,options:i,skipSteps:N,externalId:M,initialValues:s})=>{let{updateErrorContext:v}=Ne({flow:"onboarding",metadata:{employmentId:r,companyId:u,isUpdating:!!r}}),A=N?.includes("select_country")?Ee:ge,I=gt(e=>{v({step:e.name})},[v]),{fieldValues:y,stepState:t,setFieldValues:k,previousStep:U,nextStep:D,goToStep:T,setStepValues:B}=ke(A,I),q=Ct({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[d,Ue]=Ae(r),[l,z]=Ae(c||null),{data:m,isLoading:K,refetch:He}=ve({employmentId:d,queryParams:{exclude_files:!0}});r&&m?.country?.code&&!l&&z(m.country.code);let{data:Q,isLoading:Y}=xe(d),{data:J,isLoading:X,refetch:We}=Ve(u),{selectCountryForm:j,isLoading:Z}=Re({jsfModify:i?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),ee=Me(),te=Te(l,i),ne=we(i),oe=Le(),{mutateAsync:Ge}=R(ee),{mutateAsync:re}=R(te),{mutateAsync:$e}=R(ne),{mutateAsync:ze}=R(oe),Ke=Vt[t.currentStep.name]||"employment_basic_information",Qe=ht[Ke],Ye=m?.[Qe]||{},ie=o(({form:e,options:a={},query:f={},jsonSchemaVersion:x})=>{let W=Object.keys(y).length>0?{...s,...t.values?.[t.currentStep.name],...y}:{...s,...Ye};return Pe({countryCode:l,form:e,fieldValues:W,query:f,options:{...a,queryOptions:{enabled:a.queryOptions?.enabled??!0}},jsonSchemaVersion:x})},"useJSONSchema"),Xe=!!(l&&(t.currentStep.name==="basic_information"||r)),Ze=!!(l&&(t.currentStep.name==="contract_details"||r)),{data:_,isLoading:ae}=ie({form:"employment_basic_information",options:{jsfModify:i?.jsfModify?.basic_information,queryOptions:{enabled:Xe}},jsonSchemaVersion:1}),C=i?.jsfModify?.contract_details?.fields?.annual_gross_salary,H=C&&typeof C=="object"&&"presentation"in C?C.presentation:void 0,se=i?.jsfModify?.contract_details?.fields?.equity_compensation,et=p(()=>({fields:{annual_gross_salary:{...C,presentation:{annual_gross_salary_conversion_properties:{label:H?.annual_gross_salary_conversion_properties?.label,description:H?.annual_gross_salary_conversion_properties?.description},desiredCurrency:J?.desired_currency,Component:o(e=>Ie(De,{desiredCurrency:J?.desired_currency||"",...e}),"Component")}},equity_compensation:{...se,presentation:{calculateDynamicProperties:o((e,a)=>{let f=e.equity_compensation?.offer_equity_compensation,x=a?.meta?.cost;return{extra:Ie(Be,{offerEquity:f,equityCost:x})}},"calculateDynamicProperties")}}}}),[C,H,J?.desired_currency,se]),tt=he(i,l),{data:S,isLoading:ce}=ie({form:"contract_details",query:{employment_id:d},options:{jsfModify:{...i?.jsfModify?.contract_details,fields:{...i?.jsfModify?.contract_details?.fields,...et.fields}},queryOptions:{enabled:Ze}},jsonSchemaVersion:tt}),{data:w,isLoading:le}=Oe(d,y,i),de=p(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Ft({},Q,e)}return{}},[t.currentStep.name,Q,t.values,y]),n=p(()=>({select_country:j?.fields||[],basic_information:_?.fields||[],contract_details:S?.fields||[],benefits:w?.fields||[],review:[]}),[j?.fields,_?.fields,S?.fields,w?.fields]),nt={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:ot,basic_information:ue={},contract_details:me={},status:fe}=m||{},pe=ot?.code,ye=t.currentStep.name,F=p(()=>L(n.select_country,{country:l||pe||""}),[n.select_country,l,pe]),h=p(()=>{let e={...s,...ue};return L(n.basic_information,e)},[n.basic_information,ue,s]),g=p(()=>{let e={...s,...me};return L(n.contract_details,e)},[n.contract_details,me,s]),V=p(()=>{let e={...s,...de};return L(n.benefits,e)},[n.benefits,de,s]),rt=p(()=>m?{select_country:F,basic_information:$(n.basic_information,h),contract_details:m?.contract_details!==null?$(n.contract_details,g):g,benefits:V}:{select_country:F,basic_information:h,contract_details:g,benefits:V},[F,h,g,V,m,n]),{isLoading:it,isNavigatingToReview:_e,isEmploymentReadOnly:at,canInvite:st}=p(()=>xt({isLoadingBasicInformationForm:ae,isLoadingContractDetailsForm:ce,isLoadingEmployment:K,isLoadingBenefitsOffersSchema:le,isLoadingBenefitOffers:Y,isLoadingCompany:X,isLoadingCountries:Z,employmentId:r,employmentStatus:fe,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:ye}),[ae,ce,K,le,Y,X,Z,r,fe,n.basic_information,n.contract_details,ye]);Et(()=>{_e&&(q.current={select_country:P(F,n.select_country),basic_information:P(h,n.basic_information),contract_details:P(g,n.contract_details),benefits:P(V,n.benefits)},B({select_country:F,basic_information:h,contract_details:g,benefits:V,review:{}}),T("review"))},[h,V,g,T,_e,F,B,n.basic_information,n.benefits,n.contract_details,n.select_country]);let Se=o(async e=>j&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await O(e,_?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await O(e,S?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function ct(e){let a=t.currentStep.name;a in q.current&&(q.current[a]=P(e,n[a]));let f=await Se(e);switch(We(),t.currentStep.name){case"select_country":return z(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let x=!d&&l,be=d&&l&&m?.country&&m?.country.code!==l;if(x||be){let W={basic_information:f,type:E,country_code:l,external_id:M};try{let b=await Ge(W);if(b.error)return b;if(b.data){let G=b.data?.data?.employment?.id;return G&&(Ue(G),await ze({employmentId:G,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),b}}catch(b){throw console.error("Error creating onboarding:",b),b}}else if(d)return re({employmentId:d,basic_information:f,pricing_plan_details:{frequency:"monthly"},external_id:M});return}case"contract_details":return re({employmentId:d,external_id:M,...{contract_details:f,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return $e({employmentId:d,...e})}}o(ct,"onSubmit");function lt(){U()}o(lt,"back");function dt(){D()}o(dt,"next");function ut(e){T(e)}return o(ut,"goTo"),{employmentId:d,creditRiskStatus:J?.default_legal_entity_credit_risk_status,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:it,isSubmitting:ee.isPending||te.isPending||ne.isPending||oe.isPending,initialValues:rt,handleValidation:o(async e=>{if(t.currentStep.name==="select_country")return j.handleValidation(e);if(t.currentStep.name==="benefits"&&w){let a=await O(e,w?.fields,{isPartialValidation:!1});return w?.handleValidation(a)}if(_&&t.currentStep.name==="basic_information"){let a=await O(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(a)}if(S&&t.currentStep.name==="contract_details"){let a=await O(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:k,parseFormValues:Se,onSubmit:ct,back:lt,next:dt,goTo:ut,meta:{fields:q.current,fieldsets:nt[t.currentStep.name]},refetchEmployment:He,employment:m,isEmploymentReadOnly:at,canInvite:st}},"useOnboarding");export{qe as a,Tt as b,Qt as c};
2
+ //# sourceMappingURL=chunk-QIBRRCQX.js.map
@@ -1,2 +1,2 @@
1
- import{i as c,j as i,k as n,l as _,m as F}from"./chunk-H5CNWMEM.js";import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-CMFZEZEK.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as v}from"react/jsx-runtime";function R({field:t,fieldState:a,fieldData:C}){let{name:r,label:o,description:m,options:N}=C;return v(c,{"data-field":r,className:`RemoteFlows__SelectField__Item__${r}`,children:[e(i,{className:"RemoteFlows__SelectField__Label",children:o}),e(n,{children:e("div",{className:"relative",children:v(d,{value:t.value||"",onValueChange:l=>{t.onChange(l)},children:[e(u,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!a.error,"aria-label":o,children:e("span",{className:"absolute",children:e(p,{placeholder:o})})}),e(g,{className:"RemoteFlows__SelectField__Content",children:e(S,{className:"RemoteFlows__SelectField__Group",children:N?.map(l=>e(b,{value:l.value,className:"RemoteFlows__SelectField__SelectItem",disabled:l.disabled,children:l.label},l.value))})})]})})}),m&&e(_,{children:m}),a.error&&e(F,{})]})}s(R,"SelectFieldDefault");export{R as a};
2
- //# sourceMappingURL=chunk-GTJMTF2R.js.map
1
+ import{i as c,j as i,k as n,l as _,m as F}from"./chunk-ZSJ6YADQ.js";import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-46QJ44CZ.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as v}from"react/jsx-runtime";function R({field:t,fieldState:a,fieldData:C}){let{name:r,label:o,description:m,options:N}=C;return v(c,{"data-field":r,className:`RemoteFlows__SelectField__Item__${r}`,children:[e(i,{className:"RemoteFlows__SelectField__Label",children:o}),e(n,{children:e("div",{className:"relative",children:v(d,{value:t.value||"",onValueChange:l=>{t.onChange(l)},children:[e(u,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!a.error,"aria-label":o,children:e("span",{className:"absolute",children:e(p,{placeholder:o})})}),e(g,{className:"RemoteFlows__SelectField__Content",children:e(S,{className:"RemoteFlows__SelectField__Group",children:N?.map(l=>e(b,{value:l.value,className:"RemoteFlows__SelectField__SelectItem",disabled:l.disabled,children:l.label},l.value))})})]})})}),m&&e(_,{children:m}),a.error&&e(F,{})]})}s(R,"SelectFieldDefault");export{R as a};
2
+ //# sourceMappingURL=chunk-RM7W6QA7.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as i}from"./chunk-BDJLITVT.js";import{a as e}from"./chunk-J63QA2JC.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
- //# sourceMappingURL=chunk-N6XY7NC3.js.map
1
+ import{a as n,b as i}from"./chunk-AA3QOH66.js";import{a as e}from"./chunk-3PIJOIYR.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
+ //# sourceMappingURL=chunk-RN6B2HER.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-KESYJ5QG.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var i=m(({cards:e})=>n("div",{className:"RemoteFlows__AcknowledgeInformation",children:[n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.remoteDoesNext.title}),o("p",{className:"RemoteFlows__AcknowledgeInformation__Description color-[#71717A] text-xs",children:e.remoteDoesNext.description})]}),n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.whatYouNeedToDo.title}),o("ul",{className:"RemoteFlows__AcknowledgeInformation__List list-disc pl-5 text-xs text-[#71717A]",children:e.whatYouNeedToDo.list.map(l=>o("li",{className:"RemoteFlows__AcknowledgeInformation__ListItem mb-2",children:l},l))})]})]}),"AcknowledgeInformation");export{i as a};
2
- //# sourceMappingURL=chunk-KFWZDRDD.js.map
1
+ import{a as t}from"./chunk-JJEFWMLY.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var i=m(({cards:e})=>n("div",{className:"RemoteFlows__AcknowledgeInformation",children:[n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.remoteDoesNext.title}),o("p",{className:"RemoteFlows__AcknowledgeInformation__Description color-[#71717A] text-xs",children:e.remoteDoesNext.description})]}),n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.whatYouNeedToDo.title}),o("ul",{className:"RemoteFlows__AcknowledgeInformation__List list-disc pl-5 text-xs text-[#71717A]",children:e.whatYouNeedToDo.list.map(l=>o("li",{className:"RemoteFlows__AcknowledgeInformation__ListItem mb-2",children:l},l))})]})]}),"AcknowledgeInformation");export{i as a};
2
+ //# sourceMappingURL=chunk-RQRODRCR.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b as l}from"./chunk-O3G6HQ3B.js";import{a as i}from"./chunk-P37U34EQ.js";function u(e={}){let r=[{name:"select_country",label:"Select Country",include:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",include:!0},{name:"pricing_plan",label:"Pricing Plan",include:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",include:!!e?.includeEligibilityQuestionnaire},{name:"contract_details",label:"Contract Details",include:!0},{name:"contract_preview",label:"Contract Preview",include:!0},{name:"review",label:"Review",include:!0}].filter(t=>t.include).map((t,n)=>({name:t.name,index:n,label:t.label}));return{steps:r.reduce((t,n)=>(t[n.name]={index:n.index,name:n.name},t),{}),stepsArray:r}}i(u,"buildSteps");var p=i((e,o)=>{if(e&&o&&e!==o)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),m=i(e=>e===a||e===l,"isCMOrCMPlus"),y=["invited"],b=["invited"];export{u as a,p as b,m as c,y as d,b as e};
2
+ //# sourceMappingURL=chunk-SATHKK5B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n include: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n include: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n include: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n include: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n include: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n include: true,\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n include: true,\n },\n {\n name: 'review',\n label: 'Review',\n include: true,\n },\n ];\n\n const activeSteps = stepDefinitions.filter((step) => step.include);\n\n const stepsArray = activeSteps.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = { index: step.index, name: step.name };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'invited',\n];\n"],"mappings":"kFAqBO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CA6ClD,IAAMC,EAxCD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEoC,OAAQE,GAASA,EAAK,OAAO,EAElC,IAAI,CAACA,EAAMC,KAAW,CACnD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,KACd,EAAE,EAUF,MAAO,CAAE,MARKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CAAE,MAAOA,EAAK,MAAO,KAAMA,EAAK,IAAK,EAC/CE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CA5DgBI,EAAAN,EAAA,cAkET,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAafC,EAA4D,CACvE,SACF,EAEaC,EAA+D,CAC1E,SACF","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus"]}
@@ -1,2 +1,2 @@
1
- import{b as x,c as y,d as k}from"./chunk-PV7FROZ7.js";import{b as h}from"./chunk-AU376LE2.js";import{b as C}from"./chunk-YUYHK6WD.js";import{a as m}from"./chunk-J63QA2JC.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as z,useState as G}from"react";import{Check as L,ChevronDownIcon as B,X as M}from"lucide-react";import{Command as i}from"cmdk";import{SearchIcon as H}from"lucide-react";import{jsx as d,jsxs as X}from"react/jsx-runtime";function b({className:t,...o}){return d(i,{"data-slot":"command",className:m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...o})}r(b,"Command");function P({className:t,...o}){return d(i.List,{"data-slot":"command-list",className:m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...o})}r(P,"CommandList");function _({...t}){return d(i.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}r(_,"CommandEmpty");function w({className:t,...o}){return d(i.Group,{"data-slot":"command-group",className:m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...o})}r(w,"CommandGroup");function N({className:t,...o}){return d(i.Separator,{"data-slot":"command-separator",className:m("bg-border -mx-1 h-px",t),...o})}r(N,"CommandSeparator");function D({className:t,...o}){return d(i.Item,{"data-slot":"command-item",className:m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...o})}r(D,"CommandItem");import{jsx as a,jsxs as s}from"react/jsx-runtime";function Z({options:t,selected:o,onChange:u,placeholder:S,...I}){let[g,R]=G(!1),f=r(e=>{u(o.filter(n=>n.value!==e.value))},"handleUnselect"),O=t.some(e=>e.category),E=t.reduce((e,n)=>{let p=n.category||"Uncategorized";return e[p]||(e[p]=[]),e[p].push(n),e},{});return s(x,{open:g,onOpenChange:R,...I,children:[a(y,{children:s(C,{variant:"outline",role:"combobox","aria-expanded":g,className:"w-full justify-between font-normal",type:"button",children:[a("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:o.length>0?o.map(e=>s(h,{variant:"secondary",className:"mr-1 mb-1",children:[e.label,a("div",{role:"button",tabIndex:0,"aria-label":`remove ${e.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:n=>{n.key==="Enter"&&f(e)},onMouseDown:n=>{n.preventDefault(),n.stopPropagation()},onClick:()=>f(e),children:a(M,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},e.label)):a("span",{className:"text-foreground",children:S})}),a(B,{className:"size-4"})]})}),a(k,{align:"start",className:"w-full p-0",children:a(b,{children:s(P,{children:[a(_,{children:"No item found."}),Object.entries(E).map(([e,n],p)=>s(z,{children:[p>0&&a(N,{}),a(w,{heading:O?e:void 0,children:n.map(l=>{let v=o.some(c=>c.value===l.value);return s(D,{onSelect:()=>{u(v?o.filter(c=>c.value!==l.value):[...o,l])},children:[a(L,{className:m("mr-2 h-4 w-4",v?"opacity-100":"opacity-0")}),l.label]},l.label)})})]},e))]})})})]})}r(Z,"MultiSelect");export{Z as a};
2
- //# sourceMappingURL=chunk-RBJ5MFDE.js.map
1
+ import{b as x,c as y,d as k}from"./chunk-CU3WQ2KN.js";import{b as h}from"./chunk-OK3CYSHV.js";import{b as C}from"./chunk-4YPJKEHT.js";import{a as m}from"./chunk-3PIJOIYR.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as z,useState as G}from"react";import{Check as L,ChevronDownIcon as B,X as M}from"lucide-react";import{Command as i}from"cmdk";import{SearchIcon as H}from"lucide-react";import{jsx as d,jsxs as X}from"react/jsx-runtime";function b({className:t,...o}){return d(i,{"data-slot":"command",className:m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...o})}r(b,"Command");function P({className:t,...o}){return d(i.List,{"data-slot":"command-list",className:m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...o})}r(P,"CommandList");function _({...t}){return d(i.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}r(_,"CommandEmpty");function w({className:t,...o}){return d(i.Group,{"data-slot":"command-group",className:m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...o})}r(w,"CommandGroup");function N({className:t,...o}){return d(i.Separator,{"data-slot":"command-separator",className:m("bg-border -mx-1 h-px",t),...o})}r(N,"CommandSeparator");function D({className:t,...o}){return d(i.Item,{"data-slot":"command-item",className:m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...o})}r(D,"CommandItem");import{jsx as a,jsxs as s}from"react/jsx-runtime";function Z({options:t,selected:o,onChange:u,placeholder:S,...I}){let[g,R]=G(!1),f=r(e=>{u(o.filter(n=>n.value!==e.value))},"handleUnselect"),O=t.some(e=>e.category),E=t.reduce((e,n)=>{let p=n.category||"Uncategorized";return e[p]||(e[p]=[]),e[p].push(n),e},{});return s(x,{open:g,onOpenChange:R,...I,children:[a(y,{children:s(C,{variant:"outline",role:"combobox","aria-expanded":g,className:"w-full justify-between font-normal",type:"button",children:[a("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:o.length>0?o.map(e=>s(h,{variant:"secondary",className:"mr-1 mb-1",children:[e.label,a("div",{role:"button",tabIndex:0,"aria-label":`remove ${e.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:n=>{n.key==="Enter"&&f(e)},onMouseDown:n=>{n.preventDefault(),n.stopPropagation()},onClick:()=>f(e),children:a(M,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},e.label)):a("span",{className:"text-foreground",children:S})}),a(B,{className:"size-4"})]})}),a(k,{align:"start",className:"w-full p-0",children:a(b,{children:s(P,{children:[a(_,{children:"No item found."}),Object.entries(E).map(([e,n],p)=>s(z,{children:[p>0&&a(N,{}),a(w,{heading:O?e:void 0,children:n.map(l=>{let v=o.some(c=>c.value===l.value);return s(D,{onSelect:()=>{u(v?o.filter(c=>c.value!==l.value):[...o,l])},children:[a(L,{className:m("mr-2 h-4 w-4",v?"opacity-100":"opacity-0")}),l.label]},l.label)})})]},e))]})})})]})}r(Z,"MultiSelect");export{Z as a};
2
+ //# sourceMappingURL=chunk-T7CGGZOK.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-THBDZR3D.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-3X36ZFNP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
- //# sourceMappingURL=chunk-ZWO4HX27.js.map
1
+ import{a as m}from"./chunk-IRVF252A.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-X6ZAR7ZL.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
+ //# sourceMappingURL=chunk-TRR7P5XQ.js.map
@@ -1,2 +1,2 @@
1
- import{c as x,h as _}from"./chunk-H5CNWMEM.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
- //# sourceMappingURL=chunk-HYVK643F.js.map
1
+ import{c as x,h as _}from"./chunk-ZSJ6YADQ.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
+ //# sourceMappingURL=chunk-TZCNONDA.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-XFD3ULUF.js";import{a as k}from"./chunk-ZVUQDK2E.js";import{a as m,b as u,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as b}from"./chunk-EUSCQL4H.js";import{R as g,c as D,y as T}from"./chunk-PJ6ZEFWD.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";var y=n(e=>{let[t,r,o]=e.split("-").map(Number);return new Date(t,r-1,o)},"parseLocalDate");import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:r,options:o})=>{let{client:a}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>g({client:a,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:r}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let r=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${r} \u2192 ${o}`},"formatDateRange"),G=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(r=>({bookedDays:r?.data?.timeoffs?.reduce((o,a)=>o+(a?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:r?.data?.timeoffs?.map(o=>{let a=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:a,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:r})=>r,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[r,o])=>({...t,[r]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,r=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&r==="unlimited"?{value:t===0?20:t}:r==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function w(e,t){let r=0,o=0;return e.forEach(a=>{a.timeoff_days?.forEach(s=>{new Date(s.day)<=t?r+=s.hours||0:o+=s.hours||0})}),{before:r,after:o}}n(w,"getAllTimeoffHoursBeforeDate");var M=n(({employmentId:e,date:t,options:r})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:r?.enabled,select:n(o=>{let{before:a,after:s}=w(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:u(a),bookedDaysAfterTermination:u(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),de=n(({employmentId:e,proposedTerminationDate:t,employment:r})=>{let{value:o=0}=q(r),a=A({employmentId:e}),s=M({employmentId:e,date:t}),p=a.data?.data?.[0].annual_entitlement.type==="limited"?{days:a.data?.data?.[0].annual_entitlement.days,hours:a.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},d={days:a.data?.data?.[0].booked.days||0,hours:a.data?.data?.[0].booked.hours||0},f=a.data?.data?.[0].current_entitlement.type==="limited"?{days:a.data?.data?.[0].current_entitlement.days||0,hours:a.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:a.data?.data?.[0].used.days||0,hours:a.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},x=s.data?.bookedDaysAfterTermination||{days:0,hours:0},C=m(f.days,f.hours),H=m(l.days,l.hours),L=m(d.days,d.hours),P=C-H-L,O=_(u(P));return{data:{...F({entitledDays:p,bookedDays:d,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:x,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:r?.contract_details?.available_pto_type==="unlimited"},isLoading:a.isLoading||s.isLoading,isError:a.isError||s.isError,error:a.error||s.error}},"useSummaryTimeOffDataQuery"),fe=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),le=n(({formValues:e,jsfModify:t,step:r})=>Q({queryKey:["rmt-flows-termination-schema",r],queryFn:n(()=>k[r]??S,"queryFn"),select:n(({data:o})=>{let a=o?.schema||{};return b(a,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{y as a,c as b,G as c,A as d,M as e,de as f,fe as g,le as h};
2
- //# sourceMappingURL=chunk-UFTA5ATE.js.map
1
+ import{a as k}from"./chunk-ZVUQDK2E.js";import{a as S}from"./chunk-XFD3ULUF.js";import{a as m,b as u,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as b}from"./chunk-EUSCQL4H.js";import{T as g,c as D,y as T}from"./chunk-BYX2YS2B.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";var y=n(e=>{let[t,r,o]=e.split("-").map(Number);return new Date(t,r-1,o)},"parseLocalDate");import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:r,options:o})=>{let{client:a}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>g({client:a,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:r}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let r=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${r} \u2192 ${o}`},"formatDateRange"),G=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(r=>({bookedDays:r?.data?.timeoffs?.reduce((o,a)=>o+(a?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:r?.data?.timeoffs?.map(o=>{let a=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:a,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:r})=>r,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[r,o])=>({...t,[r]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,r=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&r==="unlimited"?{value:t===0?20:t}:r==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function w(e,t){let r=0,o=0;return e.forEach(a=>{a.timeoff_days?.forEach(s=>{new Date(s.day)<=t?r+=s.hours||0:o+=s.hours||0})}),{before:r,after:o}}n(w,"getAllTimeoffHoursBeforeDate");var M=n(({employmentId:e,date:t,options:r})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:r?.enabled,select:n(o=>{let{before:a,after:s}=w(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:u(a),bookedDaysAfterTermination:u(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),de=n(({employmentId:e,proposedTerminationDate:t,employment:r})=>{let{value:o=0}=q(r),a=A({employmentId:e}),s=M({employmentId:e,date:t}),p=a.data?.data?.[0].annual_entitlement.type==="limited"?{days:a.data?.data?.[0].annual_entitlement.days,hours:a.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},d={days:a.data?.data?.[0].booked.days||0,hours:a.data?.data?.[0].booked.hours||0},f=a.data?.data?.[0].current_entitlement.type==="limited"?{days:a.data?.data?.[0].current_entitlement.days||0,hours:a.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:a.data?.data?.[0].used.days||0,hours:a.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},x=s.data?.bookedDaysAfterTermination||{days:0,hours:0},C=m(f.days,f.hours),H=m(l.days,l.hours),L=m(d.days,d.hours),P=C-H-L,O=_(u(P));return{data:{...F({entitledDays:p,bookedDays:d,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:x,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:r?.contract_details?.available_pto_type==="unlimited"},isLoading:a.isLoading||s.isLoading,isError:a.isError||s.isError,error:a.error||s.error}},"useSummaryTimeOffDataQuery"),fe=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),le=n(({formValues:e,jsfModify:t,step:r})=>Q({queryKey:["rmt-flows-termination-schema",r],queryFn:n(()=>k[r]??S,"queryFn"),select:n(({data:o})=>{let a=o?.schema||{};return b(a,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{y as a,c as b,G as c,A as d,M as e,de as f,fe as g,le as h};
2
+ //# sourceMappingURL=chunk-UTNKUPL5.js.map
@@ -1,2 +1,2 @@
1
- import{b as t}from"./chunk-BDJLITVT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function p({helpCenter:e}){return e?n(t,{zendeskId:e.id,children:e.callToAction}):null}r(p,"HelpCenter");export{p as a};
2
- //# sourceMappingURL=chunk-SIP2BFZJ.js.map
1
+ import{b as t}from"./chunk-AA3QOH66.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function p({helpCenter:e}){return e?n(t,{zendeskId:e.id,children:e.callToAction}):null}r(p,"HelpCenter");export{p as a};
2
+ //# sourceMappingURL=chunk-UVAK3ZEO.js.map
@@ -1,2 +1,2 @@
1
- import{i as d,j as _,k as x,l as u,m as f}from"./chunk-H5CNWMEM.js";import{a as t}from"./chunk-J63QA2JC.js";import{a as p}from"./chunk-P37U34EQ.js";import*as b from"react";import{jsx as T}from"react/jsx-runtime";var n=b.forwardRef(({className:e,...r},a)=>T("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...r}));n.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function C({field:e,fieldState:r,fieldData:a}){let{name:i,label:c,description:s,maxLength:m}=a,g=e.value?.length??0;return l(d,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(_,{className:"RemoteFlows__TextArea__Label",children:c}),o(x,{children:o(n,{...e,value:e.value??"",onChange:F=>{e.onChange(F)},className:t(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:c})}),(s||m)&&l("div",{className:"flex items-center justify-between",children:[s&&o(u,{className:"RemoteFlows__TextArea__Description",children:s}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[g,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}p(C,"TextAreaFieldDefault");export{C as a};
2
- //# sourceMappingURL=chunk-2O6Z2KGG.js.map
1
+ import{i as d,j as _,k as x,l as u,m as f}from"./chunk-ZSJ6YADQ.js";import{a as t}from"./chunk-3PIJOIYR.js";import{a as p}from"./chunk-P37U34EQ.js";import*as b from"react";import{jsx as T}from"react/jsx-runtime";var n=b.forwardRef(({className:e,...r},a)=>T("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...r}));n.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function C({field:e,fieldState:r,fieldData:a}){let{name:i,label:c,description:s,maxLength:m}=a,g=e.value?.length??0;return l(d,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(_,{className:"RemoteFlows__TextArea__Label",children:c}),o(x,{children:o(n,{...e,value:e.value??"",onChange:F=>{e.onChange(F)},className:t(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:c})}),(s||m)&&l("div",{className:"flex items-center justify-between",children:[s&&o(u,{className:"RemoteFlows__TextArea__Description",children:s}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[g,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}p(C,"TextAreaFieldDefault");export{C as a};
2
+ //# sourceMappingURL=chunk-UXHMIIOB.js.map
@@ -1,2 +1,2 @@
1
- import{a as y,b as d,c as p,d as R}from"./chunk-XZLVP6EN.js";import{a as w}from"./chunk-KESYJ5QG.js";import{a as _,b as i}from"./chunk-J63QA2JC.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,c=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(c).map(({country:l,monthlyTotal:s,annualTotal:a})=>({country:l,monthlyCost:i(s,o.code),annualCost:i(a,o.code)})),u={monthlyTotal:i(t.reduce((l,s)=>l+s.employer_currency_costs.monthly_total,0),o.code),annualTotal:i(t.reduce((l,s)=>l+s.employer_currency_costs.annual_total,0),o.code)};return{currency:o,costsPerCountry:n,employeesCost:u}},"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:c,defaultValue:n="accordion",className:u})=>{let l=o.length===1?"grid-cols-2":"grid-cols-3";return e(y,{type:"single",collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",u),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:c.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"),S=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"),b=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:c,employeesCost:n}=v(t),[u,l]=h("summary");return!o||c.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(y,{type:"single",collapsible:!0,defaultValue:u,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:u==="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(S,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(b,{costsPerCountry:c})})]})]})})})},"SummaryResults");export{k as a};
2
- //# sourceMappingURL=chunk-VH4D3E42.js.map
1
+ import{a as y,b as d,c as p,d as R}from"./chunk-6VQEAU6A.js";import{a as w}from"./chunk-JJEFWMLY.js";import{a as _,b as i}from"./chunk-3PIJOIYR.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,c=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(c).map(({country:l,monthlyTotal:s,annualTotal:a})=>({country:l,monthlyCost:i(s,o.code),annualCost:i(a,o.code)})),u={monthlyTotal:i(t.reduce((l,s)=>l+s.employer_currency_costs.monthly_total,0),o.code),annualTotal:i(t.reduce((l,s)=>l+s.employer_currency_costs.annual_total,0),o.code)};return{currency:o,costsPerCountry:n,employeesCost:u}},"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:c,defaultValue:n="accordion",className:u})=>{let l=o.length===1?"grid-cols-2":"grid-cols-3";return e(y,{type:"single",collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",u),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:c.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"),S=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"),b=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:c,employeesCost:n}=v(t),[u,l]=h("summary");return!o||c.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(y,{type:"single",collapsible:!0,defaultValue:u,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:u==="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(S,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(b,{costsPerCountry:c})})]})]})})})},"SummaryResults");export{k as a};
2
+ //# sourceMappingURL=chunk-UXP2IITO.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-J63QA2JC.js";import{a as s}from"./chunk-P37U34EQ.js";import*as n from"react";import{Drawer as r}from"vaul";import{jsx as a,jsxs as l}from"react/jsx-runtime";var d=s(({shouldScaleBackground:e=!0,...t})=>a(r.Root,{shouldScaleBackground:e,...t}),"Drawer");d.displayName="Drawer";var N=r.Trigger,f=r.Portal,P=r.Close,m=n.forwardRef(({className:e,...t},o)=>a(r.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=r.Overlay.displayName;var D=n.forwardRef(({className:e,children:t,showHandle:o=!0,...c},p)=>l(f,{children:[a(m,{}),l(r.Content,{ref:p,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...c,children:[o&&a("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));D.displayName="DrawerContent";var w=s(({className:e,...t})=>a("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...t}),"DrawerHeader");w.displayName="DrawerHeader";var R=s(({className:e,...t})=>a("div",{className:i("mt-auto flex flex-col gap-2 p-4",e),...t}),"DrawerFooter");R.displayName="DrawerFooter";var u=n.forwardRef(({className:e,...t},o)=>a(r.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=r.Title.displayName;var g=n.forwardRef(({className:e,...t},o)=>a(r.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));g.displayName=r.Description.displayName;export{d as a,N as b,D as c,w as d,u as e,g as f};
2
- //# sourceMappingURL=chunk-NIQXQZ6X.js.map
1
+ import{a as i}from"./chunk-3PIJOIYR.js";import{a as s}from"./chunk-P37U34EQ.js";import*as n from"react";import{Drawer as r}from"vaul";import{jsx as a,jsxs as l}from"react/jsx-runtime";var d=s(({shouldScaleBackground:e=!0,...t})=>a(r.Root,{shouldScaleBackground:e,...t}),"Drawer");d.displayName="Drawer";var N=r.Trigger,f=r.Portal,P=r.Close,m=n.forwardRef(({className:e,...t},o)=>a(r.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=r.Overlay.displayName;var D=n.forwardRef(({className:e,children:t,showHandle:o=!0,...c},p)=>l(f,{children:[a(m,{}),l(r.Content,{ref:p,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...c,children:[o&&a("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));D.displayName="DrawerContent";var w=s(({className:e,...t})=>a("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...t}),"DrawerHeader");w.displayName="DrawerHeader";var R=s(({className:e,...t})=>a("div",{className:i("mt-auto flex flex-col gap-2 p-4",e),...t}),"DrawerFooter");R.displayName="DrawerFooter";var u=n.forwardRef(({className:e,...t},o)=>a(r.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=r.Title.displayName;var g=n.forwardRef(({className:e,...t},o)=>a(r.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));g.displayName=r.Description.displayName;export{d as a,N as b,D as c,w as d,u as e,g as f};
2
+ //# sourceMappingURL=chunk-W2PJUNWX.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-J63QA2JC.js";import{a}from"./chunk-P37U34EQ.js";import{cva as n}from"class-variance-authority";import{jsx as i}from"react/jsx-runtime";var o=n("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 c({className:t,variant:r,...s}){return i("div",{"data-slot":"alert",role:"alert",className:e(o({variant:r}),t),...s})}a(c,"Alert");function g({className:t,...r}){return i("div",{"data-slot":"alert-title",className:e("col-start-2 min-h-4 font-medium tracking-tight",t),...r})}a(g,"AlertTitle");function p({className:t,...r}){return i("div",{"data-slot":"alert-description",className:e("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block",t),...r})}a(p,"AlertDescription");export{c as a,g as b,p as c};
2
- //# sourceMappingURL=chunk-6MJ5MIUI.js.map
1
+ import{a as e}from"./chunk-3PIJOIYR.js";import{a}from"./chunk-P37U34EQ.js";import{cva as n}from"class-variance-authority";import{jsx as i}from"react/jsx-runtime";var o=n("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 c({className:t,variant:r,...s}){return i("div",{"data-slot":"alert",role:"alert",className:e(o({variant:r}),t),...s})}a(c,"Alert");function g({className:t,...r}){return i("div",{"data-slot":"alert-title",className:e("col-start-2 min-h-4 font-medium tracking-tight",t),...r})}a(g,"AlertTitle");function p({className:t,...r}){return i("div",{"data-slot":"alert-description",className:e("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block",t),...r})}a(p,"AlertDescription");export{c as a,g as b,p as c};
2
+ //# sourceMappingURL=chunk-W5EXVAEO.js.map
@@ -1,2 +1,2 @@
1
- import{i as C,j as a,k as d,l as i,m as u}from"./chunk-H5CNWMEM.js";import{a as c}from"./chunk-4XJEVGPI.js";import{a as h}from"./chunk-J63QA2JC.js";import{a as _}from"./chunk-P37U34EQ.js";import{Fragment as v,jsx as o,jsxs as r}from"react/jsx-runtime";var L=_(({field:l,fieldState:k,fieldData:p})=>{let{name:m,label:s,description:n,options:t,multiple:F}=p;return r(C,{"data-field":m,className:h(`RemoteFlows__CheckBoxField__Item__${m}`),children:[o(d,{children:r(v,{children:[t&&F?o(a,{children:s}):null,t&&F?t.map(e=>r("div",{className:"flex space-x-2",children:[o(c,{id:e.value,onCheckedChange:b=>{l.onChange(b===!0,e.value)},checked:l.value?.includes(e.value),className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:e.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:e.label})]},e.value)):r("div",{className:"flex space-x-2",children:[o(c,{id:m,onCheckedChange:e=>{l.onChange(e===!0,null)},checked:l.value,className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:m,className:"mb-0 RemoteFlows__CheckBox__Label",children:s})]})]})}),n&&o(i,{children:n}),k.error&&o(u,{})]})},"CheckboxFieldDefault");export{L as a};
2
- //# sourceMappingURL=chunk-GOEEA34E.js.map
1
+ import{i as C,j as a,k as d,l as i,m as u}from"./chunk-ZSJ6YADQ.js";import{a as c}from"./chunk-7SVSJ7NG.js";import{a as h}from"./chunk-3PIJOIYR.js";import{a as _}from"./chunk-P37U34EQ.js";import{Fragment as v,jsx as o,jsxs as r}from"react/jsx-runtime";var L=_(({field:l,fieldState:k,fieldData:p})=>{let{name:m,label:s,description:n,options:t,multiple:F}=p;return r(C,{"data-field":m,className:h(`RemoteFlows__CheckBoxField__Item__${m}`),children:[o(d,{children:r(v,{children:[t&&F?o(a,{children:s}):null,t&&F?t.map(e=>r("div",{className:"flex space-x-2",children:[o(c,{id:e.value,onCheckedChange:b=>{l.onChange(b===!0,e.value)},checked:l.value?.includes(e.value),className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:e.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:e.label})]},e.value)):r("div",{className:"flex space-x-2",children:[o(c,{id:m,onCheckedChange:e=>{l.onChange(e===!0,null)},checked:l.value,className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:m,className:"mb-0 RemoteFlows__CheckBox__Label",children:s})]})]})}),n&&o(i,{children:n}),k.error&&o(u,{})]})},"CheckboxFieldDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-WLMHGJWB.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-WR5DSTKP.js";import{a}from"./chunk-VNN6IP6P.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-6AXMBMQI.js";import{a as f}from"./chunk-NB3TN7O3.js";import{a as e}from"./chunk-FUPQCC4B.js";import{a as p}from"./chunk-NVX4O45S.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
- //# sourceMappingURL=chunk-G6BR4JI6.js.map
1
+ import{a as n}from"./chunk-WR5DSTKP.js";import{a}from"./chunk-MPYZD3SN.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-WROEWNZE.js";import{a as f}from"./chunk-3KS3MSNS.js";import{a as e}from"./chunk-ILH332UR.js";import{a as p}from"./chunk-DBUX7M4A.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-WQYW6TGP.js.map
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-KFWZDRDD.js";import{a as Y}from"./chunk-5FUJICAO.js";import{a as Q}from"./chunk-2YNDS45E.js";import{a as J}from"./chunk-5PVNZ6VO.js";import{a as H}from"./chunk-YRC6EEM3.js";import{a as q,b as B,c as L,d as z}from"./chunk-XSNWW3V4.js";import{g as Z,h as K}from"./chunk-UFTA5ATE.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-XDILBY5Y.js";import{a as N}from"./chunk-Q445EJX6.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as _}from"./chunk-T7O3YYOG.js";import{a as u,b as v}from"./chunk-BDJLITVT.js";import{n as $}from"./chunk-PJ6ZEFWD.js";import{a as D}from"./chunk-J63QA2JC.js";import{a as w}from"./chunk-3X36ZFNP.js";import{a as A}from"./chunk-5BRMLRS7.js";import{a as I}from"./chunk-Z5WMKCRJ.js";import{d as O}from"./chunk-KQPDXXG3.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=O();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>$({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("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:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote 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.",m(v,{external:!0,zendeskId:u.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:u.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:u.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await _(s,me.fields,{isPartialValidation:!0}):f?await _(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await _(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
2
- //# sourceMappingURL=chunk-6AXMBMQI.js.map
1
+ import{a as J}from"./chunk-5NZJD6CA.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-RQRODRCR.js";import{a as Y}from"./chunk-H2PKQ3ML.js";import{a as Q}from"./chunk-FI2MVRZR.js";import{a as H}from"./chunk-YRC6EEM3.js";import{a as q,b as B,c as L,d as z}from"./chunk-3PVZEAGI.js";import{g as Z,h as K}from"./chunk-UTNKUPL5.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-IUCFOQAD.js";import{a as N}from"./chunk-XY2IEZHC.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as _}from"./chunk-T7O3YYOG.js";import{a as u,b as v}from"./chunk-AA3QOH66.js";import{n as $}from"./chunk-BYX2YS2B.js";import{a as D}from"./chunk-3PIJOIYR.js";import{a as w}from"./chunk-X6ZAR7ZL.js";import{a as A}from"./chunk-5BRMLRS7.js";import{a as I}from"./chunk-Z5WMKCRJ.js";import{d as O}from"./chunk-KQPDXXG3.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=O();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>$({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("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:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote 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.",m(v,{external:!0,zendeskId:u.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:u.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:u.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await _(s,me.fields,{isPartialValidation:!0}):f?await _(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await _(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
2
+ //# sourceMappingURL=chunk-WROEWNZE.js.map
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-P37U34EQ.js";function u(o){let a=o.error||o;if(!a||!a.errors||typeof a.errors!="object")return[];let e=[];return Object.entries(a.errors).forEach(([i,r])=>{if(Array.isArray(r)){e.push({field:i,messages:r.map(t=>String(t))});return}r&&typeof r=="object"&&Object.entries(r).forEach(([t,s])=>{Array.isArray(s)&&e.push({field:t,messages:s.map(l=>String(l))})})}),e}n(u,"extractFieldErrors");function y(o){return{mutateAsyncOrThrow:n(a=>new Promise((e,i)=>{o.mutate(a,{onSuccess:n(r=>{if("data"in r&&r.data!==null&&!r.error)e(r.data);else{let t=u(r.error),s=r.error.error||r.error,{response:l}=r,d=typeof s?.message=="string"?s.message:"Something went wrong. Please try again later.";i({error:new Error(d),rawError:r.error,fieldErrors:t,response:l})}},"onSuccess"),onError:n(r=>{let t=u(r);i({error:r,rawError:r,fieldErrors:t,response:r?.response})},"onError")})}),"mutateAsyncOrThrow"),mutateAsync:n(a=>new Promise((e,i)=>{o.mutate(a,{onSuccess:n(r=>{if(r.data)e({data:r.data,error:null});else{let t=u(r.error),s=r.error.error||r.error,l=typeof s?.message=="string"?s.message:"Something went wrong. Please try again later.";e({data:null,error:new Error(l),rawError:r.error,fieldErrors:t})}},"onSuccess"),onError:n(r=>{let t=u(r);i({data:null,error:r,rawError:r,fieldErrors:t})},"onError")})}),"mutateAsync")}}n(y,"mutationToPromise");function c(o,a){return!o||o.length===0?[]:o.map(e=>{let r=a?.[e.field]?.label||e.field;return{...e,userFriendlyLabel:r,field:e.field,messages:e.messages}})}n(c,"normalizeFieldErrors");export{y as a,c as b};
2
+ //# sourceMappingURL=chunk-X6ZAR7ZL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/mutations.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Meta } from '@/src/types/remoteFlows';\nimport { UseMutationResult } from '@tanstack/react-query';\n\ntype MutationData<T> =\n T extends UseMutationResult<infer R, any, any, any> ? R : never;\ntype MutationVariables<T> =\n T extends UseMutationResult<any, any, infer V, any> ? V : never;\ntype MutationError<T> =\n T extends UseMutationResult<any, infer E, any, any> ? E : never;\n\n/**\n * Unwraps the .data property from the response type\n * This matches the runtime behavior of mutateAsyncOrThrow which resolves with response.data\n */\ntype UnwrapData<T> = T extends { data: infer D } ? D : T;\n\nexport interface SuccessResponse<D> {\n data: D;\n error: null;\n}\n\nexport interface FieldError {\n field: string;\n messages: string[];\n}\n\nexport interface ErrorResponse<E> {\n data: null;\n error: E;\n rawError: Record<string, unknown>;\n fieldErrors: FieldError[];\n}\n\ntype PromiseResult<D, E> = SuccessResponse<D> | ErrorResponse<E>;\n\n/**\n * Extracts field errors from error response into a structured format\n * @param error - The error response object\n * @returns Array of field errors with field name and messages\n */\nexport function extractFieldErrors(error: any): FieldError[] {\n const errors = error.error || error;\n if (!errors || !errors.errors || typeof errors.errors !== 'object') return [];\n\n const fieldErrors: FieldError[] = [];\n\n Object.entries(errors.errors).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n fieldErrors.push({\n field: key,\n messages: value.map((msg: any) => String(msg)),\n });\n return;\n }\n if (value && typeof value === 'object') {\n Object.entries(value).forEach(([nestedKey, nestedValue]) => {\n if (Array.isArray(nestedValue)) {\n fieldErrors.push({\n field: nestedKey,\n messages: nestedValue.map((msg: any) => String(msg)),\n });\n }\n });\n }\n });\n return fieldErrors;\n}\n/**\n * Converts a mutation to a promise-based API. We avoid using the\n * `mutateAsync` method from react-query for 2 reasons:\n * 1. We lose the isPending state of the mutation\n * 2. We want to return the data and error in a consistent way\n * (either data or error is null)\n * @param mutation\n * @returns\n */\nexport function mutationToPromise<\n T extends UseMutationResult<any, any, any, any>,\n>(mutation: T) {\n type Data = MutationData<T>;\n type Variables = MutationVariables<T>;\n type Error = MutationError<T>;\n\n return {\n mutateAsyncOrThrow: (values: Variables): Promise<UnwrapData<Data>> => {\n return new Promise((resolve, reject) => {\n mutation.mutate(values, {\n onSuccess: (response) => {\n if (\n 'data' in response &&\n response.data !== null &&\n !response.error\n ) {\n resolve(response.data as UnwrapData<Data>);\n } else {\n const fieldErrors = extractFieldErrors(response.error);\n const errorData = response.error.error || response.error;\n const { response: httpResponse } = response;\n const errorMessage =\n typeof errorData?.message === 'string'\n ? errorData.message\n : 'Something went wrong. Please try again later.';\n reject({\n error: new Error(errorMessage),\n rawError: response.error,\n fieldErrors,\n response: httpResponse,\n });\n }\n },\n onError: (error) => {\n const fieldErrors = extractFieldErrors(error);\n reject({\n error: error as Error,\n rawError: error,\n fieldErrors,\n response: error?.response,\n });\n },\n });\n });\n },\n /**\n * @deprecated Use mutateAsyncOrThrow instead, this method will be removed as the the one below handles errors better\n */\n mutateAsync: (values: Variables): Promise<PromiseResult<Data, Error>> => {\n return new Promise((resolve, reject) => {\n mutation.mutate(values, {\n onSuccess: (response) => {\n if (response.data) {\n resolve({\n data: response.data as Data,\n error: null,\n });\n } else {\n const fieldErrors = extractFieldErrors(response.error);\n // Unwrap the error if it is an object with an error property\n const errorData = response.error.error || response.error;\n const errorMessage =\n typeof errorData?.message === 'string'\n ? errorData.message\n : 'Something went wrong. Please try again later.';\n resolve({\n data: null,\n error: new Error(errorMessage) as unknown as Error,\n rawError: response.error,\n fieldErrors,\n });\n }\n },\n onError: (error) => {\n const fieldErrors = extractFieldErrors(error);\n reject({\n data: null,\n error: error as Error,\n rawError: error,\n fieldErrors,\n });\n },\n });\n });\n },\n };\n}\n\n/**\n * Enhanced FieldError interface with user-friendly labels\n */\nexport interface NormalizedFieldError extends FieldError {\n userFriendlyLabel: string;\n}\n\n/**\n * Utility function to normalize field errors using field metadata\n * @param fieldErrors - Array of field errors from API response\n * @param meta - Field metadata containing field names and labels\n * @returns Normalized field errors with user-friendly labels\n */\nexport function normalizeFieldErrors(\n fieldErrors: FieldError[],\n meta?: Meta,\n): NormalizedFieldError[] {\n if (!fieldErrors || fieldErrors.length === 0) {\n return [];\n }\n\n return fieldErrors.map((fieldError) => {\n const fieldMeta = meta?.[fieldError.field];\n const userFriendlyLabel = fieldMeta?.label || fieldError.field;\n\n return {\n ...fieldError,\n userFriendlyLabel,\n // Keep the original field name for form integration\n field: fieldError.field,\n messages: fieldError.messages,\n };\n });\n}\n"],"mappings":"wCAyCO,SAASA,EAAmBC,EAA0B,CAC3D,IAAMC,EAASD,EAAM,OAASA,EAC9B,GAAI,CAACC,GAAU,CAACA,EAAO,QAAU,OAAOA,EAAO,QAAW,SAAU,MAAO,CAAC,EAE5E,IAAMC,EAA4B,CAAC,EAEnC,cAAO,QAAQD,EAAO,MAAM,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CACtD,GAAI,MAAM,QAAQA,CAAK,EAAG,CACxBF,EAAY,KAAK,CACf,MAAOC,EACP,SAAUC,EAAM,IAAKC,GAAa,OAAOA,CAAG,CAAC,CAC/C,CAAC,EACD,MACF,CACID,GAAS,OAAOA,GAAU,UAC5B,OAAO,QAAQA,CAAK,EAAE,QAAQ,CAAC,CAACE,EAAWC,CAAW,IAAM,CACtD,MAAM,QAAQA,CAAW,GAC3BL,EAAY,KAAK,CACf,MAAOI,EACP,SAAUC,EAAY,IAAKF,GAAa,OAAOA,CAAG,CAAC,CACrD,CAAC,CAEL,CAAC,CAEL,CAAC,EACMH,CACT,CA1BgBM,EAAAT,EAAA,sBAoCT,SAASU,EAEdC,EAAa,CAKb,MAAO,CACL,mBAAoBF,EAACG,GACZ,IAAI,QAAQ,CAACC,EAASC,IAAW,CACtCH,EAAS,OAAOC,EAAQ,CACtB,UAAWH,EAACM,GAAa,CACvB,GACE,SAAUA,GACVA,EAAS,OAAS,MAClB,CAACA,EAAS,MAEVF,EAAQE,EAAS,IAAwB,MACpC,CACL,IAAMZ,EAAcH,EAAmBe,EAAS,KAAK,EAC/CC,EAAYD,EAAS,MAAM,OAASA,EAAS,MAC7C,CAAE,SAAUE,CAAa,EAAIF,EAC7BG,EACJ,OAAOF,GAAW,SAAY,SAC1BA,EAAU,QACV,gDACNF,EAAO,CACL,MAAO,IAAI,MAAMI,CAAY,EAC7B,SAAUH,EAAS,MACnB,YAAAZ,EACA,SAAUc,CACZ,CAAC,CACH,CACF,EAtBW,aAuBX,QAASR,EAACR,GAAU,CAClB,IAAME,EAAcH,EAAmBC,CAAK,EAC5Ca,EAAO,CACL,MAAOb,EACP,SAAUA,EACV,YAAAE,EACA,SAAUF,GAAO,QACnB,CAAC,CACH,EARS,UASX,CAAC,CACH,CAAC,EApCiB,sBAyCpB,YAAaQ,EAACG,GACL,IAAI,QAAQ,CAACC,EAASC,IAAW,CACtCH,EAAS,OAAOC,EAAQ,CACtB,UAAWH,EAACM,GAAa,CACvB,GAAIA,EAAS,KACXF,EAAQ,CACN,KAAME,EAAS,KACf,MAAO,IACT,CAAC,MACI,CACL,IAAMZ,EAAcH,EAAmBe,EAAS,KAAK,EAE/CC,EAAYD,EAAS,MAAM,OAASA,EAAS,MAC7CG,EACJ,OAAOF,GAAW,SAAY,SAC1BA,EAAU,QACV,gDACNH,EAAQ,CACN,KAAM,KACN,MAAO,IAAI,MAAMK,CAAY,EAC7B,SAAUH,EAAS,MACnB,YAAAZ,CACF,CAAC,CACH,CACF,EArBW,aAsBX,QAASM,EAACR,GAAU,CAClB,IAAME,EAAcH,EAAmBC,CAAK,EAC5Ca,EAAO,CACL,KAAM,KACN,MAAOb,EACP,SAAUA,EACV,YAAAE,CACF,CAAC,CACH,EARS,UASX,CAAC,CACH,CAAC,EAnCU,cAqCf,CACF,CAvFgBM,EAAAC,EAAA,qBAsGT,SAASS,EACdhB,EACAiB,EACwB,CACxB,MAAI,CAACjB,GAAeA,EAAY,SAAW,EAClC,CAAC,EAGHA,EAAY,IAAKkB,GAAe,CAErC,IAAMC,EADYF,IAAOC,EAAW,KAAK,GACJ,OAASA,EAAW,MAEzD,MAAO,CACL,GAAGA,EACH,kBAAAC,EAEA,MAAOD,EAAW,MAClB,SAAUA,EAAW,QACvB,CACF,CAAC,CACH,CApBgBZ,EAAAU,EAAA","names":["extractFieldErrors","error","errors","fieldErrors","key","value","msg","nestedKey","nestedValue","__name","mutationToPromise","mutation","values","resolve","reject","response","errorData","httpResponse","errorMessage","normalizeFieldErrors","meta","fieldError","userFriendlyLabel"]}
@@ -1,2 +1,2 @@
1
- import{A as r}from"./chunk-PJ6ZEFWD.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as l}from"@tanstack/react-query";var f=e(({employmentId:t,queryParams:m})=>{let{client:n}=o();return l({queryKey:["employment",t],retry:!1,queryFn:e(()=>r({client:n,headers:{Authorization:""},path:{employment_id:t},query:m}),"queryFn"),enabled:!!t,select:e(({data:s})=>s?.data?.employment,"select")})},"useEmploymentQuery");export{f as a};
2
- //# sourceMappingURL=chunk-Q445EJX6.js.map
1
+ import{B as r}from"./chunk-BYX2YS2B.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as l}from"@tanstack/react-query";var f=e(({employmentId:t,queryParams:m})=>{let{client:n}=o();return l({queryKey:["employment",t],retry:!1,queryFn:e(()=>r({client:n,headers:{Authorization:""},path:{employment_id:t},query:m}),"queryFn"),enabled:!!t,select:e(({data:s})=>s?.data?.employment,"select")})},"useEmploymentQuery");export{f as a};
2
+ //# sourceMappingURL=chunk-XY2IEZHC.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-THBDZR3D.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-T7O3YYOG.js";import{b as s}from"./chunk-3X36ZFNP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
- //# sourceMappingURL=chunk-QLB4FSLX.js.map
1
+ import{a as m}from"./chunk-IRVF252A.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-T7O3YYOG.js";import{b as s}from"./chunk-X6ZAR7ZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
+ //# sourceMappingURL=chunk-XZLBYJZJ.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-THBDZR3D.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
- //# sourceMappingURL=chunk-LGIHVJA5.js.map
1
+ import{a}from"./chunk-IRVF252A.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
+ //# sourceMappingURL=chunk-Y7GCA66L.js.map
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-2PUPF2EN.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{j as n}from"./chunk-3PIJOIYR.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function g({onSubmit:l,onSuccess:u,onError:d}){let{contractorOnboardingBag:i}=a(),m=e(async t=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire);d?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return b(s,{defaultValues:p,onSubmit:m})}e(g,"EligibilityQuestionnaireStep");export{g as a};
2
+ //# sourceMappingURL=chunk-Y7QMIMYP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.tsx"],"sourcesContent":["import { $TSFixMe } from '@/src/types/remoteFlows';\nimport { NormalizedFieldError } from '@/src/lib/mutations';\nimport { useContractorOnboardingContext } from '@/src/flows/ContractorOnboarding/context';\nimport { ContractorOnboardingForm } from '@/src/flows/ContractorOnboarding/components/ContractorOnboardingForm';\nimport { handleStepError } from '@/src/lib/utils';\nimport {\n EligibilityQuestionnaireFormPayload,\n EligibilityQuestionnaireResponse,\n} from '@/src/flows/ContractorOnboarding/types';\n\ntype EligibilityQuestionnaireStepProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (\n payload: EligibilityQuestionnaireFormPayload,\n ) => void | Promise<void>;\n /*\n * The function is called when the form submission is successful.\n */\n onSuccess?: (data: EligibilityQuestionnaireResponse) => void | Promise<void>;\n /*\n * The function is called when an error occurs during form submission.\n */\n onError?: ({\n error,\n rawError,\n fieldErrors,\n }: {\n error: Error;\n rawError: Record<string, unknown>;\n fieldErrors: NormalizedFieldError[];\n }) => void;\n};\n\nexport function EligibilityQuestionnaireStep({\n onSubmit,\n onSuccess,\n onError,\n}: EligibilityQuestionnaireStepProps) {\n const { contractorOnboardingBag } = useContractorOnboardingContext();\n\n const handleSubmit = async (payload: $TSFixMe) => {\n try {\n const parsedValues =\n await contractorOnboardingBag.parseFormValues(payload);\n await onSubmit?.(parsedValues as EligibilityQuestionnaireFormPayload);\n const response = await contractorOnboardingBag.onSubmit(payload);\n if (response?.data) {\n await onSuccess?.(response?.data as EligibilityQuestionnaireResponse);\n contractorOnboardingBag?.next();\n return;\n }\n } catch (error: unknown) {\n const structuredError = handleStepError(\n error,\n contractorOnboardingBag.meta?.fields?.eligibility_questionnaire,\n );\n onError?.(structuredError);\n }\n };\n\n const initialValues =\n contractorOnboardingBag.stepState.values?.eligibility_questionnaire ||\n contractorOnboardingBag.initialValues.eligibility_questionnaire;\n\n return (\n <ContractorOnboardingForm\n defaultValues={initialValues}\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"gKAmEI,cAAAA,MAAA,oBAhCG,SAASC,EAA6B,CAC3C,SAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAAsC,CACpC,GAAM,CAAE,wBAAAC,CAAwB,EAAIC,EAA+B,EAE7DC,EAAeC,EAAA,MAAOC,GAAsB,CAChD,GAAI,CACF,IAAMC,EACJ,MAAML,EAAwB,gBAAgBI,CAAO,EACvD,MAAMP,IAAWQ,CAAmD,EACpE,IAAMC,EAAW,MAAMN,EAAwB,SAASI,CAAO,EAC/D,GAAIE,GAAU,KAAM,CAClB,MAAMR,IAAYQ,GAAU,IAAwC,EACpEN,GAAyB,KAAK,EAC9B,MACF,CACF,OAASO,EAAgB,CACvB,IAAMC,EAAkBC,EACtBF,EACAP,EAAwB,MAAM,QAAQ,yBACxC,EACAD,IAAUS,CAAe,CAC3B,CACF,EAlBqB,gBAoBfE,EACJV,EAAwB,UAAU,QAAQ,2BAC1CA,EAAwB,cAAc,0BAExC,OACEL,EAACgB,EAAA,CACC,cAAeD,EACf,SAAUR,EACZ,CAEJ,CArCgBC,EAAAP,EAAA","names":["jsx","EligibilityQuestionnaireStep","onSubmit","onSuccess","onError","contractorOnboardingBag","useContractorOnboardingContext","handleSubmit","__name","payload","parsedValues","response","error","structuredError","handleStepError","initialValues","ContractorOnboardingForm"]}
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-YUYHK6WD.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as l}from"react";import{Document as b,Page as h,pdfjs as p}from"react-pdf";import{jsx as e,jsxs as o}from"react/jsx-runtime";p.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${p.version}/build/pdf.worker.min.mjs`;function L({base64Data:s,fileName:m="document.pdf"}){let[n,g]=l(0),[i,c]=l(1),[f,u]=l(!0),[d,v]=l(""),x=r(({numPages:t})=>{g(t),u(!1),v("")},"onDocumentLoadSuccess"),P=r(t=>{console.error("Error loading PDF:",t),v("Failed to load PDF document"),u(!1)},"onDocumentLoadError"),N=r(()=>{c(t=>Math.max(1,t-1))},"goToPrevPage"),w=r(()=>{c(t=>Math.min(n,t+1))},"goToNextPage");return s?o("div",{className:"w-full space-y-4",children:[o("div",{children:[o("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[f&&o("div",{className:"text-center",children:[e("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),e("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&o("div",{className:"text-center space-y-4",children:[e("p",{className:"text-red-600",children:d}),e(a,{asChild:!0,children:e("a",{href:s,download:m,children:"Download PDF Instead"})})]}),!d&&e(b,{file:s,onLoadSuccess:x,onLoadError:P,loading:"",className:"flex flex-col items-center",children:e(h,{pageNumber:i,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&e("div",{className:"border-t bg-white px-4 py-3",children:o("div",{className:"flex items-center justify-between",children:[e(a,{onClick:N,disabled:i<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),o("div",{className:"text-sm text-gray-600",children:["Page ",i," of ",n]}),e(a,{onClick:w,disabled:i>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),o("div",{className:"flex justify-between items-center text-sm",children:[e("p",{className:"text-gray-600",children:m}),e(a,{variant:"link",size:"link",asChild:!0,children:o("a",{href:s,download:m,className:"flex items-center gap-1",children:[e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):e("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:e("p",{className:"text-gray-500",children:"No PDF data available"})})}r(L,"PDFPreviewDefault");export{L as a};
2
- //# sourceMappingURL=chunk-A3TXUJUO.js.map
1
+ import{b as a}from"./chunk-4YPJKEHT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as l}from"react";import{Document as b,Page as h,pdfjs as p}from"react-pdf";import{jsx as e,jsxs as o}from"react/jsx-runtime";p.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${p.version}/build/pdf.worker.min.mjs`;function L({base64Data:s,fileName:m="document.pdf"}){let[n,g]=l(0),[i,c]=l(1),[f,u]=l(!0),[d,v]=l(""),x=r(({numPages:t})=>{g(t),u(!1),v("")},"onDocumentLoadSuccess"),P=r(t=>{console.error("Error loading PDF:",t),v("Failed to load PDF document"),u(!1)},"onDocumentLoadError"),N=r(()=>{c(t=>Math.max(1,t-1))},"goToPrevPage"),w=r(()=>{c(t=>Math.min(n,t+1))},"goToNextPage");return s?o("div",{className:"w-full space-y-4",children:[o("div",{children:[o("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[f&&o("div",{className:"text-center",children:[e("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),e("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&o("div",{className:"text-center space-y-4",children:[e("p",{className:"text-red-600",children:d}),e(a,{asChild:!0,children:e("a",{href:s,download:m,children:"Download PDF Instead"})})]}),!d&&e(b,{file:s,onLoadSuccess:x,onLoadError:P,loading:"",className:"flex flex-col items-center",children:e(h,{pageNumber:i,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&e("div",{className:"border-t bg-white px-4 py-3",children:o("div",{className:"flex items-center justify-between",children:[e(a,{onClick:N,disabled:i<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),o("div",{className:"text-sm text-gray-600",children:["Page ",i," of ",n]}),e(a,{onClick:w,disabled:i>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),o("div",{className:"flex justify-between items-center text-sm",children:[e("p",{className:"text-gray-600",children:m}),e(a,{variant:"link",size:"link",asChild:!0,children:o("a",{href:s,download:m,className:"flex items-center gap-1",children:[e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):e("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:e("p",{className:"text-gray-500",children:"No PDF data available"})})}r(L,"PDFPreviewDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-YA2G4A3K.js.map
@@ -1,2 +1,2 @@
1
- import{l as J}from"./chunk-4ECYU3L5.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-GWR2JBG2.js";import{c as B,l as A}from"./chunk-H5CNWMEM.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
- //# sourceMappingURL=chunk-E7JOGKEV.js.map
1
+ import{l as J}from"./chunk-4AM73KSF.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-D5NBOIPS.js";import{c as B,l as A}from"./chunk-ZSJ6YADQ.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
+ //# sourceMappingURL=chunk-YAJCRUQL.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-J63QA2JC.js";import{a}from"./chunk-P37U34EQ.js";import*as l from"@radix-ui/react-collapsible";var d=l.Root,g=l.CollapsibleTrigger,v=l.CollapsibleContent;import*as i from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function u({className:o,...e}){return n(i.Root,{"data-slot":"tabs",className:t("flex flex-col gap-2",o),...e})}a(u,"Tabs");function C({className:o,...e}){return n(i.List,{"data-slot":"tabs-list",className:t("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",o),...e})}a(C,"TabsList");function x({className:o,...e}){return n(i.Trigger,{"data-slot":"tabs-trigger",className:t("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",o),...e})}a(x,"TabsTrigger");function T({className:o,...e}){return n(i.Content,{"data-slot":"tabs-content",className:t("flex-1 outline-none",o),...e})}a(T,"TabsContent");import*as p from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as s,jsxs as P}from"react/jsx-runtime";var f=p.forwardRef(({className:o,children:e,...c},m)=>P(r.Root,{ref:m,className:t("relative overflow-hidden",o),...c,children:[s(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),s(b,{}),s(r.Corner,{})]}));f.displayName=r.Root.displayName;var b=p.forwardRef(({className:o,orientation:e="vertical",...c},m)=>s(r.ScrollAreaScrollbar,{ref:m,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),...c,children:s(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));b.displayName=r.ScrollAreaScrollbar.displayName;export{d as a,g as b,v as c,u as d,C as e,x as f,T as g,f as h};
2
- //# sourceMappingURL=chunk-2Q57B73D.js.map
1
+ import{a as t}from"./chunk-3PIJOIYR.js";import{a}from"./chunk-P37U34EQ.js";import*as l from"@radix-ui/react-collapsible";var d=l.Root,g=l.CollapsibleTrigger,v=l.CollapsibleContent;import*as i from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function u({className:o,...e}){return n(i.Root,{"data-slot":"tabs",className:t("flex flex-col gap-2",o),...e})}a(u,"Tabs");function C({className:o,...e}){return n(i.List,{"data-slot":"tabs-list",className:t("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",o),...e})}a(C,"TabsList");function x({className:o,...e}){return n(i.Trigger,{"data-slot":"tabs-trigger",className:t("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",o),...e})}a(x,"TabsTrigger");function T({className:o,...e}){return n(i.Content,{"data-slot":"tabs-content",className:t("flex-1 outline-none",o),...e})}a(T,"TabsContent");import*as p from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as s,jsxs as P}from"react/jsx-runtime";var f=p.forwardRef(({className:o,children:e,...c},m)=>P(r.Root,{ref:m,className:t("relative overflow-hidden",o),...c,children:[s(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),s(b,{}),s(r.Corner,{})]}));f.displayName=r.Root.displayName;var b=p.forwardRef(({className:o,orientation:e="vertical",...c},m)=>s(r.ScrollAreaScrollbar,{ref:m,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),...c,children:s(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));b.displayName=r.ScrollAreaScrollbar.displayName;export{d as a,g as b,v as c,u as d,C as e,x as f,T as g,f as h};
2
+ //# sourceMappingURL=chunk-ZIXR3VSB.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-RBJ5MFDE.js";import{i,j as a,k as c,l as p,m as F}from"./chunk-H5CNWMEM.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as D}from"react/jsx-runtime";var N=n(({field:t,fieldState:d,fieldData:_})=>{let[f,r]=g([]),{name:s,label:v,description:m,options:l}=_,C=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{r(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),D(i,{"data-field":s,className:`RemoteFlows__SelectField__Item__${s}`,children:[o(a,{className:"RemoteFlows__SelectField__Label",children:v}),o(c,{children:o(u,{options:l||[],selected:C,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),r(e)}})}),m&&o(p,{children:m}),d.error&&o(F,{})]})},"MultiSelectFieldDefault");export{N as a};
2
- //# sourceMappingURL=chunk-4XV4INW5.js.map
1
+ import{a as u}from"./chunk-T7CGGZOK.js";import{i,j as a,k as c,l as p,m as F}from"./chunk-ZSJ6YADQ.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as D}from"react/jsx-runtime";var N=n(({field:t,fieldState:d,fieldData:_})=>{let[f,r]=g([]),{name:s,label:v,description:m,options:l}=_,C=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{r(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),D(i,{"data-field":s,className:`RemoteFlows__SelectField__Item__${s}`,children:[o(a,{className:"RemoteFlows__SelectField__Label",children:v}),o(c,{children:o(u,{options:l||[],selected:C,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),r(e)}})}),m&&o(p,{children:m}),d.error&&o(F,{})]})},"MultiSelectFieldDefault");export{N as a};
2
+ //# sourceMappingURL=chunk-ZKS7DJDT.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-J63QA2JC.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
- //# sourceMappingURL=chunk-MIK6GCO2.js.map
1
+ import{a as t}from"./chunk-3PIJOIYR.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
+ //# sourceMappingURL=chunk-ZPDZ6V5R.js.map
@@ -1,2 +1,2 @@
1
- import{e as t}from"./chunk-J63QA2JC.js";import{b as m}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function f({title:o,description:r,severity:p}){let{components:a}=m(),n=a.statement;if(!n)throw new Error("Statement component not found");return s(n,{data:{title:o?t(o):void 0,description:t(r),severity:p}})}e(f,"Statement");export{f as a};
2
- //# sourceMappingURL=chunk-UAACHXXX.js.map
1
+ import{e as t}from"./chunk-3PIJOIYR.js";import{b as m}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function f({title:o,description:r,severity:p}){let{components:a}=m(),n=a.statement;if(!n)throw new Error("Statement component not found");return s(n,{data:{title:o?t(o):void 0,description:t(r),severity:p}})}e(f,"Statement");export{f as a};
2
+ //# sourceMappingURL=chunk-ZPG6GRAX.js.map