codeforlife 2.8.2 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/dist/Countdown-DFI1RljW.js +28 -0
  2. package/dist/Countdown-DFI1RljW.js.map +1 -0
  3. package/dist/Countdown-zY3nMzmi.cjs +2 -0
  4. package/dist/Countdown-zY3nMzmi.cjs.map +1 -0
  5. package/dist/Image-D5jC9UoX.js +21 -0
  6. package/dist/Image-D5jC9UoX.js.map +1 -0
  7. package/dist/Image-mgT45r_B.cjs +2 -0
  8. package/dist/Image-mgT45r_B.cjs.map +1 -0
  9. package/dist/LinkButton-BYFkvL_O.cjs +2 -0
  10. package/dist/LinkButton-BYFkvL_O.cjs.map +1 -0
  11. package/dist/LinkButton-oK0RThqn.js +12 -0
  12. package/dist/LinkButton-oK0RThqn.js.map +1 -0
  13. package/dist/Navigate-Dq47aqC8.js +25 -0
  14. package/dist/Navigate-Dq47aqC8.js.map +1 -0
  15. package/dist/Navigate-dQocLhzN.cjs +2 -0
  16. package/dist/Navigate-dQocLhzN.cjs.map +1 -0
  17. package/dist/api/endpoints/index.cjs.js +2 -0
  18. package/dist/api/endpoints/index.cjs.js.map +1 -0
  19. package/dist/api/endpoints/index.d.ts +81 -0
  20. package/dist/api/endpoints/index.es.js +78 -0
  21. package/dist/api/endpoints/index.es.js.map +1 -0
  22. package/dist/api/index.cjs.js +4 -0
  23. package/dist/api/index.cjs.js.map +1 -0
  24. package/dist/api/index.d.ts +77 -0
  25. package/dist/api/index.es.js +541 -0
  26. package/dist/api/index.es.js.map +1 -0
  27. package/dist/api-Cbyt3rw0.js +92 -0
  28. package/dist/api-Cbyt3rw0.js.map +1 -0
  29. package/dist/api-CnMfjRk3.cjs +2 -0
  30. package/dist/api-CnMfjRk3.cjs.map +1 -0
  31. package/dist/api-Cs4Y-WeI.js +20 -0
  32. package/dist/api-Cs4Y-WeI.js.map +1 -0
  33. package/dist/api-DIgp_6Vr.cjs +2 -0
  34. package/dist/api-DIgp_6Vr.cjs.map +1 -0
  35. package/dist/api.d.ts +123 -0
  36. package/dist/auth-BPfUPjmM.js +237 -0
  37. package/dist/auth-BPfUPjmM.js.map +1 -0
  38. package/dist/auth-Vf1MgMci.cjs +2 -0
  39. package/dist/auth-Vf1MgMci.cjs.map +1 -0
  40. package/dist/auth.d.ts +40 -0
  41. package/dist/components/form/index.cjs.js +2 -0
  42. package/dist/components/form/index.cjs.js.map +1 -0
  43. package/dist/components/form/index.d.ts +86 -0
  44. package/dist/components/form/index.es.js +18 -0
  45. package/dist/components/form/index.es.js.map +1 -0
  46. package/dist/components/index.cjs.js +11 -0
  47. package/dist/components/index.cjs.js.map +1 -0
  48. package/dist/components/index.d.ts +90 -0
  49. package/dist/components/index.es.js +383 -0
  50. package/dist/components/index.es.js.map +1 -0
  51. package/dist/components/page/index.cjs.js +2 -0
  52. package/dist/components/page/index.cjs.js.map +1 -0
  53. package/dist/components/page/index.d.ts +77 -0
  54. package/dist/components/page/index.es.js +9 -0
  55. package/dist/components/page/index.es.js.map +1 -0
  56. package/dist/components/router/index.cjs.js +2 -0
  57. package/dist/components/router/index.cjs.js.map +1 -0
  58. package/dist/components/router/index.d.ts +78 -0
  59. package/dist/components/router/index.es.js +11 -0
  60. package/dist/components/router/index.es.js.map +1 -0
  61. package/dist/components/table/index.cjs.js +2 -0
  62. package/dist/components/table/index.cjs.js.map +1 -0
  63. package/dist/components/table/index.d.ts +75 -0
  64. package/dist/components/table/index.es.js +9 -0
  65. package/dist/components/table/index.es.js.map +1 -0
  66. package/dist/en-gb-B_rK7Jx1.js +20 -0
  67. package/dist/en-gb-B_rK7Jx1.js.map +1 -0
  68. package/dist/en-gb-CpyEkKq3.cjs +2 -0
  69. package/dist/en-gb-CpyEkKq3.cjs.map +1 -0
  70. package/dist/features/index.cjs.js +2 -0
  71. package/dist/features/index.cjs.js.map +1 -0
  72. package/dist/features/index.d.ts +76 -0
  73. package/dist/features/index.es.js +47 -0
  74. package/dist/features/index.es.js.map +1 -0
  75. package/dist/form.d.ts +40 -0
  76. package/dist/general-BPbbmkeX.cjs +2 -0
  77. package/dist/general-BPbbmkeX.cjs.map +1 -0
  78. package/dist/general-CtTJPCJn.js +58 -0
  79. package/dist/general-CtTJPCJn.js.map +1 -0
  80. package/dist/general.d.ts +53 -0
  81. package/dist/hooks/index.cjs.js +2 -0
  82. package/dist/hooks/index.cjs.js.map +1 -0
  83. package/dist/hooks/index.d.ts +77 -0
  84. package/dist/hooks/index.es.js +25 -0
  85. package/dist/hooks/index.es.js.map +1 -0
  86. package/dist/index-2W--_sNE.js +30 -0
  87. package/dist/index-2W--_sNE.js.map +1 -0
  88. package/dist/index-BUMdUVBH.cjs +5 -0
  89. package/dist/index-BUMdUVBH.cjs.map +1 -0
  90. package/dist/index-B_Zy_zwA.cjs +2 -0
  91. package/dist/index-B_Zy_zwA.cjs.map +1 -0
  92. package/dist/index-BgsynEGX.cjs +2 -0
  93. package/dist/index-BgsynEGX.cjs.map +1 -0
  94. package/dist/index-CA-ugBSa.cjs +2 -0
  95. package/dist/index-CA-ugBSa.cjs.map +1 -0
  96. package/dist/index-CNtOlJ49.js +572 -0
  97. package/dist/index-CNtOlJ49.js.map +1 -0
  98. package/dist/index-DkM_cG3a.js +237 -0
  99. package/dist/index-DkM_cG3a.js.map +1 -0
  100. package/dist/index-Dqp7dpn3.js +1111 -0
  101. package/dist/index-Dqp7dpn3.js.map +1 -0
  102. package/dist/index.cjs.js +2 -0
  103. package/dist/index.cjs.js.map +1 -0
  104. package/dist/index.d.ts +78 -0
  105. package/dist/index.es.js +7 -0
  106. package/dist/index.es.js.map +1 -0
  107. package/dist/jsx-runtime-CeSfJrVB.cjs +31 -0
  108. package/dist/jsx-runtime-CeSfJrVB.cjs.map +1 -0
  109. package/dist/jsx-runtime-Dpn_P65e.js +634 -0
  110. package/dist/jsx-runtime-Dpn_P65e.js.map +1 -0
  111. package/dist/middlewares/index.cjs.js +2 -0
  112. package/dist/middlewares/index.cjs.js.map +1 -0
  113. package/dist/middlewares/index.d.ts +73 -0
  114. package/dist/middlewares/index.es.js +10 -0
  115. package/dist/middlewares/index.es.js.map +1 -0
  116. package/dist/palette-CE2mKYse.cjs +2 -0
  117. package/dist/palette-CE2mKYse.cjs.map +1 -0
  118. package/dist/palette-C_L0akN_.js +43 -0
  119. package/dist/palette-C_L0akN_.js.map +1 -0
  120. package/dist/router.d.ts +48 -0
  121. package/dist/rtk-query.modern-CjetfYPg.js +3038 -0
  122. package/dist/rtk-query.modern-CjetfYPg.js.map +1 -0
  123. package/dist/rtk-query.modern-PBCErCqb.cjs +15 -0
  124. package/dist/rtk-query.modern-PBCErCqb.cjs.map +1 -0
  125. package/dist/schema.d.ts +89 -0
  126. package/dist/schemas-BZbJpkD5.cjs +2 -0
  127. package/dist/schemas-BZbJpkD5.cjs.map +1 -0
  128. package/dist/schemas-DlOtf2vf.js +162 -0
  129. package/dist/schemas-DlOtf2vf.js.map +1 -0
  130. package/dist/server.cjs.js +6 -0
  131. package/dist/server.cjs.js.map +1 -0
  132. package/dist/server.d.ts +129 -0
  133. package/dist/server.es.js +127 -0
  134. package/dist/server.es.js.map +1 -0
  135. package/dist/session-CE2U7oL1.cjs +2 -0
  136. package/dist/session-CE2U7oL1.cjs.map +1 -0
  137. package/dist/session-CacrgFSv.cjs +2 -0
  138. package/dist/session-CacrgFSv.cjs.map +1 -0
  139. package/dist/session-D312kYKk.js +32 -0
  140. package/dist/session-D312kYKk.js.map +1 -0
  141. package/dist/session-oI-Ht2C8.js +30 -0
  142. package/dist/session-oI-Ht2C8.js.map +1 -0
  143. package/dist/settings/index.cjs.js +2 -0
  144. package/dist/settings/index.cjs.js.map +1 -0
  145. package/dist/settings/index.d.ts +76 -0
  146. package/dist/settings/index.es.js +17 -0
  147. package/dist/settings/index.es.js.map +1 -0
  148. package/dist/slices/index.cjs.js +2 -0
  149. package/dist/slices/index.cjs.js.map +1 -0
  150. package/dist/slices/index.d.ts +74 -0
  151. package/dist/slices/index.es.js +6 -0
  152. package/dist/slices/index.es.js.map +1 -0
  153. package/dist/store.d.ts +17 -0
  154. package/dist/style.css +1 -0
  155. package/dist/test.d.ts +75 -0
  156. package/dist/theme/components/index.cjs.js +2 -0
  157. package/dist/theme/components/index.cjs.js.map +1 -0
  158. package/dist/theme/components/index.d.ts +75 -0
  159. package/dist/theme/components/index.es.js +6 -0
  160. package/dist/theme/components/index.es.js.map +1 -0
  161. package/dist/theme/index.cjs.js +2 -0
  162. package/dist/theme/index.cjs.js.map +1 -0
  163. package/dist/theme/index.d.ts +79 -0
  164. package/dist/theme/index.es.js +222 -0
  165. package/dist/theme/index.es.js.map +1 -0
  166. package/dist/theme.d.ts +19 -0
  167. package/dist/urls-DtHr1d3H.js +14 -0
  168. package/dist/urls-DtHr1d3H.js.map +1 -0
  169. package/dist/urls-MaVXL_C2.cjs +2 -0
  170. package/dist/urls-MaVXL_C2.cjs.map +1 -0
  171. package/dist/utils/api.cjs.js +2 -0
  172. package/dist/utils/api.cjs.js.map +1 -0
  173. package/dist/utils/api.d.ts +144 -0
  174. package/dist/utils/api.es.js +16 -0
  175. package/dist/utils/api.es.js.map +1 -0
  176. package/dist/utils/auth.cjs.js +2 -0
  177. package/dist/utils/auth.cjs.js.map +1 -0
  178. package/dist/utils/auth.d.ts +100 -0
  179. package/dist/utils/auth.es.js +117 -0
  180. package/dist/utils/auth.es.js.map +1 -0
  181. package/dist/utils/form.cjs.js +2 -0
  182. package/dist/utils/form.cjs.js.map +1 -0
  183. package/dist/utils/form.d.ts +97 -0
  184. package/dist/utils/form.es.js +76 -0
  185. package/dist/utils/form.es.js.map +1 -0
  186. package/dist/utils/general.cjs.js +2 -0
  187. package/dist/utils/general.cjs.js.map +1 -0
  188. package/dist/utils/general.d.ts +102 -0
  189. package/{src/utils/general.ts → dist/utils/general.es.js} +87 -165
  190. package/dist/utils/general.es.js.map +1 -0
  191. package/dist/utils/router.cjs.js +2 -0
  192. package/dist/utils/router.cjs.js.map +1 -0
  193. package/dist/utils/router.d.ts +91 -0
  194. package/dist/utils/router.es.js +33 -0
  195. package/dist/utils/router.es.js.map +1 -0
  196. package/dist/utils/schema.cjs.js +2 -0
  197. package/dist/utils/schema.cjs.js.map +1 -0
  198. package/dist/utils/schema.d.ts +115 -0
  199. package/dist/utils/schema.es.js +123 -0
  200. package/dist/utils/schema.es.js.map +1 -0
  201. package/dist/utils/store.cjs.js +2 -0
  202. package/dist/utils/store.cjs.js.map +1 -0
  203. package/dist/utils/store.d.ts +82 -0
  204. package/dist/utils/store.es.js +20 -0
  205. package/dist/utils/store.es.js.map +1 -0
  206. package/dist/utils/test.cjs.js +2 -0
  207. package/dist/utils/test.cjs.js.map +1 -0
  208. package/dist/utils/test.d.ts +125 -0
  209. package/dist/utils/test.es.js +60 -0
  210. package/dist/utils/test.es.js.map +1 -0
  211. package/dist/utils/theme.cjs.js +2 -0
  212. package/dist/utils/theme.cjs.js.map +1 -0
  213. package/dist/utils/theme.d.ts +83 -0
  214. package/dist/utils/theme.es.js +12 -0
  215. package/dist/utils/theme.es.js.map +1 -0
  216. package/dist/utils/window.cjs.js +2 -0
  217. package/dist/utils/window.cjs.js.map +1 -0
  218. package/dist/utils/window.d.ts +74 -0
  219. package/dist/utils/window.es.js +11 -0
  220. package/dist/utils/window.es.js.map +1 -0
  221. package/dist/window.d.ts +5 -0
  222. package/package.json +142 -37
  223. package/.github/workflows/main.yml +0 -55
  224. package/.prettierignore +0 -1
  225. package/CHANGELOG.md +0 -2020
  226. package/CONTRIBUTING.md +0 -3
  227. package/eslint.config.js +0 -17
  228. package/src/api/createApi.ts +0 -91
  229. package/src/api/endpoints/authFactor.ts +0 -31
  230. package/src/api/endpoints/index.ts +0 -9
  231. package/src/api/endpoints/klass.ts +0 -87
  232. package/src/api/endpoints/school.ts +0 -34
  233. package/src/api/endpoints/session.ts +0 -47
  234. package/src/api/endpoints/user.ts +0 -70
  235. package/src/api/index.ts +0 -5
  236. package/src/api/models.ts +0 -145
  237. package/src/api/schemas.ts +0 -243
  238. package/src/api/tagTypes.ts +0 -12
  239. package/src/api/urls.ts +0 -13
  240. package/src/components/App.css +0 -38
  241. package/src/components/App.tsx +0 -152
  242. package/src/components/ClickableTooltip.tsx +0 -43
  243. package/src/components/CopyIconButton.test.tsx +0 -16
  244. package/src/components/CopyIconButton.tsx +0 -27
  245. package/src/components/Countdown.tsx +0 -42
  246. package/src/components/DownloadFileButton.tsx +0 -55
  247. package/src/components/ElevatedAppBar.tsx +0 -41
  248. package/src/components/Image.tsx +0 -41
  249. package/src/components/InputFileButton.tsx +0 -27
  250. package/src/components/ItemizedList.tsx +0 -61
  251. package/src/components/OrderedGrid.tsx +0 -92
  252. package/src/components/ScrollIntoViewLink.tsx +0 -22
  253. package/src/components/SyncError.tsx +0 -14
  254. package/src/components/TablePagination.tsx +0 -142
  255. package/src/components/YouTubeVideo.tsx +0 -26
  256. package/src/components/form/ApiAutocompleteField.tsx +0 -187
  257. package/src/components/form/AutocompleteField.tsx +0 -135
  258. package/src/components/form/CheckboxField.tsx +0 -86
  259. package/src/components/form/CountryField.tsx +0 -75
  260. package/src/components/form/DatePickerField.tsx +0 -126
  261. package/src/components/form/EmailField.tsx +0 -38
  262. package/src/components/form/FirstNameField.tsx +0 -40
  263. package/src/components/form/Form.tsx +0 -165
  264. package/src/components/form/OtpField.tsx +0 -28
  265. package/src/components/form/PasswordField.tsx +0 -71
  266. package/src/components/form/RepeatField.tsx +0 -123
  267. package/src/components/form/SubmitButton.tsx +0 -57
  268. package/src/components/form/TextField.tsx +0 -150
  269. package/src/components/form/UkCountyField.tsx +0 -68
  270. package/src/components/form/index.tsx +0 -35
  271. package/src/components/index.ts +0 -28
  272. package/src/components/page/Banner.tsx +0 -95
  273. package/src/components/page/Notification.tsx +0 -71
  274. package/src/components/page/Page.tsx +0 -73
  275. package/src/components/page/Section.tsx +0 -21
  276. package/src/components/page/TabBar.tsx +0 -131
  277. package/src/components/page/index.ts +0 -10
  278. package/src/components/router/Link.tsx +0 -23
  279. package/src/components/router/LinkButton.tsx +0 -22
  280. package/src/components/router/LinkIconButton.tsx +0 -22
  281. package/src/components/router/LinkListItem.tsx +0 -22
  282. package/src/components/router/LinkTab.tsx +0 -22
  283. package/src/components/router/Navigate.tsx +0 -33
  284. package/src/components/router/index.tsx +0 -9
  285. package/src/components/table/CellStack.tsx +0 -19
  286. package/src/components/table/Table.tsx +0 -55
  287. package/src/components/table/index.tsx +0 -8
  288. package/src/features/InactiveDialog.tsx +0 -40
  289. package/src/features/ScreenTimeDialog.tsx +0 -30
  290. package/src/features/index.ts +0 -4
  291. package/src/fonts/ttf/Inter-VariableFont_slnt,wght.ttf +0 -0
  292. package/src/fonts/ttf/SpaceGrotesk-VariableFont_wght.ttf +0 -0
  293. package/src/hooks/api.tsx +0 -39
  294. package/src/hooks/auth.tsx +0 -397
  295. package/src/hooks/form.tsx +0 -11
  296. package/src/hooks/general.tsx +0 -110
  297. package/src/hooks/index.ts +0 -5
  298. package/src/hooks/router.tsx +0 -168
  299. package/src/images/svg/brain.svg +0 -1
  300. package/src/index.ts +0 -2
  301. package/src/middlewares/index.ts +0 -1
  302. package/src/middlewares/session.ts +0 -21
  303. package/src/scripts/freshDesk.js +0 -473
  304. package/src/scripts/index.ts +0 -1
  305. package/src/server.js +0 -187
  306. package/src/settings/custom.ts +0 -22
  307. package/src/settings/index.ts +0 -7
  308. package/src/settings/vite.ts +0 -26
  309. package/src/setupTests.ts +0 -2
  310. package/src/slices/createSlice.ts +0 -8
  311. package/src/slices/index.ts +0 -2
  312. package/src/slices/session.ts +0 -32
  313. package/src/theme/ThemedBox.tsx +0 -265
  314. package/src/theme/colors.ts +0 -57
  315. package/src/theme/components/MuiAccordion.tsx +0 -13
  316. package/src/theme/components/MuiAutocomplete.tsx +0 -11
  317. package/src/theme/components/MuiButton.ts +0 -70
  318. package/src/theme/components/MuiCardActions.tsx +0 -12
  319. package/src/theme/components/MuiCheckbox.ts +0 -12
  320. package/src/theme/components/MuiContainer.ts +0 -19
  321. package/src/theme/components/MuiDialog.tsx +0 -16
  322. package/src/theme/components/MuiFormControlLabel.ts +0 -18
  323. package/src/theme/components/MuiFormHelperText.ts +0 -12
  324. package/src/theme/components/MuiGrid2.ts +0 -16
  325. package/src/theme/components/MuiInputBase.ts +0 -14
  326. package/src/theme/components/MuiLink.ts +0 -41
  327. package/src/theme/components/MuiList.ts +0 -12
  328. package/src/theme/components/MuiListItemText.ts +0 -18
  329. package/src/theme/components/MuiMenu.ts +0 -14
  330. package/src/theme/components/MuiMenuItem.ts +0 -15
  331. package/src/theme/components/MuiSelect.ts +0 -16
  332. package/src/theme/components/MuiTab.ts +0 -29
  333. package/src/theme/components/MuiTable.ts +0 -29
  334. package/src/theme/components/MuiTableBody.ts +0 -15
  335. package/src/theme/components/MuiTableHead.ts +0 -26
  336. package/src/theme/components/MuiTabs.ts +0 -26
  337. package/src/theme/components/MuiTextField.ts +0 -86
  338. package/src/theme/components/MuiToolbar.ts +0 -11
  339. package/src/theme/components/MuiTypography.ts +0 -12
  340. package/src/theme/components/_components.ts +0 -95
  341. package/src/theme/components/index.ts +0 -57
  342. package/src/theme/index.ts +0 -25
  343. package/src/theme/palette.ts +0 -98
  344. package/src/theme/spacing.ts +0 -8
  345. package/src/theme/typography.ts +0 -101
  346. package/src/utils/api.test.ts +0 -19
  347. package/src/utils/api.tsx +0 -339
  348. package/src/utils/auth.ts +0 -78
  349. package/src/utils/form.test.ts +0 -50
  350. package/src/utils/form.ts +0 -193
  351. package/src/utils/general.test.ts +0 -55
  352. package/src/utils/router.test.ts +0 -156
  353. package/src/utils/router.ts +0 -67
  354. package/src/utils/schema.ts +0 -290
  355. package/src/utils/store.ts +0 -31
  356. package/src/utils/test.tsx +0 -82
  357. package/src/utils/theme.tsx +0 -83
  358. package/src/utils/window.ts +0 -11
  359. package/src/vite-env.d.ts +0 -1
  360. package/tsconfig.app.json +0 -4
  361. package/tsconfig.json +0 -7
  362. package/tsconfig.node.json +0 -4
  363. package/types/fixes.d.ts +0 -18
  364. package/vite.config.ts +0 -23
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../src/features/InactiveDialog.tsx","../../src/images/svg/brain.svg","../../src/features/ScreenTimeDialog.tsx"],"sourcesContent":["import { Button, Dialog, Typography } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { Countdown } from \"../components\"\n\nexport interface InactiveDialogProps {\n open: boolean\n onClose: () => void\n}\n\nconst InactiveDialog: FC<InactiveDialogProps> = ({ open, onClose }) => {\n return (\n <Dialog open={open} onClose={onClose}>\n <Typography variant=\"h5\" textAlign=\"center\">\n Where did you go? 👀\n </Typography>\n <Typography textAlign=\"center\">\n We noticed that you have been inactive for a while. Are you still there?\n For your online safety we will log you out in:\n </Typography>\n <Countdown\n textAlign=\"center\"\n variant=\"h5\"\n seconds={60 * 2}\n onEnd={() => {\n onClose()\n alert(\"TODO: call logout endpoint\")\n }}\n />\n <Typography textAlign=\"center\">\n You may lose progress unless you continue or save.\n </Typography>\n <Button onClick={onClose} autoFocus>\n Wait, I&apos;m still here!\n </Button>\n </Dialog>\n )\n}\n\nexport default InactiveDialog\n","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20511.91%20423.62'%3e%3cdefs%3e%3cstyle%3e.d{fill:%23f9c5db;}.e{fill:%23fff;}.f{fill:%23666;}.g{fill:%23db5d90;}.h{fill:%23afafaf;}.i{fill:%235b5a5b;}.j{opacity:.2;}%3c/style%3e%3c/defs%3e%3cg%20id='a'/%3e%3cg%20id='b'%3e%3cpath%20class='d'%20d='M442.29,190.69c-4.39-18.43-13.61-35.22-22.63-51.72-2.21-4.04-4.38-8.11-6.49-12.2-.07-.13-.15-.37-.24-.62-.09-.56-.22-1.26-.27-1.5-.35-1.67-.71-3.47-.94-5.22,.17,.84,.17-2.04,.07-3.29-.21-2.8-.49-5.71-1.13-8.45-1.27-5.43-4.12-9.99-7.23-14.49-2.25-3.27-4.6-6.48-6.59-9.92-.51-.88-.98-1.79-1.46-2.69-.01-.03-.03-.06-.04-.09-.1-.52-.3-1.36-.42-1.68,0-.08,0-.15,0-.24-.25-7.47-1.39-15.18-3.36-22.4-4.34-15.9-13.85-30.79-29.48-37.38-10.06-4.25-21.31-5.05-31.65-1.16-5.07,1.91-9.75,4.4-14.44,7.09-.67,.38-1.33,.76-2,1.14-.09-.07-.17-.13-.24-.18-.89-.7-1.77-1.4-2.66-2.09-4.9-3.81-9.64-7.47-15.34-10-12.16-5.41-25.49-7.1-38.72-7.13-6-3.36-12.68-5.63-20.27-6.29-19.81-1.71-35.07,9.1-50.05,19.98-1.84,.87-3.65,1.79-5.43,2.76-11.73-2.88-23.23-6.51-35.37-7.64-16.82-1.56-32.38,3.66-45.25,14.38-5.58,4.65-10.45,10.7-14,17.38-11.73-2.99-24.82-.3-33.89,8.54-2.85,2.78-5.27,6.15-6.98,9.75-.74,1.55-1.52,3.11-2.19,4.69-6.99,3.63-13.43,6.54-18.48,13.08-5.54,7.17-8.17,15.32-9.36,24.21-.58,4.3-.78,8.52-.87,12.85-.03,1.77-.06,3.54-.14,5.32-.05,1.17-.2,2.35-.22,3.52,0,.05,0,.07,0,.11-.02,.05-.03,.09-.05,.16-.27,.86-1.49,4.85-.87,3.73-.57,1.18-1.24,2.31-1.87,3.45-2.45,4.43-4.95,9.05-6.21,13.98-2.6,10.17-.92,20.53,1.19,30.62,1.99,9.53,5.06,19.27,9.72,28.06-.18,.57-.32,1.16-.42,1.77-2.48,14.32-4.41,28.45-1.82,42.89,2.62,14.62,11.3,25.55,22.21,35.04,2.12,1.85,4.25,3.69,6.2,5.72,.6,.63,3.12,4.22,1.03,.93,.88,1.38,1.76,2.72,2.57,4.15,3.65,6.37,7.45,12.39,12.6,17.71,5.44,5.63,12.04,12.23,19.71,14.34,1.1,.3,2.19,.49,3.27,.58,1.27,1.04,2.59,2.03,3.93,3,.49,1.1,1.04,2.17,1.63,3.23,2.77,4.92,7.75,7.89,13.06,8.76,.6,.65,1.2,1.31,1.79,1.97,3.76,4.21,7.45,8.48,11.09,12.8,1.53,1.81,3.04,3.64,4.52,5.49,.29,.36,1.27,1.64,1.56,2,.5,.66,.99,1.33,1.48,2,3.11,4.29,6.03,8.73,8.6,13.37,5.42,9.78,8.61,19.81,17.84,26.94,10.02,7.75,22.28,10.02,34.59,11.32,12.11,1.27,25.35,.72,34.91-7.83,21.04-18.81,.59-49.34-14.08-65.08-8.43-9.04-18.2-16.49-28.57-23.08,9.77-2.69,18.56-7.88,24.67-16.9,2.18-3.21,3.76-6.87,4.87-10.57,.23-.78,.41-1.57,.57-2.36,1.78-1.12,3.91-2.13,5.26-3.14,4.02-3.01,7.77-6.12,11.24-9.74,4.61-4.8,6.41-12.13,4.66-18.46,2.6-.17,5.2-.64,7.81-1.01,9.57-1.35,19.14-2.8,28.66-4.47,18.7-3.27,37.29-7.36,55.41-13.08,12.41-3.92,24.3-9.45,36.49-14.02,4.91,.32,9.79-1.21,13.52-4.49,.5-.14,.99-.29,1.49-.42,17.65-4.73,36.7,1.28,53.41-7.59,4.09-2.17,7.51-5.13,10.14-8.66,7.9-3.99,12.07-12.5,9.92-21.51Zm-161.74-110.32c.03-.22,.05-.45,.08-.71,.06,.04,.01,.32-.08,.71Zm-116.35,174.2l-.05-.28c.14,.03,.27,.05,.41,.07-.12,.07-.24,.14-.36,.21Zm217.74-50.6c0,.43,0,.86,.03,1.28-.22,0-.44,.02-.66,.03,.21-.44,.42-.87,.63-1.31ZM313.52,25.5s-.03-.02,0,0h0ZM43.06,70.85c-.27,.26-.42,.24,0,0h0Zm160.22,227.41c-.17,.09-.71,.52-1.66,1.28,.47-.68,1.21-1.3,2.08-1.89-.13,.21-.27,.41-.42,.61Z'/%3e%3cpath%20class='f'%20d='M151.43,412.81c-21.81-28.05-42.03-56.46-67.07-81.79l.29-.41c22.02,15.35,39.34,36.47,53.86,58.84,4.84,7.49,9.37,15.17,13.38,23.14l-.45,.22h0Z'/%3e%3cpath%20class='f'%20d='M137.94,258.21c17.21,15.87,21.48,40.05,4.62,57.96-8.03,8.83-18.23,15.19-28.93,20.23-1.05,.49-2.13,.96-3.3,1.43-.68,.12-1.32,.3-1.87,.36-30.97,3.76-53.28-17.65-62.97-45.27l2.16,2.23c-.95-.43-1.69-.81-2.51-1.23-14.65-7.92-28.03-20.03-34-35.9-3.7-9.79-3.97-20.93-1.03-30.81l.49,.1c-1.11,5.8-1.49,11.76-.59,17.61,3.02,21.31,20.64,37.47,39.34,46.21l.16,.07,.06,.16c2.39,6.17,5.35,12.12,9.04,17.59,3.64,5.46,8.13,10.45,13.32,14.47,10.28,7.99,24.34,11.99,36.99,9.88,14.78-6.28,30.14-15.16,38.07-29.65,5.83-11.05,4.01-24.66-2.15-35.19-2.02-3.56-4.43-6.94-7.24-9.9l.35-.36h0Z'/%3e%3cpath%20class='f'%20d='M27.46,222.17c-8.91-6.16-15.79-14.98-20.61-24.63-15.83-30.94-2.67-67.45,23.43-88.04l.37,.33c-3.06,3.58-7.03,8.52-9.64,12.33-19.27,27.09-22.14,59.5-3.07,87.55,2.88,4.34,6.14,8.46,9.86,12.09l-.33,.37h0Z'/%3e%3cpath%20class='f'%20d='M22.29,119.02c-3.79-12.15-4.93-27.75,2.01-39.02,2.02-3.31,5.16-6.1,8.75-7.72,2.72-1.24,5.28-2.55,7.75-4.04,4.52-2.89,8.94-6.32,11.66-10.9,.44-1.01,1.09-1.78,1.7-2.61,7.74-9.88,20.64-13.83,30.48-4.47l-.27,.42c-7.43-4.82-16.18-4.26-22.64,1.9-2.02,1.85-3.81,4.01-5.19,6.35-.5,1.23-1.54,2.88-2.46,4.08-2.88,3.82-6.63,6.9-10.64,9.45-5.14,3.49-11.89,4.55-15.37,10.16-6.63,10.14-6.39,24.65-5.28,36.34l-.49,.07h0Z'/%3e%3cpath%20class='f'%20d='M101.06,97.94c-16.06-4.22-25.06-17.92-19.42-34.18,3.35-9.68,8.2-19.07,14.86-26.9,7.87-9.22,18.31-16.7,30.21-19.57,7.99-1.66,16.54-.12,23.9,2.21,5.9,1.98,11.57,4.42,16.77,7.71l-.21,.45c-5.53-2.37-11.31-4.21-17.17-5.54-5.85-1.35-11.9-2.06-17.86-1.54-19.17,2.75-34.69,19.81-42.92,36.44-1.4,2.91-3.37,7.3-4.37,10.37-2.09,6.36-1.5,13.63,2.44,19.16,3.38,4.92,8.47,8.6,13.93,10.92l-.17,.47h0Z'/%3e%3cpath%20class='f'%20d='M222.86,8.58c-20.62-.37-39.77,10.41-49.37,28.44-4.75,8.27-7.95,17.74-6.82,27.2,1.23,9.55,6.94,18.16,14.57,23.91,4.25,4.33,10.56,7.19,16.69,6.2,.72-.1,2.24-.35,2.97-.45,3.74,5.24,4.49,13.15-.44,17.83-.56,.59-1.23,1.06-1.82,1.58l-.34-.37c.51-.57,1.08-1.09,1.54-1.7,3.55-4.25,2.88-10.56-.25-14.86l.33,.11c-7.4,2.48-16.1-.49-21.36-5.5-13.67-9.24-20.29-25.92-15.53-41.88,4.54-15.12,14.77-28.97,29.08-36.04,9.5-4.65,20.36-6.44,30.84-4.94l-.09,.49h0Z'/%3e%3cpath%20class='f'%20d='M208.82,29.72c3.06-6.17,8.58-11.41,15.39-13.1,2.3-.67,4.72-.73,7.11-.68l-.77,.11c16.73-7,45.75-16.61,61.69-4.02,7.33,5.02,15.97,7.39,23.17,12.95,4.68,3.47,8.18,8.46,10.46,13.78,1.22,3.08,2.03,5.92,2.74,9.13,.71,3.17,1.3,7.92,1.74,11.16,.83,5.5,1.47,11.05,2.98,16.39,.04,.11,.06,.12,.08,.18l.03,.08v.04l.12,.23c.58,1.26,.96,2.72,1.27,3.99,1.87,8.86,3.6,21.66-2.41,29.43-1.54,1.93-4.03,3.42-6.55,3.93-.42,.12-.86,.19-1.3,.35-16.56,5.08-47.28,23.42-63.2,11.85-6.73-4.79-10.14-12.9-11.28-20.77-.78-6.24-.79-12.78,2.13-18.55l2.06,2.61c-2.85,.53-5.61,.37-8.39-.26-8.19-1.76-13.79-8.51-16.56-16.05l.46-.2c.8,1.65,1.73,3.49,2.78,5.01,3.07,4.79,7.98,8.53,13.64,9.53,2.69,.52,5.51,.46,8.14-.19-1.47,2.7-1.91,5.86-2.05,8.95-.25,8.56,1.87,17.79,7.81,24.18,3.98,4.42,9.75,6.23,15.6,5.58,11.62-1.15,22.5-6.08,33.19-10.54,5.41-2.24,10.71-4.85,16.43-6.3,1.33-.34,2.51-1.12,3.38-2.19,4.89-6.41,2.84-20.94,.33-28.21-2.14-5.93-2.56-12.25-3.53-18.42-.41-3.14-.94-7.72-1.61-10.81-1.55-7.71-4.88-15.51-11.3-20.37-4.54-3.65-10.02-5.9-15.15-8.62-3.91-1.96-7.52-4.61-11.12-7.04-11.31-6.02-26.41-3-38.37-.24-5.68,1.43-11.3,3.16-16.76,5.24-2.22-.14-4.47-.2-6.64,.34-6.51,1.35-11.99,6.1-15.28,11.76l-.44-.23h0Z'/%3e%3cpath%20class='f'%20d='M311.48,27.06c7.57-7.87,18.84-16.99,30.49-16.05,19.31,2.51,43.75,14.12,48.92,34.68,2.45,10.77,3.61,23.1-1.2,33.42l.56-2.4c.1,1.11,.37,2.25,.78,3.27,.7,1.67,1.64,2.83,3.15,3.59,2.07,.77,4.18,1.3,6.27,2.21,10.93,4.24,17.68,15.08,15.89,26.8-1.25,10.43-9.13,19.74-18.77,22.96l-.21-.45c2.92-1.43,5.63-3.28,7.95-5.55,9.36-8.81,11.67-25.51,1.81-34.8-2.35-2.21-5.2-3.83-8.23-4.98-3.02-1.32-6.58-1.49-9.14-3.79-2.58-2.27-3.91-5.6-4.27-8.97-.02-.13,0-.14,.06-.25,3.97-9.4,2.6-20.19,.56-29.93-3.84-15.21-18.86-24.21-32.65-29.45-4.77-1.63-9.71-3.37-14.79-3.43-5.09,.17-9.93,2.26-14.35,4.67-4.45,2.49-8.65,5.48-12.5,8.81l-.34-.37h0Z'/%3e%3cpath%20class='f'%20d='M359.05,101.57c13.08,1.53,24.07,11.47,26.11,24.71,.67,3.96,.78,8.16,1.35,12.13,1.07,7.82,2.37,15.62,4.23,23.29,1.25,6.09,3.42,11.85,4.34,17.9,2.43,14.92-1.95,31.82-15.54,40.1-1.26,.74-2.86,1.69-4.15,2.37-11.26,5.92-28.2,16.39-39.67,21.84-3.69,1.7-7.55,3.38-11.68,3.84l-.09-.49c3.87-.87,7.44-2.86,10.92-4.83,13.81-8.27,26.97-17.62,40.96-25.61,10.81-6.29,15.41-18.47,14.87-30.57-.02-8.12-3.05-15.71-4.56-23.57-2.06-9.87-3.46-19.9-3.93-29.97,.25-15.5-8.16-26.76-23.25-30.64l.09-.49h0Z'/%3e%3cpath%20class='f'%20d='M408.01,132.23c6.68-3.19,14.64-.21,18.26,6.23,1.17,1.85,2.09,4.26,2.89,6.27,1.48,3.8,2.98,8.11,4.41,11.95,2.12,6.22,4.76,13.86,6.71,20.1,1.85,5.6,3.4,11.49,3.76,17.45,.28,4.71,.02,10.32-2.47,14.72-2.31,3.88-4.61,7.65-7.83,11.03-8.16,9.08-21.38,12.19-33.04,10.72l-.02-.5c8.38-.47,16.91-2.31,23.87-7.15,6.1-4.2,10.11-10.66,13.43-17.15,2.27-6.27,1.15-13.21-.15-19.59-2.42-9.3-6.87-23.16-9.55-32.51-1.22-3.7-2.83-10.58-4.58-14.01-2.71-5.92-9.27-8.91-15.53-7.09l-.16-.47h0Z'/%3e%3cpath%20class='f'%20d='M221.65,273.51c2.26,9.89-2.86,20.36-10.84,26.3-8.02,5.94-18.74,7.75-28.08,4.56l-.02-.5c2.02-.15,4.73-.37,6.68-.71,13.4-1.78,25.65-10.16,30.09-23.24,.76-2.09,1.38-4.26,1.67-6.45l.5,.04h0Z'/%3e%3cpath%20class='f'%20d='M200.07,300.72c3.54,4.74,5.27,12.19,.36,16.88-1.33,1.29-2.95,2.41-4.44,3.5-8.96,6.27-19.78,11.25-31.01,10.18-8.27-.2-18.35-1.37-22.86-9.37-1.38-2.44-2.16-5.13-2.46-7.88l.47-.17c2.37,6.69,7.42,11.59,14.64,12.33,3.36,.49,6.8,.35,10.25,.37,3.47,.14,6.78-.08,10.12-.96,7.46-1.85,14.5-5.27,21.05-9.25,.7-.44,1.46-.88,2.1-1.42,4.09-3.36,2.96-9.61,1.32-14l.46-.2h0Z'/%3e%3cpath%20class='f'%20d='M176.12,326.86c24.94,11.54,50.15,41.47,49.33,70.03l-.49,.09c-4.51-21.44-17.93-39.76-32.96-55.19-5.11-5.13-10.46-10.07-16.17-14.53l.3-.4h0Z'/%3e%3cpath%20class='f'%20d='M137.61,234.31c-12.87-5.26-28.97-12.85-41.88-7.04-1.34,.62-3.31,1.96-4.59,2.75-11.69,7.35-22.74,15.2-34.81,22.2l-.34-.37c5.77-5.42,11.8-10.57,18.04-15.44,4.67-3.67,9.46-7.19,14.4-10.49,1.66-1.08,3.28-2.22,5.1-3.14,3.65-1.77,7.74-2.47,11.74-2.33,12.02,.6,23.14,6.48,32.65,13.46l-.31,.4h0Z'/%3e%3cpath%20class='f'%20d='M90.49,123.12c6.33,13.05,6.79,31.3-5.1,41.5-10.92,8.88-24.57,16.5-39.18,15.65-4.18-.4-8.44-1.75-11.45-4.52l.24-.44c6.92,3.68,15.23,2.4,22.36-.05,7.28-2.54,14.04-6.47,20.3-10.98,3.08-2.25,6.3-4.46,8.52-7.63,4.53-6.27,5.59-14.37,5.32-21.95-.14-3.85-.61-7.72-1.49-11.46l.48-.13h0Z'/%3e%3cpath%20class='f'%20d='M76.79,174.22c3.7,1.29,6.73,4.02,9.14,7.02,7.21,9.2,8.66,21.88,5.65,32.96l-.13-1.32c.12,.93,.23,1.85,.32,2.79,.25,2.86,.4,5.72,.17,8.61l-.48,.15c-1.04-3.12-2.49-7.38-3.46-10.47,1.28-13.81-1.06-29.39-11.54-39.35l.31-.39h0Z'/%3e%3cpath%20class='f'%20d='M161.1,151.64c18.17-8.77,42.86,4.98,40,26.29l-.49,.11c-1.08-4.19-2.72-8.24-5.15-11.81-6.15-9.08-17.16-13.47-27.83-14.07-2.16-.15-4.34-.19-6.48-.02l-.06-.5h0Z'/%3e%3cpath%20class='f'%20d='M195.26,197.53c9.79-9.84,24.22-14.13,37.94-13.48,1.11,.1,3.32,.32,4.42,.46,7.16,1.13,14.35,2.25,21.07,5.18,1.06,.51,2.08,1.12,2.81,2.1,1.44,1.78,1.05,4.71-.91,5.97l-4.67-6.12c4.01-2.82,8.54-4.73,13.23-6.02,4.5-1.22,9.21-1.75,13.86-1.45l.08,.49c-6.59,1.14-13.01,3.31-18.85,6.56-1.93,1.09-3.84,2.29-5.53,3.67l-.52-.68c-.19,.12-.03,.28-.13,.16-.82-.7-2-.99-3.03-1.34-3.93-1.17-8-1.9-12.05-2.61-5.43-.94-10.83-1.83-16.31-1.67-10.9,.26-21.85,3.41-31.11,9.19l-.29-.41h0Z'/%3e%3cpath%20class='f'%20d='M280.33,149.53c21.07,10.79,41.84,14.23,63.49,3.14,4.86-2.38,9.69-5.07,14.86-7l.29,.41-8.8,6.36c-8.7,6.56-19.03,11.36-30.03,11.98-14.62,.82-29.2-4.98-40.14-14.52l.34-.37h0Z'/%3e%3cpath%20class='f'%20d='M181.26,213.67c9.93,6.09,14.18,19.54,8.98,30.15-2.37,5.24-6.32,9.39-10.53,13.13-.7,.55-2.55,1.99-3.24,2.52-.76,.57-2.62,1.68-3.41,2.24-8.4,4.91-18.22,8-27.95,7.45l-.08-.49c7.4-1.54,14.6-4.36,21.17-8.09,2.82-1.6,5.82-3.63,8.32-5.7,6.91-5.72,13.87-13.25,13.91-22.75,.06-6.69-3.05-13.21-7.53-18.09l.35-.36h0Z'/%3e%3cpath%20class='f'%20d='M167.22,124.02c16.67-8.3,39.6-10.49,56.5-1.46,1.18,.63,2.62,1.58,3.71,2.33,6.81,5.05,13.4,10.22,19.4,16.43l-.27,.42-9.05-5.51c-3.22-1.95-10.39-6.51-13.52-8.33-1.47-.86-3.13-1.66-4.7-2.3-13.13-5.17-27.76-4.86-41.56-2.99-3.49,.48-6.97,1.08-10.39,1.89l-.13-.48h0Z'/%3e%3cpath%20class='g'%20d='M340.25,209.52c-25.34,51.85-74.22,96.17-129.16,52.06-5.91-4.68-11.34-9.88-16.4-15.37,16.15,14.34,36.02,27.42,58.32,26.95,29.45-1,49.96-26.56,62.8-50.65,3.26-6.21,6.29-12.71,8.64-19.29,1.48-4.46,6.3-6.88,10.76-5.4,4.81,1.56,7.2,7.13,5.03,11.69h0Z'/%3e%3cpath%20class='g'%20d='M450.9,222.82c-3.86,14.01-12.5,26.41-23.37,35.88-8.87,7.57-19.71,13.2-30.75,16.3-38.57,10.56-80.42-1.74-116.27-16.32,22.35,6.65,45.15,11.56,68.41,12.15,1.99,0,6.67-.07,8.57-.09,1.81-.07,6.59-.45,8.5-.58l5.59-.75c17.07-2.47,33.77-9.13,45.66-21.69,7.23-7.71,12.77-17.29,14.99-27.65,.57-5.45,5.76-9.39,11.19-8.31,5.12,.99,8.48,5.94,7.49,11.06h0Z'/%3e%3cg%3e%3cpath%20class='e'%20d='M328.57,220.35c-.65,0-1.3-.03-1.94-.08-16.21-1.28-28.15-18.25-26.61-37.84,1.47-18.67,14.76-33.29,30.26-33.29,.65,0,1.3,.03,1.94,.08,16.21,1.28,28.15,18.25,26.61,37.84-1.47,18.67-14.76,33.29-30.26,33.29Z'/%3e%3cpath%20class='h'%20d='M330.28,147.64v3h0c.6,0,1.22,.02,1.82,.07,15.39,1.21,26.71,17.46,25.23,36.23-1.41,17.89-14.04,31.91-28.76,31.91-.61,0-1.22-.02-1.83-.07-15.39-1.21-26.71-17.46-25.23-36.23,1.41-17.89,14.04-31.91,28.76-31.91v-3m0,0c-16.21,0-30.21,15.05-31.75,34.67-1.61,20.45,10.92,38.11,27.98,39.46,.69,.05,1.38,.08,2.06,.08,16.21,0,30.21-15.05,31.75-34.67,1.61-20.45-10.92-38.11-27.98-39.46-.69-.05-1.38-.08-2.06-.08h0Z'/%3e%3c/g%3e%3cellipse%20class='i'%20cx='334.82'%20cy='199.39'%20rx='13.2'%20ry='9.39'%20transform='translate(39%20453.06)%20rotate(-71.39)'/%3e%3cg%3e%3cpath%20class='e'%20d='M446.3,231.11c-1.21,0-2.43-.1-3.63-.29-15.09-2.39-25.01-19.17-22.12-37.41,2.62-16.55,15.08-29.03,28.97-29.03,1.21,0,2.43,.1,3.63,.29,15.09,2.39,25.01,19.17,22.12,37.41-2.62,16.55-15.08,29.03-28.97,29.03Z'/%3e%3cpath%20class='h'%20d='M449.52,165.88h0c1.13,0,2.27,.09,3.39,.27,14.27,2.26,23.63,18.27,20.87,35.7-2.51,15.83-14.33,27.77-27.49,27.77-1.13,0-2.27-.09-3.39-.27-14.27-2.26-23.63-18.27-20.87-35.7,2.51-15.83,14.33-27.76,27.49-27.77m0-3c-14.48,0-27.67,12.76-30.45,30.3-3.02,19.09,7.44,36.61,23.37,39.13,1.29,.2,2.58,.3,3.86,.3,14.48,0,27.67-12.76,30.45-30.3,3.02-19.09-7.44-36.61-23.37-39.13-1.29-.2-2.58-.3-3.86-.3h0Z'/%3e%3c/g%3e%3cellipse%20class='i'%20cx='446.51'%20cy='209.6'%20rx='12.44'%20ry='8.84'%20transform='translate(78.46%20537.99)%20rotate(-66.89)'/%3e%3c/g%3e%3cg%20id='c'%3e%3cg%20class='j'%3e%3cpolygon%20class='e'%20points='329.42%20118.98%20367.62%20124.71%20301.63%20213.52%20283.04%20209.6%20267.19%20191.08%20329.42%20118.98'/%3e%3c/g%3e%3cg%20class='j'%3e%3cpolygon%20class='e'%20points='265.79%20162.67%20265.79%20110.28%20280.5%20109.04%20306.96%20113.1%20265.79%20162.67'/%3e%3c/g%3e%3cg%20class='j'%3e%3cpolygon%20class='e'%20points='469.91%20148.92%20504.3%20154.03%20444.89%20233.05%20428.16%20229.56%20413.89%20213.08%20469.91%20148.92'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M510.06,159.47c-1.72-6.02-6.83-10.58-13.04-11.65l-69.11-14.88c-.07-.01-.14-.03-.21-.04-.22-.04-.87-.14-1.8-.2,.43-.03,.68-.02,.68-.02l-63.81-15.39s.09,.05,.14,.08c-.13-.02-.26-.06-.39-.08l-81.21-13.19c-.51-.08-3-.45-6.09-.21-.4-.09-.8-.14-1.22-.12-3.73,.15-92.16,3.94-158.51,31.15-1.6,.65-2.74,2.09-3.03,3.79-.17,.98-3.97,24.18,5.96,42.8,2.22,4.17,5,7.83,8.25,10.88,.7,.66,1.58,1.1,2.53,1.28,1.15,.21,2.92,.46,4.89,.46,3.22,0,6.94-.67,9.21-3.26,1.08-1.23,2.68-3.9,1.36-7.97-.85-2.63-3.66-4.03-6.29-3.18-1.97,.64-3.27,2.41-3.43,4.37-.72,.04-1.62,.02-2.51-.06-1.99-2.08-3.73-4.5-5.18-7.22-6.52-12.22-5.86-27.59-5.26-33.71,49.43-19.59,112.16-26.35,139.12-28.46-.19,.94-.32,1.95-.32,3.07v66.73c0,.12,0,.24,.01,.36,.06,.88,1.75,21.62,20.3,29.43,11.43,4.81,43.5,6.74,68.38,7.52,.28,0,.55,.01,.82,.01,11.7,0,21.98-7.74,25.19-19.07l.23-.84c3.05-11.22,3.54-40.64,3.62-51.05,1.2-3.01,3.1-4.63,5.93-6.52,7.68-5.14,18.12-2.75,22.92,5.14,.42,.69,.82,1.4,1.21,2.11v53.78c0,.1,0,.21,.01,.31,.06,.79,1.55,19.46,18.05,26.51,10.37,4.43,37.17,6.13,57.82,6.78,.25,0,.49,.01,.74,.01,10.42,0,19.58-6.98,22.43-17.2l.2-.74c3.21-11.98,3.23-47.01,3.23-49.25,.02-.85,.04-5.71-1.84-12.26Zm-140.69-12.46s0,.09,0,.13c.02,11.06-.54,41.98-3.28,52.06l-.21,.75c-2.03,7.17-8.61,12.03-16.08,11.78-33.48-1.04-57.11-3.49-64.81-6.74-12.31-5.19-14.03-19.14-14.19-20.79V117.69c0-1.77,.62-2.3,.88-2.52,1.65-1.41,5.77-1.54,8.03-1.19l81.22,13.19c3.23,.53,5.9,2.83,6.78,5.87,1.83,6.29,1.67,13.9,1.67,13.97Zm133.58,24.48c0,.06,0,.12,0,.19,.01,9.98-.49,37.88-2.93,46.98l-.18,.67c-1.8,6.47-7.66,10.83-14.26,10.63-27.7-.87-47.6-3.08-54.59-6.07-10.96-4.68-12.48-17.3-12.62-18.78v-59.99c0-1.64,.57-2.12,.81-2.33,1.44-1.23,4.99-1.36,6.97-1.06l69.08,14.87c.07,.02,.14,.03,.21,.04,2.86,.47,5.22,2.55,6.01,5.3,1.6,5.58,1.49,9.53,1.49,9.55Z'/%3e%3cpath%20d='M431.58,118.93c2.88-2.73,6.23-4.98,9.71-6.86,10.9-6.05,23.5-5.13,33.14,2.88,1.88,2.01,4.26,4.78,6,7.27,1.74,2.53,3.65,5.26,4.1,8.34,.03,.36,.57,.4,.66,.06,1.36-5.31-1.24-10.84-3.68-15.43-1-1.64-1.88-3.43-3.32-4.86-3.2-3.28-7.29-6.04-11.99-7.63-13.51-4.78-29.72,2.7-35.13,15.74l-.04,.11c-.15,.32,.31,.63,.55,.37Z'/%3e%3cpath%20d='M297.47,90.2c2.88-2.73,6.23-4.98,9.71-6.86,10.9-6.05,23.5-5.13,33.14,2.88,1.88,2.01,4.26,4.78,6,7.27,1.74,2.53,3.65,5.26,4.1,8.34,.03,.36,.57,.4,.66,.06,1.36-5.31-1.24-10.84-3.68-15.43-1-1.64-1.88-3.43-3.32-4.86-3.2-3.28-7.29-6.04-11.99-7.63-13.51-4.78-29.72,2.7-35.13,15.74l-.04,.11c-.15,.32,.31,.63,.55,.37Z'/%3e%3c/g%3e%3cpath%20class='d'%20d='M246.7,141.54s-45.89-33.79-87.25-15.71c-41.36,18.08-12.08,29.13-12.08,29.13l39-19.62,60.33,6.21Z'/%3e%3c/g%3e%3c/svg%3e\"","import { Button, Dialog, Typography } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport BrainImage from \"../images/svg/brain.svg\"\nimport { Image } from \"../components\"\n\nexport interface ScreenTimeDialogProps {\n open: boolean\n onClose: () => void\n}\n\nconst ScreenTimeDialog: FC<ScreenTimeDialogProps> = ({ open, onClose }) => {\n return (\n <Dialog open={open} onClose={onClose} maxWidth=\"sm\">\n <Image src={BrainImage} alt=\"brain\" maxWidth={100} marginY={3} />\n <Typography variant=\"h5\" textAlign=\"center\">\n Time for a break?\n </Typography>\n <Typography textAlign=\"center\">\n You have been using the Code for Life website for a while. Remember to\n take regular screen breaks to recharge those brain cells!\n </Typography>\n <Button onClick={onClose} autoFocus>\n Continue\n </Button>\n </Dialog>\n )\n}\n\nexport default ScreenTimeDialog\n"],"names":["InactiveDialog","open","onClose","jsxs","Dialog","jsx","Typography","Countdown","Button","BrainImage","ScreenTimeDialog","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAA0C,CAAC,EAAE,MAAAC,GAAM,SAAAC,QAErDC,gBAAAA,EAAAA,KAACC,GAAA,EAAO,MAAAH,GAAY,SAAAC,GAClB,UAAA;AAAA,EAAAG,gBAAAA,MAACC,GAAA,EAAW,SAAQ,MAAK,WAAU,UAAS,UAAA,wBAE5C;AAAA,EACAD,gBAAAA,EAAAA,IAACC,GAAA,EAAW,WAAU,UAAS,UAAA,2HAG/B;AAAA,EACAD,gBAAAA,EAAAA;AAAAA,IAACE;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,SAAS;AAAA,MACT,OAAO,MAAM;AACX,QAAAL,EAAA,GACA,MAAM,4BAA4B;AAAA,MACpC;AAAA,IAAA;AAAA,EAAA;AAAA,EAEFG,gBAAAA,EAAAA,IAACC,GAAA,EAAW,WAAU,UAAS,UAAA,sDAE/B;AAAA,wBACCE,GAAA,EAAO,SAASN,GAAS,WAAS,IAAC,UAAA,wBAAA,CAEpC;AAAA,GACF,GCnCJO,IAAe,i+gBCWTC,IAA8C,CAAC,EAAE,MAAAT,GAAM,SAAAC,QAEzDC,gBAAAA,EAAAA,KAACC,GAAA,EAAO,MAAAH,GAAY,SAAAC,GAAkB,UAAS,MAC7C,UAAA;AAAA,EAAAG,gBAAAA,EAAAA,IAACM,GAAA,EAAM,KAAKF,GAAY,KAAI,SAAQ,UAAU,KAAK,SAAS,EAAA,CAAG;AAAA,wBAC9DH,GAAA,EAAW,SAAQ,MAAK,WAAU,UAAS,UAAA,qBAE5C;AAAA,EACAD,gBAAAA,EAAAA,IAACC,GAAA,EAAW,WAAU,UAAS,UAAA,oIAG/B;AAAA,wBACCE,GAAA,EAAO,SAASN,GAAS,WAAS,IAAC,UAAA,WAAA,CAEpC;AAAA,GACF;"}
package/dist/form.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { FieldValidator } from 'formik';
2
+ import { FormikHelpers } from 'formik';
3
+ import { Schema } from 'yup';
4
+ import { TypedMutationTrigger } from '@reduxjs/toolkit/query/react';
5
+ import { ValidateOptions } from 'yup';
6
+
7
+ export declare type FormValues = Record<string, any>;
8
+
9
+ export declare function getCleanNames<Values extends FormValues>(values: Values, initialValues: Values, names?: string[]): string[];
10
+
11
+ export declare function getDirty<Values extends FormValues>(values: Values, initialValues: Values, names?: string[]): Record<string, boolean>;
12
+
13
+ export declare function isDirty<Values extends FormValues>(values: Values, initialValues: Values, name: string): boolean;
14
+
15
+ export declare function isFormError(error: unknown): boolean;
16
+
17
+ export declare function schemaToFieldValidator(schema: Schema, options?: ValidateOptions): FieldValidator;
18
+
19
+ export declare function setFormErrors(error: unknown, setErrors: (errors: object) => void): void;
20
+
21
+ export declare function submitForm<Values extends QueryArg, QueryArg extends FormValues, ResultType>(trigger: TypedMutationTrigger<ResultType, QueryArg, any>, initialValues: Values, options?: SubmitFormOptions<Values, QueryArg, ResultType>): SubmitFormHandler<Values>;
22
+
23
+ export declare function submitForm<Values extends FormValues, QueryArg extends FormValues, ResultType>(trigger: TypedMutationTrigger<ResultType, QueryArg, any>, initialValues: Values, options: SubmitFormOptions<Values, QueryArg, ResultType>): SubmitFormHandler<Values>;
24
+
25
+ export declare type SubmitFormHandler<Values extends FormValues> = (values: Values, helpers: FormikHelpers<Values>) => void | Promise<any>;
26
+
27
+ export declare type SubmitFormOptions<Values extends FormValues, QueryArg extends FormValues, ResultType> = Partial<{
28
+ exclude: string[];
29
+ include: string[];
30
+ onlyDirtyValues: boolean;
31
+ then: (result: ResultType, values: Values, helpers: FormikHelpers<Values>) => void;
32
+ catch: (error: unknown, values: Values, helpers: FormikHelpers<Values>) => void;
33
+ finally: (values: Values, helpers: FormikHelpers<Values>) => void;
34
+ }> & (Values extends QueryArg ? {
35
+ clean?: (values: Values) => QueryArg;
36
+ } : {
37
+ clean: (values: Values) => QueryArg;
38
+ });
39
+
40
+ export { }
@@ -0,0 +1,2 @@
1
+ "use strict";const s=require("react");function d({props:r,attrs:t,eventTypes:c}){const[o,u]=s.useState();return s.useEffect(()=>{if(document.querySelector(`script[src="${r.src}"]`))throw Error("already exists");const e=document.createElement("script");Object.entries(r).forEach(([n,i])=>{e[n]=i}),t!==void 0&&Object.entries(t).forEach(([n,i])=>{e.setAttribute(n,i)});function E(n){u(n.type)}return c?.forEach(n=>{e.addEventListener(n,E)}),document.head.appendChild(e),()=>{c?.forEach(n=>{e.removeEventListener(n,E)}),document.head.removeChild(e)}},[c,t,r]),o}function f(r,t=1){if(r<=0)throw Error("seconds must be > 0");if(t<=0)throw Error("interval must be > 0");const[c,o]=s.useState(r);return s.useEffect(()=>{const u=setInterval(()=>{o(e=>(e=e-t,e<0?0:e))},t*1e3);return()=>{clearInterval(u)}},[t]),[c,o]}function a(r,t,c,o={}){const{options:u,deps:e=[]}=o;s.useEffect(()=>(r.addEventListener(t,c,u),()=>{r.removeEventListener(t,c,u)}),e)}exports.useCountdown=f;exports.useEventListener=a;exports.useExternalScript=d;
2
+ //# sourceMappingURL=general-BPbbmkeX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general-BPbbmkeX.cjs","sources":["../src/hooks/general.tsx"],"sourcesContent":["import {\n type DependencyList,\n type Dispatch,\n type SetStateAction,\n useEffect,\n useState,\n} from \"react\"\n\nexport function useExternalScript<EventType extends keyof HTMLElementEventMap>({\n props,\n attrs,\n eventTypes,\n}: {\n props: Partial<HTMLScriptElement> & { src: string }\n attrs?: Record<string, string>\n eventTypes?: EventType[]\n}): EventType | undefined {\n const [eventType, setEventType] = useState<EventType>()\n\n useEffect(() => {\n if (\n document.querySelector<HTMLScriptElement>(`script[src=\"${props.src}\"]`)\n ) {\n throw Error(\"already exists\")\n }\n\n const script = document.createElement(\"script\")\n\n Object.entries(props).forEach(([key, value]) => {\n // @ts-expect-error value is assignable\n script[key] = value\n })\n\n if (attrs !== undefined) {\n Object.entries(attrs).forEach(([key, value]) => {\n script.setAttribute(key, value)\n })\n }\n\n function eventListener(event: Event): void {\n setEventType(event.type as EventType)\n }\n\n eventTypes?.forEach(eventType => {\n script.addEventListener(eventType, eventListener)\n })\n\n document.head.appendChild(script)\n\n return () => {\n eventTypes?.forEach(eventType => {\n script.removeEventListener(eventType, eventListener)\n })\n\n document.head.removeChild(script)\n }\n }, [eventTypes, attrs, props])\n\n return eventType\n}\n\nexport function useCountdown(\n seconds: number,\n interval: number = 1,\n): [number, Dispatch<SetStateAction<number>>] {\n if (seconds <= 0) throw Error(\"seconds must be > 0\")\n if (interval <= 0) throw Error(\"interval must be > 0\")\n\n const [_seconds, _setSeconds] = useState(seconds)\n\n useEffect(() => {\n const countdown = setInterval(() => {\n _setSeconds(seconds => {\n seconds = seconds - interval\n return seconds < 0 ? 0 : seconds\n })\n }, interval * 1000)\n\n return () => {\n clearInterval(countdown)\n }\n }, [interval])\n\n return [_seconds, _setSeconds]\n}\n\nexport function useEventListener<EventType extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n type: EventType,\n listener: (this: HTMLElement, ev: HTMLElementEventMap[EventType]) => any,\n kwArgs: {\n options?: boolean | AddEventListenerOptions\n deps?: DependencyList\n } = {},\n): void {\n const { options, deps = [] } = kwArgs\n\n useEffect(\n () => {\n element.addEventListener(type, listener, options)\n\n return () => {\n element.removeEventListener(type, listener, options)\n }\n },\n // TODO: simplify this hook.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n deps,\n )\n}\n"],"names":["useExternalScript","props","attrs","eventTypes","eventType","setEventType","useState","useEffect","script","key","value","eventListener","event","useCountdown","seconds","interval","_seconds","_setSeconds","countdown","useEventListener","element","type","listener","kwArgs","options","deps"],"mappings":"sCAQO,SAASA,EAA+D,CAC7E,MAAAC,EACA,MAAAC,EACA,WAAAC,CACF,EAI0B,CACxB,KAAM,CAACC,EAAWC,CAAY,EAAIC,WAAA,EAElCC,OAAAA,EAAAA,UAAU,IAAM,CACd,GACE,SAAS,cAAiC,eAAeN,EAAM,GAAG,IAAI,EAEtE,MAAM,MAAM,gBAAgB,EAG9B,MAAMO,EAAS,SAAS,cAAc,QAAQ,EAE9C,OAAO,QAAQP,CAAK,EAAE,QAAQ,CAAC,CAACQ,EAAKC,CAAK,IAAM,CAE9CF,EAAOC,CAAG,EAAIC,CAChB,CAAC,EAEGR,IAAU,QACZ,OAAO,QAAQA,CAAK,EAAE,QAAQ,CAAC,CAACO,EAAKC,CAAK,IAAM,CAC9CF,EAAO,aAAaC,EAAKC,CAAK,CAChC,CAAC,EAGH,SAASC,EAAcC,EAAoB,CACzCP,EAAaO,EAAM,IAAiB,CACtC,CAEA,OAAAT,GAAY,QAAQC,GAAa,CAC/BI,EAAO,iBAAiBJ,EAAWO,CAAa,CAClD,CAAC,EAED,SAAS,KAAK,YAAYH,CAAM,EAEzB,IAAM,CACXL,GAAY,QAAQC,GAAa,CAC/BI,EAAO,oBAAoBJ,EAAWO,CAAa,CACrD,CAAC,EAED,SAAS,KAAK,YAAYH,CAAM,CAClC,CACF,EAAG,CAACL,EAAYD,EAAOD,CAAK,CAAC,EAEtBG,CACT,CAEO,SAASS,EACdC,EACAC,EAAmB,EACyB,CAC5C,GAAID,GAAW,EAAG,MAAM,MAAM,qBAAqB,EACnD,GAAIC,GAAY,EAAG,MAAM,MAAM,sBAAsB,EAErD,KAAM,CAACC,EAAUC,CAAW,EAAIX,EAAAA,SAASQ,CAAO,EAEhDP,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMW,EAAY,YAAY,IAAM,CAClCD,EAAYH,IACVA,EAAUA,EAAUC,EACbD,EAAU,EAAI,EAAIA,EAC1B,CACH,EAAGC,EAAW,GAAI,EAElB,MAAO,IAAM,CACX,cAAcG,CAAS,CACzB,CACF,EAAG,CAACH,CAAQ,CAAC,EAEN,CAACC,EAAUC,CAAW,CAC/B,CAEO,SAASE,EACdC,EACAC,EACAC,EACAC,EAGI,CAAA,EACE,CACN,KAAM,CAAE,QAAAC,EAAS,KAAAC,EAAO,CAAA,GAAOF,EAE/BhB,EAAAA,UACE,KACEa,EAAQ,iBAAiBC,EAAMC,EAAUE,CAAO,EAEzC,IAAM,CACXJ,EAAQ,oBAAoBC,EAAMC,EAAUE,CAAO,CACrD,GAIFC,CAAA,CAEJ"}
@@ -0,0 +1,58 @@
1
+ import { useState as d, useEffect as i } from "react";
2
+ function f({
3
+ props: r,
4
+ attrs: t,
5
+ eventTypes: o
6
+ }) {
7
+ const [c, s] = d();
8
+ return i(() => {
9
+ if (document.querySelector(`script[src="${r.src}"]`))
10
+ throw Error("already exists");
11
+ const e = document.createElement("script");
12
+ Object.entries(r).forEach(([n, u]) => {
13
+ e[n] = u;
14
+ }), t !== void 0 && Object.entries(t).forEach(([n, u]) => {
15
+ e.setAttribute(n, u);
16
+ });
17
+ function a(n) {
18
+ s(n.type);
19
+ }
20
+ return o?.forEach((n) => {
21
+ e.addEventListener(n, a);
22
+ }), document.head.appendChild(e), () => {
23
+ o?.forEach((n) => {
24
+ e.removeEventListener(n, a);
25
+ }), document.head.removeChild(e);
26
+ };
27
+ }, [o, t, r]), c;
28
+ }
29
+ function h(r, t = 1) {
30
+ if (r <= 0) throw Error("seconds must be > 0");
31
+ if (t <= 0) throw Error("interval must be > 0");
32
+ const [o, c] = d(r);
33
+ return i(() => {
34
+ const s = setInterval(() => {
35
+ c((e) => (e = e - t, e < 0 ? 0 : e));
36
+ }, t * 1e3);
37
+ return () => {
38
+ clearInterval(s);
39
+ };
40
+ }, [t]), [o, c];
41
+ }
42
+ function m(r, t, o, c = {}) {
43
+ const { options: s, deps: e = [] } = c;
44
+ i(
45
+ () => (r.addEventListener(t, o, s), () => {
46
+ r.removeEventListener(t, o, s);
47
+ }),
48
+ // TODO: simplify this hook.
49
+ // eslint-disable-next-line react-hooks/exhaustive-deps
50
+ e
51
+ );
52
+ }
53
+ export {
54
+ h as a,
55
+ m as b,
56
+ f as u
57
+ };
58
+ //# sourceMappingURL=general-CtTJPCJn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general-CtTJPCJn.js","sources":["../src/hooks/general.tsx"],"sourcesContent":["import {\n type DependencyList,\n type Dispatch,\n type SetStateAction,\n useEffect,\n useState,\n} from \"react\"\n\nexport function useExternalScript<EventType extends keyof HTMLElementEventMap>({\n props,\n attrs,\n eventTypes,\n}: {\n props: Partial<HTMLScriptElement> & { src: string }\n attrs?: Record<string, string>\n eventTypes?: EventType[]\n}): EventType | undefined {\n const [eventType, setEventType] = useState<EventType>()\n\n useEffect(() => {\n if (\n document.querySelector<HTMLScriptElement>(`script[src=\"${props.src}\"]`)\n ) {\n throw Error(\"already exists\")\n }\n\n const script = document.createElement(\"script\")\n\n Object.entries(props).forEach(([key, value]) => {\n // @ts-expect-error value is assignable\n script[key] = value\n })\n\n if (attrs !== undefined) {\n Object.entries(attrs).forEach(([key, value]) => {\n script.setAttribute(key, value)\n })\n }\n\n function eventListener(event: Event): void {\n setEventType(event.type as EventType)\n }\n\n eventTypes?.forEach(eventType => {\n script.addEventListener(eventType, eventListener)\n })\n\n document.head.appendChild(script)\n\n return () => {\n eventTypes?.forEach(eventType => {\n script.removeEventListener(eventType, eventListener)\n })\n\n document.head.removeChild(script)\n }\n }, [eventTypes, attrs, props])\n\n return eventType\n}\n\nexport function useCountdown(\n seconds: number,\n interval: number = 1,\n): [number, Dispatch<SetStateAction<number>>] {\n if (seconds <= 0) throw Error(\"seconds must be > 0\")\n if (interval <= 0) throw Error(\"interval must be > 0\")\n\n const [_seconds, _setSeconds] = useState(seconds)\n\n useEffect(() => {\n const countdown = setInterval(() => {\n _setSeconds(seconds => {\n seconds = seconds - interval\n return seconds < 0 ? 0 : seconds\n })\n }, interval * 1000)\n\n return () => {\n clearInterval(countdown)\n }\n }, [interval])\n\n return [_seconds, _setSeconds]\n}\n\nexport function useEventListener<EventType extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n type: EventType,\n listener: (this: HTMLElement, ev: HTMLElementEventMap[EventType]) => any,\n kwArgs: {\n options?: boolean | AddEventListenerOptions\n deps?: DependencyList\n } = {},\n): void {\n const { options, deps = [] } = kwArgs\n\n useEffect(\n () => {\n element.addEventListener(type, listener, options)\n\n return () => {\n element.removeEventListener(type, listener, options)\n }\n },\n // TODO: simplify this hook.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n deps,\n )\n}\n"],"names":["useExternalScript","props","attrs","eventTypes","eventType","setEventType","useState","useEffect","script","key","value","eventListener","event","useCountdown","seconds","interval","_seconds","_setSeconds","countdown","useEventListener","element","type","listener","kwArgs","options","deps"],"mappings":";AAQO,SAASA,EAA+D;AAAA,EAC7E,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AACF,GAI0B;AACxB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAA;AAElC,SAAAC,EAAU,MAAM;AACd,QACE,SAAS,cAAiC,eAAeN,EAAM,GAAG,IAAI;AAEtE,YAAM,MAAM,gBAAgB;AAG9B,UAAMO,IAAS,SAAS,cAAc,QAAQ;AAE9C,WAAO,QAAQP,CAAK,EAAE,QAAQ,CAAC,CAACQ,GAAKC,CAAK,MAAM;AAE9C,MAAAF,EAAOC,CAAG,IAAIC;AAAA,IAChB,CAAC,GAEGR,MAAU,UACZ,OAAO,QAAQA,CAAK,EAAE,QAAQ,CAAC,CAACO,GAAKC,CAAK,MAAM;AAC9C,MAAAF,EAAO,aAAaC,GAAKC,CAAK;AAAA,IAChC,CAAC;AAGH,aAASC,EAAcC,GAAoB;AACzC,MAAAP,EAAaO,EAAM,IAAiB;AAAA,IACtC;AAEA,WAAAT,GAAY,QAAQ,CAAAC,MAAa;AAC/B,MAAAI,EAAO,iBAAiBJ,GAAWO,CAAa;AAAA,IAClD,CAAC,GAED,SAAS,KAAK,YAAYH,CAAM,GAEzB,MAAM;AACX,MAAAL,GAAY,QAAQ,CAAAC,MAAa;AAC/B,QAAAI,EAAO,oBAAoBJ,GAAWO,CAAa;AAAA,MACrD,CAAC,GAED,SAAS,KAAK,YAAYH,CAAM;AAAA,IAClC;AAAA,EACF,GAAG,CAACL,GAAYD,GAAOD,CAAK,CAAC,GAEtBG;AACT;AAEO,SAASS,EACdC,GACAC,IAAmB,GACyB;AAC5C,MAAID,KAAW,EAAG,OAAM,MAAM,qBAAqB;AACnD,MAAIC,KAAY,EAAG,OAAM,MAAM,sBAAsB;AAErD,QAAM,CAACC,GAAUC,CAAW,IAAIX,EAASQ,CAAO;AAEhD,SAAAP,EAAU,MAAM;AACd,UAAMW,IAAY,YAAY,MAAM;AAClC,MAAAD,EAAY,CAAAH,OACVA,IAAUA,IAAUC,GACbD,IAAU,IAAI,IAAIA,EAC1B;AAAA,IACH,GAAGC,IAAW,GAAI;AAElB,WAAO,MAAM;AACX,oBAAcG,CAAS;AAAA,IACzB;AAAA,EACF,GAAG,CAACH,CAAQ,CAAC,GAEN,CAACC,GAAUC,CAAW;AAC/B;AAEO,SAASE,EACdC,GACAC,GACAC,GACAC,IAGI,CAAA,GACE;AACN,QAAM,EAAE,SAAAC,GAAS,MAAAC,IAAO,CAAA,MAAOF;AAE/B,EAAAhB;AAAA,IACE,OACEa,EAAQ,iBAAiBC,GAAMC,GAAUE,CAAO,GAEzC,MAAM;AACX,MAAAJ,EAAQ,oBAAoBC,GAAMC,GAAUE,CAAO;AAAA,IACrD;AAAA;AAAA;AAAA,IAIFC;AAAA,EAAA;AAEJ;"}
@@ -0,0 +1,53 @@
1
+ export declare function camelCaseToSnakeCase(obj: Record<string, any>): void;
2
+
3
+ export declare const COUNTRIES: readonly ["Andorra", "United Arab Emirates (the)", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Åland Islands", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Saint Barthélemy", "Bermuda", "Brunei Darussalam", "Bolivia (Plurinational State of)", "Bonaire, Sint Eustatius and Saba", "Brazil", "Bahamas (the)", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos (Keeling) Islands (the)", "Congo (the Democratic Republic of the)", "Central African Republic (the)", "Congo (the)", "Switzerland", "Côte d'Ivoire", "Cook Islands (the)", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cabo Verde", "Curaçao", "Christmas Island", "Cyprus", "Czechia", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic (the", "Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji", "Falkland Islands (the) [Malvinas]", "Micronesia (Federated States of)", "Faroe Islands (the)", "France", "Gabon", "United Kingdom of Great Britain and Northern Ireland (the)", "Grenada", "Georgia", "French Guiana", "Guernsey", "Ghana", "Gibraltar", "Greenland", "Gambia (the)", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala", "Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "Isle of Man", "India", "British Indian Ocean Territory (the)", "Iraq", "Iran (Islamic Republic of)", "Iceland", "Italy", "Jersey", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros (the)", "Saint Kitts and Nevis", "Korea (the Democratic People's Republic of)", "Korea (the Republic of)", "Kuwait", "Cayman Islands (the)", "Kazakhstan", "Lao People's Democratic Republic (the)", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg", "Latvia", "Libya", "Morocco", "Monaco", "Moldova (the Republic of)", "Montenegro", "Saint Martin (French part)", "Madagascar", "Marshall Islands (the)", "Republic of North Macedonia", "Mali", "Myanmar", "Mongolia", "Macao", "Northern Mariana Islands (the)", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives", "Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger (the)", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands (the)", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia", "Papua New Guinea", "Philippines (the)", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn", "Puerto Rico", "Palestine, State of", "Portugal", "Palau", "Paraguay", "Qatar", "Réunion", "Romania", "Serbia", "Russian Federation (the)", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan (the)", "Sweden", "Singapore", "Saint Helena, Ascension and Tristan da Cunha", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname", "South Sudan", "Sao Tome and Principe", "El Salvador", "Sint Maarten (Dutch part)", "Syrian Arab Republic", "Eswatini", "Turks and Caicos Islands (the)", "Chad", "French Southern Territories (the)", "Togo", "Thailand", "Tajikistan", "Tokelau", "Timor-Leste", "Turkmenistan", "Tunisia", "Tonga", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan (Province of China)", "Tanzania, United Republic of", "Ukraine", "Uganda", "United States Minor Outlying Islands (the)", "United States of America (the)", "Uruguay", "Uzbekistan", "Holy See (the)", "Saint Vincent and the Grenadines", "Venezuela (Bolivarian Republic of)", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Viet Nam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte", "South Africa", "Zambia", "Zimbabwe"];
4
+
5
+ export declare type Countries = (typeof COUNTRIES)[number];
6
+
7
+ export declare const COUNTRY_ISO_CODE_MAPPING: Record<CountryIsoCodes, Countries>;
8
+
9
+ export declare const COUNTRY_ISO_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"];
10
+
11
+ export declare type CountryIsoCodes = (typeof COUNTRY_ISO_CODES)[number];
12
+
13
+ export declare function excludeKeyPaths(obj: object, exclude: string[], delimiter?: string): any;
14
+
15
+ export declare function generateSecureRandomString(length: number, charSet?: string): string;
16
+
17
+ export declare function getKeyPaths(obj: object, delimiter?: string): string[];
18
+
19
+ export declare function getNestedProperty(obj: Record<string, any>, dotPath: string | string[]): any;
20
+
21
+ export declare type IsOptional<T, K extends keyof T> = K extends OptionalPropertyNames<T> ? true : false;
22
+
23
+ export declare const MIN_DATE: Date;
24
+
25
+ export declare function openInNewTab(url: string, target?: string): void;
26
+
27
+ export declare type Optional<T, K extends keyof T> = Partial<Pick<T, K>>;
28
+
29
+ export declare type OptionalPropertyNames<T> = {
30
+ [K in keyof T]-?: {} extends {
31
+ [P in K]: T[K];
32
+ } ? K : never;
33
+ }[keyof T];
34
+
35
+ declare type Required_2<T, K extends keyof T> = {
36
+ [P in K]-?: T[P];
37
+ };
38
+ export { Required_2 as Required }
39
+
40
+ export declare function snakeCaseToCamelCase(obj: Record<string, any>): void;
41
+
42
+ export declare const UK_COUNTIES: readonly ["Aberdeen City", "Aberdeenshire", "Angus", "Argyll and Bute", "Bedfordshire", "Belfast", "Belfast Greater", "Berkshire", "Blaenau Gwent", "Bridgend", "Buckinghamshire", "Caerphilly", "Cambridgeshire", "Cardiff", "Carmarthenshire", "Ceredigion", "Channel Islands", "Cheshire", "City of Edinburgh", "Clackmannanshire", "Conwy", "Cornwall", "County Antrim", "County Armagh", "County Down", "County Fermanagh", "County Londonderry", "County Tyrone", "County of Bristol", "Cumbria", "Denbighshire", "Derbyshire", "Devon", "Dorset", "Dumfries and Galloway", "Dunbartonshire", "Dundee City", "Durham", "East Ayrshire", "East Dunbartonshire", "East Lothian", "East Renfrewshire", "East Riding of Yorkshire", "East Sussex", "Essex", "Falkirk", "Fife", "Flintshire", "Glasgow City", "Gloucestershire", "Greater London", "Greater Manchester", "Guernsey Channel Islands", "Gwynedd", "Hampshire", "Hereford and Worcester", "Herefordshire", "Hertfordshire", "Highland", "Inverclyde", "Inverness", "Isle of Anglesey", "Isle of Barra", "Isle of Man", "Isle of Wight", "Jersey Channel Islands", "Kent", "Lancashire", "Leicestershire", "Lincolnshire", "Merseyside", "Merthyr Tydfil", "Midlothian", "Monmouthshire", "Moray", "Neath Port Talbot", "Newport", "Norfolk", "North Ayrshire", "North Lanarkshire", "North Yorkshire", "Northamptonshire", "Northumberland", "Nottinghamshire", "Orkney", "Orkney Islands", "Oxfordshire", "Pembrokeshire", "Perth and Kinross", "Powys", "Renfrewshire", "Rhondda Cynon Taff", "Rutland", "Scottish Borders", "Shetland Islands", "Shropshire", "Somerset", "South Ayrshire", "South Lanarkshire", "South Yorkshire", "Staffordshire", "Stirling", "Suffolk", "Surrey", "Swansea", "Torfaen", "Tyne and Wear", "Vale of Glamorgan", "Warwickshire", "West Dunbart", "West Lothian", "West Midlands", "West Sussex", "West Yorkshire", "Western Isles", "Wiltshire", "Worcestershire", "Wrexham"];
43
+
44
+ export declare type UkCounties = (typeof UK_COUNTIES)[number];
45
+
46
+ export declare function withKeyPaths(obj: object, delimiter?: string): object;
47
+
48
+ export declare function wrap(newFn: {
49
+ before?: (...args: any[]) => void;
50
+ after?: (...args: any[]) => void;
51
+ }, fn?: (...args: any[]) => any): (...args: any[]) => any;
52
+
53
+ export { }
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../api-DIgp_6Vr.cjs"),e=require("../auth-Vf1MgMci.cjs"),t=require("react"),u=require("../general-BPbbmkeX.cjs");function a(){return t.useRef(null)}exports.usePagination=s.usePagination;exports.useLocation=e.useLocation;exports.useNavigate=e.useNavigate;exports.useOAuth2=e.useOAuth2;exports.useOAuth2CodeChallenge=e.useOAuth2CodeChallenge;exports.useOAuth2State=e.useOAuth2State;exports.useParams=e.useParams;exports.useParamsRequired=e.useParamsRequired;exports.useSearchParams=e.useSearchParams;exports.useSession=e.useSession;exports.useSessionMetadata=e.useSessionMetadata;exports.useCountdown=u.useCountdown;exports.useEventListener=u.useEventListener;exports.useExternalScript=u.useExternalScript;exports.useInputRef=a;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/hooks/form.tsx"],"sourcesContent":["import { useRef } from \"react\"\n\n/**\n * Shorthand for a reference to a HTML input element since this is so common for\n * forms.\n *\n * @returns Ref object to a HTML input element.\n */\nexport function useInputRef() {\n return useRef<HTMLInputElement>(null)\n}\n"],"names":["useInputRef","useRef"],"mappings":"iNAQO,SAASA,GAAc,CAC5B,OAAOC,EAAAA,OAAyB,IAAI,CACtC"}
@@ -0,0 +1,77 @@
1
+ export * from './api';
2
+ export * from './auth';
3
+ export * from './form';
4
+ export * from './general';
5
+ export * from './router';
6
+
7
+
8
+ declare module "@mui/material/styles" {
9
+ interface CustomPaletteColors {
10
+ tertiary: PaletteColor;
11
+ white: PaletteColor;
12
+ black: PaletteColor;
13
+ teacher: PaletteColor;
14
+ student: PaletteColor;
15
+ indy: PaletteColor;
16
+ }
17
+ interface Palette extends CustomPaletteColors {
18
+ }
19
+ interface PaletteOptions extends CustomPaletteColors {
20
+ }
21
+ }
22
+
23
+
24
+ declare module "@mui/material" {
25
+ interface FabPropsColorOverrides extends PropsColorOverrides {
26
+ }
27
+ interface CardPropsColorOverrides extends PropsColorOverrides {
28
+ }
29
+ interface ChipPropsColorOverrides extends PropsColorOverrides {
30
+ }
31
+ interface IconPropsColorOverrides extends PropsColorOverrides {
32
+ }
33
+ interface AlertPropsColorOverrides extends PropsColorOverrides {
34
+ }
35
+ interface BadgePropsColorOverrides extends PropsColorOverrides {
36
+ }
37
+ interface RadioPropsColorOverrides extends PropsColorOverrides {
38
+ }
39
+ interface AppBarPropsColorOverrides extends PropsColorOverrides {
40
+ }
41
+ interface ButtonPropsColorOverrides extends PropsColorOverrides {
42
+ }
43
+ interface SliderPropsColorOverrides extends PropsColorOverrides {
44
+ }
45
+ interface SwitchPropsColorOverrides extends PropsColorOverrides {
46
+ }
47
+ interface SvgIconPropsColorOverrides extends PropsColorOverrides {
48
+ }
49
+ interface CheckboxPropsColorOverrides extends PropsColorOverrides {
50
+ }
51
+ interface FormLabelPropsColorOverrides extends PropsColorOverrides {
52
+ }
53
+ interface InputBasePropsColorOverrides extends PropsColorOverrides {
54
+ }
55
+ interface TextFieldPropsColorOverrides extends PropsColorOverrides {
56
+ }
57
+ interface IconButtonPropsColorOverrides extends PropsColorOverrides {
58
+ }
59
+ interface PaginationPropsColorOverrides extends PropsColorOverrides {
60
+ }
61
+ interface ButtonGroupPropsColorOverrides extends PropsColorOverrides {
62
+ }
63
+ interface FormControlPropsColorOverrides extends PropsColorOverrides {
64
+ }
65
+ interface ToggleButtonPropsColorOverrides extends PropsColorOverrides {
66
+ }
67
+ interface LinearProgressPropsColorOverrides extends PropsColorOverrides {
68
+ }
69
+ interface PaginationItemPropsColorOverrides extends PropsColorOverrides {
70
+ }
71
+ interface CircularProgressPropsColorOverrides extends PropsColorOverrides {
72
+ }
73
+ interface TabsPropsIndicatorColorOverrides extends PropsColorOverrides {
74
+ }
75
+ interface ToggleButtonGroupPropsColorOverrides extends PropsColorOverrides {
76
+ }
77
+ }
@@ -0,0 +1,25 @@
1
+ import { u as r } from "../api-Cs4Y-WeI.js";
2
+ import { f as n, e as i, d as f, c as m, b as p, h, i as c, g as d, a as l, u as x } from "../auth-BPfUPjmM.js";
3
+ import { useRef as e } from "react";
4
+ import { a as g, b as P, u as A } from "../general-CtTJPCJn.js";
5
+ function a() {
6
+ return e(null);
7
+ }
8
+ export {
9
+ g as useCountdown,
10
+ P as useEventListener,
11
+ A as useExternalScript,
12
+ a as useInputRef,
13
+ n as useLocation,
14
+ i as useNavigate,
15
+ f as useOAuth2,
16
+ m as useOAuth2CodeChallenge,
17
+ p as useOAuth2State,
18
+ r as usePagination,
19
+ h as useParams,
20
+ c as useParamsRequired,
21
+ d as useSearchParams,
22
+ l as useSession,
23
+ x as useSessionMetadata
24
+ };
25
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../src/hooks/form.tsx"],"sourcesContent":["import { useRef } from \"react\"\n\n/**\n * Shorthand for a reference to a HTML input element since this is so common for\n * forms.\n *\n * @returns Ref object to a HTML input element.\n */\nexport function useInputRef() {\n return useRef<HTMLInputElement>(null)\n}\n"],"names":["useInputRef","useRef"],"mappings":";;;;AAQO,SAASA,IAAc;AAC5B,SAAOC,EAAyB,IAAI;AACtC;"}
@@ -0,0 +1,30 @@
1
+ import { j as e } from "./jsx-runtime-Dpn_P65e.js";
2
+ import { isValidElement as d } from "react";
3
+ import { TableContainer as m, Table as T, TableHead as p, TableRow as n, TableCell as o, TableBody as f, Stack as y } from "@mui/material";
4
+ const u = ({
5
+ headers: t,
6
+ children: s,
7
+ containerProps: r,
8
+ headProps: i,
9
+ headRowProps: c,
10
+ bodyProps: j,
11
+ ...x
12
+ }) => /* @__PURE__ */ e.jsx(m, { ...r, children: /* @__PURE__ */ e.jsxs(T, { ...x, children: [
13
+ /* @__PURE__ */ e.jsx(p, { ...i, children: /* @__PURE__ */ e.jsx(n, { ...c, children: t.map((l, b) => {
14
+ const a = `table-head-cell-${b}`;
15
+ return typeof l == "string" || d(l) ? /* @__PURE__ */ e.jsx(o, { children: l }, a) : /* @__PURE__ */ e.jsx(o, { ...l }, a);
16
+ }) }) }),
17
+ /* @__PURE__ */ e.jsx(f, { ...j, children: s })
18
+ ] }) }), C = ({ cellProps: t, ...s }) => /* @__PURE__ */ e.jsx(o, { ...t, children: /* @__PURE__ */ e.jsx(y, { ...s }) }), g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
19
+ __proto__: null,
20
+ BodyRow: n,
21
+ Cell: o,
22
+ CellStack: C,
23
+ Table: u
24
+ }, Symbol.toStringTag, { value: "Module" }));
25
+ export {
26
+ C,
27
+ u as T,
28
+ g as i
29
+ };
30
+ //# sourceMappingURL=index-2W--_sNE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-2W--_sNE.js","sources":["../src/components/table/Table.tsx","../src/components/table/CellStack.tsx"],"sourcesContent":["import { type FC, type ReactNode, isValidElement } from \"react\"\nimport {\n Table as MuiTable,\n type TableProps as MuiTableProps,\n TableBody,\n type TableBodyProps,\n TableCell,\n type TableCellProps,\n TableContainer,\n type TableContainerProps,\n TableHead,\n type TableHeadProps,\n TableRow,\n type TableRowProps,\n} from \"@mui/material\"\n\nexport interface TableProps extends MuiTableProps {\n headers: Array<ReactNode | TableCellProps>\n children: ReactNode\n containerProps?: TableContainerProps\n headProps?: TableHeadProps\n headRowProps?: TableRowProps\n bodyProps?: TableBodyProps\n}\n\nconst Table: FC<TableProps> = ({\n headers,\n children,\n containerProps,\n headProps,\n headRowProps,\n bodyProps,\n ...tableProps\n}) => (\n <TableContainer {...containerProps}>\n <MuiTable {...tableProps}>\n <TableHead {...headProps}>\n <TableRow {...headRowProps}>\n {headers.map((header, index) => {\n const key = `table-head-cell-${index}`\n\n return typeof header === \"string\" || isValidElement(header) ? (\n <TableCell key={key}>{header}</TableCell>\n ) : (\n <TableCell key={key} {...(header as TableCellProps)} />\n )\n })}\n </TableRow>\n </TableHead>\n <TableBody {...bodyProps}>{children}</TableBody>\n </MuiTable>\n </TableContainer>\n)\n\nexport default Table\n","import {\n Stack,\n type StackProps,\n TableCell,\n type TableCellProps,\n} from \"@mui/material\"\nimport { type FC } from \"react\"\n\nexport interface CellStackProps extends StackProps {\n cellProps?: TableCellProps\n}\n\nconst CellStack: FC<CellStackProps> = ({ cellProps, ...stackProps }) => (\n <TableCell {...cellProps}>\n <Stack {...stackProps} />\n </TableCell>\n)\n\nexport default CellStack\n"],"names":["Table","headers","children","containerProps","headProps","headRowProps","bodyProps","tableProps","TableContainer","jsxs","MuiTable","jsx","TableHead","TableRow","header","index","key","isValidElement","TableCell","TableBody","CellStack","cellProps","stackProps","Stack"],"mappings":";;;AAyBA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,4BACGC,GAAA,EAAgB,GAAGL,GAClB,UAAAM,gBAAAA,EAAAA,KAACC,GAAA,EAAU,GAAGH,GACZ,UAAA;AAAA,EAAAI,gBAAAA,EAAAA,IAACC,GAAA,EAAW,GAAGR,GACb,UAAAO,gBAAAA,EAAAA,IAACE,GAAA,EAAU,GAAGR,GACX,UAAAJ,EAAQ,IAAI,CAACa,GAAQC,MAAU;AAC9B,UAAMC,IAAM,mBAAmBD,CAAK;AAEpC,WAAO,OAAOD,KAAW,YAAYG,EAAeH,CAAM,IACxDH,gBAAAA,EAAAA,IAACO,GAAA,EAAqB,UAAAJ,EAAA,GAANE,CAAa,IAE7BL,gBAAAA,EAAAA,IAACO,GAAA,EAAqB,GAAIJ,KAAVE,CAAqC;AAAA,EAEzD,CAAC,GACH,GACF;AAAA,EACAL,gBAAAA,EAAAA,IAACQ,GAAA,EAAW,GAAGb,GAAY,UAAAJ,EAAA,CAAS;AAAA,EAAA,CACtC,EAAA,CACF,GCvCIkB,IAAgC,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,MACrDX,gBAAAA,EAAAA,IAACO,GAAA,EAAW,GAAGG,GACb,UAAAV,gBAAAA,EAAAA,IAACY,GAAA,EAAO,GAAGD,GAAY,EAAA,CACzB;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ "use strict";const l=require("./jsx-runtime-CeSfJrVB.cjs"),E=require("@mui/material"),b=require("react"),Ve=require("./api-CnMfjRk3.cjs"),qe=require("./api-DIgp_6Vr.cjs"),B=require("formik"),z=require("yup"),V=require("./utils/form.cjs.js"),O=require("./utils/general.cjs.js");require("./en-gb-CpyEkKq3.cjs");const ge=require("@mui/x-date-pickers"),D=require("dayjs"),se=require("@mui/icons-material");require("./settings/index.cjs.js");require("./session-CE2U7oL1.cjs");require("js-cookie");const $e=require("./schemas-BZbJpkD5.cjs");require("./urls-MaVXL_C2.cjs");function $(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function fe(){return fe=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var e in i)({}).hasOwnProperty.call(i,e)&&(n[e]=i[e])}return n},fe.apply(null,arguments)}const Ee=({useLazyListQuery:n,filterOptions:o,getOptionLabel:i,getOptionKey:e=a=>a.id,searchKey:t,...r})=>{const[a,u]=b.useState(""),[s,{isLoading:h,isError:c}]=n(),[{limit:x,offset:g},y]=qe.usePagination(),[{options:Y,hasMore:M},f]=b.useState({options:{},hasMore:!0});b.useEffect(()=>{const j={limit:x,offset:g,...o};a&&(j[t]=a),s(j,!0).unwrap().then(({data:T,offset:k,limit:F,count:w})=>{f(({options:C})=>{const R={...C};return T.forEach(L=>{R[e(L)]=L}),{options:R,hasMore:k+F<w}})}).catch(T=>{T&&console.error(T)})},[s,x,g,t,a,...Object.values(o||{})]);let d=Object.keys(Y);if(!d.length)return l.jsxRuntimeExports.jsx(l.jsxRuntimeExports.Fragment,{});typeof e(Object.values(Y)[0])=="number"&&(d=d.map(Number));function m(){y(({page:j,limit:T})=>({page:j+1,limit:T}))}const p=({children:j,...T},k)=>{const F=b.Children.toArray(j);return h?F.push(l.jsxRuntimeExports.jsx(E.CircularProgress,{},"is-loading")):(c&&F.push(l.jsxRuntimeExports.jsx(Ve.SyncError,{},"is-error")),M&&F.push(l.jsxRuntimeExports.jsx(E.Button,{onClick:m,children:"Load more"},"load-more"))),l.jsxRuntimeExports.jsx("ul",{...T,ref:k,onScroll:w=>{!h&&w.currentTarget.clientHeight+w.currentTarget.scrollTop>=w.currentTarget.scrollHeight&&m()},children:F})};return l.jsxRuntimeExports.jsx(H,{options:d,getOptionLabel:j=>i(Y[j]),onInputChange:(j,T,k)=>{u(k==="input"?T:"")},ListboxComponent:b.forwardRef(p),...r})},H=({textFieldProps:n,options:o,validateOptions:i,...e})=>{const{id:t,name:r,required:a,...u}=n,s=r.split("."),h="not a valid option";let c=typeof o[0]=="string"?z.string().oneOf(o,h):z.number().oneOf(o,h);a&&(c=c.required());const x={name:r,type:typeof o[0]=="string"?"text":"number",validate:V.schemaToFieldValidator(c,i)};return l.jsxRuntimeExports.jsx(B.Field,{...x,children:({form:g,meta:y})=>{const Y=O.getNestedProperty(g.values,s),M=O.getNestedProperty(g.touched,s),f=O.getNestedProperty(g.errors,s);return l.jsxRuntimeExports.jsx(E.Autocomplete,{options:o,defaultValue:y.initialValue===""?void 0:y.initialValue,renderInput:({id:d,...m})=>l.jsxRuntimeExports.jsx(E.TextField,{id:t??r,name:r,required:a,type:"text",value:Y,error:M&&!!f,helperText:M&&f,...u,...m}),onChange:(d,m)=>{g.setFieldValue(r,m??void 0,!0)},onBlur:g.handleBlur,...e})}})},we=({id:n,name:o,formControlLabelProps:i,required:e=!1,errorMessage:t="this is a required field",validateOptions:r,...a})=>{const u=o.split(".");let s=z.bool();e&&(s=s.oneOf([!0],t));const h={name:o,type:"checkbox",validate:V.schemaToFieldValidator(s,r)};return l.jsxRuntimeExports.jsx(B.Field,{...h,children:({form:c,meta:x})=>{const g=O.getNestedProperty(c.touched,u),y=O.getNestedProperty(c.errors,u),Y=O.getNestedProperty(c.values,u),M=g&&!!y;return l.jsxRuntimeExports.jsxs(E.FormControl,{error:M,required:e,children:[l.jsxRuntimeExports.jsx(E.FormControlLabel,{control:l.jsxRuntimeExports.jsx(E.Checkbox,{defaultChecked:x.initialValue,id:n??o,name:o,value:Y,onChange:c.handleChange,onBlur:c.handleBlur,...a}),...i}),M&&l.jsxRuntimeExports.jsx(E.FormHelperText,{children:y})]})}})},Fe=({textFieldProps:n,...o})=>{const{name:i="country",label:e="Country",placeholder:t="Select your country",...r}=n||{};return l.jsxRuntimeExports.jsx(H,{options:O.COUNTRY_ISO_CODES,getOptionLabel:a=>O.COUNTRY_ISO_CODE_MAPPING[a],textFieldProps:{name:i,label:e,placeholder:t,...r},...o})};var K={exports:{}},He=K.exports,ye;function We(){return ye||(ye=1,(function(n,o){(function(i,e){n.exports=e()})(He,(function(){var i="week",e="year";return function(t,r,a){var u=r.prototype;u.week=function(s){if(s===void 0&&(s=null),s!==null)return this.add(7*(s-this.week()),"day");var h=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=a(this).startOf(e).add(1,e).date(h),x=a(this).endOf(i);if(c.isBefore(x))return 1}var g=a(this).startOf(e).date(h).startOf(i).subtract(1,"millisecond"),y=this.diff(g,i,!0);return y<0?a(this).startOf("week").week():Math.ceil(y)},u.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}}))})(K)),K.exports}var Ge=We();const Ze=$(Ge);var J={exports:{}},Xe=J.exports,je;function Qe(){return je||(je=1,(function(n,o){(function(i,e){n.exports=e()})(Xe,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t=/\d/,r=/\d\d/,a=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,s={},h=function(f){return(f=+f)+(f>68?1900:2e3)},c=function(f){return function(d){this[f]=+d}},x=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=(function(d){if(!d||d==="Z")return 0;var m=d.match(/([+-]|\d\d)/g),p=60*m[1]+(+m[2]||0);return p===0?0:m[0]==="+"?-p:p})(f)}],g=function(f){var d=s[f];return d&&(d.indexOf?d:d.s.concat(d.f))},y=function(f,d){var m,p=s.meridiem;if(p){for(var j=1;j<=24;j+=1)if(f.indexOf(p(j,0,d))>-1){m=j>12;break}}else m=f===(d?"pm":"PM");return m},Y={A:[u,function(f){this.afternoon=y(f,!1)}],a:[u,function(f){this.afternoon=y(f,!0)}],Q:[t,function(f){this.month=3*(f-1)+1}],S:[t,function(f){this.milliseconds=100*+f}],SS:[r,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[r,c("day")],Do:[u,function(f){var d=s.ordinal,m=f.match(/\d+/);if(this.day=m[0],d)for(var p=1;p<=31;p+=1)d(p).replace(/\[|\]/g,"")===f&&(this.day=p)}],w:[a,c("week")],ww:[r,c("week")],M:[a,c("month")],MM:[r,c("month")],MMM:[u,function(f){var d=g("months"),m=(g("monthsShort")||d.map((function(p){return p.slice(0,3)}))).indexOf(f)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[u,function(f){var d=g("months").indexOf(f)+1;if(d<1)throw new Error;this.month=d%12||d}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(f){this.year=h(f)}],YYYY:[/\d{4}/,c("year")],Z:x,ZZ:x};function M(f){var d,m;d=f,m=s&&s.formats;for(var p=(f=d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,L,v){var S=v&&v.toUpperCase();return L||m[v]||i[v]||m[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,_,N){return _||N.slice(1)}))}))).match(e),j=p.length,T=0;T<j;T+=1){var k=p[T],F=Y[k],w=F&&F[0],C=F&&F[1];p[T]=C?{regex:w,parser:C}:k.replace(/^\[|\]$/g,"")}return function(R){for(var L={},v=0,S=0;v<j;v+=1){var A=p[v];if(typeof A=="string")S+=A.length;else{var _=A.regex,N=A.parser,W=R.slice(S),U=_.exec(W)[0];N.call(L,U),R=R.replace(U,"")}}return(function(I){var G=I.afternoon;if(G!==void 0){var P=I.hours;G?P<12&&(I.hours+=12):P===12&&(I.hours=0),delete I.afternoon}})(L),L}}return function(f,d,m){m.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(h=f.parseTwoDigitYear);var p=d.prototype,j=p.parse;p.parse=function(T){var k=T.date,F=T.utc,w=T.args;this.$u=F;var C=w[1];if(typeof C=="string"){var R=w[2]===!0,L=w[3]===!0,v=R||L,S=w[2];L&&(S=w[2]),s=this.$locale(),!R&&S&&(s=m.Ls[S]),this.$d=(function(W,U,I,G){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*W);var P=M(U)(W),ne=P.year,Z=P.month,_e=P.day,Be=P.hours,Ne=P.minutes,Ie=P.seconds,Ue=P.milliseconds,pe=P.zone,xe=P.week,ie=new Date,oe=_e||(ne||Z?1:ie.getDate()),ae=ne||ie.getFullYear(),X=0;ne&&!Z||(X=Z>0?Z-1:ie.getMonth());var Q,ue=Be||0,ce=Ne||0,de=Ie||0,le=Ue||0;return pe?new Date(Date.UTC(ae,X,oe,ue,ce,de,le+60*pe.offset*1e3)):I?new Date(Date.UTC(ae,X,oe,ue,ce,de,le)):(Q=new Date(ae,X,oe,ue,ce,de,le),xe&&(Q=G(Q).week(xe).toDate()),Q)}catch{return new Date("")}})(k,C,F,m),this.init(),S&&S!==!0&&(this.$L=this.locale(S).$L),v&&k!=this.format(C)&&(this.$d=new Date("")),s={}}else if(C instanceof Array)for(var A=C.length,_=1;_<=A;_+=1){w[1]=C[_-1];var N=m.apply(this,w);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}_===A&&(this.$d=new Date(""))}else j.call(this,T)}}}))})(J)),J.exports}var Ke=Qe();const Je=$(Ke);var ee={exports:{}},et=ee.exports,Me;function tt(){return Me||(Me=1,(function(n,o){(function(i,e){n.exports=e()})(et,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,t,r){var a=t.prototype,u=a.format;r.en.formats=i,a.format=function(s){s===void 0&&(s="YYYY-MM-DDTHH:mm:ssZ");var h=this.$locale().formats,c=(function(x,g){return x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(y,Y,M){var f=M&&M.toUpperCase();return Y||g[M]||i[M]||g[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(d,m,p){return m||p.slice(1)}))}))})(s,h===void 0?{}:h);return u.call(this,c)}}}))})(ee)),ee.exports}var rt=tt();const st=$(rt);var te={exports:{}},nt=te.exports,Te;function it(){return Te||(Te=1,(function(n,o){(function(i,e){n.exports=e()})(nt,(function(){return function(i,e,t){e.prototype.isBetween=function(r,a,u,s){var h=t(r),c=t(a),x=(s=s||"()")[0]==="(",g=s[1]===")";return(x?this.isAfter(h,u):!this.isBefore(h,u))&&(g?this.isBefore(c,u):!this.isAfter(c,u))||(x?this.isBefore(h,u):!this.isAfter(h,u))&&(g?this.isAfter(c,u):!this.isBefore(c,u))}}}))})(te)),te.exports}var ot=it();const at=$(ot);var re={exports:{}},ut=re.exports,Oe;function ct(){return Oe||(Oe=1,(function(n,o){(function(i,e){n.exports=e()})(ut,(function(){return function(i,e){var t=e.prototype,r=t.format;t.format=function(a){var u=this,s=this.$locale();if(!this.isValid())return r.bind(this)(a);var h=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(x){switch(x){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return s.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return s.ordinal(u.week(),"W");case"w":case"ww":return h.s(u.week(),x==="w"?1:2,"0");case"W":case"WW":return h.s(u.isoWeek(),x==="W"?1:2,"0");case"k":case"kk":return h.s(String(u.$H===0?24:u.$H),x==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return x}}));return r.bind(this)(c)}}}))})(re)),re.exports}var dt=ct();const lt=$(dt),Ye=new Set;function ht(n,o="warning"){if(process.env.NODE_ENV==="production")return;const i=Array.isArray(n)?n.join(`
2
+ `):n;Ye.has(i)||(Ye.add(i),o==="error"?console.error(i):console.warn(i))}D.extend(st);D.extend(Ze);D.extend(at);D.extend(lt);const ft={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},mt={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},he=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
3
+ `),De=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
4
+ `),pt=(n,o)=>o?(...i)=>n(...i).locale(o):n;class xt{constructor({locale:o,formats:i}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=ft,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>typeof D.utc<"u",this.hasTimezonePlugin=()=>typeof D.tz<"u",this.isSame=(e,t,r)=>{const a=this.setTimezone(t,this.getTimezone(e));return e.format(r)===a.format(r)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return D.tz.guess();default:return e}},this.createSystemDate=e=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=D.tz.guess();return t!=="UTC"?D.tz(e,t):D(e)}return D(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(he);return D.utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(he);if(!this.hasTimezonePlugin())throw new Error(De);const r=e!==void 0&&!e.endsWith("Z");return D(e).tz(this.cleanTimezone(t),r)},this.getLocaleFormats=()=>{const e=D.Ls,t=this.locale||"en";let r=e[t];return r===void 0&&(process.env.NODE_ENV!=="production"&&ht(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),r=e.en),r.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if(t!=="UTC"){const r=e.tz(this.cleanTimezone(t),!0);if(r.$offset===(e.$offset??0))return e;e.$offset=r.$offset}return e},this.date=(e,t="default")=>{if(e===null)return null;let r;return t==="UTC"?r=this.createUTCDate(e):t==="system"||t==="default"&&!this.hasTimezonePlugin()?r=this.createSystemDate(e):r=this.createTZDate(e,t),this.locale===void 0?r:r.locale(this.locale)},this.getInvalidDate=()=>D(new Date("Invalid date")),this.getTimezone=e=>{if(this.hasTimezonePlugin()){const t=e.$x?.$timezone;if(t)return t}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if(t==="UTC"){if(!this.hasUTCPlugin())throw new Error(he);return e.utc()}if(t==="system")return e.local();if(!this.hasTimezonePlugin()){if(t==="default")return e;throw new Error(De)}return D.tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parse=(e,t)=>e===""?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats(),r=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(u,s,h)=>s||h.slice(1));return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,u,s)=>{const h=s&&s.toUpperCase();return u||t[s]||r(t[h])})},this.isValid=e=>e==null?!1:e.isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.isEqual=(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:e.toDate().getTime()===t.toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,[t,r])=>e>=t&&e<=r,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),r=this.endOfWeek(this.endOfMonth(e));let a=0,u=t;const s=[];for(;u<r;){const h=Math.floor(a/7);s[h]=s[h]||[],s[h].push(u),u=this.addDays(u,1),a+=1}return s},this.getWeekNumber=e=>e.week(),this.getYearRange=([e,t])=>{const r=this.startOfYear(e),a=this.endOfYear(t),u=[];let s=r;for(;this.isBefore(s,a);)u.push(s),s=this.addYears(s,1);return u},this.dayjs=pt(D,o),this.locale=o,this.formats=fe({},mt,i),D.extend(Je)}getDayOfWeek(o){return o.day()+1}}const be=({name:n,required:o,minDate:i,maxDate:e,validateOptions:t,...r})=>{const a=n.split(".");function u(c){return c.locale("en-gb").format("L")}let s=z.date();o&&(s=s.required()),i&&(s=s.min(i,`this field must be after or equal to ${u(i)}`)),e&&(s=s.max(e,`this field must be before or equal to ${u(e)}`));const h={name:n,type:"date",validate:V.schemaToFieldValidator(s,t)};return l.jsxRuntimeExports.jsx(B.Field,{...h,children:({form:c})=>{const x=O.getNestedProperty(c.errors,a),g=O.getNestedProperty(c.touched,a);let y=O.getNestedProperty(c.values,a);y=y?D(y):null;function Y(M){c.setFieldValue(n,M&&M.isValid()?M.format("YYYY-MM-DD"):null,!0)}return l.jsxRuntimeExports.jsx(ge.LocalizationProvider,{dateAdapter:xt,adapterLocale:"en-gb",children:l.jsxRuntimeExports.jsx(ge.DatePicker,{name:n,value:y,minDate:i,maxDate:e,onChange:Y,slotProps:{textField:{id:n,onChange:M=>{Y(M)},onBlur:c.handleBlur,required:o,error:g&&!!x,helperText:g&&x}},...r})})}})},q=({id:n,name:o,schema:i,type:e="text",required:t=!1,dirty:r=!1,unique:a=!1,uniqueCaseInsensitive:u=!1,split:s,validateOptions:h,...c})=>{const[x,g]=b.useState(""),y=o.split(".");function Y(){let d=i;if(d=t?d.required():d.optional(),r&&!s&&(d=d.notOneOf([x],"cannot be initial value")),!s)return d;let m=z.array().of(d);return m=t?m.required().min(1):m.optional(),(a||u)&&(m=m.test({message:"cannot have duplicates",test:p=>Array.isArray(p)&&p.length>=2&&p.every(j=>typeof j=="string")?new Set(u?p.map(j=>j.toLowerCase()):p).size===p.length:!0})),r&&(m=m.notOneOf([x],"cannot be initial value")),m}const M={name:o,type:e,validate:V.schemaToFieldValidator(Y(),h)},f=({form:d})=>{const m=O.getNestedProperty(d.initialValues,y),p=O.getNestedProperty(d.values,y),j=O.getNestedProperty(d.errors,y),T=O.getNestedProperty(d.touched,y);return b.useEffect(()=>{g(m)},[m]),b.useEffect(()=>{d.setFieldValue(o,s&&typeof p=="string"?p.split(s):p,!0)},[p]),l.jsxRuntimeExports.jsx(E.TextField,{id:n??o,name:o,type:e,required:t,value:p,onChange:d.handleChange,onBlur:d.handleBlur,error:T&&!!j,helperText:T&&j,...c})};return l.jsxRuntimeExports.jsx(B.Field,{...M,children:f})},Pe=({name:n="email",label:o="Email address",placeholder:i="Enter your email address",InputProps:e={},...t})=>l.jsxRuntimeExports.jsx(q,{type:"email",schema:z.string().email(),name:n,label:o,placeholder:i,InputProps:{endAdornment:l.jsxRuntimeExports.jsx(E.InputAdornment,{position:"end",children:l.jsxRuntimeExports.jsx(se.EmailOutlined,{})}),...e},...t}),ke=({name:n="first_name",label:o="First name",placeholder:i="Enter your first name",InputProps:e={},...t})=>l.jsxRuntimeExports.jsx(q,{schema:$e.user.first_name,name:n,label:o,placeholder:i,InputProps:{endAdornment:l.jsxRuntimeExports.jsx(E.InputAdornment,{position:"end",children:l.jsxRuntimeExports.jsx(se.PersonOutlined,{})}),...e},...t}),Ce={behavior:"smooth",block:"start"},gt=({scrollIntoViewOptions:n=Ce,...o})=>{const i=b.useRef(null);return b.useEffect(()=>{i.current&&i.current.scrollIntoView(n)},[n]),l.jsxRuntimeExports.jsx(E.FormHelperText,{ref:i,error:!0,...o})},Le=({children:n,scrollIntoViewOptions:o=Ce,nonFieldErrorsProps:i,fieldRefs:e=[],...t})=>l.jsxRuntimeExports.jsx(B.Formik,{...t,children:r=>{const a=!!Object.keys(r.errors).length,u=a&&typeof r.errors.__all__=="string";if(a&&!u&&r.isSubmitting&&e.length){const s=O.getKeyPaths(r.errors),h=e.find(({name:c})=>s.includes(c))?.inputRef.current;h&&h.scrollIntoView(o)}return l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[u&&l.jsxRuntimeExports.jsx(gt,{...i,children:r.errors.__all__}),l.jsxRuntimeExports.jsx(B.Form,{children:typeof n=="function"?n(r):n})]})}}),yt=({useMutation:n,submitOptions:o,...i})=>{const[e]=n();return l.jsxRuntimeExports.jsx(Le,{...i,onSubmit:V.submitForm(e,i.initialValues,o)})},Se=n=>"onSubmit"in n?l.jsxRuntimeExports.jsx(Le,{...n}):yt(n),Re=({name:n="otp",label:o="OTP",placeholder:i="Enter your OTP",...e})=>l.jsxRuntimeExports.jsx(q,{name:n,label:o,schema:z.string().matches(/^[0-9]{6}$/,"Must be exactly 6 digits."),placeholder:i,required:!0,...e}),jt=({id:n,repeatName:o,setValue:i,fieldProps:e,name:t,label:r,placeholder:a,type:u,...s})=>{const{form:h}=e,c=t.split("."),x=O.getNestedProperty(h.values,c),g=o.split("."),y=O.getNestedProperty(h.values,g),Y=O.getNestedProperty(h.touched,g),M=O.getNestedProperty(h.errors,g);return b.useEffect(()=>{i(x)},[i,x]),l.jsxRuntimeExports.jsx(E.TextField,{required:!0,type:u,label:r??`Repeat ${t.replace("_"," ")}`,placeholder:a??`Enter your ${t.replace("_"," ")} again`,id:n??o,name:o,value:y,onChange:h.handleChange,onBlur:h.handleBlur,error:Y&&!!M,helperText:Y&&M,...s})},me=({name:n,type:o="text",validateOptions:i,...e})=>{const[t,r]=b.useState(""),a=`${n}_repeat`,u={name:a,type:o,validate:V.schemaToFieldValidator(z.string().required().equals([t],"does not match"),i)};return l.jsxRuntimeExports.jsx(B.Field,{...u,children:s=>l.jsxRuntimeExports.jsx(jt,{name:n,type:o,repeatName:a,setValue:r,fieldProps:s,...e})})},ve=({name:n="password",label:o="Password",placeholder:i="Enter your password",schema:e=z.string(),InputProps:t={},withRepeatField:r=!1,repeatFieldProps:a={},...u})=>{const[s,h]=b.useState(!1),c=s?"text":"password",x=l.jsxRuntimeExports.jsx(E.InputAdornment,{position:"end",children:l.jsxRuntimeExports.jsx(E.IconButton,{onClick:()=>{h(g=>!g)},edge:"end",children:s?l.jsxRuntimeExports.jsx(se.Visibility,{}):l.jsxRuntimeExports.jsx(se.VisibilityOff,{})})});return l.jsxRuntimeExports.jsxs(l.jsxRuntimeExports.Fragment,{children:[l.jsxRuntimeExports.jsx(q,{autoComplete:"off",type:c,name:n,label:o,schema:e,placeholder:i,InputProps:{endAdornment:x,...t},...u}),r&&l.jsxRuntimeExports.jsx(me,{name:n,type:c,...a,InputProps:{endAdornment:x,...a.InputProps}})]})},ze=({children:n="Submit",...o})=>{function i(e,t){t=t||{};for(const r in e){const a=e[r];t[r]=a instanceof Object&&a.constructor===Object?i(a,t):!0}return t}return l.jsxRuntimeExports.jsx(B.Field,{name:"submit",type:"submit",children:({form:e})=>l.jsxRuntimeExports.jsx(E.Button,{type:"button",onClick:()=>{e.setTouched(i(e.values),!0).then(t=>{const r=!!(t&&Object.keys(t).length);e.setSubmitting(r),r||e.submitForm()})},...o,children:n})})},Ae=({textFieldProps:n,...o})=>{const{name:i="uk_county",label:e="UK county",placeholder:t="Select your UK county",...r}=n||{};return l.jsxRuntimeExports.jsx(H,{options:O.UK_COUNTIES,textFieldProps:{name:i,label:e,placeholder:t,...r},...o})},Mt=Object.freeze(Object.defineProperty({__proto__:null,ApiAutocompleteField:Ee,AutocompleteField:H,CheckboxField:we,CountryField:Fe,DatePickerField:be,EmailField:Pe,FirstNameField:ke,Form:Se,OtpField:Re,PasswordField:ve,RepeatField:me,SubmitButton:ze,TextField:q,UkCountyField:Ae},Symbol.toStringTag,{value:"Module"}));exports.ApiAutocompleteField=Ee;exports.AutocompleteField=H;exports.CheckboxField=we;exports.CountryField=Fe;exports.DatePickerField=be;exports.EmailField=Pe;exports.FirstNameField=ke;exports.Form=Se;exports.OtpField=Re;exports.PasswordField=ve;exports.RepeatField=me;exports.SubmitButton=ze;exports.TextField=q;exports.UkCountyField=Ae;exports.index=Mt;
5
+ //# sourceMappingURL=index-BUMdUVBH.cjs.map