@arkyn/components 3.0.1-beta.153 → 3.0.1-beta.155

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 (344) hide show
  1. package/dist/components/calendar/_viewService.d.ts +1 -1
  2. package/dist/components/fullCalendar/_viewService.d.ts +2 -2
  3. package/dist/components.css +2 -0
  4. package/dist/hooks/useScopedParams.d.ts +1 -1
  5. package/dist/index.js +4358 -75
  6. package/dist/modules/components/alert/alertContainer/index.js +27 -0
  7. package/dist/modules/components/alert/alertContent/index.js +12 -0
  8. package/dist/modules/components/alert/alertDescription/index.js +12 -0
  9. package/dist/modules/components/alert/alertIcon/index.js +28 -0
  10. package/dist/modules/components/alert/alertTitle/index.js +12 -0
  11. package/dist/modules/components/audioPlayer/index.js +75 -0
  12. package/dist/modules/components/audioUpload/hasFileContent/index.js +55 -0
  13. package/dist/modules/components/audioUpload/index.js +72 -0
  14. package/dist/modules/components/audioUpload/noFileContent/index.js +36 -0
  15. package/dist/modules/components/badge/index.js +27 -0
  16. package/dist/modules/components/button/index.js +40 -0
  17. package/dist/modules/components/calendar/_calendarProvider.js +40 -0
  18. package/dist/modules/components/calendar/_viewService.js +133 -0
  19. package/dist/modules/components/calendar/calendarContainer/index.js +11 -0
  20. package/dist/modules/components/calendar/calendarHeader/index.js +52 -0
  21. package/dist/modules/components/calendar/calendarTableBody/index.js +13 -0
  22. package/dist/modules/components/calendar/calendarTableContainer/index.js +11 -0
  23. package/dist/modules/components/calendar/calendarTableHeader/index.js +14 -0
  24. package/dist/modules/components/calendar/calendarTableTd/index.js +21 -0
  25. package/dist/modules/components/calendar/index.js +32 -0
  26. package/dist/modules/components/cardTab/cardTabButton/index.js +20 -0
  27. package/dist/modules/components/cardTab/cardTabContainer/index.js +23 -0
  28. package/dist/modules/components/cardTab/cardTabContext.js +15 -0
  29. package/dist/modules/components/checkbox/index.js +38 -0
  30. package/dist/modules/components/clientOnly.js +9 -0
  31. package/dist/modules/components/currencyInput/index.js +112 -0
  32. package/dist/modules/components/divider/index.js +12 -0
  33. package/dist/modules/components/drawer/drawerContainer/index.js +41 -0
  34. package/dist/modules/components/drawer/drawerContext.js +15 -0
  35. package/dist/modules/components/drawer/drawerHeader/index.js +21 -0
  36. package/dist/modules/components/facebookPixel/facebookPixel.client.js +9 -0
  37. package/dist/modules/components/facebookPixel/index.js +9 -0
  38. package/dist/modules/components/facebookPixel/pixel.js +48 -0
  39. package/dist/modules/components/fieldError/index.js +13 -0
  40. package/dist/modules/components/fieldLabel/index.js +12 -0
  41. package/dist/modules/components/fieldWrapper/index.js +13 -0
  42. package/dist/modules/components/fileUpload/hasFileContent/index.js +60 -0
  43. package/dist/modules/components/fileUpload/index.js +66 -0
  44. package/dist/modules/components/fileUpload/noFileContent/index.js +36 -0
  45. package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +35 -0
  46. package/dist/modules/components/fullCalendar/_viewService.js +101 -0
  47. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +11 -0
  48. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +71 -0
  49. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +29 -0
  50. package/dist/modules/components/fullCalendar/dayCalendar/index.js +14 -0
  51. package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +11 -0
  52. package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +69 -0
  53. package/dist/modules/components/fullCalendar/index.js +31 -0
  54. package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +10 -0
  55. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +29 -0
  56. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +13 -0
  57. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +11 -0
  58. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +14 -0
  59. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +36 -0
  60. package/dist/modules/components/fullCalendar/weekCalendar/index.js +10 -0
  61. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +71 -0
  62. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +18 -0
  63. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +11 -0
  64. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +17 -0
  65. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +35 -0
  66. package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +8 -0
  67. package/dist/modules/components/googleAnalytics/googleAnalytics.js +18 -0
  68. package/dist/modules/components/googleAnalytics/index.js +10 -0
  69. package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +14 -0
  70. package/dist/modules/components/googleTagManager/googleTagManager.client.js +8 -0
  71. package/dist/modules/components/googleTagManager/googleTagManager.js +45 -0
  72. package/dist/modules/components/googleTagManager/index.js +17 -0
  73. package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +9 -0
  74. package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +23 -0
  75. package/dist/modules/components/iconButton/index.js +32 -0
  76. package/dist/modules/components/imageUpload/hasFileContent/index.js +47 -0
  77. package/dist/modules/components/imageUpload/index.js +66 -0
  78. package/dist/modules/components/imageUpload/noFileContent/index.js +36 -0
  79. package/dist/modules/components/input/index.js +93 -0
  80. package/dist/modules/components/mapView/index.js +29 -0
  81. package/dist/modules/components/mapView/mapView.client.js +50 -0
  82. package/dist/modules/components/maskedInput/index.js +102 -0
  83. package/dist/modules/components/modal/modalContainer/index.js +50 -0
  84. package/dist/modules/components/modal/modalContext.js +15 -0
  85. package/dist/modules/components/modal/modalFooter/index.js +12 -0
  86. package/dist/modules/components/modal/modalHeader/index.js +21 -0
  87. package/dist/modules/components/multiSelect/index.js +116 -0
  88. package/dist/modules/components/multiSelect/multiSelectChevron/index.js +19 -0
  89. package/dist/modules/components/multiSelect/multiSelectContainer/index.js +14 -0
  90. package/dist/modules/components/multiSelect/multiSelectContent/index.js +12 -0
  91. package/dist/modules/components/multiSelect/multiSelectMark/index.js +20 -0
  92. package/dist/modules/components/multiSelect/multiSelectOption/index.js +18 -0
  93. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +36 -0
  94. package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +12 -0
  95. package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +14 -0
  96. package/dist/modules/components/pagination/chevronButton/index.js +18 -0
  97. package/dist/modules/components/pagination/currentButton/index.js +12 -0
  98. package/dist/modules/components/pagination/index.js +52 -0
  99. package/dist/modules/components/pagination/pageButton/index.js +13 -0
  100. package/dist/modules/components/pagination/paginationService.js +34 -0
  101. package/dist/modules/components/pagination/spread/index.js +12 -0
  102. package/dist/modules/components/phoneInput/index.js +104 -0
  103. package/dist/modules/components/phoneInput/phoneInputContainer/index.js +13 -0
  104. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +12 -0
  105. package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +24 -0
  106. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +34 -0
  107. package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +26 -0
  108. package/dist/modules/components/phoneInput/phoneInputMask/index.js +46 -0
  109. package/dist/modules/components/popover/index.js +38 -0
  110. package/dist/modules/components/radio/radioBox/index.js +25 -0
  111. package/dist/modules/components/radio/radioContext.js +22 -0
  112. package/dist/modules/components/radio/radioGroup/index.js +42 -0
  113. package/dist/modules/components/richText/blockButton/index.js +21 -0
  114. package/dist/modules/components/richText/element/index.js +73 -0
  115. package/dist/modules/components/richText/index.js +144 -0
  116. package/dist/modules/components/richText/insertImage/index.js +95 -0
  117. package/dist/modules/components/richText/insertVideo/index.js +86 -0
  118. package/dist/modules/components/richText/leaf/index.js +10 -0
  119. package/dist/modules/components/richText/markButton/index.js +20 -0
  120. package/dist/modules/components/richText/toolbar/index.js +11 -0
  121. package/dist/modules/components/searchPlaces.js +58 -0
  122. package/dist/modules/components/select/index.js +113 -0
  123. package/dist/modules/components/select/selectChevron/index.js +19 -0
  124. package/dist/modules/components/select/selectContainer/index.js +14 -0
  125. package/dist/modules/components/select/selectContent/index.js +12 -0
  126. package/dist/modules/components/select/selectOption/index.js +18 -0
  127. package/dist/modules/components/select/selectOptionsContainer/index.js +36 -0
  128. package/dist/modules/components/select/selectOverlay/index.js +12 -0
  129. package/dist/modules/components/select/selectSpinner/index.js +14 -0
  130. package/dist/modules/components/slider/index.js +35 -0
  131. package/dist/modules/components/switch/index.js +36 -0
  132. package/dist/modules/components/tab/tabButton/index.js +20 -0
  133. package/dist/modules/components/tab/tabContainer/index.js +23 -0
  134. package/dist/modules/components/tab/tabContext.js +15 -0
  135. package/dist/modules/components/table/tableBody/index.js +20 -0
  136. package/dist/modules/components/table/tableCaption/index.js +16 -0
  137. package/dist/modules/components/table/tableContainer/index.js +13 -0
  138. package/dist/modules/components/table/tableFooter/index.js +19 -0
  139. package/dist/modules/components/table/tableHeader/index.js +13 -0
  140. package/dist/modules/components/textarea/index.js +52 -0
  141. package/dist/modules/components/tooltip/index.js +35 -0
  142. package/dist/modules/components.css +2 -0
  143. package/dist/modules/hooks/useAutomation.js +36 -0
  144. package/dist/modules/hooks/useDrawer.js +18 -0
  145. package/dist/modules/hooks/useForm.js +8 -0
  146. package/dist/modules/hooks/useHydrated.js +10 -0
  147. package/dist/modules/hooks/useModal.js +18 -0
  148. package/dist/modules/hooks/useScopedParams.js +18 -0
  149. package/dist/modules/hooks/useScrollLock.js +21 -0
  150. package/dist/modules/hooks/useSearchAutomation.js +32 -0
  151. package/dist/modules/hooks/useSlider.js +14 -0
  152. package/dist/modules/hooks/useToast.js +10 -0
  153. package/dist/modules/index.js +72 -0
  154. package/dist/modules/providers/drawerProvider.js +36 -0
  155. package/dist/modules/providers/formProvider.js +13 -0
  156. package/dist/modules/providers/modalProvider.js +40 -0
  157. package/dist/modules/providers/placesProvider.js +18 -0
  158. package/dist/modules/providers/toastProvider.js +46 -0
  159. package/dist/modules/services/extractTextFromNode.js +7 -0
  160. package/dist/modules/services/fieldTemplate.js +23 -0
  161. package/dist/modules/services/iconRenderer.js +15 -0
  162. package/dist/modules/services/isBlockActive.js +13 -0
  163. package/dist/modules/services/isMarkActive.js +8 -0
  164. package/dist/modules/services/maskCurrencyValues.js +13 -0
  165. package/dist/modules/services/toHtml.js +7 -0
  166. package/dist/modules/services/toRichTextValue.js +9 -0
  167. package/dist/modules/services/toggleBlock.js +21 -0
  168. package/dist/modules/services/toggleMark.js +8 -0
  169. package/dist/modules/templates/badResponses.js +14 -0
  170. package/dist/modules/templates/richTextTemplates.js +17 -0
  171. package/dist/modules/templates/successResponses.js +9 -0
  172. package/dist/modules/utils/phoneInputUtilities.js +22 -0
  173. package/dist/modules/utils/richTextUtilities.js +90 -0
  174. package/dist/services/fieldTemplate.d.ts +1 -1
  175. package/dist/services/fieldTemplate.d.ts.map +1 -1
  176. package/package.json +163 -163
  177. package/dist/components/alert/alertContainer/index.js +0 -71
  178. package/dist/components/alert/alertContent/index.js +0 -26
  179. package/dist/components/alert/alertDescription/index.js +0 -25
  180. package/dist/components/alert/alertIcon/index.js +0 -43
  181. package/dist/components/alert/alertTitle/index.js +0 -27
  182. package/dist/components/audioPlayer/index.js +0 -112
  183. package/dist/components/audioUpload/hasFileContent/index.js +0 -26
  184. package/dist/components/audioUpload/index.js +0 -95
  185. package/dist/components/audioUpload/noFileContent/index.js +0 -29
  186. package/dist/components/badge/index.js +0 -41
  187. package/dist/components/button/index.js +0 -51
  188. package/dist/components/calendar/_calendarProvider.js +0 -58
  189. package/dist/components/calendar/_viewService.js +0 -179
  190. package/dist/components/calendar/calendarContainer/index.js +0 -6
  191. package/dist/components/calendar/calendarHeader/index.js +0 -13
  192. package/dist/components/calendar/calendarTableBody/index.js +0 -9
  193. package/dist/components/calendar/calendarTableContainer/index.js +0 -6
  194. package/dist/components/calendar/calendarTableHeader/index.js +0 -9
  195. package/dist/components/calendar/calendarTableTd/index.js +0 -15
  196. package/dist/components/calendar/index.js +0 -54
  197. package/dist/components/cardTab/cardTabButton/index.js +0 -40
  198. package/dist/components/cardTab/cardTabContainer/index.js +0 -42
  199. package/dist/components/cardTab/cardTabContext.js +0 -10
  200. package/dist/components/checkbox/index.js +0 -71
  201. package/dist/components/clientOnly.js +0 -31
  202. package/dist/components/currencyInput/index.js +0 -126
  203. package/dist/components/divider/index.js +0 -28
  204. package/dist/components/drawer/drawerContainer/index.js +0 -38
  205. package/dist/components/drawer/drawerContext.js +0 -10
  206. package/dist/components/drawer/drawerHeader/index.js +0 -33
  207. package/dist/components/facebookPixel/facebookPixel.client.js +0 -23
  208. package/dist/components/facebookPixel/index.js +0 -45
  209. package/dist/components/facebookPixel/pixel.js +0 -111
  210. package/dist/components/fieldError/index.js +0 -26
  211. package/dist/components/fieldLabel/index.js +0 -23
  212. package/dist/components/fieldWrapper/index.js +0 -27
  213. package/dist/components/fileUpload/hasFileContent/index.js +0 -34
  214. package/dist/components/fileUpload/index.js +0 -89
  215. package/dist/components/fileUpload/noFileContent/index.js +0 -29
  216. package/dist/components/fullCalendar/_fullCalendarProvider.js +0 -36
  217. package/dist/components/fullCalendar/_viewService.js +0 -144
  218. package/dist/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +0 -6
  219. package/dist/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +0 -105
  220. package/dist/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +0 -24
  221. package/dist/components/fullCalendar/dayCalendar/index.js +0 -9
  222. package/dist/components/fullCalendar/fullCalendarContainer/index.js +0 -6
  223. package/dist/components/fullCalendar/fullCalendarHeader/index.js +0 -37
  224. package/dist/components/fullCalendar/index.js +0 -52
  225. package/dist/components/fullCalendar/monthlyCalendar/index.js +0 -8
  226. package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +0 -29
  227. package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +0 -9
  228. package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +0 -6
  229. package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +0 -9
  230. package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +0 -30
  231. package/dist/components/fullCalendar/weekCalendar/index.js +0 -8
  232. package/dist/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +0 -102
  233. package/dist/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +0 -11
  234. package/dist/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +0 -6
  235. package/dist/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +0 -10
  236. package/dist/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +0 -25
  237. package/dist/components/googleAnalytics/googleAnalytics.client.js +0 -8
  238. package/dist/components/googleAnalytics/googleAnalytics.js +0 -23
  239. package/dist/components/googleAnalytics/index.js +0 -31
  240. package/dist/components/googleAnalytics/snippets/generateGAElements.js +0 -16
  241. package/dist/components/googleTagManager/googleTagManager.client.js +0 -8
  242. package/dist/components/googleTagManager/googleTagManager.js +0 -52
  243. package/dist/components/googleTagManager/index.js +0 -47
  244. package/dist/components/googleTagManager/snippets/appendToDataLayer.js +0 -7
  245. package/dist/components/googleTagManager/snippets/generateGTMElements.js +0 -25
  246. package/dist/components/iconButton/index.js +0 -38
  247. package/dist/components/imageUpload/hasFileContent/index.js +0 -24
  248. package/dist/components/imageUpload/index.js +0 -101
  249. package/dist/components/imageUpload/noFileContent/index.js +0 -29
  250. package/dist/components/input/index.js +0 -94
  251. package/dist/components/mapView/index.js +0 -53
  252. package/dist/components/mapView/mapView.client.js +0 -51
  253. package/dist/components/maskedInput/index.js +0 -108
  254. package/dist/components/modal/modalContainer/index.js +0 -40
  255. package/dist/components/modal/modalContext.js +0 -10
  256. package/dist/components/modal/modalFooter/index.js +0 -32
  257. package/dist/components/modal/modalHeader/index.js +0 -34
  258. package/dist/components/multiSelect/index.js +0 -135
  259. package/dist/components/multiSelect/multiSelectChevron/index.js +0 -18
  260. package/dist/components/multiSelect/multiSelectContainer/index.js +0 -11
  261. package/dist/components/multiSelect/multiSelectContent/index.js +0 -8
  262. package/dist/components/multiSelect/multiSelectMark/index.js +0 -11
  263. package/dist/components/multiSelect/multiSelectOption/index.js +0 -10
  264. package/dist/components/multiSelect/multiSelectOptionsContainer/index.js +0 -44
  265. package/dist/components/multiSelect/multiSelectOverlay/index.js +0 -9
  266. package/dist/components/multiSelect/multiSelectSpinner/index.js +0 -10
  267. package/dist/components/pagination/chevronButton/index.js +0 -9
  268. package/dist/components/pagination/currentButton/index.js +0 -6
  269. package/dist/components/pagination/index.js +0 -46
  270. package/dist/components/pagination/pageButton/index.js +0 -7
  271. package/dist/components/pagination/paginationService.js +0 -62
  272. package/dist/components/pagination/spread/index.js +0 -7
  273. package/dist/components/phoneInput/index.js +0 -127
  274. package/dist/components/phoneInput/phoneInputContainer/index.js +0 -11
  275. package/dist/components/phoneInput/phoneInputCountriesOverlay/index.js +0 -9
  276. package/dist/components/phoneInput/phoneInputCountryOption/index.js +0 -10
  277. package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.js +0 -40
  278. package/dist/components/phoneInput/phoneInputCountrySelector/index.js +0 -9
  279. package/dist/components/phoneInput/phoneInputMask/index.js +0 -37
  280. package/dist/components/popover/index.js +0 -62
  281. package/dist/components/radio/radioBox/index.js +0 -48
  282. package/dist/components/radio/radioContext.js +0 -11
  283. package/dist/components/radio/radioGroup/index.js +0 -58
  284. package/dist/components/richText/blockButton/index.js +0 -18
  285. package/dist/components/richText/element/index.js +0 -26
  286. package/dist/components/richText/index.js +0 -136
  287. package/dist/components/richText/insertImage/index.js +0 -33
  288. package/dist/components/richText/insertVideo/index.js +0 -51
  289. package/dist/components/richText/leaf/index.js +0 -13
  290. package/dist/components/richText/markButton/index.js +0 -16
  291. package/dist/components/richText/toolbar/index.js +0 -6
  292. package/dist/components/searchPlaces.js +0 -99
  293. package/dist/components/select/index.js +0 -134
  294. package/dist/components/select/selectChevron/index.js +0 -18
  295. package/dist/components/select/selectContainer/index.js +0 -11
  296. package/dist/components/select/selectContent/index.js +0 -8
  297. package/dist/components/select/selectOption/index.js +0 -10
  298. package/dist/components/select/selectOptionsContainer/index.js +0 -44
  299. package/dist/components/select/selectOverlay/index.js +0 -9
  300. package/dist/components/select/selectSpinner/index.js +0 -10
  301. package/dist/components/slider/index.js +0 -79
  302. package/dist/components/switch/index.js +0 -66
  303. package/dist/components/tab/tabButton/index.js +0 -40
  304. package/dist/components/tab/tabContainer/index.js +0 -42
  305. package/dist/components/tab/tabContext.js +0 -10
  306. package/dist/components/table/tableBody/index.js +0 -34
  307. package/dist/components/table/tableCaption/index.js +0 -24
  308. package/dist/components/table/tableContainer/index.js +0 -37
  309. package/dist/components/table/tableFooter/index.js +0 -23
  310. package/dist/components/table/tableHeader/index.js +0 -25
  311. package/dist/components/textarea/index.js +0 -80
  312. package/dist/components/tooltip/index.js +0 -96
  313. package/dist/hooks/useAutomation.js +0 -74
  314. package/dist/hooks/useDrawer.js +0 -20
  315. package/dist/hooks/useForm.js +0 -35
  316. package/dist/hooks/useHydrated.js +0 -26
  317. package/dist/hooks/useModal.js +0 -20
  318. package/dist/hooks/useScopedParams.js +0 -55
  319. package/dist/hooks/useScrollLock.js +0 -46
  320. package/dist/hooks/useSearchAutomation.js +0 -64
  321. package/dist/hooks/useSlider.js +0 -35
  322. package/dist/hooks/useToast.js +0 -28
  323. package/dist/providers/drawerProvider.js +0 -54
  324. package/dist/providers/formProvider.js +0 -34
  325. package/dist/providers/modalProvider.js +0 -58
  326. package/dist/providers/placesProvider.js +0 -40
  327. package/dist/providers/toastProvider.js +0 -62
  328. package/dist/services/extractTextFromNode.js +0 -5
  329. package/dist/services/fieldTemplate.js +0 -11
  330. package/dist/services/iconRenderer.js +0 -13
  331. package/dist/services/isBlockActive.js +0 -14
  332. package/dist/services/isMarkActive.js +0 -6
  333. package/dist/services/maskCurrencyValues.js +0 -23
  334. package/dist/services/toHtml.js +0 -22
  335. package/dist/services/toRichTextValue.js +0 -34
  336. package/dist/services/toggleBlock.js +0 -32
  337. package/dist/services/toggleMark.js +0 -10
  338. package/dist/style.css +0 -1
  339. package/dist/templates/badResponses.js +0 -12
  340. package/dist/templates/richTextTemplates.js +0 -12
  341. package/dist/templates/successResponses.js +0 -2
  342. package/dist/types/richTextTypes.js +0 -1
  343. package/dist/utils/phoneInputUtilities.js +0 -37
  344. package/dist/utils/richTextUtilities.js +0 -89
package/dist/index.js CHANGED
@@ -1,75 +1,4358 @@
1
- // components
2
- export { AlertContainer } from "./components/alert/alertContainer";
3
- export { AlertContent } from "./components/alert/alertContent";
4
- export { AlertDescription } from "./components/alert/alertDescription";
5
- export { AlertIcon } from "./components/alert/alertIcon";
6
- export { AlertTitle } from "./components/alert/alertTitle";
7
- export { AudioPlayer } from "./components/audioPlayer";
8
- export { AudioUpload } from "./components/audioUpload";
9
- export { Badge } from "./components/badge";
10
- export { Button } from "./components/button";
11
- export { Calendar } from "./components/calendar";
12
- export { CardTabButton } from "./components/cardTab/cardTabButton";
13
- export { CardTabContainer } from "./components/cardTab/cardTabContainer";
14
- export { Checkbox } from "./components/checkbox";
15
- export { ClientOnly } from "./components/clientOnly";
16
- export { CurrencyInput } from "./components/currencyInput";
17
- export { Divider } from "./components/divider";
18
- export { DrawerContainer } from "./components/drawer/drawerContainer";
19
- export { DrawerHeader } from "./components/drawer/drawerHeader";
20
- export { FacebookPixel } from "./components/facebookPixel";
21
- export { FieldError } from "./components/fieldError";
22
- export { FieldLabel } from "./components/fieldLabel";
23
- export { FieldWrapper } from "./components/fieldWrapper";
24
- export { FileUpload } from "./components/fileUpload";
25
- export { FullCalendar } from "./components/fullCalendar";
26
- export { GoogleAnalytics } from "./components/googleAnalytics";
27
- export { GoogleTagManager } from "./components/googleTagManager";
28
- export { IconButton } from "./components/iconButton";
29
- export { ImageUpload } from "./components/imageUpload";
30
- export { Input } from "./components/input";
31
- export { MapView } from "./components/mapView";
32
- export { MaskedInput } from "./components/maskedInput";
33
- export { ModalContainer } from "./components/modal/modalContainer";
34
- export { ModalFooter } from "./components/modal/modalFooter";
35
- export { ModalHeader } from "./components/modal/modalHeader";
36
- export { MultiSelect } from "./components/multiSelect";
37
- export { Pagination } from "./components/pagination";
38
- export { PhoneInput } from "./components/phoneInput";
39
- export { Popover } from "./components/popover";
40
- export { RadioBox } from "./components/radio/radioBox";
41
- export { RadioGroup } from "./components/radio/radioGroup";
42
- export { RichText } from "./components/richText";
43
- export { SearchPlaces } from "./components/searchPlaces";
44
- export { Select } from "./components/select";
45
- export { Slider } from "./components/slider";
46
- export { Switch } from "./components/switch";
47
- export { TabButton } from "./components/tab/tabButton";
48
- export { TabContainer } from "./components/tab/tabContainer";
49
- export { TableBody } from "./components/table/tableBody";
50
- export { TableCaption } from "./components/table/tableCaption";
51
- export { TableContainer } from "./components/table/tableContainer";
52
- export { TableFooter } from "./components/table/tableFooter";
53
- export { TableHeader } from "./components/table/tableHeader";
54
- export { Textarea } from "./components/textarea";
55
- export { Tooltip } from "./components/tooltip";
56
- // hooks
57
- export { useAutomation } from "./hooks/useAutomation";
58
- export { useDrawer } from "./hooks/useDrawer";
59
- export { useForm } from "./hooks/useForm";
60
- export { useHydrated } from "./hooks/useHydrated";
61
- export { useModal } from "./hooks/useModal";
62
- export { useScopedParams } from "./hooks/useScopedParams";
63
- export { useScrollLock } from "./hooks/useScrollLock";
64
- export { useSearchAutomation } from "./hooks/useSearchAutomation";
65
- export { useSlider } from "./hooks/useSlider";
66
- export { useToast } from "./hooks/useToast";
67
- // providers
68
- export { DrawerProvider } from "./providers/drawerProvider";
69
- export { FormProvider } from "./providers/formProvider";
70
- export { ModalProvider } from "./providers/modalProvider";
71
- export { PlacesProvider } from "./providers/placesProvider";
72
- export { ToastProvider } from "./providers/toastProvider";
73
- // services
74
- export { toHtml } from "./services/toHtml";
75
- export { toRichTextValue } from "./services/toRichTextValue";
1
+ import { Children as e, cloneElement as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
2
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
3
+ import { AlertTriangle as h, AlignCenter as g, AlignJustify as _, AlignLeft as v, AlignRight as y, Bold as b, Check as x, CheckCircle2 as S, ChevronDown as C, ChevronLeft as w, ChevronRight as T, Code as E, Ellipsis as D, File as O, FileArchive as k, FileAudio as A, FileImage as j, Heading1 as M, Heading2 as N, Image as P, Info as F, Italic as I, Loader2 as L, MapPinned as R, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as K, XCircle as q } from "lucide-react";
4
+ import { findCountryMask as ee, formatToCapitalizeFirstWordLetter as J, formatToCurrency as te, formatToPhone as ne, removeNonNumeric as re } from "@arkyn/shared";
5
+ import { AnimatePresence as ie, motion as Y } from "framer-motion";
6
+ import ae from "mapbox-gl";
7
+ import { createRoot as oe } from "react-dom/client";
8
+ import { InputMask as se } from "@react-input/mask";
9
+ import { countries as ce } from "@arkyn/templates";
10
+ import le from "is-hotkey";
11
+ import { Editor as ue, Element as de, Node as fe, Text as pe, Transforms as me, createEditor as he } from "slate";
12
+ import { withHistory as ge } from "slate-history";
13
+ import { Editable as _e, Slate as ve, useSlate as ye, withReact as be } from "slate-react";
14
+ import { StandaloneSearchBox as xe, useLoadScript as Se } from "@react-google-maps/api";
15
+ import { scroller as Ce } from "react-scroll";
16
+ import we, { Toaster as Te } from "react-hot-toast";
17
+ import Ee from "html-react-parser";
18
+ //#region src/components/alert/alertTitle/index.tsx
19
+ function De(e) {
20
+ let { className: t, ...n } = e;
21
+ return /* @__PURE__ */ p("div", {
22
+ className: `arkynAlertTitle ${t}`.trim(),
23
+ ...n
24
+ });
25
+ }
26
+ //#endregion
27
+ //#region src/components/alert/alertContainer/index.tsx
28
+ var Oe = n({});
29
+ function ke() {
30
+ return a(Oe);
31
+ }
32
+ function Ae(e) {
33
+ let { schema: t, children: n, className: r, ...i } = e, a = `arkynAlertContainer ${t} ${((e) => {
34
+ let t = !1, n = (e) => {
35
+ Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type === De ? t = !0 : e.props && typeof e.props == "object" && e.props !== null && "children" in e.props && n(e.props.children));
36
+ };
37
+ return n(e), t;
38
+ })(n) ? "existsAlertTitle" : "nonExistsAlertTitle"} ${r}`;
39
+ return /* @__PURE__ */ p(Oe.Provider, {
40
+ value: e,
41
+ children: /* @__PURE__ */ p("div", {
42
+ className: a.trim(),
43
+ ...i,
44
+ children: n
45
+ })
46
+ });
47
+ }
48
+ //#endregion
49
+ //#region src/components/alert/alertContent/index.tsx
50
+ function je(e) {
51
+ let { className: t, ...n } = e;
52
+ return /* @__PURE__ */ p("div", {
53
+ className: `arkynAlertContent ${t}`.trim(),
54
+ ...n
55
+ });
56
+ }
57
+ //#endregion
58
+ //#region src/components/alert/alertDescription/index.tsx
59
+ function Me(e) {
60
+ let { className: t, ...n } = e;
61
+ return /* @__PURE__ */ p("div", {
62
+ className: `arkynAlertDescription ${t}`.trim(),
63
+ ...n
64
+ });
65
+ }
66
+ //#endregion
67
+ //#region src/components/alert/alertIcon/index.tsx
68
+ function Ne(e) {
69
+ let { className: t, ...n } = e, { schema: r } = ke(), i = `arkynAlertIcon ${r} ${t}`;
70
+ switch (r) {
71
+ case "success": return /* @__PURE__ */ p(S, {
72
+ className: i,
73
+ ...n
74
+ });
75
+ case "danger": return /* @__PURE__ */ p(q, {
76
+ className: i,
77
+ ...n
78
+ });
79
+ case "warning": return /* @__PURE__ */ p(h, {
80
+ className: i,
81
+ ...n
82
+ });
83
+ case "info": return /* @__PURE__ */ p(F, {
84
+ className: i,
85
+ ...n
86
+ });
87
+ }
88
+ }
89
+ //#endregion
90
+ //#region src/hooks/useSlider.ts
91
+ function Pe(e) {
92
+ function t() {
93
+ return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
94
+ }
95
+ let [n, r] = u(t());
96
+ function i(e) {
97
+ return r(e <= 0 ? 0 : e >= 100 ? 100 : e);
98
+ }
99
+ return [n, i];
100
+ }
101
+ //#endregion
102
+ //#region src/components/slider/index.tsx
103
+ function Fe(e) {
104
+ let { onChange: t, value: n, disabled: r = !1, onDragging: i, className: a = "", ...s } = e, [c, d] = u(!1), f = l(null), h = () => d(!0), g = () => d(!1), _ = (e) => {
105
+ if (r || !c || !f.current) return;
106
+ let n = f.current.getBoundingClientRect(), i = e.clientX - n.left;
107
+ t(Math.min(Math.max(i / n.width * 100, 0), 100));
108
+ }, v = (e) => {
109
+ if (r || !f.current) return;
110
+ let n = f.current.getBoundingClientRect(), i = e.clientX - n.left;
111
+ t(Math.min(Math.max(i / n.width * 100, 0), 100));
112
+ };
113
+ o(() => (c ? (i && i(!0), document.addEventListener("mousemove", _), document.addEventListener("mouseup", g)) : (i && i(!1), document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", g)), () => {
114
+ document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", g);
115
+ }), [c]);
116
+ let y = `arkynSliderTrack ${c ? "isDragging" : "isNotDragging"} ${r ? "isDisabled" : "isEnabled"} ${a}`;
117
+ return /* @__PURE__ */ m("div", {
118
+ ...s,
119
+ className: y,
120
+ onMouseDown: h,
121
+ onClick: v,
122
+ ref: f,
123
+ children: [/* @__PURE__ */ p("div", {
124
+ className: "arkynSliderFill",
125
+ style: { width: `${n}%` }
126
+ }), /* @__PURE__ */ p("div", {
127
+ className: "arkynSliderThumb",
128
+ style: { left: `${n}%` }
129
+ })]
130
+ });
131
+ }
132
+ //#endregion
133
+ //#region src/components/audioPlayer/index.tsx
134
+ function Ie(e) {
135
+ let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Pe(0), [d, f] = u(!1), [h, g] = u(!1), _ = l(null), v = _.current?.currentTime || 0, y = _.current?.duration || 0, b = C(v), x = C(y), S = {
136
+ totalTime: y,
137
+ currentTime: v,
138
+ formattedCurrentTime: b,
139
+ formattedTotalTime: x
140
+ };
141
+ function C(e) {
142
+ if (!e) return "00:00";
143
+ let t = Math.floor(e / 60), n = Math.floor(e % 60);
144
+ return `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
145
+ }
146
+ function w() {
147
+ let t = _.current;
148
+ t && (e.onPlayAudio && e.onPlayAudio(S), t.play(), f(!0));
149
+ }
150
+ function T() {
151
+ let t = _.current;
152
+ t && (e.onPauseAudio && e.onPauseAudio(S), t.pause(), f(!1));
153
+ }
154
+ function E() {
155
+ d ? T() : w();
156
+ }
157
+ function D(e) {
158
+ let t = _.current;
159
+ if (!t) return;
160
+ let n = t.duration;
161
+ t.currentTime = e / 100 * n;
162
+ }
163
+ return h || !d ? _.current?.pause() : d && _.current?.play(), o(() => {
164
+ let e = _.current;
165
+ if (!e) return;
166
+ let t = () => {
167
+ let t = e.duration;
168
+ c(e.currentTime / t * 100);
169
+ };
170
+ return e.addEventListener("timeupdate", t), () => {
171
+ e.removeEventListener("timeupdate", t);
172
+ };
173
+ }, []), /* @__PURE__ */ m("div", {
174
+ className: "arkynAudioPlayer",
175
+ style: i,
176
+ children: [
177
+ /* @__PURE__ */ p("audio", {
178
+ ...a,
179
+ ref: _,
180
+ src: e.src,
181
+ onEnded: T
182
+ }),
183
+ /* @__PURE__ */ m("button", {
184
+ type: "button",
185
+ disabled: r,
186
+ onClick: E,
187
+ children: [d && /* @__PURE__ */ p(z, {}), !d && /* @__PURE__ */ p(B, {})]
188
+ }),
189
+ /* @__PURE__ */ p("p", { children: b }),
190
+ /* @__PURE__ */ p(Fe, {
191
+ value: s,
192
+ onChange: D,
193
+ onDragging: g,
194
+ disabled: r
195
+ }),
196
+ /* @__PURE__ */ p("p", { children: x })
197
+ ]
198
+ });
199
+ }
200
+ //#endregion
201
+ //#region src/providers/formProvider.tsx
202
+ var Le = n({});
203
+ function Re(e) {
204
+ let { children: n, fieldErrors: r, form: i } = e;
205
+ return /* @__PURE__ */ m(Le.Provider, {
206
+ value: { fieldErrors: r },
207
+ children: [!i && n, i && t(i, i.props, n)]
208
+ });
209
+ }
210
+ //#endregion
211
+ //#region src/hooks/useForm.ts
212
+ function X() {
213
+ return a(Le);
214
+ }
215
+ //#endregion
216
+ //#region src/components/fieldError/index.tsx
217
+ function ze(e) {
218
+ let { children: t, className: n, ...r } = e, i = `arkynFieldError ${n}`;
219
+ return t ? /* @__PURE__ */ p("strong", {
220
+ className: i.trim(),
221
+ ...r,
222
+ children: t
223
+ }) : /* @__PURE__ */ p(f, {});
224
+ }
225
+ //#endregion
226
+ //#region src/components/fieldLabel/index.tsx
227
+ function Be(e) {
228
+ let { showAsterisk: t = !1, className: n = "", ...r } = e;
229
+ return /* @__PURE__ */ p("label", {
230
+ className: `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`.trim(),
231
+ ...r
232
+ });
233
+ }
234
+ //#endregion
235
+ //#region src/components/fieldWrapper/index.tsx
236
+ function Ve(e) {
237
+ let { children: t, className: n, orientation: r = "vertical", ...i } = e;
238
+ return /* @__PURE__ */ p("section", {
239
+ className: `arkynFieldWrapper ${n} ${r}`.trim(),
240
+ ...i,
241
+ children: t
242
+ });
243
+ }
244
+ //#endregion
245
+ //#region src/services/iconRenderer.tsx
246
+ function Z(e) {
247
+ let { iconSize: t, icon: n, className: r, show: i = !0 } = e;
248
+ return !i || !n ? /* @__PURE__ */ p(f, {}) : typeof n == "string" ? /* @__PURE__ */ p("p", {
249
+ className: r,
250
+ children: n
251
+ }) : /* @__PURE__ */ p(n, {
252
+ size: t,
253
+ strokeWidth: 2.5,
254
+ className: r
255
+ });
256
+ }
257
+ //#endregion
258
+ //#region src/components/button/index.tsx
259
+ function Q(e) {
260
+ let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", loadingText: i, size: a = "md", leftIcon: o, rightIcon: s, disabled: c, className: l = "", children: u, ...d } = e, f = {
261
+ xs: 12,
262
+ sm: 16,
263
+ md: 20,
264
+ lg: 24
265
+ }[a];
266
+ return /* @__PURE__ */ m("button", {
267
+ className: `arkynButton ${t ? "loadingTrue" : "loadingFalse"} ${r} ${n} ${a} ${i ? "loadingTextTrue" : "loadingTextFalse"} ${l}`,
268
+ disabled: c || t,
269
+ ...d,
270
+ children: [/* @__PURE__ */ m("div", {
271
+ className: "arkynButtonSpinner",
272
+ children: [/* @__PURE__ */ p(L, {
273
+ size: f,
274
+ strokeWidth: 2.5
275
+ }), i && i]
276
+ }), /* @__PURE__ */ m("div", {
277
+ className: "arkynButtonContent",
278
+ children: [
279
+ /* @__PURE__ */ p(Z, {
280
+ iconSize: f,
281
+ icon: o
282
+ }),
283
+ u,
284
+ /* @__PURE__ */ p(Z, {
285
+ iconSize: f,
286
+ icon: s
287
+ })
288
+ ]
289
+ })]
290
+ });
291
+ }
292
+ //#endregion
293
+ //#region src/components/divider/index.tsx
294
+ function He(e) {
295
+ let { className: t, orientation: n = "horizontal", ...r } = e;
296
+ return /* @__PURE__ */ p("div", {
297
+ className: `arkynDivider ${n} ${t}`.trim(),
298
+ ...r
299
+ });
300
+ }
301
+ //#endregion
302
+ //#region src/components/iconButton/index.tsx
303
+ function Ue(e) {
304
+ let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", size: i = "md", icon: a, disabled: o, className: s = "", ...c } = e, l = {
305
+ xs: 12,
306
+ sm: 16,
307
+ md: 20,
308
+ lg: 24
309
+ }, u = `arkynIconButton ${r} ${n} ${i} ${t ? "loadingTrue" : "loadingFalse"} ${s}`;
310
+ return /* @__PURE__ */ m("button", {
311
+ disabled: o || t,
312
+ className: u.trim(),
313
+ ...c,
314
+ children: [/* @__PURE__ */ p("div", {
315
+ className: "arkynIconButtonSpinner",
316
+ children: /* @__PURE__ */ p(L, {
317
+ size: l[i],
318
+ strokeWidth: 2.5
319
+ })
320
+ }), /* @__PURE__ */ p("div", {
321
+ className: "arkynIconButtonContent",
322
+ children: /* @__PURE__ */ p(a, {
323
+ size: l[i],
324
+ strokeWidth: 2.5
325
+ })
326
+ })]
327
+ });
328
+ }
329
+ //#endregion
330
+ //#region src/components/tooltip/index.tsx
331
+ function We(e) {
332
+ let { text: t, size: n = "lg", children: r, orientation: i = "top", className: a = "", ...c } = e, d = s(), f = l(null), [h, g] = u(i);
333
+ return o(() => {
334
+ let e = () => {
335
+ if (!f.current) return;
336
+ let e = document.getElementById(d);
337
+ e && (g(i), requestAnimationFrame(() => {
338
+ let t = e.getBoundingClientRect(), n = window.innerWidth, r = window.innerHeight, a = i;
339
+ i === "left" && t.left < 0 ? a = "right" : i === "right" && t.right > n ? a = "left" : i === "top" && t.top < 0 ? a = "bottom" : i === "bottom" && t.bottom > r && (a = "top"), a === "right" && t.right > n ? a = "left" : a === "left" && t.left < 0 ? a = "right" : a === "bottom" && t.bottom > r ? a = "top" : a === "top" && t.top < 0 && (a = "bottom"), g(a);
340
+ }));
341
+ }, t = f.current;
342
+ if (!t) return;
343
+ let n = () => {
344
+ setTimeout(e, 1);
345
+ };
346
+ return t.addEventListener("mouseenter", n), window.addEventListener("resize", e), () => {
347
+ t.removeEventListener("mouseenter", n), window.removeEventListener("resize", e);
348
+ };
349
+ }, [i, d]), /* @__PURE__ */ m("div", {
350
+ className: `arkynTooltip ${n} ${h} ${a}`.trim(),
351
+ ...c,
352
+ ref: f,
353
+ children: [r, /* @__PURE__ */ p("div", {
354
+ className: "arkynTooltipText",
355
+ id: d,
356
+ dangerouslySetInnerHTML: { __html: t }
357
+ })]
358
+ });
359
+ }
360
+ //#endregion
361
+ //#region src/components/audioUpload/hasFileContent/index.tsx
362
+ function Ge(e) {
363
+ let { filePath: t, disabled: n, acceptAudio: r, handleSelectFile: i, isLoading: a, reSendAudio: o, changeAudioButtonText: s } = e;
364
+ function c() {
365
+ if (n) return;
366
+ let e = document.createElement("input");
367
+ e.type = "file", e.accept = r, e.onchange = (e) => {
368
+ let t = e.target.files?.[0];
369
+ t && i(t);
370
+ }, e.click();
371
+ }
372
+ return /* @__PURE__ */ m("div", {
373
+ className: "arkynAudioUploadHasFileContentContainer",
374
+ children: [
375
+ /* @__PURE__ */ p(Ie, { src: t }),
376
+ /* @__PURE__ */ p(He, {}),
377
+ /* @__PURE__ */ m("div", {
378
+ className: "arkynAudioUploadButtonsContainer",
379
+ children: [!!o && /* @__PURE__ */ p(We, {
380
+ orientation: "bottom",
381
+ text: "Reenviar áudio",
382
+ children: /* @__PURE__ */ p(Ue, {
383
+ type: "button",
384
+ "aria-label": "resend image",
385
+ variant: "outline",
386
+ scheme: "danger",
387
+ size: "sm",
388
+ isLoading: a,
389
+ onClick: o,
390
+ icon: H,
391
+ disabled: n
392
+ })
393
+ }), /* @__PURE__ */ p(Q, {
394
+ isLoading: a,
395
+ onClick: c,
396
+ variant: "outline",
397
+ size: "sm",
398
+ type: "button",
399
+ disabled: n,
400
+ children: s
401
+ })]
402
+ })
403
+ ]
404
+ });
405
+ }
406
+ //#endregion
407
+ //#region src/components/audioUpload/noFileContent/index.tsx
408
+ function Ke(e) {
409
+ let { dropAudioText: t, isLoading: n, acceptAudio: r, handleSelectFile: i, selectAudioButtonText: a, disabled: o } = e;
410
+ function s(e) {
411
+ if (o) return;
412
+ e.preventDefault();
413
+ let t = e.dataTransfer.files[0];
414
+ t && i(t);
415
+ }
416
+ function c() {
417
+ if (o) return;
418
+ let e = document.createElement("input");
419
+ e.type = "file", e.accept = r, e.onchange = (e) => {
420
+ let t = e.target.files?.[0];
421
+ t && i(t);
422
+ }, e.click();
423
+ }
424
+ return /* @__PURE__ */ m("div", {
425
+ onDrop: s,
426
+ className: "arkynAudioUploadNoFileContent",
427
+ children: [/* @__PURE__ */ p(Q, {
428
+ isLoading: n,
429
+ onClick: c,
430
+ variant: "ghost",
431
+ size: "sm",
432
+ type: "button",
433
+ disabled: o,
434
+ children: a
435
+ }), /* @__PURE__ */ p("p", { children: t })]
436
+ });
437
+ }
438
+ //#endregion
439
+ //#region src/components/audioUpload/index.tsx
440
+ function qe(e) {
441
+ let { name: t, label: n, fileName: r = "file", method: i = "POST", onChange: a, fileResponseName: o = "url", selectAudioButtonText: s = "Selecionar arquivo de áudio", dropAudioText: c = "Ou arraste e solte um arquivo de áudio aqui", changeAudioButtonText: l = "Trocar arquivo de áudio", acceptAudio: d = "audio/*", action: f, defaultValue: h = "", showAsterisk: g = !1, disabled: _ = !1 } = e, { fieldErrors: v } = X(), y = v?.[t], [b, x] = u(h), [S, C] = u(""), [w, T] = u(null), [E, D] = u(h), [O, k] = u(!1);
442
+ async function A(e) {
443
+ if (_) return;
444
+ k(!0), T(e), C("");
445
+ let t = new FormData();
446
+ t.append(r, e), await fetch(f, {
447
+ method: i,
448
+ body: t
449
+ }).then(async (e) => await e.json()).then((e) => {
450
+ e?.error ? C(e.error) : x(e?.[o]), a && a(e?.[o]);
451
+ }).catch((e) => {
452
+ console.error(e), C("Erro ao enviar audio");
453
+ }).finally(() => k(!1));
454
+ }
455
+ function j(e) {
456
+ if (!_) {
457
+ if (e.type.indexOf("audio") === -1) {
458
+ C("O arquivo selecionado não é um arquivo de áudio");
459
+ return;
460
+ }
461
+ D(URL.createObjectURL(e)), A(e);
462
+ }
463
+ }
464
+ let M = y || S;
465
+ return /* @__PURE__ */ m(Ve, { children: [
466
+ n && /* @__PURE__ */ p(Be, {
467
+ showAsterisk: g,
468
+ children: n
469
+ }),
470
+ /* @__PURE__ */ m("div", {
471
+ className: `arkynAudioUpload ${M ? "hasError" : "noHasError"} ${E ? "hasAudio" : "noHasAudio"}`,
472
+ children: [
473
+ /* @__PURE__ */ p("input", {
474
+ type: "hidden",
475
+ name: t,
476
+ value: b || ""
477
+ }),
478
+ !E && /* @__PURE__ */ p(Ke, {
479
+ disabled: _,
480
+ isLoading: O,
481
+ acceptAudio: d,
482
+ dropAudioText: c,
483
+ handleSelectFile: j,
484
+ selectAudioButtonText: s
485
+ }),
486
+ E && /* @__PURE__ */ p(Ge, {
487
+ filePath: E,
488
+ acceptAudio: d,
489
+ changeAudioButtonText: l,
490
+ disabled: _,
491
+ handleSelectFile: j,
492
+ isLoading: O,
493
+ reSendAudio: M && w ? () => A(w) : void 0
494
+ })
495
+ ]
496
+ }),
497
+ M && /* @__PURE__ */ p(ze, { children: M })
498
+ ] });
499
+ }
500
+ //#endregion
501
+ //#region src/components/badge/index.tsx
502
+ function Je(e) {
503
+ let { variant: t = "ghost", scheme: n = "primary", size: r = "lg", leftIcon: i, rightIcon: a, className: o = "", children: s, ...c } = e, l = {
504
+ md: 12,
505
+ lg: 14
506
+ }[r];
507
+ return /* @__PURE__ */ m("div", {
508
+ className: `arkynBadge ${t} ${n} ${r} ${o}`.trim(),
509
+ ...c,
510
+ children: [
511
+ /* @__PURE__ */ p(Z, {
512
+ iconSize: l,
513
+ icon: i
514
+ }),
515
+ /* @__PURE__ */ p("p", { children: s }),
516
+ /* @__PURE__ */ p(Z, {
517
+ iconSize: l,
518
+ icon: a
519
+ })
520
+ ]
521
+ });
522
+ }
523
+ //#endregion
524
+ //#region src/components/calendar/_viewService.ts
525
+ var Ye = class {
526
+ currentDay(e) {
527
+ return String(e.getDate()).padStart(2, "0");
528
+ }
529
+ currentMonth(e) {
530
+ return String(e.getMonth() + 1).padStart(2, "0");
531
+ }
532
+ currentYear(e) {
533
+ return String(e.getFullYear());
534
+ }
535
+ capitalize(e) {
536
+ return J(e);
537
+ }
538
+ parseDayType(e, t, n, r) {
539
+ let i = r[0].getDate(), a = r[0].getMonth(), o = r[0].getFullYear(), s = r[1].getDate(), c = r[1].getMonth(), l = r[1].getFullYear(), u = new Date(o, a, i), d = new Date(l, c, s), f = new Date(n, t, e);
540
+ return u.getTime() === f.getTime() || d.getTime() === f.getTime() ? "checkedDay" : f > u && f < d ? "middleDay" : "uncheckedDay";
541
+ }
542
+ listWeek(e) {
543
+ let t = [], n = new Date(Date.UTC(2023, 0, 1));
544
+ for (let r = 0; r < 7; r++) {
545
+ let i = new Date(n);
546
+ i.setUTCDate(n.getUTCDate() + r);
547
+ let a = i.toLocaleDateString(e, {
548
+ weekday: "short",
549
+ timeZone: "UTC"
550
+ });
551
+ t.push(a);
552
+ }
553
+ return t;
554
+ }
555
+ listMonths(e, t) {
556
+ let n = new Intl.DateTimeFormat(t, { month: "long" });
557
+ return Array.from({ length: 12 }, (t, r) => {
558
+ let i = new Date(e.getFullYear(), r, 1), a = n.format(i);
559
+ return {
560
+ label: this.capitalize(a),
561
+ value: String(r).padStart(2, "0")
562
+ };
563
+ });
564
+ }
565
+ listYears(e) {
566
+ let t = (/* @__PURE__ */ new Date()).getFullYear();
567
+ return Array.from({ length: e + 1 }, (n, r) => {
568
+ let i = t - e + r;
569
+ return {
570
+ label: String(i),
571
+ value: String(i)
572
+ };
573
+ }).reverse();
574
+ }
575
+ listMatrix(e, t) {
576
+ let n = e.getFullYear(), r = e.getMonth(), i = new Date(n, r, 1).getDay(), a = new Date(n, r + 1, 0).getDate(), o = new Date(n, r, 0).getDate(), s = Math.ceil((i + a) / 7) * 7, c = [], l = 1, u = 1;
577
+ for (let e = 0; e < s; e++) {
578
+ let s = Math.floor(e / 7);
579
+ if (c[s] || (c[s] = []), e < i) {
580
+ let a = o - (i - e - 1), l = r === 0 ? 11 : r - 1, u = r === 0 ? n - 1 : n;
581
+ c[s].push({
582
+ day: a,
583
+ month: l,
584
+ year: u,
585
+ dayOwner: "previous",
586
+ dayType: this.parseDayType(a, l, u, t)
587
+ });
588
+ } else if (l <= a) c[s].push({
589
+ day: l,
590
+ month: r,
591
+ year: n,
592
+ dayOwner: "current",
593
+ dayType: this.parseDayType(l, r, n, t)
594
+ }), l++;
595
+ else {
596
+ let e = r === 11 ? 0 : r + 1, i = r === 11 ? n + 1 : n;
597
+ c[s].push({
598
+ day: u,
599
+ month: e,
600
+ year: i,
601
+ dayOwner: "next",
602
+ dayType: this.parseDayType(u, e, i, t)
603
+ }), u++;
604
+ }
605
+ }
606
+ return c;
607
+ }
608
+ changeDay(e, t, n, r, i, a, o) {
609
+ let s = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), c = s(new Date(n, t, e));
610
+ if (o(c), r === "single") {
611
+ a([c, c]);
612
+ return;
613
+ }
614
+ let l = s(i[0]), u = s(i[1]), d = c.getTime(), f = l.getTime(), p = u.getTime();
615
+ if (d === f) {
616
+ a([c, c]);
617
+ return;
618
+ }
619
+ if (d === p) {
620
+ a([c, c]);
621
+ return;
622
+ }
623
+ if (c < l) {
624
+ a([c, u]);
625
+ return;
626
+ }
627
+ if (c > u) {
628
+ a([l, c]);
629
+ return;
630
+ }
631
+ if (Math.abs(d - f) <= Math.abs(p - d)) {
632
+ a([c, u]);
633
+ return;
634
+ }
635
+ a([l, c]);
636
+ }
637
+ changeMonth(e, t, n) {
638
+ let r = new Date(t);
639
+ r.setMonth(e), n(r);
640
+ }
641
+ changeYear(e, t, n) {
642
+ let r = new Date(t);
643
+ r.setFullYear(e), n(r);
644
+ }
645
+ nextMonth(e, t) {
646
+ let n = new Date(e);
647
+ n.setDate(1), n.setMonth(n.getMonth() + 1), t(n);
648
+ }
649
+ previousMonth(e, t) {
650
+ let n = new Date(e);
651
+ n.setDate(1), n.setMonth(n.getMonth() - 1), t(n);
652
+ }
653
+ }, Xe = n({});
654
+ function Ze() {
655
+ return a(Xe);
656
+ }
657
+ function Qe(e) {
658
+ let { calendarType: t, children: n, defaultValue: r, defaultViewValue: i = /* @__PURE__ */ new Date(), language: a = "pt-BR", onChange: o, onChangeView: s, value: c, viewValue: l } = e, d = t === "single" ? [r || /* @__PURE__ */ new Date(), r || /* @__PURE__ */ new Date()] : r || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [f, m] = u(i), [h, g] = u(d), _ = l || f, v = c ? t === "single" ? [c, c] : c : h, y = new Ye();
659
+ function b(e) {
660
+ let n = [new Date(e[0]), new Date(e[1])];
661
+ o && t === "range" && o(n), o && t === "single" && o(n[0]), g(n);
662
+ }
663
+ function x(e) {
664
+ s && s(e), m(e);
665
+ }
666
+ return /* @__PURE__ */ p(Xe.Provider, {
667
+ value: {
668
+ valueDate: v,
669
+ viewDate: _,
670
+ currentDate: _.toLocaleDateString(a).slice(3),
671
+ currentDay: y.currentDay(_),
672
+ currentMonth: y.currentMonth(_),
673
+ currentYear: y.currentYear(_),
674
+ listWeek: y.listWeek(a),
675
+ listMonths: y.listMonths(_, a),
676
+ listYears: y.listYears(100),
677
+ listMatrix: y.listMatrix(_, v),
678
+ changeDay: (e, n, r) => y.changeDay(e, n, r, t, v, b, x),
679
+ changeMonth: (e) => y.changeMonth(e, _, x),
680
+ changeYear: (e) => y.changeYear(e, _, x),
681
+ nextMonth: () => y.nextMonth(_, x),
682
+ previousMonth: () => y.previousMonth(_, x)
683
+ },
684
+ children: n
685
+ });
686
+ }
687
+ //#endregion
688
+ //#region src/components/calendar/calendarContainer/index.tsx
689
+ function $e({ children: e }) {
690
+ return /* @__PURE__ */ p("div", {
691
+ className: "arkynCalendarContainer",
692
+ children: e
693
+ });
694
+ }
695
+ //#endregion
696
+ //#region src/services/fieldTemplate.tsx
697
+ function et(e) {
698
+ let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
699
+ return a ? s : /* @__PURE__ */ m(Ve, {
700
+ id: t,
701
+ className: i,
702
+ orientation: c,
703
+ children: [
704
+ n && /* @__PURE__ */ p(Be, {
705
+ showAsterisk: r,
706
+ children: n
707
+ }),
708
+ s,
709
+ o && /* @__PURE__ */ p(ze, { children: o })
710
+ ]
711
+ });
712
+ }
713
+ //#endregion
714
+ //#region src/components/select/selectChevron/index.tsx
715
+ function tt(e) {
716
+ let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
717
+ return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
718
+ className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
719
+ strokeWidth: 2.5,
720
+ style: {
721
+ minWidth: t,
722
+ minHeight: t,
723
+ maxWidth: t,
724
+ maxHeight: t
725
+ }
726
+ });
727
+ }
728
+ //#endregion
729
+ //#region src/components/select/selectContainer/index.tsx
730
+ function nt(e) {
731
+ let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
732
+ return /* @__PURE__ */ p("section", {
733
+ id: d,
734
+ className: `arkynSelectContainer ${f ? "hasPrefix" : ""} ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`,
735
+ onClick: n,
736
+ children: t
737
+ });
738
+ }
739
+ //#endregion
740
+ //#region src/components/select/selectContent/index.tsx
741
+ function rt(e) {
742
+ let { children: t, size: n } = e;
743
+ return /* @__PURE__ */ p("div", {
744
+ className: `arkynSelectContent ${n}`,
745
+ children: t
746
+ });
747
+ }
748
+ //#endregion
749
+ //#region src/components/select/selectOption/index.tsx
750
+ function it(e) {
751
+ let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
752
+ return /* @__PURE__ */ m("div", {
753
+ onClick: () => r(i),
754
+ className: `arkynSelectOption ${a} ${n(i) ? "active" : ""}`,
755
+ children: [
756
+ t,
757
+ " ",
758
+ /* @__PURE__ */ p(x, {})
759
+ ]
760
+ });
761
+ }
762
+ //#endregion
763
+ //#region src/hooks/useScrollLock.ts
764
+ function at() {
765
+ return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
766
+ }
767
+ function ot(e) {
768
+ o(() => {
769
+ if (e) {
770
+ let e = document.body.style.overflow, t = document.body.style.paddingRight, n = at();
771
+ if (n > 0) {
772
+ let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight) || 0;
773
+ document.body.style.paddingRight = `${t + n}px`;
774
+ }
775
+ return document.body.style.overflow = "hidden", () => {
776
+ document.body.style.overflow = e, document.body.style.paddingRight = t;
777
+ };
778
+ }
779
+ }, [e]);
780
+ }
781
+ //#endregion
782
+ //#region src/components/input/index.tsx
783
+ function st(e) {
784
+ let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: o, className: c = "", prefix: d, suffix: f, isLoading: h = !1, leftIcon: g, readOnly: _, onFocus: v, onBlur: y, unShowFieldTemplate: b = !1, errorMessage: x, showAsterisk: S, rightIcon: C, type: w = "text", size: T = "md", id: E, value: D, placeholder: O, orientation: k, ...A } = e, { fieldErrors: j } = X(), [M, N] = u(!1), P = l(null), F = E || s(), I = x || j?.[t], R = !!I, z = n || h, B = {
785
+ md: 20,
786
+ lg: 20
787
+ }[T], V = C ? "right" : "left", H = V === "left" && h, U = V === "right" && h;
788
+ function W() {
789
+ z || !P?.current || (N(!0), P.current.focus());
790
+ }
791
+ function G(e) {
792
+ N(!0), v && v(e);
793
+ }
794
+ function K(e) {
795
+ N(!1), y && y(e);
796
+ }
797
+ return w === "hidden" ? /* @__PURE__ */ p("input", {
798
+ style: { display: "none" },
799
+ readOnly: !0,
800
+ type: "text",
801
+ ref: P,
802
+ ...A
803
+ }) : /* @__PURE__ */ p(et, {
804
+ name: t,
805
+ label: o,
806
+ showAsterisk: S,
807
+ className: c,
808
+ errorMessage: I,
809
+ unShowFieldTemplate: b,
810
+ orientation: k,
811
+ children: /* @__PURE__ */ m("section", {
812
+ title: r,
813
+ style: i,
814
+ onClick: W,
815
+ className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${z || _ || h ? "opacity" : ""} ${R ? "errored" : ""} ${M ? "focused" : ""}`,
816
+ children: [
817
+ /* @__PURE__ */ p(Z, {
818
+ iconSize: B,
819
+ icon: d,
820
+ className: "prefix"
821
+ }),
822
+ /* @__PURE__ */ p(Z, {
823
+ show: H,
824
+ iconSize: B,
825
+ className: "spinner",
826
+ icon: L
827
+ }),
828
+ /* @__PURE__ */ p(Z, {
829
+ show: !h,
830
+ icon: g,
831
+ iconSize: B
832
+ }),
833
+ /* @__PURE__ */ p("input", {
834
+ disabled: z,
835
+ readOnly: _,
836
+ ref: P,
837
+ onFocus: G,
838
+ onBlur: K,
839
+ type: w,
840
+ id: F,
841
+ name: t,
842
+ placeholder: z && D || O,
843
+ value: z ? void 0 : D,
844
+ ...A
845
+ }),
846
+ /* @__PURE__ */ p(Z, {
847
+ show: !h,
848
+ icon: C,
849
+ iconSize: B
850
+ }),
851
+ /* @__PURE__ */ p(Z, {
852
+ show: U,
853
+ iconSize: B,
854
+ className: "spinner",
855
+ icon: L
856
+ }),
857
+ /* @__PURE__ */ p(Z, {
858
+ iconSize: B,
859
+ icon: f,
860
+ className: "suffix"
861
+ })
862
+ ]
863
+ })
864
+ });
865
+ }
866
+ //#endregion
867
+ //#region src/components/select/selectOptionsContainer/index.tsx
868
+ function ct(e) {
869
+ let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
870
+ ot(n), o(() => {
871
+ n && (() => {
872
+ if (!s.current) return;
873
+ let e = s.current.parentElement;
874
+ if (!e) return;
875
+ let t = e.getBoundingClientRect();
876
+ window.innerHeight - t.bottom < 300 && t.top > 300 ? d("top") : d("bottom");
877
+ })();
878
+ }, [n]);
879
+ function h(e) {
880
+ r && a(e.target.value);
881
+ }
882
+ return n ? /* @__PURE__ */ m("div", {
883
+ ref: s,
884
+ className: `arkynSelectOptionsContainer ${c}`,
885
+ children: [r && /* @__PURE__ */ p(st, {
886
+ type: "search",
887
+ name: "search-select",
888
+ variant: "underline",
889
+ leftIcon: U,
890
+ value: i,
891
+ onChange: h
892
+ }), t]
893
+ }) : /* @__PURE__ */ p(f, {});
894
+ }
895
+ //#endregion
896
+ //#region src/components/select/selectOverlay/index.tsx
897
+ function lt(e) {
898
+ let { isFocused: t, handleBlur: n } = e;
899
+ return t ? /* @__PURE__ */ p("aside", {
900
+ className: "arkynSelectOverlay",
901
+ onClick: n
902
+ }) : /* @__PURE__ */ p(f, {});
903
+ }
904
+ //#endregion
905
+ //#region src/components/select/selectSpinner/index.tsx
906
+ function ut(e) {
907
+ let { iconSize: t, isLoading: n } = e;
908
+ return n ? /* @__PURE__ */ p(L, {
909
+ className: "arkynSelectSpinner",
910
+ size: t,
911
+ strokeWidth: 2.5
912
+ }) : /* @__PURE__ */ p(f, {});
913
+ }
914
+ //#endregion
915
+ //#region src/components/select/index.tsx
916
+ function dt(e) {
917
+ let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !0, defaultValue: o = "", errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", orientation: j = "vertical", unShowFieldTemplate: M = !1 } = e, { fieldErrors: N } = X(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
918
+ md: 20,
919
+ lg: 20
920
+ }[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
921
+ function q(e) {
922
+ return K === e;
923
+ }
924
+ function ee(e) {
925
+ return n.find((t) => t.value === e)?.label || "";
926
+ }
927
+ function J() {
928
+ R || !P?.current || H || (U(!0), P.current.focus(), T && T());
929
+ }
930
+ function te() {
931
+ U(!1), C && P.current && P.current.blur();
932
+ }
933
+ function ne(e) {
934
+ V(e), x && x(e);
935
+ }
936
+ function re(e) {
937
+ q(e) ? (G(""), S && S("")) : (G(e), S && S(e)), a && te();
938
+ }
939
+ let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
940
+ return /* @__PURE__ */ p(et, {
941
+ name: t,
942
+ label: _,
943
+ showAsterisk: y,
944
+ className: r,
945
+ errorMessage: I,
946
+ unShowFieldTemplate: M,
947
+ orientation: j,
948
+ children: /* @__PURE__ */ m(nt, {
949
+ handleContainerFocus: J,
950
+ disabled: R,
951
+ isError: L,
952
+ isFocused: H,
953
+ isLoading: d,
954
+ readOnly: f,
955
+ size: O,
956
+ variant: A,
957
+ prefixExists: !!D,
958
+ id: F,
959
+ children: [
960
+ /* @__PURE__ */ p("input", {
961
+ ref: P,
962
+ name: t,
963
+ value: K,
964
+ type: "hidden"
965
+ }),
966
+ /* @__PURE__ */ p(Z, {
967
+ iconSize: z,
968
+ icon: D,
969
+ className: "prefix"
970
+ }),
971
+ b && /* @__PURE__ */ p(b, {
972
+ size: z,
973
+ strokeWidth: 2.5
974
+ }),
975
+ /* @__PURE__ */ m(rt, {
976
+ size: O,
977
+ children: [K !== "" && /* @__PURE__ */ p("p", {
978
+ className: "hasValue",
979
+ children: ee(K)
980
+ }), K === "" && /* @__PURE__ */ p("p", { children: i })]
981
+ }),
982
+ /* @__PURE__ */ m(ct, {
983
+ isFocused: H,
984
+ isSearchable: h,
985
+ search: B,
986
+ onSearch: ne,
987
+ children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(it, {
988
+ label: e,
989
+ value: t,
990
+ size: O,
991
+ handleChangeValue: re,
992
+ optionHasSelected: q
993
+ }, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
994
+ }),
995
+ /* @__PURE__ */ p(tt, {
996
+ disabled: R,
997
+ isFocused: H,
998
+ readOnly: f,
999
+ iconSize: z,
1000
+ isLoading: d
1001
+ }),
1002
+ /* @__PURE__ */ p(ut, {
1003
+ iconSize: z,
1004
+ isLoading: d
1005
+ }),
1006
+ /* @__PURE__ */ p(lt, {
1007
+ handleBlur: te,
1008
+ isFocused: H
1009
+ })
1010
+ ]
1011
+ })
1012
+ });
1013
+ }
1014
+ //#endregion
1015
+ //#region src/components/calendar/calendarHeader/index.tsx
1016
+ function ft({ basicMode: e }) {
1017
+ let t = Ze();
1018
+ return e ? /* @__PURE__ */ m("div", {
1019
+ className: "arkynCalendarHeader",
1020
+ children: [
1021
+ /* @__PURE__ */ p("button", {
1022
+ className: "arkynCalendarButton",
1023
+ onClick: () => t.previousMonth(),
1024
+ children: /* @__PURE__ */ p(w, {})
1025
+ }),
1026
+ /* @__PURE__ */ p("p", { children: t.currentDate }),
1027
+ /* @__PURE__ */ p("button", {
1028
+ className: "arkynCalendarButton",
1029
+ onClick: () => t.nextMonth(),
1030
+ children: /* @__PURE__ */ p(T, {})
1031
+ })
1032
+ ]
1033
+ }) : /* @__PURE__ */ m("div", {
1034
+ className: "arkynCalendarHeader",
1035
+ children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("button", {
1036
+ className: "arkynCalendarButton",
1037
+ onClick: () => t.previousMonth(),
1038
+ children: /* @__PURE__ */ p(w, {})
1039
+ }), /* @__PURE__ */ p("button", {
1040
+ className: "arkynCalendarButton",
1041
+ onClick: () => t.nextMonth(),
1042
+ children: /* @__PURE__ */ p(T, {})
1043
+ })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(dt, {
1044
+ name: "calendarMonth",
1045
+ variant: "underline",
1046
+ className: "calendarMonthSelect",
1047
+ value: t.currentMonth,
1048
+ options: t.listMonths,
1049
+ onChange: (e) => t.changeMonth(+e)
1050
+ }), /* @__PURE__ */ p(dt, {
1051
+ name: "calendarYear",
1052
+ variant: "underline",
1053
+ className: "calendarYearSelect",
1054
+ value: t.currentYear,
1055
+ options: t.listYears,
1056
+ onChange: (e) => t.changeYear(+e)
1057
+ })] })]
1058
+ });
1059
+ }
1060
+ //#endregion
1061
+ //#region src/components/calendar/calendarTableTd/index.tsx
1062
+ function pt(e) {
1063
+ let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = Ze();
1064
+ function s() {
1065
+ let e = /* @__PURE__ */ new Date();
1066
+ return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
1067
+ }
1068
+ return /* @__PURE__ */ p("td", {
1069
+ onClick: () => o(t, n, r),
1070
+ className: `arkynCalendarTableTd ${i} ${a} ${s() ? "today" : ""}`,
1071
+ children: /* @__PURE__ */ m("div", {
1072
+ className: "textGroup",
1073
+ children: [/* @__PURE__ */ p("span", {}), /* @__PURE__ */ p("p", { children: t })]
1074
+ })
1075
+ });
1076
+ }
1077
+ //#endregion
1078
+ //#region src/components/calendar/calendarTableBody/index.tsx
1079
+ function mt() {
1080
+ return /* @__PURE__ */ p("tbody", {
1081
+ className: "arkynCalendarTableBody",
1082
+ children: Ze().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(pt, { ...e }, t)) }, t))
1083
+ });
1084
+ }
1085
+ //#endregion
1086
+ //#region src/components/calendar/calendarTableContainer/index.tsx
1087
+ function ht({ children: e }) {
1088
+ return /* @__PURE__ */ p("table", {
1089
+ className: "arkynCalendarTableContainer",
1090
+ children: e
1091
+ });
1092
+ }
1093
+ //#endregion
1094
+ //#region src/components/calendar/calendarTableHeader/index.tsx
1095
+ function gt() {
1096
+ let { listWeek: e } = Ze();
1097
+ return /* @__PURE__ */ p("thead", {
1098
+ className: "arkynCalendarTableHeader",
1099
+ children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children: J(e) }, t)) })
1100
+ });
1101
+ }
1102
+ //#endregion
1103
+ //#region src/components/calendar/index.tsx
1104
+ function _t(e) {
1105
+ let t = e.variant || "complete";
1106
+ return e.type === "range" ? /* @__PURE__ */ p(Qe, {
1107
+ value: e.value,
1108
+ viewValue: e.viewValue,
1109
+ defaultViewValue: e.defaultViewValue,
1110
+ defaultValue: e.defaultValue,
1111
+ calendarType: "range",
1112
+ onChange: e.onChange,
1113
+ onChangeView: e.onChangeView,
1114
+ children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(ft, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(ht, { children: [/* @__PURE__ */ p(gt, {}), /* @__PURE__ */ p(mt, {})] })] })
1115
+ }) : /* @__PURE__ */ p(Qe, {
1116
+ value: e.value,
1117
+ viewValue: e.viewValue,
1118
+ defaultViewValue: e.defaultViewValue,
1119
+ defaultValue: e.defaultValue,
1120
+ calendarType: "single",
1121
+ onChange: e.onChange,
1122
+ onChangeView: e.onChangeView,
1123
+ children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(ft, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(ht, { children: [/* @__PURE__ */ p(gt, {}), /* @__PURE__ */ p(mt, {})] })] })
1124
+ });
1125
+ }
1126
+ //#endregion
1127
+ //#region src/components/cardTab/cardTabContext.tsx
1128
+ var vt = n({});
1129
+ function yt() {
1130
+ return a(vt);
1131
+ }
1132
+ function bt(e) {
1133
+ return /* @__PURE__ */ p(vt.Provider, {
1134
+ value: e,
1135
+ children: e.children
1136
+ });
1137
+ }
1138
+ //#endregion
1139
+ //#region src/components/cardTab/cardTabButton/index.tsx
1140
+ function xt(e) {
1141
+ let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = yt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
1142
+ function f(e) {
1143
+ l(a), i && i(e);
1144
+ }
1145
+ return /* @__PURE__ */ p("button", {
1146
+ onClick: f,
1147
+ className: d.trim(),
1148
+ ...o,
1149
+ disabled: u,
1150
+ type: "button",
1151
+ children: t
1152
+ });
1153
+ }
1154
+ //#endregion
1155
+ //#region src/components/cardTab/cardTabContainer/index.tsx
1156
+ function St(e) {
1157
+ let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
1158
+ function d(e) {
1159
+ c(e), n && n(e);
1160
+ }
1161
+ return /* @__PURE__ */ p(bt, {
1162
+ disabled: i,
1163
+ currentTab: s,
1164
+ changeCurrentTab: d,
1165
+ children: /* @__PURE__ */ p("nav", {
1166
+ className: l.trim(),
1167
+ ...o,
1168
+ children: t
1169
+ })
1170
+ });
1171
+ }
1172
+ //#endregion
1173
+ //#region src/components/checkbox/index.tsx
1174
+ function Ct(e) {
1175
+ let { id: t, name: n, className: r = "", size: i = "md", errorMessage: a, defaultChecked: o = !1, label: c, checked: d = null, onCheck: f, orientation: h = "horizontalReverse", showAsterisk: g, unShowFieldTemplate: _, value: v, ...y } = e, { fieldErrors: b } = X(), S = l(null), C = t || s(), w = a || b?.[n], T = !!w, [E, D] = u(o || !1), O = typeof d == "boolean" ? d : E, k = `arkynCheckbox ${i} ${T ? "errorTrue" : "errorFalse"} ${O ? "checkedTrue" : "checkedFalse"}`;
1176
+ function A() {
1177
+ let e = E;
1178
+ D(!e), f && f(e ? "" : v || "checked");
1179
+ }
1180
+ return /* @__PURE__ */ p(et, {
1181
+ name: n,
1182
+ label: c,
1183
+ showAsterisk: g,
1184
+ className: r,
1185
+ errorMessage: w,
1186
+ unShowFieldTemplate: _,
1187
+ orientation: h,
1188
+ children: /* @__PURE__ */ m("button", {
1189
+ id: C,
1190
+ type: "button",
1191
+ className: k,
1192
+ onClick: A,
1193
+ ...y,
1194
+ children: [/* @__PURE__ */ p("input", {
1195
+ type: "hidden",
1196
+ name: n,
1197
+ ref: S,
1198
+ value: O ? v || "checked" : ""
1199
+ }), /* @__PURE__ */ p(x, {})]
1200
+ })
1201
+ });
1202
+ }
1203
+ //#endregion
1204
+ //#region src/hooks/useHydrated.ts
1205
+ function wt() {
1206
+ return () => {};
1207
+ }
1208
+ function Tt() {
1209
+ return d(wt, () => !0, () => !1);
1210
+ }
1211
+ //#endregion
1212
+ //#region src/components/clientOnly.tsx
1213
+ function Et(e) {
1214
+ let { children: t, fallback: n = null } = e;
1215
+ return Tt() ? /* @__PURE__ */ p(f, { children: t() }) : /* @__PURE__ */ p(f, { children: n });
1216
+ }
1217
+ //#endregion
1218
+ //#region src/services/maskCurrencyValues.ts
1219
+ function Dt(e) {
1220
+ let t = e;
1221
+ return typeof e == "string" ? (t = +re(e), t % 1 != 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), re(String(t)) / 10 ** 2;
1222
+ }
1223
+ function Ot(e, t) {
1224
+ if (!e) return [0, te(0, t)];
1225
+ let n = Dt(e);
1226
+ return [n, te(n, t)];
1227
+ }
1228
+ //#endregion
1229
+ //#region src/components/currencyInput/index.tsx
1230
+ function kt(e) {
1231
+ let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: c, className: d = "", value: f, defaultValue: h, max: g = 1e9, locale: _, onChange: v, prefix: y, suffix: b, isLoading: x = !1, leftIcon: S, readOnly: C, onFocus: w, onBlur: T, errorMessage: E, unShowFieldTemplate: D, orientation: O, showAsterisk: k, rightIcon: A, size: j = "md", id: M, ...N } = e, { fieldErrors: P } = X(), [F, I] = u(!1), [R, z] = u("0"), B = l(null), V = M || s(), H = E || P?.[t], U = !!H, W = n || x, G = {
1232
+ md: 20,
1233
+ lg: 20
1234
+ }[j], K = A ? "right" : "left", q = K === "left" && x, ee = K === "right" && x;
1235
+ function J() {
1236
+ W || !B?.current || (I(!0), B.current.focus());
1237
+ }
1238
+ function te(e) {
1239
+ I(!0), w && w(e);
1240
+ }
1241
+ function ne(e) {
1242
+ I(!1), T && T(e);
1243
+ }
1244
+ let re = (e) => {
1245
+ let [t, n] = Ot(e, _);
1246
+ return !g || t <= g ? (z(n), [t, n]) : Ot(e, _);
1247
+ };
1248
+ return o(() => {
1249
+ function e() {
1250
+ if (typeof f == "number") return f;
1251
+ if (typeof h == "number") return h;
1252
+ }
1253
+ let [, t] = Ot(e(), _);
1254
+ z(t);
1255
+ }, [
1256
+ _,
1257
+ h,
1258
+ f
1259
+ ]), /* @__PURE__ */ p(et, {
1260
+ name: t,
1261
+ label: c,
1262
+ showAsterisk: k,
1263
+ className: d,
1264
+ errorMessage: H,
1265
+ unShowFieldTemplate: D,
1266
+ orientation: O,
1267
+ children: /* @__PURE__ */ m("section", {
1268
+ title: r,
1269
+ style: i,
1270
+ className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${W || C || x ? "opacity" : ""} ${U ? "errored" : ""} ${F ? "focused" : ""}`,
1271
+ onClick: J,
1272
+ children: [
1273
+ /* @__PURE__ */ p(Z, {
1274
+ iconSize: G,
1275
+ icon: y,
1276
+ className: "prefix"
1277
+ }),
1278
+ /* @__PURE__ */ p(Z, {
1279
+ show: q,
1280
+ iconSize: G,
1281
+ className: "spinner",
1282
+ icon: L
1283
+ }),
1284
+ /* @__PURE__ */ p(Z, {
1285
+ show: !x,
1286
+ icon: S,
1287
+ iconSize: G
1288
+ }),
1289
+ /* @__PURE__ */ p("input", {
1290
+ disabled: W,
1291
+ readOnly: C,
1292
+ ref: B,
1293
+ onFocus: te,
1294
+ onBlur: ne,
1295
+ onChange: (e) => {
1296
+ e.preventDefault();
1297
+ let [t, n] = re(e.target.value);
1298
+ v && v(e, String(t), String(n));
1299
+ },
1300
+ id: V,
1301
+ placeholder: W ? R : void 0,
1302
+ value: W ? void 0 : R,
1303
+ ...N
1304
+ }),
1305
+ /* @__PURE__ */ p("input", {
1306
+ type: "hidden",
1307
+ name: t,
1308
+ value: Dt(R),
1309
+ readOnly: !0
1310
+ }),
1311
+ /* @__PURE__ */ p(Z, {
1312
+ show: !x,
1313
+ icon: A,
1314
+ iconSize: G
1315
+ }),
1316
+ /* @__PURE__ */ p(Z, {
1317
+ show: ee,
1318
+ iconSize: G,
1319
+ className: "spinner",
1320
+ icon: L
1321
+ }),
1322
+ /* @__PURE__ */ p(Z, {
1323
+ iconSize: G,
1324
+ icon: b,
1325
+ className: "suffix"
1326
+ })
1327
+ ]
1328
+ })
1329
+ });
1330
+ }
1331
+ //#endregion
1332
+ //#region src/components/drawer/drawerContext.tsx
1333
+ var At = n({});
1334
+ function jt(e) {
1335
+ return /* @__PURE__ */ p(At.Provider, {
1336
+ value: { makeInvisible: e.makeInvisible },
1337
+ children: e.children
1338
+ });
1339
+ }
1340
+ function Mt() {
1341
+ return a(At);
1342
+ }
1343
+ //#endregion
1344
+ //#region src/components/drawer/drawerContainer/index.tsx
1345
+ function Nt(e) {
1346
+ let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...o } = e;
1347
+ ot(t);
1348
+ let s = r === "left" ? "-100%" : "100%", c = `arkynDrawerContainer ${r} ${t ? "visibleTrue" : "visibleFalse"} ${a}`;
1349
+ return /* @__PURE__ */ p(jt, {
1350
+ makeInvisible: n,
1351
+ children: /* @__PURE__ */ p(ie, { children: t && /* @__PURE__ */ m("aside", {
1352
+ className: c.trim(),
1353
+ ...o,
1354
+ children: [/* @__PURE__ */ p(Y.div, {
1355
+ className: "arkynDrawerContainerOverlay",
1356
+ transition: {
1357
+ duration: .15,
1358
+ ease: "easeOut"
1359
+ },
1360
+ initial: { opacity: 0 },
1361
+ animate: { opacity: 1 },
1362
+ exit: { opacity: 0 },
1363
+ onClick: n
1364
+ }), /* @__PURE__ */ p(Y.div, {
1365
+ className: "arkynDrawerContainerContent",
1366
+ transition: {
1367
+ ease: "easeOut",
1368
+ duration: .15
1369
+ },
1370
+ initial: { transform: `translateX(${s})` },
1371
+ animate: { transform: "translateX(0px)" },
1372
+ exit: { transform: `translateX(${s})` },
1373
+ children: i
1374
+ })]
1375
+ }) })
1376
+ });
1377
+ }
1378
+ //#endregion
1379
+ //#region src/components/drawer/drawerHeader/index.tsx
1380
+ function Pt(e) {
1381
+ let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Mt();
1382
+ return /* @__PURE__ */ m("header", {
1383
+ className: `arkynDrawerHeader ${n}`.trim(),
1384
+ ...i,
1385
+ children: [r, t && /* @__PURE__ */ p("button", {
1386
+ className: "arkynDrawerHeaderCloseButton",
1387
+ type: "button",
1388
+ onClick: a,
1389
+ "aria-label": "Close drawer",
1390
+ children: /* @__PURE__ */ p(K, { size: 24 })
1391
+ })]
1392
+ });
1393
+ }
1394
+ //#endregion
1395
+ //#region src/components/facebookPixel/pixel.ts
1396
+ var Ft = class {
1397
+ pixelId;
1398
+ autoConfig;
1399
+ initialized;
1400
+ constructor(e, t) {
1401
+ this.pixelId = e, this.autoConfig = t?.autoConfig || !0, this.initialized = !1;
1402
+ }
1403
+ loadFacebookPixel() {
1404
+ if (window.fbq) return;
1405
+ let e = function(...t) {
1406
+ e.callMethod ? e.callMethod.apply(e, t) : e.queue.push(t);
1407
+ };
1408
+ window._fbq || (window._fbq = e), e.push = e, e.loaded = !0, e.version = "2.0", e.queue = [];
1409
+ let t = document.createElement("script");
1410
+ t.async = !0, t.src = "https://connect.facebook.net/en_US/fbevents.js";
1411
+ let n = document.getElementsByTagName("script")[0];
1412
+ if (!n.parentNode) throw Error("No script tag found in the document");
1413
+ n.parentNode.insertBefore(t, n), window.fbq = e;
1414
+ }
1415
+ init(e = {}) {
1416
+ if (this.initialized = typeof window < "u" && !!window.fbq, this.loadFacebookPixel(), !window.fbq) throw Error("window.fbq is not defined");
1417
+ this.autoConfig === !1 ? window.fbq("set", "autoConfig", !1, this.pixelId) : window.fbq("init", this.pixelId, e), this.initialized = !0;
1418
+ }
1419
+ pageView() {
1420
+ this.initialized && window.fbq && window.fbq("track", "PageView");
1421
+ }
1422
+ track(e, t) {
1423
+ this.initialized && window.fbq && window.fbq("track", e, t);
1424
+ }
1425
+ trackSingle(e, t, n) {
1426
+ this.initialized && window.fbq && window.fbq("trackSingle", e, t, n);
1427
+ }
1428
+ trackCustom(e, t) {
1429
+ this.initialized && window.fbq && window.fbq("trackCustom", e, t);
1430
+ }
1431
+ trackSingleCustom(e, t, n) {
1432
+ this.initialized && window.fbq && window.fbq("trackSingle", e, t, n);
1433
+ }
1434
+ grantConsent() {
1435
+ this.initialized && window.fbq && window.fbq("consent", "grant");
1436
+ }
1437
+ revokeConsent() {
1438
+ this.initialized && window.fbq && window.fbq("consent", "revoke");
1439
+ }
1440
+ };
1441
+ //#endregion
1442
+ //#region src/components/facebookPixel/facebookPixel.client.tsx
1443
+ function It(e) {
1444
+ let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new Ft(t, n);
1445
+ return u.init(), r && u.pageView(), c && u.grantConsent(), l && u.revokeConsent(), i && u.track(...i), a && u.trackCustom(...a), o && u.trackSingle(t, ...o), s && u.trackSingleCustom(t, ...s), /* @__PURE__ */ p(f, {});
1446
+ }
1447
+ //#endregion
1448
+ //#region src/components/facebookPixel/index.tsx
1449
+ function Lt(e) {
1450
+ return process.env.NODE_ENV !== "production" && !e.showInDevMode ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(It, { ...e }) });
1451
+ }
1452
+ //#endregion
1453
+ //#region src/components/fileUpload/hasFileContent/index.tsx
1454
+ function Rt(e) {
1455
+ let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
1456
+ function c() {
1457
+ if (t) return;
1458
+ let e = document.createElement("input");
1459
+ e.type = "file", e.accept = i, e.onchange = (e) => {
1460
+ let t = e.target.files?.[0];
1461
+ t && o(t);
1462
+ }, e.click();
1463
+ }
1464
+ function l() {
1465
+ return n.type.startsWith("image/") ? /* @__PURE__ */ p(j, {}) : n.type.startsWith("audio/") ? /* @__PURE__ */ p(A, {}) : n.type.startsWith("application/zip") ? /* @__PURE__ */ p(k, {}) : /* @__PURE__ */ p(O, {});
1466
+ }
1467
+ return /* @__PURE__ */ m("div", {
1468
+ className: "arkynFileUploadHasFileContent",
1469
+ children: [
1470
+ /* @__PURE__ */ m("section", {
1471
+ className: "arkynFileUploadFileContainer",
1472
+ children: [/* @__PURE__ */ p(l, {}), /* @__PURE__ */ p("p", { children: n.name })]
1473
+ }),
1474
+ /* @__PURE__ */ p(He, {}),
1475
+ /* @__PURE__ */ m("div", {
1476
+ className: "arkynFileUploadButtonsContainer",
1477
+ children: [!!s && /* @__PURE__ */ p(We, {
1478
+ orientation: "bottom",
1479
+ text: "Reenviar arquivo",
1480
+ children: /* @__PURE__ */ p(Ue, {
1481
+ type: "button",
1482
+ "aria-label": "resend file",
1483
+ variant: "outline",
1484
+ scheme: "danger",
1485
+ size: "sm",
1486
+ isLoading: r,
1487
+ onClick: s,
1488
+ icon: H,
1489
+ disabled: t
1490
+ })
1491
+ }), /* @__PURE__ */ p(Q, {
1492
+ isLoading: r,
1493
+ onClick: c,
1494
+ variant: "outline",
1495
+ size: "sm",
1496
+ type: "button",
1497
+ disabled: t,
1498
+ children: a
1499
+ })]
1500
+ })
1501
+ ]
1502
+ });
1503
+ }
1504
+ //#endregion
1505
+ //#region src/components/fileUpload/noFileContent/index.tsx
1506
+ function zt(e) {
1507
+ let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
1508
+ function s(e) {
1509
+ if (o) return;
1510
+ e.preventDefault();
1511
+ let t = e.dataTransfer.files[0];
1512
+ t && i(t);
1513
+ }
1514
+ function c() {
1515
+ if (o) return;
1516
+ let e = document.createElement("input");
1517
+ e.type = "file", e.accept = r, e.onchange = (e) => {
1518
+ let t = e.target.files?.[0];
1519
+ t && i(t);
1520
+ }, e.click();
1521
+ }
1522
+ return /* @__PURE__ */ m("div", {
1523
+ onDrop: s,
1524
+ className: "arkynFileUploadNoFileContent",
1525
+ children: [/* @__PURE__ */ p(Q, {
1526
+ isLoading: n,
1527
+ onClick: c,
1528
+ variant: "ghost",
1529
+ size: "sm",
1530
+ type: "button",
1531
+ disabled: o,
1532
+ children: a
1533
+ }), /* @__PURE__ */ p("p", { children: t })]
1534
+ });
1535
+ }
1536
+ //#endregion
1537
+ //#region src/components/fileUpload/index.tsx
1538
+ function Bt(e) {
1539
+ let { name: t, label: n, showAsterisk: r = !1, action: i, fileName: a = "file", method: o = "POST", acceptFile: s = "*", fileResponseName: c = "url", changeFileButtonText: l = "Alterar arquivo", selectFileButtonText: d = "Selecionar arquivo", dropFileText: f = "Ou arraste e solte o arquivo aqui", onChange: h, disabled: g = !1 } = e, { fieldErrors: _ } = X(), v = _?.[t], [y, b] = u(""), [x, S] = u(""), [C, w] = u(null), [T, E] = u(!1);
1540
+ async function D(e) {
1541
+ if (g) return;
1542
+ E(!0), w(e), S("");
1543
+ let t = new FormData();
1544
+ t.append(a, e), await fetch(i, {
1545
+ method: o,
1546
+ body: t
1547
+ }).then(async (e) => await e.json()).then((e) => {
1548
+ e?.error ? S(e.error) : b(e?.[c]), h && h(e?.[c]);
1549
+ }).catch((e) => {
1550
+ console.error(e), S("Erro ao enviar o arquivo");
1551
+ }).finally(() => E(!1));
1552
+ }
1553
+ function O(e) {
1554
+ g || D(e);
1555
+ }
1556
+ let k = v || x;
1557
+ return /* @__PURE__ */ m(Ve, { children: [
1558
+ n && /* @__PURE__ */ p(Be, {
1559
+ showAsterisk: r,
1560
+ children: n
1561
+ }),
1562
+ /* @__PURE__ */ m("div", {
1563
+ className: `arkynFileUpload ${k ? "hasError" : "noHasError"} ${C ? "hasFile" : "noHasFile"}`,
1564
+ children: [
1565
+ /* @__PURE__ */ p("input", {
1566
+ type: "hidden",
1567
+ name: t,
1568
+ value: y || ""
1569
+ }),
1570
+ !C && /* @__PURE__ */ p(zt, {
1571
+ disabled: g,
1572
+ isLoading: T,
1573
+ acceptFile: s,
1574
+ dropFileText: f,
1575
+ handleSelectFile: O,
1576
+ selectFileButtonText: d
1577
+ }),
1578
+ C && /* @__PURE__ */ p(Rt, {
1579
+ disabled: g,
1580
+ isLoading: T,
1581
+ acceptFile: s,
1582
+ file: C,
1583
+ handleSelectFile: O,
1584
+ changeFileButtonText: l,
1585
+ reSendFile: k && C ? () => D(C) : void 0
1586
+ })
1587
+ ]
1588
+ }),
1589
+ k && /* @__PURE__ */ p(ze, { children: k })
1590
+ ] });
1591
+ }
1592
+ //#endregion
1593
+ //#region src/components/fullCalendar/_viewService.ts
1594
+ var Vt = class {
1595
+ capitalize(e) {
1596
+ return J(e);
1597
+ }
1598
+ listHours(e) {
1599
+ let [t, n] = e, r = [];
1600
+ for (let e = t * 60; e <= n * 60; e += 30) r.push(e);
1601
+ return r;
1602
+ }
1603
+ formatHourLabel(e) {
1604
+ let t = Math.floor(e / 60), n = e % 60;
1605
+ return `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
1606
+ }
1607
+ getStartOfWeek(e) {
1608
+ let t = new Date(e);
1609
+ return t.setHours(0, 0, 0, 0), t.setDate(t.getDate() - t.getDay()), t;
1610
+ }
1611
+ listWeek(e, t) {
1612
+ let n = [], r = this.getStartOfWeek(e);
1613
+ for (let e = 0; e < 7; e++) {
1614
+ let i = new Date(r);
1615
+ i.setDate(r.getDate() + e);
1616
+ let a = i.toLocaleDateString(t, { weekday: "short" });
1617
+ n.push(a);
1618
+ }
1619
+ return n;
1620
+ }
1621
+ listWeeklyMatrix(e, t) {
1622
+ let n = this.getStartOfWeek(e), r = e.getMonth();
1623
+ return t.map((t) => Array.from({ length: 7 }, (i, a) => {
1624
+ let o = new Date(n);
1625
+ o.setDate(n.getDate() + a);
1626
+ let s = "current";
1627
+ return (o.getMonth() < r || o.getFullYear() < e.getFullYear()) && (s = "previous"), (o.getMonth() > r || o.getFullYear() > e.getFullYear()) && (s = "next"), {
1628
+ day: o.getDate(),
1629
+ month: o.getMonth(),
1630
+ year: o.getFullYear(),
1631
+ dayOwner: s,
1632
+ timeInMinutes: t
1633
+ };
1634
+ }));
1635
+ }
1636
+ listMonthlyMatrix(e) {
1637
+ let t = e.getFullYear(), n = e.getMonth(), r = new Date(t, n, 1).getDay(), i = new Date(t, n + 1, 0).getDate(), a = new Date(t, n, 0).getDate(), o = Math.ceil((r + i) / 7) * 7, s = [], c = 1, l = 1;
1638
+ for (let e = 0; e < o; e++) {
1639
+ let o = Math.floor(e / 7);
1640
+ if (s[o] || (s[o] = []), e < r) {
1641
+ let i = a - (r - e - 1), c = n === 0 ? 11 : n - 1, l = n === 0 ? t - 1 : t;
1642
+ s[o].push({
1643
+ day: i,
1644
+ month: c,
1645
+ year: l,
1646
+ dayOwner: "previous"
1647
+ });
1648
+ } else if (c <= i) s[o].push({
1649
+ day: c,
1650
+ month: n,
1651
+ year: t,
1652
+ dayOwner: "current"
1653
+ }), c++;
1654
+ else {
1655
+ let e = n === 11 ? 0 : n + 1, r = n === 11 ? t + 1 : t;
1656
+ s[o].push({
1657
+ day: l,
1658
+ month: e,
1659
+ year: r,
1660
+ dayOwner: "next"
1661
+ }), l++;
1662
+ }
1663
+ }
1664
+ return s;
1665
+ }
1666
+ nextMonth(e, t) {
1667
+ let n = new Date(e);
1668
+ n.setMonth(n.getMonth() + 1), t(n);
1669
+ }
1670
+ nextWeek(e, t) {
1671
+ let n = new Date(e);
1672
+ n.setDate(n.getDate() + 7), t(n);
1673
+ }
1674
+ nextDay(e, t) {
1675
+ let n = new Date(e);
1676
+ n.setDate(n.getDate() + 1), t(n);
1677
+ }
1678
+ previousMonth(e, t) {
1679
+ let n = new Date(e);
1680
+ n.setMonth(n.getMonth() - 1), t(n);
1681
+ }
1682
+ previousWeek(e, t) {
1683
+ let n = new Date(e);
1684
+ n.setDate(n.getDate() - 7), t(n);
1685
+ }
1686
+ previousDay(e, t) {
1687
+ let n = new Date(e);
1688
+ n.setDate(n.getDate() - 1), t(n);
1689
+ }
1690
+ }, Ht = n({});
1691
+ function $() {
1692
+ return a(Ht);
1693
+ }
1694
+ function Ut(e) {
1695
+ let { blockedTimestamps: t, children: n, events: r, defaultViewValue: i = /* @__PURE__ */ new Date(), language: a = "pt-BR", onChangeView: o, onClickDate: s, viewValue: c } = e, l = new Vt(), d = l.listHours([8, 18]), [f, m] = u(i), h = c || f;
1696
+ function g(e) {
1697
+ o && o(e), m(e);
1698
+ }
1699
+ return /* @__PURE__ */ p(Ht.Provider, {
1700
+ value: {
1701
+ events: r,
1702
+ blockedTimestamps: t,
1703
+ viewDate: h,
1704
+ listHours: d,
1705
+ listWeek: l.listWeek(h, a),
1706
+ listMonthlyMatrix: l.listMonthlyMatrix(h),
1707
+ listWeeklyMatrix: l.listWeeklyMatrix(h, d),
1708
+ nextMonth: () => l.nextMonth(h, g),
1709
+ nextWeek: () => l.nextWeek(h, g),
1710
+ nextDay: () => l.nextDay(h, g),
1711
+ previousMonth: () => l.previousMonth(h, g),
1712
+ previousWeek: () => l.previousWeek(h, g),
1713
+ previousDay: () => l.previousDay(h, g),
1714
+ onClickDate: s
1715
+ },
1716
+ children: n
1717
+ });
1718
+ }
1719
+ //#endregion
1720
+ //#region src/components/fullCalendar/dayCalendar/dayCalendarContainer/index.tsx
1721
+ function Wt({ children: e }) {
1722
+ return /* @__PURE__ */ p("div", {
1723
+ className: "arkynDayCalendarContainer",
1724
+ children: e
1725
+ });
1726
+ }
1727
+ //#endregion
1728
+ //#region src/components/fullCalendar/dayCalendar/dayCalendarEvent/index.tsx
1729
+ var Gt = 30, Kt = 205;
1730
+ function qt(e) {
1731
+ let { events: t, viewDate: n } = $(), r = n.getDate(), i = n.getMonth(), a = n.getFullYear(), o = t.map((e, t) => ({
1732
+ event: e,
1733
+ sourceIndex: t
1734
+ })).filter(({ event: e }) => e.initialDate.getDate() === r && e.initialDate.getMonth() === i && e.initialDate.getFullYear() === a).sort((e, t) => {
1735
+ let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
1736
+ if (n !== r) return n - r;
1737
+ let i = e.event.endDate?.getTime() ?? n + Gt * 6e4, a = t.event.endDate?.getTime() ?? r + Gt * 6e4;
1738
+ return i === a ? e.sourceIndex - t.sourceIndex : i - a;
1739
+ }), s = new Map(o.map((e, t) => [e.sourceIndex, t])), c = o.filter(({ event: t }) => {
1740
+ let n = Math.floor(e.timeInMinutes / 60), o = e.timeInMinutes % 60;
1741
+ function s() {
1742
+ let e = t.initialDate.getHours(), r = t.initialDate.getMinutes();
1743
+ if (e !== n) return !1;
1744
+ if (o === 0) return r < 30 && r >= 0;
1745
+ if (o === 30) return r >= 30 && r < 60;
1746
+ }
1747
+ return s() && t.initialDate.getDate() === r && t.initialDate.getMonth() === i && t.initialDate.getFullYear() === a;
1748
+ });
1749
+ if (c.length === 0) return /* @__PURE__ */ p(f, {});
1750
+ function l(e, t) {
1751
+ return `${r}-${i}-${a}-${t}-${e}`;
1752
+ }
1753
+ function u(e) {
1754
+ let t = e.getHours(), n = e.getMinutes();
1755
+ return n === 0 ? `${t}h` : `${t}h${n}`;
1756
+ }
1757
+ function d(e) {
1758
+ let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + Gt;
1759
+ return {
1760
+ startMinutes: t,
1761
+ endMinutes: Math.max(n, t + 1)
1762
+ };
1763
+ }
1764
+ function h(e, t) {
1765
+ let n = d(e), r = s.get(t);
1766
+ return r == null ? 0 : o.reduce((e, t, i) => {
1767
+ if (i >= r) return e;
1768
+ let a = d(t.event);
1769
+ return a.startMinutes < n.endMinutes && a.endMinutes > n.startMinutes ? e + 1 : e;
1770
+ }, 0);
1771
+ }
1772
+ function g(t, n) {
1773
+ let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a / Gt * 100, c = o / Gt * 100, l = h(t, n) * Kt;
1774
+ return {
1775
+ top: `${s}%`,
1776
+ height: `${c}%`,
1777
+ left: `${l}px`
1778
+ };
1779
+ }
1780
+ function _(e, t) {
1781
+ e.stopPropagation(), t.onClick?.(t.data);
1782
+ }
1783
+ return c.map(({ event: e, sourceIndex: t }, n) => /* @__PURE__ */ m("div", {
1784
+ className: `arkynDayCalendarEvent ${e?.scheme || "primary"}`,
1785
+ style: g(e, t),
1786
+ onClick: (t) => _(t, e),
1787
+ children: [/* @__PURE__ */ m("strong", { children: [
1788
+ u(e.initialDate),
1789
+ " ",
1790
+ e?.endDate && `- ${u(e.endDate)}`
1791
+ ] }), /* @__PURE__ */ p("p", { children: e.title })]
1792
+ }, l(n, t)));
1793
+ }
1794
+ //#endregion
1795
+ //#region src/components/fullCalendar/dayCalendar/dayCalendarRow/index.tsx
1796
+ function Jt({ hour: e, timeInMinutes: t }) {
1797
+ let n = new Vt(), { blockedTimestamps: r, viewDate: i, onClickDate: a } = $();
1798
+ function o() {
1799
+ return r.some((e) => i >= e.initialDate && i <= e.endDate);
1800
+ }
1801
+ function s(e) {
1802
+ if (e.stopPropagation(), !o() && a) {
1803
+ let e = new Date(i);
1804
+ e.setHours(0, t, 0, 0), a(e);
1805
+ }
1806
+ }
1807
+ return /* @__PURE__ */ m("div", {
1808
+ className: `arkynDayCalendarRow ${o() ? "blocked" : ""}`,
1809
+ "data-time": t,
1810
+ onClick: s,
1811
+ children: [/* @__PURE__ */ p("p", { children: n.formatHourLabel(e) }), /* @__PURE__ */ p("div", {
1812
+ className: "arkynDayCalendarRowContent",
1813
+ children: /* @__PURE__ */ p(qt, { timeInMinutes: t })
1814
+ })]
1815
+ });
1816
+ }
1817
+ //#endregion
1818
+ //#region src/components/fullCalendar/dayCalendar/index.tsx
1819
+ function Yt() {
1820
+ let { listHours: e } = $();
1821
+ return /* @__PURE__ */ p(Wt, { children: e.map((e) => /* @__PURE__ */ p(Jt, {
1822
+ hour: e,
1823
+ timeInMinutes: e
1824
+ })) });
1825
+ }
1826
+ //#endregion
1827
+ //#region src/components/fullCalendar/fullCalendarContainer/index.tsx
1828
+ function Xt({ children: e }) {
1829
+ return /* @__PURE__ */ p("div", {
1830
+ className: "arkynFullCalendarContainer",
1831
+ children: e
1832
+ });
1833
+ }
1834
+ //#endregion
1835
+ //#region src/components/fullCalendar/fullCalendarHeader/index.tsx
1836
+ function Zt(e) {
1837
+ let { setViewType: t, viewType: n } = e, r = $();
1838
+ function i() {
1839
+ switch (n) {
1840
+ case "day": return r.previousDay();
1841
+ case "week": return r.previousWeek();
1842
+ case "month": return r.previousMonth();
1843
+ }
1844
+ }
1845
+ function a() {
1846
+ switch (n) {
1847
+ case "day": return r.nextDay();
1848
+ case "week": return r.nextWeek();
1849
+ case "month": return r.nextMonth();
1850
+ }
1851
+ }
1852
+ return /* @__PURE__ */ m("div", {
1853
+ className: "arkynFullCalendarHeader",
1854
+ children: [/* @__PURE__ */ m(St, {
1855
+ defaultValue: n,
1856
+ onChange: (e) => t(e),
1857
+ children: [
1858
+ /* @__PURE__ */ p(xt, {
1859
+ value: "day",
1860
+ children: "Dia"
1861
+ }),
1862
+ /* @__PURE__ */ p(xt, {
1863
+ value: "week",
1864
+ children: "Semana"
1865
+ }),
1866
+ /* @__PURE__ */ p(xt, {
1867
+ value: "month",
1868
+ children: "Mês"
1869
+ })
1870
+ ]
1871
+ }), /* @__PURE__ */ m("div", {
1872
+ className: "arkynFullCalendarHeaderActions",
1873
+ children: [
1874
+ /* @__PURE__ */ p(Ue, {
1875
+ variant: "outline",
1876
+ icon: w,
1877
+ "aria-label": "Handle previous",
1878
+ onClick: () => i()
1879
+ }),
1880
+ /* @__PURE__ */ p("p", { children: r.viewDate.toLocaleDateString("pt-BR", {
1881
+ day: "2-digit",
1882
+ month: "long",
1883
+ year: "numeric"
1884
+ }) }),
1885
+ /* @__PURE__ */ p(Ue, {
1886
+ variant: "outline",
1887
+ icon: T,
1888
+ "aria-label": "Handle next",
1889
+ onClick: () => a()
1890
+ })
1891
+ ]
1892
+ })]
1893
+ });
1894
+ }
1895
+ //#endregion
1896
+ //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.tsx
1897
+ function Qt(e) {
1898
+ let { events: t } = $(), n = t.filter((t) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year);
1899
+ if (n.length === 0) return /* @__PURE__ */ p(f, {});
1900
+ function r(t) {
1901
+ return `${e.day}-${e.month}-${e.year}-${t}`;
1902
+ }
1903
+ function i(e) {
1904
+ let t = e.getHours(), n = e.getMinutes();
1905
+ return n === 0 ? `${t}h` : `${t}h${n}`;
1906
+ }
1907
+ function a(e, t) {
1908
+ e.stopPropagation(), t.onClick?.(t.data);
1909
+ }
1910
+ return n.map((e, t) => /* @__PURE__ */ m("div", {
1911
+ className: `arkynMonthlyCalendarEvent ${e?.scheme || "primary"}`,
1912
+ onClick: (t) => a(t, e),
1913
+ children: [/* @__PURE__ */ m("strong", { children: [
1914
+ i(e.initialDate),
1915
+ " ",
1916
+ e?.endDate && `- ${i(e.endDate)}`
1917
+ ] }), /* @__PURE__ */ p("p", { children: e.title })]
1918
+ }, r(t)));
1919
+ }
1920
+ //#endregion
1921
+ //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.tsx
1922
+ function $t(e) {
1923
+ let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } = $();
1924
+ function s() {
1925
+ let e = /* @__PURE__ */ new Date();
1926
+ return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
1927
+ }
1928
+ function c() {
1929
+ let e = new Date(r, n, t);
1930
+ return a.some((t) => e >= t.initialDate && e <= t.endDate);
1931
+ }
1932
+ function l(e) {
1933
+ e.stopPropagation(), !c() && o && o(new Date(r, n, t));
1934
+ }
1935
+ return /* @__PURE__ */ m("td", {
1936
+ className: `arkynMonthlyCalendarTableTd ${i} ${c() ? "blocked" : ""}`,
1937
+ onClick: l,
1938
+ children: [/* @__PURE__ */ p("p", {
1939
+ className: s() ? "today" : "",
1940
+ children: t
1941
+ }), /* @__PURE__ */ p("div", {
1942
+ className: "arkynMonthlyCalendarEventContainer",
1943
+ children: /* @__PURE__ */ p(Qt, {
1944
+ day: t,
1945
+ month: n,
1946
+ year: r
1947
+ })
1948
+ })]
1949
+ });
1950
+ }
1951
+ //#endregion
1952
+ //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.tsx
1953
+ function en() {
1954
+ return /* @__PURE__ */ p("tbody", {
1955
+ className: "arkynMonthlyCalendarTableBody",
1956
+ children: $().listMonthlyMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p($t, { ...e }, t)) }, t))
1957
+ });
1958
+ }
1959
+ //#endregion
1960
+ //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.tsx
1961
+ function tn({ children: e }) {
1962
+ return /* @__PURE__ */ p("div", {
1963
+ className: "arkynMonthlyCalendarTableContainer",
1964
+ children: /* @__PURE__ */ p("table", { children: e })
1965
+ });
1966
+ }
1967
+ //#endregion
1968
+ //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.tsx
1969
+ function nn() {
1970
+ let { listWeek: e } = $();
1971
+ return /* @__PURE__ */ p("thead", {
1972
+ className: "arkynMonthlyCalendarTableHeader",
1973
+ children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children: J(e) }, t)) })
1974
+ });
1975
+ }
1976
+ //#endregion
1977
+ //#region src/components/fullCalendar/monthlyCalendar/index.tsx
1978
+ function rn() {
1979
+ return /* @__PURE__ */ m(tn, { children: [/* @__PURE__ */ p(nn, {}), /* @__PURE__ */ p(en, {})] });
1980
+ }
1981
+ //#endregion
1982
+ //#region src/components/fullCalendar/weekCalendar/weekCalendarEvent/index.tsx
1983
+ var an = 30, on = 40;
1984
+ function sn(e) {
1985
+ let { events: t } = $(), n = t.map((e, t) => ({
1986
+ event: e,
1987
+ sourceIndex: t
1988
+ })).filter(({ event: t }) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year).sort((e, t) => {
1989
+ let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
1990
+ if (n !== r) return n - r;
1991
+ let i = e.event.endDate?.getTime() ?? n + an * 6e4, a = t.event.endDate?.getTime() ?? r + an * 6e4;
1992
+ return i === a ? e.sourceIndex - t.sourceIndex : i - a;
1993
+ }), r = new Map(n.map((e, t) => [e.sourceIndex, t])), i = n.filter(({ event: t }) => {
1994
+ let n = Math.floor(e.timeInMinutes / 60), r = e.timeInMinutes % 60;
1995
+ function i() {
1996
+ let e = t.initialDate.getHours(), i = t.initialDate.getMinutes();
1997
+ if (e !== n) return !1;
1998
+ if (r === 0) return i < 30 && i >= 0;
1999
+ if (r === 30) return i >= 30 && i < 60;
2000
+ }
2001
+ return i() && t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year;
2002
+ });
2003
+ if (i.length === 0) return /* @__PURE__ */ p(f, {});
2004
+ function a(t, n) {
2005
+ return `${e.day}-${e.month}-${e.year}-${n}-${t}`;
2006
+ }
2007
+ function o(e) {
2008
+ let t = e.getHours(), n = e.getMinutes();
2009
+ return n === 0 ? `${t}h` : `${t}h${n}`;
2010
+ }
2011
+ function s(e) {
2012
+ let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + an;
2013
+ return {
2014
+ startMinutes: t,
2015
+ endMinutes: Math.max(n, t + 1)
2016
+ };
2017
+ }
2018
+ function c(e, t) {
2019
+ let i = s(e), a = r.get(t);
2020
+ return a == null ? 0 : n.reduce((e, t, n) => {
2021
+ if (n >= a) return e;
2022
+ let r = s(t.event);
2023
+ return r.startMinutes < i.endMinutes && r.endMinutes > i.startMinutes ? e + 1 : e;
2024
+ }, 0);
2025
+ }
2026
+ function l(t, n) {
2027
+ let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a / an * 100, u = o / an * 100, d = c(t, n) * on;
2028
+ return {
2029
+ top: `${l}%`,
2030
+ height: `${u}%`,
2031
+ left: `${d}px`
2032
+ };
2033
+ }
2034
+ function u(e, t) {
2035
+ e.stopPropagation(), t.onClick?.(t.data);
2036
+ }
2037
+ return i.map(({ event: e, sourceIndex: t }, n) => /* @__PURE__ */ m("div", {
2038
+ className: `arkynWeekCalendarEvent ${e?.scheme || "primary"}`,
2039
+ style: l(e, t),
2040
+ onClick: (t) => u(t, e),
2041
+ children: [/* @__PURE__ */ m("strong", { children: [
2042
+ o(e.initialDate),
2043
+ " ",
2044
+ e?.endDate && `- ${o(e.endDate)}`
2045
+ ] }), /* @__PURE__ */ p("p", { children: e.title })]
2046
+ }, a(n, t)));
2047
+ }
2048
+ //#endregion
2049
+ //#region src/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.tsx
2050
+ function cn(e) {
2051
+ let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } = $();
2052
+ function c() {
2053
+ let e = new Date(r, n, t);
2054
+ return o.some((t) => e >= t.initialDate && e <= t.endDate);
2055
+ }
2056
+ function l(e) {
2057
+ if (e.stopPropagation(), !c() && s) {
2058
+ let e = new Date(r, n, t);
2059
+ e.setHours(0, a, 0, 0), s(e);
2060
+ }
2061
+ }
2062
+ return /* @__PURE__ */ p("td", {
2063
+ className: `arkynWeekCalendarTableTd ${i} ${c() ? "blocked" : ""}`,
2064
+ "data-day": t,
2065
+ "data-time": a,
2066
+ onClick: l,
2067
+ children: /* @__PURE__ */ p("div", {
2068
+ className: "arkynWeekCalendarTableTdContent",
2069
+ children: /* @__PURE__ */ p(sn, {
2070
+ day: t,
2071
+ month: n,
2072
+ year: r,
2073
+ timeInMinutes: a
2074
+ })
2075
+ })
2076
+ });
2077
+ }
2078
+ //#endregion
2079
+ //#region src/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.tsx
2080
+ function ln() {
2081
+ let e = $(), t = new Vt();
2082
+ return /* @__PURE__ */ p("tbody", {
2083
+ className: "arkynWeekCalendarTableBody",
2084
+ children: e.listWeeklyMatrix.map((e) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
2085
+ className: "hourTd",
2086
+ children: /* @__PURE__ */ p("p", { children: t.formatHourLabel(e[0].timeInMinutes) })
2087
+ }), e.map((e, t) => /* @__PURE__ */ p(cn, { ...e }, `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}-${t}`))] }, e[0].timeInMinutes))
2088
+ });
2089
+ }
2090
+ //#endregion
2091
+ //#region src/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.tsx
2092
+ function un({ children: e }) {
2093
+ return /* @__PURE__ */ p("div", {
2094
+ className: "arkynWeekCalendarTableContainer",
2095
+ children: /* @__PURE__ */ p("table", { children: e })
2096
+ });
2097
+ }
2098
+ //#endregion
2099
+ //#region src/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.tsx
2100
+ function dn() {
2101
+ let { listWeek: e, listWeeklyMatrix: t } = $(), n = t[0] || [];
2102
+ return /* @__PURE__ */ p("thead", {
2103
+ className: "arkynWeekCalendarTableHeader",
2104
+ children: /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("th", {}), e.map((e, t) => /* @__PURE__ */ p("th", { children: /* @__PURE__ */ m("div", {
2105
+ className: "arkynWeekCalendarTableHeaderContent",
2106
+ children: [/* @__PURE__ */ p("span", { children: J(e) }), /* @__PURE__ */ p("strong", { children: n[t]?.day })]
2107
+ }) }, t))] })
2108
+ });
2109
+ }
2110
+ //#endregion
2111
+ //#region src/components/fullCalendar/weekCalendar/index.tsx
2112
+ function fn() {
2113
+ return /* @__PURE__ */ m(un, { children: [/* @__PURE__ */ p(dn, {}), /* @__PURE__ */ p(ln, {})] });
2114
+ }
2115
+ //#endregion
2116
+ //#region src/components/fullCalendar/index.tsx
2117
+ function pn(e) {
2118
+ let [t, n] = u("month");
2119
+ return /* @__PURE__ */ p(Ut, {
2120
+ events: e.events || [],
2121
+ viewValue: e.viewValue,
2122
+ defaultViewValue: e.defaultViewValue,
2123
+ onChangeView: e.onChangeView,
2124
+ blockedTimestamps: e.blockedTimestamps || [],
2125
+ onClickDate: e.onClickDate,
2126
+ children: /* @__PURE__ */ m(Xt, { children: [
2127
+ /* @__PURE__ */ p(Zt, {
2128
+ viewType: t,
2129
+ setViewType: n
2130
+ }),
2131
+ t === "day" && /* @__PURE__ */ p(Yt, {}),
2132
+ t === "month" && /* @__PURE__ */ p(rn, {}),
2133
+ t === "week" && /* @__PURE__ */ p(fn, {})
2134
+ ] })
2135
+ });
2136
+ }
2137
+ //#endregion
2138
+ //#region src/components/googleAnalytics/snippets/generateGAElements.ts
2139
+ function mn(e) {
2140
+ let { measurementId: t } = e;
2141
+ return t || console.warn("Google Analytics Measurement ID is required"), {
2142
+ src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
2143
+ script: `
2144
+ window.dataLayer = window.dataLayer || [];
2145
+ function gtag(){dataLayer.push(arguments);}
2146
+ gtag('js', new Date());
2147
+ gtag('config', '${t}');`
2148
+ };
2149
+ }
2150
+ //#endregion
2151
+ //#region src/components/googleAnalytics/googleAnalytics.tsx
2152
+ var hn = class {
2153
+ initializeAsyncScript(e) {
2154
+ let t = document.createElement("script");
2155
+ return t.async = !0, t.src = e, t;
2156
+ }
2157
+ initializeInlineScript(e) {
2158
+ let t = document.createElement("script");
2159
+ return t.innerHTML = e, t;
2160
+ }
2161
+ initialize(e) {
2162
+ let { measurementId: t } = e, n = mn({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
2163
+ document.head.appendChild(r), document.head.appendChild(i);
2164
+ }
2165
+ };
2166
+ //#endregion
2167
+ //#region src/components/googleAnalytics/googleAnalytics.client.tsx
2168
+ function gn(e) {
2169
+ return new hn().initialize(e), /* @__PURE__ */ p(f, {});
2170
+ }
2171
+ //#endregion
2172
+ //#region src/components/googleAnalytics/index.tsx
2173
+ function _n(e) {
2174
+ let { measurementId: t, showInDevMode: n = !1 } = e;
2175
+ return process.env.NODE_ENV !== "production" && !n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(gn, { measurementId: t }) });
2176
+ }
2177
+ //#endregion
2178
+ //#region src/components/googleTagManager/snippets/appendToDataLayer.ts
2179
+ function vn(e) {
2180
+ let { dataLayer: t, dataLayerName: n } = e;
2181
+ return `
2182
+ window.${n} = window.${n} || [];
2183
+ window.${n}.push(${JSON.stringify(t)})`;
2184
+ }
2185
+ //#endregion
2186
+ //#region src/components/googleTagManager/snippets/generateGTMElements.ts
2187
+ function yn(e) {
2188
+ let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `&gtm_auth=${o}`, c = `&gtm_preview=${a}`;
2189
+ return t || console.warn("GTM Id is required"), {
2190
+ iframe: `
2191
+ <iframe src="https://www.googletagmanager.com/ns.html?id=${t}${s}${c}&gtm_cookies_win=x"
2192
+ height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,
2193
+ script: `
2194
+ (function(w,d,s,l,i){w[l]=w[l]||[];
2195
+ w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', ${JSON.stringify(n).slice(1, -1)}});
2196
+ var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
2197
+ j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}&gtm_cookies_win=x';
2198
+ f.parentNode.insertBefore(j,f);
2199
+ })(window,document,'script','${i}','${t}');`,
2200
+ dataLayerVar: vn({
2201
+ dataLayer: r,
2202
+ dataLayerName: i
2203
+ })
2204
+ };
2205
+ }
2206
+ //#endregion
2207
+ //#region src/components/googleTagManager/googleTagManager.tsx
2208
+ var bn = class {
2209
+ initializeDataScript(e) {
2210
+ let t = document.createElement("script");
2211
+ return t.innerHTML = e, t;
2212
+ }
2213
+ initializeGTMElements(e) {
2214
+ let t = yn(e);
2215
+ return {
2216
+ noScript: () => {
2217
+ let e = document.createElement("noscript");
2218
+ return e.innerHTML = t.iframe, e;
2219
+ },
2220
+ script: () => {
2221
+ let e = document.createElement("script");
2222
+ return e.innerHTML = t.script, e;
2223
+ },
2224
+ dataScript: this.initializeDataScript(t.dataLayerVar)
2225
+ };
2226
+ }
2227
+ initializeDataLayer(e) {
2228
+ let { dataLayer: t, dataLayerName: n } = e;
2229
+ if (window[n]) return window[n].push(t);
2230
+ let r = vn({
2231
+ dataLayer: t,
2232
+ dataLayerName: n
2233
+ }), i = this.initializeDataScript(r);
2234
+ document.head.insertBefore(i, document.head.childNodes[0]);
2235
+ }
2236
+ initialize(e) {
2237
+ let { events: t, gtmId: n, dataLayer: r, auth: i = "", preview: a = "", dataLayerName: o = "dataLayer" } = e, s = this.initializeGTMElements({
2238
+ id: n,
2239
+ events: t,
2240
+ dataLayer: r || void 0,
2241
+ dataLayerName: o,
2242
+ auth: i,
2243
+ preview: a
2244
+ });
2245
+ r && document.head.appendChild(s.dataScript), document.head.insertBefore(s.script(), document.head.childNodes[0]), document.body.insertBefore(s.noScript(), document.body.childNodes[0]);
2246
+ }
2247
+ };
2248
+ //#endregion
2249
+ //#region src/components/googleTagManager/googleTagManager.client.tsx
2250
+ function xn(e) {
2251
+ return new bn().initialize(e), /* @__PURE__ */ p(f, {});
2252
+ }
2253
+ //#endregion
2254
+ //#region src/components/googleTagManager/index.tsx
2255
+ function Sn(e) {
2256
+ let { gtmId: t, auth: n = "", preview: r = "", dataLayerName: i = "dataLayer", events: a = {}, dataLayer: o = {}, showInDevMode: s = !1 } = e;
2257
+ return process.env.NODE_ENV !== "production" && !s ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(xn, {
2258
+ auth: n,
2259
+ dataLayer: o,
2260
+ dataLayerName: i,
2261
+ events: a,
2262
+ gtmId: t,
2263
+ preview: r
2264
+ }) });
2265
+ }
2266
+ //#endregion
2267
+ //#region src/components/imageUpload/hasFileContent/index.tsx
2268
+ function Cn(e) {
2269
+ let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
2270
+ function c() {
2271
+ if (t) return;
2272
+ let e = document.createElement("input");
2273
+ e.type = "file", e.accept = i, e.onchange = (e) => {
2274
+ let t = e.target.files?.[0];
2275
+ t && o(t);
2276
+ }, e.click();
2277
+ }
2278
+ return /* @__PURE__ */ m("div", {
2279
+ className: "arkynImageUploadHasFileContent",
2280
+ style: { backgroundImage: `url("${n}")` },
2281
+ children: [s && /* @__PURE__ */ p(We, {
2282
+ orientation: "bottom",
2283
+ text: "Reenviar imagem",
2284
+ children: /* @__PURE__ */ p(Ue, {
2285
+ type: "button",
2286
+ "aria-label": "resend image",
2287
+ variant: "outline",
2288
+ scheme: "danger",
2289
+ size: "sm",
2290
+ isLoading: r,
2291
+ onClick: s,
2292
+ icon: H,
2293
+ disabled: t
2294
+ })
2295
+ }), /* @__PURE__ */ p(Q, {
2296
+ isLoading: r,
2297
+ onClick: c,
2298
+ variant: "outline",
2299
+ size: "sm",
2300
+ type: "button",
2301
+ disabled: t,
2302
+ children: a
2303
+ })]
2304
+ });
2305
+ }
2306
+ //#endregion
2307
+ //#region src/components/imageUpload/noFileContent/index.tsx
2308
+ function wn(e) {
2309
+ let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
2310
+ function s(e) {
2311
+ if (o) return;
2312
+ e.preventDefault();
2313
+ let t = e.dataTransfer.files[0];
2314
+ t && i(t);
2315
+ }
2316
+ function c() {
2317
+ if (o) return;
2318
+ let e = document.createElement("input");
2319
+ e.type = "file", e.accept = r, e.onchange = (e) => {
2320
+ let t = e.target.files?.[0];
2321
+ t && i(t);
2322
+ }, e.click();
2323
+ }
2324
+ return /* @__PURE__ */ m("div", {
2325
+ onDrop: s,
2326
+ className: "arkynImageUploadNoFileContent",
2327
+ children: [/* @__PURE__ */ p(Q, {
2328
+ isLoading: n,
2329
+ onClick: c,
2330
+ variant: "ghost",
2331
+ size: "sm",
2332
+ type: "button",
2333
+ disabled: o,
2334
+ children: a
2335
+ }), /* @__PURE__ */ p("p", { children: t })]
2336
+ });
2337
+ }
2338
+ //#endregion
2339
+ //#region src/components/imageUpload/index.tsx
2340
+ function Tn(e) {
2341
+ let { name: t, defaultValue: n = "", label: r, showAsterisk: i = !1, action: a, fileName: o = "file", className: s = "", method: c = "POST", acceptImage: l = "image/*", fileResponseName: d = "url", changeImageButtonText: f = "Alterar imagem", selectImageButtonText: h = "Selecionar imagem", dropImageText: g = "Ou arraste e solte a imagem aqui", onChange: _, disabled: v = !1, unShowFieldTemplate: y = !1, orientation: b = "vertical" } = e, { fieldErrors: x } = X(), S = x?.[t], [C, w] = u(n), [T, E] = u(""), [D, O] = u(null), [k, A] = u(n), [j, M] = u(!1);
2342
+ async function N(e) {
2343
+ if (v) return;
2344
+ M(!0), O(e), E("");
2345
+ let t = new FormData();
2346
+ t.append(o, e), await fetch(a, {
2347
+ method: c,
2348
+ body: t
2349
+ }).then(async (e) => await e.json()).then((e) => {
2350
+ e?.error ? E(e.error) : w(e?.[d]), _ && _(e?.[d]);
2351
+ }).catch((e) => {
2352
+ console.error(e), E("Erro ao enviar imagem");
2353
+ }).finally(() => M(!1));
2354
+ }
2355
+ function P(e) {
2356
+ v || (A(URL.createObjectURL(e)), N(e));
2357
+ }
2358
+ let F = S || T;
2359
+ return /* @__PURE__ */ p(et, {
2360
+ name: t,
2361
+ label: r,
2362
+ showAsterisk: i,
2363
+ className: s,
2364
+ errorMessage: F,
2365
+ unShowFieldTemplate: y,
2366
+ orientation: b,
2367
+ children: /* @__PURE__ */ m("div", {
2368
+ className: `arkynImageUpload ${F ? "hasError" : "noHasError"} ${k ? "hasImage" : "noHasImage"}`,
2369
+ children: [
2370
+ /* @__PURE__ */ p("input", {
2371
+ type: "hidden",
2372
+ name: t,
2373
+ value: C || ""
2374
+ }),
2375
+ !k && /* @__PURE__ */ p(wn, {
2376
+ disabled: v,
2377
+ isLoading: j,
2378
+ acceptImage: l,
2379
+ dropImageText: g,
2380
+ handleSelectFile: P,
2381
+ selectImageButtonText: h
2382
+ }),
2383
+ k && /* @__PURE__ */ p(Cn, {
2384
+ disabled: v,
2385
+ isLoading: j,
2386
+ acceptImage: l,
2387
+ filePath: k,
2388
+ handleSelectFile: P,
2389
+ changeImageButtonText: f,
2390
+ reSendImage: F && D ? () => N(D) : void 0
2391
+ })
2392
+ ]
2393
+ })
2394
+ });
2395
+ }
2396
+ //#endregion
2397
+ //#region src/components/mapView/mapView.client.tsx
2398
+ function En({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
2399
+ let a = l(null), s = l(null), c = e || t[0];
2400
+ return o(() => (ae.accessToken = r, a.current = new ae.Map({
2401
+ container: s.current,
2402
+ style: "mapbox://styles/mapbox/light-v11",
2403
+ center: [c.lng, c.lat],
2404
+ zoom: 13,
2405
+ language: "pt-BR"
2406
+ }), t.forEach((e) => {
2407
+ let { lat: t, lng: r, popUp: i } = e, o = document.createElement("img");
2408
+ o.className = "arkynMarker", o.src = "https://i.postimg.cc/mgKggjk7/Pin.png";
2409
+ let s = new ae.Marker(o).setLngLat([r, t]).addTo(a.current);
2410
+ if (i) {
2411
+ let e = document.createElement("div");
2412
+ oe(e).render(i);
2413
+ let t = new ae.Popup({
2414
+ offset: 25,
2415
+ closeButton: !1,
2416
+ className: "arkynMapViewPopup"
2417
+ }).setDOMContent(e);
2418
+ s.setPopup(t);
2419
+ }
2420
+ o.addEventListener("click", () => {
2421
+ n && n(e), a.current.flyTo({
2422
+ center: [r, t],
2423
+ zoom: 15,
2424
+ duration: 1200
2425
+ }), s.togglePopup();
2426
+ });
2427
+ }), () => {
2428
+ a.current?.remove();
2429
+ }), []), /* @__PURE__ */ p("div", {
2430
+ id: "map-container",
2431
+ ref: s,
2432
+ style: {
2433
+ height: "100%",
2434
+ width: "100%",
2435
+ borderRadius: "8px"
2436
+ },
2437
+ ...i
2438
+ });
2439
+ }
2440
+ //#endregion
2441
+ //#region src/components/mapView/index.tsx
2442
+ function Dn({ className: e }) {
2443
+ return /* @__PURE__ */ p("div", {
2444
+ className: "arkynMapViewPinnedEmpty " + e,
2445
+ children: /* @__PURE__ */ p(R, {})
2446
+ });
2447
+ }
2448
+ function On(e) {
2449
+ let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
2450
+ if (!t) return /* @__PURE__ */ p(Dn, { className: i });
2451
+ let s = Array.isArray(t) ? t : [t];
2452
+ return s.length === 0 ? /* @__PURE__ */ p(Dn, { className: i }) : /* @__PURE__ */ p(Et, {
2453
+ fallback: /* @__PURE__ */ p(Dn, { className: i }),
2454
+ children: () => /* @__PURE__ */ p(En, {
2455
+ accessToken: r,
2456
+ coordinates: s,
2457
+ center: s[0],
2458
+ onMarkerClick: a,
2459
+ ...o
2460
+ })
2461
+ });
2462
+ }
2463
+ //#endregion
2464
+ //#region src/components/maskedInput/index.tsx
2465
+ var kn = r((e, t) => /* @__PURE__ */ p("input", {
2466
+ ref: t,
2467
+ ...e
2468
+ }));
2469
+ function An(e) {
2470
+ let { name: t, disabled: n, title: r, style: i, variant: a = "solid", separate: o, mask: c, showMask: d, replacement: f, label: h, className: g = "", prefix: _, suffix: v, isLoading: y = !1, leftIcon: b, readOnly: x, onFocus: S, onBlur: C, errorMessage: w, defaultValue: T, showAsterisk: E, rightIcon: D, size: O = "md", id: k, value: A, placeholder: j, ...M } = e, { fieldErrors: N } = X(), [P, F] = u(!1), I = l(null), R = k || s(), z = w || N?.[t], B = !!z, V = n || y, H = {
2471
+ md: 20,
2472
+ lg: 20
2473
+ }[O], U = D ? "right" : "left", W = U === "left" && y, G = U === "right" && y;
2474
+ function K() {
2475
+ V || !I?.current || (F(!0), I.current.focus());
2476
+ }
2477
+ function q(e) {
2478
+ F(!0), S && S(e);
2479
+ }
2480
+ function ee(e) {
2481
+ F(!1), C && C(e);
2482
+ }
2483
+ let J = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${V || x || y ? "opacity" : ""} ${B ? "errored" : ""} ${P ? "focused" : ""}`;
2484
+ return /* @__PURE__ */ m(Ve, {
2485
+ className: g,
2486
+ children: [
2487
+ h && /* @__PURE__ */ p(Be, {
2488
+ showAsterisk: E,
2489
+ htmlFor: R,
2490
+ children: h
2491
+ }),
2492
+ /* @__PURE__ */ m("section", {
2493
+ title: r,
2494
+ style: i,
2495
+ onClick: K,
2496
+ className: J,
2497
+ children: [
2498
+ /* @__PURE__ */ p(Z, {
2499
+ iconSize: H,
2500
+ icon: _,
2501
+ className: "prefix"
2502
+ }),
2503
+ /* @__PURE__ */ p(Z, {
2504
+ show: W,
2505
+ iconSize: H,
2506
+ className: "spinner",
2507
+ icon: L
2508
+ }),
2509
+ /* @__PURE__ */ p(Z, {
2510
+ show: !y,
2511
+ icon: b,
2512
+ iconSize: H
2513
+ }),
2514
+ /* @__PURE__ */ p(se, {
2515
+ component: kn,
2516
+ mask: c,
2517
+ replacement: f,
2518
+ separate: o,
2519
+ showMask: d,
2520
+ ref: I,
2521
+ onFocus: q,
2522
+ onBlur: ee,
2523
+ disabled: V,
2524
+ readOnly: x,
2525
+ id: R,
2526
+ name: t,
2527
+ defaultValue: T || void 0,
2528
+ placeholder: V && A || j,
2529
+ value: V ? void 0 : A,
2530
+ ...M
2531
+ }),
2532
+ /* @__PURE__ */ p(Z, {
2533
+ show: !y,
2534
+ icon: D,
2535
+ iconSize: H
2536
+ }),
2537
+ /* @__PURE__ */ p(Z, {
2538
+ show: G,
2539
+ iconSize: H,
2540
+ className: "spinner",
2541
+ icon: L
2542
+ }),
2543
+ /* @__PURE__ */ p(Z, {
2544
+ iconSize: H,
2545
+ icon: v,
2546
+ className: "suffix"
2547
+ })
2548
+ ]
2549
+ }),
2550
+ z && /* @__PURE__ */ p(ze, { children: z })
2551
+ ]
2552
+ });
2553
+ }
2554
+ //#endregion
2555
+ //#region src/components/modal/modalContext.tsx
2556
+ var jn = n({});
2557
+ function Mn(e) {
2558
+ return /* @__PURE__ */ p(jn.Provider, {
2559
+ value: { makeInvisible: e.makeInvisible },
2560
+ children: e.children
2561
+ });
2562
+ }
2563
+ function Nn() {
2564
+ return a(jn);
2565
+ }
2566
+ //#endregion
2567
+ //#region src/components/modal/modalContainer/index.tsx
2568
+ function Pn(e) {
2569
+ let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e;
2570
+ ot(t);
2571
+ let o = `arkynModalContainer ${t ? "visibleTrue" : "visibleFalse"} ${i}`;
2572
+ return /* @__PURE__ */ p(Mn, {
2573
+ makeInvisible: n,
2574
+ children: /* @__PURE__ */ p(ie, { children: t && /* @__PURE__ */ m("aside", {
2575
+ className: o.trim(),
2576
+ ...a,
2577
+ children: [/* @__PURE__ */ p(Y.div, {
2578
+ className: "arkynModalContainerOverlay",
2579
+ transition: {
2580
+ duration: .15,
2581
+ ease: "easeOut"
2582
+ },
2583
+ initial: { opacity: 0 },
2584
+ animate: { opacity: 1 },
2585
+ exit: { opacity: 0 },
2586
+ onClick: n
2587
+ }), /* @__PURE__ */ p(Y.div, {
2588
+ className: "arkynModalContainerContent",
2589
+ transition: {
2590
+ duration: .15,
2591
+ ease: "easeOut"
2592
+ },
2593
+ initial: {
2594
+ opacity: 0,
2595
+ scale: .75
2596
+ },
2597
+ animate: {
2598
+ opacity: 1,
2599
+ scale: 1
2600
+ },
2601
+ exit: {
2602
+ opacity: 0,
2603
+ scale: 0
2604
+ },
2605
+ children: r
2606
+ })]
2607
+ }) })
2608
+ });
2609
+ }
2610
+ //#endregion
2611
+ //#region src/components/modal/modalFooter/index.tsx
2612
+ function Fn(e) {
2613
+ let { alignment: t = "right", className: n, ...r } = e;
2614
+ return /* @__PURE__ */ p("footer", {
2615
+ className: `arkynModalFooter ${t} ${n}`.trim(),
2616
+ ...r
2617
+ });
2618
+ }
2619
+ //#endregion
2620
+ //#region src/components/modal/modalHeader/index.tsx
2621
+ function In(e) {
2622
+ let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Nn();
2623
+ return /* @__PURE__ */ m("header", {
2624
+ className: `arkynModalHeader ${n}`.trim(),
2625
+ ...i,
2626
+ children: [r, t && /* @__PURE__ */ p("button", {
2627
+ type: "button",
2628
+ onClick: a,
2629
+ "aria-label": "Close modal button",
2630
+ className: "arkynModalHeaderCloseButton",
2631
+ children: /* @__PURE__ */ p(K, { size: 24 })
2632
+ })]
2633
+ });
2634
+ }
2635
+ //#endregion
2636
+ //#region src/components/multiSelect/multiSelectChevron/index.tsx
2637
+ function Ln(e) {
2638
+ let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
2639
+ return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
2640
+ className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
2641
+ strokeWidth: 2.5,
2642
+ style: {
2643
+ minWidth: t,
2644
+ minHeight: t,
2645
+ maxWidth: t,
2646
+ maxHeight: t
2647
+ }
2648
+ });
2649
+ }
2650
+ //#endregion
2651
+ //#region src/components/multiSelect/multiSelectContainer/index.tsx
2652
+ function Rn(e) {
2653
+ let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
2654
+ return /* @__PURE__ */ p("section", {
2655
+ id: d,
2656
+ className: `arkynMultiSelectContainer ${f ? "hasPrefix" : ""} ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`,
2657
+ onClick: n,
2658
+ children: t
2659
+ });
2660
+ }
2661
+ //#endregion
2662
+ //#region src/components/multiSelect/multiSelectContent/index.tsx
2663
+ function zn(e) {
2664
+ let { children: t, size: n } = e;
2665
+ return /* @__PURE__ */ p("div", {
2666
+ className: `arkynMultiSelectContent ${n}`,
2667
+ children: t
2668
+ });
2669
+ }
2670
+ //#endregion
2671
+ //#region src/components/multiSelect/multiSelectMark/index.tsx
2672
+ function Bn(e) {
2673
+ let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
2674
+ return /* @__PURE__ */ m("div", {
2675
+ className: "arkynMultiSelectMark",
2676
+ children: [t, /* @__PURE__ */ p("button", {
2677
+ disabled: r,
2678
+ type: "button",
2679
+ onClick: (e) => {
2680
+ e.stopPropagation(), i(n);
2681
+ },
2682
+ children: /* @__PURE__ */ p(K, {})
2683
+ })]
2684
+ });
2685
+ }
2686
+ //#endregion
2687
+ //#region src/components/multiSelect/multiSelectOption/index.tsx
2688
+ function Vn(e) {
2689
+ let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
2690
+ return /* @__PURE__ */ m("div", {
2691
+ onClick: () => r(i),
2692
+ className: `arkynMultiSelectOption ${a} ${n(i) ? "active" : ""}`,
2693
+ children: [
2694
+ t,
2695
+ " ",
2696
+ /* @__PURE__ */ p(x, {})
2697
+ ]
2698
+ });
2699
+ }
2700
+ //#endregion
2701
+ //#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
2702
+ function Hn(e) {
2703
+ let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
2704
+ ot(n), o(() => {
2705
+ n && (() => {
2706
+ if (!s.current) return;
2707
+ let e = s.current.parentElement;
2708
+ if (!e) return;
2709
+ let t = e.getBoundingClientRect();
2710
+ window.innerHeight - t.bottom < 300 && t.top > 300 ? d("top") : d("bottom");
2711
+ })();
2712
+ }, [n]);
2713
+ function h(e) {
2714
+ r && a(e.target.value);
2715
+ }
2716
+ return n ? /* @__PURE__ */ m("div", {
2717
+ ref: s,
2718
+ className: `arkynMultiSelectOptionsContainer ${c}`,
2719
+ children: [r && /* @__PURE__ */ p(st, {
2720
+ type: "search",
2721
+ name: "search-select",
2722
+ variant: "underline",
2723
+ leftIcon: U,
2724
+ value: i,
2725
+ onChange: h
2726
+ }), t]
2727
+ }) : /* @__PURE__ */ p(f, {});
2728
+ }
2729
+ //#endregion
2730
+ //#region src/components/multiSelect/multiSelectOverlay/index.tsx
2731
+ function Un(e) {
2732
+ let { isFocused: t, handleBlur: n } = e;
2733
+ return t ? /* @__PURE__ */ p("aside", {
2734
+ className: "arkynMultiSelectOverlay",
2735
+ onClick: n
2736
+ }) : /* @__PURE__ */ p(f, {});
2737
+ }
2738
+ //#endregion
2739
+ //#region src/components/multiSelect/multiSelectSpinner/index.tsx
2740
+ function Wn(e) {
2741
+ let { iconSize: t, isLoading: n } = e;
2742
+ return n ? /* @__PURE__ */ p(L, {
2743
+ className: "arkynMultiSelectSpinner",
2744
+ size: t,
2745
+ strokeWidth: 2.5
2746
+ }) : /* @__PURE__ */ p(f, {});
2747
+ }
2748
+ //#endregion
2749
+ //#region src/components/multiSelect/index.tsx
2750
+ function Gn(e) {
2751
+ let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !1, defaultValue: o = [], errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", unShowFieldTemplate: j = !1, orientation: M = "vertical" } = e, { fieldErrors: N } = X(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
2752
+ md: 20,
2753
+ lg: 20
2754
+ }[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
2755
+ function q(e) {
2756
+ return K.includes(e);
2757
+ }
2758
+ function ee(e) {
2759
+ return n.find((t) => t.value === e)?.label || "";
2760
+ }
2761
+ function J() {
2762
+ R || !P?.current || H || (U(!0), P.current.focus(), T && T());
2763
+ }
2764
+ function te() {
2765
+ U(!1), C && P.current && P.current.blur();
2766
+ }
2767
+ function ne(e) {
2768
+ V(e), x && x(e);
2769
+ }
2770
+ function re(e) {
2771
+ q(e) ? (G(W.filter((t) => t !== e)), S && S(W.filter((t) => t !== e))) : (G([...W, e]), S && S([...W, e])), a && te();
2772
+ }
2773
+ let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
2774
+ return /* @__PURE__ */ p(et, {
2775
+ name: t,
2776
+ label: _,
2777
+ showAsterisk: y,
2778
+ className: r,
2779
+ errorMessage: I,
2780
+ unShowFieldTemplate: j,
2781
+ orientation: M,
2782
+ children: /* @__PURE__ */ m(Rn, {
2783
+ handleContainerFocus: J,
2784
+ disabled: R,
2785
+ isError: L,
2786
+ isFocused: H,
2787
+ isLoading: d,
2788
+ readOnly: f,
2789
+ size: O,
2790
+ variant: A,
2791
+ prefixExists: !!D,
2792
+ id: F,
2793
+ children: [
2794
+ /* @__PURE__ */ p("input", {
2795
+ ref: P,
2796
+ name: t,
2797
+ value: JSON.stringify(K),
2798
+ type: "hidden"
2799
+ }),
2800
+ /* @__PURE__ */ p(Z, {
2801
+ iconSize: z,
2802
+ icon: D,
2803
+ className: "prefix"
2804
+ }),
2805
+ b && /* @__PURE__ */ p(b, {
2806
+ size: z,
2807
+ strokeWidth: 2.5
2808
+ }),
2809
+ /* @__PURE__ */ m(zn, {
2810
+ size: O,
2811
+ children: [K.map((e) => /* @__PURE__ */ p(Bn, {
2812
+ label: ee(e),
2813
+ value: e,
2814
+ handleChangeValue: re,
2815
+ disabled: R
2816
+ }, e)), K.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
2817
+ }),
2818
+ /* @__PURE__ */ m(Hn, {
2819
+ isFocused: H,
2820
+ isSearchable: h,
2821
+ search: B,
2822
+ onSearch: ne,
2823
+ children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(Vn, {
2824
+ label: e,
2825
+ value: t,
2826
+ size: O,
2827
+ handleChangeValue: re,
2828
+ optionHasSelected: q
2829
+ }, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
2830
+ }),
2831
+ /* @__PURE__ */ p(Ln, {
2832
+ disabled: R,
2833
+ isFocused: H,
2834
+ readOnly: f,
2835
+ iconSize: z,
2836
+ isLoading: d
2837
+ }),
2838
+ /* @__PURE__ */ p(Wn, {
2839
+ iconSize: z,
2840
+ isLoading: d
2841
+ }),
2842
+ /* @__PURE__ */ p(Un, {
2843
+ handleBlur: te,
2844
+ isFocused: H
2845
+ })
2846
+ ]
2847
+ })
2848
+ });
2849
+ }
2850
+ //#endregion
2851
+ //#region src/components/pagination/chevronButton/index.tsx
2852
+ function Kn(e) {
2853
+ let { orientation: t, handlePageChange: n, disabled: r } = e;
2854
+ return /* @__PURE__ */ p("button", {
2855
+ className: "arkynChevronPageButton",
2856
+ disabled: r,
2857
+ onClick: n,
2858
+ children: {
2859
+ left: /* @__PURE__ */ p(w, {}),
2860
+ right: /* @__PURE__ */ p(T, {})
2861
+ }[t]
2862
+ });
2863
+ }
2864
+ //#endregion
2865
+ //#region src/components/pagination/currentButton/index.tsx
2866
+ function qn({ currentPage: e }) {
2867
+ return /* @__PURE__ */ p("button", {
2868
+ className: "arkynPaginationCurrentButton",
2869
+ disabled: !0,
2870
+ children: e
2871
+ });
2872
+ }
2873
+ //#endregion
2874
+ //#region src/components/pagination/pageButton/index.tsx
2875
+ function Jn(e) {
2876
+ let { page: t, handlePageChange: n } = e;
2877
+ return /* @__PURE__ */ p("button", {
2878
+ className: "arkynPaginationPageButton",
2879
+ onClick: n,
2880
+ children: t
2881
+ });
2882
+ }
2883
+ //#endregion
2884
+ //#region src/components/pagination/paginationService.ts
2885
+ var Yn = class {
2886
+ currentPage;
2887
+ totalCountRegisters;
2888
+ registerPerPage;
2889
+ siblingsCount;
2890
+ lastPage;
2891
+ onChange;
2892
+ previousPages;
2893
+ nextPages;
2894
+ generatePagesArray(e, t) {
2895
+ return [...Array(t - e)].map((t, n) => e + n + 1).filter((e) => e > 0);
2896
+ }
2897
+ generatePreviousPages(e, t) {
2898
+ return e > 1 ? this.generatePagesArray(e - 1 - t, e - 1) : [];
2899
+ }
2900
+ generateNextPages(e, t) {
2901
+ return e < this.lastPage ? this.generatePagesArray(e, Math.min(e + t, this.lastPage)) : [];
2902
+ }
2903
+ constructor(e) {
2904
+ this.totalCountRegisters = e.totalCountRegisters, this.currentPage = e.currentPage, this.registerPerPage = e?.registerPerPage || 20, this.siblingsCount = e?.siblingsCount || 2, this.lastPage = Math.ceil(this.totalCountRegisters / this.registerPerPage), this.onChange = e?.onChange, this.previousPages = this.generatePreviousPages(this.currentPage, this.siblingsCount), this.nextPages = this.generateNextPages(this.currentPage, this.siblingsCount);
2905
+ }
2906
+ handlePageChange = (e) => {
2907
+ e < 1 || e > this.lastPage || this.onChange && (this.currentPage = e, this.onChange(this.currentPage));
2908
+ };
2909
+ handlePlusChange = () => {
2910
+ this.currentPage >= this.lastPage || this.onChange && (this.currentPage += 1, this.onChange(this.currentPage));
2911
+ };
2912
+ handleMinusChange = () => {
2913
+ this.currentPage <= 1 || this.onChange && (--this.currentPage, this.onChange(this.currentPage));
2914
+ };
2915
+ };
2916
+ //#endregion
2917
+ //#region src/components/pagination/spread/index.tsx
2918
+ function Xn() {
2919
+ return /* @__PURE__ */ p("p", {
2920
+ className: "arkynPaginationSpread",
2921
+ children: /* @__PURE__ */ p(D, {})
2922
+ });
2923
+ }
2924
+ //#endregion
2925
+ //#region src/components/pagination/index.tsx
2926
+ function Zn(e) {
2927
+ let { totalCountRegisters: t, siblingsCount: n, currentPage: r, registerPerPage: i, onChange: a, ...o } = e, { currentPage: s, siblingsCount: c, previousPages: l, nextPages: u, lastPage: d, handlePageChange: h, handleMinusChange: g, handlePlusChange: _ } = new Yn({
2928
+ totalCountRegisters: t,
2929
+ currentPage: r,
2930
+ registerPerPage: i,
2931
+ siblingsCount: n,
2932
+ onChange: a
2933
+ });
2934
+ return /* @__PURE__ */ m("div", {
2935
+ className: "arkynPagination",
2936
+ ...o,
2937
+ children: [
2938
+ /* @__PURE__ */ p(Kn, {
2939
+ orientation: "left",
2940
+ handlePageChange: g,
2941
+ disabled: s <= 1
2942
+ }),
2943
+ s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Jn, {
2944
+ page: 1,
2945
+ handlePageChange: () => h(1)
2946
+ }), s > 2 + c && /* @__PURE__ */ p(Xn, {})] }),
2947
+ l.map((e, t) => /* @__PURE__ */ p(Jn, {
2948
+ page: e,
2949
+ handlePageChange: g
2950
+ }, t)),
2951
+ /* @__PURE__ */ p(qn, { currentPage: s }),
2952
+ u.map((e, t) => /* @__PURE__ */ p(Jn, {
2953
+ page: e,
2954
+ handlePageChange: _
2955
+ }, t)),
2956
+ s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(Xn, {}), /* @__PURE__ */ p(Jn, {
2957
+ page: d,
2958
+ handlePageChange: () => h(d)
2959
+ })] }),
2960
+ /* @__PURE__ */ p(Kn, {
2961
+ orientation: "right",
2962
+ handlePageChange: _,
2963
+ disabled: s >= d
2964
+ })
2965
+ ]
2966
+ });
2967
+ }
2968
+ //#endregion
2969
+ //#region src/components/phoneInput/phoneInputContainer/index.tsx
2970
+ function Qn(e) {
2971
+ let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
2972
+ return /* @__PURE__ */ p("section", {
2973
+ className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
2974
+ onClick: n,
2975
+ children: t
2976
+ });
2977
+ }
2978
+ //#endregion
2979
+ //#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
2980
+ function $n(e) {
2981
+ let { isOpen: t, onClick: n } = e;
2982
+ return t ? /* @__PURE__ */ p("aside", {
2983
+ className: "arkynPhoneInputCountriesOverlay",
2984
+ onClick: n
2985
+ }) : /* @__PURE__ */ p(f, {});
2986
+ }
2987
+ //#endregion
2988
+ //#region src/components/phoneInput/phoneInputCountryOption/index.tsx
2989
+ function er(e) {
2990
+ let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
2991
+ return /* @__PURE__ */ m("div", {
2992
+ onClick: () => r(t),
2993
+ className: `arkynPhoneInputCountryOption ${i} ${n ? "active" : ""}`,
2994
+ children: [
2995
+ /* @__PURE__ */ p("img", {
2996
+ src: t.flag,
2997
+ alt: t.name,
2998
+ className: "flag"
2999
+ }),
3000
+ t.name,
3001
+ " ",
3002
+ /* @__PURE__ */ p("span", { children: t.code }),
3003
+ /* @__PURE__ */ p(x, { className: "check" })
3004
+ ]
3005
+ });
3006
+ }
3007
+ //#endregion
3008
+ //#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
3009
+ function tr(e) {
3010
+ let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
3011
+ function h(e) {
3012
+ r(e.target.value);
3013
+ }
3014
+ return ot(n), o(() => {
3015
+ n && (() => {
3016
+ if (!s.current) return;
3017
+ let e = s.current.parentElement;
3018
+ if (!e) return;
3019
+ let t = e.getBoundingClientRect();
3020
+ window.innerHeight - t.bottom < 300 && t.top > 300 ? d("top") : d("bottom");
3021
+ })();
3022
+ }, [n]), n ? /* @__PURE__ */ m("div", {
3023
+ className: `arkynPhoneInputCountryOptionsContainer ${c}`,
3024
+ ref: s,
3025
+ children: [/* @__PURE__ */ p("input", {
3026
+ type: "search",
3027
+ name: "search-select",
3028
+ className: "arkynPhoneInputCountryOptionsContainerSearchSelect",
3029
+ value: i,
3030
+ id: "input-search",
3031
+ placeholder: a,
3032
+ onChange: h
3033
+ }), t]
3034
+ }) : /* @__PURE__ */ p(f, {});
3035
+ }
3036
+ //#endregion
3037
+ //#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
3038
+ function nr(e) {
3039
+ let { currentCountry: t, onClick: n } = e;
3040
+ return /* @__PURE__ */ m("div", {
3041
+ className: "phoneInputSelectCountry",
3042
+ onClick: n,
3043
+ children: [
3044
+ /* @__PURE__ */ p("img", {
3045
+ className: "flag",
3046
+ src: t.flag,
3047
+ alt: t.name
3048
+ }),
3049
+ /* @__PURE__ */ p(C, {
3050
+ className: "chevronDown",
3051
+ strokeWidth: 2.5
3052
+ }),
3053
+ /* @__PURE__ */ p(He, { orientation: "vertical" })
3054
+ ]
3055
+ });
3056
+ }
3057
+ //#endregion
3058
+ //#region src/utils/phoneInputUtilities.ts
3059
+ function rr(e) {
3060
+ return e && e.replace(/[^0-9]/g, "");
3061
+ }
3062
+ var ir = {
3063
+ EIGHT: "(99) 9999-9999",
3064
+ NINE: "(99) 99999-9999"
3065
+ };
3066
+ function ar(e, t) {
3067
+ let n = "", r = 0;
3068
+ for (let i = 0; i < t.length; i++) if (t[i] === "9") if (r < e.length) n += e[r], r++;
3069
+ else break;
3070
+ else if (r < e.length) n += t[i];
3071
+ else break;
3072
+ return n;
3073
+ }
3074
+ function or(e) {
3075
+ return e.length > 10 ? "NINE" : "EIGHT";
3076
+ }
3077
+ var sr = rr(ir.NINE).length, cr = r((e, t) => /* @__PURE__ */ p("input", {
3078
+ ref: t,
3079
+ ...e
3080
+ })), lr = r((e, t) => {
3081
+ let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry: l, disabled: d, id: f } = e, [m, h] = u(!1), g = typeof l.mask == "string" ? l.mask : l.mask[0];
3082
+ o(() => {
3083
+ m ? s(g) : h(!0);
3084
+ }, [l]);
3085
+ let _ = `phoneInputMask ${a}`;
3086
+ function v(e) {
3087
+ let t = rr(e.target.value), n = or(t);
3088
+ t.length > sr || (t = ar(t, ir[n]), e.target.value = t, s(t));
3089
+ }
3090
+ return l.code === "+55" ? /* @__PURE__ */ p("input", {
3091
+ id: f,
3092
+ value: c,
3093
+ onChange: v,
3094
+ className: _,
3095
+ onFocus: n,
3096
+ onBlur: i,
3097
+ disabled: d,
3098
+ ref: t
3099
+ }) : /* @__PURE__ */ p(se, {
3100
+ id: f,
3101
+ value: c,
3102
+ readOnly: r,
3103
+ onChange: (e) => s(e.target.value),
3104
+ className: _,
3105
+ component: cr,
3106
+ onFocus: n,
3107
+ onBlur: i,
3108
+ disabled: d,
3109
+ mask: g,
3110
+ showMask: !0,
3111
+ replacement: { _: /\d/ },
3112
+ ref: t
3113
+ });
3114
+ });
3115
+ //#endregion
3116
+ //#region src/components/phoneInput/index.tsx
3117
+ function ur(e) {
3118
+ let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S, unShowFieldTemplate: C = !1, orientation: w = "vertical" } = e, T = ce.find((e) => e.iso === "BR"), E = h ? ne(h) : "", D = h ? ee(h)[1] : T, [O, k] = u(!1), [A, j] = u(""), [M, N] = u(!1), [P, F] = u(E), I = n === void 0 ? P : n, [L, R] = u(D), { fieldErrors: z } = X(), B = l(null), V = S || s(), H = o || z?.[v], U = !!H, W = a || c, G = l(null);
3119
+ function K() {
3120
+ W || O || M || (k(!0), G.current && G.current.focus());
3121
+ }
3122
+ function q() {
3123
+ N(!0), k(!0);
3124
+ }
3125
+ function J() {
3126
+ N(!1), k(!1);
3127
+ }
3128
+ function te() {
3129
+ k(!0);
3130
+ }
3131
+ function ie() {
3132
+ k(!1);
3133
+ }
3134
+ function Y(e) {
3135
+ return e.name.toLowerCase().includes(A.toLowerCase());
3136
+ }
3137
+ function ae(e) {
3138
+ let t = L.code;
3139
+ return t += re(e || I), t;
3140
+ }
3141
+ return /* @__PURE__ */ p(et, {
3142
+ name: v,
3143
+ label: r,
3144
+ showAsterisk: _,
3145
+ className: i,
3146
+ errorMessage: H,
3147
+ unShowFieldTemplate: C,
3148
+ orientation: w,
3149
+ children: /* @__PURE__ */ m(Qn, {
3150
+ disabled: W,
3151
+ isError: U,
3152
+ isLoading: c,
3153
+ isFocused: O,
3154
+ readOnly: d,
3155
+ size: f,
3156
+ variant: g,
3157
+ onFocus: K,
3158
+ children: [
3159
+ /* @__PURE__ */ p(nr, {
3160
+ currentCountry: L,
3161
+ onClick: q,
3162
+ size: f
3163
+ }),
3164
+ /* @__PURE__ */ m(tr, {
3165
+ isOpen: W || d ? !1 : M,
3166
+ search: A,
3167
+ placeholder: b,
3168
+ onSearch: j,
3169
+ children: [ce.filter((e) => Y(e)).map((e) => /* @__PURE__ */ p(er, {
3170
+ country: e,
3171
+ handleChangeValue: () => {
3172
+ R(e), N(!1), F("");
3173
+ },
3174
+ isActive: e.iso === L.iso,
3175
+ size: f
3176
+ }, e.iso)), ce.filter((e) => Y(e)).length === 0 && /* @__PURE__ */ p("p", { children: x })]
3177
+ }),
3178
+ /* @__PURE__ */ p($n, {
3179
+ isOpen: W || d ? !1 : M,
3180
+ onClick: J
3181
+ }),
3182
+ /* @__PURE__ */ p(lr, {
3183
+ id: V,
3184
+ ref: G,
3185
+ readonly: d,
3186
+ currentCountry: L,
3187
+ value: I,
3188
+ disabled: W,
3189
+ onBlur: ie,
3190
+ onFocus: te,
3191
+ size: f,
3192
+ onChange: (e) => {
3193
+ F(e), y && y(ae(e));
3194
+ }
3195
+ }),
3196
+ /* @__PURE__ */ p("input", {
3197
+ ref: B,
3198
+ type: "hidden",
3199
+ name: v,
3200
+ value: ae()
3201
+ })
3202
+ ]
3203
+ })
3204
+ });
3205
+ }
3206
+ //#endregion
3207
+ //#region src/components/popover/index.tsx
3208
+ function dr(e) {
3209
+ let { children: t, button: n, closeOnClick: r, className: i = "", orientation: a = "bottomLeft" } = e, [o, s] = u(!1), c = `arkynPopover ${a} ${o ? "visibleTrue" : "visibleFalse"} ${i}`;
3210
+ function l() {
3211
+ o || s(!0);
3212
+ }
3213
+ return ot(o), /* @__PURE__ */ m("div", {
3214
+ className: c,
3215
+ onClick: l,
3216
+ children: [
3217
+ n,
3218
+ /* @__PURE__ */ p(Y.div, {
3219
+ style: { visibility: o ? "visible" : "hidden" },
3220
+ transition: {
3221
+ ease: "easeOut",
3222
+ duration: 0
3223
+ },
3224
+ initial: { opacity: 0 },
3225
+ animate: { opacity: +!!o },
3226
+ exit: { opacity: 0 },
3227
+ onClick: () => r && s(!1),
3228
+ className: "arkynPopoverContent",
3229
+ children: t
3230
+ }),
3231
+ o && /* @__PURE__ */ p("div", {
3232
+ onClick: () => s(!1),
3233
+ className: "arkynPopoverOverlay"
3234
+ })
3235
+ ]
3236
+ });
3237
+ }
3238
+ //#endregion
3239
+ //#region src/components/radio/radioContext.tsx
3240
+ var fr = n({});
3241
+ function pr(e) {
3242
+ let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
3243
+ return /* @__PURE__ */ p(fr.Provider, {
3244
+ value: {
3245
+ handleChange: i,
3246
+ value: a,
3247
+ size: n,
3248
+ isError: r,
3249
+ disabled: o
3250
+ },
3251
+ children: t
3252
+ });
3253
+ }
3254
+ function mr() {
3255
+ return a(fr);
3256
+ }
3257
+ //#endregion
3258
+ //#region src/components/radio/radioBox/index.tsx
3259
+ function hr(e) {
3260
+ let { value: t, size: n, disabled: r, children: i, className: a = "", onClick: o, onFocus: s, ...c } = e, { handleChange: l, size: u, value: d, isError: f, disabled: h } = mr(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
3261
+ function b(e) {
3262
+ o && o(e), l(t);
3263
+ }
3264
+ function x(e) {
3265
+ s && s(e), l(t);
3266
+ }
3267
+ return /* @__PURE__ */ m("label", {
3268
+ className: y.trim(),
3269
+ children: [/* @__PURE__ */ p("button", {
3270
+ type: "button",
3271
+ disabled: v,
3272
+ onClick: b,
3273
+ onFocus: x,
3274
+ ...c
3275
+ }), i]
3276
+ });
3277
+ }
3278
+ //#endregion
3279
+ //#region src/components/radio/radioGroup/index.tsx
3280
+ function gr(e) {
3281
+ let { defaultValue: t = "", name: n, label: r, showAsterisk: i, errorMessage: a, value: o, onChange: s, size: c = "md", className: l = "", disabled: d = !1, unShowFieldTemplate: f = !1, orientation: h = "vertical", ...g } = e, [_, v] = u(t), { fieldErrors: y } = X();
3282
+ function b(e) {
3283
+ v(e), s && s(e);
3284
+ }
3285
+ let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
3286
+ return /* @__PURE__ */ p(et, {
3287
+ name: n,
3288
+ label: r,
3289
+ showAsterisk: i,
3290
+ className: l,
3291
+ errorMessage: x,
3292
+ unShowFieldTemplate: f,
3293
+ orientation: h,
3294
+ children: /* @__PURE__ */ m(pr, {
3295
+ isError: S,
3296
+ size: c,
3297
+ value: o || _,
3298
+ handleChange: b,
3299
+ disabled: d,
3300
+ children: [/* @__PURE__ */ p("input", {
3301
+ style: { display: "none" },
3302
+ type: "text",
3303
+ readOnly: !0,
3304
+ name: n,
3305
+ value: o || _
3306
+ }), /* @__PURE__ */ p("div", {
3307
+ className: C.trim(),
3308
+ ...g
3309
+ })]
3310
+ })
3311
+ });
3312
+ }
3313
+ //#endregion
3314
+ //#region src/services/isBlockActive.ts
3315
+ function _r(e, t, n = "type") {
3316
+ let { selection: r } = e;
3317
+ if (!r) return !1;
3318
+ let [i] = Array.from(ue.nodes(e, {
3319
+ at: ue.unhangRange(e, r),
3320
+ match: (e) => !ue.isEditor(e) && de.isElement(e) && e[n] === t
3321
+ }));
3322
+ return !!i;
3323
+ }
3324
+ //#endregion
3325
+ //#region src/templates/richTextTemplates.ts
3326
+ var vr = {
3327
+ "mod+b": "bold",
3328
+ "mod+i": "italic",
3329
+ "mod+u": "underline",
3330
+ "mod+`": "code"
3331
+ }, yr = [{
3332
+ type: "paragraph",
3333
+ children: [{ text: "" }]
3334
+ }], br = ["listItem", "numberedList"], xr = [
3335
+ "left",
3336
+ "center",
3337
+ "right",
3338
+ "justify"
3339
+ ];
3340
+ //#endregion
3341
+ //#region src/services/toggleBlock.ts
3342
+ function Sr(e, t) {
3343
+ let n = _r(e, t, xr.includes(t) ? "align" : "type"), r = br.includes(t);
3344
+ me.unwrapNodes(e, {
3345
+ match: (e) => !ue.isEditor(e) && de.isElement(e) && br.includes(e.type) && !xr.includes(t),
3346
+ split: !0
3347
+ });
3348
+ let i;
3349
+ if (i = xr.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, me.setNodes(e, i), !n && r) {
3350
+ let n = {
3351
+ type: t,
3352
+ children: []
3353
+ };
3354
+ me.wrapNodes(e, n);
3355
+ }
3356
+ }
3357
+ //#endregion
3358
+ //#region src/components/richText/blockButton/index.tsx
3359
+ function Cr({ format: e, icon: t }) {
3360
+ let n = ye(), r = _r(n, e, xr.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
3361
+ function i(t) {
3362
+ t.preventDefault(), Sr(n, e);
3363
+ }
3364
+ return /* @__PURE__ */ p("button", {
3365
+ type: "button",
3366
+ className: "arkynRichTextBlockButton " + r,
3367
+ onMouseDown: i,
3368
+ children: /* @__PURE__ */ p(t, {})
3369
+ });
3370
+ }
3371
+ //#endregion
3372
+ //#region src/components/richText/element/index.tsx
3373
+ function wr({ attributes: e, children: t, element: n }) {
3374
+ let r = { textAlign: n.align };
3375
+ switch (n.type) {
3376
+ case "blockQuote": return /* @__PURE__ */ p("blockquote", {
3377
+ className: "arkynElementBlockquote",
3378
+ style: r,
3379
+ ...e,
3380
+ children: t
3381
+ });
3382
+ case "bulletedList": return /* @__PURE__ */ p("ul", {
3383
+ className: "arkynElementBulletList",
3384
+ style: r,
3385
+ ...e,
3386
+ children: t
3387
+ });
3388
+ case "headingOne": return /* @__PURE__ */ p("h1", {
3389
+ className: "arkynElementHeadingOne",
3390
+ style: r,
3391
+ ...e,
3392
+ children: t
3393
+ });
3394
+ case "headingTwo": return /* @__PURE__ */ p("h2", {
3395
+ className: "arkynElementHeadingTwo",
3396
+ style: r,
3397
+ ...e,
3398
+ children: t
3399
+ });
3400
+ case "listItem": return /* @__PURE__ */ p("li", {
3401
+ className: "arkynElementListItem",
3402
+ style: r,
3403
+ ...e,
3404
+ children: t
3405
+ });
3406
+ case "numberedList": return /* @__PURE__ */ p("ol", {
3407
+ className: "arkynElementNumberedList",
3408
+ style: r,
3409
+ ...e,
3410
+ children: t
3411
+ });
3412
+ case "image": return /* @__PURE__ */ m("div", {
3413
+ style: r,
3414
+ ...e,
3415
+ children: [/* @__PURE__ */ p("img", {
3416
+ className: "arkynElementImage",
3417
+ alt: "arkynElementImage",
3418
+ src: n?.src || ""
3419
+ }), t]
3420
+ });
3421
+ case "video": return /* @__PURE__ */ m("div", {
3422
+ style: r,
3423
+ ...e,
3424
+ children: [/* @__PURE__ */ p("iframe", {
3425
+ className: "arkynElementVideo",
3426
+ src: n?.src || "",
3427
+ title: "YouTube video player",
3428
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
3429
+ referrerPolicy: "strict-origin-when-cross-origin",
3430
+ allowFullScreen: !0
3431
+ }), t]
3432
+ });
3433
+ default: return /* @__PURE__ */ p("p", {
3434
+ className: "arkynElementParagraph",
3435
+ style: r,
3436
+ ...e,
3437
+ children: t
3438
+ });
3439
+ }
3440
+ }
3441
+ //#endregion
3442
+ //#region src/components/tab/tabContext.tsx
3443
+ var Tr = n({});
3444
+ function Er() {
3445
+ return a(Tr);
3446
+ }
3447
+ function Dr(e) {
3448
+ return /* @__PURE__ */ p(Tr.Provider, {
3449
+ value: e,
3450
+ children: e.children
3451
+ });
3452
+ }
3453
+ //#endregion
3454
+ //#region src/components/tab/tabButton/index.tsx
3455
+ function Or(e) {
3456
+ let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = Er(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
3457
+ function f(e) {
3458
+ l(a), i && i(e);
3459
+ }
3460
+ return /* @__PURE__ */ p("button", {
3461
+ onClick: f,
3462
+ className: d.trim(),
3463
+ ...o,
3464
+ disabled: u,
3465
+ type: "button",
3466
+ children: t
3467
+ });
3468
+ }
3469
+ //#endregion
3470
+ //#region src/components/tab/tabContainer/index.tsx
3471
+ function kr(e) {
3472
+ let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
3473
+ function d(e) {
3474
+ c(e), n && n(e);
3475
+ }
3476
+ return /* @__PURE__ */ p(Dr, {
3477
+ disabled: i,
3478
+ currentTab: s,
3479
+ changeCurrentTab: d,
3480
+ children: /* @__PURE__ */ p("nav", {
3481
+ className: l.trim(),
3482
+ ...o,
3483
+ children: t
3484
+ })
3485
+ });
3486
+ }
3487
+ //#endregion
3488
+ //#region src/components/richText/insertImage/index.tsx
3489
+ function Ar(e) {
3490
+ let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c = ye(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
3491
+ function y(e) {
3492
+ e.preventDefault(), !(!h || h === "") && (c.insertNodes([
3493
+ {
3494
+ type: "paragraph",
3495
+ children: [{ text: "" }]
3496
+ },
3497
+ {
3498
+ type: "image",
3499
+ src: h,
3500
+ children: [{ text: "" }]
3501
+ },
3502
+ {
3503
+ type: "paragraph",
3504
+ children: [{ text: "" }]
3505
+ }
3506
+ ]), d(!1));
3507
+ }
3508
+ return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
3509
+ type: "button",
3510
+ className: "arkynRichTextInsertImage",
3511
+ onMouseDown: () => d(!0),
3512
+ children: /* @__PURE__ */ p(P, {})
3513
+ }), /* @__PURE__ */ m(Pn, {
3514
+ isVisible: l,
3515
+ makeInvisible: () => d(!1),
3516
+ children: [
3517
+ /* @__PURE__ */ p(In, { children: s }),
3518
+ /* @__PURE__ */ m("div", {
3519
+ className: "arkynRichTextInsertImageModalContent",
3520
+ children: [
3521
+ /* @__PURE__ */ m(kr, {
3522
+ defaultValue: _,
3523
+ onChange: v,
3524
+ children: [/* @__PURE__ */ p(Or, {
3525
+ value: "url",
3526
+ children: n[0]
3527
+ }), /* @__PURE__ */ p(Or, {
3528
+ value: "file",
3529
+ children: n[1]
3530
+ })]
3531
+ }),
3532
+ _ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(st, {
3533
+ type: "text",
3534
+ name: "richTextImageURL",
3535
+ label: o,
3536
+ showAsterisk: !0,
3537
+ defaultValue: h,
3538
+ onChange: (e) => g(e.target.value)
3539
+ }), h && /* @__PURE__ */ p("img", {
3540
+ className: "arkynRichTextInsertImageModalPreviewImage",
3541
+ src: h,
3542
+ alt: "preview"
3543
+ })] }),
3544
+ _ === "file" && /* @__PURE__ */ p(Tn, {
3545
+ name: "richTextImageURL",
3546
+ action: t,
3547
+ label: a,
3548
+ showAsterisk: !0,
3549
+ defaultValue: h,
3550
+ onChange: (e) => g(e)
3551
+ })
3552
+ ]
3553
+ }),
3554
+ /* @__PURE__ */ m(Fn, { children: [/* @__PURE__ */ p(Q, {
3555
+ type: "button",
3556
+ scheme: "danger",
3557
+ variant: "outline",
3558
+ onClick: () => d(!1),
3559
+ children: r
3560
+ }), /* @__PURE__ */ p(Q, {
3561
+ type: "button",
3562
+ onClick: y,
3563
+ children: i
3564
+ })] })
3565
+ ]
3566
+ })] });
3567
+ }
3568
+ //#endregion
3569
+ //#region src/components/richText/insertVideo/index.tsx
3570
+ function jr(e) {
3571
+ let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s = ye(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
3572
+ function b(e) {
3573
+ if (e.preventDefault(), !d || d === "") return;
3574
+ let t = `https://www.youtube.com/embed/${d}`;
3575
+ s.insertNodes([
3576
+ {
3577
+ type: "paragraph",
3578
+ children: [{ text: "" }]
3579
+ },
3580
+ {
3581
+ type: "video",
3582
+ src: t,
3583
+ children: [{ text: "" }]
3584
+ },
3585
+ {
3586
+ type: "paragraph",
3587
+ children: [{ text: "" }]
3588
+ }
3589
+ ]), l(!1);
3590
+ }
3591
+ return o(() => {
3592
+ if (!g || g === "") return;
3593
+ h(""), y("");
3594
+ let e = new URLSearchParams(g.split("?")[1]).get("v");
3595
+ e ? h(e) : y(a);
3596
+ }, [g]), o(() => {
3597
+ c || (h(""), _(""), y(""));
3598
+ }, [c]), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
3599
+ type: "button",
3600
+ className: "arkynRichTextInsertVideo",
3601
+ onMouseDown: () => l(!0),
3602
+ children: /* @__PURE__ */ p(G, {})
3603
+ }), /* @__PURE__ */ m(Pn, {
3604
+ isVisible: c,
3605
+ makeInvisible: () => l(!1),
3606
+ children: [
3607
+ /* @__PURE__ */ p(In, { children: i }),
3608
+ /* @__PURE__ */ m("div", {
3609
+ className: "arkynRichTextInsertVideoModalContent",
3610
+ children: [/* @__PURE__ */ p(st, {
3611
+ type: "text",
3612
+ name: "richTextVideoURL",
3613
+ label: r,
3614
+ showAsterisk: !0,
3615
+ defaultValue: g,
3616
+ onChange: (e) => _(e.target.value),
3617
+ errorMessage: v
3618
+ }), d && /* @__PURE__ */ p("iframe", {
3619
+ width: "auto",
3620
+ height: "315",
3621
+ src: `https://www.youtube.com/embed/${d}`,
3622
+ title: "YouTube video player",
3623
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
3624
+ referrerPolicy: "strict-origin-when-cross-origin",
3625
+ allowFullScreen: !0
3626
+ })]
3627
+ }),
3628
+ /* @__PURE__ */ m(Fn, { children: [/* @__PURE__ */ p(Q, {
3629
+ type: "button",
3630
+ scheme: "danger",
3631
+ variant: "outline",
3632
+ onClick: () => l(!1),
3633
+ children: t
3634
+ }), /* @__PURE__ */ p(Q, {
3635
+ disabled: !d,
3636
+ type: "button",
3637
+ onClick: b,
3638
+ children: n
3639
+ })] })
3640
+ ]
3641
+ })] });
3642
+ }
3643
+ //#endregion
3644
+ //#region src/components/richText/leaf/index.tsx
3645
+ function Mr({ attributes: e, children: t, leaf: n }) {
3646
+ return n.bold && (t = /* @__PURE__ */ p("strong", { children: t })), n.code && (t = /* @__PURE__ */ p("code", { children: t })), n.italic && (t = /* @__PURE__ */ p("em", { children: t })), n.underline && (t = /* @__PURE__ */ p("u", { children: t })), /* @__PURE__ */ p("span", {
3647
+ ...e,
3648
+ children: t
3649
+ });
3650
+ }
3651
+ //#endregion
3652
+ //#region src/services/isMarkActive.ts
3653
+ function Nr(e, t) {
3654
+ let n = ue.marks(e);
3655
+ return n ? n[t] === !0 : !1;
3656
+ }
3657
+ //#endregion
3658
+ //#region src/services/toggleMark.ts
3659
+ function Pr(e, t) {
3660
+ Nr(e, t) ? ue.removeMark(e, t) : ue.addMark(e, t, !0);
3661
+ }
3662
+ //#endregion
3663
+ //#region src/components/richText/markButton/index.tsx
3664
+ function Fr({ format: e, icon: t }) {
3665
+ let n = ye(), r = Nr(n, e) ? "activeTrue" : "activeFalse";
3666
+ function i(t) {
3667
+ t.preventDefault(), Pr(n, e);
3668
+ }
3669
+ return /* @__PURE__ */ p("button", {
3670
+ type: "button",
3671
+ className: "arkynRichTextMarkButton " + r,
3672
+ onMouseDown: i,
3673
+ children: /* @__PURE__ */ p(t, {})
3674
+ });
3675
+ }
3676
+ //#endregion
3677
+ //#region src/components/richText/toolbar/index.tsx
3678
+ function Ir({ children: e }) {
3679
+ return /* @__PURE__ */ p("div", {
3680
+ className: "arkynRichTextToolbar",
3681
+ children: e
3682
+ });
3683
+ }
3684
+ //#endregion
3685
+ //#region src/services/extractTextFromNode.ts
3686
+ function Lr(e) {
3687
+ return e.map((e) => fe.string(e)).join("");
3688
+ }
3689
+ //#endregion
3690
+ //#region src/components/richText/index.tsx
3691
+ function Rr(e) {
3692
+ let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a, className: o = "", defaultValue: d = "[]", enforceCharacterLimit: f = !1, onChangeCharactersCount: h, baseErrorMessage: x, maxLimit: S = 1e4, onChange: C, isError: w, label: T, showAsterisk: D, id: O, orientation: k = "vertical", unShowFieldTemplate: A = !1 } = e, j = c(() => ge(be(he())), []), { fieldErrors: P } = X();
3693
+ function F() {
3694
+ try {
3695
+ let e = JSON.parse(d);
3696
+ return !Array.isArray(e) || e.length <= 0 ? yr : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : yr;
3697
+ } catch {
3698
+ return yr;
3699
+ }
3700
+ }
3701
+ let [L, R] = u(Lr(F()).length), [z, B] = u(JSON.stringify(F()) || "[]"), [H, U] = u(!1), G = l(null), K = O || s(), q = x || P?.[t], ee = w || !!q, J = i(Mr, []), te = i(wr, []);
3702
+ function ne(e) {
3703
+ let t = Lr(e);
3704
+ R(t.length), h && h(t.length), !(f && t.length >= S) && (B(JSON.stringify(e)), C && C(e), j.children = e, me.setNodes(j, { children: e }));
3705
+ }
3706
+ let re = `arkynRichText ${ee || S < L ? "errorTrue" : "errorFalse"} ${H ? "focusTrue" : "focusFalse"}`, ie = S - L;
3707
+ function Y(e) {
3708
+ return !n?.includes(e);
3709
+ }
3710
+ return /* @__PURE__ */ p(et, {
3711
+ name: t,
3712
+ label: T,
3713
+ showAsterisk: D,
3714
+ className: o,
3715
+ errorMessage: q,
3716
+ unShowFieldTemplate: A,
3717
+ orientation: k,
3718
+ children: /* @__PURE__ */ m(ve, {
3719
+ editor: j,
3720
+ initialValue: F(),
3721
+ onChange: ne,
3722
+ onValueChange: ne,
3723
+ children: [
3724
+ /* @__PURE__ */ m("div", {
3725
+ className: re,
3726
+ children: [
3727
+ /* @__PURE__ */ m(Ir, { children: [
3728
+ Y("headingOne") && /* @__PURE__ */ p(Cr, {
3729
+ format: "headingOne",
3730
+ icon: M
3731
+ }),
3732
+ Y("headingTwo") && /* @__PURE__ */ p(Cr, {
3733
+ format: "headingTwo",
3734
+ icon: N
3735
+ }),
3736
+ Y("blockQuote") && /* @__PURE__ */ p(Cr, {
3737
+ format: "blockQuote",
3738
+ icon: V
3739
+ }),
3740
+ Y("bold") && /* @__PURE__ */ p(Fr, {
3741
+ format: "bold",
3742
+ icon: b
3743
+ }),
3744
+ Y("italic") && /* @__PURE__ */ p(Fr, {
3745
+ format: "italic",
3746
+ icon: I
3747
+ }),
3748
+ Y("underline") && /* @__PURE__ */ p(Fr, {
3749
+ format: "underline",
3750
+ icon: W
3751
+ }),
3752
+ Y("code") && /* @__PURE__ */ p(Fr, {
3753
+ format: "code",
3754
+ icon: E
3755
+ }),
3756
+ Y("left") && /* @__PURE__ */ p(Cr, {
3757
+ format: "left",
3758
+ icon: v
3759
+ }),
3760
+ Y("right") && /* @__PURE__ */ p(Cr, {
3761
+ format: "right",
3762
+ icon: y
3763
+ }),
3764
+ Y("center") && /* @__PURE__ */ p(Cr, {
3765
+ format: "center",
3766
+ icon: g
3767
+ }),
3768
+ Y("justify") && /* @__PURE__ */ p(Cr, {
3769
+ format: "justify",
3770
+ icon: _
3771
+ }),
3772
+ r && Y("image") && /* @__PURE__ */ p(Ar, { ...r }),
3773
+ Y("video") && /* @__PURE__ */ p(jr, { ...a })
3774
+ ] }),
3775
+ /* @__PURE__ */ p(_e, {
3776
+ className: "editorContainer",
3777
+ renderElement: te,
3778
+ renderLeaf: J,
3779
+ spellCheck: !0,
3780
+ ref: G,
3781
+ id: K,
3782
+ onFocus: () => U(!0),
3783
+ onBlur: () => U(!1),
3784
+ onKeyDown: (e) => {
3785
+ for (let t in vr) if (le(t, e)) {
3786
+ e.preventDefault();
3787
+ let n = vr[t];
3788
+ Pr(j, n);
3789
+ }
3790
+ }
3791
+ }),
3792
+ ie < 0 && /* @__PURE__ */ p("div", {
3793
+ className: "restatesCharacters",
3794
+ children: ie
3795
+ })
3796
+ ]
3797
+ }),
3798
+ /* @__PURE__ */ p("input", {
3799
+ type: "hidden",
3800
+ name: t,
3801
+ value: z.slice(0, S)
3802
+ }),
3803
+ /* @__PURE__ */ p("input", {
3804
+ type: "hidden",
3805
+ name: `${t}Count`,
3806
+ value: L
3807
+ })
3808
+ ]
3809
+ })
3810
+ });
3811
+ }
3812
+ //#endregion
3813
+ //#region src/components/searchPlaces.tsx
3814
+ function zr(e) {
3815
+ let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
3816
+ return /* @__PURE__ */ p(xe, {
3817
+ onLoad: (e) => o(e),
3818
+ onPlacesChanged: () => {
3819
+ let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components;
3820
+ function i(e) {
3821
+ let t = r.find((t) => t.types[0] === e);
3822
+ return t ? t.long_name : "";
3823
+ }
3824
+ function o(e) {
3825
+ let t = r.find((t) => t.types[0] === e);
3826
+ return t ? t.short_name : "";
3827
+ }
3828
+ function s(e) {
3829
+ for (let t of e) {
3830
+ let e = r.find((e) => e.types.includes(t));
3831
+ if (e) return e.long_name;
3832
+ }
3833
+ return "";
3834
+ }
3835
+ if (t) {
3836
+ let e = i("route"), r = i("street_number"), a = s([
3837
+ "sublocality_level_1",
3838
+ "sublocality",
3839
+ "neighborhood"
3840
+ ]), c = i("administrative_area_level_2"), l = i("administrative_area_level_1"), u = o("administrative_area_level_1"), d = {
3841
+ street: e,
3842
+ city: c,
3843
+ state: l,
3844
+ neighborhood: a,
3845
+ postalCode: s(["postal_code", "postal_code_prefix"]),
3846
+ streetNumber: r,
3847
+ stateShortName: u,
3848
+ coordinates: {
3849
+ lat: t.geometry?.location?.lat(),
3850
+ lng: t.geometry?.location?.lng()
3851
+ }
3852
+ };
3853
+ n && n(d);
3854
+ }
3855
+ },
3856
+ options: r,
3857
+ children: /* @__PURE__ */ p(st, {
3858
+ type: "text",
3859
+ autoComplete: "off",
3860
+ onChange: (e) => t && t(e.target.value),
3861
+ ...i
3862
+ })
3863
+ });
3864
+ }
3865
+ //#endregion
3866
+ //#region src/components/switch/index.tsx
3867
+ function Br(e) {
3868
+ let { label: t, size: n = "lg", defaultChecked: r = !1, checked: i = null, value: a, unCheckedValue: o = "", name: c, className: d = "", onCheck: f, id: m, orientation: h = "horizontalReverse", className: g = "", showAsterisk: _, errorMessage: v, unShowFieldTemplate: y = !1, ...b } = e, x = l(null), S = m || s(), [C, w] = u(r), T = typeof i == "boolean" ? i : C;
3869
+ function E() {
3870
+ w(!C), f && f(T ? o : a || "checked");
3871
+ }
3872
+ return /* @__PURE__ */ p(et, {
3873
+ name: c,
3874
+ label: t,
3875
+ showAsterisk: _,
3876
+ className: g,
3877
+ errorMessage: v,
3878
+ unShowFieldTemplate: y,
3879
+ orientation: h,
3880
+ children: /* @__PURE__ */ p("button", {
3881
+ type: "button",
3882
+ onClick: E,
3883
+ className: `arkynSwitch ${T ? "checkedTrue" : "checkedFalse"} ${n} ${d}`,
3884
+ ...b,
3885
+ children: /* @__PURE__ */ p("input", {
3886
+ id: S,
3887
+ type: "hidden",
3888
+ name: c,
3889
+ ref: x,
3890
+ onClick: E,
3891
+ value: T ? a || "checked" : o
3892
+ })
3893
+ })
3894
+ });
3895
+ }
3896
+ //#endregion
3897
+ //#region src/components/table/tableBody/index.tsx
3898
+ function Vr(t) {
3899
+ let { emptyMessage: n = "Nenhum dado adicionado.", className: r, children: i, ...a } = t, o = `arkynTableBody ${r}`, s = e.count(i) === 0;
3900
+ return /* @__PURE__ */ p("tbody", {
3901
+ className: o.trim(),
3902
+ ...a,
3903
+ children: s ? /* @__PURE__ */ p("tr", {
3904
+ className: "arkynTableBodyEmptyLine",
3905
+ children: /* @__PURE__ */ p("td", {
3906
+ colSpan: 100,
3907
+ children: /* @__PURE__ */ p("div", { children: n })
3908
+ })
3909
+ }) : i
3910
+ });
3911
+ }
3912
+ //#endregion
3913
+ //#region src/components/table/tableCaption/index.tsx
3914
+ function Hr(e) {
3915
+ let { className: t, children: n, ...r } = e;
3916
+ return /* @__PURE__ */ p("caption", {
3917
+ className: `arkynTableCaption ${t}`.trim(),
3918
+ ...r,
3919
+ children: /* @__PURE__ */ p("div", {
3920
+ className: "arkynTableCaptionContent",
3921
+ children: n
3922
+ })
3923
+ });
3924
+ }
3925
+ //#endregion
3926
+ //#region src/components/table/tableContainer/index.tsx
3927
+ function Ur(e) {
3928
+ let { children: t, className: n, ...r } = e;
3929
+ return /* @__PURE__ */ p("div", {
3930
+ className: `arkynTableContainer ${n}`.trim(),
3931
+ ...r,
3932
+ children: /* @__PURE__ */ p("table", { children: t })
3933
+ });
3934
+ }
3935
+ //#endregion
3936
+ //#region src/components/table/tableFooter/index.tsx
3937
+ function Wr(e) {
3938
+ let { className: t, children: n, ...r } = e;
3939
+ return /* @__PURE__ */ m("tfoot", {
3940
+ className: `arkynTableFooter ${t}`.trim(),
3941
+ ...r,
3942
+ children: [/* @__PURE__ */ p("tr", { className: "spacingRow" }), /* @__PURE__ */ p("tr", { children: /* @__PURE__ */ p("th", {
3943
+ colSpan: 100,
3944
+ children: /* @__PURE__ */ p("div", {
3945
+ className: "arkynTableFooterContent",
3946
+ children: n
3947
+ })
3948
+ }) })]
3949
+ });
3950
+ }
3951
+ //#endregion
3952
+ //#region src/components/table/tableHeader/index.tsx
3953
+ function Gr(e) {
3954
+ let { className: t, children: n, ...r } = e;
3955
+ return /* @__PURE__ */ m("thead", {
3956
+ className: `arkynTableHeader ${t}`.trim(),
3957
+ ...r,
3958
+ children: [/* @__PURE__ */ p("tr", { children: n }), /* @__PURE__ */ p("tr", { className: "spacingRow" })]
3959
+ });
3960
+ }
3961
+ //#endregion
3962
+ //#region src/components/textarea/index.tsx
3963
+ function Kr(e) {
3964
+ let { variant: t = "solid", size: n = "md", className: r, errorMessage: i, disabled: a = !1, readOnly: o = !1, label: c, showAsterisk: d, name: f, onFocus: h, onBlur: g, title: _, style: v, value: y, defaultValue: b, placeholder: x, id: S, ...C } = e, { fieldErrors: w } = X(), [T, E] = u(!1), D = l(null), O = S || s(), k = i || w?.[f], A = `arkynTextarea ${t} ${n} ${a || o ? "opacityTrue" : "opacityFalse"} ${k ? "errorTrue" : "errorFalse"} ${T ? "focusedTrue" : "focusedFalse"}`;
3965
+ function j() {
3966
+ a || !D?.current || (E(!0), D.current.focus());
3967
+ }
3968
+ function M(e) {
3969
+ E(!0), h && h(e);
3970
+ }
3971
+ function N(e) {
3972
+ E(!1), g && g(e);
3973
+ }
3974
+ return /* @__PURE__ */ m(Ve, {
3975
+ className: r,
3976
+ children: [
3977
+ c && /* @__PURE__ */ p(Be, {
3978
+ htmlFor: O,
3979
+ showAsterisk: d,
3980
+ children: c
3981
+ }),
3982
+ /* @__PURE__ */ p("section", {
3983
+ title: _,
3984
+ style: v,
3985
+ onClick: j,
3986
+ className: A,
3987
+ children: /* @__PURE__ */ p("textarea", {
3988
+ id: O,
3989
+ disabled: a,
3990
+ readOnly: o,
3991
+ ref: D,
3992
+ name: f,
3993
+ onFocus: M,
3994
+ onBlur: N,
3995
+ defaultValue: b || "",
3996
+ placeholder: a && y || x,
3997
+ value: a ? void 0 : y,
3998
+ ...C
3999
+ })
4000
+ }),
4001
+ k && /* @__PURE__ */ p(ze, { children: k })
4002
+ ]
4003
+ });
4004
+ }
4005
+ //#endregion
4006
+ //#region src/providers/modalProvider.tsx
4007
+ var qr = n({});
4008
+ function Jr(e) {
4009
+ let { children: t = !1 } = e, [n, r] = u([]);
4010
+ function i(e) {
4011
+ return !!n.some((t) => t.key === e);
4012
+ }
4013
+ function a(e) {
4014
+ return n.find((t) => t.key === e)?.data;
4015
+ }
4016
+ function o(e, t) {
4017
+ i(e) ? r((n) => [...n.filter((t) => t.key !== e), {
4018
+ key: e,
4019
+ data: t
4020
+ }]) : r([...n, {
4021
+ key: e,
4022
+ data: t
4023
+ }]);
4024
+ }
4025
+ function s(e) {
4026
+ r(n.filter((t) => t.key !== e));
4027
+ }
4028
+ function c() {
4029
+ r([]);
4030
+ }
4031
+ return /* @__PURE__ */ p(qr.Provider, {
4032
+ value: {
4033
+ modalIsOpen: i,
4034
+ modalData: a,
4035
+ openModal: o,
4036
+ closeModal: s,
4037
+ closeAll: c
4038
+ },
4039
+ children: t
4040
+ });
4041
+ }
4042
+ //#endregion
4043
+ //#region src/hooks/useModal.ts
4044
+ function Yr(e) {
4045
+ let t = a(qr);
4046
+ if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
4047
+ if (e) {
4048
+ let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
4049
+ return {
4050
+ modalIsOpen: r(e),
4051
+ modalData: n(e),
4052
+ openModal: (t) => i(e, t),
4053
+ closeModal: () => a(e)
4054
+ };
4055
+ } else return t;
4056
+ }
4057
+ //#endregion
4058
+ //#region src/providers/toastProvider.tsx
4059
+ var Xr = n({});
4060
+ function Zr({ children: e }) {
4061
+ function t(e) {
4062
+ switch (e.type) {
4063
+ case "success": return we.success(e.message, {
4064
+ style: {
4065
+ background: "#10B981",
4066
+ color: "#ffffff",
4067
+ padding: "12px 16px",
4068
+ fontSize: "14px",
4069
+ fontWeight: 600
4070
+ },
4071
+ iconTheme: {
4072
+ primary: "#059669",
4073
+ secondary: "#ffffff"
4074
+ }
4075
+ });
4076
+ case "danger": return we.error(e.message, {
4077
+ style: {
4078
+ background: "#E11D48",
4079
+ color: "#ffffff",
4080
+ padding: "12px 16px",
4081
+ fontSize: "14px",
4082
+ fontWeight: 600
4083
+ },
4084
+ iconTheme: {
4085
+ primary: "#BE123C",
4086
+ secondary: "#ffffff"
4087
+ }
4088
+ });
4089
+ }
4090
+ }
4091
+ return /* @__PURE__ */ m(Xr.Provider, {
4092
+ value: { showToast: t },
4093
+ children: [/* @__PURE__ */ p(Te, {
4094
+ position: "top-right",
4095
+ containerStyle: { zIndex: 999999999999999 }
4096
+ }), e]
4097
+ });
4098
+ }
4099
+ //#endregion
4100
+ //#region src/hooks/useToast.ts
4101
+ function Qr() {
4102
+ let e = a(Xr);
4103
+ if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
4104
+ return e;
4105
+ }
4106
+ //#endregion
4107
+ //#region src/templates/badResponses.ts
4108
+ var $r = [
4109
+ "BadGateway",
4110
+ "BadRequest",
4111
+ "Conflict",
4112
+ "Forbidden",
4113
+ "NotFound",
4114
+ "NotImplemented",
4115
+ "ServerError",
4116
+ "Unauthorized",
4117
+ "UnprocessableEntity"
4118
+ ], ei = [
4119
+ "Created",
4120
+ "Found",
4121
+ "Success",
4122
+ "Updated"
4123
+ ];
4124
+ //#endregion
4125
+ //#region src/hooks/useAutomation.ts
4126
+ function ti(e) {
4127
+ let { closeAll: t } = Yr(), { showToast: n } = Qr(), r = e?.closeModal, i = e?.message, a = e?.name, s = e?.cause?.data?.scrollTo, c = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null;
4128
+ function l() {
4129
+ if (!(!i && !c)) {
4130
+ if (ei.includes(a)) return n({
4131
+ message: i,
4132
+ type: "success"
4133
+ });
4134
+ if ($r.includes(a)) {
4135
+ if (c) return n({
4136
+ message: c,
4137
+ type: "danger"
4138
+ });
4139
+ if (i !== "Unprocessable entity") return n({
4140
+ message: i,
4141
+ type: "danger"
4142
+ });
4143
+ }
4144
+ }
4145
+ }
4146
+ o(() => {
4147
+ r && t(), s && Ce.scrollTo(s, {
4148
+ smooth: !0,
4149
+ offset: 20
4150
+ }), l();
4151
+ }, [e]);
4152
+ }
4153
+ //#endregion
4154
+ //#region src/providers/drawerProvider.tsx
4155
+ var ni = n({});
4156
+ function ri(e) {
4157
+ let { children: t = !1 } = e, [n, r] = u([]);
4158
+ function i(e) {
4159
+ return !!n.some((t) => t.key === e);
4160
+ }
4161
+ function a(e) {
4162
+ return n.find((t) => t.key === e)?.data;
4163
+ }
4164
+ function o(e, t) {
4165
+ i(e) ? r((n) => [...n.filter((t) => t.key !== e), {
4166
+ key: e,
4167
+ data: t
4168
+ }]) : r([...n, {
4169
+ key: e,
4170
+ data: t
4171
+ }]);
4172
+ }
4173
+ function s(e) {
4174
+ r(n.filter((t) => t.key !== e));
4175
+ }
4176
+ return /* @__PURE__ */ p(ni.Provider, {
4177
+ value: {
4178
+ drawerIsOpen: i,
4179
+ drawerData: a,
4180
+ openDrawer: o,
4181
+ closeDrawer: s
4182
+ },
4183
+ children: t
4184
+ });
4185
+ }
4186
+ //#endregion
4187
+ //#region src/hooks/useDrawer.ts
4188
+ function ii(e) {
4189
+ let t = a(ni);
4190
+ if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
4191
+ if (e) {
4192
+ let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
4193
+ return {
4194
+ drawerIsOpen: r(e),
4195
+ drawerData: n(e),
4196
+ openDrawer: (t) => i(e, t),
4197
+ closeDrawer: () => a(e)
4198
+ };
4199
+ } else return t;
4200
+ }
4201
+ //#endregion
4202
+ //#region src/hooks/useScopedParams.ts
4203
+ function ai(e, t = "") {
4204
+ let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
4205
+ Object.entries(e).forEach(([e, t]) => {
4206
+ t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
4207
+ });
4208
+ };
4209
+ return {
4210
+ getParam: (e) => n.get(`${r}${e}`),
4211
+ getScopedSearch: (e) => {
4212
+ i(e);
4213
+ let t = n.toString();
4214
+ return t &&= "?" + t, t;
4215
+ }
4216
+ };
4217
+ }
4218
+ //#endregion
4219
+ //#region src/hooks/useSearchAutomation.ts
4220
+ function oi(e, t = "") {
4221
+ let { closeAll: n } = Yr(), { showToast: r } = Qr(), { getParam: i } = ai(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
4222
+ o(() => {
4223
+ a && n(), s && (l === "success" && r({
4224
+ message: s,
4225
+ type: "success"
4226
+ }), l === "danger" && r({
4227
+ message: s,
4228
+ type: "danger"
4229
+ }), c && $r.includes(c) && !$r.includes(s) && r({
4230
+ message: s,
4231
+ type: "danger"
4232
+ }), c && ei.includes(c) && !ei.includes(s) && r({
4233
+ message: s,
4234
+ type: "success"
4235
+ }));
4236
+ }, [
4237
+ a,
4238
+ s,
4239
+ c,
4240
+ l
4241
+ ]);
4242
+ }
4243
+ //#endregion
4244
+ //#region src/providers/placesProvider.tsx
4245
+ var si = [
4246
+ "places",
4247
+ "marker",
4248
+ "maps"
4249
+ ];
4250
+ function ci(e) {
4251
+ let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = Se({
4252
+ googleMapsApiKey: t,
4253
+ libraries: si,
4254
+ preventGoogleFontsLoading: r
4255
+ });
4256
+ return /* @__PURE__ */ p(f, { children: n(i) });
4257
+ }
4258
+ //#endregion
4259
+ //#region src/utils/richTextUtilities.ts
4260
+ function li(e) {
4261
+ if (pe.isText(e)) {
4262
+ let t = e?.text;
4263
+ return e?.bold && (t = `<strong>${t}</strong>`), e?.code && (t = `<code>${t}</code>`), e?.italic && (t = `<em>${t}</em>`), e?.underline && (t = `<u>${t}</u>`), t;
4264
+ }
4265
+ if (de.isElement(e)) {
4266
+ let t = e.children?.map((e) => li(e)).join(""), n = e.align || "left";
4267
+ switch (e.type) {
4268
+ case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
4269
+ case "image": return `<img src="${e.src}" class="align_${n}" />`;
4270
+ case "paragraph": return `<p class="align_${n}">${t}</p>`;
4271
+ case "blockQuote": return `<blockquote class="align_${n}">${t}</blockquote>`;
4272
+ case "bulletedList": return `<ul class="align_${n}">${t}</ul>`;
4273
+ case "headingOne": return `<h1 class="align_${n}">${t}</h1>`;
4274
+ case "headingTwo": return `<h2 class="align_${n}">${t}</h2>`;
4275
+ case "listItem": return `<li class="align_${n}">${t}</li>`;
4276
+ case "numberedList": return `<ol class="align_${n}">${t}</ol>`;
4277
+ default: return "";
4278
+ }
4279
+ }
4280
+ return "";
4281
+ }
4282
+ function ui(e) {
4283
+ if (typeof e == "string") return { text: e };
4284
+ let t = Array.isArray(e.props.children) ? e.props.children.map((e) => ui(e)) : [{ text: e.props.children || "" }], n = e.props.className?.replace("align_", "");
4285
+ switch (e.type) {
4286
+ case "img": return {
4287
+ type: "image",
4288
+ align: n,
4289
+ src: e.props.src,
4290
+ children: [{ text: "" }]
4291
+ };
4292
+ case "p": return {
4293
+ type: "paragraph",
4294
+ align: n,
4295
+ children: t
4296
+ };
4297
+ case "blockquote": return {
4298
+ type: "blockQuote",
4299
+ align: n,
4300
+ children: t
4301
+ };
4302
+ case "ul": return {
4303
+ type: "bulletedList",
4304
+ align: n,
4305
+ children: t
4306
+ };
4307
+ case "ol": return {
4308
+ type: "numberedList",
4309
+ align: n,
4310
+ children: t
4311
+ };
4312
+ case "li": return {
4313
+ type: "listItem",
4314
+ align: n,
4315
+ children: t
4316
+ };
4317
+ case "h1": return {
4318
+ type: "headingOne",
4319
+ align: n,
4320
+ children: t
4321
+ };
4322
+ case "h2": return {
4323
+ type: "headingTwo",
4324
+ align: n,
4325
+ children: t
4326
+ };
4327
+ case "strong": return {
4328
+ text: e.props.children,
4329
+ bold: !0
4330
+ };
4331
+ case "code": return {
4332
+ text: e.props.children,
4333
+ code: !0
4334
+ };
4335
+ case "em": return {
4336
+ text: e.props.children,
4337
+ italic: !0
4338
+ };
4339
+ case "u": return {
4340
+ text: e.props.children,
4341
+ underline: !0
4342
+ };
4343
+ default: return { text: e.props.children || "" };
4344
+ }
4345
+ }
4346
+ //#endregion
4347
+ //#region src/services/toHtml.ts
4348
+ function di(e) {
4349
+ return e.map((e) => li(e)).join("");
4350
+ }
4351
+ //#endregion
4352
+ //#region src/services/toRichTextValue.ts
4353
+ function fi(e) {
4354
+ let t = Ee(e);
4355
+ return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : ui(e)) : typeof t == "string" ? [{ text: t }] : [ui(t)];
4356
+ }
4357
+ //#endregion
4358
+ export { Ae as AlertContainer, je as AlertContent, Me as AlertDescription, Ne as AlertIcon, De as AlertTitle, Ie as AudioPlayer, qe as AudioUpload, Je as Badge, Q as Button, _t as Calendar, xt as CardTabButton, St as CardTabContainer, Ct as Checkbox, Et as ClientOnly, kt as CurrencyInput, He as Divider, Nt as DrawerContainer, Pt as DrawerHeader, ri as DrawerProvider, Lt as FacebookPixel, ze as FieldError, Be as FieldLabel, Ve as FieldWrapper, Bt as FileUpload, Re as FormProvider, pn as FullCalendar, _n as GoogleAnalytics, Sn as GoogleTagManager, Ue as IconButton, Tn as ImageUpload, st as Input, On as MapView, An as MaskedInput, Pn as ModalContainer, Fn as ModalFooter, In as ModalHeader, Jr as ModalProvider, Gn as MultiSelect, Zn as Pagination, ur as PhoneInput, ci as PlacesProvider, dr as Popover, hr as RadioBox, gr as RadioGroup, Rr as RichText, zr as SearchPlaces, dt as Select, Fe as Slider, Br as Switch, Or as TabButton, kr as TabContainer, Vr as TableBody, Hr as TableCaption, Ur as TableContainer, Wr as TableFooter, Gr as TableHeader, Kr as Textarea, Zr as ToastProvider, We as Tooltip, di as toHtml, fi as toRichTextValue, ti as useAutomation, ii as useDrawer, X as useForm, Tt as useHydrated, Yr as useModal, ai as useScopedParams, ot as useScrollLock, oi as useSearchAutomation, Pe as useSlider, Qr as useToast };