@remoteoss/remote-flows 0.18.0 → 0.19.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 (242) hide show
  1. package/dist/{chunk-A522V6XF.js → chunk-27PK3DVV.js} +2 -2
  2. package/dist/{chunk-3O2RD3RK.js → chunk-2EN2X5NU.js} +2 -2
  3. package/dist/chunk-2ERB4H3T.js +2 -0
  4. package/dist/chunk-2ERB4H3T.js.map +1 -0
  5. package/dist/chunk-32GSS4UM.js +2 -0
  6. package/dist/{chunk-NBCZF2FO.js.map → chunk-32GSS4UM.js.map} +1 -1
  7. package/dist/{chunk-N5I33LIN.js → chunk-5ISPIMTZ.js} +2 -2
  8. package/dist/{chunk-U4NWXPI5.js → chunk-5NDSOA6K.js} +2 -2
  9. package/dist/{chunk-U4NWXPI5.js.map → chunk-5NDSOA6K.js.map} +1 -1
  10. package/dist/{chunk-ALYKEN3E.js → chunk-5NPHBFW7.js} +2 -2
  11. package/dist/{chunk-CYKK3LPJ.js → chunk-6F66NTNI.js} +2 -2
  12. package/dist/{chunk-MRMVBBVZ.js → chunk-6NIRGHFF.js} +2 -2
  13. package/dist/chunk-6NXC6SLB.js +1 -0
  14. package/dist/{chunk-A6EYY3FO.js → chunk-73A7SYGH.js} +2 -2
  15. package/dist/{chunk-MLB2I27G.js → chunk-7CHZ25AS.js} +2 -2
  16. package/dist/{chunk-4R3ITKOA.js → chunk-7DKOWSJ3.js} +2 -2
  17. package/dist/{chunk-OZ63OC3N.js → chunk-7EI4E76I.js} +2 -2
  18. package/dist/{chunk-RZTT3MEP.js → chunk-7SR3FCW6.js} +2 -2
  19. package/dist/chunk-AHUK7NSK.js +2 -0
  20. package/dist/chunk-AHUK7NSK.js.map +1 -0
  21. package/dist/{chunk-BFOGH4SF.js → chunk-AS6DCKEJ.js} +2 -2
  22. package/dist/{chunk-6NKUEDYP.js → chunk-BE54D4XM.js} +2 -2
  23. package/dist/{chunk-7P5B6XHM.js → chunk-BM3AKYMT.js} +2 -2
  24. package/dist/{chunk-H4KE45NG.js → chunk-BZIVYUMH.js} +2 -2
  25. package/dist/{chunk-EGQJ7UBR.js → chunk-E3QWREZF.js} +1 -1
  26. package/dist/chunk-E5PSJ75C.js +2 -0
  27. package/dist/chunk-E5PSJ75C.js.map +1 -0
  28. package/dist/{chunk-ZSDJZMQW.js → chunk-F2E56YE2.js} +2 -2
  29. package/dist/{chunk-ZSDJZMQW.js.map → chunk-F2E56YE2.js.map} +1 -1
  30. package/dist/{chunk-XGEKV3FC.js → chunk-FQPU3JBJ.js} +2 -2
  31. package/dist/chunk-GC23RRCI.js +2 -0
  32. package/dist/chunk-GC23RRCI.js.map +1 -0
  33. package/dist/chunk-GPBU6CQP.js +2 -0
  34. package/dist/chunk-GPBU6CQP.js.map +1 -0
  35. package/dist/{chunk-BF2D5O5H.js → chunk-H6NMRBGZ.js} +2 -2
  36. package/dist/{chunk-A4KEKMEQ.js → chunk-H77RIB6S.js} +2 -2
  37. package/dist/chunk-INC2YFDP.js +2 -0
  38. package/dist/chunk-INC2YFDP.js.map +1 -0
  39. package/dist/{chunk-PHN4XMPV.js → chunk-J7JO4GF4.js} +2 -2
  40. package/dist/chunk-JBUNDNKJ.js +2 -0
  41. package/dist/chunk-JBUNDNKJ.js.map +1 -0
  42. package/dist/{chunk-6ZPISRAG.js → chunk-JIRA6B5O.js} +2 -2
  43. package/dist/{chunk-56DXHJNR.js → chunk-KVNG6CWQ.js} +2 -2
  44. package/dist/{chunk-7JQPHRUK.js → chunk-LUUUPLTW.js} +2 -2
  45. package/dist/{chunk-4B36XRKA.js → chunk-LYF7ISYE.js} +2 -2
  46. package/dist/chunk-MAHR7HCO.js +2 -0
  47. package/dist/chunk-MAHR7HCO.js.map +1 -0
  48. package/dist/chunk-N6G4VZXF.js +2 -0
  49. package/dist/chunk-N6G4VZXF.js.map +1 -0
  50. package/dist/{chunk-2VS6B3PC.js → chunk-NNM5M4E3.js} +2 -2
  51. package/dist/{chunk-7C2Z2EE5.js → chunk-OD37LQSP.js} +2 -2
  52. package/dist/{chunk-TLC5WQY2.js → chunk-OMECCA6L.js} +2 -2
  53. package/dist/{chunk-73H6SO2E.js → chunk-P5CLILU4.js} +2 -2
  54. package/dist/{chunk-CEUBVUKV.js → chunk-P6JDGCDA.js} +2 -2
  55. package/dist/{chunk-QKKEFL4Z.js → chunk-PBXZVY22.js} +2 -2
  56. package/dist/{chunk-ITSQE6EW.js → chunk-PHGCCQZ2.js} +2 -2
  57. package/dist/{chunk-ZOKSYPOP.js → chunk-PUSPB4CX.js} +2 -2
  58. package/dist/{chunk-I2A4EFDY.js → chunk-RM3HE733.js} +2 -2
  59. package/dist/{chunk-GGBEM452.js → chunk-TDQVKDQW.js} +2 -2
  60. package/dist/{chunk-DCRLPAJL.js → chunk-TPHCKHYD.js} +2 -2
  61. package/dist/{chunk-63HVO7J5.js → chunk-U4HGV7LP.js} +2 -2
  62. package/dist/chunk-UH3E6HSQ.js +2 -0
  63. package/dist/{chunk-QQ7KPOLK.js → chunk-W2PPGQL6.js} +2 -2
  64. package/dist/{chunk-QXPWESEW.js → chunk-XVTAPI3Z.js} +2 -2
  65. package/dist/{chunk-5BQOPJTQ.js → chunk-Y373YLLS.js} +2 -2
  66. package/dist/{chunk-JB55FFG6.js → chunk-Y4C57RXK.js} +2 -2
  67. package/dist/{chunk-V2YORDAL.js → chunk-YDNOMXS7.js} +2 -2
  68. package/dist/{chunk-53NFLDRX.js → chunk-Z6M74RQ7.js} +2 -2
  69. package/dist/chunk-ZX5OIIJX.js +1 -0
  70. package/dist/chunk-ZX5OIIJX.js.map +1 -0
  71. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  72. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  73. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +1 -1
  74. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  75. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  76. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  77. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  78. package/dist/flows/ContractAmendment/context.d.ts +2 -2
  79. package/dist/flows/ContractAmendment/hooks.d.ts +1 -1
  80. package/dist/flows/ContractAmendment/hooks.js +1 -1
  81. package/dist/flows/ContractAmendment/index.d.ts +1 -1
  82. package/dist/flows/ContractAmendment/index.js +1 -1
  83. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  84. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +20 -2
  85. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  86. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
  87. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  88. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  89. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  90. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  91. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  92. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  93. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  94. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  95. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  96. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  97. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  98. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  99. package/dist/flows/CostCalculator/api.d.ts +1 -1
  100. package/dist/flows/CostCalculator/api.js +1 -1
  101. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  102. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  103. package/dist/flows/CostCalculator/context.d.ts +2 -2
  104. package/dist/flows/CostCalculator/hooks.d.ts +1 -1
  105. package/dist/flows/CostCalculator/hooks.js +1 -1
  106. package/dist/flows/CostCalculator/index.d.ts +2 -2
  107. package/dist/flows/CostCalculator/index.js +1 -1
  108. package/dist/flows/CostCalculator/types.d.ts +1 -1
  109. package/dist/flows/CostCalculator/utils.d.ts +2 -2
  110. package/dist/flows/CostCalculator/utils.js +1 -1
  111. package/dist/flows/Onboarding/OnboardingFlow.d.ts +2 -2
  112. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  113. package/dist/flows/Onboarding/api.d.ts +2 -2
  114. package/dist/flows/Onboarding/api.js +1 -1
  115. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  116. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  117. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +1 -1
  118. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  119. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +2 -2
  120. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  121. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +1 -1
  122. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  123. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  124. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +2 -2
  125. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  126. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +1 -1
  127. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  128. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  129. package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
  130. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +1 -1
  131. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  132. package/dist/flows/Onboarding/context.d.ts +2 -2
  133. package/dist/flows/Onboarding/hooks.d.ts +2 -2
  134. package/dist/flows/Onboarding/hooks.js +1 -1
  135. package/dist/flows/Onboarding/index.d.ts +2 -2
  136. package/dist/flows/Onboarding/index.js +1 -1
  137. package/dist/flows/Onboarding/types.d.ts +1 -1
  138. package/dist/flows/Onboarding/utils.d.ts +1 -1
  139. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
  140. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  141. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
  142. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  143. package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
  144. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  145. package/dist/flows/Termination/TerminationBack.js +1 -1
  146. package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
  147. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  148. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.d.ts +5 -0
  149. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +2 -0
  150. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js.map +1 -0
  151. package/dist/flows/Termination/TerminationFlow.d.ts +2 -2
  152. package/dist/flows/Termination/TerminationFlow.js +1 -1
  153. package/dist/flows/Termination/TerminationForm.d.ts +1 -1
  154. package/dist/flows/Termination/TerminationForm.js +1 -1
  155. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  156. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  157. package/dist/flows/Termination/TimeOff.js +1 -1
  158. package/dist/flows/Termination/context.d.ts +2 -2
  159. package/dist/flows/Termination/hooks.d.ts +4 -3
  160. package/dist/flows/Termination/hooks.js +1 -1
  161. package/dist/flows/Termination/index.d.ts +2 -1
  162. package/dist/flows/Termination/index.js +1 -1
  163. package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +1 -0
  164. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  165. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +17 -1
  166. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  167. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  168. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +16 -0
  169. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  170. package/dist/flows/Termination/types.d.ts +1 -1
  171. package/dist/flows/api.d.ts +23 -0
  172. package/dist/flows/api.js +2 -0
  173. package/dist/flows/api.js.map +1 -0
  174. package/dist/index.css +1 -1
  175. package/dist/index.css.map +1 -1
  176. package/dist/index.d.ts +7 -4
  177. package/dist/index.js +1 -1
  178. package/dist/index.js.map +1 -1
  179. package/dist/internals.js +1 -1
  180. package/dist/internals.js.map +1 -1
  181. package/dist/{remoteFlows-BLMhusyP.d.ts → remoteFlows-DZCgZVnE.d.ts} +1 -1
  182. package/dist/{types.gen-CaXCWhlP.d.ts → types.gen-BbxQoQYr.d.ts} +9 -1
  183. package/package.json +1 -1
  184. package/dist/chunk-HSW5HMHH.js +0 -2
  185. package/dist/chunk-JODJFARP.js +0 -2
  186. package/dist/chunk-JODJFARP.js.map +0 -1
  187. package/dist/chunk-M22FKNEY.js +0 -1
  188. package/dist/chunk-NBCZF2FO.js +0 -2
  189. package/dist/chunk-NGJXBBXW.js +0 -2
  190. package/dist/chunk-NGJXBBXW.js.map +0 -1
  191. package/dist/chunk-NTEIOU72.js +0 -2
  192. package/dist/chunk-NTEIOU72.js.map +0 -1
  193. package/dist/chunk-OT2DXWYZ.js +0 -2
  194. package/dist/chunk-OT2DXWYZ.js.map +0 -1
  195. package/dist/chunk-VX2UC3HG.js +0 -2
  196. package/dist/chunk-VX2UC3HG.js.map +0 -1
  197. package/dist/chunk-WWANHPT7.js +0 -2
  198. package/dist/chunk-WWANHPT7.js.map +0 -1
  199. /package/dist/{chunk-A522V6XF.js.map → chunk-27PK3DVV.js.map} +0 -0
  200. /package/dist/{chunk-3O2RD3RK.js.map → chunk-2EN2X5NU.js.map} +0 -0
  201. /package/dist/{chunk-N5I33LIN.js.map → chunk-5ISPIMTZ.js.map} +0 -0
  202. /package/dist/{chunk-ALYKEN3E.js.map → chunk-5NPHBFW7.js.map} +0 -0
  203. /package/dist/{chunk-CYKK3LPJ.js.map → chunk-6F66NTNI.js.map} +0 -0
  204. /package/dist/{chunk-MRMVBBVZ.js.map → chunk-6NIRGHFF.js.map} +0 -0
  205. /package/dist/{chunk-M22FKNEY.js.map → chunk-6NXC6SLB.js.map} +0 -0
  206. /package/dist/{chunk-A6EYY3FO.js.map → chunk-73A7SYGH.js.map} +0 -0
  207. /package/dist/{chunk-MLB2I27G.js.map → chunk-7CHZ25AS.js.map} +0 -0
  208. /package/dist/{chunk-4R3ITKOA.js.map → chunk-7DKOWSJ3.js.map} +0 -0
  209. /package/dist/{chunk-OZ63OC3N.js.map → chunk-7EI4E76I.js.map} +0 -0
  210. /package/dist/{chunk-RZTT3MEP.js.map → chunk-7SR3FCW6.js.map} +0 -0
  211. /package/dist/{chunk-BFOGH4SF.js.map → chunk-AS6DCKEJ.js.map} +0 -0
  212. /package/dist/{chunk-6NKUEDYP.js.map → chunk-BE54D4XM.js.map} +0 -0
  213. /package/dist/{chunk-7P5B6XHM.js.map → chunk-BM3AKYMT.js.map} +0 -0
  214. /package/dist/{chunk-H4KE45NG.js.map → chunk-BZIVYUMH.js.map} +0 -0
  215. /package/dist/{chunk-EGQJ7UBR.js.map → chunk-E3QWREZF.js.map} +0 -0
  216. /package/dist/{chunk-XGEKV3FC.js.map → chunk-FQPU3JBJ.js.map} +0 -0
  217. /package/dist/{chunk-BF2D5O5H.js.map → chunk-H6NMRBGZ.js.map} +0 -0
  218. /package/dist/{chunk-A4KEKMEQ.js.map → chunk-H77RIB6S.js.map} +0 -0
  219. /package/dist/{chunk-PHN4XMPV.js.map → chunk-J7JO4GF4.js.map} +0 -0
  220. /package/dist/{chunk-6ZPISRAG.js.map → chunk-JIRA6B5O.js.map} +0 -0
  221. /package/dist/{chunk-56DXHJNR.js.map → chunk-KVNG6CWQ.js.map} +0 -0
  222. /package/dist/{chunk-7JQPHRUK.js.map → chunk-LUUUPLTW.js.map} +0 -0
  223. /package/dist/{chunk-4B36XRKA.js.map → chunk-LYF7ISYE.js.map} +0 -0
  224. /package/dist/{chunk-2VS6B3PC.js.map → chunk-NNM5M4E3.js.map} +0 -0
  225. /package/dist/{chunk-7C2Z2EE5.js.map → chunk-OD37LQSP.js.map} +0 -0
  226. /package/dist/{chunk-TLC5WQY2.js.map → chunk-OMECCA6L.js.map} +0 -0
  227. /package/dist/{chunk-73H6SO2E.js.map → chunk-P5CLILU4.js.map} +0 -0
  228. /package/dist/{chunk-CEUBVUKV.js.map → chunk-P6JDGCDA.js.map} +0 -0
  229. /package/dist/{chunk-QKKEFL4Z.js.map → chunk-PBXZVY22.js.map} +0 -0
  230. /package/dist/{chunk-ITSQE6EW.js.map → chunk-PHGCCQZ2.js.map} +0 -0
  231. /package/dist/{chunk-ZOKSYPOP.js.map → chunk-PUSPB4CX.js.map} +0 -0
  232. /package/dist/{chunk-I2A4EFDY.js.map → chunk-RM3HE733.js.map} +0 -0
  233. /package/dist/{chunk-GGBEM452.js.map → chunk-TDQVKDQW.js.map} +0 -0
  234. /package/dist/{chunk-DCRLPAJL.js.map → chunk-TPHCKHYD.js.map} +0 -0
  235. /package/dist/{chunk-63HVO7J5.js.map → chunk-U4HGV7LP.js.map} +0 -0
  236. /package/dist/{chunk-HSW5HMHH.js.map → chunk-UH3E6HSQ.js.map} +0 -0
  237. /package/dist/{chunk-QQ7KPOLK.js.map → chunk-W2PPGQL6.js.map} +0 -0
  238. /package/dist/{chunk-QXPWESEW.js.map → chunk-XVTAPI3Z.js.map} +0 -0
  239. /package/dist/{chunk-5BQOPJTQ.js.map → chunk-Y373YLLS.js.map} +0 -0
  240. /package/dist/{chunk-JB55FFG6.js.map → chunk-Y4C57RXK.js.map} +0 -0
  241. /package/dist/{chunk-V2YORDAL.js.map → chunk-YDNOMXS7.js.map} +0 -0
  242. /package/dist/{chunk-53NFLDRX.js.map → chunk-Z6M74RQ7.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{b as u}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-2VS6B3PC.js";import{f as l,g as p}from"./chunk-3BREUYLG.js";import{c as f}from"./chunk-PAQW5BFW.js";import{b as _}from"./chunk-TVZAFTPT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as a}from"react/jsx-runtime";var w=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:b,onError:m,onSuccess:A}){let{formId:C,contractAmendment:{checkFieldUpdates:h,fields:s,onSubmit:S,stepState:g,initialValues:i,handleValidation:y}}=_(),V=u(y),e=l({resolver:V,defaultValues:g.values?.form||i,shouldUnregister:!0,mode:"onBlur"});R(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&h(o)});return()=>t?.unsubscribe()},[]);let v=r(async t=>{let o=!1;for(let[c,P]of Object.entries(t))if(!w.includes(c)&&i[c]!==P){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=f(t,s,{isPartialValidation:!1});await b?.(d);let n=await S(t);n.error?m?.(n.error):await A?.(n.data)},"handleSubmit");return a(p,{...e,children:a("form",{id:C,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(v),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:a(F,{fields:s})})})}r(x,"ContractAmendmentForm");export{x as a};
2
- //# sourceMappingURL=chunk-A522V6XF.js.map
1
+ import{b as u}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-NNM5M4E3.js";import{f as l,g as p}from"./chunk-3BREUYLG.js";import{c as f}from"./chunk-PAQW5BFW.js";import{b as _}from"./chunk-TVZAFTPT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as a}from"react/jsx-runtime";var w=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:b,onError:m,onSuccess:A}){let{formId:C,contractAmendment:{checkFieldUpdates:h,fields:s,onSubmit:S,stepState:g,initialValues:i,handleValidation:y}}=_(),V=u(y),e=l({resolver:V,defaultValues:g.values?.form||i,shouldUnregister:!0,mode:"onBlur"});R(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&h(o)});return()=>t?.unsubscribe()},[]);let v=r(async t=>{let o=!1;for(let[c,P]of Object.entries(t))if(!w.includes(c)&&i[c]!==P){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=f(t,s,{isPartialValidation:!1});await b?.(d);let n=await S(t);n.error?m?.(n.error):await A?.(n.data)},"handleSubmit");return a(p,{...e,children:a("form",{id:C,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(v),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:a(F,{fields:s})})})}r(x,"ContractAmendmentForm");export{x as a};
2
+ //# sourceMappingURL=chunk-27PK3DVV.js.map
@@ -1,2 +1,2 @@
1
- import{b as n}from"./chunk-KSHK3ZPX.js";import{a as f}from"./chunk-2VS6B3PC.js";import{g as C}from"./chunk-3BREUYLG.js";import{a as i}from"./chunk-P37U34EQ.js";import{useEffect as b}from"react";import{jsx as l}from"react/jsx-runtime";function w({onSubmit:d,onError:m,onSuccess:p,shouldResetForm:u,resetFields:s}){let{form:o,formId:E,costCalculatorBag:r}=n(),{formState:{isSubmitSuccessful:e}}=o;b(()=>{if(e&&u){r?.resetForm(),o.reset();return}if(e&&s){let t={...o.getValues()};s.forEach(a=>{t[a]=""}),r?.resetForm(),o.reset(t)}},[e,o,u,r,s]);let S=i(async c=>{try{let t=r?.parseFormValues(c),a=await r?.onSubmit(t);if(await d?.(t),a?.error)m?.(a.error);else if(a?.data){let F={data:{...a.data.data,employments:a.data.data.employments?.map(V=>({...V,title:t.estimation_title}))}};await p?.(F)}}catch(t){m?.(t)}},"handleSubmit");return l(C,{...o,children:l("form",{id:E,onSubmit:o.handleSubmit(S),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:l(f,{fields:r?.fields??[]})})})}i(w,"CostCalculatorForm");export{w as a};
2
- //# sourceMappingURL=chunk-3O2RD3RK.js.map
1
+ import{b as n}from"./chunk-KSHK3ZPX.js";import{a as f}from"./chunk-NNM5M4E3.js";import{g as C}from"./chunk-3BREUYLG.js";import{a as i}from"./chunk-P37U34EQ.js";import{useEffect as b}from"react";import{jsx as l}from"react/jsx-runtime";function w({onSubmit:d,onError:m,onSuccess:p,shouldResetForm:u,resetFields:s}){let{form:o,formId:E,costCalculatorBag:r}=n(),{formState:{isSubmitSuccessful:e}}=o;b(()=>{if(e&&u){r?.resetForm(),o.reset();return}if(e&&s){let t={...o.getValues()};s.forEach(a=>{t[a]=""}),r?.resetForm(),o.reset(t)}},[e,o,u,r,s]);let S=i(async c=>{try{let t=r?.parseFormValues(c),a=await r?.onSubmit(t);if(await d?.(t),a?.error)m?.(a.error);else if(a?.data){let F={data:{...a.data.data,employments:a.data.data.employments?.map(V=>({...V,title:t.estimation_title}))}};await p?.(F)}}catch(t){m?.(t)}},"handleSubmit");return l(C,{...o,children:l("form",{id:E,onSubmit:o.handleSubmit(S),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:l(f,{fields:r?.fields??[]})})})}i(w,"CostCalculatorForm");export{w as a};
2
+ //# sourceMappingURL=chunk-2EN2X5NU.js.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-32GSS4UM.js";import{a as n}from"./chunk-5ISPIMTZ.js";import{a as e}from"./chunk-3LOVCTCN.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as m}from"react/jsx-runtime";var r=["You submit your termination request.","We review 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, we 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.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>m(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. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(n,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:i.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:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
+ //# sourceMappingURL=chunk-2ERB4H3T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'We share termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'We process the final salary and offboard the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. We'll lead\n communication with them after you submit this form and we finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. We'll ask for the details\n regarding that communication and take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gKAiBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,mIACA,2GACA,4MACA,0DACA,4DACA,oDACA,4DACA,wDACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,sKAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,qIAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
@@ -0,0 +1,2 @@
1
+ var e={disclaimerCostCalculator:4668194326797,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613};export{e as a};
2
+ //# sourceMappingURL=chunk-32GSS4UM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/shared/zendesk-drawer/utils.ts"],"sourcesContent":["export const zendeskArticles = {\n disclaimerCostCalculator: 4668194326797,\n employeeOnboardingTimeline: 4411262104589,\n extraPayments: 4466822781709,\n internationalPricing: 4410698586893,\n remoteFxRate: 33271144977421,\n};\n"],"mappings":"AAAO,IAAMA,EAAkB,CAC7B,yBAA0B,cAC1B,2BAA4B,cAC5B,cAAe,cACf,qBAAsB,cACtB,aAAc,cAChB","names":["zendeskArticles"]}
1
+ {"version":3,"sources":["../src/components/shared/zendesk-drawer/utils.ts"],"sourcesContent":["export const zendeskArticles = {\n disclaimerCostCalculator: 4668194326797,\n employeeOnboardingTimeline: 4411262104589,\n extraPayments: 4466822781709,\n internationalPricing: 4410698586893,\n remoteFxRate: 33271144977421,\n terminationEmployeeCommunication: 4411585179661,\n terminationNoticePeriods: 5831900985613,\n};\n"],"mappings":"AAAO,IAAMA,EAAkB,CAC7B,yBAA0B,cAC1B,2BAA4B,cAC5B,cAAe,cACf,qBAAsB,cACtB,aAAc,eACd,iCAAkC,cAClC,yBAA0B,aAC5B","names":["zendeskArticles"]}
@@ -1,2 +1,2 @@
1
- import{a as b,b as h,d as C,e as Z,f as v,g as y}from"./chunk-ANXYPRBG.js";import{f as w}from"./chunk-EGQJ7UBR.js";import{b as f,d as g}from"./chunk-3ZWDIEEM.js";import{a as k,e as D}from"./chunk-3LOVCTCN.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as F}from"@tanstack/react-query";var x=e((r,a)=>{let{client:s}=g();return F({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await w({client:s,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>{let o=t.data?.data.help_center_article;return o&&{...o,body:D(o.body||"")}},"select"),retry:!1,...a})},"useZendeskArticle");import{jsx as n,jsxs as l}from"react/jsx-runtime";var N=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),T=e(({Trigger:r,zendeskId:a,open:s,onClose:t})=>{let{components:o}=f(),i=N(a),d=e(()=>{t?.()},"handleClose"),{data:c,isLoading:m,error:p}=x(a,{enabled:s}),u=o?.zendeskDrawer;return u?n(u,{open:s,onClose:d,data:c,isLoading:m,error:p,zendeskURL:i,Trigger:r}):l(b,{open:s,onOpenChange:R=>!R&&d(),direction:"right",children:[n(h,{asChild:!0,children:r}),n(C,{className:"h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:l("div",{className:"h-full flex flex-col",children:[l(Z,{children:[n(v,{children:c?.title}),l(y,{children:["For more details see our"," ",n("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&n("div",{children:"Loading..."}),p&&n("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),n("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:c?.body||""}})]})})]})},"ZendeskDrawer");import{useState as L}from"react";import{jsx as _}from"react/jsx-runtime";function G({zendeskId:r,className:a,onClick:s,children:t}){let[o,i]=L(!1);return _(T,{zendeskId:r,open:o,onClose:()=>i(!1),Trigger:_("button",{onClick:e(()=>{i(!0),s?.(r)},"handleClick"),className:k("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",a),children:t})})}e(G,"ZendeskTriggerButton");export{G as a};
2
- //# sourceMappingURL=chunk-N5I33LIN.js.map
1
+ import{a as b,b as h,d as C,e as Z,f as v,g as y}from"./chunk-ANXYPRBG.js";import{f as w}from"./chunk-E3QWREZF.js";import{b as f,d as g}from"./chunk-3ZWDIEEM.js";import{a as k,e as D}from"./chunk-3LOVCTCN.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as F}from"@tanstack/react-query";var x=e((r,a)=>{let{client:s}=g();return F({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await w({client:s,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>{let o=t.data?.data.help_center_article;return o&&{...o,body:D(o.body||"")}},"select"),retry:!1,...a})},"useZendeskArticle");import{jsx as n,jsxs as l}from"react/jsx-runtime";var N=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),T=e(({Trigger:r,zendeskId:a,open:s,onClose:t})=>{let{components:o}=f(),i=N(a),d=e(()=>{t?.()},"handleClose"),{data:c,isLoading:m,error:p}=x(a,{enabled:s}),u=o?.zendeskDrawer;return u?n(u,{open:s,onClose:d,data:c,isLoading:m,error:p,zendeskURL:i,Trigger:r}):l(b,{open:s,onOpenChange:R=>!R&&d(),direction:"right",children:[n(h,{asChild:!0,children:r}),n(C,{className:"h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:l("div",{className:"h-full flex flex-col",children:[l(Z,{children:[n(v,{children:c?.title}),l(y,{children:["For more details see our"," ",n("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&n("div",{children:"Loading..."}),p&&n("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),n("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:c?.body||""}})]})})]})},"ZendeskDrawer");import{useState as L}from"react";import{jsx as _}from"react/jsx-runtime";function G({zendeskId:r,className:a,onClick:s,children:t}){let[o,i]=L(!1);return _(T,{zendeskId:r,open:o,onClose:()=>i(!1),Trigger:_("button",{onClick:e(()=>{i(!0),s?.(r)},"handleClick"),className:k("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",a),children:t})})}e(G,"ZendeskTriggerButton");export{G as a};
2
+ //# sourceMappingURL=chunk-5ISPIMTZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as B}from"./chunk-ZTDKPUB5.js";import{a as ge,b as Ue,c as Ve,d as ze,e as Ge,f as Je,g as qe,h as Ke,i as Ye,j as ye,k as Xe,l as _e,m as ve,o as Ce,q as Qe,r as Ze,s as et}from"./chunk-ZSDJZMQW.js";import{b as je}from"./chunk-GP237GUO.js";import{b}from"./chunk-3ZWDIEEM.js";import{a as he,b as $}from"./chunk-7VUILYZ3.js";import{a as oe,b as re,c as x,d as We,e as Le,f as He,g as Ae,h as k,i as w,j as N,k as P,l as R,m as D}from"./chunk-3BREUYLG.js";import{g as Be}from"./chunk-PAQW5BFW.js";import{a as y,e as Oe}from"./chunk-3LOVCTCN.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as Ht,jsx as O,jsxs as ae}from"react/jsx-runtime";function ne({name:e,defaultValue:t,description:a,label:o,onChange:l,multiple:d,options:c,component:F,...f}){let{components:i}=b(),{control:n}=x(),u=r((m,s,g)=>{let p=g.value?[...g.value]:[];s?p.includes(m)||g.onChange([...p,m]):g.onChange(p.filter(h=>h!==m))},"handleCheckboxChange");return O(k,{control:n,name:e,defaultValue:t,render:({field:m,fieldState:s})=>{let g=F||i?.checkbox;if(g){let p={name:e,description:a,label:o,defaultValue:t,multiple:d,options:c,...f};return O(g,{field:{...m,onChange:r(h=>{if(d){let{checked:S,value:C}=h.target;u(C,S,m),l?.(S);return}m.onChange(h),l?.(h)},"onChange")},fieldState:s,fieldData:p})}return ae(w,{"data-field":e,className:y(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:ae(Ht,{children:[c&&d?O(N,{children:o}):null,c&&d?c.map(p=>ae("div",{className:"flex space-x-2",children:[O(ge,{id:p.value,onCheckedChange:h=>{u(p.value,h===!0,m),l?.(h,p.value)},checked:m.value?.includes(p.value),className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:p.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:p.label})]},p.value)):ae("div",{className:"flex space-x-2",children:[O(ge,{id:e,onCheckedChange:p=>{m.onChange(p),l?.(p)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),a&&O(R,{children:a}),s.error&&O(D,{})]})}})}r(ne,"CheckBoxField");import{CalendarIcon as Ut}from"lucide-react";import{PopoverClose as Vt}from"@radix-ui/react-popover";import{ChevronLeft as Bt,ChevronRight as Ot}from"lucide-react";import{DayPicker as At}from"react-day-picker";import{jsx as xe}from"react/jsx-runtime";function tt({className:e,classNames:t,showOutsideDays:a=!0,...o}){return xe(At,{showOutsideDays:a,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:y(he({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(he({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:r(({className:l,...d})=>xe(Bt,{className:y("size-4",l),...d}),"IconLeft"),IconRight:r(({className:l,...d})=>xe(Ot,{className:y("size-4",l),...d}),"IconRight")},...o})}r(tt,"Calendar");import*as A from"@radix-ui/react-popover";import{jsx as se}from"react/jsx-runtime";function le({...e}){return se(A.Root,{"data-slot":"popover",...e})}r(le,"Popover");function ie({...e}){return se(A.Trigger,{"data-slot":"popover-trigger",...e})}r(ie,"PopoverTrigger");function me({className:e,align:t="center",sideOffset:a=4,...o}){return se(A.Portal,{children:se(A.Content,{"data-slot":"popover-content",align:t,sideOffset:a,className:y("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}r(me,"PopoverContent");import{format as ot}from"date-fns";import{Fragment as zt,jsx as E,jsxs as be}from"react/jsx-runtime";function rt({description:e,label:t,name:a,minDate:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x(),i;return c.meta?.mot&&typeof c.meta.mot=="number"?i=Be(c.meta.mot):o&&(i=new Date(o)),E(k,{control:f,name:a,render:({field:n,fieldState:u})=>{let m=d||F?.date;if(m){let s={description:e,label:t,name:a,onChange:l,...i&&{minDate:i.toISOString()},...c};return E(m,{field:{...n,onChange:r(g=>{n.onChange(g),l?.(g)},"onChange")},fieldState:u,fieldData:s})}return be(w,{"data-field":a,className:`flex flex-col RemoteFlows__DatePickerField__Item__${a}`,children:[E(N,{className:"RemoteFlows__DatePickerField__Label",children:t}),be(le,{children:[E(ie,{asChild:!0,children:E(P,{children:E("div",{children:be($,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!n.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${a}`,children:[n.value&&E(zt,{children:ot(n.value,"yyyy-MM-dd")}),E(Ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),E(me,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:E(tt,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:n.value?new Date(n.value):void 0,onSelect:s=>{n.onChange(s?ot(s,"yyyy-MM-dd"):null),l?.(s)},defaultMonth:i,components:{DayContent:r(s=>E(Vt,{children:s.date.getDate()}),"DayContent")},...i&&{disabled:r(s=>s<i,"disabled")}})})]}),e?E(R,{children:e}):null,u.error&&E(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}r(rt,"DatePickerField");import{useState as Gt,useRef as Jt}from"react";import{Upload as qt,X as Kt}from"lucide-react";import{jsx as U,jsxs as Se}from"react/jsx-runtime";function at({onChange:e,className:t,multiple:a}){let[o,l]=Gt([]),d=Jt(null),c=r(i=>{i.preventDefault(),d.current?.click()},"handleClick"),F=r(i=>{if(i.target.files&&i.target.files.length>0){let n=Array.from(i.target.files);l(n),e(i)}},"handleChange"),f=r(i=>{l(n=>n.filter(u=>u!==i))},"onRemoveFile");return Se("div",{className:y("flex flex-col items-start gap-4",t),children:[U("input",{type:"file",ref:d,onChange:F,className:"hidden","aria-label":"File upload",multiple:a}),Se($,{type:"button",onClick:c,className:"gap-2",children:[U(qt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&U("div",{className:"text-sm",children:a?U("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):U("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((i,n)=>Se("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",U("span",{className:"font-medium",children:i.name})," (",Math.round(i.size/1024)," KB)",U($,{variant:"ghost",onClick:()=>f(i),children:U(Kt,{})})]},n))]})}r(at,"FileUploader");import{jsx as V,jsxs as jt}from"react/jsx-runtime";var Yt=r(e=>new Promise((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=l=>a(l)}),"toBase64"),nt=r(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let l=await Yt(o);return{name:o.name,content:l.split(",")[1]}}))},"convertFilesToBase64");function st({name:e,description:t,label:a,multiple:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return V(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.file;if(u){let m={name:e,description:t,label:a,multiple:o,...c};return V(u,{field:{...i,value:null,onChange:r(async s=>{let g=await nt(s);i.onChange(g),l?.(g)},"onChange")},fieldState:n,fieldData:m})}return jt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(N,{className:"RemoteFlows__FileUpload__Label",children:a}),V(P,{children:V(at,{onChange:async m=>{let s=await nt(m);i.onChange(s),l?.(s)},multiple:o,className:y("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),n.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}r(st,"FileUploadField");import{jsx as ke}from"react/jsx-runtime";function de(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.number;return o?ke(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>ke(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):ke(B,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}r(de,"NumberField");import{Fragment as Xt}from"react";import{jsx as W,jsxs as Ne}from"react/jsx-runtime";function lt({name:e,defaultValue:t,description:a,label:o,options:l,onChange:d,component:c,...F}){let{components:f}=b(),{control:i}=x();return W(k,{control:i,name:e,defaultValue:t,render:({field:n,fieldState:u})=>{let m=c||f?.radio;if(m){let s={name:e,defaultValue:t,description:a,label:o,options:l,...F};return W(m,{field:{...n,onChange:r(g=>{n.onChange(g),d?.(g)},"onChange")},fieldState:u,fieldData:s})}return Ne(w,{className:y("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[W(N,{children:o}),W(P,{children:W(Ue,{"aria-label":o||e,onValueChange:s=>{n.onChange(s),d?.(s)},value:n.value,className:"flex flex-col space-y-3",children:l?.map(s=>W(Xt,{children:Ne(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(P,{children:W(Ve,{value:s.value,className:"RemoteFlows__RadioField__Input",disabled:s.disabled})}),Ne("div",{children:[W(N,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:s.label}),s.description&&W(R,{className:"mt-2",children:s.description})]})]})},s.value))})}),a&&W(R,{children:a}),u.error&&W(D,{})]})}})}r(lt,"RadioGroupField");import{jsx as M,jsxs as it}from"react/jsx-runtime";function mt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b();return M(k,{defaultValue:o,control:f,name:t,render:({field:n,fieldState:u})=>{let m=c||i?.select;if(m){let s={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return M(m,{field:{...n,onChange:r(g=>{let p=F.jsonType==="number"?Number(g):g;n.onChange(p),d?.(p)},"onChange")},fieldState:u,fieldData:s})}return it(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(N,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:it(ze,{value:n.value||"",onValueChange:s=>{let g=F.jsonType==="number"?Number(s):s;n.onChange(g),d?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Je,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(Ge,{className:"RemoteFlows__SelectField__Group",children:a.map(s=>M(Ye,{value:s.value,className:"RemoteFlows__SelectField__SelectItem",children:s.label},s.value))})})]})})}),l&&M(R,{children:l}),u.error&&M(D,{})]})}})}r(mt,"SelectField");import{useState as ro}from"react";import{Fragment as Qt,useState as Zt}from"react";import{Check as eo,ChevronDownIcon as to,X as oo}from"lucide-react";import{Command as Y}from"cmdk";import{SearchIcon as jr}from"lucide-react";import{jsx as j,jsxs as ea}from"react/jsx-runtime";function dt({className:e,...t}){return j(Y,{"data-slot":"command",className:y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}r(dt,"Command");function ct({className:e,...t}){return j(Y.List,{"data-slot":"command-list",className:y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}r(ct,"CommandList");function ut({...e}){return j(Y.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}r(ut,"CommandEmpty");function pt({className:e,...t}){return j(Y.Group,{"data-slot":"command-group",className:y("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",e),...t})}r(pt,"CommandGroup");function ft({className:e,...t}){return j(Y.Separator,{"data-slot":"command-separator",className:y("bg-border -mx-1 h-px",e),...t})}r(ft,"CommandSeparator");function Ft({className:e,...t}){return j(Y.Item,{"data-slot":"command-item",className:y("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",e),...t})}r(Ft,"CommandItem");import{jsx as L,jsxs as X}from"react/jsx-runtime";function ce({options:e,selected:t,onChange:a,placeholder:o,...l}){let[d,c]=Zt(!1),F=r(n=>{a(t.filter(u=>u.value!==n.value))},"handleUnselect"),f=e.some(n=>n.category),i=e.reduce((n,u)=>{let m=u.category||"Uncategorized";return n[m]||(n[m]=[]),n[m].push(u),n},{});return X(le,{open:d,onOpenChange:c,...l,children:[L(ie,{children:X($,{variant:"outline",role:"combobox","aria-expanded":d,className:"w-full justify-between font-normal",type:"button",children:[L("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(n=>X(je,{variant:"secondary",className:"mr-1 mb-1",children:[n.label,L("div",{role:"button",tabIndex:0,"aria-label":`remove ${n.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(n)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(n),children:L(oo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},n.label)):L("span",{className:"text-foreground",children:o})}),L(to,{className:"size-4"})]})}),L(me,{align:"start",className:"w-full p-0",children:L(dt,{children:X(ct,{children:[L(ut,{children:"No item found."}),Object.entries(i).map(([n,u],m)=>X(Qt,{children:[m>0&&L(ft,{}),L(pt,{heading:f?n:void 0,children:u.map(s=>{let g=t.some(p=>p.value===s.value);return X(Ft,{onSelect:()=>{a(g?t.filter(p=>p.value!==s.value):[...t,s])},children:[L(eo,{className:y("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),s.label]},s.label)})})]},n))]})})})]})}r(ce,"MultiSelect");import{jsx as J,jsxs as ao}from"react/jsx-runtime";function gt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,component:F,...f}){let{control:i}=x(),{components:n}=b(),[u,m]=ro([]);return J(k,{defaultValue:o,control:i,name:t,render:({field:s,fieldState:g})=>{let p=F||n?.countries;if(p){let C={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,...f};return J(p,{field:{...s,onChange:r(T=>{s.onChange(T),d?.(T)},"onChange")},fieldState:g,fieldData:C})}let h=[...Object.entries(c?.regions||{}).map(([C,T])=>({value:T,label:C,category:"Regions"})),...Object.entries(c?.subregions||{}).map(([C,T])=>({value:T,label:C,category:"Subregions"})),...a.map(C=>({...C,value:C.value,label:C.label,category:"Countries"}))],S=r(C=>{let T=C.map(({value:G})=>G);s.onChange(T),d?.(T),m(C)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[J(N,{className:"RemoteFlows__CountryField__Label",children:e}),J(P,{children:J(ce,{options:h,selected:u,onChange:S,...f})}),l&&J(R,{children:l}),g.error&&J(D,{})]})}})}r(gt,"CountryField");import*as ht from"react";import{jsx as no}from"react/jsx-runtime";var we=ht.forwardRef(({className:e,...t},a)=>no("textarea",{className:y("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,...t}));we.displayName="Textarea";import{jsx as q,jsxs as Pe}from"react/jsx-runtime";function yt({name:e,description:t,label:a,onChange:o,maxLength:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return q(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.textarea;if(u){let s={name:e,description:t,label:a,maxLength:l,...c};return q(u,{field:{...i,onChange:r(g=>{i.onChange(g),o?.(g)},"onChange")},fieldState:n,fieldData:s})}let m=i.value?.length??0;return Pe(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[q(N,{className:"RemoteFlows__TextArea__Label",children:a}),q(P,{children:q(we,{...i,value:i.value??"",onChange:s=>{i.onChange(s),o?.(s)},className:y(n.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:a})}),(t||l)&&Pe("div",{className:"flex items-center justify-between",children:[t&&q(R,{className:"RemoteFlows__TextArea__Description",children:t}),l&&Pe("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[m,"/",l]})]}),n.error&&q(D,{className:"RemoteFlows__TextArea__Error"})]})}})}r(yt,"TextAreaField");import{jsx as Re}from"react/jsx-runtime";function _t(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.email;return o?Re(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>Re(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):Re(B,{...e,type:"email"})}r(_t,"EmailField");import{jsx as vt}from"react/jsx-runtime";function Ct(e){let{control:t}=x();return vt(k,{control:t,name:e.name,render:({field:a})=>vt("input",{...a,type:"hidden"})})}r(Ct,"HiddenField");import po,{useEffect as fo,useState as Dt}from"react";var xt=r((e,t,a)=>{if(e&&"reportValidity"in e){let o=oe(a,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),De=r((e,t)=>{for(let a in t.fields){let o=t.fields[a];o&&o.ref&&"reportValidity"in o.ref?xt(o.ref,a,e):o&&o.refs&&o.refs.forEach(l=>xt(l,a,e))}},"o"),St=r((e,t)=>{t.shouldUseNativeValidation&&De(e,t);let a={};for(let o in e){let l=oe(t.fields,o),d=Object.assign(e[o]||{},{ref:l&&l.ref});if(so(t.names||Object.keys(e),o)){let c=Object.assign({},oe(a,o));re(c,"root",d),re(a,o,c)}else re(a,o,d)}return a},"s"),so=r((e,t)=>{let a=bt(t);return e.some(o=>bt(o).match(`^${a}\\.\\d+`))},"i");function bt(e){return e.replace(/\]|\[/g,"")}r(bt,"n");function kt(e,t,a){return t===void 0&&(t={}),a===void 0&&(a={}),function(o,l,d){try{return Promise.resolve(function(c,F){try{var f=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[a.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:l}))).then(function(i){return d.shouldUseNativeValidation&&De({},d),{values:a.raw?Object.assign({},o):i,errors:{}}}))}catch(i){return F(i)}return f&&f.then?f.then(void 0,F):f}(0,function(c){if(!c.inner)throw c;return{values:{},errors:St((F=c,f=!d.shouldUseNativeValidation&&d.criteriaMode==="all",(F.inner||[]).reduce(function(i,n){if(i[n.path]||(i[n.path]={message:n.message,type:n.type}),f){var u=i[n.path].types,m=u&&u[n.type];i[n.path]=We(n.path,f,i,n.type,m?[].concat(m,n.message):n.message)}return i},{})),d)};var F,f}))}catch(c){return Promise.reject(c)}}}r(kt,"o");import*as I from"yup";import Nt from"lodash.groupby";import Q from"lodash.capitalize";var wt=60,ue=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/wt),a=e%wt;return a>0?`${t}h${a}m`:`${t}h`}r(lo,"convertBreakDurationToHours");function Pt(e){let t=e.reduce((a,o)=>o.hours+a,0);return Number(t.toFixed(2))}r(Pt,"calculateTotalWorkHours");function io(e,t){let a=t.map(({day:d})=>d.toLowerCase()),o=a.indexOf(e),l=null;for(;o<a.length&&!l;){let d=a[o],c=a[o+1],F=ue.indexOf(d)+1;ue[F]===c||(l=d),o+=1}return l}r(io,"findLastConsecutiveDay");function mo(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}r(mo,"shouldSummarizeSchedule");function co(e){return Number.parseInt(e.break_duration_minutes)>0}r(co,"shouldSummarizeBreaks");function Rt(e){let t=e.filter(mo),a=Nt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(co),l=Nt(o,"break_duration_minutes"),d=Object.keys(a).map(F=>{let f=a[F],i=f[0].day,[n,u]=F.split("|"),m=`from <span>${n.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,s=io(i,f),p=(s?f.findIndex(h=>h.day===s):-1)===f.length-1;return f.length===1?`${Q(i)}, ${m}`:!p||!s?f.reduce((h,S,C)=>{let T=Q(S.day);return C===f.length-1?`${h}and ${T}, ${m}`:`${h}<span>${T}</span>, `},""):`<span>${Q(i)}</span> to <span>${Q(s)}</span>, ${m}`}),c=Object.keys(l).reverse().map((F,f)=>{let i=f===0,n=l[F],u=lo(parseInt(F,10));if(Object.keys(l).length===1)return`With ${u} daily breaks`;if(n.length===1){let m=`${u} break on ${Q(n[0].day)}.`;return i?`With ${m}`:m}return n.reduce((m,s,g)=>{let p=Q(s.day);return g===0?`${m} ${p}`:g===n.length-1?`${m}, and ${p}.`:`${m}, ${p}`},i?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:d,breakSummary:c}}r(Rt,"buildWorkScheduleSummary");function Te(e){let{checked:t,start_time:a,end_time:o,break_duration_minutes:l}=e;if(!t)return 0;let[d,c]=a.split(":").map(Number),[F,f]=o.split(":").map(Number),i=d*60+c,m=(F*60+f-i-Number.parseInt(l||"0"))/60;return m===Math.floor(m)?m:Number(m.toFixed(2))}r(Te,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function pe(e){return uo[e]}r(pe,"getShortWeekday");import{jsx as _,jsxs as H}from"react/jsx-runtime";var Fo=I.object({day:I.string().required(),checked:I.boolean().required(),start_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),end_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),hours:I.number().default(0),break_duration_minutes:I.string().default("0")}),go=I.object({schedule:I.array(Fo)});function ho({defaultSchedule:e,onSubmit:t}){let[a,o]=Dt(!1),l=ue.map(p=>{let h=e.find(S=>S.day.toLowerCase()===pe(p).toLowerCase()||S.day.toLowerCase()===p.toLowerCase());return h?{...h,day:pe(p),checked:!0}:{...e[0],checked:!1,day:pe(p)}}),d=He({defaultValues:{schedule:l},resolver:kt(go)}),{handleSubmit:c,watch:F,reset:f,control:i,formState:n}=d,{fields:u}=Le({name:"schedule",control:i}),m=F("schedule");function s(p){let h=p.schedule.filter(({checked:S})=>S).map(S=>({...S,hours:Te(S)}));t(h),o(!1)}r(s,"handleSubmitWorkingHours");function g(){f(),o(!1)}return r(g,"handleCancel"),_("div",{className:"flex items-center justify-between",children:H(ye,{open:a,onOpenChange:o,children:[_(Xe,{asChild:!0,children:_($,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),H(_e,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[_(ve,{children:_(Ce,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),_(Ae,{...d,children:H("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[H("div",{className:"rounded-lg",children:[_("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),H("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[_("div",{className:"col-span-2"}),_("div",{className:"col-span-3 text-center",children:"START"}),_("div",{className:"col-span-1 text-center"}),_("div",{className:"col-span-3 text-center",children:"END"}),_("div",{className:"col-span-2 text-center",children:"HOURS"})]}),_("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((p,h)=>{let S=m[h],C=Te(S);return H(po.Fragment,{children:[H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[_("div",{className:"col-span-2 flex items-center gap-3",children:_(ne,{label:p.day,name:`schedule.${h}.checked`})}),_("div",{className:"col-span-3",children:_(B,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),_("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),_("div",{className:"col-span-3",children:_(B,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),_("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(C)?"-":`${C} hours`})]}),H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[_("div",{className:"col-span-2 text-gray-500",children:"Break"}),_("div",{className:"col-span-2",children:_(B,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),_("div",{className:"col-span-2 text-gray-500",children:"minutes"}),_("div",{className:"col-span-4"})]})]},p.id)})})]}),Object.keys(n.errors).length>0&&_("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),H("div",{className:"flex gap-4 pt-4",children:[_($,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),_($,{type:"button",className:"submit-button",onClick:c(s),children:"Save Schedule"})]})]})})]})]})})}r(ho,"WorkScheduleSelectionForm");function Tt(e){let{components:t}=b(),{setValue:a,control:o,watch:l}=x(),d=l(e.name),[c,F]=Dt(d),{workHoursSummary:f,breakSummary:i}=Rt(c),n=Pt(c);fo(()=>{a(e.name,c)},[c,e.name,a]);function u(s){F(s)}r(u,"onSubmit");let m=e.component||t?.["work-schedule"];return m?_(k,{control:o,name:e.name,render:({field:s,fieldState:g})=>_(m,{field:{...s,onChange:r(p=>{s.onChange(p),e.onChange?.(p)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:i,totalWorkHours:n}}})}):H("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[_("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),H("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[_("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),_("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),H("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",_("span",{children:n})," hours per week"]}),_(ho,{defaultSchedule:c,onSubmit:u})]})]})}r(Tt,"WorkScheduleField");import{useState as yo}from"react";import{jsx as K,jsxs as _o}from"react/jsx-runtime";function It({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b(),[n,u]=yo();return K(k,{defaultValue:o,control:f,name:t,render:({field:m,fieldState:s})=>{let g=c||i?.["multi-select"];if(g){let h={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return K(g,{field:{...m,onChange:r(S=>{m.onChange(S),d?.(S)},"onChange")},fieldState:s,fieldData:h})}let p=n||a.filter(h=>m.value.includes(h.value));return _o(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[K(N,{className:"RemoteFlows__SelectField__Label",children:e}),K(P,{children:K(ce,{options:a,selected:p,onChange:h=>{let S=h.map(({value:C})=>C);m.onChange(S),d?.(S),u(h)},...F})}),l&&K(R,{children:l}),s.error&&K(D,{})]})}})}r(It,"MultiSelectField");import{jsx as vo}from"react/jsx-runtime";var $t=r(e=>vo(de,{maxLength:15,...e}),"MoneyField");var Ie={checkbox:ne,text:B,email:_t,money:$t,select:mt,"multi-select":It,radio:lt,number:de,file:st,date:rt,textarea:yt,countries:gt,hidden:Ct,"work-schedule":Tt};import{AlertCircle as Co}from"lucide-react";import{jsx as fe,jsxs as xo}from"react/jsx-runtime";function Et({title:e,description:t,severity:a}){let{components:o}=b();if(o?.statement){let l=o?.statement;return fe(l,{data:{title:e,description:t,severity:a}})}return xo(Qe,{variant:"warning",children:[fe(Co,{className:"h-4 w-4"}),e&&fe(Ze,{children:e}),fe(et,{children:t})]})}r(Et,"Statement");import{Fragment as bo,useEffect as So,useRef as Mt}from"react";import{jsx as z,jsxs as ee}from"react/jsx-runtime";var ko=r(({isExpanded:e,onToggle:t,className:a,...o})=>z($,{type:"button",className:y("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",a),variant:"default",onClick:t,...o,children:e?"Remove":"Define"}),"DefaultToggleButton");function ns({label:e,name:t,fields:a,description:o,components:l,statement:d,isFlatFieldset:c,extra:F,variant:f="outset",features:i}){let{watch:n,setValue:u,trigger:m,formState:s}=x(),{components:g}=b(),p=i?.toggle?.stateField,h=p?n(p):i?.toggle?.defaultExpanded??!0,S=a.map(({name:v})=>`${t}.${v}`),C=n(S),T=Mt(C),G=Mt(null),Wt=r(()=>{p&&u(p,!h)},"toggleExpanded");So(()=>{let v=C,te=T.current,Fe=s.isSubmitted||s.submitCount>0,Me=!1;for(let Z=0;Z<v.length;Z++)if(v[Z]!==void 0&&te[Z]!==v[Z]){Me=!0;break}return Me&&Fe&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{m()},50)),T.current=[...v],()=>{G.current&&clearTimeout(G.current)}},[C,m,s.isSubmitted,s.submitCount]);let Lt=g?.fieldsetToggle||ko,$e=`${t}-content`,Ee=`${t}-header`;return ee("fieldset",{className:y("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[z("legend",{className:y("text-sm font-semibold px-2",f==="inset"&&"hidden"),children:e}),f==="inset"&&ee("div",{className:"RemoteFlows__FieldSetField__Header",id:Ee,"data-state":h?"expanded":"collapsed","aria-expanded":h,children:[z("h3",{className:y("RemoteFlows__FieldSetField__Title"),children:e}),i?.toggle?.enabled&&z(Lt,{isExpanded:h,onToggle:Wt,"aria-expanded":h,"aria-controls":$e,"aria-label":`${h?"Hide":"Show"} ${e}`,className:y("RemoteFlows__FieldSetField__Toggle",i.toggle?.className),children:h?i.toggle.labels?.collapse??"Remove":i.toggle.labels?.expand??"Define"})]}),h&&ee("div",{id:$e,"aria-labelledby":Ee,role:"region",children:[o?z("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:Oe(o)}}):null,ee("div",{className:"grid gap-4",children:[a.map(v=>{v.calculateDynamicProperties&&(v={...v,...v.calculateDynamicProperties(C,v)||{}});let te=Ie[v.type];if(v.isVisible===!1||v.deprecated)return null;if(v.Component){let{Component:Fe}=v;return z(Fe,{...v},v.name)}return v.type==="select"&&v.multiple&&(te=Ie["multi-select"]),ee(bo,{children:[z(te,{...v,name:`${c?v.name:`${t}.${v.name}`}`,component:l?.[v.type]}),v.extra?v.extra:null]},`${c?v.name:`${t}.${v.name}`}`)}),F||null,d?z(Et,{...d}):null]})]})]})}r(ns,"FieldSetField");export{Ie as a,Et as b,ns as c};
2
- //# sourceMappingURL=chunk-U4NWXPI5.js.map
1
+ import{a as B}from"./chunk-ZTDKPUB5.js";import{a as ge,b as Ue,c as Ve,d as ze,e as Ge,f as Je,g as qe,h as Ke,i as Ye,j as ye,k as Xe,l as _e,m as ve,o as Ce,q as Qe,r as Ze,s as et}from"./chunk-F2E56YE2.js";import{b as je}from"./chunk-GP237GUO.js";import{a as he,b as $}from"./chunk-7VUILYZ3.js";import{b}from"./chunk-3ZWDIEEM.js";import{a as oe,b as re,c as x,d as We,e as Le,f as He,g as Ae,h as k,i as w,j as N,k as P,l as R,m as D}from"./chunk-3BREUYLG.js";import{g as Be}from"./chunk-PAQW5BFW.js";import{a as y,e as Oe}from"./chunk-3LOVCTCN.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as Ht,jsx as O,jsxs as ae}from"react/jsx-runtime";function ne({name:e,defaultValue:t,description:a,label:o,onChange:l,multiple:d,options:c,component:F,...f}){let{components:i}=b(),{control:n}=x(),u=r((m,s,g)=>{let p=g.value?[...g.value]:[];s?p.includes(m)||g.onChange([...p,m]):g.onChange(p.filter(h=>h!==m))},"handleCheckboxChange");return O(k,{control:n,name:e,defaultValue:t,render:({field:m,fieldState:s})=>{let g=F||i?.checkbox;if(g){let p={name:e,description:a,label:o,defaultValue:t,multiple:d,options:c,...f};return O(g,{field:{...m,onChange:r(h=>{if(d){let{checked:S,value:C}=h.target;u(C,S,m),l?.(S);return}m.onChange(h),l?.(h)},"onChange")},fieldState:s,fieldData:p})}return ae(w,{"data-field":e,className:y(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:ae(Ht,{children:[c&&d?O(N,{children:o}):null,c&&d?c.map(p=>ae("div",{className:"flex space-x-2",children:[O(ge,{id:p.value,onCheckedChange:h=>{u(p.value,h===!0,m),l?.(h,p.value)},checked:m.value?.includes(p.value),className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:p.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:p.label})]},p.value)):ae("div",{className:"flex space-x-2",children:[O(ge,{id:e,onCheckedChange:p=>{m.onChange(p),l?.(p)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),a&&O(R,{children:a}),s.error&&O(D,{})]})}})}r(ne,"CheckBoxField");import{CalendarIcon as Ut}from"lucide-react";import{PopoverClose as Vt}from"@radix-ui/react-popover";import{ChevronLeft as Bt,ChevronRight as Ot}from"lucide-react";import{DayPicker as At}from"react-day-picker";import{jsx as xe}from"react/jsx-runtime";function tt({className:e,classNames:t,showOutsideDays:a=!0,...o}){return xe(At,{showOutsideDays:a,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:y(he({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(he({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:r(({className:l,...d})=>xe(Bt,{className:y("size-4",l),...d}),"IconLeft"),IconRight:r(({className:l,...d})=>xe(Ot,{className:y("size-4",l),...d}),"IconRight")},...o})}r(tt,"Calendar");import*as A from"@radix-ui/react-popover";import{jsx as se}from"react/jsx-runtime";function le({...e}){return se(A.Root,{"data-slot":"popover",...e})}r(le,"Popover");function ie({...e}){return se(A.Trigger,{"data-slot":"popover-trigger",...e})}r(ie,"PopoverTrigger");function me({className:e,align:t="center",sideOffset:a=4,...o}){return se(A.Portal,{children:se(A.Content,{"data-slot":"popover-content",align:t,sideOffset:a,className:y("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}r(me,"PopoverContent");import{format as ot}from"date-fns";import{Fragment as zt,jsx as E,jsxs as be}from"react/jsx-runtime";function rt({description:e,label:t,name:a,minDate:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x(),i;return c.meta?.mot&&typeof c.meta.mot=="number"?i=Be(c.meta.mot):o&&(i=new Date(o)),E(k,{control:f,name:a,render:({field:n,fieldState:u})=>{let m=d||F?.date;if(m){let s={description:e,label:t,name:a,onChange:l,...i&&{minDate:i.toISOString()},...c};return E(m,{field:{...n,onChange:r(g=>{n.onChange(g),l?.(g)},"onChange")},fieldState:u,fieldData:s})}return be(w,{"data-field":a,className:`flex flex-col RemoteFlows__DatePickerField__Item__${a}`,children:[E(N,{className:"RemoteFlows__DatePickerField__Label",children:t}),be(le,{children:[E(ie,{asChild:!0,children:E(P,{children:E("div",{children:be($,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!n.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${a}`,children:[n.value&&E(zt,{children:ot(n.value,"yyyy-MM-dd")}),E(Ut,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),E(me,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:E(tt,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:n.value?new Date(n.value):void 0,onSelect:s=>{n.onChange(s?ot(s,"yyyy-MM-dd"):null),l?.(s)},defaultMonth:i,components:{DayContent:r(s=>E(Vt,{children:s.date.getDate()}),"DayContent")},...i&&{disabled:r(s=>s<i,"disabled")}})})]}),e?E(R,{children:e}):null,u.error&&E(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}r(rt,"DatePickerField");import{useState as Gt,useRef as Jt}from"react";import{Upload as qt,X as Kt}from"lucide-react";import{jsx as U,jsxs as Se}from"react/jsx-runtime";function at({onChange:e,className:t,multiple:a}){let[o,l]=Gt([]),d=Jt(null),c=r(i=>{i.preventDefault(),d.current?.click()},"handleClick"),F=r(i=>{if(i.target.files&&i.target.files.length>0){let n=Array.from(i.target.files);l(n),e(i)}},"handleChange"),f=r(i=>{l(n=>n.filter(u=>u!==i))},"onRemoveFile");return Se("div",{className:y("flex flex-col items-start gap-4",t),children:[U("input",{type:"file",ref:d,onChange:F,className:"hidden","aria-label":"File upload",multiple:a}),Se($,{type:"button",onClick:c,className:"gap-2",children:[U(qt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&U("div",{className:"text-sm",children:a?U("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):U("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((i,n)=>Se("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",U("span",{className:"font-medium",children:i.name})," (",Math.round(i.size/1024)," KB)",U($,{variant:"ghost",onClick:()=>f(i),children:U(Kt,{})})]},n))]})}r(at,"FileUploader");import{jsx as V,jsxs as jt}from"react/jsx-runtime";var Yt=r(e=>new Promise((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=l=>a(l)}),"toBase64"),nt=r(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let l=await Yt(o);return{name:o.name,content:l.split(",")[1]}}))},"convertFilesToBase64");function st({name:e,description:t,label:a,multiple:o,onChange:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return V(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.file;if(u){let m={name:e,description:t,label:a,multiple:o,...c};return V(u,{field:{...i,value:null,onChange:r(async s=>{let g=await nt(s);i.onChange(g),l?.(g)},"onChange")},fieldState:n,fieldData:m})}return jt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(N,{className:"RemoteFlows__FileUpload__Label",children:a}),V(P,{children:V(at,{onChange:async m=>{let s=await nt(m);i.onChange(s),l?.(s)},multiple:o,className:y("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),n.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}r(st,"FileUploadField");import{jsx as ke}from"react/jsx-runtime";function de(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.number;return o?ke(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>ke(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):ke(B,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}r(de,"NumberField");import{Fragment as Xt}from"react";import{jsx as W,jsxs as Ne}from"react/jsx-runtime";function lt({name:e,defaultValue:t,description:a,label:o,options:l,onChange:d,component:c,...F}){let{components:f}=b(),{control:i}=x();return W(k,{control:i,name:e,defaultValue:t,render:({field:n,fieldState:u})=>{let m=c||f?.radio;if(m){let s={name:e,defaultValue:t,description:a,label:o,options:l,...F};return W(m,{field:{...n,onChange:r(g=>{n.onChange(g),d?.(g)},"onChange")},fieldState:u,fieldData:s})}return Ne(w,{className:y("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[W(N,{children:o}),W(P,{children:W(Ue,{"aria-label":o||e,onValueChange:s=>{n.onChange(s),d?.(s)},value:n.value,className:"flex flex-col space-y-3",children:l?.map(s=>W(Xt,{children:Ne(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(P,{children:W(Ve,{value:s.value,className:"RemoteFlows__RadioField__Input",disabled:s.disabled})}),Ne("div",{children:[W(N,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:s.label}),s.description&&W(R,{className:"mt-2",children:s.description})]})]})},s.value))})}),a&&W(R,{children:a}),u.error&&W(D,{})]})}})}r(lt,"RadioGroupField");import{jsx as M,jsxs as it}from"react/jsx-runtime";function mt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b();return M(k,{defaultValue:o,control:f,name:t,render:({field:n,fieldState:u})=>{let m=c||i?.select;if(m){let s={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return M(m,{field:{...n,onChange:r(g=>{let p=F.jsonType==="number"?Number(g):g;n.onChange(p),d?.(p)},"onChange")},fieldState:u,fieldData:s})}return it(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(N,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:it(ze,{value:n.value||"",onValueChange:s=>{let g=F.jsonType==="number"?Number(s):s;n.onChange(g),d?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Je,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(Ge,{className:"RemoteFlows__SelectField__Group",children:a.map(s=>M(Ye,{value:s.value,className:"RemoteFlows__SelectField__SelectItem",children:s.label},s.value))})})]})})}),l&&M(R,{children:l}),u.error&&M(D,{})]})}})}r(mt,"SelectField");import{useState as ro}from"react";import{Fragment as Qt,useState as Zt}from"react";import{Check as eo,ChevronDownIcon as to,X as oo}from"lucide-react";import{Command as Y}from"cmdk";import{SearchIcon as jr}from"lucide-react";import{jsx as j,jsxs as ea}from"react/jsx-runtime";function dt({className:e,...t}){return j(Y,{"data-slot":"command",className:y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}r(dt,"Command");function ct({className:e,...t}){return j(Y.List,{"data-slot":"command-list",className:y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}r(ct,"CommandList");function ut({...e}){return j(Y.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}r(ut,"CommandEmpty");function pt({className:e,...t}){return j(Y.Group,{"data-slot":"command-group",className:y("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",e),...t})}r(pt,"CommandGroup");function ft({className:e,...t}){return j(Y.Separator,{"data-slot":"command-separator",className:y("bg-border -mx-1 h-px",e),...t})}r(ft,"CommandSeparator");function Ft({className:e,...t}){return j(Y.Item,{"data-slot":"command-item",className:y("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",e),...t})}r(Ft,"CommandItem");import{jsx as L,jsxs as X}from"react/jsx-runtime";function ce({options:e,selected:t,onChange:a,placeholder:o,...l}){let[d,c]=Zt(!1),F=r(n=>{a(t.filter(u=>u.value!==n.value))},"handleUnselect"),f=e.some(n=>n.category),i=e.reduce((n,u)=>{let m=u.category||"Uncategorized";return n[m]||(n[m]=[]),n[m].push(u),n},{});return X(le,{open:d,onOpenChange:c,...l,children:[L(ie,{children:X($,{variant:"outline",role:"combobox","aria-expanded":d,className:"w-full justify-between font-normal",type:"button",children:[L("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(n=>X(je,{variant:"secondary",className:"mr-1 mb-1",children:[n.label,L("div",{role:"button",tabIndex:0,"aria-label":`remove ${n.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(n)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(n),children:L(oo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},n.label)):L("span",{className:"text-foreground",children:o})}),L(to,{className:"size-4"})]})}),L(me,{align:"start",className:"w-full p-0",children:L(dt,{children:X(ct,{children:[L(ut,{children:"No item found."}),Object.entries(i).map(([n,u],m)=>X(Qt,{children:[m>0&&L(ft,{}),L(pt,{heading:f?n:void 0,children:u.map(s=>{let g=t.some(p=>p.value===s.value);return X(Ft,{onSelect:()=>{a(g?t.filter(p=>p.value!==s.value):[...t,s])},children:[L(eo,{className:y("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),s.label]},s.label)})})]},n))]})})})]})}r(ce,"MultiSelect");import{jsx as J,jsxs as ao}from"react/jsx-runtime";function gt({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,component:F,...f}){let{control:i}=x(),{components:n}=b(),[u,m]=ro([]);return J(k,{defaultValue:o,control:i,name:t,render:({field:s,fieldState:g})=>{let p=F||n?.countries;if(p){let C={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,$meta:c,...f};return J(p,{field:{...s,onChange:r(T=>{s.onChange(T),d?.(T)},"onChange")},fieldState:g,fieldData:C})}let h=[...Object.entries(c?.regions||{}).map(([C,T])=>({value:T,label:C,category:"Regions"})),...Object.entries(c?.subregions||{}).map(([C,T])=>({value:T,label:C,category:"Subregions"})),...a.map(C=>({...C,value:C.value,label:C.label,category:"Countries"}))],S=r(C=>{let T=C.map(({value:G})=>G);s.onChange(T),d?.(T),m(C)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[J(N,{className:"RemoteFlows__CountryField__Label",children:e}),J(P,{children:J(ce,{options:h,selected:u,onChange:S,...f})}),l&&J(R,{children:l}),g.error&&J(D,{})]})}})}r(gt,"CountryField");import*as ht from"react";import{jsx as no}from"react/jsx-runtime";var we=ht.forwardRef(({className:e,...t},a)=>no("textarea",{className:y("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,...t}));we.displayName="Textarea";import{jsx as q,jsxs as Pe}from"react/jsx-runtime";function yt({name:e,description:t,label:a,onChange:o,maxLength:l,component:d,...c}){let{components:F}=b(),{control:f}=x();return q(k,{control:f,name:e,render:({field:i,fieldState:n})=>{let u=d||F?.textarea;if(u){let s={name:e,description:t,label:a,maxLength:l,...c};return q(u,{field:{...i,onChange:r(g=>{i.onChange(g),o?.(g)},"onChange")},fieldState:n,fieldData:s})}let m=i.value?.length??0;return Pe(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[q(N,{className:"RemoteFlows__TextArea__Label",children:a}),q(P,{children:q(we,{...i,value:i.value??"",onChange:s=>{i.onChange(s),o?.(s)},className:y(n.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:a})}),(t||l)&&Pe("div",{className:"flex items-center justify-between",children:[t&&q(R,{className:"RemoteFlows__TextArea__Description",children:t}),l&&Pe("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[m,"/",l]})]}),n.error&&q(D,{className:"RemoteFlows__TextArea__Error"})]})}})}r(yt,"TextAreaField");import{jsx as Re}from"react/jsx-runtime";function _t(e){let{components:t}=b(),{control:a}=x(),o=e.component||t?.email;return o?Re(k,{control:a,name:e.name,render:({field:l,fieldState:d})=>Re(o,{field:{...l,onChange:r(c=>{l.onChange(c),e.onChange?.(c)},"onChange")},fieldState:d,fieldData:e})}):Re(B,{...e,type:"email"})}r(_t,"EmailField");import{jsx as vt}from"react/jsx-runtime";function Ct(e){let{control:t}=x();return vt(k,{control:t,name:e.name,render:({field:a})=>vt("input",{...a,type:"hidden"})})}r(Ct,"HiddenField");import po,{useEffect as fo,useState as Dt}from"react";var xt=r((e,t,a)=>{if(e&&"reportValidity"in e){let o=oe(a,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),De=r((e,t)=>{for(let a in t.fields){let o=t.fields[a];o&&o.ref&&"reportValidity"in o.ref?xt(o.ref,a,e):o&&o.refs&&o.refs.forEach(l=>xt(l,a,e))}},"o"),St=r((e,t)=>{t.shouldUseNativeValidation&&De(e,t);let a={};for(let o in e){let l=oe(t.fields,o),d=Object.assign(e[o]||{},{ref:l&&l.ref});if(so(t.names||Object.keys(e),o)){let c=Object.assign({},oe(a,o));re(c,"root",d),re(a,o,c)}else re(a,o,d)}return a},"s"),so=r((e,t)=>{let a=bt(t);return e.some(o=>bt(o).match(`^${a}\\.\\d+`))},"i");function bt(e){return e.replace(/\]|\[/g,"")}r(bt,"n");function kt(e,t,a){return t===void 0&&(t={}),a===void 0&&(a={}),function(o,l,d){try{return Promise.resolve(function(c,F){try{var f=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[a.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:l}))).then(function(i){return d.shouldUseNativeValidation&&De({},d),{values:a.raw?Object.assign({},o):i,errors:{}}}))}catch(i){return F(i)}return f&&f.then?f.then(void 0,F):f}(0,function(c){if(!c.inner)throw c;return{values:{},errors:St((F=c,f=!d.shouldUseNativeValidation&&d.criteriaMode==="all",(F.inner||[]).reduce(function(i,n){if(i[n.path]||(i[n.path]={message:n.message,type:n.type}),f){var u=i[n.path].types,m=u&&u[n.type];i[n.path]=We(n.path,f,i,n.type,m?[].concat(m,n.message):n.message)}return i},{})),d)};var F,f}))}catch(c){return Promise.reject(c)}}}r(kt,"o");import*as I from"yup";import Nt from"lodash.groupby";import Q from"lodash.capitalize";var wt=60,ue=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/wt),a=e%wt;return a>0?`${t}h${a}m`:`${t}h`}r(lo,"convertBreakDurationToHours");function Pt(e){let t=e.reduce((a,o)=>o.hours+a,0);return Number(t.toFixed(2))}r(Pt,"calculateTotalWorkHours");function io(e,t){let a=t.map(({day:d})=>d.toLowerCase()),o=a.indexOf(e),l=null;for(;o<a.length&&!l;){let d=a[o],c=a[o+1],F=ue.indexOf(d)+1;ue[F]===c||(l=d),o+=1}return l}r(io,"findLastConsecutiveDay");function mo(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}r(mo,"shouldSummarizeSchedule");function co(e){return Number.parseInt(e.break_duration_minutes)>0}r(co,"shouldSummarizeBreaks");function Rt(e){let t=e.filter(mo),a=Nt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(co),l=Nt(o,"break_duration_minutes"),d=Object.keys(a).map(F=>{let f=a[F],i=f[0].day,[n,u]=F.split("|"),m=`from <span>${n.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,s=io(i,f),p=(s?f.findIndex(h=>h.day===s):-1)===f.length-1;return f.length===1?`${Q(i)}, ${m}`:!p||!s?f.reduce((h,S,C)=>{let T=Q(S.day);return C===f.length-1?`${h}and ${T}, ${m}`:`${h}<span>${T}</span>, `},""):`<span>${Q(i)}</span> to <span>${Q(s)}</span>, ${m}`}),c=Object.keys(l).reverse().map((F,f)=>{let i=f===0,n=l[F],u=lo(parseInt(F,10));if(Object.keys(l).length===1)return`With ${u} daily breaks`;if(n.length===1){let m=`${u} break on ${Q(n[0].day)}.`;return i?`With ${m}`:m}return n.reduce((m,s,g)=>{let p=Q(s.day);return g===0?`${m} ${p}`:g===n.length-1?`${m}, and ${p}.`:`${m}, ${p}`},i?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:d,breakSummary:c}}r(Rt,"buildWorkScheduleSummary");function Te(e){let{checked:t,start_time:a,end_time:o,break_duration_minutes:l}=e;if(!t)return 0;let[d,c]=a.split(":").map(Number),[F,f]=o.split(":").map(Number),i=d*60+c,m=(F*60+f-i-Number.parseInt(l||"0"))/60;return m===Math.floor(m)?m:Number(m.toFixed(2))}r(Te,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function pe(e){return uo[e]}r(pe,"getShortWeekday");import{jsx as _,jsxs as H}from"react/jsx-runtime";var Fo=I.object({day:I.string().required(),checked:I.boolean().required(),start_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),end_time:I.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),hours:I.number().default(0),break_duration_minutes:I.string().default("0")}),go=I.object({schedule:I.array(Fo)});function ho({defaultSchedule:e,onSubmit:t}){let[a,o]=Dt(!1),l=ue.map(p=>{let h=e.find(S=>S.day.toLowerCase()===pe(p).toLowerCase()||S.day.toLowerCase()===p.toLowerCase());return h?{...h,day:pe(p),checked:!0}:{...e[0],checked:!1,day:pe(p)}}),d=He({defaultValues:{schedule:l},resolver:kt(go)}),{handleSubmit:c,watch:F,reset:f,control:i,formState:n}=d,{fields:u}=Le({name:"schedule",control:i}),m=F("schedule");function s(p){let h=p.schedule.filter(({checked:S})=>S).map(S=>({...S,hours:Te(S)}));t(h),o(!1)}r(s,"handleSubmitWorkingHours");function g(){f(),o(!1)}return r(g,"handleCancel"),_("div",{className:"flex items-center justify-between",children:H(ye,{open:a,onOpenChange:o,children:[_(Xe,{asChild:!0,children:_($,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),H(_e,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[_(ve,{children:_(Ce,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),_(Ae,{...d,children:H("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[H("div",{className:"rounded-lg",children:[_("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),H("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[_("div",{className:"col-span-2"}),_("div",{className:"col-span-3 text-center",children:"START"}),_("div",{className:"col-span-1 text-center"}),_("div",{className:"col-span-3 text-center",children:"END"}),_("div",{className:"col-span-2 text-center",children:"HOURS"})]}),_("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((p,h)=>{let S=m[h],C=Te(S);return H(po.Fragment,{children:[H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[_("div",{className:"col-span-2 flex items-center gap-3",children:_(ne,{label:p.day,name:`schedule.${h}.checked`})}),_("div",{className:"col-span-3",children:_(B,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),_("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),_("div",{className:"col-span-3",children:_(B,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),_("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(C)?"-":`${C} hours`})]}),H("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[_("div",{className:"col-span-2 text-gray-500",children:"Break"}),_("div",{className:"col-span-2",children:_(B,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),_("div",{className:"col-span-2 text-gray-500",children:"minutes"}),_("div",{className:"col-span-4"})]})]},p.id)})})]}),Object.keys(n.errors).length>0&&_("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),H("div",{className:"flex gap-4 pt-4",children:[_($,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),_($,{type:"button",className:"submit-button",onClick:c(s),children:"Save Schedule"})]})]})})]})]})})}r(ho,"WorkScheduleSelectionForm");function Tt(e){let{components:t}=b(),{setValue:a,control:o,watch:l}=x(),d=l(e.name),[c,F]=Dt(d),{workHoursSummary:f,breakSummary:i}=Rt(c),n=Pt(c);fo(()=>{a(e.name,c)},[c,e.name,a]);function u(s){F(s)}r(u,"onSubmit");let m=e.component||t?.["work-schedule"];return m?_(k,{control:o,name:e.name,render:({field:s,fieldState:g})=>_(m,{field:{...s,onChange:r(p=>{s.onChange(p),e.onChange?.(p)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:i,totalWorkHours:n}}})}):H("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[_("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),H("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[_("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),_("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),H("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",_("span",{children:n})," hours per week"]}),_(ho,{defaultSchedule:c,onSubmit:u})]})]})}r(Tt,"WorkScheduleField");import{useState as yo}from"react";import{jsx as K,jsxs as _o}from"react/jsx-runtime";function It({label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,component:c,...F}){let{control:f}=x(),{components:i}=b(),[n,u]=yo();return K(k,{defaultValue:o,control:f,name:t,render:({field:m,fieldState:s})=>{let g=c||i?.["multi-select"];if(g){let h={label:e,name:t,options:a,defaultValue:o,description:l,onChange:d,...F};return K(g,{field:{...m,onChange:r(S=>{m.onChange(S),d?.(S)},"onChange")},fieldState:s,fieldData:h})}let p=n||a.filter(h=>m.value.includes(h.value));return _o(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[K(N,{className:"RemoteFlows__SelectField__Label",children:e}),K(P,{children:K(ce,{options:a,selected:p,onChange:h=>{let S=h.map(({value:C})=>C);m.onChange(S),d?.(S),u(h)},...F})}),l&&K(R,{children:l}),s.error&&K(D,{})]})}})}r(It,"MultiSelectField");import{jsx as vo}from"react/jsx-runtime";var $t=r(e=>vo(de,{maxLength:15,...e}),"MoneyField");var Ie={checkbox:ne,text:B,email:_t,money:$t,select:mt,"multi-select":It,radio:lt,number:de,file:st,date:rt,textarea:yt,countries:gt,hidden:Ct,"work-schedule":Tt};import{AlertCircle as Co}from"lucide-react";import{jsx as fe,jsxs as xo}from"react/jsx-runtime";function Et({title:e,description:t,severity:a}){let{components:o}=b();if(o?.statement){let l=o?.statement;return fe(l,{data:{title:e,description:t,severity:a}})}return xo(Qe,{variant:"warning",children:[fe(Co,{className:"h-4 w-4"}),e&&fe(Ze,{children:e}),t&&fe(et,{children:t})]})}r(Et,"Statement");import{Fragment as bo,useEffect as So,useRef as Mt}from"react";import{jsx as z,jsxs as ee}from"react/jsx-runtime";var ko=r(({isExpanded:e,onToggle:t,className:a,...o})=>z($,{type:"button",className:y("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",a),variant:"default",onClick:t,...o,children:e?"Remove":"Define"}),"DefaultToggleButton");function ns({label:e,name:t,fields:a,description:o,components:l,statement:d,isFlatFieldset:c,extra:F,variant:f="outset",features:i}){let{watch:n,setValue:u,trigger:m,formState:s}=x(),{components:g}=b(),p=i?.toggle?.stateField,h=p?n(p):i?.toggle?.defaultExpanded??!0,S=a.map(({name:v})=>`${t}.${v}`),C=n(S),T=Mt(C),G=Mt(null),Wt=r(()=>{p&&u(p,!h)},"toggleExpanded");So(()=>{let v=C,te=T.current,Fe=s.isSubmitted||s.submitCount>0,Me=!1;for(let Z=0;Z<v.length;Z++)if(v[Z]!==void 0&&te[Z]!==v[Z]){Me=!0;break}return Me&&Fe&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{m()},50)),T.current=[...v],()=>{G.current&&clearTimeout(G.current)}},[C,m,s.isSubmitted,s.submitCount]);let Lt=g?.fieldsetToggle||ko,$e=`${t}-content`,Ee=`${t}-header`;return ee("fieldset",{className:y("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[z("legend",{className:y("text-sm font-semibold px-2",f==="inset"&&"hidden"),children:e}),f==="inset"&&ee("div",{className:"RemoteFlows__FieldSetField__Header",id:Ee,"data-state":h?"expanded":"collapsed","aria-expanded":h,children:[z("h3",{className:y("RemoteFlows__FieldSetField__Title"),children:e}),i?.toggle?.enabled&&z(Lt,{isExpanded:h,onToggle:Wt,"aria-expanded":h,"aria-controls":$e,"aria-label":`${h?"Hide":"Show"} ${e}`,className:y("RemoteFlows__FieldSetField__Toggle",i.toggle?.className),children:h?i.toggle.labels?.collapse??"Remove":i.toggle.labels?.expand??"Define"})]}),h&&ee("div",{id:$e,"aria-labelledby":Ee,role:"region",children:[o?z("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:Oe(o)}}):null,ee("div",{className:"grid gap-4",children:[a.map(v=>{v.calculateDynamicProperties&&(v={...v,...v.calculateDynamicProperties(C,v)||{}});let te=Ie[v.type];if(v.isVisible===!1||v.deprecated)return null;if(v.Component){let{Component:Fe}=v;return z(Fe,{...v},v.name)}return v.type==="select"&&v.multiple&&(te=Ie["multi-select"]),ee(bo,{children:[z(te,{...v,name:`${c?v.name:`${t}.${v.name}`}`,component:l?.[v.type]}),v.extra?v.extra:null]},`${c?v.name:`${t}.${v.name}`}`)}),F||null,d?z(Et,{...d}):null]})]})]})}r(ns,"FieldSetField");export{Ie as a,Et as b,ns as c};
2
+ //# sourceMappingURL=chunk-5NDSOA6K.js.map