alepha 0.19.0 → 0.19.2

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 (638) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -9
  3. package/dist/api/audits/index.d.ts +378 -346
  4. package/dist/api/audits/index.d.ts.map +1 -1
  5. package/dist/api/files/index.d.ts +216 -184
  6. package/dist/api/files/index.d.ts.map +1 -1
  7. package/dist/api/files/index.js +5 -1
  8. package/dist/api/files/index.js.map +1 -1
  9. package/dist/api/jobs/index.d.ts +528 -496
  10. package/dist/api/jobs/index.d.ts.map +1 -1
  11. package/dist/api/jobs/index.js +3 -3
  12. package/dist/api/jobs/index.js.map +1 -1
  13. package/dist/api/keys/index.d.ts +202 -202
  14. package/dist/api/keys/index.d.ts.map +1 -1
  15. package/dist/api/notifications/index.d.ts +152 -152
  16. package/dist/api/notifications/index.d.ts.map +1 -1
  17. package/dist/api/organizations/index.browser.js +48 -0
  18. package/dist/api/organizations/index.browser.js.map +1 -0
  19. package/dist/api/organizations/index.d.ts +516 -0
  20. package/dist/api/organizations/index.d.ts.map +1 -0
  21. package/dist/api/organizations/index.js +202 -0
  22. package/dist/api/organizations/index.js.map +1 -0
  23. package/dist/api/parameters/index.d.ts +391 -358
  24. package/dist/api/parameters/index.d.ts.map +1 -1
  25. package/dist/api/parameters/index.js +5 -1
  26. package/dist/api/parameters/index.js.map +1 -1
  27. package/dist/api/users/index.browser.js +7 -5
  28. package/dist/api/users/index.browser.js.map +1 -1
  29. package/dist/api/users/index.d.ts +989 -931
  30. package/dist/api/users/index.d.ts.map +1 -1
  31. package/dist/api/users/index.js +292 -146
  32. package/dist/api/users/index.js.map +1 -1
  33. package/dist/api/verifications/index.d.ts +132 -132
  34. package/dist/api/verifications/index.d.ts.map +1 -1
  35. package/dist/api/verifications/index.js +2 -2
  36. package/dist/api/verifications/index.js.map +1 -1
  37. package/dist/batch/index.d.ts +6 -6
  38. package/dist/batch/index.d.ts.map +1 -1
  39. package/dist/billing/index.d.ts +1048 -0
  40. package/dist/billing/index.d.ts.map +1 -0
  41. package/dist/billing/index.js +713 -0
  42. package/dist/billing/index.js.map +1 -0
  43. package/dist/bin/index.js +0 -2
  44. package/dist/bin/index.js.map +1 -1
  45. package/dist/bucket/index.d.ts +10 -10
  46. package/dist/bucket/index.d.ts.map +1 -1
  47. package/dist/bucket/index.js +2 -2
  48. package/dist/bucket/index.js.map +1 -1
  49. package/dist/cache/core/index.d.ts +9 -9
  50. package/dist/cache/core/index.d.ts.map +1 -1
  51. package/dist/cache/core/index.js +2 -2
  52. package/dist/cache/core/index.js.map +1 -1
  53. package/dist/cache/core/index.workerd.js +2 -2
  54. package/dist/cache/core/index.workerd.js.map +1 -1
  55. package/dist/cache/redis/index.d.ts +6 -6
  56. package/dist/cache/redis/index.d.ts.map +1 -1
  57. package/dist/cache/redis/index.js +2 -2
  58. package/dist/cache/redis/index.js.map +1 -1
  59. package/dist/cli/config/index.d.ts +12 -2
  60. package/dist/cli/config/index.d.ts.map +1 -1
  61. package/dist/cli/config/index.js +4 -0
  62. package/dist/cli/config/index.js.map +1 -1
  63. package/dist/cli/core/index.d.ts +183 -139
  64. package/dist/cli/core/index.d.ts.map +1 -1
  65. package/dist/cli/core/index.js +283 -86
  66. package/dist/cli/core/index.js.map +1 -1
  67. package/dist/cli/devtools/index.d.ts +45 -0
  68. package/dist/cli/devtools/index.d.ts.map +1 -0
  69. package/dist/cli/devtools/index.js +170 -0
  70. package/dist/cli/devtools/index.js.map +1 -0
  71. package/dist/cli/platform/index.d.ts +383 -492
  72. package/dist/cli/platform/index.d.ts.map +1 -1
  73. package/dist/cli/platform/index.js +42 -511
  74. package/dist/cli/platform/index.js.map +1 -1
  75. package/dist/cli/vendor/index.d.ts +196 -0
  76. package/dist/cli/vendor/index.d.ts.map +1 -0
  77. package/dist/cli/vendor/index.js +384 -0
  78. package/dist/cli/vendor/index.js.map +1 -0
  79. package/dist/command/index.d.ts +18 -18
  80. package/dist/command/index.d.ts.map +1 -1
  81. package/dist/command/index.js +2 -2
  82. package/dist/command/index.js.map +1 -1
  83. package/dist/core/index.browser.js +4 -4
  84. package/dist/core/index.browser.js.map +1 -1
  85. package/dist/core/index.d.ts +10 -10
  86. package/dist/core/index.d.ts.map +1 -1
  87. package/dist/core/index.js +4 -4
  88. package/dist/core/index.js.map +1 -1
  89. package/dist/core/index.native.js +4 -4
  90. package/dist/core/index.native.js.map +1 -1
  91. package/dist/core/index.workerd.js +4 -4
  92. package/dist/core/index.workerd.js.map +1 -1
  93. package/dist/crypto/index.d.ts +7 -7
  94. package/dist/crypto/index.d.ts.map +1 -1
  95. package/dist/datetime/index.d.ts +4 -4
  96. package/dist/datetime/index.d.ts.map +1 -1
  97. package/dist/email/brevo/index.d.ts +4 -4
  98. package/dist/email/brevo/index.d.ts.map +1 -1
  99. package/dist/email/core/index.d.ts +15 -11
  100. package/dist/email/core/index.d.ts.map +1 -1
  101. package/dist/email/core/index.js +12 -35
  102. package/dist/email/core/index.js.map +1 -1
  103. package/dist/email/smtp/index.d.ts +12 -12
  104. package/dist/email/smtp/index.d.ts.map +1 -1
  105. package/dist/email/smtp/index.js +7 -4
  106. package/dist/email/smtp/index.js.map +1 -1
  107. package/dist/fake/index.d.ts +4 -8
  108. package/dist/fake/index.d.ts.map +1 -1
  109. package/dist/fake/index.js +55 -889
  110. package/dist/fake/index.js.map +1 -1
  111. package/dist/lock/core/index.d.ts +13 -13
  112. package/dist/lock/core/index.d.ts.map +1 -1
  113. package/dist/lock/core/index.js +2 -2
  114. package/dist/lock/core/index.js.map +1 -1
  115. package/dist/lock/redis/index.d.ts +4 -4
  116. package/dist/lock/redis/index.d.ts.map +1 -1
  117. package/dist/logger/index.d.ts +16 -15
  118. package/dist/logger/index.d.ts.map +1 -1
  119. package/dist/logger/index.js +5 -2
  120. package/dist/logger/index.js.map +1 -1
  121. package/dist/mcp/index.d.ts +11 -11
  122. package/dist/mcp/index.d.ts.map +1 -1
  123. package/dist/mcp/index.js +2 -2
  124. package/dist/mcp/index.js.map +1 -1
  125. package/dist/orm/core/index.browser.js +11 -1
  126. package/dist/orm/core/index.browser.js.map +1 -1
  127. package/dist/orm/core/index.bun.js +53 -16
  128. package/dist/orm/core/index.bun.js.map +1 -1
  129. package/dist/orm/core/index.d.ts +95 -51
  130. package/dist/orm/core/index.d.ts.map +1 -1
  131. package/dist/orm/core/index.js +55 -14
  132. package/dist/orm/core/index.js.map +1 -1
  133. package/dist/orm/postgres/index.bun.js +17 -11
  134. package/dist/orm/postgres/index.bun.js.map +1 -1
  135. package/dist/orm/postgres/index.d.ts +21 -15
  136. package/dist/orm/postgres/index.d.ts.map +1 -1
  137. package/dist/orm/postgres/index.js +19 -13
  138. package/dist/orm/postgres/index.js.map +1 -1
  139. package/dist/queue/core/index.d.ts +14 -14
  140. package/dist/queue/core/index.d.ts.map +1 -1
  141. package/dist/queue/core/index.js +2 -2
  142. package/dist/queue/core/index.js.map +1 -1
  143. package/dist/queue/core/index.workerd.js +2 -2
  144. package/dist/queue/core/index.workerd.js.map +1 -1
  145. package/dist/queue/redis/index.d.ts +4 -4
  146. package/dist/queue/redis/index.d.ts.map +1 -1
  147. package/dist/queue/redis/index.js +2 -2
  148. package/dist/queue/redis/index.js.map +1 -1
  149. package/dist/react/auth/index.d.ts +9 -9
  150. package/dist/react/auth/index.d.ts.map +1 -1
  151. package/dist/react/core/index.d.ts +6 -6
  152. package/dist/react/core/index.d.ts.map +1 -1
  153. package/dist/react/core/index.js +5 -4
  154. package/dist/react/core/index.js.map +1 -1
  155. package/dist/react/form/index.d.ts +4 -4
  156. package/dist/react/form/index.d.ts.map +1 -1
  157. package/dist/react/head/index.d.ts +4 -4
  158. package/dist/react/head/index.d.ts.map +1 -1
  159. package/dist/react/i18n/index.d.ts +9 -9
  160. package/dist/react/i18n/index.d.ts.map +1 -1
  161. package/dist/react/intro/index.d.ts +2 -2
  162. package/dist/react/intro/index.d.ts.map +1 -1
  163. package/dist/react/intro/index.js +3 -4
  164. package/dist/react/intro/index.js.map +1 -1
  165. package/dist/react/router/index.browser.js +4 -5
  166. package/dist/react/router/index.browser.js.map +1 -1
  167. package/dist/react/router/index.d.ts +215 -215
  168. package/dist/react/router/index.d.ts.map +1 -1
  169. package/dist/react/router/index.js +6 -7
  170. package/dist/react/router/index.js.map +1 -1
  171. package/dist/react/testing/index.d.ts +2 -2
  172. package/dist/react/testing/index.d.ts.map +1 -1
  173. package/dist/react/testing/index.js +2 -4
  174. package/dist/react/testing/index.js.map +1 -1
  175. package/dist/redis/index.d.ts +19 -19
  176. package/dist/redis/index.d.ts.map +1 -1
  177. package/dist/retry/index.d.ts +4 -4
  178. package/dist/retry/index.d.ts.map +1 -1
  179. package/dist/scheduler/index.d.ts +13 -13
  180. package/dist/scheduler/index.d.ts.map +1 -1
  181. package/dist/scheduler/index.js +2 -2
  182. package/dist/scheduler/index.js.map +1 -1
  183. package/dist/scheduler/index.workerd.js +2 -2
  184. package/dist/scheduler/index.workerd.js.map +1 -1
  185. package/dist/security/index.browser.js +1 -1
  186. package/dist/security/index.browser.js.map +1 -1
  187. package/dist/security/index.d.ts +47 -47
  188. package/dist/security/index.d.ts.map +1 -1
  189. package/dist/security/index.js +9 -12
  190. package/dist/security/index.js.map +1 -1
  191. package/dist/server/auth/index.d.ts +170 -169
  192. package/dist/server/auth/index.d.ts.map +1 -1
  193. package/dist/server/auth/index.js +16 -2
  194. package/dist/server/auth/index.js.map +1 -1
  195. package/dist/server/cookies/index.d.ts +7 -7
  196. package/dist/server/cookies/index.d.ts.map +1 -1
  197. package/dist/server/core/index.d.ts +76 -76
  198. package/dist/server/core/index.d.ts.map +1 -1
  199. package/dist/server/core/index.js +23 -17
  200. package/dist/server/core/index.js.map +1 -1
  201. package/dist/server/cors/index.d.ts +13 -13
  202. package/dist/server/cors/index.d.ts.map +1 -1
  203. package/dist/server/cors/index.js +2 -2
  204. package/dist/server/cors/index.js.map +1 -1
  205. package/dist/server/etag/index.d.ts +9 -9
  206. package/dist/server/etag/index.d.ts.map +1 -1
  207. package/dist/server/health/index.d.ts +20 -20
  208. package/dist/server/health/index.d.ts.map +1 -1
  209. package/dist/server/links/index.browser.js +2 -2
  210. package/dist/server/links/index.browser.js.map +1 -1
  211. package/dist/server/links/index.d.ts +66 -66
  212. package/dist/server/links/index.d.ts.map +1 -1
  213. package/dist/server/links/index.js +4 -4
  214. package/dist/server/links/index.js.map +1 -1
  215. package/dist/server/metrics/index.d.ts +7 -7
  216. package/dist/server/metrics/index.d.ts.map +1 -1
  217. package/dist/server/proxy/index.d.ts +5 -5
  218. package/dist/server/proxy/index.d.ts.map +1 -1
  219. package/dist/server/rate-limit/index.d.ts +12 -12
  220. package/dist/server/rate-limit/index.d.ts.map +1 -1
  221. package/dist/server/rate-limit/index.js +2 -2
  222. package/dist/server/rate-limit/index.js.map +1 -1
  223. package/dist/server/static/index.d.ts +5 -5
  224. package/dist/server/static/index.d.ts.map +1 -1
  225. package/dist/server/swagger/index.d.ts +7 -7
  226. package/dist/server/swagger/index.d.ts.map +1 -1
  227. package/dist/server/swagger/index.js +2 -2
  228. package/dist/server/swagger/index.js.map +1 -1
  229. package/dist/sms/index.d.ts +11 -7
  230. package/dist/sms/index.d.ts.map +1 -1
  231. package/dist/sms/index.js +9 -15
  232. package/dist/sms/index.js.map +1 -1
  233. package/dist/system/index.d.ts +4 -4
  234. package/dist/system/index.d.ts.map +1 -1
  235. package/dist/topic/core/index.d.ts +6 -6
  236. package/dist/topic/core/index.d.ts.map +1 -1
  237. package/dist/topic/redis/index.d.ts +7 -7
  238. package/dist/topic/redis/index.d.ts.map +1 -1
  239. package/dist/topic/redis/index.js +2 -2
  240. package/dist/topic/redis/index.js.map +1 -1
  241. package/dist/websocket/index.d.ts +36 -36
  242. package/dist/websocket/index.d.ts.map +1 -1
  243. package/dist/websocket/index.js +2 -2
  244. package/dist/websocket/index.js.map +1 -1
  245. package/package.json +37 -32
  246. package/src/api/files/{controllers → __tests__}/FileController.spec.ts +189 -143
  247. package/src/api/files/{services → __tests__}/FileService.spec.ts +50 -30
  248. package/src/api/files/controllers/FileController.ts +6 -0
  249. package/src/api/jobs/{services → __tests__}/JobService.spec.ts +1 -1
  250. package/src/api/jobs/providers/JobProvider.ts +3 -3
  251. package/src/api/keys/{services → __tests__}/ApiKeyService.spec.ts +1 -1
  252. package/src/api/organizations/__tests__/OrganizationService.spec.ts +193 -0
  253. package/src/api/organizations/controllers/AdminOrganizationController.ts +103 -0
  254. package/src/api/organizations/entities/organizations.ts +20 -0
  255. package/src/api/organizations/index.browser.ts +10 -0
  256. package/src/api/organizations/index.ts +31 -0
  257. package/src/api/organizations/schemas/createOrganizationSchema.ts +10 -0
  258. package/src/api/organizations/schemas/organizationQuerySchema.ts +10 -0
  259. package/src/api/organizations/schemas/organizationResourceSchema.ts +6 -0
  260. package/src/api/organizations/schemas/updateOrganizationSchema.ts +7 -0
  261. package/src/api/organizations/services/OrganizationService.ts +75 -0
  262. package/src/api/parameters/services/ParameterProvider.ts +6 -1
  263. package/src/api/users/__tests__/$realm.spec.ts +191 -0
  264. package/src/api/users/__tests__/RealmProvider.spec.ts +53 -0
  265. package/src/api/users/__tests__/SessionService.spec.ts +778 -0
  266. package/src/api/users/{jobs → __tests__}/UserJobs.spec.ts +1 -1
  267. package/src/api/users/atoms/realmAuthSettingsAtom.ts +24 -0
  268. package/src/api/users/controllers/RealmController.ts +5 -11
  269. package/src/api/users/entities/users.ts +9 -3
  270. package/src/api/users/index.ts +23 -3
  271. package/src/api/users/primitives/$realm.ts +23 -11
  272. package/src/api/users/providers/RealmProvider.ts +23 -3
  273. package/src/api/users/services/RegistrationService.ts +3 -2
  274. package/src/api/users/services/SessionService.ts +249 -8
  275. package/src/api/users/services/UserService.ts +1 -1
  276. package/src/api/verifications/{jobs → __tests__}/VerificationJobs.spec.ts +4 -2
  277. package/src/api/verifications/parameters/VerificationParameters.ts +2 -2
  278. package/src/billing/__tests__/BillingService.spec.ts +136 -0
  279. package/src/billing/__tests__/PaymentMethodService.spec.ts +78 -0
  280. package/src/billing/controllers/AdminBillingController.ts +149 -0
  281. package/src/billing/controllers/BillingController.ts +108 -0
  282. package/src/billing/entities/paymentIntents.ts +34 -0
  283. package/src/billing/entities/paymentMethods.ts +24 -0
  284. package/src/billing/entities/refunds.ts +22 -0
  285. package/src/billing/errors/BillingError.ts +5 -0
  286. package/src/billing/index.ts +76 -0
  287. package/src/billing/providers/BillingProvider.ts +79 -0
  288. package/src/billing/providers/MemoryBillingProvider.ts +139 -0
  289. package/src/billing/schemas/intentSchemas.ts +60 -0
  290. package/src/billing/schemas/paymentMethodSchemas.ts +13 -0
  291. package/src/billing/schemas/refundSchemas.ts +6 -0
  292. package/src/billing/services/BillingService.ts +325 -0
  293. package/src/billing/services/PaymentMethodService.ts +82 -0
  294. package/src/bin/index.ts +0 -2
  295. package/src/bucket/providers/LocalFileStorageProvider.ts +2 -2
  296. package/src/cache/core/{primitives → __tests__}/$cache.middleware.spec.ts +1 -1
  297. package/src/cache/core/{providers → __tests__}/MemoryCacheProvider.spec.ts +1 -1
  298. package/src/cache/core/primitives/$cache.ts +2 -2
  299. package/src/cache/redis/providers/RedisCacheProvider.ts +2 -2
  300. package/src/cli/config/defineConfig.ts +20 -0
  301. package/src/cli/core/{services → __tests__}/ProjectScaffolder.spec.ts +1 -1
  302. package/src/cli/core/{commands/gen → __tests__}/changelog.spec.ts +1 -1
  303. package/src/cli/core/{commands → __tests__}/init.spec.ts +4 -12
  304. package/src/cli/core/assets.ts +0 -1
  305. package/src/cli/core/atoms/devOptions.ts +0 -5
  306. package/src/cli/core/commands/build.ts +2 -2
  307. package/src/cli/core/commands/dev.ts +165 -30
  308. package/src/cli/core/commands/gen/changelog.ts +2 -2
  309. package/src/cli/core/commands/init.ts +2 -7
  310. package/src/cli/core/commands/verify.ts +0 -1
  311. package/src/cli/core/providers/AppEntryProvider.ts +2 -2
  312. package/src/cli/core/providers/ViteDevServerProvider.ts +53 -46
  313. package/src/cli/core/services/PackageManagerUtils.ts +8 -3
  314. package/src/cli/core/services/ProjectScaffolder.ts +20 -20
  315. package/src/cli/core/tasks/BuildClientTask.ts +8 -0
  316. package/src/cli/core/tasks/BuildServerTask.ts +17 -4
  317. package/src/cli/core/templates/alephaConfigTs.ts +0 -6
  318. package/src/cli/core/templates/webAdminDashboardTsx.ts +17 -0
  319. package/src/cli/core/templates/webAppRouterTs.ts +85 -2
  320. package/src/cli/devtools/atoms/devtoolsOptions.ts +26 -0
  321. package/src/cli/devtools/index.ts +194 -0
  322. package/src/cli/platform/{adapters → __tests__}/CloudflareAdapter.spec.ts +2 -2
  323. package/src/cli/platform/{providers → __tests__}/GitHubSecretStore.spec.ts +1 -1
  324. package/src/cli/platform/{services → __tests__}/NamingService.spec.ts +1 -1
  325. package/src/cli/platform/{providers → __tests__}/PlatformCacheProvider.spec.ts +1 -1
  326. package/src/cli/platform/{services → __tests__}/PlatformInspector.spec.ts +1 -1
  327. package/src/cli/platform/{services → __tests__}/PlatformOrchestrator.spec.ts +3 -3
  328. package/src/cli/platform/{services → __tests__}/SecretFilterService.spec.ts +1 -1
  329. package/src/cli/platform/{commands → __tests__}/SecretsCommand.spec.ts +1 -1
  330. package/src/cli/platform/{adapters → __tests__}/VercelAdapter.spec.ts +2 -2
  331. package/src/cli/platform/atoms/platformOptions.ts +2 -10
  332. package/src/cli/platform/commands/SecretsCommand.ts +2 -2
  333. package/src/cli/platform/commands/platform.ts +2 -11
  334. package/src/cli/platform/index.ts +34 -11
  335. package/src/cli/platform/services/PlatformInspector.ts +2 -2
  336. package/src/cli/platform/services/PlatformOrchestrator.ts +0 -9
  337. package/src/cli/vendor/__tests__/VendorService.spec.ts +407 -0
  338. package/src/cli/vendor/atoms/vendorOptions.ts +41 -0
  339. package/src/cli/vendor/commands/VendorCommand.ts +204 -0
  340. package/src/cli/vendor/index.ts +43 -0
  341. package/src/cli/vendor/services/VendorService.ts +338 -0
  342. package/src/command/{providers → __tests__}/CliProvider.spec.ts +1 -1
  343. package/src/command/{helpers → __tests__}/EnvUtils.spec.ts +1 -1
  344. package/src/command/providers/CliProvider.ts +2 -2
  345. package/src/core/{primitives → __tests__}/$atom.spec.ts +2 -2
  346. package/src/core/{primitives → __tests__}/$memoize.spec.ts +1 -1
  347. package/src/core/{primitives → __tests__}/$mode.spec.ts +1 -1
  348. package/src/core/{primitives → __tests__}/$pipeline.spec.ts +1 -1
  349. package/src/core/{primitives → __tests__}/$scope.spec.ts +2 -2
  350. package/src/core/{providers → __tests__}/KeylessJsonSchemaCodec.spec.ts +1 -1
  351. package/src/core/{providers → __tests__}/SchemaValidator.spec.ts +1 -1
  352. package/src/core/{helpers → __tests__}/jsonSchemaToTypeBox.spec.ts +1 -1
  353. package/src/core/index.shared.ts +1 -1
  354. package/src/core/primitives/{$use.ts → $state.ts} +4 -4
  355. package/src/crypto/{providers → __tests__}/BrowserCryptoProvider.browser.spec.ts +1 -1
  356. package/src/crypto/{providers → __tests__}/CryptoProvider.spec.ts +1 -1
  357. package/src/datetime/{primitives → __tests__}/$debounce.spec.ts +1 -1
  358. package/src/datetime/{primitives → __tests__}/$throttle.spec.ts +1 -1
  359. package/src/datetime/{primitives → __tests__}/$timeout.spec.ts +1 -1
  360. package/src/email/brevo/{providers → __tests__}/BrevoEmailProvider.spec.ts +1 -1
  361. package/src/email/core/{providers → __tests__}/LocalEmailProvider.spec.ts +39 -150
  362. package/src/email/core/providers/LocalEmailProvider.ts +13 -51
  363. package/src/email/smtp/providers/NodemailerEmailProvider.ts +2 -2
  364. package/src/lock/core/{primitives → __tests__}/$lock.middleware.spec.ts +1 -1
  365. package/src/lock/core/primitives/$lock.ts +2 -2
  366. package/src/logger/index.ts +10 -4
  367. package/src/mcp/transports/SseMcpTransport.ts +2 -2
  368. package/src/orm/__tests__/ModelBuilder-tests.ts +53 -0
  369. package/src/orm/__tests__/ModelBuilder.spec.ts +80 -0
  370. package/src/orm/__tests__/organization-tests.ts +200 -0
  371. package/src/orm/__tests__/organization.spec.ts +103 -0
  372. package/src/orm/core/{providers/drivers → __tests__}/BunSqliteProvider.bun.spec.ts +5 -2
  373. package/src/orm/core/constants/PG_SYMBOLS.ts +2 -0
  374. package/src/orm/core/index.shared.ts +1 -0
  375. package/src/orm/core/primitives/$entity.ts +31 -0
  376. package/src/orm/core/providers/DatabaseTypeProvider.ts +11 -0
  377. package/src/orm/core/providers/DrizzleKitProvider.ts +1 -1
  378. package/src/orm/core/providers/drivers/BunSqliteProvider.ts +2 -2
  379. package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +3 -3
  380. package/src/orm/core/services/ModelBuilder.ts +11 -0
  381. package/src/orm/core/services/QueryManager.ts +16 -2
  382. package/src/orm/core/services/Repository.ts +70 -10
  383. package/src/orm/postgres/{providers → __tests__}/BunPostgresProvider.bun.spec.ts +1 -1
  384. package/src/orm/postgres/services/PostgresModelBuilder.ts +9 -1
  385. package/src/queue/core/providers/WorkerProvider.ts +2 -2
  386. package/src/queue/redis/providers/RedisQueueProvider.ts +2 -2
  387. package/src/react/core/{hooks → __tests__}/useAction.browser.spec.tsx +1 -1
  388. package/src/react/core/hooks/useAction.ts +7 -6
  389. package/src/react/head/{providers → __tests__}/BrowserHeadProvider.browser.spec.ts +1 -1
  390. package/src/react/head/{helpers → __tests__}/SeoExpander.spec.ts +1 -1
  391. package/src/react/i18n/{providers → __tests__}/I18nProvider.spec.ts +1 -1
  392. package/src/react/i18n/{hooks → __tests__}/useI18n.browser.spec.tsx +1 -1
  393. package/src/react/intro/components/GettingStartedDevtoolsSlide.tsx +3 -6
  394. package/src/react/router/{providers → __tests__}/ReactBrowserProvider.browser.spec.ts +1 -1
  395. package/src/react/router/providers/ReactBrowserProvider.ts +2 -2
  396. package/src/react/router/providers/ReactPageProvider.ts +2 -2
  397. package/src/react/router/providers/ReactServerProvider.ts +3 -3
  398. package/src/redis/{providers → __tests__}/BunRedisProvider.bun.spec.ts +4 -4
  399. package/src/retry/{primitives → __tests__}/$retry.middleware.spec.ts +1 -1
  400. package/src/router/{TemplatedPathParser.spec.ts → __tests__/TemplatedPathParser.spec.ts} +1 -1
  401. package/src/scheduler/primitives/$scheduler.ts +2 -2
  402. package/src/security/{primitives → __tests__}/$secure-browser.spec.ts +1 -1
  403. package/src/security/{primitives → __tests__}/$secure.spec.ts +1 -1
  404. package/src/security/primitives/$issuer.ts +1 -1
  405. package/src/security/providers/JwtProvider.ts +6 -10
  406. package/src/security/providers/SecurityProvider.ts +6 -11
  407. package/src/security/schemas/userAccountInfoSchema.ts +3 -3
  408. package/src/server/auth/providers/ServerAuthProvider.ts +24 -2
  409. package/src/server/cookies/{services → __tests__}/CookieParser.spec.ts +1 -1
  410. package/src/server/core/{primitives → __tests__}/$circuit.spec.ts +1 -1
  411. package/src/server/core/{providers → __tests__}/NodeHttpServerProvider.spec.ts +1 -1
  412. package/src/server/core/{providers → __tests__}/ServerBodyParserProvider.spec.ts +31 -1
  413. package/src/server/core/{providers → __tests__}/ServerCompressProvider.spec.ts +1 -1
  414. package/src/server/core/{providers → __tests__}/ServerHelmetProvider.spec.ts +4 -1
  415. package/src/server/core/{providers → __tests__}/ServerMultipartProvider.spec.ts +1 -1
  416. package/src/server/core/{services → __tests__}/ServerRequestParser.spec.ts +1 -1
  417. package/src/server/core/primitives/$action.ts +2 -2
  418. package/src/server/core/primitives/$sse.ts +2 -2
  419. package/src/server/core/providers/ServerBodyParserProvider.ts +21 -12
  420. package/src/server/core/providers/ServerCompressProvider.ts +2 -2
  421. package/src/server/core/providers/ServerHelmetProvider.ts +2 -2
  422. package/src/server/core/providers/ServerMultipartProvider.ts +2 -2
  423. package/src/server/core/providers/ServerRouterProvider.ts +1 -5
  424. package/src/server/cors/{primitives → __tests__}/$cors.spec.ts +1 -1
  425. package/src/server/cors/providers/ServerCorsProvider.ts +2 -2
  426. package/src/server/links/{services → __tests__}/BatchCollector.spec.ts +1 -1
  427. package/src/server/links/providers/LinkProvider.ts +2 -2
  428. package/src/server/links/providers/RemotePrimitiveProvider.ts +2 -2
  429. package/src/server/links/providers/ServerLinksProvider.ts +2 -2
  430. package/src/server/rate-limit/{primitives → __tests__}/$rateLimit.spec.ts +1 -1
  431. package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +2 -2
  432. package/src/server/swagger/providers/ServerSwaggerProvider.ts +2 -2
  433. package/src/sms/{providers → __tests__}/LocalSmsProvider.spec.ts +35 -29
  434. package/src/sms/providers/LocalSmsProvider.ts +13 -24
  435. package/src/system/{providers → __tests__}/MemoryFileSystemProvider.spec.ts +1 -1
  436. package/src/system/{providers → __tests__}/MemoryShellProvider.spec.ts +1 -1
  437. package/src/topic/redis/providers/RedisTopicProvider.ts +2 -2
  438. package/src/websocket/{services → __tests__}/RoomManager.spec.ts +1 -1
  439. package/src/websocket/providers/NodeWebSocketServerProvider.ts +2 -2
  440. package/tsconfig.base.json +1 -0
  441. package/assets/devtools-ui/200.html +0 -10
  442. package/assets/devtools-ui/200.html.br +0 -0
  443. package/assets/devtools-ui/404.html +0 -10
  444. package/assets/devtools-ui/404.html.br +0 -0
  445. package/assets/devtools-ui/CNAME +0 -1
  446. package/assets/devtools-ui/asset.CHpVij2M.css +0 -1
  447. package/assets/devtools-ui/asset.CHpVij2M.css.br +0 -0
  448. package/assets/devtools-ui/asset.DJ-i0UDz.css +0 -1
  449. package/assets/devtools-ui/asset.DJ-i0UDz.css.br +0 -0
  450. package/assets/devtools-ui/chunk.1jwpJORo.js +0 -1
  451. package/assets/devtools-ui/chunk.1jwpJORo.js.br +0 -0
  452. package/assets/devtools-ui/chunk.B0r2wfUL.js +0 -1
  453. package/assets/devtools-ui/chunk.B0r2wfUL.js.br +0 -0
  454. package/assets/devtools-ui/chunk.BScN4dVR.js +0 -84
  455. package/assets/devtools-ui/chunk.BScN4dVR.js.br +0 -0
  456. package/assets/devtools-ui/chunk.BispuoY4.js +0 -1
  457. package/assets/devtools-ui/chunk.BispuoY4.js.br +0 -0
  458. package/assets/devtools-ui/chunk.BtrPUUd7.js +0 -2
  459. package/assets/devtools-ui/chunk.BtrPUUd7.js.br +0 -0
  460. package/assets/devtools-ui/chunk.C-KMHgqf.js +0 -1
  461. package/assets/devtools-ui/chunk.C-KMHgqf.js.br +0 -0
  462. package/assets/devtools-ui/chunk.C2zQ3CF6.js +0 -7
  463. package/assets/devtools-ui/chunk.C2zQ3CF6.js.br +0 -0
  464. package/assets/devtools-ui/chunk.C619McpO.js +0 -1
  465. package/assets/devtools-ui/chunk.C619McpO.js.br +0 -0
  466. package/assets/devtools-ui/chunk.C9OsYsVl.js +0 -1
  467. package/assets/devtools-ui/chunk.C9OsYsVl.js.br +0 -3
  468. package/assets/devtools-ui/chunk.CAC_-151.js +0 -1
  469. package/assets/devtools-ui/chunk.CAC_-151.js.br +0 -0
  470. package/assets/devtools-ui/chunk.CCmesWfx.js +0 -1
  471. package/assets/devtools-ui/chunk.CCmesWfx.js.br +0 -0
  472. package/assets/devtools-ui/chunk.CFQDmrcV.js +0 -1
  473. package/assets/devtools-ui/chunk.CFQDmrcV.js.br +0 -0
  474. package/assets/devtools-ui/chunk.CgM71Zau.js +0 -1
  475. package/assets/devtools-ui/chunk.CgM71Zau.js.br +0 -0
  476. package/assets/devtools-ui/chunk.CmHq336a.js +0 -1
  477. package/assets/devtools-ui/chunk.CmHq336a.js.br +0 -0
  478. package/assets/devtools-ui/chunk.CthNMCar.js +0 -1
  479. package/assets/devtools-ui/chunk.CthNMCar.js.br +0 -0
  480. package/assets/devtools-ui/chunk.D2brVJP1.js +0 -1
  481. package/assets/devtools-ui/chunk.D2brVJP1.js.br +0 -0
  482. package/assets/devtools-ui/chunk.DgBKGkiw.js +0 -1
  483. package/assets/devtools-ui/chunk.DgBKGkiw.js.br +0 -0
  484. package/assets/devtools-ui/chunk.NNHHCQsa.js +0 -1
  485. package/assets/devtools-ui/chunk.NNHHCQsa.js.br +0 -0
  486. package/assets/devtools-ui/chunk._CDKKWMo.js +0 -1
  487. package/assets/devtools-ui/chunk._CDKKWMo.js.br +0 -0
  488. package/assets/devtools-ui/entry.B_nOjAod.js +0 -2
  489. package/assets/devtools-ui/entry.B_nOjAod.js.br +0 -0
  490. package/assets/devtools-ui/index.html +0 -10
  491. package/assets/devtools-ui/index.html.br +0 -0
  492. package/dist/devtools/index.browser.js +0 -224
  493. package/dist/devtools/index.browser.js.map +0 -1
  494. package/dist/devtools/index.d.ts +0 -499
  495. package/dist/devtools/index.d.ts.map +0 -1
  496. package/dist/devtools/index.js +0 -782
  497. package/dist/devtools/index.js.map +0 -1
  498. package/dist/mqtt/index.d.ts +0 -164
  499. package/dist/mqtt/index.d.ts.map +0 -1
  500. package/dist/mqtt/index.js +0 -214
  501. package/dist/mqtt/index.js.map +0 -1
  502. package/dist/topic/mqtt/index.d.ts +0 -87
  503. package/dist/topic/mqtt/index.d.ts.map +0 -1
  504. package/dist/topic/mqtt/index.js +0 -88
  505. package/dist/topic/mqtt/index.js.map +0 -1
  506. package/src/api/users/parameters/UserParameters.ts +0 -23
  507. package/src/api/users/services/SessionService.spec.ts +0 -303
  508. package/src/cli/platform/adapters/DockerAdapter.spec.ts +0 -378
  509. package/src/cli/platform/adapters/DockerAdapter.ts +0 -417
  510. package/src/cli/platform/services/DockerComposeGenerator.spec.ts +0 -490
  511. package/src/cli/platform/services/DockerComposeGenerator.ts +0 -353
  512. package/src/cli/platform/services/DockerSshService.spec.ts +0 -47
  513. package/src/cli/platform/services/DockerSshService.ts +0 -61
  514. package/src/devtools/__tests__/DevCollectorProvider.spec.ts +0 -7
  515. package/src/devtools/assets.ts +0 -6
  516. package/src/devtools/entities/logs.ts +0 -21
  517. package/src/devtools/index.browser.ts +0 -11
  518. package/src/devtools/index.shared.ts +0 -15
  519. package/src/devtools/index.ts +0 -39
  520. package/src/devtools/providers/DevToolsMetadataProvider.ts +0 -459
  521. package/src/devtools/providers/DevToolsProvider.ts +0 -280
  522. package/src/devtools/schemas/DevActionMetadata.ts +0 -30
  523. package/src/devtools/schemas/DevAtomMetadata.ts +0 -26
  524. package/src/devtools/schemas/DevBucketMetadata.ts +0 -11
  525. package/src/devtools/schemas/DevCacheMetadata.ts +0 -10
  526. package/src/devtools/schemas/DevEntityMetadata.ts +0 -60
  527. package/src/devtools/schemas/DevEnvMetadata.ts +0 -22
  528. package/src/devtools/schemas/DevMetadata.ts +0 -47
  529. package/src/devtools/schemas/DevModuleMetadata.ts +0 -8
  530. package/src/devtools/schemas/DevPageMetadata.ts +0 -24
  531. package/src/devtools/schemas/DevProviderMetadata.ts +0 -10
  532. package/src/devtools/schemas/DevQueueMetadata.ts +0 -10
  533. package/src/devtools/schemas/DevRealmMetadata.ts +0 -19
  534. package/src/devtools/schemas/DevRouteMetadata.ts +0 -8
  535. package/src/devtools/schemas/DevSchedulerMetadata.ts +0 -11
  536. package/src/devtools/schemas/DevTopicMetadata.ts +0 -11
  537. package/src/mqtt/index.ts +0 -32
  538. package/src/mqtt/providers/MqttClientProvider.ts +0 -63
  539. package/src/mqtt/providers/MqttJsClientProvider.spec.ts +0 -165
  540. package/src/mqtt/providers/MqttJsClientProvider.ts +0 -309
  541. package/src/topic/mqtt/index.ts +0 -30
  542. package/src/topic/mqtt/providers/MqttTopicProvider.spec.ts +0 -160
  543. package/src/topic/mqtt/providers/MqttTopicProvider.ts +0 -146
  544. /package/src/api/audits/{primitives → __tests__}/$audit.spec.ts +0 -0
  545. /package/src/api/audits/{services → __tests__}/AuditService.spec.ts +0 -0
  546. /package/src/api/files/{controllers → __tests__}/AdminFileStatsController.spec.ts +0 -0
  547. /package/src/api/files/{jobs → __tests__}/FileJobs.spec.ts +0 -0
  548. /package/src/api/jobs/{primitives → __tests__}/$job-middleware.spec.ts +0 -0
  549. /package/src/api/parameters/{primitives → __tests__}/$parameter.spec.ts +0 -0
  550. /package/src/api/users/{controllers → __tests__}/AdminIdentityController.spec.ts +0 -0
  551. /package/src/api/users/{controllers → __tests__}/AdminSessionController.spec.ts +0 -0
  552. /package/src/api/users/{controllers → __tests__}/AdminUserController.spec.ts +0 -0
  553. /package/src/api/users/{services → __tests__}/CredentialService.spec.ts +0 -0
  554. /package/src/api/users/{services → __tests__}/RegistrationService.spec.ts +0 -0
  555. /package/src/batch/{primitives → __tests__}/$batch.spec.ts +0 -0
  556. /package/src/batch/{providers → __tests__}/BatchProvider.spec.ts +0 -0
  557. /package/src/bucket/{primitives → __tests__}/$bucket.spec.ts +0 -0
  558. /package/src/bucket/{providers → __tests__}/FileStorageProvider.spec.ts +0 -0
  559. /package/src/bucket/{providers → __tests__}/LocalFileStorageProvider.spec.ts +0 -0
  560. /package/src/bucket/{providers → __tests__}/MemoryFileStorageProvider.spec.ts +0 -0
  561. /package/src/cache/core/{primitives → __tests__}/$cache.spec.ts +0 -0
  562. /package/src/cache/redis/{providers → __tests__}/RedisCacheProvider.spec.ts +0 -0
  563. /package/src/command/{primitives → __tests__}/$command.spec.ts +0 -0
  564. /package/src/command/{helpers → __tests__}/Asker.spec.ts +0 -0
  565. /package/src/command/{helpers → __tests__}/Runner.spec.ts +0 -0
  566. /package/src/core/{primitives → __tests__}/$context.spec.ts +0 -0
  567. /package/src/core/{primitives → __tests__}/$env.spec.ts +0 -0
  568. /package/src/core/{primitives → __tests__}/$hook.spec.ts +0 -0
  569. /package/src/core/{primitives → __tests__}/$inject.spec.ts +0 -0
  570. /package/src/core/{primitives → __tests__}/$module.spec.ts +0 -0
  571. /package/src/core/{providers → __tests__}/CodecManager.spec.ts +0 -0
  572. /package/src/core/{providers → __tests__}/EventManager.spec.ts +0 -0
  573. /package/src/core/{providers → __tests__}/StateManager.spec.ts +0 -0
  574. /package/src/core/{providers → __tests__}/TypeProvider.spec.ts +0 -0
  575. /package/src/datetime/{primitives → __tests__}/$interval.spec.ts +0 -0
  576. /package/src/datetime/{providers → __tests__}/DateTimeProvider.spec.ts +0 -0
  577. /package/src/email/core/{primitives → __tests__}/$email.spec.ts +0 -0
  578. /package/src/fake/{providers → __tests__}/FakeProvider.spec.ts +0 -0
  579. /package/src/lock/core/{providers → __tests__}/MemoryLockProvider.spec.ts +0 -0
  580. /package/src/lock/redis/{providers → __tests__}/RedisLockProvider.spec.ts +0 -0
  581. /package/src/logger/{primitives → __tests__}/$logger.spec.ts +0 -0
  582. /package/src/logger/{services → __tests__}/Logger.spec.ts +0 -0
  583. /package/src/mcp/{primitives → __tests__}/$prompt.spec.ts +0 -0
  584. /package/src/mcp/{primitives → __tests__}/$resource.spec.ts +0 -0
  585. /package/src/mcp/{primitives → __tests__}/$tool.spec.ts +0 -0
  586. /package/src/mcp/{providers → __tests__}/McpServerProvider.spec.ts +0 -0
  587. /package/src/mcp/{helpers → __tests__}/jsonrpc.spec.ts +0 -0
  588. /package/src/orm/core/{helpers → __tests__}/parseQueryString.spec.ts +0 -0
  589. /package/src/queue/core/{primitives → __tests__}/$consumer.spec.ts +0 -0
  590. /package/src/queue/core/{providers → __tests__}/MemoryQueueProvider.spec.ts +0 -0
  591. /package/src/queue/core/{providers → __tests__}/WorkerProvider.spec.ts +0 -0
  592. /package/src/queue/redis/{providers → __tests__}/RedisQueueProvider.spec.ts +0 -0
  593. /package/src/react/form/{hooks → __tests__}/useForm.browser.spec.tsx +0 -0
  594. /package/src/react/head/{hooks → __tests__}/useHead.spec.tsx +0 -0
  595. /package/src/react/i18n/{components → __tests__}/Localize.spec.tsx +0 -0
  596. /package/src/react/router/{primitives → __tests__}/$page.browser.spec.tsx +0 -0
  597. /package/src/react/router/{primitives → __tests__}/$page.middleware.spec.tsx +0 -0
  598. /package/src/react/router/{primitives → __tests__}/$page.spec.tsx +0 -0
  599. /package/src/react/router/{providers → __tests__}/ReactPreloadProvider.spec.ts +0 -0
  600. /package/src/react/router/{providers → __tests__}/ReactServerProvider.spec.tsx +0 -0
  601. /package/src/react/router/{providers → __tests__}/ReactServerTemplateProvider.spec.ts +0 -0
  602. /package/src/retry/{primitives → __tests__}/$retry.spec.ts +0 -0
  603. /package/src/retry/{providers → __tests__}/RetryProvider.spec.ts +0 -0
  604. /package/src/router/{providers → __tests__}/RouterProvider.spec.ts +0 -0
  605. /package/src/security/{primitives → __tests__}/$issuer.spec.ts +0 -0
  606. /package/src/security/{primitives → __tests__}/$permission.spec.ts +0 -0
  607. /package/src/security/{primitives → __tests__}/$role.spec.ts +0 -0
  608. /package/src/security/{primitives → __tests__}/$serviceAccount.spec.ts +0 -0
  609. /package/src/security/{providers → __tests__}/SecurityProvider.spec.ts +0 -0
  610. /package/src/server/cookies/{providers → __tests__}/ServerCookiesProvider.spec.ts +0 -0
  611. /package/src/server/core/{primitives → __tests__}/$action.spec.ts +0 -0
  612. /package/src/server/core/{primitives → __tests__}/$middleware.spec.ts +0 -0
  613. /package/src/server/core/{primitives → __tests__}/$route.spec.ts +0 -0
  614. /package/src/server/core/{primitives → __tests__}/$sse.spec.ts +0 -0
  615. /package/src/server/core/{providers → __tests__}/BunHttpServerProvider.bun.spec.ts +0 -0
  616. /package/src/server/core/{services → __tests__}/HttpClient.spec.ts +0 -0
  617. /package/src/server/core/{providers → __tests__}/ServerLoggerProvider.spec.ts +0 -0
  618. /package/src/server/core/{services → __tests__}/UserAgentParser.spec.ts +0 -0
  619. /package/src/server/cors/{providers → __tests__}/ServerCorsProvider.spec.ts +0 -0
  620. /package/src/server/etag/{providers → __tests__}/ServerEtagProvider.spec.ts +0 -0
  621. /package/src/server/health/{providers → __tests__}/ServerHealthProvider.spec.ts +0 -0
  622. /package/src/server/links/{primitives → __tests__}/$remote.spec.ts +0 -0
  623. /package/src/server/links/{services → __tests__}/BatchEndpoint.spec.ts +0 -0
  624. /package/src/server/links/{providers → __tests__}/LinkProvider.spec.ts +0 -0
  625. /package/src/server/links/{providers → __tests__}/ServerLinksProvider.spec.ts +0 -0
  626. /package/src/server/metrics/{providers → __tests__}/ServerMetricsProvider.spec.ts +0 -0
  627. /package/src/server/proxy/{primitives → __tests__}/$proxy.spec.ts +0 -0
  628. /package/src/server/rate-limit/{providers → __tests__}/ServerRateLimitProvider.spec.ts +0 -0
  629. /package/src/server/static/{primitives → __tests__}/$serve.spec.ts +0 -0
  630. /package/src/server/swagger/{primitives → __tests__}/$swagger.spec.ts +0 -0
  631. /package/src/sms/{primitives → __tests__}/$sms.spec.ts +0 -0
  632. /package/src/sms/{providers → __tests__}/MemorySmsProvider.spec.ts +0 -0
  633. /package/src/system/{services → __tests__}/FileDetector.spec.ts +0 -0
  634. /package/src/system/{providers → __tests__}/NodeFileSystemProvider.spec.ts +0 -0
  635. /package/src/topic/core/{primitives → __tests__}/$subscriber.spec.ts +0 -0
  636. /package/src/topic/core/{providers → __tests__}/MemoryTopicProvider.spec.ts +0 -0
  637. /package/src/topic/redis/{providers → __tests__}/RedisTopicProvider.spec.ts +0 -0
  638. /package/src/websocket/{primitives → __tests__}/$channel.spec.ts +0 -0
@@ -1,84 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=Symbol.for(`Alepha.Kind`),d=Symbol.for(`Alepha.Module`),f=Symbol.for(`Alepha.Options`),p=class extends Error{name=`AlephaError`},m=class extends p{name=`CircularDependencyError`;constructor(e,t){super(`Instance not available. Looks like a circular dependency. ? -> ${t?.map(e=>`${e} -> `).join(``)}${e} -> ?`)}},h=class extends p{name=`ContainerLockedError`;constructor(e=`Container is locked. No more providers can be added.`){super(e)}},g=class extends p{name=`TooLateSubstitutionError`;constructor(e,t){super(`Service already substituted. Please, substitute Service '${e}' with Service '${t}' before using it.`)}},_=class extends p{name=`MissingContextError`;constructor(){super(`Missing context. Did you forget to call Alepha.create()?`),this.name=`MissingContextError`}},v={},y=()=>{if(!v.alepha)throw new _;return{alepha:v.alepha,service:v.service,module:v.service?.[d]}},b=class{alepha;options;config;constructor(e){this.alepha=e.alepha,this.options=e.options,this.config={propertyKey:``,service:e.service,module:e.module}}onInit(){}},x=(e,t)=>{let{alepha:n,service:r}=y();return d in e&&e[d]&&n.with(e[d]),n.inject(e,{lifetime:`transient`,args:[{options:t,alepha:n,service:r??ck}]})};function S(e){if(typeof e!=`function`)return!1;let t=Object.getOwnPropertyDescriptor(e,`prototype`);return!!t&&!t.writable}var C=e=>{let{services:t=[],primitives:n=[],name:r}=e;if(!r||!w.NAME_REGEX.test(r))throw new p(`Invalid module name '${r}'. It should be in the format of 'project.module.submodule'`);let i=class extends w{options=e;register(n){if(e.atoms)for(let t of e.atoms)n.store.register(t);if(typeof e.register==`function`){e.register(n);return}for(let e of t)n.inject(e,{parent:this.constructor})}};Object.defineProperty(i,`name`,{value:r,writable:!1});for(let e of t)w.is(e)||(e[d]=i);for(let e of n)typeof e[u]==`function`&&(e[u][d]=i);return i},w=class e{static NAME_REGEX=/^[a-z-]+(\.[a-z-][a-z0-9-]*)*$/;static is(t){return t.prototype instanceof e}static of(e){return e[d]}},T=Symbol(`als.parent`),E=class e{static create=()=>{};als;constructor(){this.als=e.create()}createContextId(){return crypto.randomUUID()}run(e,t={}){if(!this.als)return e();let n=this.als.getStore()??void 0;return t.registry??=new Map,t.context??=this.createContextId(),this.als.run({...t,[T]:n},e)}exists(){return!!this.get(`context`)}get(e,t){if(!this.als)return;let n=this.als.getStore();if(!n||t===`app`)return;if(t===`current`)return e in n?n[e]:void 0;if(t===`parent`)return n[T]?.[e];if(e in n)return n[e];let r=n[T];for(;r;){if(e in r)return r[e];r=r[T]}}has(e){if(!this.als)return!1;let t=this.als.getStore();if(!t)return!1;if(e in t)return!0;let n=t[T];for(;n;){if(e in n)return!0;n=n[T]}return!1}set(e,t){if(!this.als)return;let n=this.als.getStore();n&&(n[e]=t)}},D=(e,t={})=>{let{alepha:n,service:r}=y();return e===n.constructor?n:n.inject(e,{parent:r??n.constructor,...t})},O=class{stringify=JSON.stringify;parse=JSON.parse},k=class{},A=class extends k{json=D(O);encoder=new TextEncoder;decoder=new TextDecoder;encodeToString(e,t){return this.json.stringify(t)}encodeToBinary(e,t){return this.encoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let e=this.decoder.decode(t);return this.json.parse(e)}if(typeof t==`string`){let e=t.trim();return e.startsWith(`{`)||e.startsWith(`[`)?this.json.parse(t):t}return t}},j=e=>x(M,e),M=class extends b{called=0;onInit(){let e=this.options.handler,t=e=>{if(e)return(Array.isArray(e)?e:[e]).map(e=>e.constructor)};this.alepha.events.on(this.options.on,{caller:this.config.service,priority:this.options.priority,before:t(this.options.before),after:t(this.options.after),callback:t=>(this.called+=1,e(t))})}};j[u]=M;var N={assign:0,create:0,clone:0,discard:0,update:0};function P(e,t){return N.assign+=1,{...e,...t}}function ee(e,t,n){return e>=t&&e<=n}function te(e){return ee(e,127462,127487)}function ne(e){return ee(e,65024,65039)}function F(e){return ee(e,768,879)||ee(e,6832,6911)||ee(e,7616,7679)||ee(e,65056,65071)}function I(e){return e>65535?2:1}function L(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(F(n)||ne(n))t+=I(n);else break}return t}function re(e,t){let n=e.codePointAt(t),r=t+I(n);for(r=L(e,r);r<e.length-1&&e[r]===`‍`;){let t=e.codePointAt(r+1);r+=1+I(t),r=L(e,r)}return te(n)&&r<e.length&&te(e.codePointAt(r))&&(r+=I(e.codePointAt(r))),r}function ie(e){return ee(e,55296,56319)||ee(e,768,879)||e===8205}function ae(e){let t=0,n=0;for(;n<e.length;)n=re(e,n),t++;return t}function oe(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>=t)return!0;return!1}function se(e,t){let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>t)return!1;return!0}function ce(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return oe(e,t);if(n++,n>=t)return!0}return!1}function le(e,t){let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return se(e,t);if(n++,n>t)return!1}return!0}var ue=s({Entries:()=>Ie,EntriesRegExp:()=>Fe,Every:()=>Ne,EveryAll:()=>Pe,GraphemeCount:()=>Ae,HasPropertyKey:()=>H,IsArray:()=>R,IsAsyncIterator:()=>de,IsBigInt:()=>fe,IsBoolean:()=>pe,IsClassInstance:()=>Oe,IsConstructor:()=>me,IsDeepEqual:()=>He,IsEqual:()=>V,IsFunction:()=>he,IsGreaterEqualThan:()=>Ee,IsGreaterThan:()=>Ce,IsInteger:()=>ge,IsIterator:()=>_e,IsLessEqualThan:()=>Te,IsLessThan:()=>we,IsMaxLength:()=>je,IsMinLength:()=>Me,IsMultipleOf:()=>De,IsNull:()=>ve,IsNumber:()=>ye,IsObject:()=>xe,IsObjectNotArray:()=>be,IsString:()=>z,IsSymbol:()=>Se,IsUndefined:()=>B,IsValueLike:()=>ke,Keys:()=>Le,Symbols:()=>Re,Values:()=>ze});function R(e){return Array.isArray(e)}function de(e){return xe(e)&&Symbol.asyncIterator in e}function fe(e){return V(typeof e,`bigint`)}function pe(e){return V(typeof e,`boolean`)}function me(e){if(B(e)||!he(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function he(e){return V(typeof e,`function`)}function ge(e){return Number.isInteger(e)}function _e(e){return xe(e)&&Symbol.iterator in e}function ve(e){return V(e,null)}function ye(e){return Number.isFinite(e)}function be(e){return xe(e)&&!R(e)}function xe(e){return V(typeof e,`object`)&&!ve(e)}function z(e){return V(typeof e,`string`)}function Se(e){return V(typeof e,`symbol`)}function B(e){return V(e,void 0)}function V(e,t){return e===t}function Ce(e,t){return e>t}function we(e,t){return e<t}function Te(e,t){return e<=t}function Ee(e,t){return e>=t}function De(e,t){if(fe(e)||fe(t))return BigInt(e)%BigInt(t)===0n;if(!ye(e)||ge(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t))<1e-10}function Oe(e){if(!xe(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return ve(t)?!1:V(typeof t.constructor,`function`)&&!(V(t.constructor,globalThis.Object)||V(t.constructor.name,`Object`))}function ke(e){return fe(e)||pe(e)||ve(e)||ye(e)||z(e)||B(e)}function Ae(e){return ae(e)}function je(e,t){return le(e,t)}function Me(e,t){return ce(e,t)}function Ne(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function Pe(e,t,n){let r=!0;for(let i=t;i<e.length;i++)n(e[i],i)||(r=!1);return r}function H(e,t){return V(t,`__proto__`)||V(t,`constructor`)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Fe(e){return Le(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Ie(e){return Object.entries(e)}function Le(e){return Object.getOwnPropertyNames(e)}function Re(e){return Object.getOwnPropertySymbols(e)}function ze(e){return Object.values(e)}function Be(e,t){if(!xe(t))return!1;let n=Le(e);return V(n.length,Le(t).length)&&n.every(n=>He(e[n],t[n]))}function Ve(e,t){return R(t)&&V(e.length,t.length)&&e.every((n,r)=>He(e[r],t[r]))}function He(e,t){return R(e)?Ve(e,t):xe(e)?Be(e,t):V(e,t)}var Ue=/^[\p{ID_Start}_$][\p{ID_Continue}_$\u200C\u200D]*$/u;function We(e){return Ue.test(e)}function Ge(e,t){return`(${e} && ${t})`}function Ke(e,t){return`(${e} || ${t})`}function qe(e){return`!(${e})`}function Je(e){return`Array.isArray(${e})`}function Ye(e){return`Guard.IsAsyncIterator(${e})`}function Xe(e){return`typeof ${e} === "bigint"`}function Ze(e){return`typeof ${e} === "boolean"`}function Qe(e){return`Number.isInteger(${e})`}function $e(e){return`Guard.IsIterator(${e})`}function et(e){return`${e} === null`}function tt(e){return`Number.isFinite(${e})`}function nt(e){return Ge(rt(e),qe(Je(e)))}function rt(e){return`typeof ${e} === "object" && ${e} !== null`}function it(e){return`typeof ${e} === "string"`}function at(e){return`typeof ${e} === "symbol"`}function ot(e){return`${e} === undefined`}function st(e){return`typeof ${e} === "function"`}function ct(e){return`Guard.IsConstructor(${e})`}function lt(e,t){return`${e} === ${t}`}function ut(e,t){return`${e} > ${t}`}function dt(e,t){return`${e} < ${t}`}function ft(e,t){return`${e} <= ${t}`}function pt(e,t){return`${e} >= ${t}`}function mt(e,t){return`Guard.IsMinLength(${e}, ${t})`}function ht(e,t){return`Guard.IsMaxLength(${e}, ${t})`}function gt(e,t,n,r){return V(t,`0`)?`${e}.every((${n[0]}, ${n[1]}) => ${r})`:`((value, callback) => { for(let index = ${t}; index < value.length; index++) if (!callback(value[index], index)) return false; return true })(${e}, (${n[0]}, ${n[1]}) => ${r})`}function _t(e){return`Object.entries(${e})`}function vt(e){return`Object.getOwnPropertyNames(${e})`}function yt(e,t){return V(t,`"__proto__"`)||V(t,`"constructor"`)?`Object.prototype.hasOwnProperty.call(${e}, ${t})`:`${t} in ${e}`}function bt(e,t){return`Guard.IsDeepEqual(${e}, ${t})`}function xt(e){return`[${e.join(`, `)}]`}function St(e,t){return`((${e.join(`, `)}) => ${t})`}function Ct(e,t){return`${e}(${t.join(`, `)})`}function wt(e,t){return`new ${e}(${t.join(`, `)})`}function Tt(e,t){return`${e}${We(t)?`.${t}`:`[${Et(t)}]`}`}function Et(e){return z(e)?JSON.stringify(e):`${e}`}function Dt(e,t,n){return`(${e} ? ${t} : ${n})`}function Ot(e){return`{ ${e.join(`; `)}; }`}function kt(e,t){return`const ${e} = ${t}`}function At(e,t){return`if(${e}) { ${t} }`}function jt(e){return`return ${e}`}function Mt(e){return V(e.length,0)?`true`:e.reduce((e,t)=>Ge(e,t))}function Nt(e){return V(e.length,0)?`false`:e.reduce((e,t)=>Ke(e,t))}function Pt(e){return`++${e}`}function Ft(e,t){return`Guard.IsMultipleOf(${e}, ${t})`}function It(e){return e instanceof Boolean}function Lt(e){return e instanceof Number}function Rt(e){return e instanceof String}function zt(e){return globalThis.ArrayBuffer.isView(e)}function Bt(e){return e instanceof globalThis.RegExp}function Vt(e){return e instanceof globalThis.Date}function Ht(e){return e instanceof globalThis.Set}function Ut(e){return e instanceof globalThis.Map}function Wt(e){return xe(e)&&H(e,`~guard`)}function Gt(e){return e}function Kt(e){return e.map(e=>Xt(e))}function qt(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];H(r,`value`)&&Object.defineProperty(t,e,{...r,value:Xt(r.value)})}return t}function Jt(e){return new RegExp(e.source,e.flags)}function Yt(e){return e}function Xt(e){return e instanceof RegExp?Jt(e):Wt(e)?Gt(e):R(e)?Kt(e):xe(e)?qt(e):Yt(e)}function Zt(e){return N.clone+=1,Xt(e)}var Qt={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function $t(e){for(let t of Le(e)){let n=e[t];n!==void 0&&Object.defineProperty(Qt,t,{value:n})}}function en(){return Qt}function tn(e,t,n={}){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function nn(e,t){return{...e,...t}}function rn(e,t,n={}){N.create+=1;let r=en(),i=nn(t,n),a=r.enumerableKind?nn(i,e):tn(i,e);return r.immutableTypes?Object.freeze(a):a}function an(e,t){N.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(Zt(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function on(e,t,n){N.update+=1;let r=en(),i=Zt(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function sn(e,t){return xe(e)&&H(e,`~kind`)&&V(e[`~kind`],t)}function cn(e){return xe(e)}function ln(e){return rn({"~kind":`OptionalAddAction`},{type:e},{})}function un(e){return xe(e)&&H(e,`~kind`)&&H(e,`type`)&&V(e[`~kind`],`OptionalAddAction`)&&cn(e.type)}function dn(e){return rn({"~kind":`OptionalRemoveAction`},{type:e},{})}function fn(e){return xe(e)&&H(e,`~kind`)&&H(e,`type`)&&V(e[`~kind`],`OptionalRemoveAction`)&&cn(e.type)}function pn(e){return rn({"~kind":`ReadonlyAddAction`},{type:e},{})}function mn(e){return xe(e)&&H(e,`~kind`)&&H(e,`type`)&&V(e[`~kind`],`ReadonlyAddAction`)&&cn(e.type)}function hn(e){return rn({"~kind":`ReadonlyRemoveAction`},{type:e},{})}function gn(e){return xe(e)&&H(e,`~kind`)&&H(e,`type`)&&V(e[`~kind`],`ReadonlyRemoveAction`)&&cn(e.type)}function _n(e,t,n){return rn({"~kind":`Deferred`},{action:e,parameters:t,options:n},{})}function vn(e){return sn(e,`Deferred`)}function yn(e){return on(e,{"~immutable":!0},{})}function bn(e){return yn(e)}function xn(e){return cn(e)&&H(e,`~immutable`)}function Sn(e){return an(e,[`~optional`])}function Cn(e){return on(e,{"~optional":!0},{})}function wn(e){return Cn(e)}function Tn(e){return cn(e)&&H(e,`~optional`)}function En(e){return an(e,[`~readonly`])}function Dn(e){return on(e,{"~readonly":!0},{})}function On(e){return Dn(e)}function kn(e){return cn(e)&&H(e,`~readonly`)}function An(e,t){return rn({"~kind":`Array`},{type:`array`,items:e},t)}function jn(e){return sn(e,`Array`)}function Mn(e){return an(e,[`~kind`,`type`,`items`])}function Nn(e,t){return rn({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function Pn(e){return sn(e,`AsyncIterator`)}function Fn(e){return an(e,[`~kind`,`type`,`iteratorItems`])}function In(e){return{enumerable:en().enumerableKind,writable:!1,configurable:!1,value:e}}var Ln=class{constructor(){globalThis.Object.defineProperty(this,`~kind`,In(`Base`)),globalThis.Object.defineProperty(this,`~guard`,In({check:e=>this.Check(e),errors:e=>this.Errors(e)}))}Check(e){return!0}Errors(e){return[]}Convert(e){return e}Clean(e){return e}Default(e){return e}Create(){throw Error(`Create not implemented`)}Clone(){throw Error(`Clone not implemented`)}};function Rn(e){return sn(e,`Base`)}function zn(e,t,n={}){return rn({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function Bn(e){return sn(e,`Constructor`)}function Vn(e){return an(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Hn(e,t,n={}){return rn({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Un(e){return sn(e,`Function`)}function Wn(e){return an(e,[`~kind`,`type`,`parameters`,`returnType`])}function Gn(e,t){return rn({"~kind":`Ref`},{$ref:e},t)}function Kn(e){return sn(e,`Ref`)}function qn(e,t){return rn({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function Jn(e){return sn(e,`Generic`)}var Yn=`(?!)`;function Xn(e){return rn({"~kind":`Never`},{not:{}},e)}function Zn(e){return sn(e,`Never`)}function Qn(){return[`(not-resolvable)`,Xn()]}function $n(){return[`(not-generic)`,Xn()]}function er(e,t,n){return[e,qn(t,n)]}function tr(e,t,n){return t in e?nr(e,t,e[t],n):Qn()}function nr(e,t,n,r){return Jn(n)?er(t,n.parameters,n.expression):Kn(n)?tr(e,n.$ref,r):$n()}function rr(e,t,n){return nr(e,`(anonymous)`,t,n)}function ir(e,t,n){let r=Le(e).reduce((t,n)=>({...t,[n]:on(e[n],{},{$id:n})}),{});return rn({"~kind":`Cyclic`},{$defs:r,$ref:t},n)}function ar(e){return sn(e,`Cyclic`)}function or(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function sr(e){return rn({"~kind":`Unknown`},{},e)}function cr(e){return sn(e,`Unknown`)}function lr(...e){let[t,n]=or(e,{2:(e,t)=>[e,t,t],1:e=>[e,sr(),sr()]});return rn({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function ur(e){return sn(e,`Infer`)}function dr(e){return rn({"~kind":`Any`},{},e)}function fr(e){return sn(e,`Any`)}function pr(e){return be(e)}function mr(e){return Le(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function hr(e,t){let n=pr(e)?mr(e):e;return rn({"~kind":`Enum`},{enum:n},t)}function gr(e){return sn(e,`Enum`)}function _r(e,t={}){return rn({"~kind":`Intersect`},{allOf:e},t)}function vr(e){return sn(e,`Intersect`)}function yr(e){return an(e,[`~kind`,`allOf`])}function br(){throw Error(`Unreachable`)}var xr=void 0;function Sr(){try{return new globalThis.Function(`null`)(),!0}catch{return!1}}function Cr(){return B(xr)&&(xr=Sr()),xr&&en().useAcceleration}var wr=s({Hash:()=>$r,HashCode:()=>Qr});function Tr(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function Er(e){return typeof e==`number`}var Dr;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(Dr||={});var Or=BigInt(`14695981039346656037`),[kr,Ar]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],jr=Array.from({length:256}).map((e,t)=>BigInt(t)),Mr=new Float64Array(1),Nr=new DataView(Mr.buffer),Pr=new Uint8Array(Mr.buffer);function Fr(e){Or^=jr[e],Or=Or*kr%Ar}function Ir(e){Fr(Dr.Array);for(let t of e)Zr(t)}function Lr(e){Fr(Dr.BigInt),Nr.setBigInt64(0,e);for(let e of Pr)Fr(e)}function Rr(e){Fr(Dr.Boolean),Fr(e?1:0)}function zr(e){Fr(Dr.Constructor),Zr(e.toString())}function Br(e){Fr(Dr.Date),Zr(e.getTime())}function Vr(e){Fr(Dr.Function),Zr(e.toString())}function Hr(e){Fr(Dr.Null)}function Ur(e){Fr(Dr.Number),Nr.setFloat64(0,e,!0);for(let e of Pr)Fr(e)}function Wr(e){Fr(Dr.Object);for(let t of Tr(e).sort())Zr(t),Zr(e[t])}function Gr(e){Fr(Dr.RegExp),qr(e.toString())}var Kr=new TextEncoder;function qr(e){Fr(Dr.String);for(let t of Kr.encode(e))Fr(t)}function Jr(e){Fr(Dr.Symbol),Zr(e.toString())}function Yr(e){Fr(Dr.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)Fr(t[e])}function Xr(e){return Fr(Dr.Undefined)}function Zr(e){return zt(e)?Yr(e):Vt(e)?Br(e):Bt(e)?Gr(e):It(e)?Rr(e.valueOf()):Rt(e)?qr(e.valueOf()):Lt(e)?Ur(e.valueOf()):Er(e)?Ur(e):R(e)?Ir(e):pe(e)?Rr(e):fe(e)?Lr(e):me(e)?zr(e):ve(e)?Hr(e):xe(e)?Wr(e):z(e)?qr(e):Se(e)?Jr(e):B(e)?Xr(e):he(e)?Vr(e):br()}function Qr(e){return Or=BigInt(`14695981039346656037`),Zr(e),Or}function $r(e){return Qr(e).toString(16).padStart(16,`0`)}function ei(e){switch(e.keyword){case`additionalProperties`:return`must not have additional properties`;case`anyOf`:return`must match a schema in anyOf`;case`boolean`:return`schema is false`;case`const`:return`must be equal to constant`;case`contains`:return`must contain at least 1 valid item`;case`dependencies`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`dependentRequired`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`enum`:return`must be equal to one of the allowed values`;case`exclusiveMaximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`exclusiveMinimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`format`:return`must match format "${e.params.format}"`;case`if`:return`must match "${e.params.failingKeyword}" schema`;case`maxItems`:return`must not have more than ${e.params.limit} items`;case`maxLength`:return`must not have more than ${e.params.limit} characters`;case`maxProperties`:return`must not have more than ${e.params.limit} properties`;case`maximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`minItems`:return`must not have fewer than ${e.params.limit} items`;case`minLength`:return`must not have fewer than ${e.params.limit} characters`;case`minProperties`:return`must not have fewer than ${e.params.limit} properties`;case`minimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`multipleOf`:return`must be multiple of ${e.params.multipleOf}`;case`not`:return`must not be valid`;case`oneOf`:return`must match exactly one schema in oneOf`;case`pattern`:return`must match pattern "${e.params.pattern}"`;case`propertyNames`:return`property names ${e.params.propertyNames.join(`, `)} are invalid`;case`required`:return`must have required properties ${e.params.requiredProperties.join(`, `)}`;case`type`:return typeof e.params.type==`string`?`must be ${e.params.type}`:`must be either ${e.params.type.join(` or `)}`;case`unevaluatedItems`:return`must not have unevaluated items`;case`unevaluatedProperties`:return`must not have unevaluated properties`;case`uniqueItems`:return`must not have duplicate items`;case`~guard`:return`must match check function`;case`~refine`:return e.params.message;default:return`an unknown validation error occurred`}}var ti=ei;function ni(){return ti}var ri=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:ci(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:ci(t)?n=>t[`~codec`].encode(e(n)):e};return on(this.type,{"~codec":n},{})}},ii=class{constructor(e){this.type=e}Decode(e){return new ri(this.type,e)}};function ai(e){return new ii(e)}function oi(e,t){return ai(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function si(e,t){return ai(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function ci(e){return cn(e)&&H(e,`~codec`)&&xe(e[`~codec`])&&H(e[`~codec`],`encode`)&&H(e[`~codec`],`decode`)}function li(e,t){let n=di(e)?[...e[`~refine`],t]:[t];return on(e,{"~refine":n},{})}function ui(e,t,n=`error`){return li(e,{refine:t,message:n})}function di(e){return cn(e)&&H(e,`~refine`)}var fi=`-?(?:0|[1-9][0-9]*)n`;function pi(e){return rn({"~kind":`BigInt`},{type:`bigint`},e)}function mi(e){return sn(e,`BigInt`)}function hi(e){return rn({"~kind":`Boolean`},{type:`boolean`},e)}function gi(e){return sn(e,`Boolean`)}function _i(e){return rn({"~kind":`Identifier`},{name:e})}function vi(e){return sn(e,`Identifier`)}var yi=`-?(?:0|[1-9][0-9]*)`;function bi(e){return rn({"~kind":`Integer`},{type:`integer`},e)}function xi(e){return sn(e,`Integer`)}function Si(e,t){return rn({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Ci(e){return sn(e,`Iterator`)}function wi(e){return an(e,[`~kind`,`type`,`iteratorItems`])}var Ti=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,`cause`,{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function Ei(e){return fe(e)?`bigint`:pe(e)?`boolean`:ye(e)?`number`:z(e)?`string`:(()=>{throw new Ti(e)})()}function Di(e,t){return rn({"~kind":`Literal`},{type:Ei(e),const:e},t)}function Oi(e){return fe(e)||pe(e)||ye(e)||z(e)}function ki(e){return Ni(e)&&fe(e.const)}function Ai(e){return Ni(e)&&pe(e.const)}function ji(e){return Ni(e)&&ye(e.const)}function Mi(e){return Ni(e)&&z(e.const)}function Ni(e){return sn(e,`Literal`)}function Pi(e){return rn({"~kind":`Null`},{type:`null`},e)}function Fi(e){return sn(e,`Null`)}var Ii=`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`;function Li(e){return rn({"~kind":`Number`},{type:`number`},e)}function Ri(e){return sn(e,`Number`)}function zi(e){return rn({"~kind":`Symbol`},{type:`symbol`},e)}function Bi(e){return sn(e,`Symbol`)}function Vi(e){return Le(e).filter(t=>!Tn(e[t]))}function Hi(e){return Le(e)}function Ui(e){return ze(e)}function Wi(e,t={}){let n=Vi(e),r=n.length>0?{required:n}:{};return rn({"~kind":`Object`},{type:`object`,...r,properties:e},t)}function Gi(e){return sn(e,`Object`)}function Ki(e){return an(e,[`~kind`,`type`,`properties`,`required`])}function qi(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,sr(),sr()]});return rn({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function Ji(e){return sn(e,`Parameter`)}function Yi(e,t){return rn({"~kind":`Promise`},{type:`promise`,item:e},t)}function Xi(e){return sn(e,`Promise`)}function Zi(e){return an(e,[`~kind`,`type`,`item`])}function Qi(e){return rn({"~kind":`String`},{type:`string`},e)}function $i(e){return sn(e,`String`)}function ea(e,t={}){return rn({"~kind":`Union`},{anyOf:e},t)}function ta(e){return sn(e,`Union`)}function na(e){return an(e,[`~kind`,`anyOf`])}function ra(e){let t=_d(e);return V(t.length,2)?t[0]:[]}function ia(e){return!0}function aa(e){let[t,...n]=e;return cn(t)?sa(t)?aa(n):!1:!0}function oa(e){return V(e.length,0)?!1:aa(e)}function sa(e){return ta(e)?oa(e.anyOf):Ni(e)?ia(e.const):!1}function ca(e){return oa(e)}function la(e){return rn({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function ua(e,t,n=[]){let[r,...i]=e;return z(r)?ua(i,t,[...n,`${r}${t}`]):n}function da(e,t){return V(e.length,0)?[`${t}`]:ua(e,t)}function fa(e,t,n=[]){let[r,...i]=t;return cn(r)?fa(e,i,[...n,...pa(e,r)]):n}function pa(e,t){return ta(t)?fa(e,t.anyOf):Ni(t)?da(e,t.const):br()}function ma(e,t){let[n,...r]=t;return cn(n)?ma(pa(e,n),r):e}function ha(e){return e.map(e=>Di(e))}function ga(e){return ea(ha(ma([],e)))}function _a(e){return V(e.length,0)?br():V(e.length,1)&&Ni(e[0])?e[0]:ga(e)}function va(e){let t=ra(e);return V(t.length,0)?Qi():ca(t)?_a(t):la(e)}function ya(e){let t=va(e);return Ld(t)?Qi():t}function ba(e,t){let n={[e]:t};return rn({"~kind":`Record`},{type:`object`,patternProperties:n})}var xa=`^${yi}$`,Sa=`^${Ii}$`,Ca=`^.*$`;function wa(e,t,n={}){return _n(`Record`,[e,t],n)}function Ta(e,t,n={}){return ey({},wa(e,t,n))}function Ea(e,t,n={}){return Ta(e,t,n)}function Da(e,t){return ba(e,t)}function Oa(e){return Le(e.patternProperties)[0]}function ka(e){let t=Oa(e);return V(t,Ca)?Qi():V(t,xa)?bi():V(t,Sa)?Li():va(t)}function Aa(e){return e.patternProperties[Oa(e)]}function ja(e){return sn(e,`Record`)}function Ma(e){return rn({"~kind":`Rest`},{type:`rest`,items:e},{})}function Na(e){return sn(e,`Rest`)}function Pa(e){return rn({"~kind":`This`},{$ref:`#`},e)}function Fa(e){return sn(e,`This`)}function Ia(e,t={}){let[n,r,i]=[e,e.length,!1];return rn({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function La(e){return sn(e,`Tuple`)}function Ra(e){return an(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function za(e){return rn({"~kind":`Undefined`},{type:`undefined`},e)}function Ba(e){return sn(e,`Undefined`)}function Va(e){return rn({"~kind":`Unsafe`},{},e)}function Ha(e){return sn(e,`Unsafe`)}function Ua(e){return rn({"~kind":`Void`},{type:`void`},e)}function Wa(e){return sn(e,`Void`)}function Ga(e,t){return V(e,`Array`)?An(t[0]):V(e,`AsyncIterator`)?Nn(t[0]):V(e,`Iterator`)?Si(t[0]):V(e,`Promise`)?Yi(t[0]):V(e,`Awaited`)?ty(t[0]):V(e,`Capitalize`)?Bm(t[0]):V(e,`ConstructorParameters`)?uh(t[0]):V(e,`Evaluate`)?ry(t[0]):V(e,`Exclude`)?hh(t[0],t[1]):V(e,`Extract`)?Sh(t[0],t[1]):V(e,`Index`)?tg(t[0],t[1]):V(e,`InstanceType`)?_g(t[0]):V(e,`Lowercase`)?Hm(t[0]):V(e,`NonNullable`)?$g(t[0]):V(e,`Omit`)?a_(t[0],t[1]):V(e,`Options`)?d_(t[0],t[1]):V(e,`Parameters`)?h_(t[0]):V(e,`Partial`)?b_(t[0]):V(e,`Pick`)?k_(t[0],t[1]):V(e,`Readonly`)?F_(t[0]):V(e,`KeyOf`)?wg(t[0]):V(e,`Record`)?wa(t[0],t[1]):V(e,`Required`)?hv(t[0]):V(e,`ReturnType`)?yv(t[0]):V(e,`Uncapitalize`)?Wm(t[0]):V(e,`Uppercase`)?Km(t[0]):km(Gn(e),t)}function Ka(){throw Error(`Unreachable`)}var qa=(e,t=[])=>e.reduce((e,t)=>R(t)&&V(t.length,2)?[...e,t[0]]:[...e,t],[]),Ja=e=>{let[t,n]=e;return qa([...t,...n])};function Ya(e){return qi(e[0],e[2],e[4])}function Xa(e){return qi(e[0],e[2],e[2])}function Za(e){return qi(e[0],sr(),e[2])}function Qa(e){return qi(e,sr(),sr())}function $a(e){return e}function eo(e){return Ja(e)}function to(e){return e[1]}function no(e){return Ja(e)}function ro(e){return e[1]}function io(e){return Ga(e[0],e[1])}function ao(e){return null}function oo(e){return Qi()}function so(e){return Li()}function co(e){return hi()}function lo(e){return za()}function uo(e){return Pi()}function fo(e){return bi()}function po(e){return pi()}function mo(e){return sr()}function ho(e){return dr()}function go(e){return Wi({})}function _o(e){return Xn()}function vo(e){return zi()}function yo(e){return Ua()}function bo(e){return Pa()}function xo(e){return e}function So(e){return e[1]}function Co(e){return Di(e)}function wo(e){return V(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function To(e){return e[1]}function Eo(e){return Nd(e)}function Do(e){return Di(BigInt(e))}function Oo(e){return Di(V(e,`true`))}function ko(e){return Di(parseFloat(e))}function Ao(e){return Di(e)}function jo(e){return e}function Mo(e){return e.length>0}function No(e){return e.reduce((e,t)=>V(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function Po(e){return V(e.length,6)?[e[1],e[3],e[5]]:[]}function Fo(e){return R(e)&&V(e.length,3)?e[1]:e}var Io=(e,t)=>t.reduceRight((e,t)=>{let n=t;return V(n.length,1)?tg(e,n[0]):V(n.length,0)?An(e):Ka()},e),Lo=(e,t)=>V(t.length,3)?oh(e,t[0],t[1],t[2]):e;function Ro(e){let[t,n,r,i]=e;return Lo(t?wg(Io(n,r)):Io(n,r),i)}function zo(e,t){return V(t.length,3)?(()=>{let[n,r,i]=t,a=zo(r,i);if(V(n,`&`))return vr(a)?_r([e,...a.allOf]):_r([e,a]);if(V(n,`|`))return ta(a)?ea([e,...a.anyOf]):ea([e,a]);Ka()})():e}function Bo(e){return e}function Vo(e){let[t,n]=e;return zo(t,n)}function Ho(e){return e}function Uo(e){let[t,n]=e;return zo(t,n)}function Wo(e){return yn(e[1])}function Go(e){return e[1]}function Ko(e){return qn(e[0],e[2])}function qo(e){return V(e.length,4)?lr(e[1],e[3]):V(e.length,2)?lr(e[1],sr()):Ka()}function Jo(e){return e}function Yo(e){return`${e}`}function Xo(e){return e}function Zo(e){return e}function Qo(e){return xi(e[3])?xa:Ri(e[3])?Sa:Bi(e[3])||$i(e[3])?Ca:Ka()}function $o(e){return e}function es(e){return e.length>0}function ts(e){return e.length>0}function ns(e){let[t,n,r,i,a]=e;return{[n]:t&&r?Dn(Cn(a)):t&&!r?Dn(a):!t&&r?Cn(a):a}}function rs(e){return e}function is(e){return Ja(e)}function as(e){return e.reduce((e,t)=>H(t,xa)||H(t,Sa)||H(t,Ca)?[e[0],P(e[1],t)]:[P(e[0],t),e[1]],[{},{}])}function os(e){return as(e[1])}function ss(e){let[t,n]=e;return Wi(t,V(Le(n).length,0)?{}:{patternProperties:n})}function cs(e){return V(e.length,5)?Dn(Cn(e[4])):V(e.length,3)?e[2]:V(e.length,4)?V(e[2],`readonly`)?Dn(e[3]):Cn(e[3]):Ka()}function ls(e){return Dn(Cn(e[1]))}function us(e){return Dn(e[1])}function ds(e){return Cn(e[0])}function fs(e){return e}function ps(e){return V(e.length,2)?Ma(e[1]):V(e.length,1)?e[0]:Ka()}function ms(e){return Ja(e)}function hs(e){return Ia(e[1])}function gs(e){return Dn(Cn(e[4]))}function _s(e){return Dn(e[3])}function vs(e){return Cn(e[3])}function ys(e){return e[2]}function bs(e){return e}function xs(e){return V(e.length,2)?Ma(e[1]):V(e.length,1)?e[0]:Ka()}function Ss(e){return Ja(e)}function Cs(e){return Hn(e[1],e[4])}function ws(e){return zn(e[2],e[5])}function Ts(e,t){return V(e,`remove`)?hn(t):V(e,`add`)?pn(t):t}function Es(e){return V(e.length,2)&&V(e[0],`-`)?`remove`:V(e.length,2)&&V(e[0],`+`)||V(e.length,1)?`add`:`none`}function Ds(e,t){return V(e,`remove`)?dn(t):V(e,`add`)?ln(t):t}function Os(e){return V(e.length,2)&&V(e[0],`-`)?`remove`:V(e.length,2)&&V(e[0],`+`)||V(e.length,1)?`add`:`none`}function ks(e){return V(e.length,2)?[e[1]]:[]}function As(e){return R(e[6])&&V(e[6].length,1)?Bg(_i(e[3]),e[5],e[6][0],Ts(e[1],Ds(e[8],e[10]))):Bg(_i(e[3]),e[5],Gn(e[3]),Ts(e[1],Ds(e[8],e[10])))}function js(e){return Gn(e)}function Ms(e){return d_(e[2],e[4])}function Ns(e){return parseFloat(e)}function Ps(e){return V(e,`true`)}function Fs(e){return e}function Is(e){return null}function Ls(e){return{[e[0]]:e[2]}}function Rs(e){return Ja(e)}function zs(e){return e.reduce((e,t)=>P(e,t),{})}function Bs(e){return zs(e[1])}function Vs(e){return Ja(e)}function Hs(e){return e[1]}function Us(e){return e}function Ws(e){return pi()}function Gs(e){return Qi()}function Ks(e){return Li()}function qs(e){return bi()}function Js(e){return Xn()}function Ys(e){return Di(e)}function Xs(e){return e}function Zs(e){return ea(e[1])}function Qs(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function $s(e){return[e[0],...e[1]]}function ec(e){return e}function tc(e){return e[1]}function nc(e){return Ja(e)}function rc(e){return V(e.length,2)?e[1]:[]}function ic(e){let t=e[2],n=e[3],[r,i]=e[4],a=V(Le(i).length,0)?{}:{patternProperties:i};return{[e[1]]:qn(t,Gp(n,r,a))}}function ac(e){let t=e[2],[n,r]=e[3],i=V(Le(r).length,0)?{}:{patternProperties:r};return{[e[1]]:Gp(t,n,i)}}function oc(e){return{[e[1]]:qn(e[2],e[4])}}function sc(e){return{[e[1]]:e[3]}}function cc(e){return null}function lc(e){return e}function uc(e){return as(Ja(e))}function dc(e){return e[1]}function fc(e){let t=e[0],n=e[1];return ay(P(t,n[0]))}function pc(e){return e}function mc(e){return R(e)&&V(e.length,2)}function hc(e,t){return V(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function gc(e,t){let[n,...r]=e;return z(n)?(()=>{let e=hc(n,t);return V(e.length,2)?e:gc(r,t)})():[]}function _c(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var vc=[..._c(97,122),..._c(65,90)],yc=_c(49,57),bc=[`0`,...yc],xc=`//`,Sc=`/*`,Cc=`*/`;function wc(e){let t=e.indexOf(Cc);return V(t,-1)?``:e.slice(t+2)}function Tc(e){let t=e.indexOf(`
2
- `);return V(t,-1)?``:e.slice(t)}function Ec(e){return e.replace(/^[ \t\r\f\v]+/,``)}function Dc(e){let t=Ec(e);return t.startsWith(Sc)?Dc(wc(t.slice(2))):t.startsWith(xc)?Dc(Tc(t.slice(2))):t}function Oc(e){let t=e.trimStart();return t.startsWith(Sc)?Oc(wc(t.slice(2))):t.startsWith(xc)?Oc(Tc(t.slice(2))):t}function kc(e,t){return e.includes(t)}function Ac(e,t,n,r=``){let i=gc(e,n);return mc(i)?kc(t,i[0])?Ac(e,t,i[1],r):Ac(e,t,i[1],`${r}${i[0]}`):[r,n]}function jc(e,t){let n=gc([e],t);return mc(n)?n:[``,t]}function Mc(e){return jc(`-`,e)}function Nc(e){return gc(yc,e)}var Pc=[...bc,`_`];function Fc(e){return Ac(Pc,[`_`],e)}function Ic(e){let t=Mc(e);return mc(t)?(()=>{let e=gc([`0`],t[1]);return mc(e)?[`${t[0]}${e[0]}`,e[1]]:(()=>{let e=Nc(t[1]);return mc(e)?(()=>{let n=Fc(e[1]);return mc(n)?[`${t[0]}${e[0]}${n[0]}`,n[1]]:[]})():[]})()})():[]}function Lc(e){return Ic(Oc(e))}function Rc(e){let t=Lc(e);return mc(t)?(()=>{let e=gc([`n`],t[1]);return mc(e)?[`${t[0]}`,e[1]]:[]})():[]}function zc(e){return Rc(e)}function Bc(e,t){return gc([e],t)}function U(e,t){return V(e,``)?[``,t]:e.startsWith(`
3
- `)?Bc(e,Dc(t)):e.startsWith(` `)?Bc(e,t):Bc(e,Oc(t))}var Vc=[...vc,`_`,`$`];function Hc(e){return gc(Vc,e)}var Uc=[...Vc,...bc];function Wc(e,t=``){let n=gc(Uc,e);return mc(n)?Wc(n[1],`${t}${n[0]}`):[t,e]}function Gc(e){let t=Hc(e);return mc(t)?(()=>{let e=Wc(t[1]);return mc(e)?[`${t[0]}${e[0]}`,e[1]]:[]})():[]}function Kc(e){return Gc(Oc(e))}var qc=[...bc,`_`];function Jc(e){return jc(`-`,e)}function Yc(e){return mc(gc([`.`],e))}function Xc(e){let t=Ac(qc,[`_`],e);return mc(t)?V(t[0],``)?[]:[t[0],t[1]]:[]}function Zc(e,t){let n=gc([`.`],t);return mc(n)?(()=>{let t=Xc(n[1]);return mc(t)?[`${e}0${n[0]}${t[0]}`,t[1]]:[]})():[]}function Qc(e,t){let n=Lc(t);return mc(n)?(()=>{let t=gc([`.`],n[1]);return mc(t)?(()=>{let r=Xc(t[1]);return mc(r)?[`${e}${n[0]}${t[0]}${r[0]}`,r[1]]:[`${e}${n[0]}`,t[1]]})():[`${e}${n[0]}`,n[1]]})():[]}function $c(e){let t=Jc(e);return mc(t)?Yc(t[1])?Zc(t[0],t[1]):Qc(t[0],t[1]):[]}function el(e){return $c(Oc(e))}function tl(e,t){let[n,...r]=e;return z(n)?t.startsWith(n)?!0:tl(r,t):!1}function nl(e,t,n=``){return V(t,``)?[]:tl(e,t)?[n,t]:(()=>{let[r,i]=[t.slice(0,1),t.slice(1)];return nl(e,i,`${n}${r}`)})()}function rl(e,t,n){return n.startsWith(e)?(()=>{let r=nl([t],n.slice(e.length));return mc(r)&&r[1].startsWith(t)?[`${r[0]}`,r[1].slice(t.length)]:[]})():[]}function il(e,t,n){return n.startsWith(e)?(()=>{let r=nl([`
4
- `,t],n.slice(e.length));return mc(r)&&r[1].startsWith(t)?[`${r[0]}`,r[1].slice(t.length)]:[]})():[]}function al(e,t,n,r){return n?rl(e,t,Oc(r)):il(e,t,Oc(r))}function ol(e,t){return gc(e,t)}function sl(e,t){return al(e,e,!1,t)}function cl(e,t){let n=ol(e,t);return mc(n)?sl(n[0],`${n[0]}${n[1]}`):[]}function ll(e,t){return cl(e,Oc(t))}function ul(e,t){let n=nl(e,t);return mc(n)?V(n[0],``)?[]:n:[]}var W=(e,t,n=()=>[])=>e.length===2?t(e):n(),dl=e=>W(W(Kc(e),([e,t])=>W(U(`extends`,t),([t,n])=>W(lu(n),([n,r])=>W(U(`=`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Ya(e),t]),fl=e=>W(W(Kc(e),([e,t])=>W(U(`extends`,t),([t,n])=>W(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Xa(e),t]),pl=e=>W(W(Kc(e),([e,t])=>W(U(`=`,t),([t,n])=>W(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Za(e),t]),ml=e=>W(Kc(e),([e,t])=>[Qa(e),t]),hl=e=>W(W(dl(e),([e,t])=>[e,t],()=>W(fl(e),([e,t])=>[e,t],()=>W(pl(e),([e,t])=>[e,t],()=>W(ml(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[$a(e),t]),gl=(e,t=[])=>W(W(hl(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>gl(n,[...t,e]),()=>[t,e]),_l=e=>W(W(gl(e),([e,t])=>W(W(W(hl(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[eo(e),t]),vl=e=>W(W(U(`<`,e),([e,t])=>W(_l(t),([t,n])=>W(U(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[to(e),t]),yl=(e,t=[])=>W(W(lu(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>yl(n,[...t,e]),()=>[t,e]),bl=e=>W(W(yl(e),([e,t])=>W(W(W(lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[no(e),t]),xl=e=>W(W(U(`<`,e),([e,t])=>W(bl(t),([t,n])=>W(U(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ro(e),t]),Sl=e=>W(W(Kc(e),([e,t])=>W(xl(t),([t,n])=>[[e,t],n])),([e,t])=>[io(e),t]),Cl=e=>W(W(W(U(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[ao(e),t]),wl=e=>W(U(`string`,e),([e,t])=>[oo(e),t]),Tl=e=>W(U(`number`,e),([e,t])=>[so(e),t]),El=e=>W(U(`boolean`,e),([e,t])=>[co(e),t]),Dl=e=>W(U(`undefined`,e),([e,t])=>[lo(e),t]),Ol=e=>W(U(`null`,e),([e,t])=>[uo(e),t]),kl=e=>W(U(`integer`,e),([e,t])=>[fo(e),t]),Al=e=>W(U(`bigint`,e),([e,t])=>[po(e),t]),jl=e=>W(U(`unknown`,e),([e,t])=>[mo(e),t]),Ml=e=>W(U(`any`,e),([e,t])=>[ho(e),t]),Nl=e=>W(U(`object`,e),([e,t])=>[go(e),t]),Pl=e=>W(U(`never`,e),([e,t])=>[_o(e),t]),Fl=e=>W(U(`symbol`,e),([e,t])=>[vo(e),t]),Il=e=>W(U(`void`,e),([e,t])=>[yo(e),t]),Ll=e=>W(U(`this`,e),([e,t])=>[bo(e),t]),Rl=e=>W(W(wl(e),([e,t])=>[e,t],()=>W(Tl(e),([e,t])=>[e,t],()=>W(El(e),([e,t])=>[e,t],()=>W(Dl(e),([e,t])=>[e,t],()=>W(Ol(e),([e,t])=>[e,t],()=>W(kl(e),([e,t])=>[e,t],()=>W(Al(e),([e,t])=>[e,t],()=>W(jl(e),([e,t])=>[e,t],()=>W(Ml(e),([e,t])=>[e,t],()=>W(Nl(e),([e,t])=>[e,t],()=>W(Pl(e),([e,t])=>[e,t],()=>W(Fl(e),([e,t])=>[e,t],()=>W(Il(e),([e,t])=>[e,t],()=>W(Ll(e),([e,t])=>[e,t],()=>[])))))))))))))),([e,t])=>[xo(e),t]),zl=e=>W(W(U("${",e),([e,t])=>W(lu(t),([t,n])=>W(U(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[So(e),t]),Bl=e=>W(nl(["${","`"],e),([e,t])=>[Co(e),t]),Vl=e=>W(W(W(Bl(e),([e,t])=>W(zl(t),([t,n])=>W(Vl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W(W(Bl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W(W(Bl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[wo(e),t]),Hl=e=>W(W(U("`",e),([e,t])=>W(Vl(t),([t,n])=>W(U("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[To(e),t]),Ul=e=>W(Hl(e),([e,t])=>[Eo(e),t]),Wl=e=>W(zc(e),([e,t])=>[Do(e),t]),Gl=e=>W(W(U(`true`,e),([e,t])=>[e,t],()=>W(U(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Oo(e),t]),Kl=e=>W(el(e),([e,t])=>[ko(e),t]),ql=e=>W(ll([`'`,`"`],e),([e,t])=>[Ao(e),t]),Jl=e=>W(W(Wl(e),([e,t])=>[e,t],()=>W(Gl(e),([e,t])=>[e,t],()=>W(Kl(e),([e,t])=>[e,t],()=>W(ql(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[jo(e),t]),Yl=e=>W(W(W(U(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Mo(e),t]),Xl=(e,t=[])=>W(W(W(U(`[`,e),([e,t])=>W(lu(t),([t,n])=>W(U(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W(W(U(`[`,e),([e,t])=>W(U(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>Xl(n,[...t,e]),()=>[t,e]),Zl=e=>W(Xl(e),([e,t])=>[No(e),t]),Ql=e=>W(W(W(U(`extends`,e),([e,t])=>W(lu(t),([t,n])=>W(U(`?`,n),([n,r])=>W(lu(r),([r,i])=>W(U(`:`,i),([i,a])=>W(lu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Po(e),t]),$l=e=>W(W(W(U(`(`,e),([e,t])=>W(lu(t),([t,n])=>W(U(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W(Rl(e),([e,t])=>[e,t],()=>W(Su(e),([e,t])=>[e,t],()=>W(ju(e),([e,t])=>[e,t],()=>W(Ul(e),([e,t])=>[e,t],()=>W(Jl(e),([e,t])=>[e,t],()=>W(Vu(e),([e,t])=>[e,t],()=>W(Bu(e),([e,t])=>[e,t],()=>W(Gu(e),([e,t])=>[e,t],()=>W(qu(e),([e,t])=>[e,t],()=>W(Sl(e),([e,t])=>[e,t],()=>W(Ku(e),([e,t])=>[e,t],()=>[])))))))))))),([e,t])=>[Fo(e),t]),eu=e=>W(W(Yl(e),([e,t])=>W($l(t),([t,n])=>W(Zl(n),([n,r])=>W(Ql(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Ro(e),t]),tu=e=>W(W(W(U(`&`,e),([e,t])=>W(eu(t),([t,n])=>W(tu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Bo(e),t]),nu=e=>W(W(eu(e),([e,t])=>W(tu(t),([t,n])=>[[e,t],n])),([e,t])=>[Vo(e),t]),ru=e=>W(W(W(U(`|`,e),([e,t])=>W(nu(t),([t,n])=>W(ru(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Ho(e),t]),iu=e=>W(W(nu(e),([e,t])=>W(ru(t),([t,n])=>[[e,t],n])),([e,t])=>[Uo(e),t]),au=e=>W(W(U(`readonly`,e),([e,t])=>W(iu(t),([t,n])=>[[e,t],n])),([e,t])=>[Wo(e),t]),ou=e=>W(W(U(`|`,e),([e,t])=>W(iu(t),([t,n])=>[[e,t],n])),([e,t])=>[Go(e),t]),su=e=>W(W(vl(e),([e,t])=>W(U(`=`,t),([t,n])=>W(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ko(e),t]),cu=e=>W(W(W(U(`infer`,e),([e,t])=>W(Kc(t),([t,n])=>W(U(`extends`,n),([n,r])=>W(iu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>W(W(U(`infer`,e),([e,t])=>W(Kc(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[qo(e),t]),lu=e=>W(W(cu(e),([e,t])=>[e,t],()=>W(ou(e),([e,t])=>[e,t],()=>W(au(e),([e,t])=>[e,t],()=>W(iu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Jo(e),t]),uu=e=>W(el(e),([e,t])=>[Yo(e),t]),du=e=>W(Kc(e),([e,t])=>[Xo(e),t]),fu=e=>W(ll([`'`,`"`],e),([e,t])=>[Zo(e),t]),pu=e=>W(W(U(`[`,e),([e,t])=>W(Kc(t),([t,n])=>W(U(`:`,n),([n,r])=>W(W(kl(r),([e,t])=>[e,t],()=>W(Tl(r),([e,t])=>[e,t],()=>W(wl(r),([e,t])=>[e,t],()=>W(Fl(r),([e,t])=>[e,t],()=>[])))),([r,i])=>W(U(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Qo(e),t]),mu=e=>W(W(uu(e),([e,t])=>[e,t],()=>W(du(e),([e,t])=>[e,t],()=>W(fu(e),([e,t])=>[e,t],()=>W(pu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[$o(e),t]),hu=e=>W(W(W(U(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[es(e),t]),gu=e=>W(W(W(U(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[ts(e),t]),_u=e=>W(W(hu(e),([e,t])=>W(mu(t),([t,n])=>W(gu(n),([n,r])=>W(U(`:`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ns(e),t]),vu=e=>W(W(W(U(`,`,e),([e,t])=>W(U(`
5
- `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`;`,e),([e,t])=>W(U(`
6
- `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W(W(U(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W(W(U(`
7
- `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[rs(e),t]),yu=(e,t=[])=>W(W(_u(e),([e,t])=>W(vu(t),([t,n])=>[[e,t],n])),([e,n])=>yu(n,[...t,e]),()=>[t,e]),bu=e=>W(W(yu(e),([e,t])=>W(W(W(_u(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[is(e),t]),xu=e=>W(W(U(`{`,e),([e,t])=>W(bu(t),([t,n])=>W(U(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[os(e),t]),Su=e=>W(xu(e),([e,t])=>[ss(e),t]),Cu=e=>W(W(W(Kc(e),([e,t])=>W(U(`?`,t),([t,n])=>W(U(`:`,n),([n,r])=>W(U(`readonly`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>W(W(Kc(e),([e,t])=>W(U(`:`,t),([t,n])=>W(U(`readonly`,n),([n,r])=>W(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>W(W(Kc(e),([e,t])=>W(U(`?`,t),([t,n])=>W(U(`:`,n),([n,r])=>W(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>W(W(Kc(e),([e,t])=>W(U(`:`,t),([t,n])=>W(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[cs(e),t]),wu=e=>W(W(U(`readonly`,e),([e,t])=>W(lu(t),([t,n])=>W(U(`?`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ls(e),t]),Tu=e=>W(W(U(`readonly`,e),([e,t])=>W(lu(t),([t,n])=>[[e,t],n])),([e,t])=>[us(e),t]),Eu=e=>W(W(lu(e),([e,t])=>W(U(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[ds(e),t]),Du=e=>W(W(Cu(e),([e,t])=>[e,t],()=>W(wu(e),([e,t])=>[e,t],()=>W(Tu(e),([e,t])=>[e,t],()=>W(Eu(e),([e,t])=>[e,t],()=>W(lu(e),([e,t])=>[e,t],()=>[]))))),([e,t])=>[fs(e),t]),Ou=e=>W(W(W(U(`...`,e),([e,t])=>W(Du(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(Du(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[ps(e),t]),ku=(e,t=[])=>W(W(Ou(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>ku(n,[...t,e]),()=>[t,e]),Au=e=>W(W(ku(e),([e,t])=>W(W(W(Ou(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[ms(e),t]),ju=e=>W(W(U(`[`,e),([e,t])=>W(Au(t),([t,n])=>W(U(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[hs(e),t]),Mu=e=>W(W(Kc(e),([e,t])=>W(U(`?`,t),([t,n])=>W(U(`:`,n),([n,r])=>W(U(`readonly`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[gs(e),t]),Nu=e=>W(W(Kc(e),([e,t])=>W(U(`:`,t),([t,n])=>W(U(`readonly`,n),([n,r])=>W(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[_s(e),t]),Pu=e=>W(W(Kc(e),([e,t])=>W(U(`?`,t),([t,n])=>W(U(`:`,n),([n,r])=>W(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[vs(e),t]),Fu=e=>W(W(Kc(e),([e,t])=>W(U(`:`,t),([t,n])=>W(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ys(e),t]),Iu=e=>W(W(Mu(e),([e,t])=>[e,t],()=>W(Nu(e),([e,t])=>[e,t],()=>W(Pu(e),([e,t])=>[e,t],()=>W(Fu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[bs(e),t]),Lu=e=>W(W(W(U(`...`,e),([e,t])=>W(Iu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(Iu(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[xs(e),t]),Ru=(e,t=[])=>W(W(Lu(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Ru(n,[...t,e]),()=>[t,e]),zu=e=>W(W(Ru(e),([e,t])=>W(W(W(Lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ss(e),t]),Bu=e=>W(W(U(`(`,e),([e,t])=>W(zu(t),([t,n])=>W(U(`)`,n),([n,r])=>W(U(`=>`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Cs(e),t]),Vu=e=>W(W(U(`new`,e),([e,t])=>W(U(`(`,t),([t,n])=>W(zu(n),([n,r])=>W(U(`)`,r),([r,i])=>W(U(`=>`,i),([i,a])=>W(lu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[ws(e),t]),Hu=e=>W(W(W(U(`+`,e),([e,t])=>W(U(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`-`,e),([e,t])=>W(U(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[Es(e),t]),Uu=e=>W(W(W(U(`+`,e),([e,t])=>W(U(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`-`,e),([e,t])=>W(U(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[Os(e),t]),Wu=e=>W(W(W(U(`as`,e),([e,t])=>W(lu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[ks(e),t]),Gu=e=>W(W(U(`{`,e),([e,t])=>W(Hu(t),([t,n])=>W(U(`[`,n),([n,r])=>W(Kc(r),([r,i])=>W(U(`in`,i),([i,a])=>W(lu(a),([a,o])=>W(Wu(o),([o,s])=>W(U(`]`,s),([s,c])=>W(Uu(c),([c,l])=>W(U(`:`,l),([l,u])=>W(lu(u),([u,d])=>W(Cl(d),([d,f])=>W(U(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[As(e),t]),Ku=e=>W(Kc(e),([e,t])=>[js(e),t]),qu=e=>W(W(U(`Options`,e),([e,t])=>W(U(`<`,t),([t,n])=>W(lu(n),([n,r])=>W(U(`,`,r),([r,i])=>W(td(i),([i,a])=>W(U(`>`,a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[Ms(e),t]),Ju=e=>W(el(e),([e,t])=>[Ns(e),t]),Yu=e=>W(W(U(`true`,e),([e,t])=>[e,t],()=>W(U(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Ps(e),t]),Xu=e=>W(ll([`"`,`'`],e),([e,t])=>[Fs(e),t]),Zu=e=>W(U(`null`,e),([e,t])=>[Is(e),t]),Qu=e=>W(W(mu(e),([e,t])=>W(U(`:`,t),([t,n])=>W(ad(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ls(e),t]),$u=(e,t=[])=>W(W(Qu(e),([e,t])=>W(vu(t),([t,n])=>[[e,t],n])),([e,n])=>$u(n,[...t,e]),()=>[t,e]),ed=e=>W(W($u(e),([e,t])=>W(W(W(Qu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Rs(e),t]),td=e=>W(W(U(`{`,e),([e,t])=>W(ed(t),([t,n])=>W(U(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Bs(e),t]),nd=(e,t=[])=>W(W(ad(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>nd(n,[...t,e]),()=>[t,e]),rd=e=>W(W(nd(e),([e,t])=>W(W(W(ad(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Vs(e),t]),id=e=>W(W(U(`[`,e),([e,t])=>W(rd(t),([t,n])=>W(U(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Hs(e),t]),ad=e=>W(W(Ju(e),([e,t])=>[e,t],()=>W(Yu(e),([e,t])=>[e,t],()=>W(Xu(e),([e,t])=>[e,t],()=>W(Zu(e),([e,t])=>[e,t],()=>W(td(e),([e,t])=>[e,t],()=>W(id(e),([e,t])=>[e,t],()=>[])))))),([e,t])=>[Us(e),t]),od=e=>W(U(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[Ws(e),t]),sd=e=>W(U(`.*`,e),([e,t])=>[Gs(e),t]),cd=e=>W(U(`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,e),([e,t])=>[Ks(e),t]),ld=e=>W(U(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[qs(e),t]),ud=e=>W(U(`(?!)`,e),([e,t])=>[Js(e),t]),dd=e=>W(ul([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[Ys(e),t]),fd=e=>W(W(od(e),([e,t])=>[e,t],()=>W(sd(e),([e,t])=>[e,t],()=>W(cd(e),([e,t])=>[e,t],()=>W(ld(e),([e,t])=>[e,t],()=>W(ud(e),([e,t])=>[e,t],()=>W(pd(e),([e,t])=>[e,t],()=>W(dd(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[Xs(e),t]),pd=e=>W(W(U(`(`,e),([e,t])=>W(gd(t),([t,n])=>W(U(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Zs(e),t]),md=e=>W(W(W(hd(e),([e,t])=>W(U(`|`,t),([t,n])=>W(md(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>W(W(hd(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[Qs(e),t]),hd=e=>W(W(fd(e),([e,t])=>W(gd(t),([t,n])=>[[e,t],n])),([e,t])=>[$s(e),t]),gd=e=>W(W(md(e),([e,t])=>[e,t],()=>W(hd(e),([e,t])=>[e,t],()=>[])),([e,t])=>[ec(e),t]),_d=e=>W(W(U(`^`,e),([e,t])=>W(gd(t),([t,n])=>W(U(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[tc(e),t]),vd=(e,t=[])=>W(W(lu(e),([e,t])=>W(U(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>vd(n,[...t,e]),()=>[t,e]),yd=e=>W(W(vd(e),([e,t])=>W(W(W(lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[nc(e),t]),bd=e=>W(W(W(U(`extends`,e),([e,t])=>W(yd(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[rc(e),t]),xd=e=>W(W(U(`interface`,e),([e,t])=>W(Kc(t),([t,n])=>W(vl(n),([n,r])=>W(bd(r),([r,i])=>W(xu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ic(e),t]),Sd=e=>W(W(U(`interface`,e),([e,t])=>W(Kc(t),([t,n])=>W(bd(n),([n,r])=>W(xu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[ac(e),t]),Cd=e=>W(W(U(`type`,e),([e,t])=>W(Kc(t),([t,n])=>W(vl(n),([n,r])=>W(U(`=`,r),([r,i])=>W(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[oc(e),t]),wd=e=>W(W(U(`type`,e),([e,t])=>W(Kc(t),([t,n])=>W(U(`=`,n),([n,r])=>W(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[sc(e),t]),Td=e=>W(W(W(U(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[cc(e),t]),Ed=e=>W(W(W(U(`;`,e),([e,t])=>W(U(`
8
- `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>W(W(U(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W(W(U(`
9
- `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[lc(e),t]),Dd=(e,t=[])=>W(W(kd(e),([e,t])=>W(Ed(t),([t,n])=>[[e,t],n])),([e,n])=>Dd(n,[...t,e]),()=>[t,e]),Od=e=>W(W(Dd(e),([e,t])=>W(W(W(kd(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>W([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[uc(e),t]),kd=e=>W(W(Td(e),([e,t])=>W(W(xd(t),([e,t])=>[e,t],()=>W(Sd(t),([e,t])=>[e,t],()=>W(Cd(t),([e,t])=>[e,t],()=>W(wd(t),([e,t])=>[e,t],()=>[])))),([t,n])=>W(Cl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[dc(e),t]),Ad=e=>W(W(kd(e),([e,t])=>W(Od(t),([t,n])=>[[e,t],n])),([e,t])=>[fc(e),t]),jd=e=>W(W(Ad(e),([e,t])=>[e,t],()=>W(su(e),([e,t])=>[e,t],()=>W(lu(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[pc(e),t]);function Md(e){let t=Hl(`\`${e}\``);return V(t.length,2)?t[0]:br()}function Nd(e,t={}){return _n(`TemplateLiteral`,[e],t)}function Pd(e){return ey({},Nd(e,{}))}function Fd(e){return Pd(Md(e))}function Id(e,t={}){return on(z(e)?Fd(e):Pd(e),{},t)}function Ld(e){return sn(e,`TemplateLiteral`)}var Rd=s({ExtendsFalse:()=>Ud,ExtendsTrue:()=>Vd,ExtendsUnion:()=>zd,IsExtendsFalse:()=>Wd,IsExtendsTrue:()=>Hd,IsExtendsTrueLike:()=>Gd,IsExtendsUnion:()=>Bd});function zd(e){return rn({"~kind":`ExtendsUnion`},{inferred:e})}function Bd(e){return xe(e)&&H(e,`~kind`)&&H(e,`inferred`)&&V(e[`~kind`],`ExtendsUnion`)&&xe(e.inferred)}function Vd(e){return rn({"~kind":`ExtendsTrue`},{inferred:e})}function Hd(e){return xe(e)&&H(e,`~kind`)&&H(e,`inferred`)&&V(e[`~kind`],`ExtendsTrue`)&&xe(e.inferred)}function Ud(){return rn({"~kind":`ExtendsFalse`},{})}function Wd(e){return xe(e)&&H(e,`~kind`)&&V(e[`~kind`],`ExtendsFalse`)}function Gd(e){return Bd(e)||Hd(e)}function Kd(e){return z(e)||ye(e)?Di(e):ve(e)?Pi():Xn()}function qd(e){return e.map(e=>Kd(e))}function Jd(e){return ea(qd(e))}function Yd(e){return Jd(e.enum)}function Xd(e,t,n,r){let i=Wp(e,n,r);return Gd(i)?Vd(P(P(e,i.inferred),{[t]:n})):Ud()}function Zd(e,t){return Vd(e)}function Qd(e,t,n){return Wp(e,t,Jd(n))}function $d(e,t,n){let[r,...i]=n;return cn(r)?(()=>{let n=Wp(e,t,r);return Gd(n)?$d(n.inferred,t,i):Ud()})():Vd(e)}function ef(e,t,n){return Wp(e,t,ya(n))}function tf(e,t,n){let[r,...i]=n;return cn(r)?(()=>{let n=Wp(e,t,r);return Gd(n)?Vd(n.inferred):tf(e,t,i)})():Ud()}function nf(e,t,n){return fr(n)?Zd(e,t):gr(n)?Qd(e,t,n.enum):ur(n)?Xd(e,n.name,t,n.extends):vr(n)?$d(e,t,n.allOf):Ld(n)?ef(e,t,n.pattern):ta(n)?tf(e,t,n.anyOf):cr(n)?Vd(e):Ud()}function rf(e,t,n){return ur(n)?nf(e,t,n):fr(n)||cr(n)?Vd(e):zd(e)}function af(e,t){let n=xn(e),r=xn(t);return n&&r||!n&&r?!0:!(n&&!r)}function of(e,t,n,r){return jn(r)?af(t,r)?Wp(e,n,r.items):Ud():nf(e,t,r)}function sf(e,t,n){return Pn(n)?Wp(e,t,n.iteratorItems):nf(e,Nn(t),n)}function cf(e,t,n){return mi(n)?Vd(e):nf(e,t,n)}function lf(e,t,n){return gi(n)?Vd(e):nf(e,t,n)}function uf(e,t,n,r,i){let a=ur(r)?t:r,o=ur(r)?r:t,s=Tn(t),c=Tn(r),l=Wp(e,a,o);return!s&&c?Ud():Gd(l)?pf(l.inferred,n,i):Ud()}function df(e,t,n,r){let[i,...a]=r;return cn(i)?uf(e,t,n,i,a):Tn(t)?Vd(e):Ud()}function ff(e,t,n){let[r,...i]=t;return cn(r)?df(e,r,i,n):Vd(e)}function pf(e,t,n){return ff(e,t,n)}function mf(e,t,n){return Wa(n)?Vd(e):Wp(e,t,n)}function hf(e,t,n,r){return Bn(r)?(()=>{let i=pf(e,t,r.parameters);return Gd(i)?mf(i.inferred,n,r.instanceType):Ud()})():Ud()}function gf(e,t,n){return Wp(e,Yd(t),n)}function _f(e,t,n,r){return Un(r)?(()=>{let i=pf(e,t,r.parameters);return Gd(i)?mf(i.inferred,n,r.returnType):Ud()})():Ud()}function vf(e,t,n){return xi(n)||Ri(n)?Vd(e):nf(e,t,n)}var yf=`equal`,bf=`disjoint`,xf=`left-inside`,Sf=`right-inside`;function Cf(e,t){let n=[cr(e)?Ud():vm({},e,t),cr(e)?Vd({}):vm({},t,e)];return Gd(n[0])&&Gd(n[1])?yf:Gd(n[0])&&Wd(n[1])?xf:Wd(n[0])&&Gd(n[1])?Sf:bf}function wf(e){return ta(e)?Tf(e.anyOf):[e]}function Tf(e){return e.reduce((e,t)=>[...e,...wf(t)],[])}function Ef(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Df(e){return Wi(Ef(e.items))}function Of(e,t){return kn(e)?!!kn(t):!1}function kf(e,t){return Tn(e)?!!Tn(t):!1}function Af(e,t){let n=Of(e,t),r=kf(e,t),i=En(Sn(Hf([e,t])));return n&&r?Dn(Cn(i)):n&&!r?Dn(i):!n&&r?Cn(i):i}function jf(e,t,n){return n in e?n in t?Af(e[n],t[n]):e[n]:n in t?t[n]:Xn()}function Mf(e,t){return[...new Set([...Le(t),...Le(e)])].reduce((n,r)=>({...n,[r]:jf(e,t,r)}),{})}function Nf(e){return Gi(e)?e.properties:La(e)?Ef(e.items):br()}function Pf(e,t){return Wi(Mf(Nf(e),Nf(t)))}function Ff(e,t){let n=Cf(e,t);return V(n,`left-inside`)?e:V(n,`right-inside`)||V(n,`equal`)?t:Xn()}function If(e){return Gi(e)||La(e)}function Lf(e,t){let n=ta(e),r=ta(t);return n||r}function Rf(e,t){let n=Wf(e),r=Wf(t),i=Lf(n,r),a=If(n),o=If(r);return i?Hf([n,r]):a&&o?Pf(n,r):a&&!o?n:!a&&o?r:Ff(n,r)}function zf(e,t,n=[]){let[r,...i]=t;return B(r)?n.length===0?[e]:n:zf(e,i,[...n,Rf(e,r)])}function Bf(e,t,n=[]){let[r,...i]=e;return cn(r)?Bf(i,t,[...n,...Vf([r],t)]):n}function Vf(e,t=[]){let[n,...r]=e;return cn(n)?ta(n)?Vf(r,Bf(n.anyOf,t)):Vf(r,zf(n,t)):t}function Hf(e){return Xf(Vf(e))}function Uf(e){return Xf(e)}function Wf(e){return vr(e)?Hf(e.allOf):ta(e)?Uf(e.anyOf):e}function Gf(e){return V(e.length,1)?e[0]:V(e.length,0)?Xn():ea(e)}function Kf(e,t){return t.filter(t=>Cf(e,t)!==`right-inside`)}function qf(e,t){return V(t.some(t=>{let n=Cf(e,t);return V(n,`left-inside`)||V(n,`equal`)}),!1)}function Jf(e,t){let n=Wf(e);return fr(n)?[n]:qf(n,t)?[...Kf(n,t),n]:t}function Yf(e,t=[]){let[n,...r]=e;return cn(n)?Gi(n)?Yf(r,[...t,n]):Yf(r,Jf(n,t)):t}function Xf(e){let t=Tf(Yf(e));return t.length===0?Xn():t.length===1?t[0]:ea(t)}function Zf(e,t,n,r){return on(Wf($v(e,t,n)),{},r)}function Qf(e,t,n,r){return Zf(e,t,n,r)}function $f(e,t,n){return Wp(e,Hf(t),n)}function ep(e,t,n){return Ci(n)?Wp(e,t,n.iteratorItems):nf(e,Si(t),n)}function tp(e,t,n){return t===n?Vd(e):Ud()}function np(e,t,n){return Ni(n)?tp(e,t,n.const):mi(n)?Vd(e):nf(e,Di(t),n)}function rp(e,t,n){return Ni(n)?tp(e,t,n.const):gi(n)?Vd(e):nf(e,Di(t),n)}function ip(e,t,n){return Ni(n)?tp(e,t,n.const):Ri(n)?Vd(e):nf(e,Di(t),n)}function ap(e,t,n){return Ni(n)?tp(e,t,n.const):$i(n)?Vd(e):nf(e,Di(t),n)}function op(e,t,n){return fe(t.const)?np(e,t.const,n):pe(t.const)?rp(e,t.const,n):ye(t.const)?ip(e,t.const,n):z(t.const)?ap(e,t.const,n):br()}function sp(e,t,n){return ur(n)?nf(e,t,n):Vd(e)}function cp(e,t,n){return Fi(n)?Vd(e):nf(e,t,n)}function lp(e,t,n){return Ri(n)?Vd(e):nf(e,t,n)}function up(e,t,n){return Tn(t)?Tn(n)?Vd(e):Ud():Vd(e)}function dp(e,t,n){return ur(n)&&Zn(n.extends)?Ud():(()=>{let r=Wp(e,t,n);return Gd(r)?up(r.inferred,t,n):Ud()})()}function fp(e,t){return e.reduce((e,n)=>n in t&&Gd(t[n])?{...e,...t[n].inferred}:br(),{})}function pp(e,t,n){let r={};for(let i of Le(n))r[i]=i in t?dp({},t[i],n[i]):Tn(n[i])?ur(n[i])?Vd(P(e,{[n[i].name]:n[i].extends})):Vd(e):Ud();let i=ze(r).every(e=>Gd(e)),a=i?fp(Le(r),r):{};return i?Vd(a):Ud()}function mp(e,t,n){let r=pp(e,t,n);return Gd(r)?Vd(P(e,r.inferred)):Ud()}function hp(e,t,n){return mp(e,t,n)}function gp(e,t,n){return Gi(n)?hp(e,t,n.properties):nf(e,Wi(t),n)}function _p(e,t,n){return Xi(n)?Wp(e,t,n.item):nf(e,Yi(t),n)}function vp(e,t,n){return $i(n)?Vd(e):nf(e,t,n)}function yp(e,t,n){return Bi(n)?Vd(e):nf(e,t,n)}function bp(e,t,n){return Wp(e,ya(t),n)}function xp(e,t){return rn({"~kind":`Inferrable`},{name:e,type:t},{})}function Sp(e){return xe(e)&&H(e,`~kind`)&&H(e,`name`)&&H(e,`type`)&&V(e[`~kind`],`Inferrable`)&&z(e.name)&&xe(e.type)}function Cp(e){return Na(e)?ur(e.items)?jn(e.items.extends)?xp(e.items.name,e.items.extends.items):cr(e.items.extends)?xp(e.items.name,e.items.extends):void 0:br():void 0}function wp(e){return ur(e)?xp(e.name,e.extends):void 0}function Tp(e,t,n=[]){let[r,...i]=e;return cn(r)?Gd(Wp({},r,t))?Tp(i,t,[...n,r]):void 0:n}function Ep(e,t,n,r){let i=Tp(n,r);return R(i)?Vd(P(e,{[t]:Ia(i)})):Ud()}function Dp(e,t,n,r){let i=Tp(n,r);return R(i)?Vd(P(e,{[t]:ea(i)})):Ud()}function Op(e){return[...e].reverse()}function kp(e,t){return t?Op(e):e}function Ap(e){let t=e.length>0?e[0]:void 0;return cn(cn(t)?Cp(t):void 0)}function jp(e,t,n,r,i,a){let o=Wp(e,n,i);return Gd(o)?Pp(o.inferred,t,r,a):Ud()}function Mp(e,t,n,r,i){let a=Cp(r);return Sp(a)?Ep(e,a.name,kp(n,t),a.type):(()=>{let[a,...o]=n;return cn(a)?jp(e,t,a,o,r,i):Ud()})()}function Np(e,t,n,r){let[i,...a]=r;return cn(i)?Mp(e,t,n,i,a):V(n.length,0)?Vd(e):Ud()}function Pp(e,t,n,r){return Np(e,t,n,r)}function Fp(e,t,n){let r=Xv(e,{callstack:[]},n),i=Ap(r);return Pp(e,i,kp(t,i),kp(r,i))}function Ip(e,t,n){let r=wp(n);return Sp(r)?Dp(e,r.name,t,r.type):(()=>{let[r,...i]=t;return cn(r)?(()=>{let t=Wp(e,r,n);return Gd(t)?Ip(t.inferred,i,n):Ud()})():Vd(e)})()}function Lp(e,t,n){let r=Xv(e,{callstack:[]},t);return La(n)?Fp(e,r,n.items):jn(n)?Ip(e,r,n.items):nf(e,Ia(r),n)}function Rp(e,t,n){return Wa(n)||Ba(n)?Vd(e):nf(e,t,n)}function zp(e,t,n){let[r,...i]=n;return cn(r)?(()=>{let n=Wp(e,t,r);return Gd(n)?Vd(n.inferred):zp(e,t,i)})():Ud()}function Bp(e,t,n){let[r,...i]=t;return cn(r)?(()=>{let t=zp(e,r,n);return Gd(t)?Bp(t.inferred,i,n):Ud()})():Vd(e)}function Vp(e,t,n){let r=wp(n);return Sp(r)?Dp(e,r.name,t,r.type):ta(n)?Bp(e,t,n.anyOf):Bp(e,t,[n])}function Hp(e,t,n){return ur(n)?nf(e,t,n):fr(n)||cr(n)?Vd(e):Ud()}function Up(e,t,n){return Wa(n)?Vd(e):nf(e,t,n)}function Wp(e,t,n){return fr(t)?rf(e,t,n):jn(t)?of(e,t,t.items,n):Pn(t)?sf(e,t.iteratorItems,n):mi(t)?cf(e,t,n):gi(t)?lf(e,t,n):Bn(t)?hf(e,t.parameters,t.instanceType,n):gr(t)?gf(e,t,n):Un(t)?_f(e,t.parameters,t.returnType,n):xi(t)?vf(e,t,n):vr(t)?$f(e,t.allOf,n):Ci(t)?ep(e,t.iteratorItems,n):Ni(t)?op(e,t,n):Zn(t)?sp(e,t,n):Fi(t)?cp(e,t,n):Ri(t)?lp(e,t,n):Gi(t)?gp(e,t.properties,n):Xi(t)?_p(e,t.item,n):$i(t)?vp(e,t,n):Bi(t)?yp(e,t,n):Ld(t)?bp(e,t.pattern,n):La(t)?Lp(e,t.items,n):Ba(t)?Rp(e,t,n):ta(t)?Vp(e,t.anyOf,n):cr(t)?Hp(e,t,n):Wa(t)?Up(e,t,n):Ud()}function Gp(e,t,n={}){return _n(`Interface`,[e,t],n)}function Kp(e){return cn(e)&&H(e,`action`)&&V(e.action,`Interface`)}function qp(e,t,n={}){return ey({},Gp(e,t,n))}function Jp(e,t,n){return e.includes(n)?!0:Zp([...e,n],t,t[n])}function Yp(e,t,n){return Xp(e,t,Ui(n))}function Xp(e,t,n){let[r,...i]=n;return cn(r)?Zp(e,t,r)?!0:Xp(e,t,i):!1}function Zp(e,t,n){return Kn(n)?Jp(e,t,n.$ref):jn(n)?Zp(e,t,n.items):Pn(n)?Zp(e,t,n.iteratorItems):Bn(n)?Xp(e,t,[...n.parameters,n.instanceType]):Un(n)?Xp(e,t,[...n.parameters,n.returnType]):Kp(n)?Yp(e,t,n.parameters[1]):vr(n)?Xp(e,t,n.allOf):Ci(n)?Zp(e,t,n.iteratorItems):Gi(n)?Yp(e,t,n.properties):Xi(n)?Zp(e,t,n.item):ta(n)?Xp(e,t,n.anyOf):La(n)?Xp(e,t,n.items):ja(n)?Zp(e,t,Aa(n)):!1}function Qp(e,t,n){return Zp(e,t,n)}function $p(e,t){return t.reduce((t,n)=>n in e?Qp([n],e,e[n])?[...t,n]:t:br(),[])}function em(e){return $p(e,Hi(e))}function tm(e,t,n){return n.includes(t)?n:t in e?im(e,e[t],[...n,t]):br()}function nm(e,t,n){return rm(e,Ui(t),n)}function rm(e,t,n){return t.reduce((t,n)=>im(e,n,t),n)}function im(e,t,n){return Kn(t)?tm(e,t.$ref,n):jn(t)?im(e,t.items,n):Pn(t)?im(e,t.iteratorItems,n):Bn(t)?rm(e,[...t.parameters,t.instanceType],n):Un(t)?rm(e,[...t.parameters,t.returnType],n):Kp(t)?nm(e,t.parameters[1],n):vr(t)?rm(e,t.allOf,n):Ci(t)?im(e,t.iteratorItems,n):Gi(t)?nm(e,t.properties,n):Xi(t)?im(e,t.item,n):ta(t)?rm(e,t.anyOf,n):La(t)?rm(e,t.items,n):ja(t)?im(e,Aa(t),n):n}function am(e,t,n){return im(e,n,[t])}function om(e){return dr()}function sm(e){return Le(e).reduce((t,n)=>({...t,[n]:lm(e[n])}),{})}function cm(e){return e.reduce((e,t)=>[...e,lm(t)],[])}function lm(e){return Kn(e)?om(e.$ref):jn(e)?An(lm(e.items),Mn(e)):Pn(e)?Nn(lm(e.iteratorItems)):Bn(e)?zn(cm(e.parameters),lm(e.instanceType)):Un(e)?Hn(cm(e.parameters),lm(e.returnType)):vr(e)?_r(cm(e.allOf)):Ci(e)?Si(lm(e.iteratorItems)):Gi(e)?Wi(sm(e.properties)):Xi(e)?Yi(lm(e.item)):ja(e)?Ea(ka(e),lm(Aa(e))):ta(e)?ea(cm(e.anyOf)):La(e)?Ia(cm(e.items)):e}function um(e,t){return t in e?lm(e[t]):sr()}function dm(e){return um(e.$defs,e.$ref)}function fm(e,t,n){let r=Zv(e,{callstack:[]},t),i=Yv({},{callstack:[]},n);return Hf([...r,Wi(i)])}function pm(e,t){return Le(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=Kp(r)?fm(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function mm(e,t,n){return ir(pm(e,am(e,t,n)),t)}function hm(e,t){return t in e?Kn(e[t])?hm(e,e[t].$ref):e[t]:Xn()}function gm(e,t){return hm(e,t)}function _m(e){return ar(e)?dm(e):e}function vm(e,t,n){return Wp(e,_m(t),_m(n))}function ym(e,t,n){if(ur(t)||jm(t)||Gd(vm({},t,n)))return;let r={parameter:e,extends:n,received:t};throw Error(`Generic argument does not satify constraint`,{cause:r})}function bm(e,t,n,r,i){let a=$v(e,t,i);return ym(n,a,r),P(e,{[n]:a})}function xm(e,t,n,r,i){let a=$v(e,t,n.extends),o=$v(e,t,n.equals),[s,...c]=i;return cn(s)?Sm(bm(e,t,n.name,a,s),t,r,c):Sm(bm(e,t,n.name,a,o),t,r,[])}function Sm(e,t,n,r){let[i,...a]=n;return cn(i)?xm(e,t,i,a,r):e}function Cm(e,t,n,r){return Sm(e,t,n,r)}function wm(e){return Ce(e.length,0)?e[0]:``}function Tm(e,t,n,r){return km(n,Zv(e,t,r))}function Em(e,t,n,r){return Tm(e,t,Gn(n),r)}function Dm(e,t,n,r,i,a){return $v(e,t,$v(Cm(e,t,r,Zv(e,t,a)),{callstack:[...t.callstack,n]},i))}function Om(e,t,n,r){let[i,a]=rr(e,n,r);return Jn(a)?V(wm(t.callstack),i)?Em(e,t,i,r):Dm(e,t,i,a.parameters,a.expression,r):Tm(e,t,n,r)}function km(e,t){return rn({"~kind":`Call`},{target:e,arguments:t},{})}function Am(e,t){return Om({},{callstack:[]},e,t)}function jm(e){return sn(e,`Call`)}function Mm(e){return Xi(e)?Mm(e.item):e}function Nm(e,t,n,r){return on(Mm($v(e,t,n)),{},r)}function Pm(e,t,n,r){return Gv(e,[n])?Nm(e,t,n,r):ty(n,r)}function Fm(e,t){return e(t)}function Im(e,t){return z(t)?Di(Fm(e,t)):Di(t)}function Lm(e,t){return zm(e,ya(t))}function Rm(e,t){return ea(t.map(t=>zm(e,t)))}function zm(e,t){return Ni(t)?Im(e,t.const):Ld(t)?Lm(e,t.pattern):ta(t)?Rm(e,t.anyOf):t}function Bm(e,t={}){return _n(`Capitalize`,[e],t)}function Vm(e,t={}){return ey({},Bm(e,t))}function Hm(e,t={}){return _n(`Lowercase`,[e],t)}function Um(e,t={}){return ey({},Hm(e,t))}function Wm(e,t={}){return _n(`Uncapitalize`,[e],t)}function Gm(e,t={}){return ey({},Wm(e,t))}function Km(e,t={}){return _n(`Uppercase`,[e],t)}function qm(e,t={}){return ey({},Km(e,t))}var Jm=e=>e[0].toUpperCase()+e.slice(1),Ym=e=>e.toLowerCase(),Xm=e=>e[0].toLowerCase()+e.slice(1),Zm=e=>e.toUpperCase();function Qm(e,t,n,r){return on(zm(Jm,$v(e,t,n)),{},r)}function $m(e,t,n,r){return Gv(e,[n])?Qm(e,t,n,r):Bm(n,r)}function eh(e,t,n,r){return on(zm(Ym,$v(e,t,n)),{},r)}function th(e,t,n,r){return Gv(e,[n])?eh(e,t,n,r):Hm(n,r)}function nh(e,t,n,r){return on(zm(Xm,$v(e,t,n)),{},r)}function rh(e,t,n,r){return Gv(e,[n])?nh(e,t,n,r):Wm(n,r)}function ih(e,t,n,r){return on(zm(Zm,$v(e,t,n)),{},r)}function ah(e,t,n,r){return Gv(e,[n])?ih(e,t,n,r):Km(n,r)}function oh(e,t,n,r,i={}){return _n(`Conditional`,[e,t,n,r],i)}function sh(e,t,n,r,i={}){return ey({},oh(e,t,n,r,i))}function ch(e,t,n,r,i,a,o){let s=vm(e,$v(e,t,n),$v(e,t,r));return on(Bd(s)?ea([$v(s.inferred,t,i),$v(e,t,a)]):Hd(s)?$v(s.inferred,t,i):$v(e,t,a),{},o)}function lh(e,t,n,r,i,a,o){return Gv(e,[n,r])?ch(e,t,n,r,i,a,o):oh(n,r,i,a,o)}function uh(e,t={}){return _n(`ConstructorParameters`,[e],t)}function dh(e,t={}){return ey({},uh(e,t))}function fh(e){return Bn(e)?$v({},{callstack:[]},Ia(e.parameters)):Xn()}function ph(e,t,n,r){return on(fh($v(e,t,n)),{},r)}function mh(e,t,n,r){return Gv(e,[n])?ph(e,t,n,r):uh(n,r)}function hh(e,t,n={}){return _n(`Exclude`,[e,t],n)}function gh(e,t,n={}){return ey({},hh(e,t,n))}function _h(e,t){return e.reduce((e,n)=>[...e,...vh(n,t)],[])}function vh(e,t){return Gd(vm({},e,t))?[]:[e]}function yh(e,t){return Uf(gr(e)?_h(qd(e.enum),t):ta(e)?_h(Tf(e.anyOf),t):vh(e,t))}function bh(e,t,n,r,i){return on(yh($v(e,t,n),$v(e,t,r)),{},i)}function xh(e,t,n,r,i){return Gv(e,[n,r])?bh(e,t,n,r,i):hh(n,r,i)}function Sh(e,t,n={}){return _n(`Extract`,[e,t],n)}function Ch(e,t,n={}){return ey({},Sh(e,t,n))}function wh(e,t){return e.reduce((e,n)=>[...e,...Th(n,t)],[])}function Th(e,t){return Gd(vm({},e,t))?[e]:[]}function Eh(e,t){return Uf(gr(e)?wh(qd(e.enum),t):ta(e)?wh(Tf(e.anyOf),t):Th(e,t))}function Dh(e,t,n,r,i){return on(Eh($v(e,t,n),$v(e,t,r)),{},i)}function Oh(e,t,n,r,i){return Gv(e,[n,r])?Dh(e,t,n,r,i):Sh(n,r,i)}var kh=RegExp(`^(?:0|[1-9][0-9]*)$`);function Ah(e){let t=`${e}`;return kh.test(t)?parseInt(t):e}function jh(e){return Di(Ah(e))}function Mh(e){return e.map(e=>Nh(e))}function Nh(e){return vr(e)?_r(Mh(e.allOf)):ta(e)?ea(Mh(e.anyOf)):Ni(e)?jh(e.const):e}function Ph(e,t){return Gd(vm({},Nh(t),Li()))?e:Xn()}function Fh(e,t){return Vh(gm(e,t))}function Ih(e){return e.reduce((e,t)=>[...e,...Vh(t)],[])}function Lh(e){return Ih(qd(e))}function Rh(e){return Vh(Hf(e))}function zh(e){return[`${e}`]}function Bh(e){return Vh(ya(e))}function Vh(e){return ar(e)?Fh(e.$defs,e.$ref):gr(e)?Lh(e.enum):vr(e)?Rh(e.allOf):Ni(e)?zh(e.const):Ld(e)?Bh(e.pattern):ta(e)?Ih(e.anyOf):[]}function Hh(e){return Vh(e)}function Uh(e,t){return t in e?[e[t]]:[]}function Wh(e,t){return t.reduce((t,n)=>[...t,...Uh(e,n)],[])}function Gh(e,t){return Uf(Wh(e,Hh(t)))}function Kh(e){return Di(Ah(e))}function qh(e){return e.map(e=>Jh(e))}function Jh(e){return vr(e)?_r(qh(e.allOf)):ta(e)?ea(qh(e.anyOf)):Ni(e)?Kh(e.const):e}function Yh(e,t){return e.reduceRight((e,n,r)=>Gd(vm({},Di(r),t))?[n,...e]:e,[])}function Xh(e,t){return Gf(Yh(e,Jh(t)))}function Zh(e){return Gf(e)}function Qh(e,t){return Ri(t)||xi(t)?Zh(e):Xh(e,t)}function $h(e){return e.reduce((e,t)=>Oi(t)?[...e,Di(t)]:e,[])}function eg(e){return ea($h(e))}function tg(e,t,n={}){return _n(`Index`,[e,t],n)}function ng(e,t,n={}){return ey({},tg(e,R(t)?eg(t):t,n))}function rg(e,t){return dg(gm(e,t))}function ig(e,t){let n=Le(e).filter(e=>!H(t,e)),r=Le(t).filter(t=>!H(e,t)),i=Le(e).filter(e=>H(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:Hf([e[r],t[r]])}),{});return P(P(a,o),s)}function ag(e){return e.reduce((e,t)=>ig(e,dg(t)),{})}function og(e){return e}function sg(e){return dg(Df(Ia(e)))}function cg(e,t){return Le(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:Uf([e[r],t[r]])}),{})}function lg(e,t){let[n,...r]=e;return cn(n)?lg(r,cg(t,dg(n))):t}function ug(e){let[t,...n]=e;return cn(t)?lg(n,dg(t)):br()}function dg(e){return ar(e)?rg(e.$defs,e.$ref):vr(e)?ag(e.allOf):ta(e)?ug(e.anyOf):La(e)?sg(e.items):Gi(e)?og(e.properties):{}}function fg(e){return Wi(dg(e))}function pg(e){return ar(e)||vr(e)||ta(e)?fg(e):e}function mg(e,t){let n=pg(e);return jn(n)?Ph(n.items,t):Gi(n)?Gh(n.properties,t):La(n)?Qh(n.items,t):Xn()}function hg(e,t,n,r,i){return on(mg($v(e,t,n),$v(e,t,r)),{},i)}function gg(e,t,n,r,i){return Gv(e,[n,r])?hg(e,t,n,r,i):tg(n,r,i)}function _g(e,t={}){return _n(`InstanceType`,[e],t)}function vg(e,t={}){return ey({},_g(e,t))}function yg(e){return Bn(e)?e.instanceType:Xn()}function bg(e,t,n,r){return on(yg($v(e,t,n)),{},r)}function xg(e,t,n,r={}){return Gv(e,[n])?bg(e,t,n,r):_g(n,r)}function Sg(e,t,n,r,i){let a=Zv(e,{callstack:[]},n),o=Yv(e,{callstack:[]},r);return on(Hf([...a,Wi(o)]),{},i)}function Cg(e,t,n,r,i){return Gv(e,n)?Sg(e,t,n,r,i):Gp(n,r,i)}function wg(e,t={}){return _n(`KeyOf`,[e],t)}function Tg(e,t={}){return ey({},wg(e,t))}function Eg(){return ea([Li(),Qi(),zi()])}function Dg(e){return Li()}function Og(e){return e.reduce((e,t)=>Oi(t)?[...e,Di(Ah(t))]:br(),[])}function kg(e){return Gf(Og(Le(e)))}function Ag(e){return ka(e)}function jg(e){return Gf(e.map((e,t)=>Di(t)))}function Mg(e){return ar(e)||vr(e)||ta(e)?fg(e):e}function Ng(e){let t=Mg(e);return fr(t)?Eg():jn(t)?Dg(t.items):Gi(t)?kg(t.properties):ja(t)?Ag(t):La(t)?jg(t.items):Xn()}function Pg(e,t,n,r){return on(Ng($v(e,t,n)),{},r)}function Fg(e,t,n,r){return Gv(e,[n])?Pg(e,t,n,r):wg(n,r)}function Ig(e){return Rg(ya(e))}function Lg(e){return e.reduce((e,t)=>[...e,...Rg(t)],[])}function Rg(e){return gr(e)?Lg(qd(e.enum)):Mi(e)||ji(e)?[e]:Ld(e)?Ig(e.pattern):ta(e)?Lg(e.anyOf):[]}function zg(e){return Rg(e)}function Bg(e,t,n,r,i={}){return _n(`Mapped`,[e,t,n,r],i)}function Vg(e,t,n,r,i={}){return ey({},Bg(e,t,n,r,i))}function Hg(e,t,n,r,i){let a=$v(P(e,{[n.name]:r}),t,i);return Ld(a)?ya(a.pattern):a}function Ug(e,t,n,r,i){return $v(P(e,{[n.name]:r}),t,i)}function Wg(e,t,n,r,i,a){let o=Ug(e,t,n,r,a),s=Hg(e,t,n,r,i);return Mi(s)||ji(s)?{[s.const]:o}:{}}function Gg(e,t,n,r,i,a){return r.reduce((r,o)=>({...r,...Wg(e,t,n,o,i,a)}),{})}function Kg(e,t,n,r,i,a){return Wi(Gg(e,t,n,zg(r),i,a))}function qg(e,t,n,r,i,a,o){return on(Kg(e,t,n,$v(e,t,r),i,a),{},o)}function Jg(e,t,n,r,i,a,o){return Gv(e,[r])?qg(e,t,n,r,i,a,o):Bg(n,r,i,a,o)}function Yg(e,t){return Le(e).filter(e=>t.includes(e)).reduce((t,n)=>({...t,[n]:mm(e,n,e[n])}),{})}function Xg(e,t){return Le(e).filter(e=>!t.includes(e)).reduce((t,n)=>({...t,[n]:$v(e,{callstack:[]},e[n])}),{})}function Zg(e,t){let n=em(e),r=Yg(e,n),i=Xg(e,n);return on({...r,...i},{},t)}function Qg(e,t,n,r){return Zg(P(e,n),r)}function $g(e,t={}){return _n(`NonNullable`,[e],t)}function e_(e,t={}){return ey({},$g(e,t))}function t_(e){return xh({},{callstack:[]},e,ea([Pi(),za()]),{})}function n_(e,t,n,r){return on(t_($v(e,t,n)),{},r)}function r_(e,t,n,r){return Gv(e,[n])?n_(e,t,n,r):$g(n,r)}function i_(e){let t=fg(e);return Gi(t)?t.properties:br()}function a_(e,t,n={}){return _n(`Omit`,[e,t],n)}function o_(e,t,n={}){return ey({},a_(e,R(t)?eg(t):t,n))}function s_(e,t){return Le(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function c_(e,t){return Wi(s_(i_(e),Hh(t)))}function l_(e,t,n,r,i){return on(c_($v(e,t,n),$v(e,t,r)),{},i)}function u_(e,t,n,r,i){return Gv(e,[n,r])?l_(e,t,n,r,i):a_(n,r,i)}function d_(e,t){return _n(`Options`,[e,t],{})}function f_(e,t){return ey({},d_(e,t))}function p_(e,t,n,r){return on($v(e,t,n),{},r)}function m_(e,t,n,r){return Gv(e,[n])?p_(e,t,n,r):d_(n,r)}function h_(e,t={}){return _n(`Parameters`,[e],t)}function g_(e,t={}){return ey({},h_(e,t))}function __(e){return Un(e)?$v({},{callstack:[]},Ia(e.parameters)):Xn()}function v_(e,t,n,r){return on(__($v(e,t,n)),{},r)}function y_(e,t,n,r){return Gv(e,[n])?v_(e,t,n,r):h_(n,r)}function b_(e,t={}){return _n(`Partial`,[e],t)}function x_(e,t={}){return ey({},b_(e,t))}function S_(e,t){let n=E_(gm(e,t));return ir(P(e,{[t]:n}),t)}function C_(e){return Hf(e.map(e=>E_(e)))}function w_(e){return ea(e.map(e=>E_(e)))}function T_(e){return Wi(Le(e).reduce((t,n)=>({...t,[n]:wn(e[n])}),{}))}function E_(e){return ar(e)?S_(e.$defs,e.$ref):vr(e)?C_(e.allOf):ta(e)?w_(e.anyOf):Gi(e)?T_(e.properties):Wi({})}function D_(e,t,n,r){return on(E_($v(e,t,n)),{},r)}function O_(e,t,n,r){return Gv(e,[n])?D_(e,t,n,r):b_(n,r)}function k_(e,t,n={}){return _n(`Pick`,[e,t],n)}function A_(e,t,n={}){return ey({},k_(e,R(t)?eg(t):t,n))}function j_(e,t){return Le(e).reduce((n,r)=>t.includes(r)?P(n,{[r]:e[r]}):n,{})}function M_(e,t){return Wi(j_(i_(e),Hh(t)))}function N_(e,t,n,r,i){return on(M_($v(e,t,n),$v(e,t,r)),{},i)}function P_(e,t,n,r,i){return Gv(e,[n,r])?N_(e,t,n,r,i):k_(n,r,i)}function F_(e,t={}){return _n(`ReadonlyType`,[e],t)}function I_(e,t={}){return ey({},F_(e,t))}function L_(e){return bn(An(e))}function R_(e,t){let n=U_(gm(e,t));return ir(P(e,{[t]:n}),t)}function z_(e){return Hf(e.map(e=>U_(e)))}function B_(e){return Wi(Le(e).reduce((t,n)=>({...t,[n]:On(e[n])}),{}))}function V_(e){return bn(Ia(e))}function H_(e){return ea(e.map(e=>U_(e)))}function U_(e){return jn(e)?L_(e.items):ar(e)?R_(e.$defs,e.$ref):vr(e)?z_(e.allOf):Gi(e)?B_(e.properties):La(e)?V_(e.items):ta(e)?H_(e.anyOf):e}function W_(e,t,n,r){return on(U_($v(e,t,n)),{},r)}function G_(e,t,n,r){return Gv(e,[n])?W_(e,t,n,r):F_(n,r)}function K_(e){return ba(Ca,e)}function q_(e){return Wi({true:e,false:e})}function J_(e,t){return ov(Jd(e),t)}function Y_(e,t){return ba(xa,t)}function X_(e,t){return ov(Hf(e),t)}function Z_(e,t){return z(e)||ye(e)?Wi({[e]:t}):V(e,!1)?Wi({false:t}):V(e,!0)?Wi({true:t}):Wi({})}function Q_(e,t){return ba(Sa,t)}function $_(e,t){return H(e,`pattern`)&&(z(e.pattern)||e.pattern instanceof RegExp)?ba(e.pattern.toString(),t):ba(Ca,t)}function ev(e,t){return ca(ra(e))?ov(ya(e),t):ba(e,t)}function tv(e){return e.some(e=>$i(e)||Ri(e)||xi(e))}function nv(e,t){return V(tv(e),!0)?ba(Ca,t):void 0}function rv(e,t){return e.reduce((e,n)=>Ni(n)&&(z(n.const)||ye(n.const))?{...e,[n.const]:t}:e,{})}function iv(e,t){return Wi(rv(e,t))}function av(e,t){let n=Tf(e),r=nv(n,t);return cn(r)?r:iv(n,t)}function ov(e,t){return fr(e)?K_(t):gi(e)?q_(t):gr(e)?J_(e.enum,t):xi(e)?Y_(e,t):vr(e)?X_(e.allOf,t):Ni(e)?Z_(e.const,t):Ri(e)?Q_(e,t):ta(e)?av(e.anyOf,t):$i(e)?$_(e,t):Ld(e)?ev(e.pattern,t):Wi({})}function sv(e,t,n,r,i){return on(ov($v(e,t,n),$v(e,t,r)),{},i)}function cv(e,t,n,r,i){return Gv(e,[n])?sv(e,t,n,r,i):wa(n,r,i)}function lv(e,t,n,r){return r in e?Qp([r],e,e[r])?n:$v(e,t,e[r]):n}function uv(e,t){let n=mv(gm(e,t));return ir(P(e,{[t]:n}),t)}function dv(e){return Hf(e.map(e=>mv(e)))}function fv(e){return ea(e.map(e=>mv(e)))}function pv(e){return Wi(Le(e).reduce((t,n)=>({...t,[n]:Sn(e[n])}),{}))}function mv(e){return ar(e)?uv(e.$defs,e.$ref):vr(e)?dv(e.allOf):ta(e)?fv(e.anyOf):Gi(e)?pv(e.properties):Wi({})}function hv(e,t={}){return _n(`Required`,[e],t)}function gv(e,t={}){return ey({},hv(e,t))}function _v(e,t,n,r){return on(mv($v(e,t,n)),{},r)}function vv(e,t,n,r){return Gv(e,[n])?_v(e,t,n,r):hv(n,r)}function yv(e,t={}){return _n(`ReturnType`,[e],t)}function bv(e,t={}){return ey({},yv(e,t))}function xv(e){return Un(e)?e.returnType:Xn()}function Sv(e,t,n,r){return on(xv($v(e,t,n)),{},r)}function Cv(e,t,n,r){return Gv(e,[n])?Sv(e,t,n,r):yv(n,r)}function wv(e){return e.join(`|`)}function Tv(e){return e.slice(1,e.length-1)}function Ev(e,t,n){return Iv(t,`${n}${e}`)}function Dv(e,t){return Iv(e,`${t}${fi}`)}function Ov(e,t){return Iv(e,`${t}${yi}`)}function kv(e,t){return Iv(e,`${t}${Ii}`)}function Av(e,t){return Fv(ea([Di(`false`),Di(`true`)]),e,t)}function jv(e,t){return Iv(e,`${t}.*`)}function Mv(e,t,n){return Iv(t,`${n}${Tv(e)}`)}function Nv(e,t,n,r=[]){return Pv(qd(e),t,n)}function Pv(e,t,n,r=[]){let[i,...a]=e;return cn(i)?Pv(a,t,n,[...r,Fv(i,[],``)]):Iv(t,`${n}(${wv(r)})`)}function Fv(e,t,n){return gr(e)?Nv(e.enum,t,n):xi(e)?Ov(t,n):Ni(e)?Ev(e.const,t,n):mi(e)?Dv(t,n):gi(e)?Av(t,n):Ri(e)?kv(t,n):$i(e)?jv(t,n):Ld(e)?Mv(e.pattern,t,n):ta(e)?Pv(e.anyOf,t,n):Yn}function Iv(e,t){let[n,...r]=e;return cn(n)?Fv(n,r,t):t}function Lv(e){return`^${Iv(e,``)}$`}function Rv(e){return la(Lv(e))}function zv(e,t,n,r){return on(Rv(Zv(e,t,n)),{},r)}function Bv(e,t,n,r){return Gv(e,n)?zv(e,t,n,r):Nd(n,r)}function Vv(e){return Na(e)?La(e.items)?Hv(e.items.items):ur(e.items)||Kn(e.items)?[e]:[Xn()]:[e]}function Hv(e){return e.reduce((e,t)=>[...e,...Vv(t)],[])}function Uv(e,t){return t in e}function Wv(e,t){return vr(t)?Gv(e,t.allOf):ta(t)?Gv(e,t.anyOf):Kn(t)?Uv(e,t.$ref):!0}function Gv(e,t){let[n,...r]=t;return cn(n)?Wv(e,n)?Gv(e,r):!1:!0}function Kv(e,t,n){return gn(e)?Kv(e.type,`remove`,n):fn(e)?Kv(e.type,t,`remove`):mn(e)?Kv(e.type,`add`,n):un(e)?Kv(e.type,t,`add`):[e,t,n]}function qv(e,t){return V(e,`remove`)?En(t):V(e,`add`)?Dn(t):t}function Jv(e,t){return V(e,`remove`)?Sn(t):V(e,`add`)?Cn(t):t}function Yv(e,t,n){return Le(n).reduce((r,i)=>({...r,[i]:$v(e,t,n[i])}),{})}function Xv(e,t,n){return Hv(Zv(e,t,n))}function Zv(e,t,n){return n.map(n=>$v(e,t,n))}function Qv(e,t,n,r,i){return V(n,`Awaited`)?Pm(e,t,r[0],i):V(n,`Capitalize`)?$m(e,t,r[0],i):V(n,`Conditional`)?lh(e,t,r[0],r[1],r[2],r[3],i):V(n,`ConstructorParameters`)?mh(e,t,r[0],i):V(n,`Evaluate`)?Qf(e,t,r[0],i):V(n,`Exclude`)?xh(e,t,r[0],r[1],i):V(n,`Extract`)?Oh(e,t,r[0],r[1],i):V(n,`Index`)?gg(e,t,r[0],r[1],i):V(n,`InstanceType`)?xg(e,t,r[0],i):V(n,`Interface`)?Cg(e,t,r[0],r[1],i):V(n,`KeyOf`)?Fg(e,t,r[0],i):V(n,`Lowercase`)?th(e,t,r[0],i):V(n,`Mapped`)?Jg(e,t,r[0],r[1],r[2],r[3],i):V(n,`Module`)?Qg(e,t,r[0],i):V(n,`NonNullable`)?r_(e,t,r[0],i):V(n,`Pick`)?P_(e,t,r[0],r[1],i):V(n,`Options`)?m_(e,t,r[0],r[1]):V(n,`Parameters`)?y_(e,t,r[0],i):V(n,`Partial`)?O_(e,t,r[0],i):V(n,`Omit`)?u_(e,t,r[0],r[1],i):V(n,`ReadonlyType`)?G_(e,t,r[0],i):V(n,`Record`)?cv(e,t,r[0],r[1],i):V(n,`Required`)?vv(e,t,r[0],i):V(n,`ReturnType`)?Cv(e,t,r[0],i):V(n,`TemplateLiteral`)?Bv(e,t,r[0],i):V(n,`Uncapitalize`)?rh(e,t,r[0],i):V(n,`Uppercase`)?ah(e,t,r[0],i):_n(n,r,i)}function $v(e,t,n){let r=xn(n),i=Kv(n,kn(n)?`add`:`none`,Tn(n)?`add`:`none`),a=Rn(i[0])?i[0].Clone():i[0],o=Kn(a)?lv(e,t,a,a.$ref):jn(a)?An($v(e,t,a.items),Mn(a)):Pn(a)?Nn($v(e,t,a.iteratorItems),Fn(a)):jm(a)?Om(e,t,a.target,a.arguments):Bn(a)?zn(Zv(e,t,a.parameters),$v(e,t,a.instanceType),Vn(a)):vn(a)?Qv(e,t,a.action,a.parameters,a.options):Un(a)?Hn(Zv(e,t,a.parameters),$v(e,t,a.returnType),Wn(a)):vr(a)?_r(Zv(e,t,a.allOf),yr(a)):Ci(a)?Si($v(e,t,a.iteratorItems),wi(a)):Gi(a)?Wi(Yv(e,t,a.properties),Ki(a)):Xi(a)?Yi($v(e,t,a.item),Zi(a)):ja(a)?Da(Oa(a),$v(e,t,Aa(a))):Na(a)?Ma($v(e,t,a.items)):La(a)?Ia(Xv(e,t,a.items),Ra(a)):ta(a)?ea(Zv(e,t,a.anyOf),na(a)):a,s=r?bn(o):o;return qv(i[1],Jv(i[2],s))}function ey(e,t){return $v(e,{callstack:[]},t)}function ty(e,t={}){return _n(`Awaited`,[e],t)}function ny(e,t={}){return ey({},ty(e,t))}function ry(e,t={}){return _n(`Evaluate`,[e],t)}function iy(e,t={}){return ey({},ry(e,t))}function ay(e,t={}){return _n(`Module`,[e],t)}function oy(e,t={}){return ey({},ay(e,t))}function sy(...e){let[t,n,r]=or(e,{2:(e,t)=>z(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=jd(n);return on(R(i)&&V(i.length,2)?$v(t,{callstack:[]},i[0]):Xn(),{},r)}var cy=s({Any:()=>dr,Array:()=>An,AsyncIterator:()=>Nn,Awaited:()=>ny,Base:()=>Ln,BigInt:()=>pi,Boolean:()=>hi,Call:()=>Am,Capitalize:()=>Vm,Codec:()=>ai,Conditional:()=>sh,Constructor:()=>zn,ConstructorParameters:()=>dh,Cyclic:()=>ir,Decode:()=>oi,DecodeBuilder:()=>ii,Encode:()=>si,EncodeBuilder:()=>ri,Enum:()=>hr,Evaluate:()=>iy,Exclude:()=>gh,Extends:()=>vm,ExtendsResult:()=>Rd,Extract:()=>Ch,Function:()=>Hn,Generic:()=>qn,Identifier:()=>_i,Immutable:()=>bn,Index:()=>ng,Infer:()=>lr,InstanceType:()=>vg,Instantiate:()=>ey,Integer:()=>bi,Interface:()=>qp,Intersect:()=>_r,IsAny:()=>fr,IsArray:()=>jn,IsAsyncIterator:()=>Pn,IsBase:()=>Rn,IsBigInt:()=>mi,IsBoolean:()=>gi,IsCall:()=>jm,IsCodec:()=>ci,IsConstructor:()=>Bn,IsCyclic:()=>ar,IsEnum:()=>gr,IsFunction:()=>Un,IsGeneric:()=>Jn,IsIdentifier:()=>vi,IsImmutable:()=>xn,IsInfer:()=>ur,IsInteger:()=>xi,IsIntersect:()=>vr,IsIterator:()=>Ci,IsKind:()=>sn,IsLiteral:()=>Ni,IsNever:()=>Zn,IsNull:()=>Fi,IsNumber:()=>Ri,IsObject:()=>Gi,IsOptional:()=>Tn,IsParameter:()=>Ji,IsPromise:()=>Xi,IsReadonly:()=>kn,IsRecord:()=>ja,IsRef:()=>Kn,IsRefine:()=>di,IsRest:()=>Na,IsSchema:()=>cn,IsString:()=>$i,IsSymbol:()=>Bi,IsTemplateLiteral:()=>Ld,IsThis:()=>Fa,IsTuple:()=>La,IsUndefined:()=>Ba,IsUnion:()=>ta,IsUnknown:()=>cr,IsUnsafe:()=>Ha,IsVoid:()=>Wa,Iterator:()=>Si,KeyOf:()=>Tg,Literal:()=>Di,Lowercase:()=>Um,Mapped:()=>Vg,Module:()=>oy,Never:()=>Xn,NonNullable:()=>e_,Null:()=>Pi,Number:()=>Li,Object:()=>Wi,Omit:()=>o_,Optional:()=>wn,Options:()=>f_,Parameter:()=>qi,Parameters:()=>g_,Partial:()=>x_,Pick:()=>A_,Promise:()=>Yi,Readonly:()=>On,ReadonlyType:()=>I_,Record:()=>Ea,RecordKey:()=>ka,RecordKeyAsPattern:()=>Oa,RecordValue:()=>Aa,Ref:()=>Gn,Refine:()=>ui,Required:()=>gv,Rest:()=>Ma,ReturnType:()=>bv,Script:()=>sy,String:()=>Qi,Symbol:()=>zi,TemplateLiteral:()=>Id,This:()=>Pa,Tuple:()=>Ia,Uncapitalize:()=>Gm,Undefined:()=>za,Union:()=>ea,Unknown:()=>sr,Unsafe:()=>Va,Uppercase:()=>qm,Void:()=>Ua}),ly=[0,31,28,31,30,31,30,31,31,30,31,30,31],uy=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function dy(e){return e%4==0&&(e%100!=0||e%400==0)}function fy(e){let t=uy.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&dy(n)?29:ly[r])}var py=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function my(e,t=!0){let n=py.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4]===`-`?-1:1,s=+(n[5]||0),c=+(n[6]||0);if(s>23||c>59||t&&!n[4]&&e.toLowerCase().indexOf(`z`)===-1)return!1;if(r<=23&&i<=59&&a<60)return!0;let l=i-c*o,u=r-s*o-(l<0?1:0);return(u===23||u===-1)&&(l===59||l===-1)&&a<61}function hy(e,t=!0){let n=e.split(/T/i);return n.length===2&&fy(n[0])&&my(n[1],t)}var gy=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function _y(e){return gy.test(e)}var vy=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function yy(e){return vy.test(e)}var by=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;function xy(e){return by.test(e)}var Sy=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function Cy(e){return Sy.test(e)}function wy(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12352&&t<=12447||t>=12448&&t<=12543&&t!==12539||t>=19968&&t<=40959}function Ty(e){if(e.length===0||e.includes(` `))return!1;let t=e.normalize(`NFC`).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`);if(t.length>253)return!1;let n=t.split(`.`);if(n.some(e=>e.length===0))return!1;for(let e of n){if(e.length>63||e.startsWith(`-`)||e.endsWith(`-`))return!1;if(/^xn--/i.test(e)){let t=e.slice(4);if(t.length<2||t.includes(`---`))return!1;continue}if(/[\u302E\u302F\u3031\u3032\u3033\u3034\u3035\u303B\u0640\u07FA]/.test(e))return!1;let t=e.charAt(0);if(/[\u0903\u0300\u0488]/.test(t))return!1;for(let t=0;t<e.length;t++){let n=e.charAt(t);if(n===`·`){if(t===0||t===e.length-1)return!1;let n=e.charAt(t-1),r=e.charAt(t+1);if(!/^[lL]$/.test(n)||!/^[lL]$/.test(r))return!1}if(n===`・`){if(e.length===1)return!1;if(t===0){if(!wy(e.charAt(t+1)))return!1}else{let n=e.charAt(t-1),r=e.charAt(t+1);if(!wy(n)||!wy(r))return!1}}if(n===`͵`){if(t===e.length-1)return!1;let n=e.charAt(t+1);if(!/[\u0370-\u03FF]/.test(n))return!1}if(n===`׳`||n===`״`){if(t===0)return!1;let n=e.charAt(t-1);if(!/[\u05D0-\u05EA]/.test(n))return!1}if(n===`‍`&&(t===0||e.charAt(t-1)!==`्`))return!1}let n=!1,r=!1;for(let t=0;t<e.length;t++){let i=e.charAt(t);/[\u0660-\u0669]/.test(i)&&(n=!0),/[\u06F0-\u06F9]/.test(i)&&(r=!0)}if(n&&r)return!1}return!0}var Ey=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Dy(e){return Ey.test(e)}var Oy=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function ky(e){return Oy.test(e)}function Ay(e){try{return new URL(e,`http://example.com`),!0}catch{return!1}}function jy(e){if(e.includes(` `)||e.includes(`\\`)||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e===``)return!0;let t=e.indexOf(`:`);return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?Ay(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:Ay(e)}function My(e){try{return new URL(e),!0}catch{return!1}}var Ny=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Py(e){return Ny.test(e)}var Fy=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function Iy(e){return Fy.test(e)}function Ly(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var Ry=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function zy(e){return Ry.test(e)}var By=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function Vy(e){return By.test(e)}var Hy=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function Uy(e){return Hy.test(e)}var Wy=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i;function Gy(e){return Wy.test(e)}var Ky=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function qy(e){return Ky.test(e)}var Jy=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Yy(e){return Jy.test(e)}var Xy=new Map;function Zy(){Xy.clear()}function Qy(){return[...Xy.entries()]}function $y(e,t){Xy.set(e,t)}function eb(e){return Xy.has(e)}function tb(e){return Xy.get(e)}function nb(e,t){return Xy.get(e)?.(t)??!0}function rb(){Zy(),Xy.set(`date-time`,hy),Xy.set(`date`,fy),Xy.set(`duration`,_y),Xy.set(`email`,yy),Xy.set(`hostname`,xy),Xy.set(`idn-email`,Cy),Xy.set(`idn-hostname`,Ty),Xy.set(`ipv4`,Dy),Xy.set(`ipv6`,ky),Xy.set(`iri-reference`,jy),Xy.set(`iri`,My),Xy.set(`json-pointer-uri-fragment`,Py),Xy.set(`json-pointer`,Iy),Xy.set(`regex`,Ly),Xy.set(`relative-json-pointer`,zy),Xy.set(`time`,my),Xy.set(`uri-reference`,Vy),Xy.set(`uri-template`,Uy),Xy.set(`uri`,Gy),Xy.set(`url`,qy),Xy.set(`uuid`,Yy)}rb();var ib=s({Clear:()=>Zy,Entries:()=>Qy,Get:()=>tb,Has:()=>eb,IsDate:()=>fy,IsDateTime:()=>hy,IsDuration:()=>_y,IsEmail:()=>yy,IsHostname:()=>xy,IsIPv4:()=>Dy,IsIPv6:()=>ky,IsIdnEmail:()=>Cy,IsIdnHostname:()=>Ty,IsIri:()=>My,IsIriReference:()=>jy,IsJsonPointer:()=>Iy,IsJsonPointerUriFragment:()=>Py,IsRegex:()=>Ly,IsRelativeJsonPointer:()=>zy,IsTime:()=>my,IsUri:()=>Gy,IsUriReference:()=>Vy,IsUriTemplate:()=>Uy,IsUrl:()=>qy,IsUuid:()=>Yy,Reset:()=>rb,Set:()=>$y,Test:()=>nb}),ab=ib;function ob(e){return xe(e)&&H(e,`check`)&&H(e,`errors`)&&he(e.check)&&he(e.errors)}function sb(e){return H(e,`~guard`)&&ob(e[`~guard`])}function cb(e){return H(e,`~refine`)&&R(e[`~refine`])&&Ne(e[`~refine`],0,e=>xe(e)&&H(e,`refine`)&&H(e,`message`)&&he(e.refine)&&z(e.message))}function lb(e){return xe(e)&&!R(e)}function ub(e){return pe(e)}function db(e){return lb(e)||ub(e)}function fb(e){return H(e,`additionalItems`)&&db(e.additionalItems)}function pb(e){return H(e,`additionalProperties`)&&db(e.additionalProperties)}function mb(e){return H(e,`allOf`)&&R(e.allOf)&&e.allOf.every(e=>db(e))}function hb(e){return H(e,`$anchor`)&&z(e.$anchor)}function gb(e){return H(e,`anyOf`)&&R(e.anyOf)&&e.anyOf.every(e=>db(e))}function _b(e){return H(e,`const`)}function vb(e){return H(e,`contains`)&&db(e.contains)}function yb(e){return H(e,`default`)}function bb(e){return H(e,`dependencies`)&&xe(e.dependencies)&&Object.values(e.dependencies).every(e=>db(e)||R(e)&&e.every(e=>z(e)))}function xb(e){return H(e,`dependentRequired`)&&xe(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>R(e)&&e.every(e=>z(e)))}function Sb(e){return H(e,`dependentSchemas`)&&xe(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>db(e))}function Cb(e){return H(e,`$dynamicAnchor`)&&z(e.$dynamicAnchor)}function wb(e){return H(e,`else`)&&db(e.else)}function Tb(e){return H(e,`enum`)&&R(e.enum)}function Eb(e){return H(e,`exclusiveMaximum`)&&(ye(e.exclusiveMaximum)||fe(e.exclusiveMaximum))}function Db(e){return H(e,`exclusiveMinimum`)&&(ye(e.exclusiveMinimum)||fe(e.exclusiveMinimum))}function Ob(e){return H(e,`format`)&&z(e.format)}function kb(e){return H(e,`$id`)&&z(e.$id)}function Ab(e){return H(e,`if`)&&db(e.if)}function jb(e){return H(e,`items`)&&(db(e.items)||R(e.items)&&e.items.every(e=>db(e)))}function Mb(e){return jb(e)&&R(e.items)}function Nb(e){return H(e,`maximum`)&&(ye(e.maximum)||fe(e.maximum))}function Pb(e){return H(e,`maxContains`)&&ye(e.maxContains)}function Fb(e){return H(e,`maxItems`)&&ye(e.maxItems)}function Ib(e){return H(e,`maxLength`)&&ye(e.maxLength)}function Lb(e){return H(e,`maxProperties`)&&ye(e.maxProperties)}function Rb(e){return H(e,`minimum`)&&(ye(e.minimum)||fe(e.minimum))}function zb(e){return H(e,`minContains`)&&ye(e.minContains)}function Bb(e){return H(e,`minItems`)&&ye(e.minItems)}function Vb(e){return H(e,`minLength`)&&ye(e.minLength)}function Hb(e){return H(e,`minProperties`)&&ye(e.minProperties)}function Ub(e){return H(e,`multipleOf`)&&(ye(e.multipleOf)||fe(e.multipleOf))}function Wb(e){return H(e,`not`)&&db(e.not)}function Gb(e){return H(e,`oneOf`)&&R(e.oneOf)&&e.oneOf.every(e=>db(e))}function Kb(e){return H(e,`pattern`)&&(z(e.pattern)||e.pattern instanceof RegExp)}function qb(e){return H(e,`patternProperties`)&&xe(e.patternProperties)&&Object.values(e.patternProperties).every(e=>db(e))}function Jb(e){return H(e,`prefixItems`)&&R(e.prefixItems)&&e.prefixItems.every(e=>db(e))}function Yb(e){return H(e,`properties`)&&xe(e.properties)&&Object.values(e.properties).every(e=>db(e))}function Xb(e){return H(e,`propertyNames`)&&(xe(e.propertyNames)||db(e.propertyNames))}function Zb(e){return H(e,`$recursiveAnchor`)&&pe(e.$recursiveAnchor)}function Qb(e){return Zb(e)&&V(e.$recursiveAnchor,!0)}function $b(e){return H(e,`$recursiveRef`)&&z(e.$recursiveRef)}function ex(e){return H(e,`$ref`)&&z(e.$ref)}function tx(e){return H(e,`required`)&&R(e.required)&&e.required.every(e=>z(e))}function nx(e){return H(e,`then`)&&db(e.then)}function rx(e){return H(e,`type`)&&(z(e.type)||R(e.type)&&e.type.every(e=>z(e)))}function ix(e){return H(e,`uniqueItems`)&&pe(e.uniqueItems)}function ax(e){return H(e,`unevaluatedItems`)&&db(e.unevaluatedItems)}function ox(e){return H(e,`unevaluatedProperties`)&&db(e.unevaluatedProperties)}function sx(e){return ax(e)||ox(e)||Le(e).some(t=>lx(e[t]))}function cx(e){return e.some(e=>lx(e))}function lx(e){return R(e)?cx(e):xe(e)?sx(e):!1}function ux(e,t){return lx(t)||Le(e).some(t=>lx(e[t]))}var dx=class{constructor(e){this.hasUnevaluated=e}UseUnevaluated(){return this.hasUnevaluated}AddIndex(e){return Ct(Tt(`context`,`AddIndex`),[e])}AddKey(e){return Ct(Tt(`context`,`AddKey`),[e])}Merge(e){return Ct(Tt(`context`,`Merge`),[e])}},fx=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(e){return this.indices.add(e),!0}AddKey(e){return this.keys.add(e),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(e){for(let t of e)t.indices.forEach(e=>this.indices.add(e)),t.keys.forEach(e=>this.keys.add(e));return!0}},px=class extends fx{constructor(e){super(),this.callback=e}AddError(e){return this.callback(e),!1}},mx=class extends px{constructor(){super(e=>this.errors.push(e)),this.errors=[]}AddError(e){return this.errors.push(e),!1}GetErrors(){return this.errors}},hx=`external_`,gx=0,_x={identifier:`${hx}${gx}`,variables:[]};function vx(){_x.identifier=`${hx}${gx}`,_x.variables=[],gx+=1}function yx(e){let t=`${_x.identifier}[${_x.variables.length}]`;return _x.variables.push(e),t}function bx(){return _x}function xx(e,t,n,r){return Ct(Tt(Tt(yx(n),`~guard`),`check`),[r])}function Sx(e,t,n,r){return n[`~guard`].check(r)}function Cx(e,t,n,r,i,a){return i[`~guard`].check(a)||t.AddError({keyword:`~guard`,schemaPath:n,instancePath:r,params:{errors:i[`~guard`].errors(a)}})}function wx(e,t,n,r){return gt(yx(n[`~refine`].map(e=>e)),Et(0),[`refinement`,`_`],Ct(Tt(`refinement`,`refine`),[r]))}function Tx(e,t,n,r){return Ne(n[`~refine`],0,(e,t)=>e.refine(r))}function Ex(e,t,n,r,i,a){return Pe(i[`~refine`],0,(e,i)=>e.refine(a)||t.AddError({keyword:`~refine`,schemaPath:n,instancePath:r,params:{index:i,message:e.message}}))}var Dx=0;function Ox(){return`var_${Dx++}`}function kx(e){return jb(e)&&R(e.items)}function Ax(e,t,n,r){if(!kx(n))return Et(!0);let[i,a]=[Ox(),Ox()],o=Nw(e,t,n.additionalItems,i),s=dt(a,Et(n.items.length)),c=t.AddIndex(a),l=t.UseUnevaluated()?Ke(s,Ge(o,c)):Ke(s,o);return Ct(Tt(r,`every`),[St([i,a],l)])}function jx(e,t,n,r){return kx(n)?r.every((r,i)=>we(i,n.items.length)||Pw(e,t,n.additionalItems,r)&&t.AddIndex(i)):!0}function Mx(e,t,n,r,i,a){return kx(i)?a.every((a,o)=>{let s=`${n}/additionalItems`,c=`${r}/${o}`;return we(o,i.items.length)||Fw(e,t,s,c,i.additionalItems,a)&&t.AddIndex(o)}):!0}function Nx(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function Px(e){let t=[];return qb(e)&&t.push(...Le(e.patternProperties)),Yb(e)&&t.push(...Le(e.properties).map(Nx)),V(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function Fx(e,t,n){return tx(t)&&Yb(t)&&!qb(t)&&V(t.additionalProperties,!1)&&V(Le(t.properties).length,t.required.length)}function Ix(e,t,n){return lt(Tt(Ct(Tt(`Object`,`getOwnPropertyNames`),[n]),`length`),Et(t.required.length))}function Lx(e,t,n,r){let[i,a]=[Ox(),Ox()],o=yx(new RegExp(Px(n))),s=Nw(e,t,n.additionalProperties,`${r}[${i}]`),c=Ct(Tt(o,`test`),[i]),l=t.AddKey(i),u=t.UseUnevaluated()?Ke(c,Ge(s,l)):Ke(c,s);return gt(vt(r),Et(0),[i,a],u)}function Rx(e,t,n,r){return Fx(t,n,r)?Ix(t,n,r):Lx(e,t,n,r)}function zx(e,t,n,r){let i=new RegExp(Px(n));return Ne(Le(r),0,(a,o)=>i.test(a)||Pw(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function Bx(e,t,n,r,i,a){let o=new RegExp(Px(i)),s=[];return Pe(Le(a),0,(c,l)=>{let u=`${n}/additionalProperties`,d=`${r}/${c}`,f=new mx,p=o.test(c)||Fw(e,f,u,d,i.additionalProperties,a[c])&&t.AddKey(c);return p||s.push(c),p})||t.AddError({keyword:`additionalProperties`,schemaPath:n,instancePath:r,params:{additionalProperties:s}})}function Vx(e,t,n,r,i){let a=kt(`results`,`[]`),o=n.map((e,t)=>kt(`context_${t}`,wt(`CheckContext`,[]))),s=n.map((n,i)=>kt(`condition_${i}`,Ct(St([`context`],Nw(e,t,n,r)),[`context_${i}`]))),c=n.map((e,t)=>At(`condition_${t}`,Ct(Tt(`results`,`push`),[`context_${t}`]))),l=jt(Ge(i,t.Merge(`results`)));return Ct(St([],Ot([a,...o,...s,...c,l])),[])}function Hx(e,t,n,r){return Vx(e,t,n.allOf,r,lt(Tt(`results`,`length`),Et(n.allOf.length)))}function Ux(e,t,n,r){return Mt(n.allOf.map(n=>Nw(e,t,n,r)))}function Wx(e,t,n,r){return t.UseUnevaluated()?Hx(e,t,n,r):Ux(e,t,n,r)}function Gx(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new fx;return Pw(e,i,n,r)?[...t,i]:t},[]);return V(i.length,n.allOf.length)&&t.Merge(i)}function Kx(e,t,n,r,i,a){let o=[],s=i.allOf.reduce((t,i,s)=>{let c=`${n}/allOf/${s}`,l=new mx,u=Fw(e,l,c,r,i,a);return u||o.push(l),u?[...t,l]:t},[]),c=V(s.length,i.allOf.length)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c}function qx(e,t,n,r){return Vx(e,t,n.anyOf,r,ut(Tt(`results`,`length`),Et(0)))}function Jx(e,t,n,r){return Nt(n.anyOf.map(n=>Nw(e,t,n,r)))}function Yx(e,t,n,r){return t.UseUnevaluated()?qx(e,t,n,r):Jx(e,t,n,r)}function Xx(e,t,n,r){let i=n.anyOf.reduce((t,n,i)=>{let a=new fx;return Pw(e,a,n,r)?[...t,a]:t},[]);return Ce(i.length,0)&&t.Merge(i)}function Zx(e,t,n,r,i,a){let o=[],s=i.anyOf.reduce((t,i,s)=>{let c=new mx,l=Fw(e,c,`${n}/anyOf/${s}`,r,i,a);return l||o.push(c),l?[...t,c]:t},[]),c=Ce(s.length,0)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c||t.AddError({keyword:`anyOf`,schemaPath:n,instancePath:r,params:{}})}function Qx(e,t,n,r){return Et(!!n)}function $x(e,t,n,r){return n}function eS(e,t,n,r,i,a){return $x(e,t,i,a)||t.AddError({keyword:`boolean`,schemaPath:n,instancePath:r,params:{}})}function tS(e,t,n,r){return ke(n.const)?lt(r,Et(n.const)):bt(r,yx(n.const))}function nS(e,t,n,r){return ke(n.const)?V(r,n.const):He(r,n.const)}function rS(e,t,n,r,i,a){return nS(e,t,i,a)||t.AddError({keyword:`const`,schemaPath:n,instancePath:r,params:{allowedValue:i.const}})}function iS(e){return!(zb(e)&&V(e.minContains,0))}function aS(e,t,n,r){if(!iS(n))return Et(!0);let i=Ox();return Ge(qe(lt(Tt(r,`length`),Et(0))),Ct(Tt(r,`some`),[St([i],Nw(e,t,n.contains,i))]))}function oS(e,t,n,r){return iS(n)?!V(r.length,0)&&r.some(r=>Pw(e,t,n.contains,r)):!0}function sS(e,t,n,r,i,a){return oS(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:1}})}function cS(e,t,n,r){return Ke(lt(Tt(vt(r),`length`),Et(0)),Mt(Ie(n.dependencies).map(([n,i])=>{let a=qe(yt(r,Et(n))),o=Nw(e,t,i,r);return Ke(a,R(i)?(e=>Mt(e.map(e=>yt(r,Et(e)))))(i):o)})))}function lS(e,t,n,r){let i=V(Le(r).length,0),a=Ne(Ie(n.dependencies),0,([n,i])=>!H(r,n)||(R(i)?i.every(e=>H(r,e)):Pw(e,t,i,r)));return i||a}function uS(e,t,n,r,i,a){let o=V(Le(a).length,0),s=Pe(Ie(i.dependencies),0,([i,o])=>{let s=`${n}/dependencies/${i}`;return!H(a,i)||(R(o)?o.every(e=>H(a,e)||t.AddError({keyword:`dependencies`,schemaPath:n,instancePath:r,params:{property:i,dependencies:o}})):Fw(e,t,s,r,o,a))});return o||s}function dS(e,t,n,r){return Ke(lt(Tt(vt(r),`length`),Et(0)),Mt(Ie(n.dependentRequired).map(([e,t])=>Ke(qe(yt(r,Et(e))),Mt(t.map(e=>yt(r,Et(e))))))))}function fS(e,t,n,r){let i=V(Le(r).length,0),a=Ne(Ie(n.dependentRequired),0,([e,t])=>!H(r,e)||t.every(e=>H(r,e)));return i||a}function pS(e,t,n,r,i,a){let o=V(Le(a).length,0),s=Pe(Ie(i.dependentRequired),0,([e,i])=>!H(a,e)||Pe(i,0,o=>H(a,o)||t.AddError({keyword:`dependentRequired`,schemaPath:n,instancePath:r,params:{property:e,dependencies:i}})));return o||s}function mS(e,t,n,r){return Ke(lt(Tt(vt(r),`length`),Et(0)),Mt(Ie(n.dependentSchemas).map(([n,i])=>Ke(qe(yt(r,Et(n))),Nw(e,t,i,r)))))}function hS(e,t,n,r){let i=V(Le(r).length,0),a=Ne(Ie(n.dependentSchemas),0,([n,i])=>!H(r,n)||Pw(e,t,i,r));return i||a}function gS(e,t,n,r,i,a){let o=V(Le(a).length,0),s=Pe(Ie(i.dependentSchemas),0,([i,o])=>{let s=`${n}/dependentSchemas/${i}`;return!H(a,i)||Fw(e,t,s,r,o,a)});return o||s}function _S(e,t,n,r){return Nt(n.enum.map(e=>ke(e)?lt(r,Et(e)):bt(r,yx(e))))}function vS(e,t,n,r){return n.enum.some(e=>ke(e)?V(r,e):He(r,e))}function yS(e,t,n,r,i,a){return vS(e,t,i,a)||t.AddError({keyword:`enum`,schemaPath:n,instancePath:r,params:{allowedValues:i.enum}})}function bS(e,t,n,r){return dt(r,Et(n.exclusiveMaximum))}function xS(e,t,n,r){return we(r,n.exclusiveMaximum)}function SS(e,t,n,r,i,a){return xS(e,t,i,a)||t.AddError({keyword:`exclusiveMaximum`,schemaPath:n,instancePath:r,params:{comparison:`<`,limit:i.exclusiveMaximum}})}function CS(e,t,n,r){return ut(r,Et(n.exclusiveMinimum))}function wS(e,t,n,r){return Ce(r,n.exclusiveMinimum)}function TS(e,t,n,r,i,a){return wS(e,t,i,a)||t.AddError({keyword:`exclusiveMinimum`,schemaPath:n,instancePath:r,params:{comparison:`>`,limit:i.exclusiveMinimum}})}function ES(e,t,n,r){return Ct(Tt(`Format`,`Test`),[Et(n.format),r])}function DS(e,t,n,r){return nb(n.format,r)}function OS(e,t,n,r,i,a){return DS(e,t,i,a)||t.AddError({keyword:`format`,schemaPath:n,instancePath:r,params:{format:i.format}})}function kS(e,t,n,r){let i=nx(n)?n.then:!0,a=wb(n)?n.else:!0;return Dt(Nw(e,t,n.if,r),Nw(e,t,i,r),Nw(e,t,a,r))}function AS(e,t,n,r){let i=nx(n)?n.then:!0,a=wb(n)?n.else:!0;return Pw(e,t,n.if,r)?Pw(e,t,i,r):Pw(e,t,a,r)}function jS(e,t,n,r,i,a){let o=nx(i)?i.then:!0,s=wb(i)?i.else:!0,c=new mx,l=Fw(e,c,`${n}/if`,r,i.if,a)?Fw(e,c,`${n}/then`,r,o,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`then`}}):Fw(e,t,`${n}/else`,r,s,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`else`}});return l&&t.Merge([c]),l}function MS(e,t,n,r){return Mt(n.items.map((n,i)=>{let a=ft(Tt(r,`length`),Et(i)),o=Nw(e,t,n,`${r}[${i}]`),s=t.AddIndex(Et(i));return Ke(a,t.UseUnevaluated()?Ge(o,s):o)}))}function NS(e,t,n,r){return Ne(n.items,0,(n,i)=>Te(r.length,i)||Pw(e,t,n,r[i])&&t.AddIndex(i))}function PS(e,t,n,r,i,a){return Pe(i.items,0,(i,o)=>{let s=`${n}/items/${o}`,c=`${r}/${o}`;return Te(a.length,o)||Fw(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function FS(e,t,n,r){let i=Jb(n)?n.prefixItems.length:0,a=Nw(e,t,n.items,`element`),o=t.AddIndex(`index`),s=t.UseUnevaluated()?Ge(a,o):a;return gt(r,Et(i),[`element`,`index`],s)}function IS(e,t,n,r){return Ne(r,Jb(n)?n.prefixItems.length:0,(r,i)=>Pw(e,t,n.items,r)&&t.AddIndex(i))}function LS(e,t,n,r,i,a){return Pe(a,Jb(i)?i.prefixItems.length:0,(a,o)=>Fw(e,t,`${n}/items`,`${r}/${o}`,i.items,a)&&t.AddIndex(o))}function RS(e,t,n,r){return Mb(n)?MS(e,t,n,r):FS(e,t,n,r)}function zS(e,t,n,r){return Mb(n)?NS(e,t,n,r):IS(e,t,n,r)}function BS(e,t,n,r,i,a){return Mb(i)?PS(e,t,n,r,i,a):LS(e,t,n,r,i,a)}function VS(e){return vb(e)}function HS(e,t,n,r){if(!VS(n))return Et(!0);let[i,a]=[Ox(),Ox()];return ft(Ct(Tt(r,`reduce`),[St([i,a],Dt(Nw(e,t,n.contains,a),Pt(i),i)),Et(0)]),Et(n.maxContains))}function US(e,t,n,r){return VS(n)?Te(r.reduce((r,i)=>Pw(e,t,n.contains,i)?++r:r,0),n.maxContains):!0}function WS(e,t,n,r,i,a){let o=zb(i)?i.minContains:1;return US(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:o,maxContains:i.maxContains}})}function GS(e,t,n,r){return ft(r,Et(n.maximum))}function KS(e,t,n,r){return Te(r,n.maximum)}function qS(e,t,n,r,i,a){return KS(e,t,i,a)||t.AddError({keyword:`maximum`,schemaPath:n,instancePath:r,params:{comparison:`<=`,limit:i.maximum}})}function JS(e,t,n,r){return ft(Tt(r,`length`),Et(n.maxItems))}function YS(e,t,n,r){return Te(r.length,n.maxItems)}function XS(e,t,n,r,i,a){return YS(e,t,i,a)||t.AddError({keyword:`maxItems`,schemaPath:n,instancePath:r,params:{limit:i.maxItems}})}function ZS(e,t,n,r){return ht(r,Et(n.maxLength))}function QS(e,t,n,r){return je(r,n.maxLength)}function $S(e,t,n,r,i,a){return QS(e,t,i,a)||t.AddError({keyword:`maxLength`,schemaPath:n,instancePath:r,params:{limit:i.maxLength}})}function eC(e,t,n,r){return ft(Tt(vt(r),`length`),Et(n.maxProperties))}function tC(e,t,n,r){return Te(Le(r).length,n.maxProperties)}function nC(e,t,n,r,i,a){return tC(e,t,i,a)||t.AddError({keyword:`maxProperties`,schemaPath:n,instancePath:r,params:{limit:i.maxProperties}})}function rC(e){return vb(e)}function iC(e,t,n,r){if(!rC(n))return Et(!0);let[i,a]=[Ox(),Ox()];return pt(Ct(Tt(r,`reduce`),[St([i,a],Dt(Nw(e,t,n.contains,a),Pt(i),i)),Et(0)]),Et(n.minContains))}function aC(e,t,n,r){return rC(n)?Ee(r.reduce((r,i)=>Pw(e,t,n.contains,i)?++r:r,0),n.minContains):!0}function oC(e,t,n,r,i,a){return aC(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:i.minContains}})}function sC(e,t,n,r){return pt(r,Et(n.minimum))}function cC(e,t,n,r){return Ee(r,n.minimum)}function lC(e,t,n,r,i,a){return cC(e,t,i,a)||t.AddError({keyword:`minimum`,schemaPath:n,instancePath:r,params:{comparison:`>=`,limit:i.minimum}})}function uC(e,t,n,r){return pt(Tt(r,`length`),Et(n.minItems))}function dC(e,t,n,r){return Ee(r.length,n.minItems)}function fC(e,t,n,r,i,a){return dC(e,t,i,a)||t.AddError({keyword:`minItems`,schemaPath:n,instancePath:r,params:{limit:i.minItems}})}function pC(e,t,n,r){return mt(r,Et(n.minLength))}function mC(e,t,n,r){return Me(r,n.minLength)}function hC(e,t,n,r,i,a){return mC(e,t,i,a)||t.AddError({keyword:`minLength`,schemaPath:n,instancePath:r,params:{limit:i.minLength}})}function gC(e,t,n,r){return pt(Tt(vt(r),`length`),Et(n.minProperties))}function _C(e,t,n,r){return Ee(Le(r).length,n.minProperties)}function vC(e,t,n,r,i,a){return _C(e,t,i,a)||t.AddError({keyword:`minProperties`,schemaPath:n,instancePath:r,params:{limit:i.minProperties}})}function yC(e,t,n,r){return Ft(r,Et(n.multipleOf))}function bC(e,t,n,r){return De(r,n.multipleOf)}function xC(e,t,n,r,i,a){return bC(e,t,i,a)||t.AddError({keyword:`multipleOf`,schemaPath:n,instancePath:r,params:{multipleOf:i.multipleOf}})}function SC(e,t,n,r){return Vx(e,t,[n.not],r,qe(lt(Tt(`results`,`length`),Et(1))))}function CC(e,t,n,r){return qe(Nw(e,t,n.not,r))}function wC(e,t,n,r){return t.UseUnevaluated()?SC(e,t,n,r):CC(e,t,n,r)}function TC(e,t,n,r){let i=new fx;return!Pw(e,i,n.not,r)&&t.Merge([i])}function EC(e,t,n,r,i,a){return TC(e,t,i,a)||t.AddError({keyword:`not`,schemaPath:n,instancePath:r,params:{}})}function DC(e,t,n,r){return Vx(e,t,n.oneOf,r,lt(Tt(`results`,`length`),Et(1)))}function OC(e,t,n,r){return lt(Ct(Tt(xt(n.oneOf.map(n=>Nw(e,t,n,r))),`reduce`),[St([`count`,`result`],Dt(lt(`result`,Et(!0)),Pt(`count`),`count`)),Et(0)]),Et(1))}function kC(e,t,n,r){return t.UseUnevaluated()?DC(e,t,n,r):OC(e,t,n,r)}function AC(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new fx;return Pw(e,i,n,r)?[...t,i]:t},[]);return V(i.length,1)&&t.Merge(i)}function jC(e,t,n,r,i,a){let o=[],s=[],c=i.oneOf.reduce((t,i,c)=>{let l=new mx,u=Fw(e,l,`${n}/oneOf/${c}`,r,i,a);return u&&s.push(c),u||o.push(l),u?[...t,l]:t},[]),l=V(c.length,1)&&t.Merge(c);return!l&&V(s.length,0)&&o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),l||t.AddError({keyword:`oneOf`,schemaPath:n,instancePath:r,params:{passingSchemas:s}})}function MC(e,t,n,r){return Ct(Tt(yx(z(n.pattern)?new RegExp(n.pattern):n.pattern),`test`),[r])}function NC(e,t,n,r){return(z(n.pattern)?new RegExp(n.pattern):n.pattern).test(r)}function PC(e,t,n,r,i,a){return NC(e,t,i,a)||t.AddError({keyword:`pattern`,schemaPath:n,instancePath:r,params:{pattern:i.pattern}})}function FC(e,t,n,r){return Mt(Ie(n.patternProperties).map(([n,i])=>{let[a,o]=[Ox(),Ox()],s=qe(Ct(Tt(yx(new RegExp(n)),`test`),[a])),c=Nw(e,t,i,o),l=t.AddKey(a),u=t.UseUnevaluated()?Ke(s,Ge(c,l)):Ke(s,c);return gt(_t(r),Et(0),[`[${a}, ${o}]`,`_`],u)}))}function IC(e,t,n,r){return Ne(Ie(n.patternProperties),0,([n,i])=>{let a=new RegExp(n);return Ne(Ie(r),0,([n,r])=>!a.test(n)||Pw(e,t,i,r)&&t.AddKey(n))})}function LC(e,t,n,r,i,a){return Pe(Ie(i.patternProperties),0,([i,o])=>{let s=`${n}/patternProperties/${i}`,c=new RegExp(i);return Pe(Ie(a),0,([n,i])=>{let a=`${r}/${n}`;return!c.test(n)||Fw(e,t,s,a,o,i)&&t.AddKey(n)})})}function RC(e,t,n,r){return Mt(n.prefixItems.map((n,i)=>{let a=ft(Tt(r,`length`),Et(i)),o=Nw(e,t,n,`${r}[${i}]`),s=t.AddIndex(Et(i));return Ke(a,t.UseUnevaluated()?Ge(o,s):o)}))}function zC(e,t,n,r){return V(r.length,0)||Ne(n.prefixItems,0,(n,i)=>Te(r.length,i)||Pw(e,t,n,r[i])&&t.AddIndex(i))}function BC(e,t,n,r,i,a){return V(a.length,0)||Pe(i.prefixItems,0,(i,o)=>{let s=`${n}/prefixItems/${o}`,c=`${r}/${o}`;return Te(a.length,o)||Fw(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function VC(e,t){return e.includes(t)||en().exactOptionalPropertyTypes}function HC(e,t){return ot(Tt(e,t))}function UC(e,t){return B(e[t])}function WC(e,t,n,r){let i=tx(n)?n.required:[];return Mt(Ie(n.properties).map(([n,a])=>{let o=qe(yt(r,Et(n))),s=Nw(e,t,a,Tt(r,n)),c=t.AddKey(Et(n)),l=t.UseUnevaluated()?Ge(s,c):s,u=i.includes(n)?l:Ke(o,l);return VC(i,n)?u:Ke(HC(r,n),u)}))}function GC(e,t,n,r){let i=tx(n)?n.required:[];return Ne(Ie(n.properties),0,([n,a])=>{let o=!H(r,n)||Pw(e,t,a,r[n])&&t.AddKey(n);return VC(i,n)?o:UC(r,n)||o})}function KC(e,t,n,r,i,a){let o=tx(i)?i.required:[];return Pe(Ie(i.properties),0,([i,s])=>{let c=`${n}/properties/${i}`,l=`${r}/${i}`,u=()=>!H(a,i)||Fw(e,t,c,l,s,a[i])&&t.AddKey(i);return VC(o,i)?u():UC(a,i)||u()})}function qC(e,t,n,r){let[i,a]=[Ox(),Ox()];return gt(vt(r),Et(0),[i,a],Nw(e,t,n.propertyNames,i))}function JC(e,t,n,r){return Ne(Le(r),0,(r,i)=>Pw(e,t,n.propertyNames,r))}function YC(e,t,n,r,i,a){let o=[];return Pe(Le(a),0,(t,a)=>{let s=`${r}/${t}`,c=`${n}/propertyNames`,l=Fw(e,new mx,c,s,i.propertyNames,t);return l||o.push(t),l})||t.AddError({keyword:`propertyNames`,schemaPath:n,instancePath:r,params:{propertyNames:o}})}function XC(e,t,n,r){return Vw(e,t,e.RecursiveRef(n.$recursiveRef)??!1,r)}function ZC(e,t,n,r){let i=e.RecursiveRef(n.$recursiveRef)??!1;return db(i)&&Pw(e,t,i,r)}function QC(e,t,n,r,i,a){let o=e.RecursiveRef(i.$recursiveRef)??!1;return db(o)&&Fw(e,t,`#`,r,o,a)}function $C(e,t,n,r){let i=St([`context`,`value`],Vw(e,t,n,`value`));return Ct(St([`context`,`value`],Ot([kt(`nextContext`,wt(`CheckContext`,[])),kt(`result`,Ct(i,[`nextContext`,`value`])),At(`result`,t.Merge(`[nextContext]`)),jt(`result`)])),[`context`,r])}function ew(e,t,n,r){return Vw(e,t,n,r)}function tw(e,t,n,r){let i=e.Ref(n.$ref)??!1;return t.UseUnevaluated()?$C(e,t,i,r):ew(e,t,i,r)}function nw(e,t,n,r){let i=e.Ref(n.$ref)??!1,a=new fx,o=db(i)&&Pw(e,a,i,r);return o&&t.Merge([a]),o}function rw(e,t,n,r,i,a){let o=e.Ref(i.$ref)??!1,s=new mx,c=db(o)&&Fw(e,s,`#`,r,o,a);return c&&t.Merge([s]),c||s.GetErrors().forEach(e=>t.AddError(e)),c}function iw(e,t,n,r){return Mt(n.required.map(e=>yt(r,Et(e))))}function aw(e,t,n,r){return Ne(n.required,0,e=>H(r,e))}function ow(e,t,n,r,i,a){let o=[];return Pe(i.required,0,e=>{let t=H(a,e);return t||o.push(e),t})||t.AddError({keyword:`required`,schemaPath:n,instancePath:r,params:{requiredProperties:o}})}function sw(e,t,n,r){return V(n,`object`)?nt(r):V(n,`array`)?Je(r):V(n,`boolean`)?Ze(r):V(n,`integer`)?Qe(r):V(n,`number`)?tt(r):V(n,`null`)?et(r):V(n,`string`)?it(r):V(n,`asyncIterator`)?Ye(r):V(n,`bigint`)?Xe(r):V(n,`constructor`)?ct(r):V(n,`function`)?st(r):V(n,`iterator`)?$e(r):V(n,`symbol`)?at(r):V(n,`undefined`)||V(n,`void`)?ot(r):Et(!0)}function cw(e,t,n,r,i){return V(n,`object`)?be(i):V(n,`array`)?R(i):V(n,`boolean`)?pe(i):V(n,`integer`)?ge(i):V(n,`number`)?ye(i):V(n,`null`)?ve(i):V(n,`string`)?z(i):V(n,`asyncIterator`)?de(i):V(n,`bigint`)?fe(i):V(n,`constructor`)?me(i):V(n,`function`)?he(i):V(n,`iterator`)?_e(i):V(n,`symbol`)?Se(i):V(n,`undefined`)||V(n,`void`)?B(i):!0}function lw(e,t,n,r){return Nt(n.map(n=>sw(e,t,n,r)))}function uw(e,t,n,r,i){return n.some(n=>cw(e,t,n,r,i))}function dw(e,t,n,r){return R(n.type)?lw(e,t,n.type,r):sw(e,t,n.type,r)}function fw(e,t,n,r){return R(n.type)?uw(e,t,n.type,n,r):cw(e,t,n.type,n,r)}function pw(e,t,n,r,i,a){return(R(i.type)?uw(e,t,i.type,i,a):cw(e,t,i.type,i,a))||t.AddError({keyword:`type`,schemaPath:n,instancePath:r,params:{type:i.type}})}function mw(e,t,n,r){let[i,a]=[Ox(),Ox()],o=Ct(Tt(`context`,`GetIndices`),[]),s=Ct(Tt(`indices`,`has`),[i]),c=Nw(e,t,n.unevaluatedItems,a),l=Ct(Tt(`context`,`AddIndex`),[i]),u=gt(r,Et(0),[a,i],Ge(Ke(s,c),l));return Ct(St([`context`],Ot([kt(`indices`,o),jt(u)])),[`context`])}function hw(e,t,n,r){let i=t.GetIndices();return Ne(r,0,(r,a)=>(i.has(a)||Pw(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function gw(e,t,n,r,i,a){let o=t.GetIndices(),s=[];return Pe(a,0,(a,c)=>{let l=new mx,u=(o.has(c)||Fw(e,l,n,r,i.unevaluatedItems,a))&&t.AddIndex(c);return u||s.push(c),u})||t.AddError({keyword:`unevaluatedItems`,schemaPath:n,instancePath:r,params:{unevaluatedItems:s}})}function _w(e,t,n,r){let[i,a]=[Ox(),Ox()],o=Ct(Tt(`context`,`GetKeys`),[]),s=Ct(Tt(`keys`,`has`),[i]),c=Ct(Tt(`context`,`AddKey`),[i]),l=Nw(e,t,n.unevaluatedProperties,a),u=gt(_t(r),Et(0),[`[${i}, ${a}]`,`_`],Ke(s,Ge(l,c)));return Ct(St([`context`],Ot([kt(`keys`,o),jt(u)])),[`context`])}function vw(e,t,n,r){let i=t.GetKeys();return Ne(Ie(r),0,([r,a])=>i.has(r)||Pw(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function yw(e,t,n,r,i,a){let o=t.GetKeys(),s=[];return Pe(Ie(a),0,([a,c])=>{let l=new mx,u=o.has(a)||Fw(e,l,n,r,i.unevaluatedProperties,c)&&t.AddKey(a);return u||s.push(a),u})||t.AddError({keyword:`unevaluatedProperties`,schemaPath:n,instancePath:r,params:{unevaluatedProperties:s}})}function bw(e){return!V(e.uniqueItems,!1)}function xw(e,t,n,r){return bw(n)?lt(Tt(wt(`Set`,[Ct(Tt(r,`map`),[Tt(`Hashing`,`Hash`)])]),`size`),Tt(r,`length`)):Et(!0)}function Sw(e,t,n,r){if(!bw(n))return!0;let i=new Set(r.map($r)).size,a=r.length;return V(i,a)}function Cw(e,t,n,r,i,a){if(!bw(i))return!0;let o=new Set,s=a.reduce((e,t,n)=>{let r=$r(t);return o.has(r)?[...e,n]:(o.add(r),e)},[]);return V(s.length,0)||t.AddError({keyword:`uniqueItems`,schemaPath:n,instancePath:r,params:{duplicateItems:s}})}function ww(e,t){return rx(e)&&(R(e.type)&&e.type.includes(t)||V(e.type,t))}function Tw(e){return ww(e,`object`)}function Ew(e){return lb(e)&&(pb(e)||bb(e)||xb(e)||Sb(e)||Yb(e)||qb(e)||Xb(e)||Hb(e)||Lb(e)||tx(e)||ox(e))}function Dw(e){return ww(e,`array`)}function Ow(e){return lb(e)&&(fb(e)||jb(e)||vb(e)||Pb(e)||Fb(e)||zb(e)||Bb(e)||Jb(e)||ax(e)||ix(e))}function kw(e){return ww(e,`string`)}function Aw(e){return lb(e)&&(Vb(e)||Ib(e)||Ob(e)||Kb(e))}function jw(e){return ww(e,`number`)||ww(e,`bigint`)}function Mw(e){return lb(e)&&(Rb(e)||Nb(e)||Eb(e)||Db(e)||Ub(e))}function Nw(e,t,n,r){e.Push(n);let i=[];if(ub(n))return Qx(e,t,n,r);if(rx(n)&&i.push(dw(e,t,n,r)),Ew(n)){let a=[];tx(n)&&a.push(iw(e,t,n,r)),pb(n)&&a.push(Rx(e,t,n,r)),bb(n)&&a.push(cS(e,t,n,r)),xb(n)&&a.push(dS(e,t,n,r)),Sb(n)&&a.push(mS(e,t,n,r)),qb(n)&&a.push(FC(e,t,n,r)),Yb(n)&&a.push(WC(e,t,n,r)),Xb(n)&&a.push(qC(e,t,n,r)),Hb(n)&&a.push(gC(e,t,n,r)),Lb(n)&&a.push(eC(e,t,n,r));let o=Mt(a),s=Ke(qe(nt(r)),o);i.push(Tw(n)?o:s)}if(Ow(n)){let a=[];fb(n)&&a.push(Ax(e,t,n,r)),vb(n)&&a.push(aS(e,t,n,r)),jb(n)&&a.push(RS(e,t,n,r)),Pb(n)&&a.push(HS(e,t,n,r)),Fb(n)&&a.push(JS(e,t,n,r)),zb(n)&&a.push(iC(e,t,n,r)),Bb(n)&&a.push(uC(e,t,n,r)),Jb(n)&&a.push(RC(e,t,n,r)),ix(n)&&a.push(xw(e,t,n,r));let o=Mt(a),s=Ke(qe(Je(r)),o);i.push(Dw(n)?o:s)}if(Aw(n)){let a=[];Ib(n)&&a.push(ZS(e,t,n,r)),Vb(n)&&a.push(pC(e,t,n,r)),Ob(n)&&a.push(ES(e,t,n,r)),Kb(n)&&a.push(MC(e,t,n,r));let o=Mt(a),s=Ke(qe(it(r)),o);i.push(kw(n)?o:s)}if(Mw(n)){let a=[];Eb(n)&&a.push(bS(e,t,n,r)),Db(n)&&a.push(CS(e,t,n,r)),Nb(n)&&a.push(GS(e,t,n,r)),Rb(n)&&a.push(sC(e,t,n,r)),Ub(n)&&a.push(yC(e,t,n,r));let o=Mt(a),s=Ke(qe(Ke(tt(r),Xe(r))),o);i.push(jw(n)?o:s)}$b(n)&&i.push(XC(e,t,n,r)),ex(n)&&i.push(tw(e,t,n,r)),sb(n)&&i.push(xx(e,t,n,r)),_b(n)&&i.push(tS(e,t,n,r)),Tb(n)&&i.push(_S(e,t,n,r)),Ab(n)&&i.push(kS(e,t,n,r)),Wb(n)&&i.push(wC(e,t,n,r)),mb(n)&&i.push(Wx(e,t,n,r)),gb(n)&&i.push(Yx(e,t,n,r)),Gb(n)&&i.push(kC(e,t,n,r)),ax(n)&&i.push(Ke(qe(Je(r)),mw(e,t,n,r))),ox(n)&&i.push(Ke(qe(rt(r)),_w(e,t,n,r))),cb(n)&&i.push(wx(e,t,n,r));let a=Mt(i);return e.Pop(n),a}function Pw(e,t,n,r){e.Push(n);let i=ub(n)?$x(e,t,n,r):(!rx(n)||fw(e,t,n,r))&&(!(xe(r)&&!R(r))||(!tx(n)||aw(e,t,n,r))&&(!pb(n)||zx(e,t,n,r))&&(!bb(n)||lS(e,t,n,r))&&(!xb(n)||fS(e,t,n,r))&&(!Sb(n)||hS(e,t,n,r))&&(!qb(n)||IC(e,t,n,r))&&(!Yb(n)||GC(e,t,n,r))&&(!Xb(n)||JC(e,t,n,r))&&(!Hb(n)||_C(e,t,n,r))&&(!Lb(n)||tC(e,t,n,r)))&&(!R(r)||(!fb(n)||jx(e,t,n,r))&&(!vb(n)||oS(e,t,n,r))&&(!jb(n)||zS(e,t,n,r))&&(!Pb(n)||US(e,t,n,r))&&(!Fb(n)||YS(e,t,n,r))&&(!zb(n)||aC(e,t,n,r))&&(!Bb(n)||dC(e,t,n,r))&&(!Jb(n)||zC(e,t,n,r))&&(!ix(n)||Sw(e,t,n,r)))&&(!z(r)||(!Ib(n)||QS(e,t,n,r))&&(!Vb(n)||mC(e,t,n,r))&&(!Ob(n)||DS(e,t,n,r))&&(!Kb(n)||NC(e,t,n,r)))&&(!(ye(r)||fe(r))||(!Eb(n)||xS(e,t,n,r))&&(!Db(n)||wS(e,t,n,r))&&(!Nb(n)||KS(e,t,n,r))&&(!Rb(n)||cC(e,t,n,r))&&(!Ub(n)||bC(e,t,n,r)))&&(!$b(n)||ZC(e,t,n,r))&&(!ex(n)||nw(e,t,n,r))&&(!sb(n)||Sx(e,t,n,r))&&(!_b(n)||nS(e,t,n,r))&&(!Tb(n)||vS(e,t,n,r))&&(!Ab(n)||AS(e,t,n,r))&&(!Wb(n)||TC(e,t,n,r))&&(!mb(n)||Gx(e,t,n,r))&&(!gb(n)||Xx(e,t,n,r))&&(!Gb(n)||AC(e,t,n,r))&&(!ax(n)||!R(r)||hw(e,t,n,r))&&(!ox(n)||!xe(r)||vw(e,t,n,r))&&(!cb(n)||Tx(e,t,n,r));return e.Pop(n),i}function Fw(e,t,n,r,i,a){e.Push(i);let o=ub(i)?eS(e,t,n,r,i,a):!!((!rx(i)||pw(e,t,n,r,i,a))&+(!(xe(a)&&!R(a))||!!((!tx(i)||ow(e,t,n,r,i,a))&+(!pb(i)||Bx(e,t,n,r,i,a))&(!bb(i)||uS(e,t,n,r,i,a))&(!xb(i)||pS(e,t,n,r,i,a))&(!Sb(i)||gS(e,t,n,r,i,a))&(!qb(i)||LC(e,t,n,r,i,a))&(!Yb(i)||KC(e,t,n,r,i,a))&(!Xb(i)||YC(e,t,n,r,i,a))&(!Hb(i)||vC(e,t,n,r,i,a))&(!Lb(i)||nC(e,t,n,r,i,a))))&(!R(a)||!!((!fb(i)||Mx(e,t,n,r,i,a))&+(!vb(i)||sS(e,t,n,r,i,a))&(!jb(i)||BS(e,t,n,r,i,a))&(!Pb(i)||WS(e,t,n,r,i,a))&(!Fb(i)||XS(e,t,n,r,i,a))&(!zb(i)||oC(e,t,n,r,i,a))&(!Bb(i)||fC(e,t,n,r,i,a))&(!Jb(i)||BC(e,t,n,r,i,a))&(!ix(i)||Cw(e,t,n,r,i,a))))&(!z(a)||!!((!Ib(i)||$S(e,t,n,r,i,a))&+(!Vb(i)||hC(e,t,n,r,i,a))&(!Ob(i)||OS(e,t,n,r,i,a))&(!Kb(i)||PC(e,t,n,r,i,a))))&(!(ye(a)||fe(a))||!!((!Eb(i)||SS(e,t,n,r,i,a))&+(!Db(i)||TS(e,t,n,r,i,a))&(!Nb(i)||qS(e,t,n,r,i,a))&(!Rb(i)||lC(e,t,n,r,i,a))&(!Ub(i)||xC(e,t,n,r,i,a))))&(!$b(i)||QC(e,t,n,r,i,a))&(!ex(i)||rw(e,t,n,r,i,a))&(!sb(i)||Cx(e,t,n,r,i,a))&(!_b(i)||rS(e,t,n,r,i,a))&(!Tb(i)||yS(e,t,n,r,i,a))&(!Ab(i)||jS(e,t,n,r,i,a))&(!Wb(i)||EC(e,t,n,r,i,a))&(!mb(i)||Kx(e,t,n,r,i,a))&(!gb(i)||Zx(e,t,n,r,i,a))&(!Gb(i)||jC(e,t,n,r,i,a))&(!ax(i)||!R(a)||gw(e,t,n,r,i,a))&(!ox(i)||!xe(a)||yw(e,t,n,r,i,a)))&&(!cb(i)||Ex(e,t,n,r,i,a));return e.Pop(i),o}var Iw=new Map;function Lw(e,t,n,r){return e.UseUnevaluated()?Ct(`check_${n}`,[`context`,r]):Ct(`check_${n}`,[r])}function Rw(e,t,n,r){let i=Nw(e,t,n,`value`);return t.UseUnevaluated()?kt(`check_${r}`,St([`context`,`value`],i)):kt(`check_${r}`,St([`value`],i))}function zw(){Iw.clear()}function Bw(){return[...Iw.values()]}function Vw(e,t,n,r){let i=lb(n)?$r({__baseURL:e.BaseURL().href,...n}):$r(n),a=Lw(t,n,i,r);return Iw.has(i)?a:(Iw.set(i,``),Iw.set(i,Rw(e,t,n,i)),a)}function Hw(e,t){return xe(t)?t[e]:void 0}function Uw(e,t){return e.reduce((e,t)=>Hw(t,e),t)}function Ww(e){if(V(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function Gw(e,t){return Uw(Ww(t),e)}function Kw(e,t,n){if(e.$id===n.hash)return e;let r=new URL(e.$id,t.href),i=new URL(n.href,t.href);if(V(r.pathname,i.pathname))return n.hash.startsWith(`#`)?Jw(e,t,n):e}function qw(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);if(V(r.href,i.href))return e}function Jw(e,t,n){return n.href.endsWith(`#`)?e:n.hash.startsWith(`#`)?Gw(e,decodeURIComponent(n.hash.slice(1))):void 0}function Yw(e,t,n){if(kb(e)){let r=Kw(e,t,n);if(!B(r))return r}if(hb(e)){let r=qw(e,t,n);if(!B(r))return r}return Jw(e,t,n)}function Xw(e,t,n){return e.reduce((e,r)=>{let i=Qw(r,t,n);return B(i)?e:i},void 0)}function Zw(e,t,n){return Le(e).reduce((r,i)=>{let a=Qw(e[i],t,n);return B(a)?r:a},void 0)}function Qw(e,t,n){if(t=lb(e)&&kb(e)?new URL(e.$id,t.href):t,lb(e)){let r=Yw(e,t,n);if(!B(r))return r}if(R(e))return Xw(e,t,n);if(xe(e))return Zw(e,t,n)}function $w(e,t){let n=new URL(`http://unknown`),r=kb(e)?new URL(e.$id,n.href):n;return Qw(e,r,new URL(t,r.href))}var eT=class{constructor(e,t){this.context=e,this.schema=t,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((e,t)=>new URL(t.$id,e),new URL(`http://unknown`))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(e){lb(e)&&(kb(e)&&this.ids.push(e),hb(e)&&this.anchors.push(e),Qb(e)&&this.recursiveAnchors.push(e),Cb(e)&&this.dynamicAnchors.push(e))}Pop(e){lb(e)&&(kb(e)&&this.ids.pop(),hb(e)&&this.anchors.pop(),Qb(e)&&this.recursiveAnchors.pop(),Cb(e)&&this.dynamicAnchors.pop())}FromContext(e){return H(this.context,e)?this.context[e]:void 0}FromRef(e){return e.startsWith(`#`)?$w(this.Base(),e):$w(this.schema,e)}Ref(e){return this.FromContext(e)??this.FromRef(e)}RecursiveRef(e){return Qb(this.Base())?$w(this.recursiveAnchors[0],e):$w(this.Base(),e)}};function tT(e){return`${e.Functions().join(`;
10
- `)}; return (value) => { ${(e.UseUnevaluated()?[`const context = new CheckContext({}, {})`,`return ${e.Call()}`]:[`return ${e.Call()}`]).join(`; `)} }`}function nT(e,t){return new globalThis.Function(`CheckContext`,`Guard`,`Format`,`Hashing`,e.External().identifier,t)(fx,ue,ib,wr,e.External().variables)}function rT(e){let t=new eT(e.Context(),e.Schema()),n=new fx;return r=>Pw(t,n,e.Schema(),r)}function iT(e,t){return Cr()?nT(e,t):rT(e)}var aT=class{constructor(e,t,n,r,i,a){this.context=e,this.schema=t,this.external=n,this.functions=r,this.call=i,this.useUnevaluated=a}Context(){return this.context}Schema(){return this.schema}UseUnevaluated(){return this.useUnevaluated}External(){return this.external}Functions(){return this.functions}Call(){return this.call}Evaluate(){let e=tT(this),t=iT(this,e);return{IsAccelerated:Cr(),Code:e,Check:t}}};function oT(...e){let[t,n]=or(e,{2:(e,t)=>[e,t],1:e=>[{},e]});vx(),zw();let r=new eT(t,n),i=new dx(ux(t,n)),a=Vw(r,i,n,`value`),o=Bw();return new aT(t,n,bx(),o,a,i.UseUnevaluated())}function sT(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),i=en(),a=ni(),o=[];return[Fw(new eT(t,n),new px(e=>{if(!Ee(o.length,i.maxErrors))return o.push({...e,message:a(e)})}),`#`,``,n,r),o]}function cT(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return Pw(new eT(t,n),new fx,n,r)}function lT(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return cT(t,n,r)}function uT(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),[i,a]=sT(t,n,r);return a}var dT=class extends Error{constructor(e,t,n){super(e),Object.defineProperty(this,`cause`,{value:{source:e,errors:n,value:t},writable:!1,configurable:!1,enumerable:!1})}};function fT(e,t,n){return R(n)?n.map(n=>MT(e,t.items,n)):n}function pT(e,t,n){return t.Clean(n)}function mT(e,t,n){return MT({...e,...t.$defs},Gn(t.$ref),n)}function hT(e,t){let n=H(t,`unevaluatedProperties`)?{additionalProperties:t.unevaluatedProperties}:{},r=iy(ey(e,t));return Gi(r)?f_(r,n):r}function gT(e,t,n){return MT(e,hT(e,t),n)}function _T(e){return H(e,`additionalProperties`)?e.additionalProperties:void 0}function vT(e,t,n){if(!xe(n)||R(n))return n;let r=_T(t);for(let i of Le(n)){if(H(t.properties,i)){n[i]=MT(e,t.properties[i],n[i]);continue}if(pe(r)&&V(r,!0)||cn(r)&&lT(e,r,n[i])){n[i]=MT(e,r,n[i]);continue}delete n[i]}return n}function yT(e,t,n){if(!xe(n))return n;let r=_T(t),[i,a]=[new RegExp(Oa(t)),Aa(t)];for(let t of Le(n)){if(i.test(t)){n[t]=MT(e,a,n[t]);continue}if(pe(r)&&V(r,!0)||cn(r)&&lT(e,r,n[t])){n[t]=MT(e,r,n[t]);continue}delete n[t]}return n}function bT(e,t,n){return H(e,t.$ref)?MT(e,e[t.$ref],n):n}function xT(e,t,n){if(!R(n))return n;let r=Math.min(n.length,t.items.length);for(let i=0;i<r;i++)n[i]=MT(e,t.items[i],n[i]);return Ce(n.length,r)?n.slice(0,r):n}function ST(e){return e}function CT(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=AT(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=AT(e[n]);return t}function wT(e){return Oe(e)?ST(e):CT(e)}function TT(e){return e.map(e=>AT(e))}function ET(e){return e.slice()}function DT(e){return new Map(AT([...e.entries()]))}function OT(e){return new Set(AT([...e.values()]))}function kT(e){return e}function AT(e){return zt(e)?ET(e):Ut(e)?DT(e):Ht(e)?OT(e):R(e)?TT(e):xe(e)?wT(e):kT(e)}function jT(e,t,n){for(let r of t.anyOf){let t=MT(e,r,AT(n));if(lT(e,r,t))return t}return n}function MT(e,t,n){return jn(t)?fT(e,t,n):Rn(t)?pT(e,t,n):ar(t)?mT(e,t,n):vr(t)?gT(e,t,n):Gi(t)?vT(e,t,n):ja(t)?yT(e,t,n):Kn(t)?bT(e,t,n):La(t)?xT(e,t,n):ta(t)?jT(e,t,n):n}function NT(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return MT(t,n,r)}function PT(e,t,n){return R(n)?n.map(n=>sD(e,t.items,n)):n}function FT(e,t,n){return t.Convert(n)}function IT(e){return xe(e)&&H(e,`value`)}function LT(e){return{value:e}}function RT(e){return LT(e)}function zT(e){return V(e,!0)?LT(BigInt(1)):LT(BigInt(0))}function BT(e){return LT(BigInt(Math.trunc(e)))}function VT(e){return LT(BigInt(0))}var HT=/^-?(0|[1-9]\d*)n$/,UT=/^-?(0|[1-9]\d*)\.\d+$/,WT=/^-?(0|[1-9]\d*)$/;function GT(e){return HT.test(e)}function KT(e){return UT.test(e)}function qT(e){return WT.test(e)}function JT(e){let t=e.toLowerCase();return GT(e)?LT(BigInt(e.slice(0,e.length-1))):KT(e)?LT(BigInt(e.split(`.`)[0])):qT(e)?LT(BigInt(e)):V(t,`false`)?LT(BigInt(0)):V(t,`true`)?LT(BigInt(1)):void 0}function YT(e){return LT(BigInt(0))}function XT(e){return fe(e)?RT(e):pe(e)?zT(e):ye(e)?BT(e):ve(e)?VT(e):z(e)?JT(e):B(e)?YT(e):void 0}function ZT(e){return V(e,BigInt(0))?LT(!1):V(e,BigInt(1))?LT(!0):void 0}function QT(e){return LT(e)}function $T(e){return V(e,0)?LT(!1):V(e,1)?LT(!0):void 0}function eE(e){return LT(!1)}function tE(e){return V(e.toLowerCase(),`false`)?LT(!1):V(e.toLowerCase(),`true`)?LT(!0):V(e,`0`)?LT(!1):V(e,`1`)?LT(!0):void 0}function nE(e){return LT(!1)}function rE(e){return fe(e)?ZT(e):pe(e)?QT(e):ye(e)?$T(e):ve(e)?eE(e):z(e)?tE(e):B(e)?nE(e):void 0}function iE(e){return V(e,BigInt(0))?LT(null):void 0}function aE(e){return V(e,!1)?LT(null):void 0}function oE(e){return V(e,0)?LT(null):void 0}function sE(e){return LT(null)}function cE(e){let t=e.toLowerCase();return V(t,`undefined`)||V(t,`null`)||V(e,``)||V(e,`0`)?LT(null):void 0}function lE(e){return LT(null)}function uE(e){return fe(e)?iE(e):pe(e)?aE(e):ye(e)?oE(e):ve(e)?sE(e):z(e)?cE(e):B(e)?lE(e):void 0}var dE=BigInt(2**53-1),fE=BigInt(-(2**53-1));function pE(e){return e<=dE&&e>=fE}function mE(e){return pE(e)?LT(Number(e)):void 0}function hE(e){return LT(e?1:0)}function gE(e){return LT(e)}function _E(e){return LT(0)}function vE(e){let t=+e;if(ye(t))return LT(t);let n=e.toLowerCase();if(V(n,`false`))return LT(0);if(V(n,`true`))return LT(1);let r=XT(e);if(IT(r))return mE(r.value)}function yE(e){return LT(0)}function bE(e){return fe(e)?mE(e):pe(e)?hE(e):ye(e)?gE(e):ve(e)?_E(e):z(e)?vE(e):B(e)?yE(e):void 0}function xE(e){return LT(e.toString())}function SE(e){return LT(e.toString())}function CE(e){return LT(e.toString())}function wE(e){return LT(`null`)}function TE(e){return LT(e)}function EE(e){return LT(``)}function DE(e){return fe(e)?xE(e):pe(e)?SE(e):ye(e)?CE(e):ve(e)?wE(e):z(e)?TE(e):B(e)?EE(e):void 0}function OE(e){return V(e,BigInt(0))?LT(void 0):void 0}function kE(e){return V(e,!1)?LT(void 0):void 0}function AE(e){return V(e,0)?LT(void 0):void 0}function jE(e){return LT(void 0)}function ME(e){let t=e.toLowerCase();return V(t,`undefined`)||V(t,`null`)||V(e,``)||V(e,`0`)?LT(void 0):void 0}function NE(e){return LT(void 0)}function PE(e){return fe(e)?OE(e):pe(e)?kE(e):ye(e)?AE(e):ve(e)?jE(e):z(e)?ME(e):B(e)?NE(e):void 0}function FE(e,t,n){if(fe(n))return n;let r=XT(n);return IT(r)?r.value:n}function IE(e,t,n){if(pe(n))return n;let r=rE(n);return IT(r)?r.value:n}function LE(e,t,n){return sD({...e,...t.$defs},Gn(t.$ref),n)}function RE(e,t,n){if(t.anyOf.some(t=>lT(e,t,n)))return n;let r=t.anyOf.map(t=>sD(e,t,AT(n))).find(n=>lT(e,t,n));return B(r)?n:r}function zE(e,t,n){return RE(e,Yd(t),n)}function BE(e,t,n){if(ge(n))return n;let r=bE(n);return IT(r)?Math.trunc(r.value):n}function VE(e,t,n){return sD(e,iy(ey(e,t)),n)}function HE(e,t,n){let r=XT(n);return IT(r)&&V(t.const,r.value)?r.value:n}function UE(e,t,n){let r=rE(n);return IT(r)&&V(t.const,r.value)?r.value:n}function WE(e,t,n){let r=bE(n);return IT(r)&&V(t.const,r.value)?r.value:n}function GE(e,t,n){let r=DE(n);return IT(r)&&V(t.const,r.value)?r.value:n}function KE(e,t,n){return V(t.const,n)?n:ki(t)?HE(e,t,n):Ai(t)?UE(e,t,n):ji(t)?WE(e,t,n):Mi(t)?GE(e,t,n):br()}function qE(e,t,n){if(ve(n))return n;let r=uE(n);return IT(r)?r.value:n}function JE(e,t,n){if(ye(n))return n;let r=bE(n);return IT(r)?r.value:n}function YE(e,t,n,r){let i=Le(r);for(let[a,o]of t)for(let t of i)a.test(t)||(r[t]=sD(e,n,r[t]));return r}function XE(e,t,n){return Tn(e)&&B(n[t])}function ZE(e,t,n){let r=Fe(t.properties),i=Le(n);for(let[t,a]of r)for(let r of i)!t.test(r)||XE(a,r,n)||(n[r]=sD(e,a,n[r]));return H(t,`additionalProperties`)&&xe(t.additionalProperties)?YE(e,r,t.additionalProperties,n):n}function QE(e,t,n){return be(n)?ZE(e,t,n):n}function $E(e,t,n){let r=Fe(t.patternProperties),i=Le(n);for(let[t,a]of r)for(let r of i)t.test(r)&&(n[r]=sD(e,a,n[r]));return H(t,`additionalProperties`)&&xe(t.additionalProperties)?YE(e,r,t.additionalProperties,n):n}function eD(e,t,n){return be(n)?$E(e,t,n):n}function tD(e,t,n){return H(e,t.$ref)?sD(e,e[t.$ref],n):n}function nD(e,t,n){if(z(n))return n;let r=DE(n);return IT(r)?r.value:n}function rD(e,t,n){return sD(e,ya(t.pattern),n)}function iD(e,t,n){if(!R(n))return n;for(let r=0;r<Math.min(t.items.length,n.length);r++)n[r]=sD(e,t.items[r],n[r]);return n}function aD(e,t,n){if(B(n))return n;let r=PE(n);return IT(r)?r.value:n}function oD(e,t,n){return B(n)?n:IT(PE(n))?void 0:n}function sD(e,t,n){return jn(t)?PT(e,t,n):Rn(t)?FT(e,t,n):mi(t)?FE(e,t,n):gi(t)?IE(e,t,n):ar(t)?LE(e,t,n):gr(t)?zE(e,t,n):xi(t)?BE(e,t,n):vr(t)?VE(e,t,n):Ni(t)?KE(e,t,n):Fi(t)?qE(e,t,n):Ri(t)?JE(e,t,n):Gi(t)?QE(e,t,n):ja(t)?eD(e,t,n):Kn(t)?tD(e,t,n):$i(t)?nD(e,t,n):Ld(t)?rD(e,t,n):La(t)?iD(e,t,n):Ba(t)?aD(e,t,n):ta(t)?RE(e,t,n):Wa(t)?oD(e,t,n):n}function cD(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return sD(t,n,r)}function lD(e,t,n){if(!R(n))return n;for(let r=0;r<n.length;r++)n[r]=yD(e,t.items,n[r]);return n}function uD(e,t,n){return t.Default(n)}function dD(e,t,n){return yD({...e,...t.$defs},Gn(t.$ref),n)}function fD(e,t){return B(t)?he(e.default)?e.default():AT(e.default):t}function pD(e,t,n){return yD(e,iy(ey(e,t)),n)}function mD(e,t,n){if(!xe(n))return n;let r=Le(t.properties);for(let i of r)B(yD(e,t.properties[i],n[i]))&&(Tn(t.properties[i])||!H(t.properties[i],`default`))||(n[i]=yD(e,t.properties[i],n[i]));if(!pb(t)||pe(t.additionalProperties))return n;for(let i of Le(n))r.includes(i)||(n[i]=yD(e,t.additionalProperties,n[i]));return n}function hD(e,t,n){if(!xe(n))return n;let[r,i]=[new RegExp(Oa(t)),Aa(t)];for(let t of Le(n))r.test(t)&&yb(i)&&(n[t]=yD(e,i,n[t]));if(!pb(t))return n;for(let i of Le(n))r.test(i)||(n[i]=yD(e,t.additionalProperties,n[i]));return n}function gD(e,t,n){return H(e,t.$ref)?yD(e,e[t.$ref],n):n}function _D(e,t,n){if(!R(n))return n;let[r,i]=[t.items,Math.max(t.items.length,n.length)];for(let t=0;t<i;t++)t<r.length&&(n[t]=yD(e,r[t],n[t]));return n}function vD(e,t,n){for(let r of t.anyOf){let t=yD(e,r,AT(n));if(lT(e,r,t))return t}return n}function yD(e,t,n){let r=yb(t)?fD(t,n):n;return jn(t)?lD(e,t,r):Rn(t)?uD(e,t,r):ar(t)?dD(e,t,r):vr(t)?pD(e,t,r):Gi(t)?mD(e,t,r):ja(t)?hD(e,t,r):Kn(t)?gD(e,t,r):La(t)?_D(e,t,r):ta(t)?vD(e,t,r):r}function bD(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return yD(t,n,r)}function xD(e){return(...t)=>{let[n,r,i]=or(t,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return e.reduce((e,t)=>t(n,r,e),i)}}function SD(e,t,n){return t[`~codec`].decode(n)}function CD(e,t,n){return t[`~codec`].encode(n)}function wD(e,t,n,r){return ci(n)?V(e,`Decode`)?SD(t,n,r):CD(t,n,r):r}function TD(e,t,n,r){if(!R(r))return br();for(let i=0;i<r.length;i++)r[i]=GD(e,t,n.items,r[i]);return wD(e,t,n,r)}function ED(e,t,n,r){let i=wD(e,t,n,r);if(!R(i))return i;for(let r=0;r<i.length;r++)i[r]=GD(e,t,n.items,i[r]);return i}function DD(e,t,n,r){return V(e,`Decode`)?TD(e,t,n,r):ED(e,t,n,r)}function OD(e,t,n,r){return r=GD(e,{...t,...n.$defs},Gn(n.$ref),r),wD(e,t,n,r)}function kD(e,t,n,r){for(let i of n.allOf)r=GD(e,t,i,r);return wD(e,t,n,r)}function AD(e,t,n,r){let i=wD(e,t,n,r);for(let r of n.allOf)i=GD(e,t,r,i);return i}function jD(e,t,n,r){return V(e,`Decode`)?kD(e,t,n,r):AD(e,t,n,r)}function MD(e,t,n,r){if(!be(r))return br();for(let i of Le(n.properties))!H(r,i)||XE(n.properties[i],i,r)||(r[i]=GD(e,t,n.properties[i],r[i]));return wD(e,t,n,r)}function ND(e,t,n,r){let i=wD(e,t,n,r);if(!be(i))return i;for(let r of Le(n.properties))!H(i,r)||XE(n.properties[r],r,i)||(i[r]=GD(e,t,n.properties[r],i[r]));return i}function PD(e,t,n,r){return V(e,`Decode`)?MD(e,t,n,r):ND(e,t,n,r)}function FD(e,t,n,r){if(!be(r))return br();let i=new RegExp(Oa(n));for(let a of Le(r))i.test(a)||br(),r[a]=GD(e,t,Aa(n),r[a]);return wD(e,t,n,r)}function ID(e,t,n,r){let i=wD(e,t,n,r);if(!be(i))return i;let a=new RegExp(Oa(n));for(let r of Le(i))a.test(r)&&(i[r]=GD(e,t,Aa(n),i[r]));return i}function LD(e,t,n,r){return V(e,`Decode`)?FD(e,t,n,r):ID(e,t,n,r)}function RD(e,t,n,r){return r=H(t,n.$ref)?GD(e,t,t[n.$ref],r):r,wD(e,t,n,r)}function zD(e,t,n,r){if(!R(r))return br();for(let i=0;i<Math.min(n.items.length,r.length);i++)r[i]=GD(e,t,n.items[i],r[i]);return wD(e,t,n,r)}function BD(e,t,n,r){let i=wD(e,t,n,r);if(!R(i))return r;for(let r=0;r<Math.min(n.items.length,i.length);r++)i[r]=GD(e,t,n.items[r],i[r]);return i}function VD(e,t,n,r){return V(e,`Decode`)?zD(e,t,n,r):BD(e,t,n,r)}function HD(e,t,n,r){for(let i of n.anyOf)if(lT(t,i,r))return wD(e,t,n,GD(e,t,i,r));return br()}function UD(e,t,n,r){let i=wD(e,t,n,r);for(let r of n.anyOf){let n=GD(e,t,r,AT(i));if(lT(t,r,n))return n}return i}function WD(e,t,n,r){return V(e,`Decode`)?HD(e,t,n,r):UD(e,t,n,r)}function GD(e,t,n,r){return jn(n)?DD(e,t,n,r):ar(n)?OD(e,t,n,r):vr(n)?jD(e,t,n,r):Gi(n)?PD(e,t,n,r):ja(n)?LD(e,t,n,r):Kn(n)?RD(e,t,n,r):La(n)?VD(e,t,n,r):ta(n)?WD(e,t,n,r):wD(e,t,n,r)}var KD=class extends dT{constructor(e,t){super(`Decode`,e,t)}};function qD(e,t,n){if(!lT(e,t,n))throw new KD(n,uT(e,t,n));return n}function JD(e,t,n){return GD(`Decode`,e,t,n)}var YD=xD([(e,t,n)=>AT(n),(e,t,n)=>bD(e,t,n),(e,t,n)=>cD(e,t,n),(e,t,n)=>NT(e,t,n),(e,t,n)=>qD(e,t,n),(e,t,n)=>JD(e,t,n)]);function XD(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return YD(t,n,r)}var ZD=class extends dT{constructor(e,t){super(`Encode`,e,t)}};function QD(e,t,n){if(!lT(e,t,n))throw new ZD(n,uT(e,t,n));return n}function $D(e,t,n){return GD(`Encode`,e,t,n)}var eO=xD([(e,t,n)=>AT(n),(e,t,n)=>$D(e,t,n),(e,t,n)=>bD(e,t,n),(e,t,n)=>cD(e,t,n),(e,t,n)=>NT(e,t,n),(e,t,n)=>QD(e,t,n)]);function tO(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return eO(t,n,r)}function nO(e,t){return ci(t)||uO(e,t.items)}function rO(e,t){return ci(t)||sO({...e,...t.$defs},Gn(t.$ref))}function iO(e,t){return ci(t)||t.allOf.some(t=>uO(e,t))}function aO(e,t){return ci(t)||Le(t.properties).some(n=>uO(e,t.properties[n]))}function oO(e,t){return ci(t)||uO(e,Aa(t))}function sO(e,t){return dO.has(t.$ref)?!1:(dO.add(t.$ref),ci(t)||H(e,t.$ref)&&uO(e,e[t.$ref]))}function cO(e,t){return ci(t)||t.items.some(t=>uO(e,t))}function lO(e,t){return ci(t)||t.anyOf.some(t=>uO(e,t))}function uO(e,t){return jn(t)?nO(e,t):ar(t)?rO(e,t):vr(t)?iO(e,t):Gi(t)?aO(e,t):ja(t)?oO(e,t):Kn(t)?sO(e,t):La(t)?cO(e,t):ta(t)?lO(e,t):ci(t)}var dO=new Set;function fO(...e){let[t,n]=or(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return dO.clear(),uO(t,n)}var pO=class extends Error{constructor(e,t){super(t),this.type=e}};function mO(e,t){return he(t.default)?t.default(t):xe(t.default)?AT(t.default):t.default}function hO(e,t){if(ix(t)&&!yb(t))throw new pO(t,`Arrays with uniqueItems constraints must specify a default annotation`);let n=Bb(t)?t.minItems:0;return Array.from({length:n},()=>HO(e,t.items))}async function*gO(){}function _O(e,t){return gO()}function vO(e,t){return t.Create()}function yO(e,t){return Db(t)?BigInt(t.exclusiveMinimum)+BigInt(1):Rb(t)?BigInt(t.minimum):BigInt(0)}function bO(e,t){return!1}function xO(e,t){let n=HO(e,t.instanceType);return class{constructor(){Object.assign(this,n)}}}function SO(e,t){return HO({...e,...t.$defs},Gn(t.$ref))}function CO(e,t){return HO(e,Yd(t))}function wO(e,t){let n=HO(e,t.returnType);return()=>n}function TO(e,t){return Db(t)&&ye(t.exclusiveMinimum)?t.exclusiveMinimum+1:Rb(t)?t.minimum:0}function EO(e,t){return HO(e,iy(ey(e,t)))}function*DO(){}function OO(e,t){return DO()}function kO(e,t){return t.const}function AO(e,t){throw new pO(t,`Cannot create TNever types`)}function jO(e,t){return null}function MO(e,t){return Db(t)&&ye(t.exclusiveMinimum)?t.exclusiveMinimum+1:Rb(t)?t.minimum:0}function NO(e,t){return(B(t.required)?[]:t.required).reduce((n,r)=>({...n,[r]:HO(e,t.properties[r])}),{})}function PO(e,t){return Promise.resolve(HO(e,t.item))}function FO(e,t){if(Hb(t)&&!yb(t))throw new pO(t,`Record with the minProperties constraint must have a default annotation`);return{}}function IO(e,t){return H(e,t.$ref)?HO(e,e[t.$ref]):(()=>{throw new pO(t,`Unable to deref Ref`)})()}function LO(e,t){if((Kb(t)||Ob(t))&&!yb(t))throw Error(`Strings with format or pattern constraints must specify default`);let n=Vb(t)?t.minLength:0;return``.padEnd(n)}function RO(e,t){return Symbol()}function zO(e,t){let n=ya(t.pattern);if($i(n))throw new pO(t,`Unable to create TemplateLiteral due to infinite type expansion`);return HO(e,n)}function BO(e,t){return Array.from({length:t.minItems},(n,r)=>HO(e,t.items[r]))}function VO(e,t){if(V(t.anyOf.length,0))throw Error(`Unable to create Union with no variants`);return HO(e,t.anyOf[0])}function HO(e,t){return yb(t)?mO(e,t):jn(t)?hO(e,t):Pn(t)?_O(e,t):Rn(t)?vO(e,t):mi(t)?yO(e,t):gi(t)?bO(e,t):Bn(t)?xO(e,t):ar(t)?SO(e,t):gr(t)?CO(e,t):Un(t)?wO(e,t):xi(t)?TO(e,t):vr(t)?EO(e,t):Ci(t)?OO(e,t):Ni(t)?kO(e,t):Zn(t)?AO(e,t):Fi(t)?jO(e,t):Ri(t)?MO(e,t):Gi(t)?NO(e,t):Xi(t)?PO(e,t):ja(t)?FO(e,t):Kn(t)?IO(e,t):$i(t)?LO(e,t):Bi(t)?RO(e,t):Ld(t)?zO(e,t):La(t)?BO(e,t):Ba(t)?void 0:ta(t)?VO(e,t):(Wa(t),void 0)}function UO(...e){let[t,n]=or(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return HO(t,n)}var WO=class extends dT{constructor(e,t){super(`Parse`,e,t)}};function GO(e,t,n){if(!lT(e,t,n))throw new WO(n,uT(e,t,n));return n}var KO=xD([(e,t,n)=>AT(n),(e,t,n)=>bD(e,t,n),(e,t,n)=>cD(e,t,n),(e,t,n)=>NT(e,t,n),(e,t,n)=>GO(e,t,n)]);function qO(...e){let[t,n,r]=or(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});if(lT(t,n,r))return r;if(en().correctiveParse)return KO(t,n,r);throw new WO(r,uT(t,n,r))}ea([Wi({type:Di(`insert`),path:Qi(),value:sr()}),Object({type:Di(`update`),path:Qi(),value:sr()}),Wi({type:Di(`delete`),path:Qi()})]);var JO=e=>e&&typeof e==`object`&&`format`in e&&e.format===`binary`,YO=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.size==`number`&&typeof e.stream.bind(e)==`function`;$t({correctiveParse:!0});var XO=class{isBigInt=e=>$i(e)&&`format`in e&&e.format===`bigint`;isUUID=e=>$i(e)&&`format`in e&&e.format===`uuid`;isObject=Gi;isNumber=Ri;isString=$i;isBoolean=gi;isAny=fr;isArray=jn;isOptional=Tn;isUnion=ta;isInteger=xi;isNull=Fi;isUndefined=Ba;isUnsafe=Ha;isRecord=ja;isTuple=La;isVoid=Wa;isLiteral=Ni;isSchema=cn;isScalar=e=>this.isString(e)||this.isNumber(e)||this.isInteger(e)||this.isBoolean(e);isFile=JO;isDateTime=e=>G.schema.isString(e)&&e.format===`date-time`;isDate=e=>G.schema.isString(e)&&e.format===`date`;isTime=e=>G.schema.isString(e)&&e.format===`time`;isDuration=e=>G.schema.isString(e)&&e.format===`duration`},ZO=class e{static format=ab;static{ab.Set(`bigint`,t=>e.isValidBigInt(t))}static translateError(e,t){return e.cause.message}static setLocale(e){}static isValidBigInt(e){if(typeof e==`number`)return Number.isInteger(e);if(!e.trim()||!/^-?\d+$/.test(e))return!1;try{return BigInt(e),!0}catch{return!1}}static DEFAULT_STRING_MAX_LENGTH=255;static DEFAULT_SHORT_STRING_MAX_LENGTH=64;static DEFAULT_LONG_STRING_MAX_LENGTH=1024;static DEFAULT_RICH_STRING_MAX_LENGTH=65535;static DEFAULT_ARRAY_MAX_ITEMS=1e3;raw=cy;any=dr;void=Ua;undefined=za;record=Ea;union=ea;tuple=Ia;null=Pi;const=Di;options=f_;schema=new XO;extend(e,t,n){return qp(Array.isArray(e)?e:[e],t,{additionalProperties:!1,...n})}pick(e,t,n){return A_(e,t,{additionalProperties:!1,...n})}omit(e,t,n){return o_(e,t,{additionalProperties:!1,...n})}partial(e,t){return x_(e,{additionalProperties:!1,...t})}object(e,t){return Wi(e,{additionalProperties:!1,...t})}array(t,n){return An(t,{maxItems:e.DEFAULT_ARRAY_MAX_ITEMS,...n})}string(e={}){return Qi({...e})}text(t={}){let{size:n,...r}=t;return Qi({maxLength:n===`short`?e.DEFAULT_SHORT_STRING_MAX_LENGTH:n===`long`?e.DEFAULT_LONG_STRING_MAX_LENGTH:n===`rich`?e.DEFAULT_RICH_STRING_MAX_LENGTH:e.DEFAULT_STRING_MAX_LENGTH,"~options":{trim:t.trim??!0,lowercase:t.lowercase??!1},...r})}json(e){return G.record(G.text(),G.any(),e)}boolean(e){return hi({...e})}number(e){return Li({...e})}integer(e){return bi({...e})}int32(e){return bi({minimum:-2147483648,maximum:2147483647,...e})}int64(e){return Li({format:`int64`,multipleOf:1,minimum:-9007199254740991,maximum:9007199254740991,...e})}optional(e){return wn(e)}nullable(e,t){return ea([Pi(),e],t)}nullify=(e,t)=>Vg(_i(`K`),Tg(e),Gn(`K`),ea([ng(e,Gn(`K`)),Pi()]),t);enum(e,t){return Va(G.text({enum:e,pattern:e.map(e=>`^${e}$`).join(`|`),...t}))}bigint(e){return G.string({...e,format:`bigint`})}url(e){return this.string({...e,format:`url`})}binary(e={}){return this.string({...e,format:`binary`})}uuid(e){return this.string({...e,format:`uuid`})}file(e){return Va(dr({[f]:e,format:`binary`}))}stream(){return Va(dr({format:`stream`,type:`string`}))}email(e){return this.text({...e,format:`email`,trim:!0,lowercase:!0})}e164(e){return this.text({...e,description:`Phone number in E.164 format, e.g. +1234567890.`,pattern:`^\\+[1-9]\\d{1,14}$`})}bcp47(e){return this.text({...e,description:`BCP 47 language tag, e.g. en, en-US, fr, fr-CA.`,pattern:`^[a-z]{2,3}(?:-[A-Z]{2})?$`})}shortText(e){return this.text({size:`short`,...e})}longText(e){return this.text({size:`long`,...e})}richText(e){return this.text({size:`rich`,...e})}constantCase=e=>this.text({pattern:`^[A-Z_-]+$`,...e});valueLabel=e=>this.object({value:this.constantCase({description:`Machine-readable value.`}),label:this.text({description:`Human-readable label.`}),description:this.optional(this.text({description:`Description of the value.`,size:`long`}))},e);datetime=e=>G.text({...e,format:`date-time`});date=e=>G.text({...e,format:`date`});time=e=>G.text({...e,format:`time`});duration=e=>G.text({...e,format:`duration`})},G=new ZO,QO=class extends k{cache=new Map;textEncoder=new TextEncoder;textDecoder=new TextDecoder;varCounter=0;useFunctionCompilation=!0;configure(e){return e.useFunctionCompilation!==void 0&&(this.useFunctionCompilation=e.useFunctionCompilation,this.cache.clear()),this}onConfigure=j({on:`configure`,handler:()=>{this.useFunctionCompilation=this.canUseFunction()}});encodeToString(e,t){return this.getCodec(e).encode(t)}encodeToBinary(e,t){return this.textEncoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let n=this.textDecoder.decode(t);return this.getCodec(e).decode(n)}return typeof t==`string`?this.getCodec(e).decode(t):Array.isArray(t)?this.reconstructObject(e,t):t}canUseFunction(){try{return Function(`return true`)()===!0}catch{return!1}}getCodec(e){let t=this.cache.get(e);return t||(t=this.useFunctionCompilation?this.compileWithFunction(e):this.compileInterpreted(e),this.cache.set(e,t)),t}nextVar(){return`_${this.varCounter++}`}compileWithFunction(e){this.varCounter=0;let t=this.genEnc(e,`v`);this.varCounter=0;let n=this.genDec(e);return{encode:Function(`v`,`return JSON.stringify(${t});`),decode:Function(`s`,`const a=JSON.parse(s);let i=0;${n.code}return ${n.result};`)}}compileInterpreted(e){let t=this;return{encode(n){return JSON.stringify(t.interpretEncode(e,n))},decode(n){let r={arr:JSON.parse(n),i:0};return t.interpretDecode(e,r)}}}interpretEncode(e,t){if(this.isLeaf(e))return t;if(G.schema.isBigInt(e))return`${t}n`;if(G.schema.isArray(e)){let n=e;return!Array.isArray(t)||G.schema.isScalar(n.items)?t:t.map(e=>this.interpretEncode(n.items,e))}if(G.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t[r];i?n.push(e===void 0?null:this.interpretEncode(o,e)):a?n.push(e===null?null:this.interpretEncode(o,e)):n.push(this.interpretEncode(o,e))}return n}if(G.schema.isOptional(e)||G.schema.isUnion(e)){let n=this.unwrap(e);return this.isNullable(e)?t===null?null:this.interpretEncode(n,t):t===void 0?null:this.interpretEncode(n,t)}return t}interpretDecode(e,t){if(this.isLeaf(e))return t.arr[t.i++];if(G.schema.isBigInt(e))return BigInt(t.arr[t.i++].slice(0,-1));if(G.schema.isArray(e)){let n=e,r=t.arr[t.i++];return Array.isArray(r)&&G.schema.isObject(n.items)?r.map(e=>this.interpretDecodeFromValue(n.items,e)):r}if(G.schema.isObject(e)){let n={};for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t.arr[t.i++];i?e!==null&&(n[r]=this.interpretDecodeFromValue(o,e)):a?n[r]=e===null?null:this.interpretDecodeFromValue(o,e):n[r]=this.interpretDecodeFromValue(o,e)}return n}if(G.schema.isOptional(e)||G.schema.isUnion(e)){let n=this.unwrap(e),r=t.arr[t.i++];return r===null?this.isNullable(e)?null:void 0:G.schema.isObject(n)||G.schema.isArray(n)?this.interpretDecodeFromValue(n,r):r}return t.arr[t.i++]}interpretDecodeFromValue(e,t){if(this.isLeaf(e))return t;if(G.schema.isBigInt(e))return BigInt(t.slice(0,-1));if(G.schema.isArray(e)){if(!Array.isArray(t))return t;let n=e;return G.schema.isObject(n.items)?t.map(e=>this.interpretDecodeFromValue(n.items,e)):t}if(G.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i={};for(let e=0;e<r.length;e++){let a=r[e],o=n[a],s=G.schema.isOptional(o),c=this.unwrap(o),l=t[e];s&&l===null||(G.schema.isObject(c)?i[a]=this.interpretDecodeFromValue(c,l):G.schema.isBigInt(c)?i[a]=BigInt(l.slice(0,-1)):i[a]=l)}return i}return t}genEnc(e,t){if(this.isLeaf(e))return t;if(G.schema.isBigInt(e))return`${t}+'n'`;if(G.schema.isArray(e)){let n=e,r=this.genEnc(n.items,`e`);return G.schema.isScalar(n.items)?t:`${t}.map(e=>${r})`}if(G.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=`${t}[${JSON.stringify(r)}]`,s=this.genEnc(o,e);i?n.push(`${e}!==undefined?${s}:null`):a?n.push(`${e}!==null?${s}:null`):n.push(s)}return`[${n.join(`,`)}]`}if(G.schema.isOptional(e)||G.schema.isUnion(e)){let n=this.unwrap(e),r=this.genEnc(n,t);return this.isNullable(e)?`${t}!==null?${r}:null`:`${t}!==undefined?${r}:null`}return t}genDec(e){let t=this.nextVar();if(this.isLeaf(e))return{code:``,result:`a[i++]`};if(G.schema.isBigInt(e))return{code:``,result:`BigInt(a[i++].slice(0,-1))`};if(G.schema.isArray(e)){let t=e;return G.schema.isObject(t.items)?{code:``,result:`a[i++].map(e=>${this.genDecFromValue(t.items,`e`)})`}:{code:``,result:`a[i++]`}}if(G.schema.isObject(e)){let n=this.getObjectFields(e);if(n.every(({isOpt:e,isNullable:t,inner:n})=>!e&&!t&&!G.schema.isObject(n)&&!G.schema.isArray(n)))return{code:``,result:`{${n.map(({key:e})=>`${JSON.stringify(e)}:a[i++]`).join(`,`)}}`};let r=`const ${t}={};`;for(let{key:e,isOpt:i,isNullable:a,inner:o}of n){let n=JSON.stringify(e);if(i){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t!==null){${t}[${n}]=${e};}}`}else if(a){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t===null){${t}[${n}]=null;}else{${t}[${n}]=${e};}}`}else if(G.schema.isObject(o)){let e=this.genDecFromValue(o,`a[i++]`);r+=`${t}[${n}]=${e};`}else if(G.schema.isArray(o)){let e=o;if(G.schema.isObject(e.items)){let i=this.genDecFromValue(e.items,`e`);r+=`${t}[${n}]=a[i++].map(e=>${i});`}else r+=`${t}[${n}]=a[i++];`}else r+=`${t}[${n}]=a[i++];`}return{code:r,result:t}}if(G.schema.isOptional(e)||G.schema.isUnion(e)){let n=this.unwrap(e),r=this.genDec(n);return{code:`const ${t}t=a[i++];let ${t};if(${t}t===null){${t}=${this.isNullable(e)?`null`:`undefined`};}else{${r.code.replace(/a\[i\+\+\]/g,`${t}t`)}${t}=${r.result.replace(/a\[i\+\+\]/g,`${t}t`)};}`,result:t}}return{code:``,result:`a[i++]`}}genDecFromValue(e,t){if(this.isLeaf(e))return t;if(G.schema.isBigInt(e))return`BigInt(${t}.slice(0,-1))`;if(G.schema.isArray(e)){let n=e.items;if(G.schema.isObject(n)||G.schema.isBigInt(n)){let e=this.nextVar();return`${t}.map(${e}=>${this.genDecFromValue(n,e)})`}return t}if(G.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i=this.nextVar();return`((${i}=${t})=>({${r.map((e,t)=>{let r=this.unwrap(n[e]),a=`${i}[${t}]`,o=JSON.stringify(e);return G.schema.isObject(r)?`${o}:${this.genDecFromValue(r,a)}`:G.schema.isBigInt(r)?`${o}:BigInt(${a}.slice(0,-1))`:`${o}:${a}`}).join(`,`)}}))()`}return t}isLeaf(e){return G.schema.isScalar(e)||this.isEnum(e)}getObjectFields(e){let t=e.properties,n=new Set(e.required||[]);return Object.keys(t).map(e=>{let r=t[e];return{key:e,isOpt:!n.has(e)||G.schema.isOptional(r),isNullable:this.isNullable(r),inner:this.unwrap(r)}})}isEnum(e){return`enum`in e&&Array.isArray(e.enum)&&(e.enum?.length??0)>0}isNullable(e){return G.schema.isUnion(e)?e.anyOf?.some(e=>G.schema.isNull(e))??!1:!1}unwrap(e){return`anyOf`in e&&Array.isArray(e.anyOf)&&e.anyOf.find(e=>!G.schema.isNull(e))||e}reconstructObject(e,t){if(!G.schema.isObject(e))return t;let n={},r=0;for(let{key:i,isOpt:a,isNullable:o,inner:s}of this.getObjectFields(e)){let e=t[r++];a?e!==null&&(n[i]=G.schema.isObject(s)?this.reconstructObject(s,e):e):o?n[i]=e===null?null:G.schema.isObject(s)?this.reconstructObject(s,e):e:n[i]=G.schema.isObject(s)?this.reconstructObject(s,e):e}return n}},$O=class e extends Ln{constructor(...e){super();let t=or(e,{6:(e,t,n,r,i,a)=>[e,t,n,r,i,a],2:(e,t)=>[e,t]});if(t.length===6){let[e,n,r,i,a,o]=t;this.context=e,this.type=n,this.isAccelerated=r,this.hasCodec=i,this.code=a,this.check=o}else{let[e,n]=t,r=oT(e,n).Evaluate();this.hasCodec=fO(e,n),this.context=e,this.type=n,this.isAccelerated=r.IsAccelerated,this.code=r.Code,this.check=r.Check}}IsAccelerated(){return this.isAccelerated}Context(){return this.context}Type(){return this.type}Code(){return this.code}Check(e){return this.check(e)}Errors(e){return Cr()&&this.check(e)?[]:uT(this.context,this.type,e)}Clean(e){return NT(this.context,this.type,e)}Convert(e){return cD(this.context,this.type,e)}Create(){return UO(this.context,this.type)}Default(e){return bD(this.context,this.type,e)}Clone(){return new e(this.context,this.type,this.isAccelerated,this.hasCodec,this.code,this.check)}Parse(e){if(this.Check(e))return e;if(en().correctiveParse)return KO(this.context,this.type,e);throw new WO(e,this.Errors(e))}Decode(e){return this.hasCodec?XD(this.context,this.type,e):this.Parse(e)}Encode(e){return this.hasCodec?tO(this.context,this.type,e):this.Parse(e)}};function ek(...e){let[t,n]=or(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return new $O(t,n)}var tk=class extends p{name=`TypeBoxError`;cause;value;constructor(e){super(`Invalid input: ${e.message}${e.instancePath?` at ${e.instancePath}`:``}`,{cause:e});let t=e.params;t?.requiredProperties?this.value={path:`/${t.requiredProperties[0]}`,message:`must be defined`}:this.value={path:e.instancePath,message:e.message},this.cause=e}},nk=class{cache=new Map;useEval=!0;validate(e,t,n={}){let r=this.beforeParse(e,t,{trim:n.trim??!0,nullToUndefined:n.nullToUndefined??!0,deleteUndefined:n.deleteUndefined??!0});try{return this.useEval?this.getValidator(e).Parse(r):qO(e,r)}catch(e){throw e.cause?.errors?.[0]?new tk(e.cause.errors[0]):e}}getValidator(e){if(this.cache.has(e))return this.cache.get(e);let t=ek(e);return this.cache.set(e,t),t}beforeParse(e,t,n){if(!e)return t;if(!(t===null&&!this.isSchemaNullable(e)&&n.nullToUndefined)){if(!e.type&&e.anyOf&&(e=e.anyOf.find(e=>e.type!==`null`&&e.type!==`undefined`)||e),Array.isArray(t))return t.map(t=>this.beforeParse(e.items,t,n));if(typeof t==`string`&&e.type===`string`){let r=t;return n.trim&&e[`~options`]?.trim&&(r=r.trim()),e[`~options`]?.lowercase&&(r=r.toLowerCase()),r}if(typeof t==`object`&&t&&e.type===`object`){let r={};for(let i in t){let a=this.beforeParse(e.properties?.[i],t[i],n);a===void 0&&n.deleteUndefined||(r[i]=a)}return r}return t}}isSchemaNullable=e=>e?e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)?!0:e.anyOf?e.anyOf.some(e=>this.isSchemaNullable(e)):e.oneOf?e.oneOf.some(e=>this.isSchemaNullable(e)):e.allOf?e.allOf.some(e=>this.isSchemaNullable(e)):!1:!1;onConfigure=j({on:`configure`,handler:()=>{this.useEval=this.canEval()}});canEval(){try{return ek(G.object({test:G.string()})).Parse({test:`value`}),!0}catch{return!1}}},rk=class{codecs=new Map;jsonCodec=D(A);keylessCodec=D(QO);schemaValidator=D(nk);default=`json`;constructor(){this.register({name:`json`,codec:this.jsonCodec,default:!0}),this.register({name:`keyless`,codec:this.keylessCodec})}register(e){this.codecs.set(e.name,e.codec),e.default&&(this.default=e.name)}getCodec(e){let t=this.codecs.get(e);if(!t)throw new p(`Codec "${e}" not found. Available codecs: ${Array.from(this.codecs.keys()).join(`, `)}`);return t}encode(e,t,n){let r=this.getCodec(n?.encoder??this.default),i=n?.as??`object`;return n?.validation!==!1&&(t=this.schemaValidator.validate(e,t,n?.validation)),i===`object`?t:i===`binary`?r.encodeToBinary(e,t):r.encodeToString(e,t)}decode(e,t,n){let r=n?.encoder??this.default,i=this.getCodec(r).decode(e,t);return n?.validation!==!1&&(i=this.schemaValidator.validate(e,i,n?.validation)),i}validate(e,t,n){return this.schemaValidator.validate(e,t,n)}},ik=class{logFn;events={};cache=new Map;sortedCache=new Map;constructor(e){this.logFn=e}get log(){return this.logFn?.()}clear(){this.events={},this.cache.clear(),this.sortedCache.clear()}on(e,t){this.events[e]||(this.events[e]={first:[],normal:[],last:[]});let n=typeof t==`function`?{callback:t}:t,r=this.events[e];return n.priority===`first`?r.first.push(n):n.priority===`last`?r.last.push(n):r.normal.push(n),this.invalidateCache(e),()=>{let t=this.events[e];if(t){for(let e of[`first`,`normal`,`last`])t[e]=t[e].filter(e=>e.callback!==n.callback);this.invalidateCache(e)}}}invalidateCache(e){this.cache.delete(e),this.cache.delete(`${e}:catch`),this.sortedCache.delete(e)}resolve(e){let t=this.sortedCache.get(e);if(t)return t;let n=this.events[e];if(!n)return[];let r=[...this.topoSort(n.first),...this.topoSort(n.normal),...this.topoSort(n.last)];return this.sortedCache.set(e,r),r}topoSort(e){if(e.length<=1||!e.some(e=>e.before&&e.before.length>0||e.after&&e.after.length>0))return e;let t=new Map,n=new Map;for(let r of e)t.set(r,0),n.set(r,new Set);let r=new Map;for(let t of e)if(t.caller){let e=r.get(t.caller);e||(e=[],r.set(t.caller,e)),e.push(t)}for(let i of e){if(i.after)for(let e of i.after){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(e).has(i)&&(n.get(e).add(i),t.set(i,t.get(i)+1))}if(i.before)for(let e of i.before){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(i).has(e)&&(n.get(i).add(e),t.set(e,t.get(e)+1))}}let i=[];for(let n of e)t.get(n)===0&&i.push(n);let a=[];for(;i.length>0;){let e=i.shift();a.push(e);for(let r of n.get(e)){let e=t.get(r)-1;t.set(r,e),e===0&&i.push(r)}}if(a.length!==e.length)throw new p(`Circular dependency detected in hook before/after constraints`);return a}compile(e,t={}){let n=this.resolve(e);if(n.length===0)return()=>{};let r=t.catch??!1,i=this.log,a=async(t,a)=>{for(let o=t;o<n.length;o++){let t=n[o];try{let n=t.callback(a);n&&typeof n==`object`&&`then`in n&&(r?await n.catch(n=>{i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n)}):await n)}catch(n){if(r)i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n);else throw n}}};return t=>{for(let o=0;o<n.length;o++){let s=n[o];try{let n=s.callback(t);if(n&&typeof n==`object`&&`then`in n)return r?n.catch(t=>{i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t)}).then(()=>a(o+1,t)):n.then(()=>a(o+1,t))}catch(t){if(r)i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t);else throw t}}}}async emit(e,t,n={}){if(!n.log){let r=n.catch?`${e}:catch`:e,i=this.cache.get(r);i||(i=this.compile(e,{catch:n.catch}),this.cache.set(r,i)),await i(t);return}let r=this.resolve(e);if(r.length===0)return;let i=performance.now();this.log?.trace(`${String(e)} ...`);for(let i of r){let r=i.caller?.name??`unknown`,a=performance.now();this.log?.trace(`${String(e)}(${r}) ...`);try{let e=i.callback(t);e&&typeof e==`object`&&`then`in e&&await e}catch(t){if(n.catch){this.log?.error(`${String(e)}(${r}) ERROR`,t);continue}throw new p(`Failed during '${String(e)}()' hook for service: ${r}`,{cause:t})}this.log?.debug(`${String(e)}(${r}) OK [${(performance.now()-a).toFixed(1)}ms]`)}this.log?.debug(`${String(e)} OK [${(performance.now()-i).toFixed(1)}ms]`)}},ak=e=>new ok(e),ok=class{options;get schema(){return this.options.schema}get key(){return this.options.name}constructor(e){this.options=e}};ak[u]=`atom`;var sk=class{als=D(E);events=D(ik);codec=D(A);atoms=new Map;store={};constructor(e={}){this.store=e}exportAtoms(e){let t={};if(e===`current`){if(this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key,`current`);n!==void 0&&(t[e.key]=n)}return t}for(let[n,r]of this.atoms.entries()){let i=this.get(r,e);i!==void 0&&(t[n]=i)}return t}getAtoms(e=!0){let t=[];if(e&&this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key);n!==void 0&&t.push({atom:e,value:n})}else for(let[e,n]of this.atoms.entries())t.push({atom:n,value:this.store[e]});return t}register(e){let t=e.key;return this.atoms.has(t)||(this.atoms.set(t,e),t in this.store||this.set(t,e.options.default,{skipContext:!0})),this}get(e,t){e instanceof ok&&this.register(e);let n=e instanceof ok?e.key:e,r=this.store;return t===`app`?r[n]:this.als?.exists()?this.als.get(n,t)??(t?void 0:r[n]):r[n]}set(e,t,n){e instanceof ok&&this.register(e);let r=e instanceof ok?e.key:e,i=this.store,a=this.get(r);return a===t&&typeof t!=`object`?this:(n?.skipContext!==!0&&this.als?.exists()?this.als.set(r,t):i[r]=t,n?.skipEvents!==!0&&this.events?.emit(`state:mutate`,{key:r,value:t,prevValue:a},{catch:!0}).catch(()=>null),this)}mut(e,t){let n=t(this.get(e));return this.set(e,n)}has(e){return this.als?.has(e)?!0:e in this.store}del(e){return this.set(e,void 0)}push(e,...t){let n=this.get(e)??[];return Array.isArray(n)&&this.set(e,[...n,...t]),this}clear(){return this.store={},this}keys(){return Object.keys(this.store)}},ck=class e{static create(t={}){typeof process==`object`&&(t.env={...t.env});let n=new e(t);if(n.isTest()){let e=globalThis,r=t[`alepha.test.beforeAll`]??e.beforeAll,i=t[`alepha.test.afterAll`]??e.afterAll,a=t[`alepha.test.afterEach`]??e.afterEach,o=t[`alepha.test.onTestFinished`]??e.onTestFinished;r?.(()=>n.start()),i?.(()=>n.stop());try{o?.(()=>n.stop())}catch{}n.store.set(`alepha.test.beforeAll`,r).set(`alepha.test.afterAll`,i).set(`alepha.test.afterEach`,a).set(`alepha.test.onTestFinished`,o)}else t[`alepha.logger`]??={trace:console.log,debug:console.debug,info:console.log,warn:console.warn,error:console.error};return n}locked=!1;configured=!1;started=!1;ready=!1;startPromise;startedAt=0;pendingInstantiations=[];cacheEnv=new Map;modules=[];substitutions=new Map;primitiveRegistry=new Map;registry=new Map;context;events;store;codec;get log(){return this.store.get(`alepha.logger`)}get env(){return this.store.get(`env`)??{}}constructor(e={}){this.store=this.inject(sk,{args:[e]}),this.events=this.inject(ik),this.events.logFn=()=>this.log,this.context=this.inject(E),this.codec=this.inject(rk)}fork(e,t={}){return this.context.run(e,t)}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t),this}isLocked(){return this.locked}isConfigured(){return this.configured}isStarted(){return this.started}isReady(){return this.ready}isCI(){return this.env.GITHUB_ACTIONS?!0:!!this.env.CI}isBrowser(){return typeof window<`u`}isViteDev(){return this.isBrowser()?!1:!!this.env.VITE_ALEPHA_DEV}isBun(){return`Bun`in globalThis}isServerless(){return this.isBrowser()?!1:!!(this.env.ALEPHA_SERVERLESS||this.env.VERCEL_REGION||typeof global==`object`&&typeof global.Cloudflare==`object`)}isTest(){return this.env.NODE_ENV===`test`}isProduction(){return this.env.NODE_ENV===`production`}static STARTUP_TIMEOUT=3e4;async start(){if(this.ready)return this.log?.debug(`App is already started, skipping...`),this;if(this.startPromise){let t=performance.now()-this.startedAt;if(t>e.STARTUP_TIMEOUT)this.log?.warn(`Previous start attempt is stale (${Math.round(t)}ms ago), resetting...`),this.resetStartup();else return this.log?.warn(`App is already starting, waiting for it to finish...`),this.startPromise}return this.startedAt=performance.now(),this.startPromise=this.boot(),this.startPromise}async boot(){let e=performance.now();this.log?.info(`Starting App...`);try{for(let[e]of this.substitutions.entries())this.inject(e);let t=this.store.get(`alepha.target`);if(t){this.store.set(`alepha.target`,void 0),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.events.clear(),delete t[d],this.with(t);for(let[e]of this.substitutions.entries())this.inject(e)}return this.locked=!0,await this.events.emit(`configure`,this,{log:!0}),this.configured=!0,await this.events.emit(`start`,this,{log:!0}),this.started=!0,await this.events.emit(`ready`,this,{log:!0}),this.log?.info(`App is now ready [${Math.round(performance.now()-e)}ms]`),this.ready=!0,this}catch(e){throw this.resetStartup(),e}}resetStartup(){this.startPromise=void 0,this.startedAt=0,this.locked=!1,this.configured=!1,this.started=!1,this.ready=!1}async stop(){this.started&&(this.log?.info(`Stopping App...`),await this.events.emit(`stop`,this,{log:!0}),this.log?.info(`App is now off`),this.started=!1,this.ready=!1,this.startPromise=void 0,this.startedAt=0)}async destroy(){await this.stop(),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.substitutions=new Map,this.cacheEnv=new Map,this.events.clear(),this.locked=!1,this.configured=!1}has(t,n={}){if(t===e)return!0;let{inStack:r=!0,inRegistry:i=!0,inSubstitutions:a=!0,registry:o=this.registry}=n,{provide:s}=typeof t==`object`&&`provide`in t?t:{provide:t};if(a&&this.substitutions.get(s)||i&&o.get(s))return!0;if(r){let e=this.substitutions.get(s)?.use;return e&&this.pendingInstantiations.includes(e)?!0:this.pendingInstantiations.includes(s)}return!1}with(e){if(this.store?.get(`alepha.target`))return this;let t=`default`in e?e.default:e;if(this.has(t,{inSubstitutions:!1,inRegistry:!1}))return this;if(typeof t==`object`){if(t.provide===t.use)return this.inject(t.provide),this;if(!this.substitutions.has(t.provide)&&!this.has(t.provide)){if(this.started)throw new h;d in t.provide&&typeof t.provide[d]==`function`&&(t.use[d]??=t.provide[d]),this.substitutions.set(t.provide,{use:t.use})}else if(!t.optional)throw new g(t.provide.name,t.use.name);return this}return this.inject(t),this}inject(t,n={}){let r=n.lifetime??`singleton`,i=n.parent===void 0?v?.parent??e:n.parent,a=r===`transient`,o=r===`scoped`?this.context.get(`registry`)??this.registry:this.registry;if(t===e)return this;if(typeof t==`string`){for(let[e,n]of o.entries())if(e.name===t)return n.instance;throw new p(`Service not found: ${t}`)}let s=this.substitutions.get(t);if(s)return this.inject(s.use,{parent:i,lifetime:r});let c=this.pendingInstantiations.indexOf(t);if(c!==-1&&!a)throw new m(t.name,this.pendingInstantiations.slice(0,c).map(e=>e.name));if(!a){let e=o.get(t);if(e)return!e.parents.includes(i)&&i!==t&&e.parents.push(i),e.instance;if(this.started){let e=t[d]?.name;throw new h(`Container is locked. No more services can be added. Attempted to inject '${t.name}' from '${i?.name}'. ${e?`Module '${e}' is not registered ?`:``}`)}}let l=t[d];if(l&&typeof l==`function`&&this.with(l),this.has(t,{registry:o})&&!a)return this.inject(t,{parent:i,lifetime:r});let u=this.new(t,n.args),f={parents:[i],instance:u};if(a||o.set(t,f),u instanceof w){this.modules.push(u);let e=v.parent;v.parent=u.constructor,u.register(this),v.parent=e}return u}parseEnv(e){if(this.cacheEnv.has(e))return this.cacheEnv.get(e);let t=this.codec.validate(e,this.env),n=Object.keys(t).sort((e,t)=>t.length-e.length),r=!0;for(let e=0;r&&e<10;e++){r=!1;for(let e in t)if(typeof t[e]==`string`)for(let i of n){let n=t[e];t[e]=n.replaceAll(`$${i}`,String(t[i]??``)),t[e]!==n&&(r=!0)}}return this.cacheEnv.set(e,t),t}getEnvSchemas(){let e=[];for(let[t,n]of this.cacheEnv.entries())e.push({schema:t,values:n});return e}graph(){for(let[e]of this.substitutions.entries())this.has(e)||this.inject(e);let e={};for(let[t,{parents:n}]of this.registry.entries()){if(t.name===``||w.is(t))continue;e[t.name]={from:n.filter(e=>!!e).map(e=>e.name)};let r=this.substitutions.entries().filter(e=>e[1].use===t).map(e=>e[0].name).toArray();r.length&&(e[t.name].as=r);let i=w.of(t);i&&(e[t.name].module=i.name)}return e}dump(){let e={};for(let[t]of this.cacheEnv.entries()){let n=t;for(let[t,r]of Object.entries(n.properties)){let i=r;e[t]={description:i.description,default:i.default,required:n.required?.includes(t)??void 0,enum:i.enum?[...i.enum]:void 0}}}return{env:e,providers:this.graph()}}services(e){let t=[];for(let[n,r]of this.registry.entries())r.instance instanceof e&&t.push(r.instance);return t}primitives(e){if(typeof e==`string`){let t=e.toLowerCase().replace(`$`,``),n=`${t}primitive`;for(let[e,r]of this.primitiveRegistry.entries()){let i=e.name.toLowerCase();if(i===t||i===n)return r}return[]}return this.primitiveRegistry.get(e[u])??[]}new(e,t=[]){this.pendingInstantiations.push(e),v.alepha=this,v.service=e;let n=S(e)?new e(...t):e(...t)??{},r=n;for(let[e,t]of Object.entries(r))if(t instanceof b&&this.processPrimitive(t,e),typeof t==`object`&&t&&typeof t[f]==`object`&&`getter`in t[f]){let n=t[f].getter;Object.defineProperty(r,e,{get:()=>this.store.get(n)})}return this.pendingInstantiations.pop(),this.pendingInstantiations.length===0&&(v.alepha=void 0),v.service=this.pendingInstantiations[this.pendingInstantiations.length-1],n}processPrimitive(e,t=``){e.config.propertyKey=t,e.onInit();let n=e.constructor,r=this.primitiveRegistry.get(n);r?r.push(e):this.primitiveRegistry.set(n,[e])}};function lk(e){if(e.const!==void 0)return G.const(e.const);if(e.enum&&Array.isArray(e.enum))return e.enum.every(e=>typeof e==`string`)?G.enum(e.enum,uk({title:e.title,description:e.description,default:e.default})):G.union(e.enum.map(e=>G.const(e)));if(e.anyOf&&Array.isArray(e.anyOf)){let t=e.anyOf.find(e=>e.type===`null`),n=e.anyOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=lk(n[0]);return G.nullable(e)}return G.union(e.anyOf.map(e=>lk(e)))}if(e.allOf&&Array.isArray(e.allOf)){let t=e.allOf.find(e=>e.type===`null`),n=e.allOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=lk(n[0]);return G.nullable(e)}if(n.length>0)return lk(n[0])}if(e.oneOf&&Array.isArray(e.oneOf)){let t=e.oneOf.find(e=>e.type===`null`),n=e.oneOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=lk(n[0]);return G.nullable(e)}return G.union(e.oneOf.map(e=>lk(e)))}switch(Array.isArray(e.type)?e.type[0]:e.type){case`string`:return dk(e);case`number`:return fk(e);case`integer`:return pk(e);case`boolean`:return mk(e);case`null`:return G.null();case`object`:return hk(e);case`array`:return gk(e);default:return e.properties?hk(e):G.any()}}function uk(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0))}function dk(e){let t=uk({title:e.title,description:e.description,default:e.default,minLength:e.minLength,maxLength:e.maxLength,pattern:e.pattern}),n=e[`~options`]?{...t,"~options":e[`~options`]}:t;switch(e.format){case`email`:return G.email(n);case`uuid`:return G.uuid(n);case`date-time`:return G.datetime(n);case`date`:return G.date(n);case`time`:return G.time(n);case`url`:case`uri`:return G.url(n);case`binary`:return G.binary(n);case`bigint`:return G.bigint(n);case`duration`:return G.duration(n);case`color`:return G.text({...n,format:`color`});case`e164`:return G.e164(n);case`bcp47`:return G.bcp47(n);default:return e.format?G.string({...n,format:e.format}):G.string(n)}}function fk(e){return G.number(uk({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function pk(e){return G.integer(uk({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function mk(e){return G.boolean(uk({title:e.title,description:e.description,default:e.default}))}function hk(e){if(!e.properties)return G.json(uk({title:e.title,description:e.description}));let t=new Set(e.required??[]),n={};for(let[r,i]of Object.entries(e.properties)){let e=lk(i);t.has(r)||(e=G.optional(e)),n[r]=e}return G.object(n,uk({title:e.title,description:e.description}))}function gk(e){let t=e.items?lk(e.items):G.any();return G.array(t,uk({title:e.title,description:e.description,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems}))}function _k(e){let t=x(vk,e);return Object.setPrototypeOf((...e)=>t.run(...e),t)}var vk=class extends b{handler=new yk(this.options.handler,this.options.use);get middlewares(){return(this.options.use??[]).map(e=>e[f])}run(...e){return this.handler.run(...e)}},yk=class{fn;middlewares;constructor(e,t){this.fn=e,this.middlewares=t??[]}wrapped;use(...e){this.middlewares.unshift(...e),this.wrapped=void 0}run(...e){if(!this.wrapped){this.wrapped=this.fn;for(let e=this.middlewares.length-1;e>=0;e--)this.wrapped=this.middlewares[e](this.wrapped)}return this.wrapped(...e)}};_k[u]=vk;var bk=e=>{let{alepha:t}=y();t.store.register(e);let n=t.store.get(e.key);return{[f]:{getter:e.key},...n}};G.object({page:G.optional(G.integer({description:`The page number to retrieve.`,minimum:0,default:0})),size:G.optional(G.integer({description:`The number of items per page.`,minimum:1,maximum:100,default:10})),sort:G.optional(G.text({description:`Sort by field(s). Multiple columns separated by comma. Prefix with '-' for DESC. Examples: 'name' (ASC), '-createdAt' (DESC), 'role,-name' (role ASC, name DESC)`}))});var xk=G.object({number:G.integer({description:`Page number, starting from 0`}),size:G.integer({description:`Number of items per page (requested page size)`}),offset:G.integer({description:`Offset in the dataset (page × size)`}),numberOfElements:G.integer({description:`Number of elements in THIS page (content.length). Different from totalElements which is the total across all pages.`}),totalElements:G.optional(G.integer({description:`Total number of elements across all pages. Only available when counting is enabled.`})),totalPages:G.optional(G.integer({description:"Total number of pages. Only available when `totalElements` is present."})),isEmpty:G.boolean({description:`Indicates if the current page has no items (numberOfElements === 0)`}),isFirst:G.boolean({description:`Indicates if this is the first page (number === 0)`}),isLast:G.boolean({description:`Indicates if this is the last page (no more pages after this)`}),sort:G.optional(G.object({sorted:G.boolean({description:`Whether the results are sorted`}),fields:G.array(G.object({field:G.text({description:`The field used for sorting`}),direction:G.enum([`asc`,`desc`],{description:`The direction of the sort. Either 'asc' or 'desc'`})}))}))}),Sk=(e,t)=>G.object({content:G.array(e),page:xk},t);ZO.prototype.page=e=>Sk(e);var Ck=(e,t)=>{let n=e instanceof ck?e:ck.create({env:{...t?.env}});if(!(e instanceof ck)){let t=Array.isArray(e)?e:[e];for(let e of t)n.with(e)}return(async()=>{try{await t?.configure?.(n),await n.start(),t?.ready&&await t.ready(n)}catch(e){n.log?.error(`Alepha failed to start`,e)}})(),window.alepha=n,n},wk=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ne={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),Tk=o(((e,t)=>{t.exports=wk()})),K=l(Tk(),1),Ek=e=>{let[t,n]=(0,K.useState)(!1);return(0,K.useEffect)(()=>n(!0),[]),e.disabled||t?e.children:e.fallback},Dk=class extends K.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return this.state.error?this.props.fallback(this.state.error,()=>{this.setState({error:void 0})}):this.props.children}},Ok=(0,K.createContext)(void 0),kk=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ak=o(((e,t)=>{t.exports=kk()})),q=Ak(),jk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),Mk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(o,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Nk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_utc=r()})(e,(function(){var e=`minute`,t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(e){return new i({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if(typeof r==`string`&&(r=function(e){e===void 0&&(e=``);var r=e.match(t);if(!r)return null;var i=(``+r[0]).match(n)||[`-`,0,0],a=i[0],o=60*i[1]+ +i[2];return o===0?0:a===`+`?o:-o}(r),r===null))return this;var o=Math.abs(r)<=16?60*r:r;if(o===0)return this.utc(i);var s=this.clone();if(i)return s.$offset=o,s.$u=!1,s;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(o+c,e)).$offset=o,s.$x.$localOffset=c,s};var u=o.format;o.format=function(e){var t=e||(this.$u?`YYYY-MM-DDTHH:mm:ss[Z]`:``);return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return e===`s`&&this.$offset?a(this.format(`YYYY-MM-DD HH:mm:ss:SSS`)).toDate():d.call(this)};var f=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=a(e).local();return f.call(r,i,t,n)}}}))})),Pk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_timezone=r()})(e,(function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var a,o=function(e,n,r){r===void 0&&(r={});var i=new Date(e);return function(e,n){n===void 0&&(n={});var r=n.timeZoneName||`short`,i=e+`|`+r,a=t[i];return a||(a=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:r}),t[i]=a),a}(n,r).formatToParts(i)},s=function(t,n){for(var r=o(t,n),a=[],s=0;s<r.length;s+=1){var c=r[s],l=c.type,u=c.value,d=e[l];d>=0&&(a[d]=parseInt(u,10))}var f=a[3],p=f===24?0:f,m=a[0]+`-`+a[1]+`-`+a[2]+` `+p+`:`+a[4]+`:`+a[5]+`:000`,h=+t;return(i.utc(m).valueOf()-(h-=h%1e3))/6e4},c=r.prototype;c.tz=function(e,t){e===void 0&&(e=a);var n,r=this.utcOffset(),o=this.toDate(),s=o.toLocaleString(`en-US`,{timeZone:e}),c=Math.round((o-new Date(s))/1e3/60),l=15*-Math.round(o.getTimezoneOffset()/15)-c;if(!Number(l))n=this.utcOffset(0,t);else if(n=i(s,{locale:this.$L}).$set(`millisecond`,this.$ms).utcOffset(l,!0),t){var u=n.utcOffset();n=n.add(r-u,`minute`)}return n.$x.$timezone=e,n},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return e.type.toLowerCase()===`timezonename`}));return n&&n.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format(`YYYY-MM-DD HH:mm:ss:SSS`),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,o=n||t||a,c=s(+i(),o);if(typeof e!=`string`)return i(e).tz(o);var l=function(e,t,n){var r=e-60*t*1e3,i=s(r,n);if(t===i)return[r,t];var a=s(r-=60*(i-t)*1e3,n);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,r).valueOf(),c,o),u=l[0],d=l[1],f=i(u).utcOffset(d);return f.$x.$timezone=o,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}))})),Fk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localizedFormat=r()})(e,(function(){var e={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(t,n,r){var i=n.prototype,a=i.format;r.en.formats=e,i.format=function(t){t===void 0&&(t=`YYYY-MM-DDTHH:mm:ssZ`);var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var a=i&&i.toUpperCase();return r||n[i]||e[i]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,n===void 0?{}:n);return a.call(this,r)}}}))})),Ik=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),Lk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(Ik()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ar=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r=`يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر`.split(`_`),i={1:`١`,2:`٢`,3:`٣`,4:`٤`,5:`٥`,6:`٦`,7:`٧`,8:`٨`,9:`٩`,0:`٠`},a={"١":`1`,"٢":`2`,"٣":`3`,"٤":`4`,"٥":`5`,"٦":`6`,"٧":`7`,"٨":`8`,"٩":`9`,"٠":`0`},o=/[١٢٣٤٥٦٧٨٩٠]/g,s=/،/g,c=/\d/g,l=/,/g,u={name:`ar`,weekdays:`الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت`.split(`_`),weekdaysShort:`أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت`.split(`_`),weekdaysMin:`ح_ن_ث_ر_خ_ج_س`.split(`_`),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?`م`:`ص`},relativeTime:{future:`بعد %s`,past:`منذ %s`,s:`ثانية واحدة`,m:`دقيقة واحدة`,mm:`%d دقائق`,h:`ساعة واحدة`,hh:`%d ساعات`,d:`يوم واحد`,dd:`%d أيام`,M:`شهر واحد`,MM:`%d أشهر`,y:`عام واحد`,yy:`%d أعوام`},preparse:function(e){return e.replace(o,(function(e){return a[e]})).replace(s,`,`)},postformat:function(e){return e.replace(c,(function(e){return i[e]})).replace(l,`،`)},ordinal:function(e){return e},formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`D/‏M/‏YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`}};return n.default.locale(u,null,!0),u}))})),Rk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(Ik()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_fr=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`fr`,weekdays:`dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi`.split(`_`),weekdaysShort:`dim._lun._mar._mer._jeu._ven._sam.`.split(`_`),weekdaysMin:`di_lu_ma_me_je_ve_sa`.split(`_`),months:`janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre`.split(`_`),monthsShort:`janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.`.split(`_`),weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD/MM/YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},relativeTime:{future:`dans %s`,past:`il y a %s`,s:`quelques secondes`,m:`une minute`,mm:`%d minutes`,h:`une heure`,hh:`%d heures`,d:`un jour`,dd:`%d jours`,M:`un mois`,MM:`%d mois`,y:`un an`,yy:`%d ans`},ordinal:function(e){return``+e+(e===1?`er`:``)}};return n.default.locale(r,null,!0),r}))})),zk=l(jk(),1),Bk=l(Mk(),1),Vk=l(Nk(),1),Hk=l(Pk(),1),Uk=l(Fk(),1);Lk(),Rk();var J=l(Ik(),1),Wk=J.default,Gk=class e{static PLUGINS=[Bk.default,zk.default,Vk.default,Hk.default,Uk.default];alepha=D(ck);ref=null;timeouts=[];intervals=[];constructor(){for(let t of e.PLUGINS)Wk.extend(t)}onStart=j({on:`start`,handler:async()=>{await Promise.all(this.intervals.map(async e=>{e.timer??=(await e.run(),setInterval(e.run,e.duration))}))}});onStop=j({on:`stop`,handler:()=>{for(let e of[...this.timeouts])this.clearTimeout(e);for(let e of this.intervals)clearInterval(e.timer),e.duration=0,e.timer=null}});setLocale(e){Wk.locale(e)}isDateTime(e){return Wk.isDayjs(e)}utc(e){return Wk.utc(e)}of(e){return Wk(e)}toISOString(e=this.now()){return this.of(e).toISOString()}now(){return this.getCurrentDate()}nowISOString(){return this.ref?this.ref.toISOString():new Date().toISOString()}nowMillis(){return this.ref?this.ref.valueOf():Date.now()}getCurrentDate(){return this.ref?this.ref:Wk()}duration=(e,t)=>Array.isArray(e)?Wk.duration(e[0],e[1]):typeof e==`number`?Wk.duration(e,t||`milliseconds`):e;isDurationLike(e){try{return Wk.isDuration(this.duration(e))}catch{return!1}}async tick(){await new Promise(e=>setTimeout(e,0))}wait(e,t={}){return new Promise(n=>{let r,i,a=this.createTimeout(()=>{t.signal&&r&&t.signal.removeEventListener(`abort`,i),n()},e,t.now);t.signal&&(r=()=>this.clearTimeout(a),i=()=>{r(),n()},t.signal.addEventListener(`abort`,i))})}createInterval(e,t,n=!1){let r={run:e,duration:this.duration(t).asMilliseconds()};return this.intervals.push(r),n&&(r.timer=setInterval(r.run,r.duration)),r}createTimeout(e,t,n){if(this.ref&&n)return this.of(n).add(this.duration(t))<this.now()&&e(),{now:n,duration:0,callback:()=>{},clear:()=>{}};let r={now:n??this.now().valueOf(),duration:this.duration(t).asMilliseconds(),callback:e,clear:()=>this.clearTimeout(r)};return r.timer=setTimeout(()=>{let e=this.timeouts.indexOf(r);e!==-1&&this.timeouts.splice(e,1),r.callback()},r.duration),this.timeouts.push(r),r}clearTimeout(e){clearTimeout(e.timer),e.duration=0,e.timer=null;let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1)}clearInterval(e){clearInterval(e.timer),e.duration=0,e.timer=null}async deadline(e,t){let n=new AbortController,r=this.createTimeout(()=>n.abort(),t);try{return await e(n.signal)}finally{this.clearTimeout(r)}}async travel(e,t){this.ref=this.ref||this.now();let n=this.duration(e,t).asMilliseconds(),r=this.nowMillis();this.ref=this.ref.add(this.duration(e,t));for(let e of[...this.timeouts]){if(!e.timer)continue;clearTimeout(e.timer),e.timer=null;let t=r-e.now;if(e.duration=e.duration-t-n,e.duration<=0){let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()}else e.timer=setTimeout(()=>{let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()},e.duration)}for(let e of this.intervals){if(!e.timer)continue;clearInterval(e.timer);let t=Math.floor(n/e.duration);for(let n=0;n<t;n++)await e.run();e.timer=null}await this.tick()}pause(){return this.ref=this.ref||this.now(),this.ref}reset(){this.ref=null}},Kk=e=>x(qk,e),qk=class extends b{dateTimeProvider=D(Gk);called=0;onInit(){this.dateTimeProvider.createInterval(async()=>{await this.options.handler(),this.called+=1},this.options.duration)}};Kk[u]=qk;var Jk=C({name:`alepha.datetime`,primitives:[Kk],services:[Gk]}),Yk=()=>{let e=(0,K.useContext)(Ok);if(!e)throw new p(`Hook 'useAlepha()' must be used within an AlephaContext.Provider`);return e},Xk=e=>{let t=Yk();return(0,K.useMemo)(()=>t.inject(e),[])};function Zk(e,t){let n=Yk(),r=Xk(Gk),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(),[c,l]=(0,K.useState)(),u=(0,K.useRef)(!1),d=(0,K.useRef)(void 0),f=(0,K.useRef)(void 0),p=(0,K.useRef)(!0),m=(0,K.useRef)(void 0);(0,K.useEffect)(()=>()=>{p.current=!1,d.current&&=(r.clearTimeout(d.current),void 0),m.current&&=(r.clearInterval(m.current),void 0),f.current&&=(f.current.abort(),void 0)},[]);let h=(0,K.useCallback)(async(...t)=>{if(u.current)return;f.current&&f.current.abort();let r=new AbortController;f.current=r,u.current=!0,a(!0),s(void 0),await n.events.emit(`react:action:begin`,{type:`custom`,id:e.id});try{let i=await e.handler(...t,{signal:r.signal});return!p.current||r.signal.aborted?void 0:(l(i),await n.events.emit(`react:action:success`,{type:`custom`,id:e.id}),e.onSuccess&&await e.onSuccess(i),i)}catch(t){if(t instanceof Error&&t.name===`AbortError`||!p.current)return;let r=t;if(s(r),await n.events.emit(`react:action:error`,{type:`custom`,id:e.id,error:r}),e.onError)await e.onError(r);else throw r}finally{u.current=!1,p.current&&a(!1),await n.events.emit(`react:action:end`,{type:`custom`,id:e.id}),f.current===r&&(f.current=void 0)}},[...t,e.id,e.onError,e.onSuccess]),g=(0,K.useCallback)(async(...t)=>e.debounce?(d.current&&r.clearTimeout(d.current),new Promise(n=>{d.current=r.createTimeout(async()=>{n(await h(...t))},e.debounce??0)})):h(...t),[h,e.debounce]),_=(0,K.useCallback)(()=>{d.current&&=(r.clearTimeout(d.current),void 0),f.current&&=(f.current.abort(),void 0),p.current&&(u.current=!1,a(!1))},[]);return(0,K.useEffect)(()=>{e.runOnInit&&g()},t),(0,K.useEffect)(()=>{if(e.runEvery)return m.current=r.createInterval(()=>g(),e.runEvery,!0),()=>{m.current&&=(r.clearInterval(m.current),void 0)}},[g,e.runEvery]),{run:g,loading:i,error:o,cancel:_,result:c}}var Qk=G.object({path:G.text({description:`Pathname used to access the action.`}),method:G.optional(G.text({description:`HTTP method. Omitted when GET (the default for ~75% of actions).`})),contentType:G.optional(G.text({description:`Content type for the request body. Only present for non-JSON types (e.g. 'multipart/form-data'). When absent, defaults to application/json.`})),kind:G.optional(G.text({description:`Action kind. Used to distinguish special action types (e.g. 'sse' for Server-Sent Events streams).`})),service:G.optional(G.text({description:`Service name associated with the action, used for service discovery and routing.`}))}),$k=G.object({prefix:G.optional(G.text()),actions:G.record(G.text(),Qk),permissions:G.optional(G.array(G.text()))}),eA=ak({name:`alepha.server.request.apiLinks`,schema:G.optional($k)}),tA=ak({name:`alepha.server.links.options`,description:`Configuration options for the links module.`,schema:G.object({batch:G.boolean({description:`Enable batch collection for browser-side calls.`,default:!0})}),default:{batch:!0}}),nA=class{},rA=class{},iA=class{alepha=D(ck);formatter=D(rA);destination=D(nA);dateTimeProvider=D(Gk);levels={SILENT:-1,ERROR:0,WARN:1,INFO:2,DEBUG:3,TRACE:4};service;module;app;appLogLevel=`INFO`;logLevel=`INFO`;constructor(e,t){this.service=e,this.module=t,this.app=this.alepha.env.APP_NAME}get context(){return this.alepha.context.get(`context`)}get level(){let e=this.alepha.store.get(`alepha.logger.level`);return e&&e!==this.appLogLevel&&(this.appLogLevel=e,this.logLevel=this.parseLevel(this.appLogLevel,this.module)),this.logLevel}parseLevel(e,t){let n=e.toLowerCase().split(/[,;]/);for(let e of n){let n=e.trim();if(n&&(n.includes(`:`)||n.includes(`=`))){let[e,r]=n.split(/[:=]/),i=e.trim(),a=r?.trim();if(!a)continue;if(this.matchesPattern(t,i))try{return this.asLogLevel(a)}catch{throw new p(`Invalid log level '${r?.trim()}' for module pattern '${i}'`)}}}for(let e of n){let t=e.trim();if(t&&!t.includes(`:`)&&!t.includes(`=`))try{return this.asLogLevel(t)}catch{throw new p(`Invalid global log level "${t}"`)}}return`INFO`}matchesPattern(e,t){if(t.includes(`*`)){let n=t.replace(/\./g,`\\.`).replace(/\*/g,`.*`);return RegExp(`^${n}`).test(e)}return e.startsWith(t)}asLogLevel(e){let t=e.trim().toUpperCase();if(this.levels[t]!==void 0)return t;throw new p(`Invalid log level: ${e}`)}error(e,t){this.log(`ERROR`,e,t)}warn(e,t){this.log(`WARN`,e,t)}info(e,t){this.log(`INFO`,e,t)}debug(e,t){this.log(`DEBUG`,e,t)}trace(e,t){this.log(`TRACE`,e,t)}log(e,t,n){let r=``;typeof t==`string`?r=t:typeof n==`string`&&(r=n);let i;typeof n==`object`&&n?i=n:typeof t==`object`&&t&&(i=t);let a={level:e,message:r,data:i,context:this.context,service:this.service,module:this.module,app:this.app,timestamp:this.dateTimeProvider.nowMillis()};if(this.levels[e]>this.levels[this.level]){this.emit(a);return}let o=this.formatter.format(a);this.emit(a,o),this.destination.write(o,a)}emit(e,t){this.alepha.events.emit(`log`,{message:t,entry:e},{catch:!0}).catch(()=>null)}},aA=(e={})=>{let{alepha:t,service:n,module:r}=y();return D(iA,{lifetime:`transient`,args:[e.name??n?.name??`Func`,r?.name??t.env.MODULE_NAME??`app`]})};aA[u]=iA;var oA=class e{static COLORS={RESET:`\x1B[0m`,BLACK:`\x1B[30m`,RED:`\x1B[31m`,GREEN:`\x1B[32m`,ORANGE:`\x1B[33m`,BLUE:`\x1B[34m`,PURPLE:`\x1B[35m`,CYAN:`\x1B[36m`,GREY_LIGHT:`\x1B[37m`,GREY_LIGHT_BOLD:`\x1B[1;37m`,GREY_DARK:`\x1B[90m`,GREY_DARK_BOLD:`\x1B[1;90m`,WHITE:`\x1B[97m`,WHITE_BOLD:`\x1B[1;97m`,DIM:`\x1B[2m`,BOLD:`\x1B[1m`,INVERSE:`\x1B[7m`,SILENT:``,ERROR:`\x1B[31m`,WARN:`\x1B[33m`,INFO:`\x1B[32m`,DEBUG:`\x1B[34m`,TRACE:`\x1B[90m`};alepha=D(ck);enabled=!0;constructor(){this.enabled=this.isEnabled()}isEnabled(){return this.alepha.env.NO_COLOR?!1:this.alepha.env.FORCE_COLOR?!0:this.alepha.isBrowser()&&!navigator.userAgent.includes(`Chrome`)?!1:!this.alepha.isProduction()}set(t,n,r=e.COLORS.RESET){return this.enabled?`${e.COLORS[t]}${n}${r}`:n}},sA=class extends nA{write(e){console.log(e)}},cA=class extends rA{format(e){let t={level:e.level,message:e.message,context:e.context,service:e.service,module:e.module,app:e.app,time:e.timestamp};return e.data instanceof Error?t.error=this.formatJsonError(e.data):t.data=e.data,JSON.stringify(t)}formatJsonError(e){return{name:e.name,message:e.message,stack:e.stack,cause:e.cause instanceof Error?this.formatJsonError(e.cause):void 0}}},lA=class extends nA{entries=[];options={maxEntries:1e4};write(e,t){this.entries.push({...t,formatted:e}),this.entries.length>this.options.maxEntries&&(this.entries=this.entries.slice(-Math.floor(this.options.maxEntries*.8)))}get logs(){return[...this.entries]}clear(){this.entries=[]}},uA=class extends rA{color=D(oA);alepha=D(ck);format(e){let{data:t,timestamp:n}=e,r=``,i=``,a=t instanceof Error;if(a)i=this.formatError(t);else if(t){let e=``,n=t;if(`error`in t&&t.error instanceof Error){e=this.formatError(t.error);let{error:r,...i}=t;n=i}if(Object.keys(n).length>0)try{i=JSON.stringify(n)}catch{i=`[Unserializable Object]`}e&&(i+=`\n${e}`)}r+=this.color.set(`GREY_DARK`,`[${this.formatTimestamp(n)}]`),r+=` `,r+=this.color.set(e.level,e.level.toUpperCase()),r+=` `,e.app&&(r+=this.color.set(`GREY_DARK`,`${e.app}`),r+=` `),e.context&&(r+=this.color.set(`GREY_DARK`,`(${this.formatContext(e.context)})`),r+=` `);let o=this.color.set(`GREY_LIGHT`,`${e.module}.`),s=this.color.set(this.alepha.isBrowser()?`RESET`:`WHITE`,e.service);return r+=`<${o}${s}>`,e.message?r+=`: ${this.color.set(`CYAN`,e.message)}`:r+=`:`,i&&(a?r+=` \n${i}`:r+=` ${this.color.set(`GREY_DARK`,i)}`),r}formatTimestamp(e){let t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),a=t.getMilliseconds();return`${this.pad2(n)}:${this.pad2(r)}:${this.pad2(i)}.${this.pad3(a)}`}pad2=e=>(e<10?`0`:``)+e;pad3=e=>e<10?`00${e}`:e<100?`0${e}`:`${e}`;formatContext(e){return this.alepha.isProduction()?e:e.slice(0,8)}formatError(e){if(this.alepha.isBrowser())return setTimeout(()=>{console.error(e)}),``;let t=this.alepha.store.get(`alepha.vite.server`);t?.ssrFixStacktrace(e);let n=e.stack??e.message,r=e.cause;for(;r&&r instanceof Error;)t?.ssrFixStacktrace(r),n+=`\nCaused by: ${r.stack??r.message}`,r=r.cause;return n}},dA=class extends rA{format(e){let t=``;if(t+=`${e.message}`,e.data instanceof Error){t+=`\n${e.data.message}`;let n=e.data.cause;for(;n instanceof Error;)t+=`\nCaused by: ${n.message}`,n=n.cause}return t}};G.object({level:G.enum([`SILENT`,`TRACE`,`DEBUG`,`INFO`,`WARN`,`ERROR`]),message:G.text({size:`rich`}),service:G.text(),module:G.text(),context:G.optional(G.text()),app:G.optional(G.text()),data:G.optional(G.any()),timestamp:G.number()}),C({name:`alepha.logger`,primitives:[aA],services:[iA,sA,lA,cA,uA,dA,oA],register:e=>{let t=e.parseEnv(fA),n=t.LOG_LEVEL,r=t.LOG_FORMAT;if(t.DEBUG){let e=t.DEBUG.split(`,`).map(e=>e.trim().replaceAll(`:`,`.`)).filter(Boolean);n??=`${e.map(e=>`${e}:debug`).join(`,`)},info`,r??=`pretty`}e.with({optional:!0,provide:nA,use:(()=>{if(e.isTest()&&!n){let t=t=>{if(t.task?.result?.state===`fail`){let t=e.inject(lA);for(let e of t.logs)console.log(e.formatted)}};try{e.store.get(`alepha.test.afterEach`)?.(t),e.store.get(`alepha.test.onTestFinished`)?.(t)}catch{}return lA}return sA})()}),e.with({optional:!0,provide:rA,use:r?r===`json`?cA:r===`raw`?dA:uA:e.isProduction()&&!e.isBrowser()?cA:uA}),e.store.set(`alepha.logger`,e.inject(iA,{lifetime:`transient`,args:[`Alepha`,`alepha.core`]})),e.store.set(`alepha.logger.level`,n??(e.isTest()?`trace`:`info`))}});var fA=G.object({DEBUG:G.optional(G.text({description:`Enable debug logging for specific modules using the debug package convention. Example: DEBUG=alepha:*`})),LOG_LEVEL:G.optional(G.text({description:`Application log level on startup.
11
- Levels are: trace, debug, info, warn, error, silent
12
- Level can be set for a specific module:
13
- "my.module.name:debug,info" -> Set debug level for my.module.name and info for all other modules
14
- "alepha:trace,info" -> Set trace level for all alepha modules and info for all other modules`,lowercase:!0})),LOG_FORMAT:G.optional(G.enum([`json`,`pretty`,`raw`],{description:`Default log format for the application.`,lowercase:!0}))}),pA=class extends p{},mA=class{encoder=new TextEncoder;decoder=new TextDecoder;codes={BINARY:1,JSON:2,STRING:3,COMPRESSED:4};async setTyped(e,t,n,r){let i=this.serialize(n);r?.compress&&(i=await this.compress(i)),await this.set(e,t,i,r?.ttl)}async getTyped(e,t){let n=await this.get(e,t);if(n){if(n[0]===this.codes.COMPRESSED){let e=await this.decompress(n.subarray(1));return this.deserialize(e)}return this.deserialize(n)}}async invalidateKeys(e,t){let n=[];for(let r of t)if(r.endsWith(`*`)){let t=await this.keys(e,r.slice(0,-1));n.push(...t)}else n.push(r);await this.del(e,...n)}serialize(e){if(e instanceof Uint8Array){let t=new Uint8Array(1+e.length);return t[0]=this.codes.BINARY,t.set(e,1),t}let t=this.encoder.encode(typeof e==`string`?e:JSON.stringify(e)),n=typeof e==`string`?this.codes.STRING:this.codes.JSON,r=new Uint8Array(1+t.length);return r[0]=n,r.set(t,1),r}deserialize(e){let t=e[0],n=e.slice(1);if(t===this.codes.BINARY)return n;if(t===this.codes.JSON)return JSON.parse(this.decoder.decode(n));if(t===this.codes.STRING)return this.decoder.decode(n);throw new pA(`Unknown serialization type: ${t}`)}async compress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),n=new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new CompressionStream(`gzip`))).arrayBuffer()),r=new Uint8Array(1+n.length);return r[0]=this.codes.COMPRESSED,r.set(n,1),r}async decompress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new DecompressionStream(`gzip`))).arrayBuffer())}},hA=class extends mA{dateTimeProvider=D(Gk);log=aA();store={};getCalls=[];setCalls=[];delCalls=[];_stats={hits:0,misses:0,sets:0,deletes:0};getError=null;setError=null;delError=null;constructor(e={}){super(),this.getError=e.getError??null,this.setError=e.setError??null,this.delError=e.delError??null}async get(e,t){if(this.getCalls.push({name:e,key:t,timestamp:this.dateTimeProvider.nowMillis()}),this.getError)throw this.getError;let n=this.store[e]?.[t]?.data;return n===void 0?this._stats.misses++:this._stats.hits++,n}async set(e,t,n,r){if(this.setCalls.push({name:e,key:t,value:n,ttl:r,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.sets++,this.setError)throw this.setError;return this.store[e]??(this.store[e]={}),this.store[e][t]??={},this.store[e][t].data=n,this.log.debug(`Setting cache for name`,{name:e,key:t,ttl:r}),this.store[e][t].timeout&&(this.dateTimeProvider.clearTimeout(this.store[e][t].timeout),this.store[e][t].timeout=void 0),r&&(this.store[e][t].timeout=this.dateTimeProvider.createTimeout(()=>this.del(e,t),r)),this.store[e][t].data}async del(e,...t){if(this.delCalls.push({name:e,keys:t,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.deletes++,this.delError)throw this.delError;if(t.length===0){if(this.log.debug(`Deleting all cache for name`,{name:e}),this.store[e])for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}delete this.store[e];return}this.log.debug(`Deleting cache for name`,{name:e,keys:t});for(let n of t){if(this.store[e]==null)break;let t=this.store[e][n]?.timeout;t&&this.dateTimeProvider.clearTimeout(t),delete this.store[e][n]}Object.keys(this.store[e]??{}).length===0&&delete this.store[e]}async has(e,t){return this.store[e]?.[t]?.data!=null}async keys(e,t){let n=this.store[e]??{},r=Object.keys(n);return t?r.filter(e=>e.startsWith(t)):r}async clear(){this.log.debug(`Clearing all cache`);for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={}}async incr(e,t,n){this.store[e]??(this.store[e]={});let r=this.store[e][t]?.data,i=0;if(r)try{i=this.deserialize(r)}catch{let e=new TextDecoder().decode(r);i=Number.parseInt(e,10)||0}let a=i+n;return this.store[e][t]??={},this.store[e][t].data=this.serialize(a),a}stats(){return{...this._stats}}wasSet(e,t){return t===void 0?this.setCalls.some(t=>t.name===e):this.setCalls.some(n=>n.name===e&&n.key===t)}wasGet(e,t){return t===void 0?this.getCalls.some(t=>t.name===e):this.getCalls.some(n=>n.name===e&&n.key===t)}wasDeleted(e,t){return t===void 0?this.delCalls.some(t=>t.name===e):this.delCalls.some(n=>n.name===e&&n.keys.includes(t))}size(e){return e===void 0?Object.values(this.store).reduce((e,t)=>e+Object.keys(t).length,0):Object.keys(this.store[e]??{}).length}names(){return Object.keys(this.store)}reset(){for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={},this.getCalls=[],this.setCalls=[],this.delCalls=[],this._stats={hits:0,misses:0,sets:0,deletes:0},this.getError=null,this.setError=null,this.delError=null}};function gA(e={}){let t=x(vA,e);if(e.handler)return Object.setPrototypeOf((...e)=>t.run(...e),t);let n=e=>(async(...n)=>{let r=t.key(...n),i=await t.get(r);if(i!==void 0)return i;let a=await e(...n);return t.set(r,a).catch(()=>{}),a});return n[f]={name:`$cache`,options:e},Object.setPrototypeOf(n,t)}var _A=ak({name:`alepha.cache.options`,schema:G.object({enabled:G.boolean({default:!0,description:`Whether caching is enabled.`}),defaultTtl:G.number({default:300,description:`Default time to live for cache entries in seconds.`})}),default:{enabled:!0,defaultTtl:300}}),vA=class extends b{settings=bk(_A);dateTimeProvider=D(Gk);provider=this.$provider();get container(){return this.options.name??`${this.config.service.name}:${this.config.propertyKey}`}async run(...e){let t=this.options.handler;if(!t)throw new p(`Cache handler is not defined.`);let n=this.key(...e),r=await this.get(n);if(r!==void 0)return r;let i=await t(...e);return await this.set(n,i),i}key(...e){return this.options.key?this.options.key(...e):JSON.stringify(e)}async incr(e,t=1){return this.provider.incr(this.container,e,t)}async invalidate(...e){await this.provider.invalidateKeys(this.container,e)}async set(e,t,n){if(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled)return;let r=this.dateTimeProvider.duration(n??this.options.ttl??[this.settings.defaultTtl,`seconds`]).as(`milliseconds`);await this.provider.setTyped(this.container,e,t,{ttl:r>0?r:void 0,compress:this.options.compress})}async get(e){if(!(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled))return this.provider.getTyped(this.container,e)}$provider(){return this.options.provider?this.options.provider===`memory`?this.alepha.inject(hA):this.alepha.inject(this.options.provider):this.alepha.inject(mA)}};gA[u]=vA,C({name:`alepha.cache`,primitives:[gA],services:[mA,hA],register:e=>e.with({optional:!0,provide:mA,use:hA})});var yA=(e,t)=>e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&`status`in e&&typeof e.status==`number`?t?e.status===t:!0:!1,bA=class extends p{name=`HttpError`;static is=yA;static toJSON(e){let t={error:e.error,status:e.status,message:e.message};return e.details&&(t.details=e.details),e.requestId&&(t.requestId=e.requestId),e.reason&&(t.cause=e.reason),t}error;status;requestId;details;reason;constructor(e,t){super(e.message,{cause:t}),this.status=e.status??500,this.details=e.details,this.requestId=e.requestId,typeof e.cause==`object`?this.reason={name:e.cause.name,message:e.cause.message}:t instanceof Error&&(this.reason={name:t.name,message:t.message}),this.constructor.name===`HttpError`?this.error=e.error??xA[this.status]??`HttpError`:this.error=this.constructor.name}},xA={400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,405:`MethodNotAllowedError`,409:`ConflictError`,410:`GoneError`,413:`PayloadTooLargeError`,415:`UnsupportedMediaTypeError`,429:`TooManyRequestsError`,500:`InternalServerError`,501:`NotImplementedError`,502:`BadGatewayError`,503:`ServiceUnavailableError`,504:`GatewayTimeoutError`},SA=e=>{if(e.contentType===`multipart/form-data`||e.requestBodyType===`multipart/form-data`)return!0;if(e.schema?.body&&`properties`in e.schema.body){let t=e.schema.body.properties;for(let e in t)if(t[e].format===`binary`)return!0}return!1},CA=G.object({error:G.text({description:`HTTP error name`}),status:G.integer({description:`HTTP status code`}),message:G.text({description:`Short text which describe the error`,size:`rich`}),details:G.optional(G.text({description:`Detailed description of the error`,size:`rich`})),requestId:G.optional(G.text()),cause:G.optional(G.object({name:G.text(),message:G.text({description:`Cause Error message`,size:`rich`})}))},{title:`HttpError`,description:`Generic response after a failed operation`}),wA=class{log=aA();alepha=D(ck);cache=gA({provider:`memory`,name:`http:client`});pendingRequests={};async fetchAction(e){let t=e.action,n=e.options??{},r=e.config??{},i=e.host??``,a={...n.request},o=t.method,s={},c=this.url(i,t,r);return await this.alepha.events.emit(`client:onRequest`,{route:t,config:r,options:n,headers:s,request:a}),a.method??=o,await this.body(a,s,t,r),a.headers={...r.headers,...Object.fromEntries(new Headers(a.headers).entries()),...s},await this.fetch(c,{...a,schema:t.schema,...n})}async fetch(e,t={}){let n={cache:t.localCache,schema:t.schema?.response,key:t.key};t.method??=`GET`,this.log.trace(`Request`,{url:e,method:t.method,body:t.body,headers:t.headers,options:n});let r=await this.cache.get(e);if(r&&t.method===`GET`)if(r.etag)t.headers=new Headers(t.headers),t.headers.has(`if-none-match`)||t.headers.set(`if-none-match`,r.etag);else return{data:r.data,status:200,statusText:`OK`,headers:new Headers};await this.alepha.events.emit(`client:beforeFetch`,{url:e,options:n,request:t});let i=t.method===`GET`||t.method===`HEAD`||t.method===`OPTIONS`,a=n.key??(i?JSON.stringify({url:e,method:t.method}):void 0);if(a){let e=this.pendingRequests[a];if(e)return this.log.info(`Request already pending`,a),e}let o=fetch(e,t).then(async r=>{this.log.debug(`Response`,{url:e,status:r.status});let i={data:await this.responseData(r,n),status:r.status,statusText:r.statusText,headers:r.headers,raw:r};if(t.method===`GET`){if(n.cache)await this.cache.set(e,{data:i.data},typeof n.cache==`boolean`?void 0:n.cache);else if(!this.alepha.isBrowser()){let t=r.headers.get(`etag`)??void 0;t&&await this.cache.set(e,{data:i.data,etag:t})}}return i}).finally(()=>{a&&delete this.pendingRequests[a]});return a&&(this.pendingRequests[a]=o),o}url(e,t,n){let r=e;return t.prefix&&(r+=t.prefix),r+=t.path,r=this.pathVariables(r,t,n),r=this.queryParams(r,t,n),r}async body(e,t,n,r={}){if(typeof e.headers==`object`&&`content-type`in e.headers&&e.headers[`content-type`]===`multipart/form-data`||SA(n)){typeof e.headers==`object`&&`content-type`in e.headers&&delete e.headers[`content-type`];let t=new FormData;for(let[e,n]of Object.entries(r.body??{})){if(typeof n==`string`){t.append(e,n);continue}if(n instanceof Blob){t.append(e,n);continue}YO(n)&&t.append(e,new File([await n.arrayBuffer()],n.name,{type:n.type}))}e.body=t;return}!e.body&&n.schema?.body&&(t[`content-type`]=`application/json`,e.body=this.alepha.codec.encode(n.schema?.body,r.body,{as:`string`}))}async responseData(e,t){if(e.status===304){let t=e.url;typeof window<`u`&&(t=t.replace(window.location.origin,``));let n=await this.cache.get(t);return n?n.data:``}if(e.status!==204){if(this.isMaybeFile(e))return this.createFileLike(e);if(e.headers.get(`Content-Type`)?.startsWith(`text/`))return await e.text();if(e.headers.get(`Content-Type`)===`application/json`){let n=await e.json();if(e.status>=400){let e=new bA(this.alepha.codec.decode(CA,n));throw await this.alepha.events.emit(`client:onError`,{error:e}),e}return t.schema?this.alepha.codec.decode(t.schema,n):n}if(e.status>=400){let t=new bA({status:e.status,message:`An error occurred while fetching the resource. (${e.statusText})`});throw await this.alepha.events.emit(`client:onError`,{error:t}),t}return e}}isMaybeFile(e){let t=e.headers.get(`Content-Type`);return t?e.headers.get(`Content-Disposition`)?.includes(`attachment`)?!0:t.startsWith(`application/octet-stream`)||t.startsWith(`application/pdf`)||t.startsWith(`application/zip`)||t.startsWith(`image/`)||t.startsWith(`video/`)||t.startsWith(`audio/`):!1}createFileLike(e,t=``){let n=(e.headers.get(`Content-Disposition`)??``).match(/filename="(.+)"/);return{name:n?.[1]?n[1]:t,type:e.headers.get(`Content-Type`)??`application/octet-stream`,size:Number(e.headers.get(`Content-Length`)??0),lastModified:Date.now(),stream:()=>{throw new p(`Not implemented`)},arrayBuffer:async()=>await e.arrayBuffer(),text:async()=>await e.text()}}pathVariables(e,t,n={}){if(typeof n.params==`object`){let r=t.schema?.params?this.alepha.codec.decode(t.schema.params,n.params):n.params;for(let t of Object.keys(r))e=e.replace(`:${t}`,r[t]),e=e.replace(`{${t}}`,r[t])}return e}queryParams(e,t,n={}){if(typeof n.query==`object`){let r=t.schema?.query?this.alepha.codec.decode(t.schema.query,n.query??{}):n.query;for(let e of Object.keys(r))r[e]===void 0&&delete r[e],typeof r[e]==`object`&&(r[e]=JSON.stringify(r[e]));let i=new URLSearchParams(r).toString();return i?`${e}?${i}`:e}return e}},TA=class extends bA{constructor(e=`No permission to access this resource`,t){super({message:e,status:403},t)}},EA=class extends bA{name=`UnauthorizedError`;constructor(e=`Not allowed to access this resource`,t){super({message:e,status:401},t)}},DA=class{headers={};status;body;redirect(e,t=302){this.status=t,this.headers.location=e}setStatus(e){return this.status=e,this}setHeader(e,t){return this.headers[e.toLowerCase()]=t,this}setBody(e){return this.body=e,this}};G.object({ok:G.boolean({description:`True when operation succeed`}),id:G.optional(G.union([G.text(),G.integer()])),count:G.optional(G.number({description:`Number of resources affected`}))},{title:`Ok`,description:`Generic response after a successful operation on a resource`});var OA=C({name:`alepha.server`,primitives:[],services:[wA]}),kA=class e{static MAX_BATCH_SIZE=20;log=aA();httpClient=D(wA);pending=[];scheduled=!1;add(e){return new Promise((t,n)=>{this.pending.push({entry:e,resolve:t,reject:n}),this.scheduled||(this.scheduled=!0,setTimeout(()=>{this.scheduled=!1,this.flush().catch(e=>this.log.error(e))},10))})}async flush(){let t=this.pending.splice(0);if(t.length===0)return;if(t.length===1){let e=t[0];try{let t=await e.entry.directCall();e.resolve(t)}catch(t){e.reject(t)}return}let{unique:n,indexMap:r}=this.dedupe(t),i=this.chunk(n,e.MAX_BATCH_SIZE);try{let e=(await Promise.all(i.map(e=>{let t=[...new Set(e.map(e=>e.entry.action))].join(`,`);return this.httpClient.fetch(`/api/_batch?actions=${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e.map(e=>({action:e.entry.action,params:e.entry.params,query:e.entry.query,body:e.entry.body})))}).then(e=>e.data)}))).flat();for(let n=0;n<t.length;n++){let i=e[r[n]];i.status>=400?t[n].reject(new bA({message:i.error??`${i.action} failed (${i.status})`,status:i.status})):t[n].resolve(i.data)}}catch(e){for(let n of t)n.reject(e)}}dedupe(e){let t=new Map,n=[],r=[];for(let i of e){let e=`${i.entry.action}:${JSON.stringify({params:i.entry.params,query:i.entry.query,body:i.entry.body})}`,a=t.get(e);if(a!==void 0)r.push(a);else{let a=n.length;t.set(e,a),n.push(i),r.push(a)}}return{unique:n,indexMap:r}}chunk(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}},AA=class e{static path={apiLinks:`/api/_links`};log=aA();alepha=D(ck);httpClient=D(wA);serverLinkMap=new Map;actionMap=new Map;permissions=new Set;lastLoadedRegistry=null;batchCollector;options=bk(tA);getServerLinks(){return this.alepha.isBrowser()?(this.log.warn("Getting server links in the browser is not supported. Use `fetchLinks` to get links from the server."),[]):[...this.serverLinkMap.values()]}registerLink(e){if(this.alepha.isBrowser()){this.log.warn("Registering links in the browser is not supported. Use `fetchLinks` to get links from the server.");return}if(!e.handler&&!e.host)throw new p(`Can't create link - 'handler' or 'host' is required`);if(this.serverLinkMap.get(e.name)?.handler&&e.handler)throw new p(`Duplicate action name "${e.name}". Each action must have a unique name.`);this.serverLinkMap.set(e.name,e)}loadRegistry(e){this.lastLoadedRegistry=e,this.permissions.clear(),this.actionMap.clear();for(let[t,n]of Object.entries(e.actions))this.actionMap.set(t,{name:t,path:n.path,kind:n.kind,method:n.method,contentType:n.contentType,service:n.service});if(e.permissions)for(let t of e.permissions)this.permissions.add(t)}get links(){let e=this.alepha.store.get(`alepha.server.request.apiLinks`);if(e){if(this.alepha.isBrowser())return(this.actionMap.size===0||e!==this.lastLoadedRegistry)&&this.loadRegistry(e),[...this.actionMap.values()];let t=[];for(let n of Object.keys(e.actions)){let e=this.serverLinkMap.get(n);e&&t.push(e)}return t}return[...this.serverLinkMap.values()]}async fetchLinks(){let{data:t}=await this.httpClient.fetch(`${e.path.apiLinks}`,{method:`GET`,schema:{response:$k}});return this.alepha.store.set(`alepha.server.request.apiLinks`,t),this.loadRegistry(t),[...this.actionMap.values()]}client(e={}){return new Proxy({},{get:(t,n)=>{if(typeof n==`string`)return this.createVirtualAction(n,e)}})}can(e){if(this.actionMap.size>0){if(this.actionMap.has(e))return!0}else if(this.serverLinkMap.has(e)||this.links.some(t=>t.name===e))return!0;if(e.includes(`:`)){if(e.endsWith(`*`)){let t=e.slice(0,-1);for(let e of this.permissions)if(e.startsWith(t))return!0;return!1}return this.permissions.has(e)}return!1}async follow(e,t={},n={}){this.log.trace(`Following link`,{name:e,config:t,options:n});let r=await this.getLinkByName(e,n);return r.handler&&!n.request?(this.log.trace(`Local link found`,{name:e}),r.handler({method:r.method,url:new URL(`http://localhost${r.path}`),query:t.query??{},body:t.body??{},params:t.params??{},headers:t.headers??{},metadata:{},reply:new DA},n)):(this.log.trace(`Remote link found`,{name:e,host:r.host,service:r.service}),this.options.batch&&this.alepha.isBrowser()&&!r.host?(this.batchCollector??=this.alepha.inject(kA),this.batchCollector.add({action:e,params:t.params,query:t.query,body:t.body,directCall:()=>this.followRemote(r,t,n).then(e=>e.data)})):this.followRemote(r,t,n).then(e=>e.data))}createVirtualAction(e,t={}){let n=async(n={},r={})=>this.follow(e,n,{...t,...r});return Object.defineProperty(n,`name`,{value:e,writable:!1}),n.run=async(n={},r={})=>this.follow(e,n,{...t,...r}),n.fetch=async(n={},r={})=>{let i=await this.getLinkByName(e,t);return this.followRemote(i,n,r)},n.can=()=>this.can(e),n}async followRemote(e,t={},n={}){n.request??={},n.request.headers=new Headers(n.request.headers);let r=this.alepha.store.get(`alepha.http.request`);r?.headers.authorization&&n.request.headers.set(`authorization`,r.headers.authorization);let i=this.alepha.context.get(`context`);typeof i==`string`&&n.request.headers.set(`x-request-id`,i);let a={...e,schema:{body:G.any(),response:G.any()}};return!e.host&&e.service&&(a.path=`/${e.service}${a.path}`),a.path=`${a.prefix??`/api`}${a.path}`,a.prefix=void 0,this.httpClient.fetchAction({host:e.host,config:t,options:n,action:a})}async getLinkByName(e,t={}){this.alepha.isBrowser()&&!this.alepha.store.get(`alepha.server.request.apiLinks`)&&await this.fetchLinks();let n=this.links.find(n=>n.name===e&&(!t.service||t.service===n.service));if(!n){let t=new EA(`Action ${e} not found.`);throw await this.alepha.events.emit(`client:onError`,{route:n,error:t}),t}return t.hostname?{...n,host:t.hostname}:n}},jA=e=>D(AA).client(e);jA[u]=`$client`;var MA=e=>x(NA,e),NA=class extends b{get name(){return this.options.name??this.config.propertyKey}};MA[u]=NA;var PA=C({name:`alepha.server.links`,atoms:[eA,tA],primitives:[MA,jA],services:[AA,kA]}),FA=(e,t)=>{let n=Yk();(0,K.useEffect)(()=>{if(!n.isBrowser())return;let t=[];for(let[r,i]of Object.entries(e))t.push(n.events.on(r,i));return()=>{for(let e of t)e()}},t)};function IA(e,t){let n=Yk();(0,K.useMemo)(()=>{t!=null&&n.store.get(e)==null&&n.store.set(e,t)},[t]);let[r,i]=(0,K.useState)(n.store.get(e));return(0,K.useEffect)(()=>{if(!n.isBrowser())return;let t=e instanceof ok?e.key:e;return n.events.on(`state:mutate`,e=>{e.key===t&&i(e.value)})},[]),[r,t=>{n.store.set(e,t)}]}var LA=C({name:`alepha.react.core`}),RA=(e,t=[`loading`,`dirty`,`error`])=>{let n=Yk(),r=t,[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(void 0),[u,d]=(0,K.useState)(void 0),f=`form`in e?e.form:e,p=`path`in e?e.path:void 0,m=r.includes(`values`),h=r.includes(`error`),g=r.includes(`dirty`),_=r.includes(`loading`);return(0,K.useEffect)(()=>{let e=[];return(h||m||g)&&e.push(n.events.on(`form:change`,e=>{e.id===f.id&&((!p||e.path===p)&&(g&&a(!0),h&&l(void 0)),m&&d(f.currentValues))})),_&&e.push(n.events.on(`form:submit:begin`,e=>{e.id===f.id&&s(!0)}),n.events.on(`form:submit:end`,e=>{e.id===f.id&&s(!1)})),(m||g)&&e.push(n.events.on(`form:submit:success`,e=>{e.id===f.id&&(m&&d(e.values),g&&a(!1))})),g&&e.push(n.events.on(`form:reset`,e=>{e.id===f.id&&a(!1)})),h&&e.push(n.events.on(`form:submit:error`,e=>{e.id===f.id&&(!p||e.error instanceof tk&&e.error.value.path===p)&&l(e.error)})),()=>{for(let t of e)t()}},[]),{dirty:i,loading:o,error:c,values:u}},zA=class extends tk{name=`ValidationError`;constructor(e){super({message:e.message,instancePath:e.path,schemaPath:``,keyword:`not`,params:{}})}},BA=e=>{let t=Yk(),[n,r]=(0,K.useState)(e?.initialValue);return(0,K.useEffect)(()=>{if(!(!e?.form||!t.isBrowser()))return t.events.on(`form:change`,t=>{t.id===e.form.id&&t.path===e.path&&r(t.value)})},[]),[n,t=>{e.set(t)}]},VA=class{log=aA();alepha=D(ck);values={};initialValues={};submitInProgress=!1;input;get submitting(){return this.submitInProgress}constructor(e,t){this.id=e,this.options=t,this.options=t;let n=this.extractSchemaDefaults(t.schema);if(Object.keys(n).length>0&&Object.assign(this.values,n),t.initialValues){let e=this.alepha.codec.decode(t.schema,t.initialValues);Object.assign(this.values,e)}this.initialValues={...this.values},this.input=this.createProxyFromSchema(t,t.schema,{store:this.values,parent:``})}extractSchemaDefaults(e,t=``){let n={};if(!e.properties)return n;for(let[r,i]of Object.entries(e.properties)){let e=t?`${t}.${r}`:r;if(`default`in i&&i.default!==void 0)n[e]=i.default;else if(i&&`type`in i&&i.type===`object`&&`properties`in i){let t=this.extractSchemaDefaults(i,e);Object.assign(n,t)}}return n}get currentValues(){return this.restructureValues(this.values)}get props(){return{id:this.id,noValidate:!0,onSubmit:e=>{e?.preventDefault?.(),this.submit()},onReset:e=>this.reset(e)}}setInitialValues=e=>{let t=this.alepha.codec.decode(this.options.schema,e);for(let e in this.initialValues)delete this.initialValues[e];Object.assign(this.initialValues,t);for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}};reset=e=>{e?.preventDefault?.();for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}this.alepha.events.emit(`form:reset`,{id:this.id},{catch:!0}),this.options.onReset?.()};submit=async()=>{if(this.submitInProgress){this.log.warn(`Form submission already in progress, ignoring duplicate submit.`);return}await this.alepha.events.emit(`react:action:begin`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:begin`,{id:this.id}),this.submitInProgress=!0;let e=this.options;try{let t=this.restructureValues(this.values);G.schema.isSchema(e.schema)&&(t=this.alepha.codec.decode(e.schema,t)),await e.handler(t),await this.alepha.events.emit(`react:action:success`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:success`,{id:this.id,values:t})}catch(t){this.log.error(`Form submission error:`,t),e.onError?.(t),await this.alepha.events.emit(`react:action:error`,{type:`form`,id:this.id,error:t}),await this.alepha.events.emit(`form:submit:error`,{error:t,id:this.id})}finally{this.submitInProgress=!1}await this.alepha.events.emit(`react:action:end`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:end`,{id:this.id})};restructureValues(e){let t={};for(let[n,r]of Object.entries(e))n.includes(`.`)?this.restructureNestedValue(t,n,r):t[n]=r;return t}restructureNestedValue(e,t,n){let r=t.split(`.`),i=r.pop();if(!i)return;let a=e;for(let e of r)a[e]??={},a=a[e];a[i]=n}createProxyFromSchema(e,t,n){return n.parent,new Proxy({},{get:(r,i)=>{if(!e.schema||!G.schema.isObject(t))return{};if(i in t.properties)return this.createInputFromSchema(i,e,t,t.required?.includes(i)||!1,n)}})}createInputFromSchema(e,t,n,r,i){let a=i.parent||``,o=n.properties?.[e];if(!o)return{path:``,required:r,initialValue:void 0,props:{},schema:n,set:()=>{},form:this};let s=n.required?.includes(e)??!1,c=a?`${a}.${e}`:e,l=`/${c.replaceAll(`.`,`/`)}`,u=e=>{let n=this.getValueFromInput(e,o);i.store[c]=n,t.onChange&&t.onChange(c,n,i.store),this.alepha.events.emit(`form:change`,{id:this.id,path:l,value:n},{catch:!0})},d={name:c};if(t.id&&(d.id=`${t.id}-${c}`,d[`data-testid`]=d.id),G.schema.isString(o)&&(o.maxLength!=null&&(d.maxLength=Number(o.maxLength)),o.minLength!=null&&(d.minLength=Number(o.minLength))),s&&(d.required=!0),`description`in o&&typeof o.description==`string`&&(d[`aria-label`]=o.description),G.schema.isInteger(o)||G.schema.isNumber(o)?d.type=`number`:e===`password`?d.type=`password`:e===`email`?d.type=`email`:e===`url`?d.type=`url`:G.schema.isString(o)?o.format===`binary`?d.type=`file`:o.format===`date`?d.type=`date`:o.format===`time`?d.type=`time`:o.format===`date-time`?d.type=`datetime-local`:d.type=`text`:G.schema.isBoolean(o)&&(d.type=`checkbox`),t.onCreateField){let n=t.onCreateField(e,o);Object.assign(d,n)}return G.schema.isObject(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:this.createProxyFromSchema(t,o,{parent:c,store:i.store})}:G.schema.isArray(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:[]}:{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c]}}getValueFromInput(e,t){if(e instanceof File)return G.schema.isString(t)&&t.format===`binary`?e:null;if(G.schema.isBoolean(t))return e===`true`?!0:e===`false`?!1:e===``||e==null?void 0:!!e;if(G.schema.isNumber(t)){let t=Number(e);return Number.isNaN(t)?null:t}return G.schema.isString(t)?t.format===`date`?new Date(e).toISOString().slice(0,10):t.format===`time`?new Date(`1970-01-01T${e}`).toISOString().slice(11,16):t.format===`date-time`?new Date(e).toISOString():String(e):e}},HA=(e,t=[])=>{let n=Yk(),r=(0,K.useId)(),i=(0,K.useRef)(e.initialValues),a=(0,K.useMemo)(()=>n.inject(VA,{lifetime:`transient`,args:[e.id||r,e]}),t);return(0,K.useEffect)(()=>{i.current!==e.initialValues&&(i.current=e.initialValues,e.initialValues&&a.setInitialValues(e.initialValues))},[e.initialValues]),a},UA=C({name:`alepha.react.form`}),WA=class{expand(e){let t=[],n=[];return e.description||e.image||e.url||e.siteName||e.locale||e.type||e.og||e.twitter?(e.description&&t.push({name:`description`,content:e.description}),e.url&&n.push({rel:`canonical`,href:e.url}),this.expandOpenGraph(e,t),this.expandTwitter(e,t),{meta:t,link:n}):{meta:t,link:n}}expandOpenGraph(e,t){let n=e.og?.title??e.title,r=e.og?.description??e.description,i=e.og?.image??e.image;(e.type||n)&&t.push({property:`og:type`,content:e.type??`website`}),e.url&&t.push({property:`og:url`,content:e.url}),n&&t.push({property:`og:title`,content:n}),r&&t.push({property:`og:description`,content:r}),i&&(t.push({property:`og:image`,content:i}),e.imageWidth&&t.push({property:`og:image:width`,content:String(e.imageWidth)}),e.imageHeight&&t.push({property:`og:image:height`,content:String(e.imageHeight)}),e.imageAlt&&t.push({property:`og:image:alt`,content:e.imageAlt})),e.siteName&&t.push({property:`og:site_name`,content:e.siteName}),e.locale&&t.push({property:`og:locale`,content:e.locale})}expandTwitter(e,t){let n=e.twitter?.title??e.title,r=e.twitter?.description??e.description,i=e.twitter?.image??e.image;(e.twitter?.card||n||i)&&t.push({name:`twitter:card`,content:e.twitter?.card??(i?`summary_large_image`:`summary`)}),e.url&&t.push({name:`twitter:url`,content:e.url}),n&&t.push({name:`twitter:title`,content:n}),r&&t.push({name:`twitter:description`,content:r}),i&&(t.push({name:`twitter:image`,content:i}),e.imageAlt&&t.push({name:`twitter:image:alt`,content:e.imageAlt})),e.twitter?.site&&t.push({name:`twitter:site`,content:e.twitter.site}),e.twitter?.creator&&t.push({name:`twitter:creator`,content:e.twitter.creator})}},GA=class{log=aA();seoExpander=D(WA);global=[];warnedAboutHtmlAttributes=!1;resolveGlobalHead(){let e={htmlAttributes:{lang:`en`}};for(let t of this.global??[]){let n=typeof t==`function`?t():t;n.htmlAttributes&&(e.htmlAttributes={...e.htmlAttributes,...n.htmlAttributes})}return e}resolveGlobal(){let e={};for(let t of this.global??[]){let n=typeof t==`function`?t():t,{meta:r,link:i}=this.seoExpander.expand(n);e={...e,...n,meta:[...e.meta??[],...r,...n.meta??[]],link:[...e.link??[],...i,...n.link??[]],script:[...e.script??[],...n.script??[]]}}return e}fillHead(e){e.head={...e.head};for(let t of this.global??[]){let n=typeof t==`function`?t():t;this.mergeHead(e,n)}for(let t of e.layers)t.route?.head&&!t.error&&this.fillHeadByPage(t.route,e,t.props??{});e.head.title??=`App`,e.head.htmlAttributes={lang:`en`,...e.head.htmlAttributes}}mergeHead(e,t){let{meta:n,link:r}=this.seoExpander.expand(t);e.head={...e.head,...t,meta:[...e.head.meta??[],...n,...t.meta??[]],link:[...e.head.link??[],...r,...t.link??[]],script:[...e.head.script??[],...t.script??[]]}}fillHeadByPage(e,t,n){if(!e.head)return;t.head??={};let r=typeof e.head==`function`?e.head(n,t.head):e.head,{meta:i,link:a}=this.seoExpander.expand(r);t.head.meta=[...t.head.meta??[],...i],t.head.link=[...t.head.link??[],...a],r.title&&(t.head??={},t.head.titleSeparator?t.head.title=`${r.title}${t.head.titleSeparator}${t.head.title}`:t.head.title=r.title,t.head.titleSeparator=r.titleSeparator),r.htmlAttributes&&!this.warnedAboutHtmlAttributes&&(this.warnedAboutHtmlAttributes=!0,this.log.warn(`Page-level htmlAttributes are ignored. Use global $head() for htmlAttributes instead, as they are sent before page loaders run for early streaming optimization.`)),r.bodyAttributes&&(t.head.bodyAttributes={...t.head.bodyAttributes,...r.bodyAttributes}),r.meta&&(t.head.meta=[...t.head.meta??[],...r.meta??[]]),r.link&&(t.head.link=[...t.head.link??[],...r.link??[]]),r.script&&(t.head.script=[...t.head.script??[],...r.script??[]])}},KA=e=>x(qA,e),qA=class extends b{provider=D(GA);onInit(){this.provider.global=[...this.provider.global??[],this.options]}};KA[u]=qA;var JA=class{alepha=D(ck);headProvider=D(GA);get document(){return window.document}fillAndRenderHead(e){this.alepha.isBrowser()&&(this.headProvider.fillHead(e),e.head&&this.renderHead(this.document,e.head))}refreshGlobalHead(){let e=this.headProvider.resolveGlobal();this.renderHead(this.document,e)}getHead(e){return{get title(){return e.title},get htmlAttributes(){let t={};for(let n of e.documentElement.attributes)t[n.name]=n.value;return t},get bodyAttributes(){let t={};for(let n of e.body.attributes)t[n.name]=n.value;return t},get meta(){let t=[];for(let n of e.head.querySelectorAll(`meta[name]`)){let e=n.getAttribute(`name`),r=n.getAttribute(`content`);e&&r&&t.push({name:e,content:r})}for(let n of e.head.querySelectorAll(`meta[property]`)){let e=n.getAttribute(`property`),r=n.getAttribute(`content`);e&&r&&t.push({property:e,content:r})}return t}}}renderHead(e,t){if(t.title&&(e.title=t.title),t.bodyAttributes)for(let[n,r]of Object.entries(t.bodyAttributes))r?e.body.setAttribute(n,r):e.body.removeAttribute(n);if(t.htmlAttributes)for(let[n,r]of Object.entries(t.htmlAttributes))r?e.documentElement.setAttribute(n,r):e.documentElement.removeAttribute(n);if(t.meta)for(let n of t.meta)this.renderMetaTag(e,n);if(t.link)for(let n of t.link){let{rel:t,href:r}=n,i=e.querySelector(`link[rel="${t}"][href="${r}"]`);i||(i=e.createElement(`link`),i.setAttribute(`rel`,t),i.setAttribute(`href`,r),n.type&&i.setAttribute(`type`,n.type),n.as&&i.setAttribute(`as`,n.as),n.crossorigin!=null&&i.setAttribute(`crossorigin`,``),e.head.appendChild(i))}if(t.script)for(let n of t.script)this.renderScriptTag(e,n)}renderScriptTag(e,t){let n=e.createElement(`script`);if(typeof t==`string`){n.textContent=t,e.head.appendChild(n);return}let{content:r,...i}=t;if(!(i.src&&e.querySelector(`script[src="${i.src}"]`))){for(let[e,t]of Object.entries(i))t===!0?n.setAttribute(e,``):t!==void 0&&t!==!1&&n.setAttribute(e,String(t));r&&(n.textContent=r),e.head.appendChild(n)}}renderMetaTag(e,t){let{content:n}=t;if(t.property){let r=e.querySelector(`meta[property="${t.property}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`property`,t.property),r.setAttribute(`content`,n),e.head.appendChild(r)}return}if(t.name){let r=e.querySelector(`meta[name="${t.name}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`name`,t.name),r.setAttribute(`content`,n),e.head.appendChild(r)}}}},YA=C({name:`alepha.react.head`,primitives:[KA],services:[LA,JA]}),XA=class{parseRequestCookies(e){let t={},n=e.split(`;`);for(let e of n){let n=e.indexOf(`=`);if(n===-1)continue;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();!r||!i||(t[r]=i)}return t}serializeResponseCookies(e,t){let n=[];for(let[r,i]of Object.entries(e)){if(i==null){n.push(`${r}=; Path=/; Max-Age=0`);continue}i.value&&n.push(this.cookieToString(r,i,t))}return n}cookieToString(e,t,n){let r=[];return r.push(`${e}=${t.value}`),t.path&&r.push(`Path=${t.path}`),t.maxAge&&r.push(`Max-Age=${t.maxAge}`),t.secure!==!1&&n&&r.push(`Secure`),t.httpOnly&&r.push(`HttpOnly`),t.sameSite&&r.push(`SameSite=${t.sameSite}`),t.domain&&r.push(`Domain=${t.domain}`),r.join(`; `)}},ZA=(e,t)=>(t&&(e={key:e.key,schema:e.schema,...t}),x(QA,e)),QA=class extends b{cookieParser=D(XA);alepha=D(ck);dateTimeProvider=D(Gk);cookie;onInit(){this.options.key&&(this.alepha.events.on(`state:mutate`,({key:e,value:t})=>{e===this.options.key&&this.set(t)}),this.alepha.events.on(`configure`,()=>{try{let e=this.get();e!==void 0&&this.alepha.set(this.options.key,e)}catch{}}))}get schema(){return this.options.schema}get name(){return this.options.name??`${this.config.propertyKey}`}set(e){let t=JSON.stringify(this.alepha.codec.decode(this.schema,e)),n=this.options;if(n.compress)throw new p(`Compression is not supported in browser cookies.`);if(n.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(n.sign)throw new p(`Signing is not supported in browser cookies.`);let r={value:encodeURIComponent(t),path:n.path??`/`,sameSite:n.sameSite??`lax`,secure:!1,httpOnly:!1,domain:n.domain};n.ttl&&(r.maxAge=this.dateTimeProvider.duration(n.ttl).as(`seconds`)),document.cookie=this.cookieParser.cookieToString(this.name,r)}get(e){let t=this.cookieParser.parseRequestCookies(document.cookie)[this.name];if(!t)return;let n=decodeURIComponent(t);if(this.options.compress)throw new p(`Compression is not supported in browser cookies.`);if(this.options.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(this.options.sign)throw new p(`Signing is not supported in browser cookies.`);return this.alepha.codec.decode(this.schema,JSON.parse(n))}del(){let e=this.options,t={value:``,path:e.path??`/`,sameSite:e.sameSite??`lax`,secure:!1,httpOnly:!1,domain:e.domain,maxAge:0};document.cookie=this.cookieParser.cookieToString(this.name,t)}};ZA[u]=QA,C({name:`alepha.server.cookies`,primitives:[],services:[OA]});var $A=class{log=aA();alepha=D(ck);dateTimeProvider=D(Gk);cookie=ZA({name:`lang`,schema:G.text(),ttl:[1,`year`]});registry=[];options={fallbackLang:`en`};dateFormat=new Intl.DateTimeFormat(this.lang);numberFormat=new Intl.NumberFormat(this.lang);get languages(){let e=new Set;for(let t of this.registry)e.add(t.lang);return e.add(this.options.fallbackLang),Array.from(e)}constructor(){this.refreshLocale()}onRender=j({on:`server:onRequest`,priority:`last`,handler:async({request:e})=>{this.alepha.store.set(`alepha.react.i18n.lang`,this.cookie.get(e))}});onStart=j({on:`start`,handler:async()=>{if(this.alepha.isBrowser()){let e=this.cookie.get();e&&this.alepha.store.set(`alepha.react.i18n.lang`,e);for(let e of this.registry)(e.lang===this.lang||e.lang===this.options.fallbackLang)&&(this.log.trace(`Loading language`,{lang:e.lang,name:e.name,target:e.target}),e.translations=await e.loader());return}for(let e of this.registry)e.translations=await e.loader()}});refreshLocale(){this.numberFormat=new Intl.NumberFormat(this.lang),this.dateFormat=new Intl.DateTimeFormat(this.lang),this.dateTimeProvider.setLocale(this.lang),ZO.setLocale(this.lang)}setLang=async e=>{if(this.alepha.isBrowser()){for(let t of this.registry)if(e===t.lang){if(Object.keys(t.translations).length>0)continue;t.translations=await t.loader()}this.cookie.set(e)}this.alepha.store.set(`alepha.react.i18n.lang`,e),this.refreshLocale()};mutate=j({on:`state:mutate`,handler:async({key:e,value:t})=>{if(e===`alepha.react.i18n.lang`&&this.alepha.isBrowser()){let e=!1;for(let n of this.registry)if(t===n.lang){if(Object.keys(n.translations).length>0)continue;n.translations=await n.loader(),e=!0}this.refreshLocale(),e&&this.alepha.store.set(`alepha.react.i18n.lang`,t)}}});get lang(){return this.alepha.store.get(`alepha.react.i18n.lang`)||this.options.fallbackLang}translate=(e,t=[])=>{for(let n of this.registry)if(n.lang===this.lang&&n.translations[e])return this.render(n.translations[e],t);for(let n of this.registry)if(n.lang===this.options.fallbackLang&&n.translations[e])return this.render(n.translations[e],t);return e};l=(e,t={})=>{if(typeof e==`number`&&!t.date)return new Intl.NumberFormat(this.lang,t.number).format(e);if(e instanceof Date||this.dateTimeProvider.isDateTime(e)||typeof e==`string`&&t.date||typeof e==`number`&&t.date){let n=this.dateTimeProvider.of(e);return t.timezone&&(n=n.tz(t.timezone)),typeof t.date==`string`?t.date===`fromNow`?n.locale(this.lang).fromNow():n.locale(this.lang).format(t.date):t.date?new Intl.DateTimeFormat(this.lang,t.timezone?{...t.date,timeZone:t.timezone}:t.date).format(n.toDate()):t.timezone?new Intl.DateTimeFormat(this.lang,{timeZone:t.timezone}).format(n.toDate()):new Intl.DateTimeFormat(this.lang).format(n.toDate())}return e instanceof tk?ZO.translateError(e,this.lang):e};tr=(e,t={})=>{let n=this.translate(e,t.args||[]);return n===e&&t.default?t.default:n};render(e,t){let n=e;for(let e=0;e<t.length;e++)n=n.replace(`$${e+1}`,t[e]);return n}},ej=e=>x(tj,e),tj=class extends b{provider=D($A);onInit(){this.provider.registry.push({target:this.config.service.name,name:this.options.name??this.config.propertyKey,lang:this.options.lang??this.config.propertyKey,loader:async()=>(await this.options.lazy()).default,translations:{}})}};ej[u]=tj;var nj=()=>(IA(`alepha.react.i18n.lang`),Xk($A)),rj=C({name:`alepha.react.i18n`,primitives:[ej],services:[$A]}),ij=ak({name:`alepha.ui.sidebar`,schema:G.object({closed:G.boolean(),collapsed:G.boolean(),expandedWidth:G.number(),collapsedWidth:G.number()}),default:{closed:!0,collapsed:!1,expandedWidth:300,collapsedWidth:72}}),aj=ak({name:`alepha.ui.theme`,schema:G.object({index:G.integer()}),default:{index:0}}),oj=ak({name:`alepha.ui.themeOverrides`,schema:G.object({primaryColor:G.optional(G.text()),radius:G.optional(G.text()),fontFamily:G.optional(G.text()),fontSize:G.optional(G.text()),scale:G.optional(G.text())}),default:{}}),sj={name:`Default`,description:`Default Alepha Theme`},cj=function(){return cj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cj.apply(this,arguments)};function lj(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function uj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var dj=`right-scroll-bar-position`,fj=`width-before-scroll-bar`,pj=`with-scroll-bars-hidden`,mj=`--removed-body-scroll-bar-size`;function hj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function gj(e,t){var n=(0,K.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var _j=typeof window<`u`?K.useLayoutEffect:K.useEffect,vj=new WeakMap;function yj(e,t){var n=gj(t||null,function(t){return e.forEach(function(e){return hj(e,t)})});return _j(function(){var t=vj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||hj(e,null)}),i.forEach(function(e){r.has(e)||hj(e,a)})}vj.set(n,e)},[e]),n}function bj(e){return e}function xj(e,t){t===void 0&&(t=bj);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Sj(e){e===void 0&&(e={});var t=xj(null);return t.options=cj({async:!0,ssr:!1},e),t}var Cj=function(e){var t=e.sideCar,n=lj(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return K.createElement(r,cj({},n))};Cj.isSideCarExport=!0;function wj(e,t){return e.useMedium(t),Cj}var Tj=Sj(),Ej=function(){},Dj=K.forwardRef(function(e,t){var n=K.useRef(null),r=K.useState({onScrollCapture:Ej,onWheelCapture:Ej,onTouchMoveCapture:Ej}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=lj(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=yj([n,t]),C=cj(cj({},b),i);return K.createElement(K.Fragment,null,u&&K.createElement(x,{sideCar:Tj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?K.cloneElement(K.Children.only(s),cj(cj({},C),{ref:S})):K.createElement(v,cj({},C,{className:c,ref:S}),s))});Dj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dj.classNames={fullWidth:fj,zeroRight:dj};var Oj,kj=function(){if(Oj)return Oj;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Aj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=kj();return t&&e.setAttribute(`nonce`,t),e}function jj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Nj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Aj())&&(jj(t,n),Mj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pj=function(){var e=Nj();return function(t,n){K.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fj=function(){var e=Pj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ij={left:0,top:0,right:0,gap:0},Lj=function(e){return parseInt(e||``,10)||0},Rj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Lj(n),Lj(r),Lj(i)]},zj=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ij;var t=Rj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Bj=Fj(),Vj=`data-scroll-locked`,Hj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
15
- .${pj} {
16
- overflow: hidden ${r};
17
- padding-right: ${s}px ${r};
18
- }
19
- body[${Vj}] {
20
- overflow: hidden ${r};
21
- overscroll-behavior: contain;
22
- ${[t&&`position: relative ${r};`,n===`margin`&&`
23
- padding-left: ${i}px;
24
- padding-top: ${a}px;
25
- padding-right: ${o}px;
26
- margin-left:0;
27
- margin-top:0;
28
- margin-right: ${s}px ${r};
29
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
30
- }
31
-
32
- .${dj} {
33
- right: ${s}px ${r};
34
- }
35
-
36
- .${fj} {
37
- margin-right: ${s}px ${r};
38
- }
39
-
40
- .${dj} .${dj} {
41
- right: 0 ${r};
42
- }
43
-
44
- .${fj} .${fj} {
45
- margin-right: 0 ${r};
46
- }
47
-
48
- body[${Vj}] {
49
- ${mj}: ${s}px;
50
- }
51
- `},Uj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Wj=function(){K.useEffect(function(){return document.body.setAttribute(Vj,(Uj()+1).toString()),function(){var e=Uj()-1;e<=0?document.body.removeAttribute(Vj):document.body.setAttribute(Vj,e.toString())}},[])},Gj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Wj();var a=K.useMemo(function(){return zj(i)},[i]);return K.createElement(Bj,{styles:Hj(a,!t,i,n?``:`!important`)})},Kj=!1;if(typeof window<`u`)try{var qj=Object.defineProperty({},`passive`,{get:function(){return Kj=!0,!0}});window.addEventListener(`test`,qj,qj),window.removeEventListener(`test`,qj,qj)}catch{Kj=!1}var Jj=Kj?{passive:!1}:!1,Yj=function(e){return e.tagName===`TEXTAREA`},Xj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Yj(e)&&n[t]===`visible`)},Zj=function(e){return Xj(e,`overflowY`)},Qj=function(e){return Xj(e,`overflowX`)},$j=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),nM(e,r)){var i=rM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eM=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},tM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},nM=function(e,t){return e===`v`?Zj(t):Qj(t)},rM=function(e,t){return e===`v`?eM(t):tM(t)},iM=function(e,t){return e===`h`&&t===`rtl`?-1:1},aM=function(e,t,n,r,i){var a=iM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=rM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&nM(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},oM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sM=function(e){return[e.deltaX,e.deltaY]},cM=function(e){return e&&`current`in e?e.current:e},lM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uM=function(e){return`
52
- .block-interactivity-${e} {pointer-events: none;}
53
- .allow-interactivity-${e} {pointer-events: all;}
54
- `},dM=0,fM=[];function pM(e){var t=K.useRef([]),n=K.useRef([0,0]),r=K.useRef(),i=K.useState(dM++)[0],a=K.useState(Fj)[0],o=K.useRef(e);K.useEffect(function(){o.current=e},[e]),K.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=uj([e.lockRef.current],(e.shards||[]).map(cM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=K.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=oM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=$j(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=$j(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return aM(h,t,e,h===`h`?s:c,!0)},[]),c=K.useCallback(function(e){var n=e;if(!(!fM.length||fM[fM.length-1]!==a)){var r=`deltaY`in n?sM(n):oM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&lM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(cM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=K.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:mM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=K.useCallback(function(e){n.current=oM(e),r.current=void 0},[]),d=K.useCallback(function(t){l(t.type,sM(t),t.target,s(t,e.lockRef.current))},[]),f=K.useCallback(function(t){l(t.type,oM(t),t.target,s(t,e.lockRef.current))},[]);K.useEffect(function(){return fM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Jj),document.addEventListener(`touchmove`,c,Jj),document.addEventListener(`touchstart`,u,Jj),function(){fM=fM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Jj),document.removeEventListener(`touchmove`,c,Jj),document.removeEventListener(`touchstart`,u,Jj)}},[]);var p=e.removeScrollBar,m=e.inert;return K.createElement(K.Fragment,null,m?K.createElement(a,{styles:uM(i)}):null,p?K.createElement(Gj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var hM=wj(Tj,pM),gM=K.forwardRef(function(e,t){return K.createElement(Dj,cj({},e,{ref:t,sideCar:hM}))});gM.classNames=Dj.classNames;function _M(e){return Object.keys(e)}function vM(e){return e&&typeof e==`object`&&!Array.isArray(e)}function yM(e,t){let n={...e},r=t;return vM(e)&&vM(t)&&Object.keys(t).forEach(t=>{vM(r[t])&&t in e?n[t]=yM(n[t],r[t]):n[t]=r[t]}),n}function bM(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function xM(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function SM(e){let t=xM(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function CM(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function wM(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?CM(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?CM(n):n}}return r}return n}var Y=wM(`rem`,{shouldScale:!0}),TM=wM(`em`);function EM(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function DM(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function OM(e){return Array.isArray(e)||e===null?!1:typeof e==`object`?e.type!==K.Fragment:!1}function kM(e){let t=(0,K.createContext)(null);return[({children:e,value:n})=>(0,q.jsx)(t.Provider,{value:n,children:e}),()=>{let n=(0,K.useContext)(t);if(n===null)throw Error(e);return n}]}function AM(e=null){let t=(0,K.createContext)(e);return[({children:e,value:n})=>(0,q.jsx)(t.Provider,{value:n,children:e}),()=>(0,K.useContext)(t)]}function jM(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function MM(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function NM(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function PM(e,t,n){return jM(e,n)===jM(t,n)}function FM({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(jM(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>PM(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=NM(l,c,r),d=MM(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break;case`End`:{s.stopPropagation(),s.preventDefault();let e=c.length-1;!c[e].disabled&&c[e].focus();break}}}}var IM={app:100,modal:200,popover:300,overlay:400,max:9999};function LM(e){return IM[e]}var RM=()=>{};function zM(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||RM:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function BM(e,t=`size`,n=!0){if(e!==void 0)return DM(e)?n?Y(e):e:`var(--${t}-${e})`}function VM(e){return BM(e,`mantine-spacing`)}function HM(e){return e===void 0?`var(--mantine-radius-default)`:BM(e,`mantine-radius`)}function UM(e){return BM(e,`mantine-font-size`)}function WM(e){return BM(e,`mantine-line-height`,!1)}function GM(e){if(e)return BM(e,`mantine-shadow`,!1)}function KM(e,t){return n=>{e?.(n),t?.(n)}}function qM(e,t){return e in t?SM(t[e]):SM(e)}function JM(e,t){let n=e.map(e=>({value:e,px:qM(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function YM(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function XM(e,t,n){return n?Array.from(jM(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function ZM(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):t===void 0&&n!==void 0?Math.min(e,n):Math.min(Math.max(e,t),n)}function QM(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function $M(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function eN(e){let t=(0,K.useRef)(e);return(0,K.useEffect)(()=>{t.current=e}),(0,K.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function tN(e,t){let{delay:n,flushOnUnmount:r,leading:i}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1}:t,a=eN(e),o=(0,K.useRef)(0),s=(0,K.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(o.current);let r=e._isFirstCall;e._isFirstCall=!1;function s(){window.clearTimeout(o.current),o.current=0,e._isFirstCall=!0}if(i&&r){a(...t),e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}if(i&&!r){e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}let c=()=>{o.current!==0&&(s(),a(...t))};e.flush=c,e.cancel=()=>{s()},o.current=window.setTimeout(c,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return e},[a,n,i]);return(0,K.useEffect)(()=>()=>{r?s.flush():s.cancel()},[s,r]),s}var nN=[`mousedown`,`touchstart`];function rN(e,t,n){let r=(0,K.useRef)(null),i=t||nN;return(0,K.useEffect)(()=>{let t=t=>{let{target:i}=t??{};if(Array.isArray(n)){let r=!document.body.contains(i)&&i?.tagName!==`HTML`;n.every(e=>!!e&&!t.composedPath().includes(e))&&!r&&e(t)}else r.current&&!r.current.contains(i)&&e(t)};return i.forEach(e=>document.addEventListener(e,t)),()=>{i.forEach(e=>document.removeEventListener(e,t))}},[r,e,n]),r}function iN(e,t){try{return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function aN(e,t){return typeof window<`u`&&`matchMedia`in window?window.matchMedia(e).matches:!1}function oN(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,K.useState)(n?t:aN(e));return(0,K.useEffect)(()=>{try{let t=window.matchMedia(e);return i(t.matches),iN(t,e=>i(e.matches))}catch{return}},[e]),r||!1}function sN(e,t){return oN(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}var cN=typeof document<`u`?K.useLayoutEffect:K.useEffect;function lN(e,t){let n=(0,K.useRef)(!1);(0,K.useEffect)(()=>()=>{n.current=!1},[]),(0,K.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function uN({opened:e,shouldReturnFocus:t=!0}){let n=(0,K.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return lN(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};return document.addEventListener(`keydown`,a),e?n.current=document.activeElement:t&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var dN=/input|select|textarea|button|object/,fN=`a, input, select, textarea, button, object, [tabindex]`;function pN(e){return e.style.display===`none`}function mN(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&!(t===document.body||t.nodeType===11);){if(pN(t))return!1;t=t.parentNode}return!0}function hN(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function gN(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(hN(e));return(dN.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&mN(e)}function _N(e){let t=hN(e);return(Number.isNaN(t)||t>=0)&&gN(e)}function vN(e){return Array.from(e.querySelectorAll(fN)).filter(_N)}function yN(e,t){let n=vN(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function bN(e=!0){let t=(0,K.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(fN));t=n.find(_N)||n.find(gN)||null,!t&&gN(e)&&(t=e)}t&&t.focus({preventScroll:!0})},r=(0,K.useCallback)(r=>{e&&r!==null&&t.current!==r&&(r?(setTimeout(()=>{r.getRootNode()&&n(r)}),t.current=r):t.current=null)},[e]);return(0,K.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));let r=e=>{e.key===`Tab`&&t.current&&yN(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}var xN=e=>(e+1)%1e6;function SN(){let[,e]=(0,K.useReducer)(xN,0);return e}var CN=K.default.useId||(()=>void 0);function wN(){let e=CN();return e?`mantine-${e.replace(/:/g,``)}`:``}function TN(e){let t=wN(),[n,r]=(0,K.useState)(t);return cN(()=>{r(QM())},[]),typeof e==`string`?e:typeof window>`u`?t:n}function EN(e,t,n){(0,K.useEffect)(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function DN(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function ON(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=DN(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():DN(e,null)}),t.clear()}}}function kN(...e){return(0,K.useCallback)(ON(...e),e)}function AN(e){return{x:ZM(e.x,0,1),y:ZM(e.y,0,1)}}function jN(e,t,n=`ltr`){let r=(0,K.useRef)(!1),i=(0,K.useRef)(!1),a=(0,K.useRef)(0),[o,s]=(0,K.useState)(!1),c=(0,K.useRef)(null);return(0,K.useEffect)(()=>{r.current=!0},[]),{ref:(0,K.useCallback)(o=>{if(c.current&&=(c.current(),null),!o)return;let l=({x:t,y:i})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(r.current&&o){o.style.userSelect=`none`;let r=o.getBoundingClientRect();if(r.width&&r.height){let a=ZM((t-r.left)/r.width,0,1);e({x:n===`ltr`?a:1-a,y:ZM((i-r.top)/r.height,0,1)})}}})},u=()=>{document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,p),document.addEventListener(`touchmove`,_,{passive:!1}),document.addEventListener(`touchend`,p)},d=()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,p),document.removeEventListener(`touchmove`,_),document.removeEventListener(`touchend`,p)},f=()=>{!i.current&&r.current&&(i.current=!0,typeof t?.onScrubStart==`function`&&t.onScrubStart(),s(!0),u())},p=()=>{i.current&&r.current&&(i.current=!1,s(!1),d(),setTimeout(()=>{typeof t?.onScrubEnd==`function`&&t.onScrubEnd()},0))},m=e=>{f(),e.preventDefault(),h(e)},h=e=>l({x:e.clientX,y:e.clientY}),g=e=>{e.cancelable&&e.preventDefault(),f(),_(e)},_=e=>{e.cancelable&&e.preventDefault(),l({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})};o.addEventListener(`mousedown`,m),o.addEventListener(`touchstart`,g,{passive:!1}),c.current=()=>{o.removeEventListener(`mousedown`,m),o.removeEventListener(`touchstart`,g)}},[n,e]),active:o}}function MN({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,K.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function NN(e,t){return oN(`(prefers-reduced-motion: reduce)`,e,t)}function PN(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!$M(e[n],t[n]))return!1;return!0}function FN(e){let t=(0,K.useRef)([]),n=(0,K.useRef)(0);return PN(t.current,e)||(t.current=e,n.current+=1),[n.current]}function IN(e,t){(0,K.useEffect)(e,FN(t))}var LN={" ":`space`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,Escape:`escape`,Esc:`escape`,esc:`escape`,Enter:`enter`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,"+":`plus`,"-":`minus`,"*":`asterisk`,"/":`slash`};function RN(e){let t=e.replace(`Key`,``).toLowerCase();return LN[e]||t}function zN(e){let t=e.toLowerCase().split(`+`).map(e=>e.trim()),n={alt:t.includes(`alt`),ctrl:t.includes(`ctrl`),meta:t.includes(`meta`),mod:t.includes(`mod`),shift:t.includes(`shift`),plus:t.includes(`[plus]`)},r=[`alt`,`ctrl`,`meta`,`shift`,`mod`],i=t.find(e=>!r.includes(e));return{...n,key:i===`[plus]`?`+`:i}}function BN(e,t,n){let{alt:r,ctrl:i,meta:a,mod:o,shift:s,key:c}=e,{altKey:l,ctrlKey:u,metaKey:d,shiftKey:f,key:p,code:m}=t;if(r!==l)return!1;if(o){if(!u&&!d)return!1}else if(i!==u||a!==d)return!1;return s===f?!!(c&&(n?RN(m)===RN(c):RN(p??m)===RN(c))):!1}function VN(e,t){return n=>BN(zN(e),n,t)}function HN(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function UN(e,t=[`INPUT`,`TEXTAREA`,`SELECT`],n=!1){(0,K.useEffect)(()=>{let r=r=>{e.forEach(([e,i,a={preventDefault:!0,usePhysicalKeys:!1}])=>{VN(e,a.usePhysicalKeys)(r)&&HN(r,t,n)&&(a.preventDefault&&r.preventDefault(),i(r))})};return document.documentElement.addEventListener(`keydown`,r),()=>document.documentElement.removeEventListener(`keydown`,r)},[e])}function WN(e){return/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i.test(e)}function GN(e){return/(iPhone)|(iPad)|(iPod)/i.test(e)}function KN(e){return/(Win32)|(Win64)|(Windows)|(WinCE)/i.test(e)}function qN(e){return/Android/i.test(e)}function JN(e){return/Linux/i.test(e)}function YN(e){return/CrOS/i.test(e)}function XN(){if(typeof window>`u`)return`undetermined`;let{userAgent:e}=window.navigator;return GN(e)||WN(e)&&`ontouchend`in document?`ios`:WN(e)?`macos`:KN(e)?`windows`:qN(e)?`android`:JN(e)?`linux`:YN(e)?`chromeos`:`undetermined`}function ZN(e={getValueInEffect:!0}){let[t,n]=(0,K.useState)(e.getValueInEffect?`undetermined`:XN());return cN(()=>{e.getValueInEffect&&n(XN)},[]),t}function QN(e=!1,t={}){let[n,r]=(0,K.useState)(e),i=(0,K.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,K.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,K.useCallback)(()=>{n?a():i()},[a,i,n])}]}function $N(e,t,n={autoInvoke:!1}){let r=(0,K.useRef)(null),i=(0,K.useCallback)((...n)=>{r.current||=window.setTimeout(()=>{e(n),r.current=null},t)},[t]),a=(0,K.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,K.useEffect)(()=>(n.autoInvoke&&i(),a),[a,i]),{start:i,clear:a}}function eP(e){let t=(0,K.useRef)(void 0);return(0,K.useEffect)(()=>{t.current=e},[e]),t.current}function tP(){let[e,t]=(0,K.useState)(!1);return cN(()=>{t(typeof window<`u`&&!nP()&&`EyeDropper`in window)},[]),{supported:e,open:(0,K.useCallback)((t={})=>e?new window.EyeDropper().open(t):Promise.resolve(void 0),[e])}}function nP(){return navigator.userAgent.includes(`OPR`)}function rP(e,t,n){let r=(0,K.useRef)(null),i=(0,K.useRef)(null);return(0,K.useEffect)(()=>{let a=typeof n==`function`?n():n;return(a||i.current)&&(r.current=new MutationObserver(e),r.current.observe(a||i.current,t)),()=>{r.current?.disconnect()}},[e,t]),i}function iP(){let[e,t]=(0,K.useState)(!1);return(0,K.useEffect)(()=>t(!0),[]),e}function aP(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function oP(e){function t(t){let n=Object.keys(t).reduce((n,r)=>(n[`${e}:${r}`]=e=>t[r](e.detail),n),{});cN(()=>(Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e]),window.addEventListener(e,n[e])}),()=>Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e])})),[n])}function n(t){return(...n)=>aP(`${e}:${String(t)}`,n[0])}return[t,n]}function sP(){return typeof process<`u`?`production`:`development`}function cP(e){let t=new Map;return(...n)=>{let r=JSON.stringify(n);if(t.has(r))return t.get(r);let i=e(...n);return t.set(r,i),i}}function lP(e,t){return t.length===0?e:t.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t)}function uP(e){return e?.props?.ref}function dP(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=dP(e,n.shadowRoot);if(t)return t}}return null}function fP(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=fP(e,r.shadowRoot);n.push(...t)}}return n}function pP(e){if(!e)return document;let t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t:document}function mP(e){let t=K.Children.toArray(e);return t.length!==1||!OM(t[0])?null:t[0]}function hP(e){return e}function gP(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gP(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function _P(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gP(e))&&(r&&(r+=` `),r+=t);return r}var vP={};function yP(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=_P(t[e],n):t[e]=n})}),t}function bP({theme:e,classNames:t,props:n,stylesCtx:r}){return yP((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||vP))}function xP({theme:e,styles:t,props:n,stylesCtx:r}){return(Array.isArray(t)?t:[t]).reduce((t,i)=>typeof i==`function`?{...t,...i(e,n,r)}:{...t,...i},{})}var SP=(0,K.createContext)(null);function CP(){let e=(0,K.useContext)(SP);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function wP(){return CP().cssVariablesResolver}function TP(){return CP().classNamesPrefix}function EP(){return CP().getStyleNonce}function DP(){return CP().withStaticClasses}function OP(){return CP().headless}function kP(){return CP().stylesTransform?.sx}function AP(){return CP().stylesTransform?.styles}function jP(){return CP().env||`default`}function MP(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function NP(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function PP(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function FP(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function IP(e){return MP(e)?NP(e):e.startsWith(`rgb`)?PP(e):e.startsWith(`hsl`)?FP(e):{r:0,g:0,b:0,a:1}}function LP(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=IP(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function RP(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function zP(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function BP(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function VP(e){if(e.startsWith(`oklch(`))return(BP(e)||0)/100;let{r:t,g:n,b:r}=IP(e),i=t/255,a=n/255,o=r/255,s=zP(i),c=zP(a),l=zP(o);return .2126*s+.7152*c+.0722*l}function HP(e,t=.179){return e.startsWith(`var(`)?!1:VP(e)>t}function UP({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:HP(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:HP(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:HP(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][RP(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:HP(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:HP(e,t.luminanceThreshold),shade:a,variable:void 0}}function WP(e,t){let n=UP({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function GP(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=WP(n.from,t),i=WP(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function KP(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=IP(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var qP=KP,JP=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=UP({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let t=o&&a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:t,border:`${Y(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:t,border:`${Y(1)} solid transparent`}:{background:e,hover:LP(e,.1),color:t,border:`${Y(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Y(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:KP(n,.1),hover:KP(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${Y(1)} solid transparent`}}return{background:KP(e,.1),hover:KP(e,.12),color:e,border:`${Y(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${Y(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:KP(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${Y(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:KP(e,.05),color:e,border:`${Y(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Y(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:KP(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${Y(1)} solid transparent`}}return{background:`transparent`,hover:KP(e,.12),color:e,border:`${Y(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${Y(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${Y(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${Y(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:LP(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${Y(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:LP(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${Y(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:LP(t.white,.01),color:e,border:`${Y(1)} solid transparent`}:n===`gradient`?{background:GP(r,t),hover:GP(r,t),color:`var(--mantine-color-white)`,border:`none`}:n===`default`?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${Y(1)} solid var(--mantine-color-default-border)`}:{}},YP={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},XP=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,ZP={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:YP,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:JP,autoContrast:!1,luminanceThreshold:.3,fontFamily:XP,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`sm`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:XP,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:Y(34),lineHeight:`1.3`},h2:{fontSize:Y(26),lineHeight:`1.35`},h3:{fontSize:Y(22),lineHeight:`1.4`},h4:{fontSize:Y(18),lineHeight:`1.45`},h5:{fontSize:Y(16),lineHeight:`1.5`},h6:{fontSize:Y(14),lineHeight:`1.5`}}},fontSizes:{xs:Y(12),sm:Y(14),md:Y(16),lg:Y(18),xl:Y(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},radius:{xs:Y(2),sm:Y(4),md:Y(8),lg:Y(16),xl:Y(32)},spacing:{xs:Y(10),sm:Y(12),md:Y(16),lg:Y(20),xl:Y(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), 0 ${Y(1)} ${Y(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(10)} ${Y(15)} ${Y(-5)}, rgba(0, 0, 0, 0.04) 0 ${Y(7)} ${Y(7)} ${Y(-5)}`,md:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(20)} ${Y(25)} ${Y(-5)}, rgba(0, 0, 0, 0.04) 0 ${Y(10)} ${Y(10)} ${Y(-5)}`,lg:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(28)} ${Y(23)} ${Y(-7)}, rgba(0, 0, 0, 0.04) 0 ${Y(12)} ${Y(12)} ${Y(-7)}`,xl:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(36)} ${Y(28)} ${Y(-7)}, rgba(0, 0, 0, 0.04) 0 ${Y(17)} ${Y(17)} ${Y(-7)}`},other:{},components:{}};function QP(e){return e===`auto`||e===`dark`||e===`light`}function $P({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return QP(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&QP(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}var eF=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,tF=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function nF(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function rF(e){if(!(e.primaryColor in e.colors))throw Error(eF);if(typeof e.primaryShade==`object`&&(!nF(e.primaryShade.dark)||!nF(e.primaryShade.light))||typeof e.primaryShade==`number`&&!nF(e.primaryShade))throw Error(tF)}function iF(e,t){if(!t)return rF(e),e;let n=yM(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),rF(n),n}var aF=(0,K.createContext)(null),oF=()=>(0,K.useContext)(aF)||ZP;function sF(){let e=(0,K.useContext)(aF);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function cF({theme:e,children:t,inherit:n=!0}){let r=oF(),i=(0,K.useMemo)(()=>iF(n?r:ZP,e),[e,r,n]);return(0,q.jsx)(aF.Provider,{value:i,children:t})}cF.displayName=`@mantine/core/MantineThemeProvider`;function lF(){let e=sF(),t=EP(),n=_M(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=SM(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:TM(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:TM(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,q.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function uF(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function dF(e,t){let n=t?[t]:[`:root`,`:host`],r=uF(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=uF(e.dark),o=uF(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}
55
-
56
- ${a?`${s(`dark`)}{${a}}`:``}
57
-
58
- ${o?`${s(`light`)}{${o}}`:``}`}function fF({color:e,theme:t,autoContrast:n}){return(typeof n==`boolean`?n:t.autoContrast)&&UP({color:e||t.primaryColor,theme:t}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function pF(e,t){return fF({color:e.colors[e.primaryColor][RP(e,t)],theme:e,autoContrast:null})}function mF({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=RP(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:qP(e.colors[t][n],.1),[`--mantine-color-${r}-light-hover`]:qP(e.colors[t][n],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:qP(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=RP(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:qP(e.colors[t][Math.max(0,a-2)],.15),[`--mantine-color-${r}-light-hover`]:qP(e.colors[t][Math.max(0,a-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(a-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:qP(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function hF(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function gF(e,t,n){_M(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var _F=e=>{let t=RP(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:Y(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":pF(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":pF(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};gF(r.variables,e.breakpoints,`breakpoint`),gF(r.variables,e.spacing,`spacing`),gF(r.variables,e.fontSizes,`font-size`),gF(r.variables,e.lineHeights,`line-height`),gF(r.variables,e.shadows,`shadow`),gF(r.variables,e.radius,`radius`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),_M(e.colors).forEach(t=>{let n=e.colors[t];if(hF(n)){Object.assign(r.light,mF({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,mF({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,mF({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,mF({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return _M(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function vF({theme:e,generator:t}){let n=_F(e),r=t?.(e);return r?yM(n,r):n}var yF=_F(ZP);function bF(e){let t={variables:{},light:{},dark:{}};return _M(e.variables).forEach(n=>{yF.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),_M(e.light).forEach(n=>{yF.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),_M(e.dark).forEach(n=>{yF.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function xF(e){return dF({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function SF({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=sF(),r=EP(),i=vF({theme:n,generator:wP()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=dF(a?bF(i):i,e);return o?(0,q.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:xF(e)}`}}):null}SF.displayName=`@mantine/CssVariables`;function CF(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function wF({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,K.useRef)(null),[a,o]=(0,K.useState)(()=>e.get(t)),s=r||a,c=(0,K.useCallback)(t=>{r||(CF(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,K.useCallback)(()=>{o(t),CF(t,n),e.clear()},[e.clear,t]);return(0,K.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),cN(()=>{CF(e.get(t),n)},[]),(0,K.useEffect)(()=>{if(r)return CF(r,n),()=>{};r===void 0&&CF(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&CF(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function TF({respectReducedMotion:e,getRootElement:t}){cN(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function EF({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=$P(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h}){let{colorScheme:g,setColorScheme:_,clearColorScheme:v}=wF({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return TF({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,q.jsx)(SP.Provider,{value:{colorScheme:g,setColorScheme:_,clearColorScheme:v,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h},children:(0,q.jsxs)(cF,{theme:e,children:[o&&(0,q.jsx)(SF,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,q.jsx)(lF,{}),t]})})}EF.displayName=`@mantine/core/MantineProvider`;function DF({children:e,theme:t,env:n}){return(0,q.jsx)(SP.Provider,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:n},children:(0,q.jsx)(cF,{theme:t,children:e})})}DF.displayName=`@mantine/core/HeadlessMantineProvider`;function OF({classNames:e,styles:t,props:n,stylesCtx:r}){let i=sF();return{resolvedClassNames:bP({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:xP({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var kF={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function AF({theme:e,options:t,unstyled:n}){return _P(t?.focusable&&!n&&(e.focusClassName||kF[e.focusRing]),t?.active&&!n&&e.activeClassName)}function jF({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return bP({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function MF({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return bP({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function NF({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function PF({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function FF({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function IF({themeName:e,theme:t,selector:n,props:r,stylesCtx:i}){return e.map(e=>bP({theme:t,classNames:t.components[e]?.classNames,props:r,stylesCtx:i})?.[n])}function LF({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function RF({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,classNames:a,classes:o,unstyled:s,className:c,rootSelector:l,props:u,stylesCtx:d,withStaticClasses:f,headless:p,transformedStyles:m}){return _P(AF({theme:e,options:t,unstyled:s||p}),IF({theme:e,themeName:n,selector:r,props:u,stylesCtx:d}),LF({options:t,classes:o,selector:r,unstyled:s}),MF({selector:r,stylesCtx:d,theme:e,classNames:a,props:u}),MF({selector:r,stylesCtx:d,theme:e,classNames:m,props:u}),jF({selector:r,stylesCtx:d,options:t,props:u,theme:e}),NF({rootSelector:l,selector:r,className:c}),PF({selector:r,classes:o,unstyled:s||p}),f&&!p&&FF({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function zF({theme:e,themeName:t,props:n,stylesCtx:r,selector:i}){return t.map(t=>xP({theme:e,styles:e.components[t]?.styles,props:n,stylesCtx:r})[i]).reduce((e,t)=>({...e,...t}),{})}function BF({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...BF({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function VF(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...EM(t[n])}}),e),{})}function HF({vars:e,varsResolver:t,theme:n,props:r,stylesCtx:i,selector:a,themeName:o,headless:s}){return VF([s?{}:t?.(n,r,i),...o.map(e=>n.components?.[e]?.vars?.(n,r,i)),e?.(n,r,i)])?.[a]}function UF({theme:e,themeName:t,selector:n,options:r,props:i,stylesCtx:a,rootSelector:o,styles:s,style:c,vars:l,varsResolver:u,headless:d,withStylesTransform:f}){return{...!f&&zF({theme:e,themeName:t,props:i,stylesCtx:a,selector:n}),...!f&&xP({theme:e,styles:s,props:i,stylesCtx:a})[n],...!f&&xP({theme:e,styles:r?.styles,props:r?.props||i,stylesCtx:a})[n],...HF({theme:e,props:i,stylesCtx:a,vars:l,varsResolver:u,selector:n,themeName:t,headless:d}),...o===n?BF({style:c,theme:e}):null,...BF({style:r?.style,theme:e})}}function WF({props:e,stylesCtx:t,themeName:n}){let r=sF(),i=AP()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function X({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=sF(),m=TP(),h=DP(),g=OP(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=WF({props:n,stylesCtx:r,themeName:_});return(e,b)=>({className:RF({theme:p,options:b,themeName:_,selector:e,classNamesPrefix:m,classNames:c,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([b?.styles,l])}),style:UF({theme:p,themeName:_,selector:e,options:b,props:n,stylesCtx:r,rootSelector:o,styles:l,style:a,vars:u,varsResolver:d,headless:g,withStylesTransform:v}),...f?.[e]})}function GF(e,t){return typeof e==`boolean`?e:t.autoContrast}function KF(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function qF({keepTransitions:e}={}){let t=(0,K.useRef)(RM),n=(0,K.useRef)(-1),r=(0,K.useContext)(SP),i=(0,K.useRef)(EP()?.());if(!r)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let a=a=>{r.setColorScheme(a),t.current=e?()=>{}:KF(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},o=()=>{r.clearColorScheme(),t.current=e?()=>{}:KF(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=sN(`light`,{getInitialValueInEffect:!1}),c=r.colorScheme===`auto`?s:r.colorScheme,l=(0,K.useCallback)(()=>a(c===`light`?`dark`:`light`),[a,c]);return(0,K.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:a,clearColorScheme:o,toggleColorScheme:l}}var JF=({defaultColorScheme:e,localStorageKey:t,forceColorScheme:n})=>n?`document.documentElement.setAttribute("data-mantine-color-scheme", '${n}');`:`try {
59
- var _colorScheme = window.localStorage.getItem("${t}");
60
- var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${e}";
61
- var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
62
- document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
63
- } catch (e) {}
64
- `;function YF({defaultColorScheme:e=`light`,localStorageKey:t=`mantine-color-scheme-value`,forceColorScheme:n,...r}){let i=[`light`,`dark`,`auto`].includes(e)?e:`light`;return(0,q.jsx)(`script`,{...r,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:JF({defaultColorScheme:i,localStorageKey:t,forceColorScheme:n})}})}function Z(e,t,n){let r=sF(),i=r.components[e]?.defaultProps,a=typeof i==`function`?i(r):i;return{...t,...a,...EM(n)}}function XF(e){return _M(e).reduce((t,n)=>e[n]===void 0?t:`${t}${bM(n)}:${e[n]};`,``).trim()}function ZF({selector:e,styles:t,media:n,container:r}){let i=t?XF(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${XF(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${XF(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function QF(e){let t=EP();return(0,q.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:t?.(),dangerouslySetInnerHTML:{__html:ZF(e)}})}function $F(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,p:u,px:d,py:f,pt:p,pb:m,pl:h,pr:g,pe:_,ps:v,bd:y,bdrs:b,bg:x,c:S,opacity:C,ff:w,fz:T,fw:E,lts:D,ta:O,lh:k,fs:A,tt:j,td:M,w:N,miw:P,maw:ee,h:te,mih:ne,mah:F,bgsz:I,bgp:L,bgr:re,bga:ie,pos:ae,top:oe,left:se,bottom:ce,right:le,inset:ue,display:R,flex:de,hiddenFrom:fe,visibleFrom:pe,lightHidden:me,darkHidden:he,sx:ge,..._e}=e;return{styleProps:EM({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,p:u,px:d,py:f,pt:p,pb:m,pl:h,pr:g,pe:_,ps:v,bd:y,bg:x,c:S,opacity:C,ff:w,fz:T,fw:E,lts:D,ta:O,lh:k,fs:A,tt:j,td:M,w:N,miw:P,maw:ee,h:te,mih:ne,mah:F,bgsz:I,bgp:L,bgr:re,bga:ie,pos:ae,top:oe,left:se,bottom:ce,right:le,inset:ue,display:R,flex:de,bdrs:b,hiddenFrom:fe,visibleFrom:pe,lightHidden:me,darkHidden:he,sx:ge}),rest:_e}}var eI={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function tI(e,t){let n=UP({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function nI(e,t){let n=UP({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:tI(e,t)}function rI(e,t){if(typeof e==`number`)return Y(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${Y(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${tI(i.join(` `),t)}`),a.trim()}return e}var iI={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function aI(e){return typeof e==`string`&&e in iI?iI[e]:e}var oI=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function sI(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&oI.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?Y(e):e}function cI(e){return e}var lI=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function uI(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&lI.includes(e)?`var(--mantine-${e}-line-height)`:e}function dI(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?Y(e):e}function fI(e){return typeof e==`number`?Y(e):e}function pI(e,t){if(typeof e==`number`)return Y(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return Y(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var mI={color:tI,textColor:nI,fontSize:sI,spacing:pI,radius:dI,identity:cI,size:fI,lineHeight:uI,fontFamily:aI,border:rI};function hI(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function gI({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(hI(e))-Number(hI(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function _I(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]===`base`)}function vI(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function yI(e){return typeof e==`object`&&e?_M(e).filter(e=>e!==`base`):[]}function bI(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function xI({styleProps:e,data:t,theme:n}){return gI(_M(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=vI(e[i]);if(!_I(e[i]))return o.forEach(e=>{r.inlineStyles[e]=mI[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=yI(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=mI[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:mI[a.type](bI(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function SI(){return`__m__-${(0,K.useId)().replace(/[:«»]/g,``)}`}function CI(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...CI(n,t)}),{}):typeof e==`function`?e(t):e??{}}function wI(e){return e}function TI(e){return e.startsWith(`data-`)?e:`data-${e}`}function EI(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[TI(n)]=e[n]),t},{})}function DI(e){return e?typeof e==`string`?{[TI(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...DI(t)}),{}):EI(e):null}function OI(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...OI(n,t)}),{}):typeof e==`function`?e(t):e??{}}function kI({theme:e,style:t,vars:n,styleProps:r}){let i=OI(t,e),a=OI(n,e);return{...i,...a,...r}}var AI=(0,K.forwardRef)(({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,...p},m)=>{let h=sF(),g=e||`div`,{styleProps:_,rest:v}=$F(p),y=kP()?.()?.(_.sx),b=SI(),x=xI({styleProps:_,theme:h,data:eI}),S={ref:m,style:kI({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:_P(r,y,{[b]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":DM(o)?void 0:o||void 0,size:f,...DI(a),...v};return(0,q.jsxs)(q.Fragment,{children:[x.hasResponsiveStyles&&(0,q.jsx)(QF,{selector:`.${b}`,styles:x.styles,media:x.media}),typeof d==`function`?d(S):(0,q.jsx)(g,{...S})]})});AI.displayName=`@mantine/core/Box`;var Q=wI(AI);function jI(e){return e}function MI(e){let t=e;return e=>{let n=(0,K.forwardRef)((n,r)=>(0,q.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function $(e){let t=(0,K.forwardRef)(e);return t.extend=jI,t.withProps=e=>{let n=(0,K.forwardRef)((n,r)=>(0,q.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function NI(e){let t=(0,K.forwardRef)(e);return t.withProps=e=>{let n=(0,K.forwardRef)((n,r)=>(0,q.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=jI,t}var PI=(0,K.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function FI(){return(0,K.useContext)(PI)}var II=o((e=>{var t=Tk();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),LI=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=II()}));function RI(){return typeof window<`u`}function zI(e){return HI(e)?(e.nodeName||``).toLowerCase():`#document`}function BI(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function VI(e){return((HI(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function HI(e){return RI()?e instanceof Node||e instanceof BI(e).Node:!1}function UI(e){return RI()?e instanceof Element||e instanceof BI(e).Element:!1}function WI(e){return RI()?e instanceof HTMLElement||e instanceof BI(e).HTMLElement:!1}function GI(e){return!RI()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof BI(e).ShadowRoot}var KI=new Set([`inline`,`contents`]);function qI(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=oL(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!KI.has(i)}var JI=new Set([`table`,`td`,`th`]);function YI(e){return JI.has(zI(e))}var XI=[`:popover-open`,`:modal`];function ZI(e){return XI.some(t=>{try{return e.matches(t)}catch{return!1}})}var QI=[`transform`,`translate`,`scale`,`rotate`,`perspective`],$I=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],eL=[`paint`,`layout`,`strict`,`content`];function tL(e){let t=rL(),n=UI(e)?oL(e):e;return QI.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||$I.some(e=>(n.willChange||``).includes(e))||eL.some(e=>(n.contain||``).includes(e))}function nL(e){let t=cL(e);for(;WI(t)&&!aL(t);){if(tL(t))return t;if(ZI(t))return null;t=cL(t)}return null}function rL(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var iL=new Set([`html`,`body`,`#document`]);function aL(e){return iL.has(zI(e))}function oL(e){return BI(e).getComputedStyle(e)}function sL(e){return UI(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cL(e){if(zI(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||GI(e)&&e.host||VI(e);return GI(t)?t.host:t}function lL(e){let t=cL(e);return aL(t)?e.ownerDocument?e.ownerDocument.body:e.body:WI(t)&&qI(t)?t:lL(t)}function uL(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=lL(e),i=r===e.ownerDocument?.body,a=BI(r);if(i){let e=dL(a);return t.concat(a,a.visualViewport||[],qI(r)?r:[],e&&n?uL(e):[])}return t.concat(r,uL(r,[],n))}function dL(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var fL=[`top`,`right`,`bottom`,`left`],pL=Math.min,mL=Math.max,hL=Math.round,gL=Math.floor,_L=e=>({x:e,y:e}),vL={left:`right`,right:`left`,bottom:`top`,top:`bottom`},yL={start:`end`,end:`start`};function bL(e,t,n){return mL(e,pL(t,n))}function xL(e,t){return typeof e==`function`?e(t):e}function SL(e){return e.split(`-`)[0]}function CL(e){return e.split(`-`)[1]}function wL(e){return e===`x`?`y`:`x`}function TL(e){return e===`y`?`height`:`width`}var EL=new Set([`top`,`bottom`]);function DL(e){return EL.has(SL(e))?`y`:`x`}function OL(e){return wL(DL(e))}function kL(e,t,n){n===void 0&&(n=!1);let r=CL(e),i=OL(e),a=TL(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=RL(o)),[o,RL(o)]}function AL(e){let t=RL(e);return[jL(e),t,jL(t)]}function jL(e){return e.replace(/start|end/g,e=>yL[e])}var ML=[`left`,`right`],NL=[`right`,`left`],PL=[`top`,`bottom`],FL=[`bottom`,`top`];function IL(e,t,n){switch(e){case`top`:case`bottom`:return n?t?NL:ML:t?ML:NL;case`left`:case`right`:return t?PL:FL;default:return[]}}function LL(e,t,n,r){let i=CL(e),a=IL(SL(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(jL)))),a}function RL(e){return e.replace(/left|right|bottom|top/g,e=>vL[e])}function zL(e){return{top:0,right:0,bottom:0,left:0,...e}}function BL(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:zL(e)}function VL(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function HL(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function UL(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function WL(){return/apple/i.test(navigator.vendor)}function GL(){return HL().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function KL(){return UL().includes(`jsdom/`)}var qL=`data-floating-ui-focusable`,JL=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function YL(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function XL(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&GI(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ZL(e){return`composedPath`in e?e.composedPath()[0]:e.target}function QL(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function $L(e){return e.matches(`html,body`)}function eR(e){return e?.ownerDocument||document}function tR(e){return WI(e)&&e.matches(JL)}function nR(e){if(!e||KL())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function rR(e){return e?e.hasAttribute(qL)?e:e.querySelector(`[`+qL+`]`)||e:null}function iR(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...iR(e,t.id,n)])}function aR(e){return`nativeEvent`in e}function oR(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var sR=typeof document<`u`?K.useLayoutEffect:function(){},cR={...K};function lR(e){let t=K.useRef(e);return sR(()=>{t.current=e}),t}var uR=cR.useInsertionEffect||(e=>e());function dR(e){let t=K.useRef(()=>{});return uR(()=>{t.current=e}),K.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function fR(e,t,n){let{reference:r,floating:i}=e,a=DL(t),o=OL(t),s=TL(o),c=SL(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(CL(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function pR(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xL(t,e),p=BL(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=VL(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=VL(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var mR=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=fR(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??pR},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=fR(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},hR=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xL(e,t)||{};if(l==null)return{};let d=BL(u),f={x:n,y:r},p=OL(i),m=TL(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=pL(d[_],T),D=pL(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=bL(O,A,k),M=!c.arrow&&CL(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),gR=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xL(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=SL(r),_=DL(o),v=SL(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[RL(o)]:AL(o)),x=p!==`none`;!d&&x&&b.push(...LL(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=kL(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==DL(t))||T.every(e=>DL(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=DL(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function _R(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vR(e){return fL.some(t=>e[t]>=0)}var yR=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=xL(e,t);switch(i){case`referenceHidden`:{let e=_R(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vR(e)}}}case`escaped`:{let e=_R(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vR(e)}}}default:return{}}}}};function bR(e){let t=pL(...e.map(e=>e.left)),n=pL(...e.map(e=>e.top)),r=mL(...e.map(e=>e.right)),i=mL(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function xR(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>VL(bR(e)))}var SR=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=xL(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=xR(u),f=VL(bR(u)),p=BL(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(DL(n)===`y`){let e=d[0],t=d[d.length-1],r=SL(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=SL(n)===`left`,t=mL(...d.map(e=>e.right)),r=pL(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},CR=new Set([`left`,`top`]);async function wR(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=SL(n),s=CL(n),c=DL(n)===`y`,l=CR.has(o)?-1:1,u=a&&c?-1:1,d=xL(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var TR=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await wR(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ER=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xL(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=DL(SL(i)),p=wL(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=bL(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=bL(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},DR=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=xL(e,t),u={x:n,y:r},d=DL(i),f=wL(d),p=u[f],m=u[d],h=xL(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=CR.has(SL(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},OR=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=xL(e,t),u=await o.detectOverflow(t,l),d=SL(i),f=CL(i),p=DL(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=pL(h-u[g],v),x=pL(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=mL(u.left,0),t=mL(u.right,0),n=mL(u.top,0),r=mL(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:mL(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:mL(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function kR(e){let t=oL(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=WI(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=hL(n)!==a||hL(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function AR(e){return UI(e)?e:e.contextElement}function jR(e){let t=AR(e);if(!WI(t))return _L(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kR(t),o=(a?hL(n.width):n.width)/r,s=(a?hL(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var MR=_L(0);function NR(e){let t=BI(e);return!rL()||!t.visualViewport?MR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==BI(e)?!1:t}function FR(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=AR(e),o=_L(1);t&&(r?UI(r)&&(o=jR(r)):o=jR(e));let s=PR(a,n,r)?NR(a):_L(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=BI(a),t=r&&UI(r)?BI(r):r,n=e,i=dL(n);for(;i&&r&&t!==n;){let e=jR(i),t=i.getBoundingClientRect(),r=oL(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=BI(i),i=dL(n)}}return VL({width:u,height:d,x:c,y:l})}function IR(e,t){let n=sL(e).scrollLeft;return t?t.left+n:FR(VI(e)).left+n}function LR(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-IR(e,n),y:n.top+t.scrollTop}}function RR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=VI(r),s=t?ZI(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=_L(1),u=_L(0),d=WI(r);if((d||!d&&!a)&&((zI(r)!==`body`||qI(o))&&(c=sL(r)),WI(r))){let e=FR(r);l=jR(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?LR(o,c):_L(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function zR(e){return Array.from(e.getClientRects())}function BR(e){let t=VI(e),n=sL(e),r=e.ownerDocument.body,i=mL(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=mL(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+IR(e),s=-n.scrollTop;return oL(r).direction===`rtl`&&(o+=mL(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var VR=25;function HR(e,t){let n=BI(e),r=VI(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=rL();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=IR(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=VR&&(a-=o)}else l<=VR&&(a+=l);return{width:a,height:o,x:s,y:c}}var UR=new Set([`absolute`,`fixed`]);function WR(e,t){let n=FR(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=WI(e)?jR(e):_L(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function GR(e,t,n){let r;if(t===`viewport`)r=HR(e,n);else if(t===`document`)r=BR(VI(e));else if(UI(t))r=WR(t,n);else{let n=NR(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return VL(r)}function KR(e,t){let n=cL(e);return n===t||!UI(n)||aL(n)?!1:oL(n).position===`fixed`||KR(n,t)}function qR(e,t){let n=t.get(e);if(n)return n;let r=uL(e,[],!1).filter(e=>UI(e)&&zI(e)!==`body`),i=null,a=oL(e).position===`fixed`,o=a?cL(e):e;for(;UI(o)&&!aL(o);){let t=oL(o),n=tL(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&UR.has(i.position)||qI(o)&&!n&&KR(e,o))?r=r.filter(e=>e!==o):i=t,o=cL(o)}return t.set(e,r),r}function JR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ZI(t)?[]:qR(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=GR(t,n,i);return e.top=mL(r.top,e.top),e.right=pL(r.right,e.right),e.bottom=pL(r.bottom,e.bottom),e.left=mL(r.left,e.left),e},GR(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function YR(e){let{width:t,height:n}=kR(e);return{width:t,height:n}}function XR(e,t,n){let r=WI(t),i=VI(t),a=n===`fixed`,o=FR(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=_L(0);function l(){c.x=IR(i)}if(r||!r&&!a)if((zI(t)!==`body`||qI(i))&&(s=sL(t)),r){let e=FR(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?LR(i,s):_L(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function ZR(e){return oL(e).position===`static`}function QR(e,t){if(!WI(e)||oL(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return VI(e)===n&&(n=n.ownerDocument.body),n}function $R(e,t){let n=BI(e);if(ZI(e))return n;if(!WI(e)){let t=cL(e);for(;t&&!aL(t);){if(UI(t)&&!ZR(t))return t;t=cL(t)}return n}let r=QR(e,t);for(;r&&YI(r)&&ZR(r);)r=QR(r,t);return r&&aL(r)&&ZR(r)&&!tL(r)?n:r||nL(e)||n}var ez=async function(e){let t=this.getOffsetParent||$R,n=this.getDimensions,r=await n(e.floating);return{reference:XR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tz(e){return oL(e).direction===`rtl`}var nz={convertOffsetParentRelativeRectToViewportRelativeRect:RR,getDocumentElement:VI,getClippingRect:JR,getOffsetParent:$R,getElementRects:ez,getClientRects:zR,getDimensions:YR,getScale:jR,isElement:UI,isRTL:tz};function rz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iz(e,t){let n=null,r,i=VI(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=gL(d),h=gL(i.clientWidth-(u+f)),g=gL(i.clientHeight-(d+p)),_=gL(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:mL(0,pL(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!rz(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function az(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=AR(e),u=i||a?[...l?uL(l):[],...uL(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?iz(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?FR(e):null;c&&g();function g(){let t=FR(e);h&&!rz(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var oz=TR,sz=ER,cz=gR,lz=OR,uz=yR,dz=hR,fz=SR,pz=DR,mz=(e,t,n)=>{let r=new Map,i={platform:nz,...n},a={...i.platform,_c:r};return mR(e,t,{...i,platform:a})},hz=l(LI(),1),gz=typeof document<`u`?K.useLayoutEffect:function(){};function _z(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_z(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!_z(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function vz(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yz(e,t){let n=vz(e);return Math.round(t*n)/n}function bz(e){let t=K.useRef(e);return gz(()=>{t.current=e}),t}function xz(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=K.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=K.useState(r);_z(f,r)||p(r);let[m,h]=K.useState(null),[g,_]=K.useState(null),v=K.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=K.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=K.useRef(null),C=K.useRef(null),w=K.useRef(u),T=c!=null,E=bz(c),D=bz(i),O=bz(l),k=K.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),mz(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!_z(w.current,t)&&(w.current=t,hz.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);gz(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=K.useRef(!1);gz(()=>(A.current=!0,()=>{A.current=!1}),[]),gz(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=K.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=K.useMemo(()=>({reference:b,floating:x}),[b,x]),N=K.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=yz(M.floating,u.x),r=yz(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...vz(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return K.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Sz=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:dz({element:r.current,padding:i}).fn(n):r?dz({element:r,padding:i}).fn(n):{}}}},Cz=(e,t)=>({...oz(e),options:[e,t]}),wz=(e,t)=>({...sz(e),options:[e,t]}),Tz=(e,t)=>({...pz(e),options:[e,t]}),Ez=(e,t)=>({...cz(e),options:[e,t]}),Dz=(e,t)=>({...lz(e),options:[e,t]}),Oz=(e,t)=>({...uz(e),options:[e,t]}),kz=(e,t)=>({...fz(e),options:[e,t]}),Az=(e,t)=>({...Sz(e),options:[e,t]});function jz(e){let t=K.useRef(void 0),n=K.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return K.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Mz=`data-floating-ui-focusable`,Nz=`active`,Pz=`selected`,Fz=`ArrowLeft`,Iz=`ArrowRight`,Lz=`ArrowUp`,Rz=`ArrowDown`,zz=[Fz,Iz],Bz=[Lz,Rz];[...zz,...Bz];var Vz={...K},Hz=!1,Uz=0,Wz=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Uz++;function Gz(){let[e,t]=K.useState(()=>Hz?Wz():void 0);return sR(()=>{e??t(Wz())},[]),K.useEffect(()=>{Hz=!0},[]),e}var Kz=Vz.useId||Gz;function qz(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Jz=K.createContext(null),Yz=K.createContext(null),Xz=()=>K.useContext(Jz)?.id||null,Zz=()=>K.useContext(Yz);function Qz(e){return`data-floating-ui-`+e}function $z(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var eB=Qz(`safe-polygon`);function tB(e,t,n){if(n&&!oR(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function nB(e){return typeof e==`function`?e():e}function rB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Zz(),m=Xz(),h=lR(l),g=lR(c),_=lR(n),v=lR(d),y=K.useRef(),b=K.useRef(-1),x=K.useRef(),S=K.useRef(-1),C=K.useRef(!0),w=K.useRef(!1),T=K.useRef(()=>{}),E=K.useRef(!1),D=dR(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});K.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||($z(b),$z(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),K.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=eR(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=K.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=tB(g.current,`close`,y.current);i&&!x.current?($z(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&($z(b),r(!1,e,n))},[g,r]),k=dR(()=>{T.current(),x.current=void 0}),A=dR(()=>{if(w.current){let e=eR(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(eB),w.current=!1}}),j=dR(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);K.useEffect(()=>{if(!s)return;function e(e){if($z(b),C.current=!1,u&&!oR(y.current)||nB(v.current)>0&&!tB(g.current,`open`))return;let t=tB(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=eR(o.floating);if($z(S),E.current=!1,h.current&&i.current.floatingContext){n||$z(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!XL(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){$z(b)}function l(e){j()||O(e,!1)}if(UI(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),sR(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(UI(o.domReference)&&e){var t;let n=eR(o.floating).body;n.setAttribute(eB,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),sR(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),K.useEffect(()=>()=>{k(),$z(b),$z(S),A()},[s,o.domReference,k,A]);let M=K.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!oR(y.current)||n||nB(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||($z(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,nB(v.current))))}}},[u,r,n,_,v]);return K.useMemo(()=>s?{reference:M}:{},[s,M])}var iB=()=>{},aB=K.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:iB,setState:iB,isInstantPhase:!1}),oB=()=>K.useContext(aB);function sB(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=K.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=K.useRef(null),s=K.useCallback(e=>{a({currentId:e})},[]);return sR(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,q.jsx)(aB.Provider,{value:K.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function cB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=oB(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return sR(()=>{o&&l&&(f({delay:{open:1,close:tB(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),sR(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),sR(()=>{o&&(u===iB||!n||u(s))},[o,n,u,s]),c}var lB={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},uB={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},dB=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function fB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Zz(),g=dR(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=K.useRef(!1),{escapeKey:y,outsidePress:b}=dB(p),{escapeKey:x,outsidePress:S}=dB(m),C=K.useRef(!1),w=dR(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?iR(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,aR(e)?e.nativeEvent:e,`escape-key`)}),T=dR(e=>{var t;let n=()=>{var t;w(e),(t=ZL(e))==null||t.removeEventListener(`keydown`,n)};(t=ZL(e))==null||t.addEventListener(`keydown`,n)}),E=dR(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=ZL(e),s=`[`+Qz(`inert`)+`]`,c=eR(i.floating).querySelectorAll(s),u=UI(o)?o:null;for(;u&&!aL(u);){let e=cL(u);if(aL(e)||!UI(e))break;u=e}if(c.length&&UI(o)&&!$L(o)&&!XL(o,i.floating)&&Array.from(c).every(e=>!XL(u,e)))return;if(WI(o)&&k){let t=aL(o),n=oL(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&iR(h.nodesRef.current,d).some(t=>QL(e,t.context?.elements.floating));if(QL(e,i.floating)||QL(e,i.domReference)||f)return;let p=h?iR(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=dR(e=>{var t;let n=()=>{var t;E(e),(t=ZL(e))==null||t.removeEventListener(l,n)};(t=ZL(e))==null||t.addEventListener(l,n)});K.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},rL()?5:0)}let d=eR(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(UI(i.domReference)&&(p=uL(i.domReference)),UI(i.floating)&&(p=p.concat(uL(i.floating))),!UI(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(uL(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),K.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=K.useMemo(()=>({onKeyDown:w,...u&&{[lB[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=K.useMemo(()=>({onKeyDown:w,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[uB[l]]:()=>{a.current.insideReactTree=!0}}),[w,l,a]);return K.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function pB(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Kz(),a=K.useRef({}),[o]=K.useState(()=>qz()),s=Xz()!=null,[c,l]=K.useState(r.reference),u=dR((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=K.useMemo(()=>({setPositionReference:l}),[]),f=K.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return K.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function mB(e){e===void 0&&(e={});let{nodeId:t}=e,n=pB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=K.useState(null),[s,c]=K.useState(null),l=i?.domReference||a,u=K.useRef(null),d=Zz();sR(()=>{l&&(u.current=l)},[l]);let f=xz({...e,elements:{...i,...s&&{reference:s}}}),p=K.useCallback(e=>{let t=UI(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=K.useCallback(e=>{(UI(e)||e===null)&&(u.current=e,o(e)),(UI(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!UI(e))&&f.refs.setReference(e)},[f.refs]),h=K.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=K.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=K.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return sR(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),K.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function hB(){return GL()&&WL()}function gB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=K.useRef(!1),u=K.useRef(-1),d=K.useRef(!0);K.useEffect(()=>{if(!s)return;let e=BI(o.domReference);function t(){!n&&WI(o.domReference)&&o.domReference===YL(eR(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),hB()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),hB()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),K.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),K.useEffect(()=>()=>{$z(u)},[]);let f=K.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=ZL(e.nativeEvent);if(c&&UI(t)){if(hB()&&!e.relatedTarget){if(!d.current&&!tR(t))return}else if(!nR(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=UI(t)&&t.hasAttribute(Qz(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=YL(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||XL(a.current.floatingContext?.refs.floating.current,e)||XL(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return K.useMemo(()=>s?{reference:f}:{},[s,f])}function _B(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Nz]:t,[Pz]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Mz]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Nz,Pz].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function vB(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=K.useCallback(t=>_B(t,e,`reference`),t),a=K.useCallback(t=>_B(t,e,`floating`),n),o=K.useCallback(t=>_B(t,e,`item`),r);return K.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var yB=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function bB(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Kz(),c=r.domReference?.id||s,l=K.useMemo(()=>rR(r.floating)?.id||i,[r.floating,i]),u=yB.get(o)??o,d=Xz()!=null,f=K.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=K.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=K.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return K.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var xB={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`},[SB,CB]=kM(`ScrollArea.Root component was not found in tree`);function wB(e,t){let n=eN(t);cN(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var TB=(0,K.forwardRef)((e,t)=>{let{style:n,...r}=e,i=CB(),[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(0),l=!!(a&&s);return wB(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),wB(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,q.jsx)(`div`,{...r,ref:t,style:{...n,width:a,height:s}}):null}),EB=(0,K.forwardRef)((e,t)=>{let n=CB(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,q.jsx)(TB,{...e,ref:t}):null}),DB={scrollHideDelay:1e3,type:`hover`},OB=(0,K.forwardRef)((e,t)=>{let{type:n,scrollHideDelay:r,scrollbars:i,getStyles:a,...o}=Z(`ScrollAreaRoot`,DB,e),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(0),[y,b]=(0,K.useState)(0),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),T=kN(t,e=>c(e));return(0,q.jsx)(SB,{value:{type:n,scrollHideDelay:r,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:a},children:(0,q.jsx)(Q,{...o,ref:T,__vars:{"--sa-corner-width":i===`xy`?`${_}px`:`0px`,"--sa-corner-height":i===`xy`?`${y}px`:`0px`}})})});OB.displayName=`@mantine/core/ScrollAreaRoot`;function kB(e,t){let n=e/t;return Number.isNaN(n)?0:n}function AB(e){let t=kB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function jB(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function MB(e,[t,n]){return Math.min(n,Math.max(t,e))}function NB(e,t,n=`ltr`){let r=AB(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=MB(e,n===`ltr`?[0,o]:[o*-1,0]);return jB([0,o],[0,s])(c)}function PB(e,t,n,r=`ltr`){let i=AB(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return jB([c,l],d)(e)}function FB(e,t){return e>0&&e<t}function IB(e){return e?parseInt(e,10):0}function LB(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[RB,zB]=kM(`ScrollAreaScrollbar was not found in tree`),BB=(0,K.forwardRef)((e,t)=>{let{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:l,onResize:u,...d}=e,f=CB(),[p,m]=(0,K.useState)(null),h=kN(t,e=>m(e)),g=(0,K.useRef)(null),_=(0,K.useRef)(``),{viewport:v}=f,y=n.content-n.viewport,b=eN(l),x=eN(s),S=tN(u,10),C=e=>{g.current&&c({x:e.clientX-g.current.left,y:e.clientY-g.current.top})};return(0,K.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y,b]),(0,K.useEffect)(x,[n,x]),wB(p,S),wB(f.content,S),(0,q.jsx)(RB,{value:{scrollbar:p,hasThumb:r,onThumbChange:eN(i),onThumbPointerUp:eN(a),onThumbPositionChange:x,onThumbPointerDown:eN(o)},children:(0,q.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:LB(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:LB(e.onPointerMove,C),onPointerUp:LB(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}),VB=(0,K.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,style:i,...a}=e,o=CB(),[s,c]=(0,K.useState)(),l=(0,K.useRef)(null),u=kN(t,l,o.onScrollbarXChange);return(0,K.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,q.jsx)(BB,{"data-orientation":`horizontal`,...a,ref:u,sizes:n,style:{...i,"--sa-thumb-width":`${AB(n)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),FB(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:IB(s.paddingLeft),paddingEnd:IB(s.paddingRight)}})}})});VB.displayName=`@mantine/core/ScrollAreaScrollbarX`;var HB=(0,K.forwardRef)((e,t)=>{let{sizes:n,onSizesChange:r,style:i,...a}=e,o=CB(),[s,c]=(0,K.useState)(),l=(0,K.useRef)(null),u=kN(t,l,o.onScrollbarYChange);return(0,K.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,q.jsx)(BB,{...a,"data-orientation":`vertical`,ref:u,sizes:n,style:{"--sa-thumb-height":`${AB(n)}px`,...i},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),FB(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:IB(s.paddingTop),paddingEnd:IB(s.paddingBottom)}})}})});HB.displayName=`@mantine/core/ScrollAreaScrollbarY`;var UB=(0,K.forwardRef)((e,t)=>{let{orientation:n=`vertical`,...r}=e,{dir:i}=FI(),a=CB(),o=(0,K.useRef)(null),s=(0,K.useRef)(0),[c,l]=(0,K.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=kB(c.viewport,c.content),d={...r,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:e=>{o.current=e},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:e=>{s.current=e}},f=(e,t)=>PB(e,s.current,c,t);return n===`horizontal`?(0,q.jsx)(VB,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=a.viewport.scrollLeft,t=NB(e,c,i);o.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=f(e,i))}}):n===`vertical`?(0,q.jsx)(HB,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=a.viewport.scrollTop,t=NB(e,c);c.scrollbar.size===0?o.current.style.setProperty(`--thumb-opacity`,`0`):o.current.style.setProperty(`--thumb-opacity`,`1`),o.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=f(e))}}):null});UB.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;var WB=(0,K.forwardRef)((e,t)=>{let n=CB(),{forceMount:r,...i}=e,[a,o]=(0,K.useState)(!1),s=e.orientation===`horizontal`,c=tN(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return wB(n.viewport,c),wB(n.content,c),r||a?(0,q.jsx)(UB,{"data-state":a?`visible`:`hidden`,...i,ref:t}):null});WB.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;var GB=(0,K.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=CB(),[a,o]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let{scrollArea:e}=i,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),n||a?(0,q.jsx)(WB,{"data-state":a?`visible`:`hidden`,...r,ref:t}):null});GB.displayName=`@mantine/core/ScrollAreaScrollbarHover`;var KB=(0,K.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=CB(),a=e.orientation===`horizontal`,[o,s]=(0,K.useState)(`hidden`),c=tN(()=>s(`idle`),100);return(0,K.useEffect)(()=>{if(o===`idle`){let e=window.setTimeout(()=>s(`hidden`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[o,i.scrollHideDelay]),(0,K.useEffect)(()=>{let{viewport:e}=i,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(s(`scrolling`),c()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c]),n||o!==`hidden`?(0,q.jsx)(UB,{"data-state":o===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:LB(e.onPointerEnter,()=>s(`interacting`)),onPointerLeave:LB(e.onPointerLeave,()=>s(`idle`))}):null}),qB=(0,K.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=CB(),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return(0,K.useEffect)(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,q.jsx)(GB,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,q.jsx)(KB,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,q.jsx)(WB,{...r,ref:t,forceMount:n}):i.type===`always`?(0,q.jsx)(UB,{...r,ref:t}):null});qB.displayName=`@mantine/core/ScrollAreaScrollbar`;function JB(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}var YB=(0,K.forwardRef)((e,t)=>{let{style:n,...r}=e,i=CB(),a=zB(),{onThumbPositionChange:o}=a,s=kN(t,e=>a.onThumbChange(e)),c=(0,K.useRef)(void 0),l=tN(()=>{c.current&&=(c.current(),void 0)},100);return(0,K.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{l(),c.current||(c.current=JB(e,o),o())};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,q.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...n},onPointerDownCapture:LB(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:LB(e.onPointerUp,a.onThumbPointerUp)})});YB.displayName=`@mantine/core/ScrollAreaThumb`;var XB=(0,K.forwardRef)((e,t)=>{let{forceMount:n,...r}=e,i=zB();return n||i.hasThumb?(0,q.jsx)(YB,{ref:t,...r}):null});XB.displayName=`@mantine/core/ScrollAreaThumb`;var ZB=(0,K.forwardRef)(({children:e,style:t,onWheel:n,...r},i)=>{let a=CB(),o=kN(i,a.onViewportChange),s=e=>{if(n?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,q.jsx)(Q,{...r,ref:o,onWheel:s,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,q.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})});ZB.displayName=`@mantine/core/ScrollAreaViewport`;var QB={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},$B=hP((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":Y(t),"--scrollarea-over-scroll-behavior":i}}}),eV=$((e,t)=>{let n=Z(`ScrollArea`,QB,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,scrollbarSize:c,vars:l,type:u,scrollHideDelay:d,viewportProps:f,viewportRef:p,onScrollPositionChange:m,children:h,offsetScrollbars:g,scrollbars:_,onBottomReached:v,onTopReached:y,overscrollBehavior:b,attributes:x,...S}=n,[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),k=X({name:`ScrollArea`,props:n,classes:xB,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:x,vars:l,varsResolver:$B}),A=(0,K.useRef)(null),j=jz([p,A]);return(0,K.useEffect)(()=>{if(!A.current||g!==`present`)return;let e=A.current,t=new ResizeObserver(()=>{let{scrollHeight:t,clientHeight:n,scrollWidth:r,clientWidth:i}=e;E(t>n),O(r>i)});return t.observe(e),()=>t.disconnect()},[A,g]),(0,q.jsxs)(OB,{getStyles:k,type:u===`never`?`always`:u,scrollHideDelay:d,ref:t,scrollbars:_,...k(`root`),...S,children:[(0,q.jsx)(ZB,{...f,...k(`viewport`,{style:f?.style}),ref:j,"data-offset-scrollbars":g===!0?`xy`:g||void 0,"data-scrollbars":_||void 0,"data-horizontal-hidden":g===`present`&&!D?`true`:void 0,"data-vertical-hidden":g===`present`&&!T?`true`:void 0,onScroll:e=>{f?.onScroll?.(e),m?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t-(n-r)>=-.8&&v?.(),t===0&&y?.()},children:h}),(_===`xy`||_===`x`)&&(0,q.jsx)(qB,{...k(`scrollbar`),orientation:`horizontal`,"data-hidden":u===`never`||g===`present`&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,q.jsx)(XB,{...k(`thumb`)})}),(_===`xy`||_===`y`)&&(0,q.jsx)(qB,{...k(`scrollbar`),orientation:`vertical`,"data-hidden":u===`never`||g===`present`&&!T?!0:void 0,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,q.jsx)(XB,{...k(`thumb`)})}),(0,q.jsx)(EB,{...k(`corner`),"data-hovered":C||void 0,"data-hidden":u===`never`||void 0})]})});eV.displayName=`@mantine/core/ScrollArea`;var tV=$((e,t)=>{let{children:n,classNames:r,styles:i,scrollbarSize:a,scrollHideDelay:o,type:s,dir:c,offsetScrollbars:l,overscrollBehavior:u,viewportRef:d,onScrollPositionChange:f,unstyled:p,variant:m,viewportProps:h,scrollbars:g,style:_,vars:v,onBottomReached:y,onTopReached:b,onOverflowChange:x,...S}=Z(`ScrollAreaAutosize`,QB,e),C=(0,K.useRef)(null),w=jz([d,C]),[T,E]=(0,K.useState)(!1),D=(0,K.useRef)(!1);return(0,K.useEffect)(()=>{if(!x)return;let e=C.current;if(!e)return;let t=()=>{let t=e.scrollHeight>e.clientHeight;t!==T&&(D.current?x?.(t):(D.current=!0,t&&x?.(!0)),E(t))};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[x,T]),(0,q.jsx)(Q,{...S,ref:t,style:[{display:`flex`,overflow:`hidden`},_],children:(0,q.jsx)(Q,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...g===`y`&&{minWidth:0},...g===`x`&&{minHeight:0},...g===`xy`&&{minWidth:0,minHeight:0},...g===!1&&{minWidth:0,minHeight:0}},children:(0,q.jsx)(eV,{classNames:r,styles:i,scrollHideDelay:o,scrollbarSize:a,type:s,dir:c,offsetScrollbars:l,overscrollBehavior:u,viewportRef:w,onScrollPositionChange:f,unstyled:p,variant:m,viewportProps:h,vars:v,scrollbars:g,onBottomReached:y,onTopReached:b,"data-autosize":`true`,children:n})})})});eV.classes=xB,tV.displayName=`@mantine/core/ScrollAreaAutosize`,tV.classes=xB,eV.Autosize=tV;var nV={root:`m_87cf2631`},rV={__staticSelector:`UnstyledButton`},iV=NI((e,t)=>{let n=Z(`UnstyledButton`,rV,e),{className:r,component:i=`button`,__staticSelector:a,unstyled:o,classNames:s,styles:c,style:l,attributes:u,...d}=n;return(0,q.jsx)(Q,{...X({name:a,props:n,classes:nV,className:r,style:l,classNames:s,styles:c,unstyled:o,attributes:u})(`root`,{focusable:!0}),component:i,ref:t,type:i===`button`?`button`:void 0,...d})});iV.classes=nV,iV.displayName=`@mantine/core/UnstyledButton`;var aV={root:`m_515a97f8`},oV=$((e,t)=>{let n=Z(`VisuallyHidden`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,attributes:l,...u}=n;return(0,q.jsx)(Q,{component:`span`,ref:t,...X({name:`VisuallyHidden`,classes:aV,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:l})(`root`),...u})});oV.classes=aV,oV.displayName=`@mantine/core/VisuallyHidden`;var sV={root:`m_1b7284a3`},cV=hP((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:HM(t),"--paper-shadow":GM(n)}})),lV=NI((e,t)=>{let n=Z(`Paper`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,withBorder:c,vars:l,radius:u,shadow:d,variant:f,mod:p,attributes:m,...h}=n,g=X({name:`Paper`,props:n,classes:sV,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:l,varsResolver:cV});return(0,q.jsx)(Q,{ref:t,mod:[{"data-with-border":c},p],...g(`root`),variant:f,...h})});lV.classes=sV,lV.displayName=`@mantine/core/Paper`;function uV(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function dV(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var fV={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function pV({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[fV[c]]:r},d=-t/2;return c===`left`?{...u,...uV(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...uV(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...dV(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...dV(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}var mV=(0,K.forwardRef)(({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l},u)=>{let{dir:d}=FI();return a?(0,q.jsx)(`div`,{...l,ref:u,style:{...c,...pV({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:d,arrowX:o,arrowY:s})}}):null});mV.displayName=`@mantine/core/FloatingArrow`;function hV(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}var gV={root:`m_9814e45f`},_V={zIndex:LM(`modal`)},vV=hP((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&KP(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${Y(i)})`:void 0,"--overlay-radius":a===void 0?void 0:HM(a),"--overlay-z-index":o?.toString()}})),yV=NI((e,t)=>{let n=Z(`Overlay`,_V,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,fixed:l,center:u,children:d,radius:f,zIndex:p,gradient:m,blur:h,color:g,backgroundOpacity:_,mod:v,attributes:y,...b}=n;return(0,q.jsx)(Q,{ref:t,...X({name:`Overlay`,props:n,classes:gV,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:y,vars:c,varsResolver:vV})(`root`),mod:[{center:u,fixed:l},v],...b,children:d})});yV.classes=gV,yV.displayName=`@mantine/core/Overlay`;function bV(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function xV({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||bV(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=bV(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return bV(n)}var SV={reuseTargetNode:!0},CV=$((e,t)=>{let{children:n,target:r,reuseTargetNode:i,...a}=Z(`Portal`,SV,e),[o,s]=(0,K.useState)(!1),c=(0,K.useRef)(null);return cN(()=>(s(!0),c.current=xV({target:r,reuseTargetNode:i,...a}),DN(t,c.current),!r&&!i&&c.current&&document.body.appendChild(c.current),()=>{!r&&!i&&c.current&&document.body.removeChild(c.current)}),[r]),!o||!c.current?null:(0,hz.createPortal)((0,q.jsx)(q.Fragment,{children:n}),c.current)});CV.displayName=`@mantine/core/Portal`;var wV=$(({withinPortal:e=!0,children:t,...n},r)=>jP()===`test`||!e?(0,q.jsx)(q.Fragment,{children:t}):(0,q.jsx)(CV,{ref:r,...n,children:t}));wV.displayName=`@mantine/core/OptionalPortal`;var TV=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),EV={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...TV(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...TV(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...TV(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...TV(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...TV(`top`),common:{transformOrigin:`top right`}}},DV={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function OV({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in EV?{transitionProperty:EV[e].transitionProperty,...i,...EV[e].common,...EV[e][DV[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[DV[t]]}}function kV({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=sF(),d=NN(),f=u.respectReducedMotion?d:!1,[p,m]=(0,K.useState)(f?0:e),[h,g]=(0,K.useState)(r?`entered`:`exited`),_=(0,K.useRef)(-1),v=(0,K.useRef)(-1),y=(0,K.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{hz.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return lN(()=>{S(r)},[r]),(0,K.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function AV({keepMounted:e,transition:t=`fade`,duration:n=250,exitDuration:r=n,mounted:i,children:a,timingFunction:o=`ease`,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){let p=jP(),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:g}=kV({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});return m===0||p===`test`?i?(0,q.jsx)(q.Fragment,{children:a({})}):e?a({display:`none`}):null:h===`exited`?e?a({display:`none`}):null:(0,q.jsx)(q.Fragment,{children:a(OV({transition:t,duration:m,state:h,timingFunction:g}))})}AV.displayName=`@mantine/core/Transition`;var[jV,MV]=kM(`Popover component was not found in the tree`),NV={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`};function PV({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=kN(bN(t),r),a=mP(e);return a?(0,K.cloneElement)(a,{[n]:i}):e}function FV(e){return(0,q.jsx)(oV,{tabIndex:-1,"data-autofocus":!0,...e})}PV.displayName=`@mantine/core/FocusTrap`,FV.displayName=`@mantine/core/FocusTrapInitialFocus`,PV.InitialFocus=FV;var IV=$((e,t)=>{let n=Z(`PopoverDropdown`,null,e),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,...d}=n,f=MV(),p=uN({opened:f.opened,shouldReturnFocus:f.returnFocus}),m=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},h=kN(t,f.floating);return f.disabled?null:(0,q.jsx)(wV,{...f.portalProps,withinPortal:f.withinPortal,children:(0,q.jsx)(AV,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,q.jsx)(PV,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,q.jsxs)(Q,{...m,...d,variant:c,onKeyDownCapture:zM(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:Y(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles.dropdown,u?.dropdown,i]}),children:[o,(0,q.jsx)(mV,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});IV.classes=NV,IV.displayName=`@mantine/core/PopoverDropdown`;var LV={refProp:`ref`,popupType:`dialog`},RV=$((e,t)=>{let{children:n,refProp:r,popupType:i,...a}=Z(`PopoverTarget`,LV,e),o=mP(n);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=MV(),l=kN(c.reference,uP(o),t),u=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,K.cloneElement)(o,{...s,...u,...c.targetProps,className:_P(c.targetProps.className,s.className,d.className),[r]:l,...c.controlled?null:{onClick:()=>{c.onToggle(),d.onClick?.()}}})});RV.displayName=`@mantine/core/PopoverTarget`;function zV(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function BV(e,t,n){let r=zV(e.middlewares),i=[Cz(e.offset),Oz()];return e.dropdownVisible&&n!==`test`&&e.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip==`boolean`?Ez():Ez(r.flip)),r.shift&&i.push(wz(typeof r.shift==`boolean`?{limiter:Tz(),padding:5}:{limiter:Tz(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline==`boolean`?kz():kz(r.inline)),i.push(Az({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width===`target`)&&i.push(Dz({...typeof r.size==`boolean`?{}:r.size,apply({rects:n,availableWidth:i,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};r.size&&(typeof r.size==`object`&&r.size.apply?r.size.apply({rects:n,availableWidth:i,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),i}function VV(e){let t=jP(),[n,r]=MN({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),i=(0,K.useRef)(n),a=()=>{n&&!e.disabled&&r(!1)},o=()=>{e.disabled||r(!n)},s=mB({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:BV(e,()=>s,t),whileElementsMounted:e.keepMounted?void 0:az});return(0,K.useEffect)(()=>{if(!(!s.refs.reference.current||!s.refs.floating.current)&&n)return az(s.refs.reference.current,s.refs.floating.current,s.update)},[n,s.update]),lN(()=>{e.onPositionChange?.(s.placement),e.positionRef.current=s.placement},[s.placement,e.preventPositionChangeWhenVisible]),lN(()=>{n!==i.current&&(n?e.onOpen?.():e.onClose?.()),i.current=n},[n,e.onClose,e.onOpen]),cN(()=>{let t=-1;return n&&(t=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(t)}},[n,e.position]),{floating:s,controlled:typeof e.opened==`boolean`,opened:n,onClose:a,onToggle:o}}var HV={position:`bottom`,offset:8,positionDependencies:[],transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:LM(`popover`),__staticSelector:`Popover`,width:`max-content`},UV=hP((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:HM(t),"--popover-shadow":GM(n)}}));function WV(e){let t=Z(`Popover`,HV,e),{children:n,position:r,offset:i,onPositionChange:a,positionDependencies:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:g,arrowPosition:_,unstyled:v,classNames:y,styles:b,closeOnClickOutside:x,withinPortal:S,portalProps:C,closeOnEscape:w,clickOutsideEvents:T,trapFocus:E,onClose:D,onDismiss:O,onOpen:k,onChange:A,zIndex:j,radius:M,shadow:N,id:P,defaultOpened:ee,__staticSelector:te,withRoles:ne,disabled:F,returnFocus:I,variant:L,keepMounted:re,vars:ie,floatingStrategy:ae,withOverlay:oe,overlayProps:se,hideDetached:ce,attributes:le,preventPositionChangeWhenVisible:ue,...R}=t,de=X({name:te,props:t,classes:NV,classNames:y,styles:b,unstyled:v,attributes:le,rootSelector:`dropdown`,vars:ie,varsResolver:UV}),{resolvedStyles:fe}=OF({classNames:y,styles:b,props:t}),[pe,me]=(0,K.useState)(s??ee??!1),he=(0,K.useRef)(r),ge=(0,K.useRef)(null),[_e,ve]=(0,K.useState)(null),[ye,be]=(0,K.useState)(null),{dir:xe}=FI(),z=jP(),Se=TN(P),B=VV({middlewares:f,width:d,position:hV(xe,r),offset:typeof i==`number`?i+(p?m/2:0):i,arrowRef:ge,arrowOffset:h,onPositionChange:a,positionDependencies:o,opened:s,defaultOpened:ee,onChange:A,onOpen:k,onClose:D,onDismiss:O,strategy:ae,dropdownVisible:pe,setDropdownVisible:me,positionRef:he,disabled:F,preventPositionChangeWhenVisible:ue,keepMounted:re});rN(()=>{x&&(B.onClose(),O?.())},T,[_e,ye]);let V=(0,K.useCallback)(e=>{ve(e),B.floating.refs.setReference(e)},[B.floating.refs.setReference]),Ce=(0,K.useCallback)(e=>{be(e),B.floating.refs.setFloating(e)},[B.floating.refs.setFloating]),we=(0,K.useCallback)(()=>{c?.onExited?.(),l?.(),me(!1),ue||(he.current=r)},[c?.onExited,l,ue,r]),Te=(0,K.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,q.jsxs)(jV,{value:{returnFocus:I,disabled:F,controlled:B.controlled,reference:V,floating:Ce,x:B.floating.x,y:B.floating.y,arrowX:B.floating?.middlewareData?.arrow?.x,arrowY:B.floating?.middlewareData?.arrow?.y,opened:B.opened,arrowRef:ge,transitionProps:{...c,onExited:we,onEntered:Te},width:d,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:g,arrowPosition:_,placement:B.floating.placement,trapFocus:E,withinPortal:S,portalProps:C,zIndex:j,radius:M,shadow:N,closeOnEscape:w,onDismiss:O,onClose:B.onClose,onToggle:B.onToggle,getTargetId:()=>`${Se}-target`,getDropdownId:()=>`${Se}-dropdown`,withRoles:ne,targetProps:R,__staticSelector:te,classNames:y,styles:b,unstyled:v,variant:L,keepMounted:re,getStyles:de,resolvedStyles:fe,floatingStrategy:ae,referenceHidden:ce&&z!==`test`?B.floating.middlewareData.hide?.referenceHidden:!1},children:[n,oe&&(0,q.jsx)(AV,{transition:`fade`,mounted:B.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,q.jsx)(wV,{withinPortal:S,children:(0,q.jsx)(yV,{...se,...de(`overlay`,{className:se?.className,style:[e,se?.style]})})})})]})}WV.Target=RV,WV.Dropdown=IV,WV.displayName=`@mantine/core/Popover`,WV.extend=e=>e;var GV={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},KV=(0,K.forwardRef)(({className:e,...t},n)=>(0,q.jsxs)(Q,{component:`span`,className:_P(GV.barsLoader,e),...t,ref:n,children:[(0,q.jsx)(`span`,{className:GV.bar}),(0,q.jsx)(`span`,{className:GV.bar}),(0,q.jsx)(`span`,{className:GV.bar})]}));KV.displayName=`@mantine/core/Bars`;var qV=(0,K.forwardRef)(({className:e,...t},n)=>(0,q.jsxs)(Q,{component:`span`,className:_P(GV.dotsLoader,e),...t,ref:n,children:[(0,q.jsx)(`span`,{className:GV.dot}),(0,q.jsx)(`span`,{className:GV.dot}),(0,q.jsx)(`span`,{className:GV.dot})]}));qV.displayName=`@mantine/core/Dots`;var JV=(0,K.forwardRef)(({className:e,...t},n)=>(0,q.jsx)(Q,{component:`span`,className:_P(GV.ovalLoader,e),...t,ref:n}));JV.displayName=`@mantine/core/Oval`;var YV={bars:KV,oval:JV,dots:qV},XV={loaders:YV,type:`oval`},ZV=hP((e,{size:t,color:n})=>({root:{"--loader-size":BM(t,`loader-size`),"--loader-color":n?WP(n,e):void 0}})),QV=$((e,t)=>{let n=Z(`Loader`,XV,e),{size:r,color:i,type:a,vars:o,className:s,style:c,classNames:l,styles:u,unstyled:d,loaders:f,variant:p,children:m,attributes:h,...g}=n,_=X({name:`Loader`,props:n,classes:GV,className:s,style:c,classNames:l,styles:u,unstyled:d,attributes:h,vars:o,varsResolver:ZV});return m?(0,q.jsx)(Q,{..._(`root`),ref:t,...g,children:m}):(0,q.jsx)(Q,{..._(`root`),ref:t,component:f[a],variant:p,size:r,...g})});QV.defaultLoaders=YV,QV.classes=GV,QV.displayName=`@mantine/core/Loader`;var $V={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},eH={orientation:`horizontal`},tH=hP((e,{borderWidth:t})=>({group:{"--ai-border-width":Y(t)}})),nH=$((e,t)=>{let n=Z(`ActionIconGroup`,eH,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,attributes:p,...m}=Z(`ActionIconGroup`,eH,e);return(0,q.jsx)(Q,{...X({name:`ActionIconGroup`,props:n,classes:$V,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:l,varsResolver:tH,rootSelector:`group`})(`group`),ref:t,variant:d,mod:[{"data-orientation":c},f],role:`group`,...m})});nH.classes=$V,nH.displayName=`@mantine/core/ActionIconGroup`;var rH=hP((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":BM(o,`section-height`),"--section-padding-x":BM(o,`section-padding-x`),"--section-fz":UM(o),"--section-radius":t===void 0?void 0:HM(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),iH=$((e,t)=>{let n=Z(`ActionIconGroupSection`,null,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,attributes:p,...m}=n;return(0,q.jsx)(Q,{...X({name:`ActionIconGroupSection`,props:n,classes:$V,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:rH,rootSelector:`groupSection`})(`groupSection`),ref:t,variant:l,...m})});iH.classes=$V,iH.displayName=`@mantine/core/ActionIconGroupSection`;var aH=hP((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":BM(t,`ai-size`),"--ai-radius":n===void 0?void 0:HM(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),oH=NI((e,t)=>{let n=Z(`ActionIcon`,null,e),{className:r,unstyled:i,variant:a,classNames:o,styles:s,style:c,loading:l,loaderProps:u,size:d,color:f,radius:p,__staticSelector:m,gradient:h,vars:g,children:_,disabled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=n,w=X({name:[`ActionIcon`,m],props:n,className:r,style:c,classes:$V,classNames:o,styles:s,unstyled:i,attributes:S,vars:g,varsResolver:aH});return(0,q.jsxs)(iV,{...w(`root`,{active:!v&&!l&&!y}),...C,unstyled:i,variant:a,size:d,disabled:v||l,ref:t,mod:[{loading:l,disabled:v||y},x],children:[typeof l==`boolean`&&(0,q.jsx)(AV,{mounted:l,transition:`slide-down`,duration:150,children:e=>(0,q.jsx)(Q,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,q.jsx)(QV,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...u})})}),(0,q.jsx)(Q,{component:`span`,mod:{loading:l},...w(`icon`),children:_})]})});oH.classes=$V,oH.displayName=`@mantine/core/ActionIcon`,oH.Group=nH,oH.GroupSection=iH;var sH=(0,K.forwardRef)(({size:e=`var(--cb-icon-size, 70%)`,style:t,...n},r)=>(0,q.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},ref:r,...n,children:(0,q.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})}));sH.displayName=`@mantine/core/CloseIcon`;var cH={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},lH={variant:`subtle`},uH=hP((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":BM(t,`cb-size`),"--cb-radius":n===void 0?void 0:HM(n),"--cb-icon-size":Y(r)}})),dH=NI((e,t)=>{let n=Z(`CloseButton`,lH,e),{iconSize:r,children:i,vars:a,radius:o,className:s,classNames:c,style:l,styles:u,unstyled:d,"data-disabled":f,disabled:p,variant:m,icon:h,mod:g,attributes:_,__staticSelector:v,...y}=n,b=X({name:v||`CloseButton`,props:n,className:s,style:l,classes:cH,classNames:c,styles:u,unstyled:d,attributes:_,vars:a,varsResolver:uH});return(0,q.jsxs)(iV,{ref:t,...y,unstyled:d,variant:m,disabled:p,mod:[{disabled:p||f},g],...b(`root`,{variant:m,active:!p&&!f}),children:[h||(0,q.jsx)(sH,{}),i]})});dH.classes=cH,dH.displayName=`@mantine/core/CloseButton`;function fH(e){return K.Children.toArray(e).filter(Boolean)}var pH={root:`m_4081bf90`},mH={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},hH=hP((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":VM(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),gH=$((e,t)=>{let n=Z(`Group`,mH,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,children:c,gap:l,align:u,justify:d,wrap:f,grow:p,preventGrowOverflow:m,vars:h,variant:g,__size:_,mod:v,attributes:y,...b}=n,x=fH(c),S=x.length,C=VM(l??`md`);return(0,q.jsx)(Q,{...X({name:`Group`,props:n,stylesCtx:{childWidth:`calc(${100/S}% - (${C} - ${C} / ${S}))`},className:i,style:a,classes:pH,classNames:r,styles:o,unstyled:s,attributes:y,vars:h,varsResolver:hH})(`root`),ref:t,variant:g,mod:[{grow:p},v],size:_,...b,children:x})});gH.classes=pH,gH.displayName=`@mantine/core/Group`;var[_H,vH]=kM(`ModalBase component was not found in tree`);function yH({opened:e,transitionDuration:t}){let[n,r]=(0,K.useState)(e),i=(0,K.useRef)(-1),a=NN()?0:t;return(0,K.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function bH({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o}){let s=TN(e),[c,l]=(0,K.useState)(!1),[u,d]=(0,K.useState)(!1),f=yH({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return EN(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),uN({opened:n,shouldReturnFocus:r&&o}),{_id:s,titleMounted:c,bodyMounted:u,shouldLockScroll:f,setTitleMounted:l,setBodyMounted:d}}var xH=(0,K.forwardRef)(({keepMounted:e,opened:t,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:s,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:p,children:m,zIndex:h,shadow:g,padding:_,__vars:v,unstyled:y,removeScrollProps:b,...x},S)=>{let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=bH({id:r,transitionProps:i,opened:t,trapFocus:s,closeOnEscape:c,onClose:n,returnFocus:l}),{key:k,...A}=b||{};return(0,q.jsx)(wV,{...f,withinPortal:d,children:(0,q.jsx)(_H,{value:{opened:t,onClose:n,closeOnClickOutside:u,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:e},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:s,closeOnEscape:c,zIndex:h,unstyled:y},children:(0,q.jsx)(gM,{enabled:E&&p,...A,children:(0,q.jsx)(Q,{ref:S,...x,__vars:{...v,"--mb-z-index":(h||LM(`modal`)).toString(),"--mb-shadow":GM(g),"--mb-padding":VM(_)},children:m})},k)})})});xH.displayName=`@mantine/core/ModalBase`;var SH={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function CH(){let e=vH();return(0,K.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var wH=(0,K.forwardRef)(({className:e,...t},n)=>{let r=CH(),i=vH();return(0,q.jsx)(Q,{ref:n,...t,id:r,className:_P({[SH.body]:!i.unstyled},e)})});wH.displayName=`@mantine/core/ModalBaseBody`;var TH=(0,K.forwardRef)(({className:e,onClick:t,...n},r)=>{let i=vH();return(0,q.jsx)(dH,{ref:r,...n,onClick:e=>{i.onClose(),t?.(e)},className:_P({[SH.close]:!i.unstyled},e),unstyled:i.unstyled})});TH.displayName=`@mantine/core/ModalBaseCloseButton`;var EH=(0,K.forwardRef)(({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,...a},o)=>{let s=vH();return(0,q.jsx)(AV,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,q.jsx)(`div`,{...n,className:_P({[SH.inner]:!s.unstyled},n.className),children:(0,q.jsx)(PV,{active:s.opened&&s.trapFocus,innerRef:o,children:(0,q.jsx)(lV,{...a,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:_P({[SH.content]:!s.unstyled},t),unstyled:s.unstyled,children:a.children})})})})});EH.displayName=`@mantine/core/ModalBaseContent`;var DH=(0,K.forwardRef)(({className:e,...t},n)=>{let r=vH();return(0,q.jsx)(Q,{component:`header`,ref:n,className:_P({[SH.header]:!r.unstyled},e),...t})});DH.displayName=`@mantine/core/ModalBaseHeader`;var OH={duration:200,timingFunction:`ease`,transition:`fade`};function kH(e){let t=vH();return{...OH,...t.transitionProps,...e}}var AH=(0,K.forwardRef)(({onClick:e,transitionProps:t,style:n,visible:r,...i},a)=>{let o=vH(),s=kH(t);return(0,q.jsx)(AV,{mounted:r===void 0?o.opened:r,...s,transition:`fade`,children:t=>(0,q.jsx)(yV,{ref:a,fixed:!0,style:[n,t],zIndex:o.zIndex,unstyled:o.unstyled,onClick:t=>{e?.(t),o.closeOnClickOutside&&o.onClose()},...i})})});AH.displayName=`@mantine/core/ModalBaseOverlay`;function jH(){let e=vH();return(0,K.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var MH=(0,K.forwardRef)(({className:e,...t},n)=>{let r=jH(),i=vH();return(0,q.jsx)(Q,{component:`h2`,ref:n,className:_P({[SH.title]:!i.unstyled},e),...t,id:r})});MH.displayName=`@mantine/core/ModalBaseTitle`;function NH({children:e}){return(0,q.jsx)(q.Fragment,{children:e})}var[PH,FH]=AM({size:`sm`}),IH={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},LH=$((e,t)=>{let n=Z(`InputClearButton`,null,e),{size:r,variant:i,vars:a,classNames:o,styles:s,...c}=n,l=FH(),{resolvedClassNames:u,resolvedStyles:d}=OF({classNames:o,styles:s,props:n});return(0,q.jsx)(dH,{variant:i||`transparent`,ref:t,size:r||l?.size||`sm`,classNames:u,styles:d,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...c.style},...c})});LH.displayName=`@mantine/core/InputClearButton`;var RH={xs:7,sm:8,md:10,lg:12,xl:15};function zH({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`}){let a=e&&t;return a&&(n||r)?(0,q.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:RH[i]},children:[a,n||r]}):n===null?null:n||a||r}var[BH,VH]=AM({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),HH=hP((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${UM(t)} - ${Y(2)})`}})),UH=$((e,t)=>{let n=Z(`InputDescription`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,attributes:f,variant:p,...m}=Z(`InputDescription`,null,n),h=VH(),g=X({name:[`InputWrapper`,u],props:n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:f,rootSelector:`description`,vars:c,varsResolver:HH});return(0,q.jsx)(Q,{component:`p`,ref:t,variant:p,size:l,...(d&&h?.getStyles||g)(`description`,h?.getStyles?{className:i,style:a}:void 0),...m})});UH.classes=IH,UH.displayName=`@mantine/core/InputDescription`;var WH=hP((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${UM(t)} - ${Y(2)})`}})),GH=$((e,t)=>{let n=Z(`InputError`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,attributes:u,__staticSelector:d,__inheritStyles:f=!0,variant:p,...m}=n,h=X({name:[`InputWrapper`,d],props:n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:u,rootSelector:`error`,vars:c,varsResolver:WH}),g=VH();return(0,q.jsx)(Q,{component:`p`,ref:t,variant:p,size:l,...(f&&g?.getStyles||h)(`error`,g?.getStyles?{className:i,style:a}:void 0),...m})});GH.classes=IH,GH.displayName=`@mantine/core/InputError`;var KH={labelElement:`label`},qH=hP((e,{size:t})=>({label:{"--input-label-size":UM(t),"--input-asterisk-color":void 0}})),JH=$((e,t)=>{let n=Z(`InputLabel`,KH,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,labelElement:l,size:u,required:d,htmlFor:f,onMouseDown:p,children:m,__staticSelector:h,variant:g,mod:_,attributes:v,...y}=Z(`InputLabel`,KH,n),b=X({name:[`InputWrapper`,h],props:n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:v,rootSelector:`label`,vars:c,varsResolver:qH}),x=VH(),S=x?.getStyles||b;return(0,q.jsxs)(Q,{...S(`label`,x?.getStyles?{className:i,style:a}:void 0),component:l,variant:g,size:u,ref:t,htmlFor:l===`label`?f:void 0,mod:[{required:d},_],onMouseDown:e=>{p?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...y,children:[m,d&&(0,q.jsx)(`span`,{...S(`required`),"aria-hidden":!0,children:` *`})]})});JH.classes=IH,JH.displayName=`@mantine/core/InputLabel`;var YH=$((e,t)=>{let n=Z(`InputPlaceholder`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,variant:u,error:d,mod:f,attributes:p,...m}=n;return(0,q.jsx)(Q,{...X({name:[`InputPlaceholder`,l],props:n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!d},f],component:`span`,variant:u,ref:t,...m})});YH.classes=IH,YH.displayName=`@mantine/core/InputPlaceholder`;function XH(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var ZH={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},QH=hP((e,{size:t})=>({label:{"--input-label-size":UM(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${UM(t)} - ${Y(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${UM(t)} - ${Y(2)})`}})),$H=$((e,t)=>{let n=Z(`InputWrapper`,ZH,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,variant:u,__staticSelector:d,inputContainer:f,inputWrapperOrder:p,label:m,error:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,labelElement:b,children:x,withAsterisk:S,id:C,required:w,__stylesApiProps:T,mod:E,attributes:D,...O}=n,k=X({name:[`InputWrapper`,d],props:T||n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:D,vars:c,varsResolver:QH}),A={size:l,variant:u,__staticSelector:d},j=TN(C),M=typeof S==`boolean`?S:w,N=y?.id||`${j}-error`,P=v?.id||`${j}-description`,ee=j,te=!!h&&typeof h!=`boolean`,ne=!!g,F=`${te?N:``} ${ne?P:``}`,I=F.trim().length>0?F.trim():void 0,L=_?.id||`${j}-label`,re=m&&(0,q.jsx)(JH,{labelElement:b,id:L,htmlFor:ee,required:M,...A,..._,children:m},`label`),ie=ne&&(0,q.jsx)(UH,{...v,...A,size:v?.size||A.size,id:v?.id||P,children:g},`description`),ae=(0,q.jsx)(K.Fragment,{children:f(x)},`input`),oe=te&&(0,K.createElement)(GH,{...y,...A,size:y?.size||A.size,key:`error`,id:y?.id||N},h),se=p.map(e=>{switch(e){case`label`:return re;case`input`:return ae;case`description`:return ie;case`error`:return oe;default:return null}});return(0,q.jsx)(BH,{value:{getStyles:k,describedBy:I,inputId:ee,labelId:L,...XH(p,{hasDescription:ne,hasError:te})},children:(0,q.jsx)(Q,{ref:t,variant:u,size:l,mod:[{error:!!h},E],...k(`root`),...O,children:se})})});$H.classes=IH,$H.displayName=`@mantine/core/InputWrapper`;var eU={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`},tU=hP((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":BM(t.size,`input-height`),"--input-fz":UM(t.size),"--input-radius":t.radius===void 0?void 0:HM(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:Y(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:Y(t.rightSectionWidth),"--input-padding-y":t.multiline?BM(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),nU=NI((e,t)=>{let n=Z(`Input`,eU,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,required:c,__staticSelector:l,__stylesApiProps:u,size:d,wrapperProps:f,error:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,mod:j,inputSize:M,attributes:N,__clearSection:P,__clearable:ee,__defaultRightSection:te,...ne}=n,{styleProps:F,rest:I}=$F(ne),L=VH(),re={offsetBottom:L?.offsetBottom,offsetTop:L?.offsetTop},ie=X({name:[`Input`,l],props:u||n,classes:IH,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:N,stylesCtx:re,rootSelector:`wrapper`,vars:w,varsResolver:tU}),ae=k?{required:c,disabled:m,"aria-invalid":!!p,"aria-describedby":L?.describedBy,id:L?.inputId||O}:{},oe=zH({__clearable:ee,__clearSection:P,rightSection:v,__defaultRightSection:te,size:d});return(0,q.jsx)(PH,{value:{size:d||`sm`},children:(0,q.jsxs)(Q,{...ie(`wrapper`),...F,...f,mod:[{error:!!p&&A,pointer:T,disabled:m,multiline:E,"data-with-right-section":!!oe,"data-with-left-section":!!h},j],variant:C,size:d,children:[h&&(0,q.jsx)(`div`,{...g,"data-position":`left`,...ie(`section`,{className:g?.className,style:g?.style}),children:h}),(0,q.jsx)(Q,{component:`input`,...I,...ae,ref:t,required:c,mod:{disabled:m,error:!!p&&A},variant:C,__size:M,...ie(`input`)}),oe&&(0,q.jsx)(`div`,{...y,"data-position":`right`,...ie(`section`,{className:y?.className,style:y?.style}),children:oe})]})})});nU.classes=IH,nU.Wrapper=$H,nU.Label=JH,nU.Error=GH,nU.Description=UH,nU.Placeholder=YH,nU.ClearButton=LH,nU.displayName=`@mantine/core/Input`;function rU(e,t,n){let r=Z(e,t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=$F(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var iU={__staticSelector:`InputBase`,withAria:!0,size:`sm`},aU=NI((e,t)=>{let{inputProps:n,wrapperProps:r,...i}=rU(`InputBase`,iU,e);return(0,q.jsx)(nU.Wrapper,{...r,children:(0,q.jsx)(nU,{...n,...i,ref:t})})});aU.classes={...nU.classes,...nU.Wrapper.classes},aU.displayName=`@mantine/core/InputBase`;var oU={gap:{type:`spacing`,property:`gap`},rowGap:{type:`spacing`,property:`rowGap`},columnGap:{type:`spacing`,property:`columnGap`},align:{type:`identity`,property:`alignItems`},justify:{type:`identity`,property:`justifyContent`},wrap:{type:`identity`,property:`flexWrap`},direction:{type:`identity`,property:`flexDirection`}},sU={root:`m_8bffd616`},cU=NI((e,t)=>{let n=Z(`Flex`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,gap:l,rowGap:u,columnGap:d,align:f,justify:p,wrap:m,direction:h,attributes:g,..._}=n,v=X({name:`Flex`,classes:sU,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:g,vars:c}),y=sF(),b=SI(),x=xI({styleProps:{gap:l,rowGap:u,columnGap:d,align:f,justify:p,wrap:m,direction:h},theme:y,data:oU});return(0,q.jsxs)(q.Fragment,{children:[x.hasResponsiveStyles&&(0,q.jsx)(QF,{selector:`.${b}`,styles:x.styles,media:x.media}),(0,q.jsx)(Q,{ref:t,...v(`root`,{className:b,style:EM(x.inlineStyles)}),..._})]})});cU.classes=sU,cU.displayName=`@mantine/core/Flex`;var lU={root:`m_96b553a6`};function uU(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function dU({target:e,parent:t,ref:n,displayAfterTransitionEnd:r}){let i=(0,K.useRef)(-1),[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(typeof r==`boolean`?r:!1),l=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.getComputedStyle(e),o=window.getComputedStyle(t),s=IB(a.borderTopWidth)+IB(o.borderTopWidth),c=IB(a.borderLeftWidth)+IB(o.borderLeftWidth),l={top:r.top-i.top-s,left:r.left-i.left-c,width:r.width,height:r.height};n.current.style.transform=`translateY(${l.top}px) translateX(${l.left}px)`,n.current.style.width=`${l.width}px`,n.current.style.height=`${l.height}px`},u=()=>{window.clearTimeout(i.current),n.current&&(n.current.style.transitionDuration=`0ms`),l(),i.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},d=(0,K.useRef)(null),f=(0,K.useRef)(null);return(0,K.useEffect)(()=>{if(l(),e)return d.current=new ResizeObserver(u),d.current.observe(e),t&&(f.current=new ResizeObserver(u),f.current.observe(t)),()=>{d.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,K.useEffect)(()=>{if(t){let e=e=>{uU(e.target,t)&&(u(),c(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),$N(()=>{sP()!==`test`&&o(!0)},20,{autoInvoke:!0}),rP(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&u()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:a,hidden:s}}var fU=hP((e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t==`number`?`${t}ms`:t}})),pU=$((e,t)=>{let n=Z(`FloatingIndicator`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,target:l,parent:u,transitionDuration:d,mod:f,displayAfterTransitionEnd:p,attributes:m,...h}=n,g=X({name:`FloatingIndicator`,classes:lU,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:fU}),_=(0,K.useRef)(null),{initialized:v,hidden:y}=dU({target:l,parent:u,ref:_,displayAfterTransitionEnd:p}),b=kN(t,_);return!l||!u?null:(0,q.jsx)(Q,{ref:b,mod:[{initialized:v,hidden:y},f],...g(`root`),...h})});pU.displayName=`@mantine/core/FloatingIndicator`,pU.classes=lU;function mU({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,K.useRef)(-1),a=(0,K.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,K.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}function hU({style:e,size:t=16,...n}){return(0,q.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:Y(t),height:Y(t),display:`block`},...n,children:(0,q.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}hU.displayName=`@mantine/core/AccordionChevron`;var gU={root:`m_b6d8b162`};function _U(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var vU={inherit:!1},yU=hP((e,{variant:t,lineClamp:n,gradient:r,size:i,color:a})=>({root:{"--text-fz":UM(i),"--text-lh":WM(i),"--text-gradient":t===`gradient`?GP(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-color":a?WP(a,e):void 0}})),bU=NI((e,t)=>{let n=Z(`Text`,vU,e),{lineClamp:r,truncate:i,inline:a,inherit:o,gradient:s,span:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=n;return(0,q.jsx)(Q,{...X({name:[`Text`,l],props:n,classes:gU,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:yU})(`root`,{focusable:!0}),ref:t,component:c?`span`:`p`,variant:g,mod:[{"data-truncate":_U(i),"data-line-clamp":typeof r==`number`,"data-inline":a,"data-inherit":o},_],size:v,...b})});bU.classes=gU,bU.displayName=`@mantine/core/Text`;var xU={root:`m_849cf0da`},SU={underline:`hover`},CU=NI((e,t)=>{let{underline:n,className:r,unstyled:i,mod:a,...o}=Z(`Anchor`,SU,e);return(0,q.jsx)(bU,{component:`a`,ref:t,className:_P({[xU.root]:!i},r),...o,mod:[{underline:n},a],__staticSelector:`Anchor`,unstyled:i})});CU.classes=xU,CU.displayName=`@mantine/core/Anchor`;var[wU,TU]=kM(`AppShell was not found in tree`),EU={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},DU=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=Z(`AppShellAside`,null,e),f=TU();return f.disabled?null:(0,q.jsx)(Q,{component:`aside`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`aside`,{className:_P({[gM.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-aside-z-index":`calc(${l??f.zIndex} + 1)`}})});DU.classes=EU,DU.displayName=`@mantine/core/AppShellAside`;var OU=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=Z(`AppShellFooter`,null,e),f=TU();return f.disabled?null:(0,q.jsx)(Q,{component:`footer`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`footer`,{className:_P({[gM.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-footer-z-index":(l??f.zIndex)?.toString()}})});OU.classes=EU,OU.displayName=`@mantine/core/AppShellFooter`;var kU=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=Z(`AppShellHeader`,null,e),f=TU();return f.disabled?null:(0,q.jsx)(Q,{component:`header`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`header`,{className:_P({[gM.classNames.zeroRight]:f.offsetScrollbars},r),classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-header-z-index":(l??f.zIndex)?.toString()}})});kU.classes=EU,kU.displayName=`@mantine/core/AppShellHeader`;var AU=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`AppShellMain`,null,e);return(0,q.jsx)(Q,{component:`main`,ref:t,...TU().getStyles(`main`,{className:r,style:i,classNames:n,styles:a}),...s})});AU.classes=EU,AU.displayName=`@mantine/core/AppShellMain`;function jU(e){return typeof e==`object`?e.base:e}function MU(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function NU(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function PU({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),MU(o)){let t=Y(jU(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(NU(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=Y(o.base),e[`--app-shell-aside-offset`]=Y(o.base)),_M(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=Y(o[e]),t[e][`--app-shell-aside-offset`]=Y(o[e]))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=qM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function FU({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),MU(i)){let t=Y(jU(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}NU(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=Y(i.base),a&&(e[`--app-shell-footer-offset`]=Y(i.base))),_M(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=Y(i[e]),a&&(t[e][`--app-shell-footer-offset`]=Y(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function IU({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),MU(i)){let t=Y(jU(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}NU(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=Y(i.base),a&&(e[`--app-shell-header-offset`]=Y(i.base))),_M(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=Y(i[e]),a&&(t[e][`--app-shell-header-offset`]=Y(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function LU({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),MU(o)){let t=Y(jU(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(NU(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=Y(o.base),e[`--app-shell-navbar-offset`]=Y(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=Y(o.base))),_M(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=Y(o[e]),t[e][`--app-shell-navbar-offset`]=Y(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=Y(o[e])))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=qM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function RU(e){return Number(e)===0?`0px`:VM(e)}function zU({padding:e,baseStyles:t,minMediaStyles:n}){MU(e)&&(t[`--app-shell-padding`]=RU(jU(e))),NU(e)&&(e.base&&(t[`--app-shell-padding`]=RU(e.base)),_M(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=RU(e[t]))}))}function BU({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),LU({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),PU({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),IU({baseStyles:l,minMediaStyles:s,header:t,mode:o}),FU({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),zU({baseStyles:l,minMediaStyles:s,padding:i});let u=JM(_M(s),a.breakpoints).map(e=>({query:`(min-width: ${TM(e.px)})`,styles:s[e.value]})),d=JM(_M(c),a.breakpoints).map(e=>({query:`(max-width: ${TM(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function VU({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=sF(),c=CP(),{media:l,baseStyles:u}=BU({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,q.jsx)(QF,{media:l,styles:u,selector:o||c.cssVariablesSelector})}var HU=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,withBorder:c,zIndex:l,mod:u,...d}=Z(`AppShellNavbar`,null,e),f=TU();return f.disabled?null:(0,q.jsx)(Q,{component:`nav`,ref:t,mod:[{"with-border":c??f.withBorder},u],...f.getStyles(`navbar`,{className:r,classNames:n,styles:a,style:i}),...d,__vars:{"--app-shell-navbar-z-index":`calc(${l??f.zIndex} + 1)`}})});HU.classes=EU,HU.displayName=`@mantine/core/AppShellNavbar`;var UU=NI((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,grow:s,mod:c,...l}=Z(`AppShellSection`,null,e),u=TU();return(0,q.jsx)(Q,{ref:t,mod:[{grow:s},c],...u.getStyles(`section`,{className:r,style:i,classNames:n,styles:a}),...l})});UU.classes=EU,UU.displayName=`@mantine/core/AppShellSection`;function WU({transitionDuration:e,disabled:t}){let[n,r]=(0,K.useState)(!0),i=(0,K.useRef)(-1),a=(0,K.useRef)(-1);return EN(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,K.startTransition)(()=>{r(!1)}),200)}),cN(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,K.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var GU={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:LM(`app`),mode:`fixed`},KU=hP((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),qU=$((e,t)=>{let n=Z(`AppShell`,GU,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,navbar:l,withBorder:u,padding:d,transitionDuration:f,transitionTimingFunction:p,header:m,zIndex:h,layout:g,disabled:_,aside:v,footer:y,offsetScrollbars:b=!0,mode:x,mod:S,attributes:C,id:w,...T}=n,E=X({name:`AppShell`,classes:EU,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:C,vars:c,varsResolver:KU}),D=WU({disabled:_,transitionDuration:f}),O=TN(w);return(0,q.jsxs)(wU,{value:{getStyles:E,withBorder:u,zIndex:h,disabled:_,offsetScrollbars:b,mode:x},children:[(0,q.jsx)(VU,{navbar:l,header:m,aside:v,footer:y,padding:d,mode:x,selector:x===`static`?`#${O}`:void 0}),(0,q.jsx)(Q,{ref:t,...E(`root`),mod:[{resizing:D,layout:g,disabled:_,mode:x},S],id:O,...T})]})});qU.classes=EU,qU.displayName=`@mantine/core/AppShell`,qU.Navbar=HU,qU.Header=kU,qU.Main=AU,qU.Aside=DU,qU.Footer=OU,qU.Section=UU;function JU(e){return typeof e==`string`?{value:e,label:e}:`value`in e&&!(`label`in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e==`number`?{value:e.toString(),label:e.toString()}:`group`in e?{group:e.group,items:e.items.map(e=>JU(e))}:e}function YU(e){return e?e.map(e=>JU(e)):[]}function XU(e){return e.reduce((e,t)=>`group`in t?{...e,...XU(t.items)}:(e[t.value]=t,e),{})}var ZU={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},QU={error:null},$U=hP((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":BM(t,`combobox-chevron-size`),"--combobox-chevron-color":n?WP(n,e):void 0}})),eW=$((e,t)=>{let n=Z(`ComboboxChevron`,QU,e),{size:r,error:i,style:a,className:o,classNames:s,styles:c,unstyled:l,vars:u,mod:d,...f}=n,p=X({name:`ComboboxChevron`,classes:ZU,props:n,style:a,className:o,classNames:s,styles:c,unstyled:l,vars:u,varsResolver:$U,rootSelector:`chevron`});return(0,q.jsx)(Q,{component:`svg`,...f,...p(`chevron`),size:r,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:i},d],ref:t,children:(0,q.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});eW.classes=ZU,eW.displayName=`@mantine/core/ComboboxChevron`;var[tW,nW]=kM(`Combobox component was not found in tree`),rW=(0,K.forwardRef)(({size:e,onMouseDown:t,onClick:n,onClear:r,...i},a)=>(0,q.jsx)(nU.ClearButton,{ref:a,tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:e=>{e.preventDefault(),t?.(e)},onClick:e=>{r(),n?.(e)}}));rW.displayName=`@mantine/core/ComboboxClearButton`;var iW=$((e,t)=>{let{classNames:n,styles:r,className:i,style:a,hidden:o,...s}=Z(`ComboboxDropdown`,null,e),c=nW();return(0,q.jsx)(WV.Dropdown,{...s,ref:t,role:`presentation`,"data-hidden":o||void 0,...c.getStyles(`dropdown`,{className:i,style:a,classNames:n,styles:r})})});iW.classes=ZU,iW.displayName=`@mantine/core/ComboboxDropdown`;var aW={refProp:`ref`},oW=$((e,t)=>{let{children:n,refProp:r}=Z(`ComboboxDropdownTarget`,aW,e);if(nW(),!OM(n))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,q.jsx)(WV.Target,{ref:t,refProp:r,children:n})});oW.displayName=`@mantine/core/ComboboxDropdownTarget`;var sW=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ComboboxEmpty`,null,e);return(0,q.jsx)(Q,{ref:t,...nW().getStyles(`empty`,{className:r,classNames:n,styles:a,style:i}),...s})});sW.classes=ZU,sW.displayName=`@mantine/core/ComboboxEmpty`;function cW({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:a}){let o=nW(),[s,c]=(0,K.useState)(null),l=n=>{if(e?.(n),!o.readOnly&&t){if(n.nativeEvent.isComposing)return;if(n.nativeEvent.code===`ArrowDown`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectNextOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`ArrowUp`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectPreviousOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`Enter`||n.nativeEvent.code===`NumpadEnter`){if(n.nativeEvent.keyCode===229)return;let e=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&e!==-1?(n.preventDefault(),o.store.clickSelectedOption()):i===`button`&&(n.preventDefault(),o.store.openDropdown(`keyboard`))}n.key===`Escape`&&o.store.closeDropdown(`keyboard`),n.nativeEvent.code===`Space`&&i===`button`&&(n.preventDefault(),o.store.toggleDropdown(`keyboard`))}};return{...n?{"aria-haspopup":`listbox`,"aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:a,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:l}}var lW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},uW=$((e,t)=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,...l}=Z(`ComboboxEventsTarget`,lW,e),u=mP(n);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=nW();return(0,K.cloneElement)(u,{...cW({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:u.props.onKeyDown,autoComplete:c}),...l,[r]:kN(t,d.store.targetRef,uP(u))})});uW.displayName=`@mantine/core/ComboboxEventsTarget`;var dW=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ComboboxFooter`,null,e);return(0,q.jsx)(Q,{ref:t,...nW().getStyles(`footer`,{className:r,classNames:n,style:i,styles:a}),...s,onMouseDown:e=>{e.preventDefault()}})});dW.classes=ZU,dW.displayName=`@mantine/core/ComboboxFooter`;var fW=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,label:c,id:l,...u}=Z(`ComboboxGroup`,null,e),d=nW(),f=TN(l);return(0,q.jsxs)(Q,{ref:t,role:`group`,"aria-labelledby":c?f:void 0,...d.getStyles(`group`,{className:r,classNames:n,style:i,styles:a}),...u,children:[c&&(0,q.jsx)(`div`,{id:f,...d.getStyles(`groupLabel`,{classNames:n,styles:a}),children:c}),s]})});fW.classes=ZU,fW.displayName=`@mantine/core/ComboboxGroup`;var pW=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ComboboxHeader`,null,e);return(0,q.jsx)(Q,{ref:t,...nW().getStyles(`header`,{className:r,classNames:n,style:i,styles:a}),...s,onMouseDown:e=>{e.preventDefault()}})});pW.classes=ZU,pW.displayName=`@mantine/core/ComboboxHeader`;function mW({value:e,valuesDivider:t=`,`,...n}){return(0,q.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e||``,...n})}mW.displayName=`@mantine/core/ComboboxHiddenInput`;var hW=$((e,t)=>{let n=Z(`ComboboxOption`,null,e),{classNames:r,className:i,style:a,styles:o,vars:s,onClick:c,id:l,active:u,onMouseDown:d,onMouseOver:f,disabled:p,selected:m,mod:h,...g}=n,_=nW(),v=(0,K.useId)(),y=l||v;return(0,q.jsx)(Q,{..._.getStyles(`option`,{className:i,classNames:r,styles:o,style:a}),...g,ref:t,id:y,mod:[`combobox-option`,{"combobox-active":u,"combobox-disabled":p,"combobox-selected":m},h],role:`option`,onClick:e=>{p?e.preventDefault():(_.onOptionSubmit?.(n.value,n),c?.(e))},onMouseDown:e=>{e.preventDefault(),d?.(e)},onMouseOver:e=>{_.resetSelectionOnOptionHover&&_.store.resetSelectedOption(),f?.(e)}})});hW.classes=ZU,hW.displayName=`@mantine/core/ComboboxOption`;var gW=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,id:o,onMouseDown:s,labelledBy:c,...l}=Z(`ComboboxOptions`,null,e),u=nW(),d=TN(o);return(0,K.useEffect)(()=>{u.store.setListId(d)},[d]),(0,q.jsx)(Q,{ref:t,...u.getStyles(`options`,{className:r,style:i,classNames:n,styles:a}),...l,id:d,role:`listbox`,"aria-labelledby":c,onMouseDown:e=>{e.preventDefault(),s?.(e)}})});gW.classes=ZU,gW.displayName=`@mantine/core/ComboboxOptions`;var _W={withAriaAttributes:!0,withKeyboardNavigation:!0},vW=$((e,t)=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,withKeyboardNavigation:c,size:l,...u}=Z(`ComboboxSearch`,_W,e),d=nW(),f=d.getStyles(`search`),p=cW({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:s,autoComplete:`off`});return(0,q.jsx)(nU,{ref:kN(t,d.store.searchRef),classNames:[{input:f.className},n],styles:[{input:f.style},r],size:l||d.size,...p,...u,__staticSelector:`Combobox`})});vW.classes=ZU,vW.displayName=`@mantine/core/ComboboxSearch`;var yW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},bW=$((e,t)=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,...l}=Z(`ComboboxTarget`,yW,e),u=mP(n);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=nW(),f=(0,K.cloneElement)(u,{...cW({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:u.props.onKeyDown,autoComplete:c}),...l});return(0,q.jsx)(WV.Target,{ref:kN(t,d.store.targetRef),children:f})});bW.displayName=`@mantine/core/ComboboxTarget`;function xW(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function SW(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function CW(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function wW({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=MN({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,K.useRef)(null),u=(0,K.useRef)(-1),d=(0,K.useRef)(null),f=(0,K.useRef)(null),p=(0,K.useRef)(-1),m=(0,K.useRef)(-1),h=(0,K.useRef)(-1),g=(0,K.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,K.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,K.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,K.useCallback)(()=>{let e=pP(f.current),t=dP(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,K.useCallback)(e=>{let t=pP(f.current),n=dP(`#${l.current}`,t),r=n?fP(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,K.useCallback)(()=>{let e=pP(f.current),t=dP(`#${l.current} [data-combobox-active]`,e);return b(t?fP(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[b]),S=(0,K.useCallback)(()=>{let e=pP(f.current),t=fP(`#${l.current} [data-combobox-option]`,e);return b(SW(u.current,t,a))},[b,a]),C=(0,K.useCallback)(()=>{let e=pP(f.current),t=fP(`#${l.current} [data-combobox-option]`,e);return b(xW(u.current,t,a))},[b,a]),w=(0,K.useCallback)(()=>{let e=pP(f.current);return b(CW(fP(`#${l.current} [data-combobox-option]`,e)))},[b]),T=(0,K.useCallback)((e=`selected`,t)=>{h.current=window.setTimeout(()=>{let n=pP(f.current),r=fP(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,K.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,K.useCallback)(()=>{let e=pP(f.current);(fP(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,K.useCallback)(e=>{l.current=e},[]),k=(0,K.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,K.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,K.useCallback)(()=>u.current,[]);return(0,K.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var TW={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},EW=hP((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":UM(t),"--combobox-option-padding":BM(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:Y(n),"--combobox-option-fz":UM(t),"--combobox-option-padding":BM(t,`combobox-option-padding`)}}));function DW(e){let t=Z(`Combobox`,TW,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=wW(),v=o||_,y=X({name:p||`Combobox`,classes:ZU,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:EW}),b=()=>{l?.(),v.closeDropdown()};return(0,q.jsx)(tW,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,q.jsx)(WV,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})}DW.extend=e=>e,DW.classes=ZU,DW.displayName=`@mantine/core/Combobox`,DW.Target=bW,DW.Dropdown=iW,DW.Options=gW,DW.Option=hW,DW.Search=vW,DW.Empty=sW,DW.Chevron=eW,DW.Footer=dW,DW.Header=pW,DW.EventsTarget=uW,DW.DropdownTarget=oW,DW.Group=fW,DW.ClearButton=rW,DW.HiddenInput=mW;var OW={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},kW=OW,AW=(0,K.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x},S)=>{let C=X({name:e,props:t,className:n,style:_,classes:OW,classNames:r,styles:i,unstyled:a,attributes:b});return(0,q.jsx)(Q,{...C(`root`),ref:S,__vars:{"--label-fz":UM(f),"--label-lh":BM(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,q.jsxs)(Q,{component:m,htmlFor:m===`label`?l:void 0,...C(`body`),children:[o,(0,q.jsxs)(`div`,{...C(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,q.jsx)(Q,{component:h,htmlFor:h===`label`?l:void 0,...C(`label`),"data-disabled":u||void 0,children:s}),c&&(0,q.jsx)(nU.Description,{size:f,__inheritStyles:!1,...C(`description`),children:c}),d&&typeof d!=`boolean`&&(0,q.jsx)(nU.Error,{size:f,__inheritStyles:!1,...C(`error`),children:d})]})]})})});AW.displayName=`@mantine/core/InlineInput`;var jW={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--outline":`m_215c4542`},MW=(0,K.createContext)(null),NW=MW.Provider,PW=()=>(0,K.useContext)(MW),[FW,IW]=AM(),LW={card:`m_26775b0a`},RW={withBorder:!0},zW=hP((e,{radius:t})=>({card:{"--card-radius":HM(t)}})),BW=$((e,t)=>{let n=Z(`CheckboxCard`,RW,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,checked:l,mod:u,withBorder:d,value:f,onClick:p,defaultChecked:m,onChange:h,attributes:g,..._}=n,v=X({name:`CheckboxCard`,classes:LW,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:g,vars:c,varsResolver:zW,rootSelector:`card`}),y=PW(),[b,x]=MN({value:typeof l==`boolean`?l:y?y.value.includes(f||``):void 0,defaultValue:m,finalValue:!1,onChange:h});return(0,q.jsx)(FW,{value:{checked:b},children:(0,q.jsx)(iV,{ref:t,mod:[{"with-border":d,checked:b},u],...v(`card`),..._,role:`checkbox`,"aria-checked":b,onClick:e=>{p?.(e),y?.onChange(f||``),x(!b)}})})});BW.displayName=`@mantine/core/CheckboxCard`,BW.classes=LW;function VW({children:e,role:t}){let n=VH();return n?(0,q.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,q.jsx)(q.Fragment,{children:e})}var HW=$((e,t)=>{let{value:n,defaultValue:r,onChange:i,size:a,wrapperProps:o,children:s,readOnly:c,disabled:l,...u}=Z(`CheckboxGroup`,null,e),[d,f]=MN({value:n,defaultValue:r,finalValue:[],onChange:i});return(0,q.jsx)(NW,{value:{value:d,onChange:e=>{let t=typeof e==`string`?e:e.currentTarget.value;!c&&f(d.includes(t)?d.filter(e=>e!==t):[...d,t])},size:a,disabled:l},children:(0,q.jsx)(nU.Wrapper,{size:a,ref:t,...o,...u,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:(0,q.jsx)(VW,{role:`group`,children:s})})})});HW.classes=nU.Wrapper.classes,HW.displayName=`@mantine/core/CheckboxGroup`;function UW({size:e,style:t,...n}){return(0,q.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:Y(e),height:Y(e),...t},"aria-hidden":!0,...n,children:(0,q.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function WW({indeterminate:e,...t}){return e?(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,q.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,q.jsx)(UW,{...t})}var GW={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--outline":`m_76e20374`},KW={icon:WW,variant:`filled`},qW=hP((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=UP({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":BM(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:HM(t),"--checkbox-color":a===`outline`?c:WP(n,e),"--checkbox-icon-color":i?WP(i,e):GF(o,e)?fF({color:n,theme:e,autoContrast:o}):void 0}}}),JW=$((e,t)=>{let n=Z(`CheckboxIndicator`,KW,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,icon:l,indeterminate:u,radius:d,color:f,iconColor:p,autoContrast:m,checked:h,mod:g,variant:_,disabled:v,attributes:y,...b}=n,x=X({name:`CheckboxIndicator`,classes:GW,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:y,vars:c,varsResolver:qW,rootSelector:`indicator`}),S=IW(),C=typeof h==`boolean`||typeof u==`boolean`?h||u:S?.checked||!1;return(0,q.jsx)(Q,{ref:t,...x(`indicator`,{variant:_}),variant:_,mod:[{checked:C,disabled:v},g],...b,children:(0,q.jsx)(l,{indeterminate:u,...x(`icon`)})})});JW.displayName=`@mantine/core/CheckboxIndicator`,JW.classes=GW;var YW={labelPosition:`right`,icon:WW,variant:`filled`},XW=hP((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=UP({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":BM(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:HM(t),"--checkbox-color":a===`outline`?c:WP(n,e),"--checkbox-icon-color":i?WP(i,e):GF(o,e)?fF({color:n,theme:e,autoContrast:o}):void 0}}}),ZW=$((e,t)=>{let n=Z(`Checkbox`,YW,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,label:u,id:d,size:f,radius:p,wrapperProps:m,checked:h,labelPosition:g,description:_,error:v,disabled:y,variant:b,indeterminate:x,icon:S,rootRef:C,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,...k}=n,A=PW(),j=f||A?.size,M=X({name:`Checkbox`,props:n,classes:jW,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:O,vars:c,varsResolver:XW}),{styleProps:N,rest:P}=$F(k),ee=TN(d),te={checked:A?.value.includes(P.value)??h,onChange:e=>{A?.onChange(e),T?.(e)},disabled:A?.disabled??y},ne=(0,K.useRef)(null),F=t||ne;return(0,K.useEffect)(()=>{F&&`current`in F&&F.current&&(F.current.indeterminate=x||!1,x?F.current.setAttribute(`data-indeterminate`,`true`):F.current.removeAttribute(`data-indeterminate`))},[x,F]),(0,q.jsx)(AW,{...M(`root`),__staticSelector:`Checkbox`,__stylesApiProps:n,id:ee,size:j,labelPosition:g,label:u,description:_,error:v,disabled:te.disabled,classNames:r,styles:o,unstyled:s,"data-checked":te.checked||h||void 0,variant:b,ref:C,mod:D,inert:P.inert,...N,...m,children:(0,q.jsxs)(Q,{...M(`inner`),mod:{"data-label-position":g},children:[(0,q.jsx)(Q,{component:`input`,id:ee,ref:F,mod:{error:!!v},...M(`input`,{focusable:!0,variant:b}),...P,...te,inert:P.inert,type:`checkbox`}),(0,q.jsx)(S,{indeterminate:x,...M(`icon`)})]})})});ZW.classes={...jW,...kW},ZW.displayName=`@mantine/core/Checkbox`,ZW.Group=HW,ZW.Indicator=JW,ZW.Card=BW;function QW(e){return`group`in e}function $W({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;QW(o)&&i.push({group:o.group,items:$W({options:o.items,search:t,limit:n-i.length})}),QW(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function eG(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function tG(e,t=new Set){if(Array.isArray(e))for(let n of e)if(QW(n))tG(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(typeof n.value!=`string`)throw Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function nG(e,t){return Array.isArray(e)?e.includes(t):e===t}function rG({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!QW(e)){let s=nG(r,e.value),c=t&&(s?(0,q.jsx)(UW,{className:ZU.optionsDropdownCheckIcon}):n?(0,q.jsx)(`div`,{className:ZU.optionsDropdownCheckPlaceholder}):null),l=(0,q.jsxs)(q.Fragment,{children:[i===`left`&&c,(0,q.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,q.jsx)(DW.Option,{value:e.value,disabled:e.disabled,className:_P({[ZU.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,q.jsx)(rG,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},e.value));return(0,q.jsx)(DW.Group,{label:e.group,children:s})}function iG({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){tG(e);let y=typeof i==`string`?(r||$W)({options:e,search:c?i:``,limit:a??1/0}):e,b=eG(y),x=y.map(e=>(0,q.jsx)(rG,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},QW(e)?e.group:e.value));return(0,q.jsx)(DW.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,q.jsxs)(DW.Options,{labelledBy:h,"aria-label":v,children:[s?(0,q.jsx)(eV.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,q.jsx)(DW.Empty,{children:p})]})})}var aG=$((e,t)=>{let n=Z(`Autocomplete`,null,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:x,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,size:O,id:k,renderOption:A,autoComplete:j,scrollAreaProps:M,onClear:N,clearButtonProps:P,error:ee,clearable:te,rightSection:ne,autoSelectOnBlur:F,openOnFocus:I=!0,attributes:L,...re}=n,ie=TN(k),ae=YU(h),oe=XU(ae),[se,ce]=MN({value:g,defaultValue:_,finalValue:``,onChange:m}),le=wW({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y&&le.selectFirstOption()},onDropdownClose:()=>{l?.(),setTimeout(le.resetSelectedOption,0)}}),ue=e=>{ce(e),le.resetSelectedOption()},{resolvedClassNames:R,resolvedStyles:de}=OF({props:n,styles:i,classNames:r});(0,K.useEffect)(()=>{v&&le.selectFirstOption()},[v,se]);let fe=(0,q.jsx)(DW.ClearButton,{...P,onClear:()=>{ue(``),N?.()}});return(0,q.jsxs)(DW,{store:le,__staticSelector:`Autocomplete`,classNames:R,styles:de,unstyled:a,readOnly:S,size:O,attributes:L,keepMounted:F,onOptionSubmit:e=>{b?.(e),ue(oe[e].label),le.closeDropdown()},...x,children:[(0,q.jsx)(DW.Target,{autoComplete:j,children:(0,q.jsx)(aU,{ref:t,...re,size:O,__staticSelector:`Autocomplete`,__clearSection:fe,__clearable:te&&!!se&&!C&&!S,rightSection:ne,disabled:C,readOnly:S,value:se,error:ee,onChange:e=>{ue(e.currentTarget.value),le.openDropdown(),v&&le.selectFirstOption()},onFocus:e=>{I&&le.openDropdown(),d?.(e)},onBlur:e=>{F&&le.clickSelectedOption(),le.closeDropdown(),f?.(e)},onClick:e=>{le.openDropdown(),p?.(e)},classNames:R,styles:de,unstyled:a,attributes:L,id:ie})}),(0,q.jsx)(iG,{data:ae,hidden:S||C,filter:w,search:se,limit:T,hiddenWhenEmpty:!0,withScrollArea:E,maxDropdownHeight:D,unstyled:a,labelId:re.label?`${ie}-label`:void 0,"aria-label":re.label?void 0:re[`aria-label`],renderOption:A,scrollAreaProps:M})]})});aG.classes={...aU.classes,...DW.classes},aG.displayName=`@mantine/core/Autocomplete`;var oG={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},sG=hP((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":BM(a,`badge-height`),"--badge-padding-x":BM(a,`badge-padding-x`),"--badge-fz":BM(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:HM(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?WP(n,e):void 0}}}),cG=NI((e,t)=>{let n=Z(`Badge`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,radius:l,color:u,gradient:d,leftSection:f,rightSection:p,children:m,variant:h,fullWidth:g,autoContrast:_,circle:v,mod:y,attributes:b,...x}=n,S=X({name:`Badge`,props:n,classes:oG,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:b,vars:c,varsResolver:sG});return(0,q.jsxs)(Q,{variant:h,mod:[{block:g,circle:v,"with-right-section":!!p,"with-left-section":!!f},y],...S(`root`,{variant:h}),ref:t,...x,children:[f&&(0,q.jsx)(`span`,{...S(`section`),"data-position":`left`,children:f}),(0,q.jsx)(`span`,{...S(`label`),children:m}),p&&(0,q.jsx)(`span`,{...S(`section`),"data-position":`right`,children:p})]})});cG.classes=oG,cG.displayName=`@mantine/core/Badge`;var lG={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},uG=hP((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?WP(t,e):void 0,"--burger-size":BM(n,`burger-size`),"--burger-line-size":r?Y(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),dG=$((e,t)=>{let n=Z(`Burger`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,opened:l,children:u,transitionDuration:d,transitionTimingFunction:f,lineSize:p,attributes:m,...h}=n,g=X({name:`Burger`,classes:lG,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:uG});return(0,q.jsxs)(iV,{...g(`root`),ref:t,...h,children:[(0,q.jsx)(Q,{mod:[`reduce-motion`,{opened:l}],...g(`burger`)}),u]})});dG.classes=lG,dG.displayName=`@mantine/core/Burger`;var fG={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},pG={orientation:`horizontal`},mG=hP((e,{borderWidth:t})=>({group:{"--button-border-width":Y(t)}})),hG=$((e,t)=>{let n=Z(`ButtonGroup`,pG,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,attributes:p,...m}=Z(`ButtonGroup`,pG,e);return(0,q.jsx)(Q,{...X({name:`ButtonGroup`,props:n,classes:fG,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:l,varsResolver:mG,rootSelector:`group`})(`group`),ref:t,variant:d,mod:[{"data-orientation":c},f],role:`group`,...m})});hG.classes=fG,hG.displayName=`@mantine/core/ButtonGroup`;var gG=hP((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":BM(o,`section-height`),"--section-padding-x":BM(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?UM(o.replace(`compact-`,``)):UM(o),"--section-radius":t===void 0?void 0:HM(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),_G=$((e,t)=>{let n=Z(`ButtonGroupSection`,null,e),{className:r,style:i,classNames:a,styles:o,unstyled:s,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,attributes:p,...m}=n;return(0,q.jsx)(Q,{...X({name:`ButtonGroupSection`,props:n,classes:fG,className:r,style:i,classNames:a,styles:o,unstyled:s,attributes:p,vars:c,varsResolver:gG,rootSelector:`groupSection`})(`groupSection`),ref:t,variant:l,...m})});_G.classes=fG,_G.displayName=`@mantine/core/ButtonGroupSection`;var vG={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Y(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},yG=hP((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":BM(a,`button-height`),"--button-padding-x":BM(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?UM(a.replace(`compact-`,``)):UM(a),"--button-radius":t===void 0?void 0:HM(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),bG=NI((e,t)=>{let n=Z(`Button`,null,e),{style:r,vars:i,className:a,color:o,disabled:s,children:c,leftSection:l,rightSection:u,fullWidth:d,variant:f,radius:p,loading:m,loaderProps:h,gradient:g,classNames:_,styles:v,unstyled:y,"data-disabled":b,autoContrast:x,mod:S,attributes:C,...w}=n,T=X({name:`Button`,props:n,classes:fG,className:a,style:r,classNames:_,styles:v,unstyled:y,attributes:C,vars:i,varsResolver:yG}),E=!!l,D=!!u;return(0,q.jsxs)(iV,{ref:t,...T(`root`,{active:!s&&!m&&!b}),unstyled:y,variant:f,disabled:s||m,mod:[{disabled:s||b,loading:m,block:d,"with-left-section":E,"with-right-section":D},S],...w,children:[typeof m==`boolean`&&(0,q.jsx)(AV,{mounted:m,transition:vG,duration:150,children:e=>(0,q.jsx)(Q,{component:`span`,...T(`loader`,{style:e}),"aria-hidden":!0,children:(0,q.jsx)(QV,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...h})})}),(0,q.jsxs)(`span`,{...T(`inner`),children:[l&&(0,q.jsx)(Q,{component:`span`,...T(`section`),mod:{position:`left`},children:l}),(0,q.jsx)(Q,{component:`span`,mod:{loading:m},...T(`label`),children:c}),u&&(0,q.jsx)(Q,{component:`span`,...T(`section`),mod:{position:`right`},children:u})]})]})});bG.classes=fG,bG.displayName=`@mantine/core/Button`,bG.Group=hG,bG.GroupSection=_G;var[xG,SG]=kM(`Card component was not found in tree`),CG={root:`m_e615b15f`,section:`m_599a2148`},wG=NI((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,withBorder:s,inheritPadding:c,mod:l,...u}=Z(`CardSection`,null,e),d=SG();return(0,q.jsx)(Q,{ref:t,mod:[{"with-border":s,"inherit-padding":c},l],...d.getStyles(`section`,{className:r,style:i,styles:a,classNames:n}),...u})});wG.classes=CG,wG.displayName=`@mantine/core/CardSection`;var TG=hP((e,{padding:t})=>({root:{"--card-padding":VM(t)}})),EG=NI((e,t)=>{let n=Z(`Card`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,children:l,padding:u,attributes:d,...f}=n,p=X({name:`Card`,props:n,classes:CG,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:TG}),m=K.Children.toArray(l),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&e.type===wG?(0,K.cloneElement)(e,{"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,q.jsx)(xG,{value:{getStyles:p},children:(0,q.jsx)(lV,{ref:t,unstyled:s,...p(`root`),...f,children:h})})});EG.classes=CG,EG.displayName=`@mantine/core/Card`,EG.Section=wG;var DG={root:`m_de3d2490`,colorOverlay:`m_862f3d1b`,shadowOverlay:`m_98ae7f22`,alphaOverlay:`m_95709ac0`,childrenOverlay:`m_93e74e3`},OG={withShadow:!0},kG=hP((e,{radius:t,size:n})=>({root:{"--cs-radius":t===void 0?void 0:HM(t),"--cs-size":Y(n)}})),AG=NI((e,t)=>{let n=Z(`ColorSwatch`,OG,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,size:u,radius:d,withShadow:f,children:p,variant:m,attributes:h,...g}=Z(`ColorSwatch`,OG,n),_=X({name:`ColorSwatch`,props:n,classes:DG,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:kG});return(0,q.jsxs)(Q,{ref:t,variant:m,size:u,..._(`root`,{focusable:!0}),...g,children:[(0,q.jsx)(`span`,{..._(`alphaOverlay`)}),f&&(0,q.jsx)(`span`,{..._(`shadowOverlay`)}),(0,q.jsx)(`span`,{..._(`colorOverlay`,{style:{backgroundColor:l}})}),(0,q.jsx)(`span`,{..._(`childrenOverlay`),children:p})]})});AG.classes=DG,AG.displayName=`@mantine/core/ColorSwatch`;var[jG,MG]=AM(null),NG={wrapper:`m_fee9c77`,preview:`m_9dddfbac`,body:`m_bffecc3e`,sliders:`m_3283bb96`,thumb:`m_40d572ba`,swatch:`m_d8ee6fd8`,swatches:`m_5711e686`,saturation:`m_202a296e`,saturationOverlay:`m_11b3db02`,slider:`m_d856d47d`,sliderOverlay:`m_8f327113`},PG=(0,K.forwardRef)(({position:e,...t},n)=>(0,q.jsx)(Q,{ref:n,__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...t}));PG.displayName=`@mantine/core/ColorPickerThumb`;var FG=$((e,t)=>{let n=Z(`ColorSlider`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,onChange:l,onChangeEnd:u,maxValue:d,round:f,size:p=`md`,focusable:m=!0,value:h,overlays:g,thumbColor:_=`transparent`,onScrubStart:v,onScrubEnd:y,__staticSelector:b=`ColorPicker`,attributes:x,...S}=n,C=X({name:b,classes:NG,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:x}),w=MG()?.getStyles||C,T=sF(),[E,D]=(0,K.useState)({y:0,x:h/d}),O=(0,K.useRef)(E),k=e=>f?Math.round(e*d):e*d,{ref:A}=jN(({x:e,y:t})=>{O.current={x:e,y:t},l?.(k(e))},{onScrubEnd:()=>{let{x:e}=O.current;u?.(k(e)),y?.()},onScrubStart:v});lN(()=>{D({y:0,x:h/d})},[h]);let j=(e,t)=>{e.preventDefault();let n=AN(t);l?.(k(n.x)),u?.(k(n.x))},M=e=>{switch(e.key){case`ArrowRight`:j(e,{x:E.x+.05,y:E.y});break;case`ArrowLeft`:j(e,{x:E.x-.05,y:E.y});break}},N=g.map((e,t)=>(0,K.createElement)(`div`,{...w(`sliderOverlay`),style:e,key:t}));return(0,q.jsxs)(Q,{...S,ref:kN(A,t),...w(`slider`),role:`slider`,"aria-valuenow":h,"aria-valuemax":d,"aria-valuemin":0,tabIndex:m?0:-1,onKeyDown:M,"data-focus-ring":T.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[N,(0,q.jsx)(PG,{position:E,...w(`thumb`,{style:{top:Y(1),background:_}})})]})});FG.displayName=`@mantine/core/ColorSlider`;function IG(e,t=0,n=10**t){return Math.round(n*e)/n}function LG({h:e,s:t,l:n,a:r}){let i=t*((n<50?n:100-n)/100);return{h:e,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}var RG={grad:360/400,turn:360,rad:360/(Math.PI*2)};function zG(e,t=`deg`){return Number(e)*(RG[t]||1)}var BG=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function VG(e){let t=BG.exec(e);return t?LG({h:zG(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function HG({r:e,g:t,b:n,a:r}){let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=a?i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a:0;return{h:IG(60*(o<0?o+6:o),3),s:IG(i?a/i*100:0,3),v:IG(i/255*100,3),a:r}}function UG(e){let t=e[0]===`#`?e.slice(1):e;return t.length===3?HG({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):HG({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function WG(e){let t=e[0]===`#`?e.slice(1):e,n=e=>IG(parseInt(e,16)/255,3);if(t.length===4){let e=t.slice(0,3),r=n(t[3]+t[3]);return{...UG(e),a:r}}let r=t.slice(0,6),i=n(t.slice(6,8));return{...UG(r),a:i}}var GG=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function KG(e){let t=GG.exec(e);return t?HG({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}var qG={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},JG={hex:UG,hexa:WG,rgb:KG,rgba:KG,hsl:VG,hsla:VG};function YG(e){for(let[,t]of Object.entries(qG))if(t.test(e))return!0;return!1}function XG(e){if(typeof e!=`string`)return{h:0,s:0,v:0,a:1};if(e===`transparent`)return{h:0,s:0,v:0,a:0};let t=e.trim();for(let[e,n]of Object.entries(qG))if(n.test(t))return JG[e](t);return{h:0,s:0,v:0,a:1}}var ZG=(0,K.forwardRef)((e,t)=>{let{value:n,onChange:r,onChangeEnd:i,color:a,...o}=Z(`AlphaSlider`,null,e);return(0,q.jsx)(FG,{...o,ref:t,value:n,onChange:e=>r?.(IG(e,2)),onChangeEnd:e=>i?.(IG(e,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:`linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)`,backgroundSize:`${Y(8)} ${Y(8)}`,backgroundPosition:`0 0, 0 ${Y(4)}, ${Y(4)} ${Y(-4)}, ${Y(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${a})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Y(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Y(4)} inset`}]})});ZG.displayName=`@mantine/core/AlphaSlider`;function QG({h:e,s:t,v:n,a:r}){let i=e/360*6,a=t/100,o=n/100,s=Math.floor(i),c=o*(1-a),l=o*(1-(i-s)*a),u=o*(1-(1-i+s)*a),d=s%6;return{r:IG([o,l,c,c,u,o][d]*255),g:IG([u,o,o,l,c,c][d]*255),b:IG([c,c,u,o,o,l][d]*255),a:IG(r,2)}}function $G(e,t){let{r:n,g:r,b:i,a}=QG(e);return t?`rgba(${n}, ${r}, ${i}, ${IG(a,2)})`:`rgb(${n}, ${r}, ${i})`}function eK({h:e,s:t,v:n,a:r},i){let a=(200-t)*n/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?t*n/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return i?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${IG(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function tK(e){let t=e.toString(16);return t.length<2?`0${t}`:t}function nK(e){let{r:t,g:n,b:r}=QG(e);return`#${tK(t)}${tK(n)}${tK(r)}`}function rK(e){let t=Math.round(e.a*255);return`${nK(e)}${tK(t)}`}var iK={hex:nK,hexa:e=>rK(e),rgb:e=>$G(e,!1),rgba:e=>$G(e,!0),hsl:e=>eK(e,!1),hsla:e=>eK(e,!0)};function aK(e,t){return t?e in iK?iK[e](t):iK.hex(t):`#000000`}var oK=(0,K.forwardRef)((e,t)=>{let{value:n,onChange:r,onChangeEnd:i,color:a,...o}=Z(`HueSlider`,{},e);return(0,q.jsx)(FG,{...o,ref:t,value:n,onChange:r,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:`linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Y(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Y(4)} inset`}]})});oK.displayName=`@mantine/core/HueSlider`;function sK({className:e,onChange:t,onChangeEnd:n,value:r,saturationLabel:i,focusable:a=!0,size:o,color:s,onScrubStart:c,onScrubEnd:l,...u}){let{getStyles:d}=MG(),[f,p]=(0,K.useState)({x:r.s/100,y:1-r.v/100}),m=(0,K.useRef)(f),{ref:h}=jN(({x:e,y:n})=>{m.current={x:e,y:n},t({s:Math.round(e*100),v:Math.round((1-n)*100)})},{onScrubEnd:()=>{let{x:e,y:t}=m.current;n({s:Math.round(e*100),v:Math.round((1-t)*100)}),l?.()},onScrubStart:c});(0,K.useEffect)(()=>{p({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);let g=(e,r)=>{e.preventDefault();let i=AN(r);t({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)}),n({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)})},_=e=>{switch(e.key){case`ArrowUp`:g(e,{y:f.y-.05,x:f.x});break;case`ArrowDown`:g(e,{y:f.y+.05,x:f.x});break;case`ArrowRight`:g(e,{x:f.x+.05,y:f.y});break;case`ArrowLeft`:g(e,{x:f.x-.05,y:f.y});break}};return(0,q.jsxs)(Q,{...d(`saturation`),ref:h,...u,role:`slider`,"aria-label":i,"aria-valuenow":f.x,"aria-valuetext":aK(`rgba`,r),tabIndex:a?0:-1,onKeyDown:_,children:[(0,q.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),(0,q.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(90deg, #fff, transparent)`}})}),(0,q.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(0deg, #000, transparent)`}})}),(0,q.jsx)(PG,{position:f,...d(`thumb`,{style:{backgroundColor:s}})})]})}sK.displayName=`@mantine/core/Saturation`;var cK=(0,K.forwardRef)(({className:e,datatype:t,setValue:n,onChangeEnd:r,size:i,focusable:a,data:o,swatchesPerRow:s,value:c,...l},u)=>{let d=MG(),f=o.map((e,t)=>(0,K.createElement)(AG,{...d.getStyles(`swatch`),unstyled:d.unstyled,component:`button`,type:`button`,color:e,key:t,radius:`sm`,onClick:()=>{n(e),r?.(e)},"aria-label":e,tabIndex:a?0:-1,"data-swatch":!0},c===e&&(0,q.jsx)(UW,{size:`35%`,color:VP(e)<.5?`white`:`black`})));return(0,q.jsx)(Q,{...d.getStyles(`swatches`),ref:u,...l,children:f})});cK.displayName=`@mantine/core/Swatches`;var lK={swatchesPerRow:7,withPicker:!0,focusable:!0,size:`md`,__staticSelector:`ColorPicker`},uK=hP((e,{size:t,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":BM(t,`cp-preview-size`),"--cp-width":BM(t,`cp-width`),"--cp-body-spacing":VM(t),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":BM(t,`cp-thumb-size`),"--cp-saturation-height":BM(t,`cp-saturation-height`)}})),dK=$((e,t)=>{let n=Z(`ColorPicker`,lK,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,format:l=`hex`,value:u,defaultValue:d,onChange:f,onChangeEnd:p,withPicker:m,size:h,saturationLabel:g,hueLabel:_,alphaLabel:v,focusable:y,swatches:b,swatchesPerRow:x,fullWidth:S,onColorSwatchClick:C,__staticSelector:w,mod:T,attributes:E,...D}=n,O=X({name:w,props:n,classes:NG,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:E,rootSelector:`wrapper`,vars:c,varsResolver:uK}),k=(0,K.useRef)(l||`hex`),A=(0,K.useRef)(``),j=(0,K.useRef)(-1),M=(0,K.useRef)(!1),N=l===`hexa`||l===`rgba`||l===`hsla`,[P,ee,te]=MN({value:u,defaultValue:d,finalValue:`#FFFFFF`,onChange:f}),[ne,F]=(0,K.useState)(XG(P)),I=()=>{window.clearTimeout(j.current),M.current=!0},L=()=>{window.clearTimeout(j.current),j.current=window.setTimeout(()=>{M.current=!1},200)},re=e=>{F(t=>{let n={...t,...e};return A.current=aK(k.current,n),n}),ee(A.current)};return lN(()=>{typeof u==`string`&&YG(u)&&!M.current&&F(XG(u))},[u]),lN(()=>{k.current=l||`hex`,ee(aK(k.current,ne))},[l]),(0,q.jsx)(jG,{value:{getStyles:O,unstyled:s},children:(0,q.jsxs)(Q,{ref:t,...O(`wrapper`),size:h,mod:[{"full-width":S},T],...D,children:[m&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(sK,{value:ne,onChange:re,onChangeEnd:({s:e,v:t})=>p?.(aK(k.current,{...ne,s:e,v:t})),color:P,size:h,focusable:y,saturationLabel:g,onScrubStart:I,onScrubEnd:L}),(0,q.jsxs)(`div`,{...O(`body`),children:[(0,q.jsxs)(`div`,{...O(`sliders`),children:[(0,q.jsx)(oK,{value:ne.h,onChange:e=>re({h:e}),onChangeEnd:e=>p?.(aK(k.current,{...ne,h:e})),size:h,focusable:y,"aria-label":_,onScrubStart:I,onScrubEnd:L}),N&&(0,q.jsx)(ZG,{value:ne.a,onChange:e=>re({a:e}),onChangeEnd:e=>{p?.(aK(k.current,{...ne,a:e}))},size:h,color:aK(`hex`,ne),focusable:y,"aria-label":v,onScrubStart:I,onScrubEnd:L})]}),N&&(0,q.jsx)(AG,{color:P,radius:`sm`,size:`var(--cp-preview-size)`,...O(`preview`)})]})]}),Array.isArray(b)&&(0,q.jsx)(cK,{data:b,swatchesPerRow:x,focusable:y,setValue:ee,value:P,onChangeEnd:e=>{let t=aK(l,XG(e));C?.(t),p?.(t),te||F(XG(e))}})]})})});dK.classes=NG,dK.displayName=`@mantine/core/ColorPicker`;var fK={eyeDropperIcon:`m_b077c2bc`,eyeDropperButton:`m_66a028b5`,colorPreview:`m_c5ccdcab`,dropdown:`m_5ece2cd7`};function pK({style:e,...t}){return(0,q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,style:{width:`var(--ci-eye-dropper-icon-size)`,height:`var(--ci-eye-dropper-icon-size)`,...e},viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,...t,children:[(0,q.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,q.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,q.jsx)(`path`,{d:`M12 3l0 4`}),(0,q.jsx)(`path`,{d:`M12 21l0 -3`}),(0,q.jsx)(`path`,{d:`M3 12l4 0`}),(0,q.jsx)(`path`,{d:`M21 12l-3 0`}),(0,q.jsx)(`path`,{d:`M12 12l0 .01`})]})}var mK={format:`hex`,fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:`fade`,duration:0}},withEyeDropper:!0,size:`sm`},hK=hP((e,{size:t})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":BM(t,`ci-eye-dropper-icon-size`)},eyeDropperButton:{"--ci-button-size":BM(t,`ci-button-size`)},colorPreview:{"--ci-preview-size":BM(t,`ci-preview-size`)}})),gK=$((e,t)=>{let n=Z(`ColorInput`,mK,e),{classNames:r,styles:i,unstyled:a,disallowInput:o,fixOnBlur:s,popoverProps:c,withPreview:l,withEyeDropper:u,eyeDropperIcon:d,closeOnColorSwatchClick:f,eyeDropperButtonProps:p,value:m,defaultValue:h,onChange:g,onChangeEnd:_,onClick:v,onFocus:y,onBlur:b,inputProps:x,format:S=`hex`,wrapperProps:C,readOnly:w,withPicker:T,swatches:E,disabled:D,leftSection:O,rightSection:k,swatchesPerRow:A,...j}=rU(`ColorInput`,mK,e),M=X({name:`ColorInput`,props:n,classes:fK,classNames:r,styles:i,unstyled:a,rootSelector:`wrapper`,vars:n.vars,varsResolver:hK}),{resolvedClassNames:N,resolvedStyles:P}=OF({classNames:r,styles:i,props:n}),[ee,te]=(0,K.useState)(!1),[ne,F]=(0,K.useState)(``),[I,L]=MN({value:m,defaultValue:h,finalValue:``,onChange:g}),{supported:re,open:ie}=tP(),ae=(0,q.jsx)(oH,{...p,...M(`eyeDropperButton`,{className:p?.className,style:p?.style}),variant:`subtle`,color:`gray`,unstyled:a,onClick:()=>ie().then(e=>{if(e?.sRGBHex){let t=aK(S,XG(e.sRGBHex));L(t),_?.(t)}}).catch(()=>{}),children:d||(0,q.jsx)(pK,{...M(`eyeDropperIcon`)})}),oe=e=>{y?.(e),te(!0)},se=e=>{s&&L(ne),b?.(e),te(!1)},ce=e=>{v?.(e),te(!0)};return(0,K.useEffect)(()=>{(YG(I)||I.trim()===``)&&F(I)},[I]),lN(()=>{YG(I)&&L(aK(S,XG(I)))},[S]),(0,q.jsx)(nU.Wrapper,{...C,classNames:N,styles:P,__staticSelector:`ColorInput`,children:(0,q.jsxs)(WV,{__staticSelector:`ColorInput`,position:`bottom-start`,offset:5,opened:ee,...c,classNames:N,styles:P,unstyled:a,withRoles:!1,disabled:w||T===!1&&(!Array.isArray(E)||E.length===0),children:[(0,q.jsx)(WV.Target,{children:(0,q.jsx)(nU,{autoComplete:`off`,...j,...x,classNames:N,styles:P,disabled:D,ref:t,__staticSelector:`ColorInput`,onFocus:oe,onBlur:se,onClick:ce,spellCheck:!1,value:I,onChange:e=>{let t=e.currentTarget.value;L(t),YG(t)&&_?.(aK(S,XG(t)))},leftSection:O||(l?(0,q.jsx)(AG,{color:YG(I)?I:`#fff`,size:`var(--ci-preview-size)`,...M(`colorPreview`)}):null),readOnly:o||w,pointer:o,unstyled:a,rightSection:k||(u&&!D&&!w&&re?ae:null)})}),(0,q.jsx)(WV.Dropdown,{onMouseDown:e=>e.preventDefault(),className:fK.dropdown,children:(0,q.jsx)(dK,{__staticSelector:`ColorInput`,value:I,onChange:L,onChangeEnd:_,format:S,swatches:E,swatchesPerRow:A,withPicker:T,size:x.size,focusable:!1,unstyled:a,styles:P,classNames:N,onColorSwatchClick:()=>f&&te(!1),attributes:C.attributes})})]})})});gK.classes=aU.classes,gK.displayName=`@mantine/core/ColorInput`;var _K={root:`m_7485cace`},vK=hP((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:BM(t,`container-size`)}})),yK=$((e,t)=>{let n=Z(`Container`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,fluid:l,mod:u,attributes:d,strategy:f,...p}=n,m=X({name:`Container`,classes:_K,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:vK});return(0,q.jsx)(Q,{ref:t,mod:[{fluid:l,strategy:f||`block`},u],...m(`root`),...p})});yK.classes=_K,yK.displayName=`@mantine/core/Container`;var bK={root:`m_3eebeb36`,label:`m_9e365f20`},xK={orientation:`horizontal`},SK=hP((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?WP(t,e):void 0,"--divider-border-style":n,"--divider-size":BM(r,`divider-size`)}})),CK=$((e,t)=>{let n=Z(`Divider`,xK,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,orientation:u,label:d,labelPosition:f,mod:p,attributes:m,...h}=n,g=X({name:`Divider`,classes:bK,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,vars:c,varsResolver:SK});return(0,q.jsx)(Q,{ref:t,mod:[{orientation:u,"with-label":!!d},p],...g(`root`),...h,role:`separator`,children:d&&(0,q.jsx)(Q,{component:`span`,mod:{position:f},...g(`label`),children:d})})});CK.classes=bK,CK.displayName=`@mantine/core/Divider`;var wK={root:`m_e9408a47`,"root--default":`m_84c9523a`,"root--filled":`m_ef274e49`,"root--unstyled":`m_eda993d3`,legend:`m_90794832`,"legend--unstyled":`m_74ca27fe`},TK={variant:`default`},EK=hP((e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:HM(t)}})),DK=$((e,t)=>{let n=Z(`Fieldset`,TK,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,legend:l,variant:u,children:d,attributes:f,...p}=n,m=X({name:`Fieldset`,classes:wK,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:f,vars:c,varsResolver:EK});return(0,q.jsxs)(Q,{component:`fieldset`,ref:t,variant:u,...m(`root`,{variant:u}),...p,children:[l&&(0,q.jsx)(`legend`,{...m(`legend`,{variant:u}),children:l}),d]})});DK.classes=wK,DK.displayName=`@mantine/core/Fieldset`;var OK={multiple:!1},kK=(0,K.forwardRef)((e,t)=>{let{onChange:n,children:r,multiple:i,accept:a,name:o,form:s,resetRef:c,disabled:l,capture:u,inputProps:d,...f}=Z(`FileButton`,OK,e),p=(0,K.useRef)(null),m=()=>{!l&&p.current?.click()};return DN(c,()=>{p.current&&(p.current.value=``)}),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`input`,{style:{display:`none`},type:`file`,accept:a,multiple:i,onChange:e=>{if(e.currentTarget.files===null)return n(i?[]:null);n(i?Array.from(e.currentTarget.files):e.currentTarget.files[0]||null)},ref:kN(t,p),name:o,form:s,capture:u,...d}),r({onClick:m,...f})]})});kK.displayName=`@mantine/core/FileButton`;var AK={valueComponent:({value:e})=>(0,q.jsx)(`div`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:Array.isArray(e)?e.map(e=>e.name).join(`, `):e?.name}),size:`sm`},jK=$((e,t)=>{let n=Z(`FileInput`,AK,e),{unstyled:r,vars:i,onChange:a,value:o,defaultValue:s,multiple:c,accept:l,name:u,form:d,valueComponent:f,clearable:p,clearButtonProps:m,readOnly:h,capture:g,fileInputProps:_,rightSection:v,size:y,placeholder:b,component:x,resetRef:S,classNames:C,styles:w,attributes:T,...E}=n,D=(0,K.useRef)(null),{resolvedClassNames:O,resolvedStyles:k}=OF({classNames:C,styles:w,props:n}),[A,j]=MN({value:o,defaultValue:s,onChange:a,finalValue:c?[]:null}),M=Array.isArray(A)?A.length!==0:A!==null,N=v||(p&&M&&!h?(0,q.jsx)(dH,{...m,variant:`subtle`,onClick:()=>j(c?[]:null),size:y,unstyled:r}):null);return(0,K.useEffect)(()=>{(Array.isArray(A)&&A.length===0||A===null)&&D.current?.()},[A]),(0,q.jsx)(kK,{onChange:j,multiple:c,accept:l,name:u,form:d,resetRef:kN(D,S),disabled:h,capture:g,inputProps:_,children:e=>(0,q.jsx)(aU,{component:x||`button`,ref:t,rightSection:N,...e,...E,__staticSelector:`FileInput`,multiline:!0,type:`button`,pointer:!0,__stylesApiProps:n,unstyled:r,size:y,classNames:C,styles:w,attributes:T,children:M?(0,q.jsx)(f,{value:A}):(0,q.jsx)(nU.Placeholder,{__staticSelector:`FileInput`,classNames:O,styles:k,attributes:T,children:b})})})});jK.classes=aU.classes,jK.displayName=`@mantine/core/FileInput`;var MK=jK,[NK,PK]=kM(`Grid component was not found in tree`),FK={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},IK=(e,t)=>e===`content`?`auto`:e===`auto`?`0rem`:e?`${100/(t/e)}%`:void 0,LK=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:IK(e,t),RK=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},zK=(e,t)=>e===0?`0`:e?`${100/(t/e)}%`:void 0;function BK({span:e,order:t,offset:n,selector:r}){let i=sF(),a=PK(),o=a.breakpoints||i.breakpoints,s=YM(e)===void 0?12:YM(e),c=EM({"--col-order":YM(t)?.toString(),"--col-flex-grow":RK(s,a.grow),"--col-flex-basis":IK(s,a.columns),"--col-width":s===`content`?`auto`:void 0,"--col-max-width":LK(s,a.columns,a.grow),"--col-offset":zK(YM(n),a.columns)}),l=_M(o).reduce((r,i)=>(r[i]||(r[i]={}),typeof t==`object`&&t[i]!==void 0&&(r[i][`--col-order`]=t[i]?.toString()),typeof e==`object`&&e[i]!==void 0&&(r[i][`--col-flex-grow`]=RK(e[i],a.grow),r[i][`--col-flex-basis`]=IK(e[i],a.columns),r[i][`--col-width`]=e[i]===`content`?`auto`:void 0,r[i][`--col-max-width`]=LK(e[i],a.columns,a.grow)),typeof n==`object`&&n[i]!==void 0&&(r[i][`--col-offset`]=zK(n[i],a.columns)),r),{}),u=JM(_M(l),o).filter(e=>_M(l[e.value]).length>0).map(e=>({query:a.type===`container`?`mantine-grid (min-width: ${o[e.value]})`:`(min-width: ${o[e.value]})`,styles:l[e.value]}));return(0,q.jsx)(QF,{styles:c,media:a.type===`container`?void 0:u,container:a.type===`container`?u:void 0,selector:r})}var VK={span:12},HK=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,span:s,order:c,offset:l,...u}=Z(`GridCol`,VK,e),d=PK(),f=SI();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(BK,{selector:`.${f}`,span:s,order:c,offset:l}),(0,q.jsx)(Q,{ref:t,...d.getStyles(`col`,{className:_P(r,f),style:i,classNames:n,styles:a}),...u})]})});HK.classes=FK,HK.displayName=`@mantine/core/GridCol`;function UK({gutter:e,selector:t,breakpoints:n,type:r}){let i=sF(),a=n||i.breakpoints,o=EM({"--grid-gutter":VM(YM(e))}),s=_M(a).reduce((t,n)=>(t[n]||(t[n]={}),typeof e==`object`&&e[n]!==void 0&&(t[n][`--grid-gutter`]=VM(e[n])),t),{}),c=JM(_M(s),a).filter(e=>_M(s[e.value]).length>0).map(e=>({query:r===`container`?`mantine-grid (min-width: ${a[e.value]})`:`(min-width: ${a[e.value]})`,styles:s[e.value]}));return(0,q.jsx)(QF,{styles:o,media:r===`container`?void 0:c,container:r===`container`?c:void 0,selector:t})}var WK={gutter:`md`,grow:!1,columns:12},GK=hP((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),KK=$((e,t)=>{let n=Z(`Grid`,WK,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,grow:l,gutter:u,columns:d,align:f,justify:p,children:m,breakpoints:h,type:g,attributes:_,...v}=n,y=X({name:`Grid`,classes:FK,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:_,vars:c,varsResolver:GK}),b=SI();return g===`container`&&h?(0,q.jsxs)(NK,{value:{getStyles:y,grow:l,columns:d,breakpoints:h,type:g},children:[(0,q.jsx)(UK,{selector:`.${b}`,...n}),(0,q.jsx)(`div`,{...y(`container`),children:(0,q.jsx)(Q,{ref:t,...y(`root`,{className:b}),...v,children:(0,q.jsx)(`div`,{...y(`inner`),children:m})})})]}):(0,q.jsxs)(NK,{value:{getStyles:y,grow:l,columns:d,breakpoints:h,type:g},children:[(0,q.jsx)(UK,{selector:`.${b}`,...n}),(0,q.jsx)(Q,{ref:t,...y(`root`,{className:b}),...v,children:(0,q.jsx)(`div`,{...y(`inner`),children:m})})]})});KK.classes=FK,KK.displayName=`@mantine/core/Grid`,KK.Col=HK;function qK({color:e,theme:t,defaultShade:n}){let r=UP({color:e,theme:t});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:e}var JK={root:`m_bcb3f3c2`},YK={color:`yellow`},XK=hP((e,{color:t})=>({root:{"--mark-bg-dark":qK({color:t,theme:e,defaultShade:5}),"--mark-bg-light":qK({color:t,theme:e,defaultShade:2})}})),ZK=$((e,t)=>{let n=Z(`Mark`,YK,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,variant:u,attributes:d,...f}=n;return(0,q.jsx)(Q,{component:`mark`,ref:t,variant:u,...X({name:`Mark`,props:n,className:i,style:a,classes:JK,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:XK})(`root`),...f})});ZK.classes=JK,ZK.displayName=`@mantine/core/Mark`;function QK(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,`\\$&`)}function $K(e,t){if(t==null)return[{chunk:e,highlighted:!1}];let n=Array.isArray(t)?t.map(QK):QK(t);if(!(Array.isArray(n)?n.filter(e=>e.trim().length>0).length>0:n.trim()!==``))return[{chunk:e,highlighted:!1}];let r=typeof n==`string`?n.trim():n.filter(e=>e.trim().length!==0).map(e=>e.trim()).sort((e,t)=>t.length-e.length).join(`|`),i=RegExp(`(${r})`,`gi`);return e.split(i).map(e=>({chunk:e,highlighted:i.test(e)})).filter(({chunk:e})=>e)}var eq=NI((e,t)=>{let{unstyled:n,children:r,highlight:i,highlightStyles:a,color:o,...s}=Z(`Highlight`,null,e),c=$K(r,i);return(0,q.jsx)(bU,{unstyled:n,ref:t,...s,__staticSelector:`Highlight`,children:c.map(({chunk:e,highlighted:t},r)=>t?(0,q.jsx)(ZK,{unstyled:n,color:o,style:a,"data-highlight":e,children:e},r):(0,q.jsx)(`span`,{children:e},r))})});eq.classes=bU.classes,eq.displayName=`@mantine/core/Highlight`;var tq={root:`m_9e117634`},nq=hP((e,{radius:t,fit:n})=>({root:{"--image-radius":t===void 0?void 0:HM(t),"--image-object-fit":n}})),rq=NI((e,t)=>{let n=Z(`Image`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,onError:l,src:u,radius:d,fit:f,fallbackSrc:p,mod:m,attributes:h,...g}=n,[_,v]=(0,K.useState)(!u);(0,K.useEffect)(()=>v(!u),[u]);let y=X({name:`Image`,classes:tq,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:nq});return _&&p?(0,q.jsx)(Q,{component:`img`,ref:t,src:p,...y(`root`),onError:l,mod:[`fallback`,m],...g}):(0,q.jsx)(Q,{component:`img`,ref:t,...y(`root`),src:u,onError:e=>{l?.(e),v(!0)},mod:m,...g})});rq.classes=tq,rq.displayName=`@mantine/core/Image`;function iq(){return iq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iq.apply(null,arguments)}function aq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var oq=K.useLayoutEffect,sq=function(e){var t=K.useRef(e);return oq(function(){t.current=e}),t},cq=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},lq=function(e,t){var n=K.useRef();return K.useCallback(function(r){e.current=r,n.current&&cq(n.current,null),n.current=t,t&&cq(t,r)},[t])},uq={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},dq=function(e){Object.keys(uq).forEach(function(t){e.style.setProperty(t,uq[t],`important`)})},fq=null,pq=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function mq(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),fq||(fq=document.createElement(`textarea`),fq.setAttribute(`tabindex`,`-1`),fq.setAttribute(`aria-hidden`,`true`),dq(fq)),fq.parentNode===null&&document.body.appendChild(fq);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;fq.style[t]=o[t]}),dq(fq),fq.value=t;var c=pq(fq,e);fq.value=t,c=pq(fq,e),fq.value=`x`;var l=fq.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var hq=function(){},gq=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},_q=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],vq=!!document.documentElement.currentStyle,yq=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=gq(_q,t),r=n.boxSizing;return r===``?null:(vq&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function bq(e,t,n){var r=sq(n);K.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var xq=function(e,t){bq(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},Sq=function(e){bq(window,`resize`,e)},Cq=function(e){bq(document.fonts,`loadingdone`,e)},wq=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Tq=K.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?hq:a,s=e.onHeightChange,c=s===void 0?hq:s,l=aq(e,wq),u=l.value!==void 0,d=K.useRef(null),f=lq(d,t),p=K.useRef(0),m=K.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:yq(e);if(t){m.current=t;var a=mq(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return K.useLayoutEffect(h),xq(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),Sq(h),Cq(h),K.createElement(`textarea`,iq({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),Eq={size:`sm`},Dq=$((e,t)=>{let{autosize:n,maxRows:r,minRows:i,__staticSelector:a,resize:o,...s}=Z(`Textarea`,Eq,e),c=n&&sP()!==`test`,l=c?{maxRows:r,minRows:i}:{};return(0,q.jsx)(aU,{component:c?Tq:`textarea`,ref:t,...s,__staticSelector:a||`Textarea`,multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":o},...l})});Dq.classes=aU.classes,Dq.displayName=`@mantine/core/Textarea`;var Oq={root:`m_dc6f14e2`},kq=hP((e,{size:t})=>({root:{"--kbd-fz":BM(t,`kbd-fz`)}})),Aq=$((e,t)=>{let n=Z(`Kbd`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,attributes:l,...u}=n;return(0,q.jsx)(Q,{component:`kbd`,ref:t,...X({name:`Kbd`,classes:Oq,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:l,vars:c,varsResolver:kq})(`root`),...u})});Aq.classes=Oq,Aq.displayName=`@mantine/core/Kbd`;var[jq,Mq]=kM(`Menu component was not found in the tree`),Nq={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,itemLabel:`m_5476e0d3`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},Pq=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`MenuDivider`,null,e);return(0,q.jsx)(Q,{ref:t,...Mq().getStyles(`divider`,{className:r,style:i,styles:a,classNames:n}),...s})});Pq.classes=Nq,Pq.displayName=`@mantine/core/MenuDivider`;var Fq=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,...d}=Z(`MenuDropdown`,null,e),f=(0,K.useRef)(null),p=Mq(),m=KM(l,e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),h=KM(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),g=KM(c,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,q.jsxs)(WV.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:kN(t,f),...p.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:m,children:[p.withInitialFocusPlaceholder&&(0,q.jsx)(`div`,{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});Fq.classes=Nq,Fq.displayName=`@mantine/core/MenuDropdown`;var[Iq,Lq]=AM(),Rq=NI((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,color:s,closeMenuOnClick:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":p,...m}=Z(`MenuItem`,null,e),h=Mq(),g=Lq(),_=sF(),{dir:v}=FI(),y=(0,K.useRef)(null),b=m,x=KM(b.onClick,()=>{p||(typeof c==`boolean`?c&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=s?_.variantColorResolver({color:s,theme:_,variant:`light`}):void 0,C=s?UP({color:s,theme:_}):null,w=KM(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,q.jsxs)(iV,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:kN(y,t),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onClick:x,onKeyDown:FM({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":C?.isThemeColor&&C?.shade===void 0?`var(--mantine-color-${C.color}-6)`:S?.color,"--menu-item-hover":S?.hover},children:[l&&(0,q.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,q.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:a,classNames:n}),children:d}),u&&(0,q.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u})]})});Rq.classes=Nq,Rq.displayName=`@mantine/core/MenuItem`;var zq=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`MenuLabel`,null,e);return(0,q.jsx)(Q,{ref:t,...Mq().getStyles(`label`,{className:r,style:i,styles:a,classNames:n}),...s})});zq.classes=Nq,zq.displayName=`@mantine/core/MenuLabel`;var Bq=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,...d}=Z(`MenuSubDropdown`,null,e),f=(0,K.useRef)(null),p=Mq(),m=Lq(),h=KM(s,m?.open),g=KM(c,m?.close);return(0,q.jsx)(WV.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:kN(t,f),...p.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:u})});Bq.classes=Nq,Bq.displayName=`@mantine/core/MenuSubDropdown`;var Vq=NI((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,color:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,closeMenuOnClick:p,...m}=Z(`MenuSubItem`,null,e),h=Mq(),g=Lq(),_=sF(),{dir:v}=FI(),y=(0,K.useRef)(null),b=m,x=s?_.variantColorResolver({color:s,theme:_,variant:`light`}):void 0,S=s?UP({color:s,theme:_}):null,C=KM(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),w=KM(b.onClick,()=>{!f&&p&&h.closeDropdownImmediately()}),T=KM(b.onMouseEnter,g?.open),E=KM(b.onMouseLeave,g?.close);return(0,q.jsxs)(iV,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:kN(y,t),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:E,onClick:w,onKeyDown:FM({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[c&&(0,q.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:c}),u&&(0,q.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:a,classNames:n}),children:u}),(0,q.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:l||(0,q.jsx)(hU,{...h.getStyles(`chevron`),size:14})})]})});Vq.classes=Nq,Vq.displayName=`@mantine/core/MenuSubItem`;function Hq({children:e,refProp:t}){if(!OM(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return Mq(),(0,q.jsx)(WV.Target,{refProp:t,popupType:`menu`,children:e})}Hq.displayName=`@mantine/core/MenuSubTarget`;var Uq={offset:0,position:`right-start`,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Wq(e){let{children:t,closeDelay:n,openDelay:r,...i}=Z(`MenuSub`,Uq,e),a=TN(),[o,{open:s,close:c}]=QN(!1),l=Lq(),{openDropdown:u,closeDropdown:d}=mU({open:s,close:c,closeDelay:n,openDelay:r});return(0,q.jsx)(Iq,{value:{opened:o,close:d,open:u,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-target`)?.focus()},16),parentContext:l},children:(0,q.jsx)(WV,{opened:o,withinPortal:!1,withArrow:!1,id:a,...i,children:t})})}Wq.extend=e=>e,Wq.displayName=`@mantine/core/MenuSub`,Wq.Target=Hq,Wq.Dropdown=Bq,Wq.Item=Vq;var Gq={refProp:`ref`},Kq=(0,K.forwardRef)((e,t)=>{let{children:n,refProp:r,...i}=Z(`MenuTarget`,Gq,e),a=mP(n);if(!a)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let o=Mq(),s=a.props,c=KM(s.onClick,()=>{o.trigger===`click`?o.toggleDropdown():o.trigger===`click-hover`&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),l=KM(s.onMouseEnter,()=>(o.trigger===`hover`||o.trigger===`click-hover`)&&o.openDropdown()),u=KM(s.onMouseLeave,()=>{(o.trigger===`hover`||o.trigger===`click-hover`&&!o.openedViaClick)&&o.closeDropdown()});return(0,q.jsx)(WV.Target,{refProp:r,popupType:`menu`,ref:t,...i,children:(0,K.cloneElement)(a,{onClick:c,onMouseEnter:l,onMouseLeave:u,"data-expanded":o.opened?!0:void 0})})});Kq.displayName=`@mantine/core/MenuTarget`;var qq={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Jq(e){let t=Z(`Menu`,qq,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,...w}=t,T=X({name:`Menu`,classes:Nq,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[E,D]=MN({value:a,defaultValue:o,finalValue:!1,onChange:c}),[O,k]=(0,K.useState)(!1),A=()=>{D(!1),k(!1),E&&i?.()},j=()=>{D(!0),!E&&r?.()},M=()=>{E?A():j()},{openDropdown:N,closeDropdown:P}=mU({open:j,close:A,closeDelay:m,openDelay:p}),ee=e=>XM(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:te,resolvedStyles:ne}=OF({classNames:h,styles:g,props:t});return(0,q.jsx)(jq,{value:{getStyles:T,opened:E,toggleDropdown:M,getItemIndex:ee,openedViaClick:O,setOpenedViaClick:k,closeOnItemClick:l,closeDropdown:f===`click`?A:P,openDropdown:f===`click`?j:N,closeDropdownImmediately:A,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S},children:(0,q.jsx)(WV,{returnFocus:!0,...w,opened:E,onChange:M,defaultOpened:o,trapFocus:x?!1:s,closeOnEscape:d,__staticSelector:`Menu`,classNames:te,styles:ne,unstyled:_,variant:v,keepMounted:x,children:n})})}Jq.extend=e=>e,Jq.withProps=MI(Jq),Jq.classes=Nq,Jq.displayName=`@mantine/core/Menu`,Jq.Item=Rq,Jq.Label=zq,Jq.Dropdown=Fq,Jq.Target=Kq,Jq.Divider=Pq,Jq.Sub=Wq;var Yq={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},[Xq,Zq]=kM(`Modal component was not found in tree`),Qq=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ModalBody`,null,e);return(0,q.jsx)(wH,{ref:t,...Zq().getStyles(`body`,{classNames:n,style:i,styles:a,className:r}),...s})});Qq.classes=Yq,Qq.displayName=`@mantine/core/ModalBody`;var $q=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ModalCloseButton`,null,e);return(0,q.jsx)(TH,{ref:t,...Zq().getStyles(`close`,{classNames:n,style:i,styles:a,className:r}),...s})});$q.classes=Yq,$q.displayName=`@mantine/core/ModalCloseButton`;var eJ=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,__hidden:c,...l}=Z(`ModalContent`,null,e),u=Zq(),d=u.scrollAreaComponent||NH;return(0,q.jsx)(EH,{...u.getStyles(`content`,{className:r,style:i,styles:a,classNames:n}),innerProps:u.getStyles(`inner`,{className:r,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...l,children:(0,q.jsx)(d,{style:{maxHeight:u.fullScreen?`100dvh`:`calc(100dvh - (${Y(u.yOffset)} * 2))`},children:s})})});eJ.classes=Yq,eJ.displayName=`@mantine/core/ModalContent`;var tJ=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ModalHeader`,null,e);return(0,q.jsx)(DH,{ref:t,...Zq().getStyles(`header`,{classNames:n,style:i,styles:a,className:r}),...s})});tJ.classes=Yq,tJ.displayName=`@mantine/core/ModalHeader`;var nJ=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ModalOverlay`,null,e);return(0,q.jsx)(AH,{ref:t,...Zq().getStyles(`overlay`,{classNames:n,style:i,styles:a,className:r}),...s})});nJ.classes=Yq,nJ.displayName=`@mantine/core/ModalOverlay`;var rJ={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:LM(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},iJ=hP((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:HM(t),"--modal-size":BM(n,`modal-size`),"--modal-y-offset":Y(r),"--modal-x-offset":Y(i)}})),aJ=$((e,t)=>{let n=Z(`ModalRoot`,rJ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,yOffset:l,scrollAreaComponent:u,radius:d,fullScreen:f,centered:p,xOffset:m,__staticSelector:h,attributes:g,..._}=n,v=X({name:h,classes:Yq,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:g,vars:c,varsResolver:iJ});return(0,q.jsx)(Xq,{value:{yOffset:l,scrollAreaComponent:u,getStyles:v,fullScreen:f},children:(0,q.jsx)(xH,{ref:t,...v(`root`),"data-full-screen":f||void 0,"data-centered":p||void 0,"data-offset-scrollbars":u===eV.Autosize||void 0,unstyled:s,..._})})});aJ.classes=Yq,aJ.displayName=`@mantine/core/ModalRoot`;var[oJ,sJ]=AM();function cJ({children:e}){let[t,n]=(0,K.useState)([]),[r,i]=(0,K.useState)(LM(`modal`));return(0,q.jsx)(oJ,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}cJ.displayName=`@mantine/core/ModalStack`;var lJ=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ModalTitle`,null,e);return(0,q.jsx)(MH,{ref:t,...Zq().getStyles(`title`,{classNames:n,style:i,styles:a,className:r}),...s})});lJ.classes=Yq,lJ.displayName=`@mantine/core/ModalTitle`;var uJ={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:LM(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},dJ=$((e,t)=>{let{title:n,withOverlay:r,overlayProps:i,withCloseButton:a,closeButtonProps:o,children:s,radius:c,opened:l,stackId:u,zIndex:d,...f}=Z(`Modal`,uJ,e),p=sJ(),m=!!n||a,h=p&&u?{closeOnEscape:p.currentId===u,trapFocus:p.currentId===u,zIndex:p.getZIndex(u)}:{},g=r===!1?!1:u&&p?p.currentId===u:l;return(0,K.useEffect)(()=>{p&&u&&(l?p.addModal(u,d||LM(`modal`)):p.removeModal(u))},[l,u,d]),(0,q.jsxs)(aJ,{ref:t,radius:c,opened:l,zIndex:p&&u?p.getZIndex(u):d,...f,...h,children:[r&&(0,q.jsx)(nJ,{visible:g,transitionProps:p&&u?{duration:0}:void 0,...i}),(0,q.jsxs)(eJ,{radius:c,__hidden:p&&u&&l?u!==p.currentId:!1,children:[m&&(0,q.jsxs)(tJ,{children:[n&&(0,q.jsx)(lJ,{children:n}),a&&(0,q.jsx)($q,{...o})]}),(0,q.jsx)(Qq,{children:s})]})]})});dJ.classes=Yq,dJ.displayName=`@mantine/core/Modal`,dJ.Root=aJ,dJ.Overlay=nJ,dJ.Content=eJ,dJ.Body=Qq,dJ.Header=tJ,dJ.Title=lJ,dJ.CloseButton=$q,dJ.Stack=cJ;var[fJ,pJ]=AM(),mJ={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},[hJ,gJ]=AM(),_J=hP((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?BM(n,`pg-gap`):BM(t)}})),vJ=$((e,t)=>{let n=Z(`PillGroup`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,disabled:u,attributes:d,...f}=n,p=pJ()?.size||l||void 0,m=X({name:`PillGroup`,classes:mJ,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:d,vars:c,varsResolver:_J,stylesCtx:{size:p},rootSelector:`group`});return(0,q.jsx)(hJ,{value:{size:p,disabled:u},children:(0,q.jsx)(Q,{ref:t,size:p,...m(`group`),...f})})});vJ.classes=mJ,vJ.displayName=`@mantine/core/PillGroup`;var yJ={variant:`default`},bJ=hP((e,{radius:t},{size:n})=>({root:{"--pill-fz":BM(n,`pill-fz`),"--pill-height":BM(n,`pill-height`),"--pill-radius":t===void 0?void 0:HM(t)}})),xJ=$((e,t)=>{let n=Z(`Pill`,yJ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,variant:l,children:u,withRemoveButton:d,onRemove:f,removeButtonProps:p,radius:m,size:h,disabled:g,mod:_,attributes:v,...y}=n,b=gJ(),x=pJ(),S=h||b?.size||void 0,C=x?.variant===`filled`?`contrast`:l||`default`,w=X({name:`Pill`,classes:mJ,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:v,vars:c,varsResolver:bJ,stylesCtx:{size:S}});return(0,q.jsxs)(Q,{component:`span`,ref:t,variant:C,size:S,...w(`root`,{variant:C}),mod:[{"with-remove":d&&!g,disabled:g||b?.disabled},_],...y,children:[(0,q.jsx)(`span`,{...w(`label`),children:u}),d&&(0,q.jsx)(dH,{variant:`transparent`,radius:m,tabIndex:-1,"aria-hidden":!0,unstyled:s,...p,...w(`remove`,{className:p?.className,style:p?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),p?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),f?.(),p?.onClick?.(e)}})]})});xJ.classes=mJ,xJ.displayName=`@mantine/core/Pill`,xJ.Group=vJ;var SJ={field:`m_45c4369d`},CJ={type:`visible`},wJ=$((e,t)=>{let n=Z(`PillsInputField`,CJ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,type:l,disabled:u,id:d,pointer:f,mod:p,attributes:m,...h}=n,g=pJ(),_=VH(),v=X({name:`PillsInputField`,classes:SJ,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:m,rootSelector:`field`}),y=u||g?.disabled;return(0,q.jsx)(Q,{component:`input`,ref:kN(t,g?.fieldRef),"data-type":l,disabled:y,mod:[{disabled:y,pointer:f},p],...v(`field`),...h,id:_?.inputId||d,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!f&&e.stopPropagation()})});wJ.classes=SJ,wJ.displayName=`@mantine/core/PillsInputField`;var TJ={size:`sm`},EJ=$((e,t)=>{let{children:n,onMouseDown:r,onClick:i,size:a,disabled:o,__staticSelector:s,error:c,variant:l,...u}=Z(`PillsInput`,TJ,e),d=(0,K.useRef)(null);return(0,q.jsx)(fJ,{value:{fieldRef:d,size:a,disabled:o,hasError:!!c,variant:l},children:(0,q.jsx)(aU,{size:a,error:c,variant:l,component:`div`,ref:t,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),r?.(e),d.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(d.current?.focus(),i?.(e))},...u,multiline:!0,disabled:o,__staticSelector:s||`PillsInput`,withAria:!1,children:n})})});EJ.displayName=`@mantine/core/PillsInput`,EJ.Field=wJ;function DJ({data:e,value:t}){let n=t.map(e=>e.trim().toLowerCase());return e.reduce((e,t)=>(QW(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(e.value.toLowerCase().trim())===-1)}):n.indexOf(t.value.toLowerCase().trim())===-1&&e.push(t),e),[])}var OJ={xs:41,sm:50,md:60,lg:72,xl:89},kJ={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},AJ=$((e,t)=>{let n=Z(`MultiSelect`,kJ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,value:u,defaultValue:d,onChange:f,onKeyDown:p,variant:m,data:h,dropdownOpened:g,defaultDropdownOpened:_,onDropdownOpen:v,onDropdownClose:y,selectFirstOptionOnChange:b,selectFirstOptionOnDropdownOpen:x,onOptionSubmit:S,comboboxProps:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,searchValue:O,defaultSearchValue:k,onSearchChange:A,readOnly:j,disabled:M,onFocus:N,onBlur:P,radius:ee,rightSection:te,rightSectionWidth:ne,rightSectionPointerEvents:F,rightSectionProps:I,leftSection:L,leftSectionWidth:re,leftSectionPointerEvents:ie,leftSectionProps:ae,inputContainer:oe,inputWrapperOrder:se,withAsterisk:ce,labelProps:le,descriptionProps:ue,errorProps:R,wrapperProps:de,description:fe,label:pe,error:me,maxValues:he,searchable:ge,nothingFoundMessage:_e,withCheckIcon:ve,withAlignedLabels:ye,checkIconPosition:be,hidePickedOptions:xe,withErrorStyles:z,name:Se,form:B,id:V,clearable:Ce,clearButtonProps:we,hiddenInputProps:Te,placeholder:Ee,hiddenInputValuesDivider:De,required:Oe,mod:ke,renderOption:Ae,onRemove:je,onClear:Me,scrollAreaProps:Ne,chevronColor:Pe,attributes:H,clearSearchOnChange:Fe,openOnFocus:Ie,...Le}=n,Re=TN(V),ze=YU(h),Be=XU(ze),Ve=(0,K.useRef)({}),He=wW({opened:g,defaultOpened:_,onDropdownOpen:()=>{v?.(),x&&He.selectFirstOption()},onDropdownClose:()=>{y?.(),He.resetSelectedOption()}}),{styleProps:Ue,rest:{type:We,autoComplete:Ge,...Ke}}=$F(Le),[qe,Je]=MN({value:u,defaultValue:d,finalValue:[],onChange:f}),[Ye,Xe]=MN({value:O,defaultValue:k,finalValue:``,onChange:A}),Ze=e=>{Xe(e),He.resetSelectedOption()},Qe=X({name:`MultiSelect`,classes:{},props:n,classNames:r,styles:o,unstyled:s,attributes:H}),{resolvedClassNames:$e,resolvedStyles:et}=OF({props:n,styles:o,classNames:r}),tt=e=>{p?.(e),e.key===` `&&!ge&&(e.preventDefault(),He.toggleDropdown()),e.key===`Backspace`&&Ye.length===0&&qe.length>0&&(je?.(qe[qe.length-1]),Je(qe.slice(0,qe.length-1)))},nt=qe.map((e,t)=>{let n=Be[e]||Ve.current[e];return(0,q.jsx)(xJ,{withRemoveButton:!j&&!Be[e]?.disabled,onRemove:()=>{Je(qe.filter(t=>e!==t)),je?.(e)},unstyled:s,disabled:M,...Qe(`pill`),children:n?.label||e},`${e}-${t}`)});(0,K.useEffect)(()=>{b&&He.selectFirstOption()},[b,Ye]),(0,K.useEffect)(()=>{qe.forEach(e=>{e in Be&&(Ve.current[e]=Be[e])})},[Be,qe]);let rt=(0,q.jsx)(DW.ClearButton,{...we,onClear:()=>{Me?.(),Je([]),Ze(``)}}),it=DJ({data:ze,value:qe}),at=Ce&&qe.length>0&&!M&&!j,ot=at?{paddingInlineEnd:OJ[l]??OJ.sm}:void 0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(DW,{store:He,classNames:$e,styles:et,unstyled:s,size:l,readOnly:j,__staticSelector:`MultiSelect`,attributes:H,onOptionSubmit:e=>{S?.(e),Fe&&Ze(``),He.updateSelectedOptionIndex(`selected`),qe.includes(Be[e].value)?(Je(qe.filter(t=>t!==Be[e].value)),je?.(Be[e].value)):qe.length<he&&Je([...qe,Be[e].value])},...C,children:[(0,q.jsx)(DW.DropdownTarget,{children:(0,q.jsx)(EJ,{...Ue,__staticSelector:`MultiSelect`,classNames:$e,styles:et,unstyled:s,size:l,className:i,style:a,variant:m,disabled:M,radius:ee,__defaultRightSection:(0,q.jsx)(DW.Chevron,{size:l,error:me,unstyled:s,color:Pe}),__clearSection:rt,__clearable:at,rightSection:te,rightSectionPointerEvents:F||`none`,rightSectionWidth:ne,rightSectionProps:I,leftSection:L,leftSectionWidth:re,leftSectionPointerEvents:ie,leftSectionProps:ae,inputContainer:oe,inputWrapperOrder:se,withAsterisk:ce,labelProps:le,descriptionProps:ue,errorProps:R,wrapperProps:de,description:fe,label:pe,error:me,withErrorStyles:z,__stylesApiProps:{...n,rightSectionPointerEvents:F||`none`,multiline:!0},pointer:!ge,onClick:()=>ge?He.openDropdown():He.toggleDropdown(),"data-expanded":He.dropdownOpened||void 0,id:Re,required:Oe,mod:ke,attributes:H,children:(0,q.jsxs)(xJ.Group,{attributes:H,disabled:M,unstyled:s,...Qe(`pillsList`,{style:ot}),children:[nt,(0,q.jsx)(DW.EventsTarget,{autoComplete:Ge,children:(0,q.jsx)(EJ.Field,{...Ke,ref:t,id:Re,placeholder:Ee,type:!ge&&!Ee?`hidden`:`visible`,...Qe(`inputField`),unstyled:s,onFocus:e=>{N?.(e),Ie&&ge&&He.openDropdown()},onBlur:e=>{P?.(e),He.closeDropdown(),Ze(``)},onKeyDown:tt,value:Ye,onChange:e=>{Ze(e.currentTarget.value),ge&&He.openDropdown(),b&&He.selectFirstOption()},disabled:M,readOnly:j||!ge,pointer:!ge})})]})})}),(0,q.jsx)(iG,{data:xe?it:ze,hidden:j||M,filter:w,search:Ye,limit:T,hiddenWhenEmpty:!_e,withScrollArea:E,maxDropdownHeight:D,filterOptions:ge,value:qe,checkIconPosition:be,withCheckIcon:ve,withAlignedLabels:ye,nothingFoundMessage:_e,unstyled:s,labelId:pe?`${Re}-label`:void 0,"aria-label":pe?void 0:Le[`aria-label`],renderOption:Ae,scrollAreaProps:Ne})]}),(0,q.jsx)(DW.HiddenInput,{name:Se,valuesDivider:De,value:qe,form:B,disabled:M,...Te})]})});AJ.classes={...aU.classes,...DW.classes},AJ.displayName=`@mantine/core/MultiSelect`;var jJ={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},MJ={withCloseButton:!0},NJ=hP((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:HM(t),"--notification-color":n?WP(n,e):void 0}})),PJ=$((e,t)=>{let n=Z(`Notification`,MJ,e),{className:r,color:i,radius:a,loading:o,withCloseButton:s,withBorder:c,title:l,icon:u,children:d,onClose:f,closeButtonProps:p,classNames:m,style:h,styles:g,unstyled:_,vars:v,mod:y,loaderProps:b,role:x,attributes:S,...C}=n,w=X({name:`Notification`,classes:jJ,props:n,className:r,style:h,classNames:m,styles:g,unstyled:_,attributes:S,vars:v,varsResolver:NJ});return(0,q.jsxs)(Q,{...w(`root`),mod:[{"data-with-icon":!!u||o,"data-with-border":c},y],ref:t,role:x||`alert`,...C,children:[u&&!o&&(0,q.jsx)(`div`,{...w(`icon`),children:u}),o&&(0,q.jsx)(QV,{size:28,color:i,...b,...w(`loader`)}),(0,q.jsxs)(`div`,{...w(`body`),children:[l&&(0,q.jsx)(`div`,{...w(`title`),children:l}),(0,q.jsx)(Q,{...w(`description`),mod:{"data-with-title":!!l},children:d})]}),s&&(0,q.jsx)(dH,{iconSize:16,color:`gray`,...p,unstyled:_,onClick:f,...w(`closeButton`)})]})});PJ.classes=jJ,PJ.displayName=`@mantine/core/Notification`;function FJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var IJ;(function(e){e.event=`event`,e.props=`prop`})(IJ||={});function LJ(){}function RJ(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function zJ(e){return!!(e||``).match(/\d/)}function BJ(e){return e==null}function VJ(e){return typeof e==`number`&&isNaN(e)}function HJ(e){return BJ(e)||VJ(e)||typeof e==`number`&&!isFinite(e)}function UJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function WJ(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function GJ(e,t,n){var r=WJ(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function KJ(e){var t=(0,K.useRef)(e);return t.current=e,(0,K.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function qJ(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function JJ(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function YJ(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function XJ(e,t){return Array(t+1).join(e)}function ZJ(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+XJ(`0`,Math.abs(o))+i:o>=s?i+=XJ(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function QJ(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=qJ(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=YJ(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function $J(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var eY=RJ(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),tY=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function nY(e,t,n){return Math.min(Math.max(e,t),n)}function rY(e){return Math.max(e.selectionStart,e.selectionEnd)}function iY(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function aY(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function oY(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function sY(e,t,n,r,i,a,o){o===void 0&&(o=oY);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function cY(e,t,n,r){var i=e.length;if(t=nY(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function lY(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(zJ(e[n])||zJ(e[n-1]));return t}function uY(e,t,n,r,i,a){a===void 0&&(a=LJ);var o=KJ(function(e,t){var n,a;return HJ(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?ZJ(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,K.useState)(function(){return o(BJ(e)?t:e,n)}),c=s[0],l=s[1],u=function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)},d=e,f=n;BJ(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,K.useMemo)(function(){l(p)},[p.formattedValue]),[c,u]}function dY(e){return e.replace(/[^0-9]/g,``)}function fY(e){return e}function pY(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=fY);var s=e.removeFormatting;s===void 0&&(s=dY);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=LJ);var p=e.onKeyDown;p===void 0&&(p=LJ);var m=e.onMouseUp;m===void 0&&(m=LJ);var h=e.onFocus;h===void 0&&(h=LJ);var g=e.onBlur;g===void 0&&(g=LJ);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=lY);var y=e.isValidInputCharacter;y===void 0&&(y=zJ);var b=e.isCharacterSame,x=FJ(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=uY(_,c,!!l,o,s,u),C=S[0],w=C.formattedValue,T=C.numAsString,E=S[1],D=(0,K.useRef)(),O=(0,K.useRef)({formattedValue:w,numAsString:T}),k=function(e,t){O.current={formattedValue:e.formattedValue,numAsString:e.value},E(e,t)},A=(0,K.useState)(!1),j=A[0],M=A[1],N=(0,K.useRef)(null),P=(0,K.useRef)({setCaretTimeout:null,focusTimeout:null});(0,K.useEffect)(function(){return M(!0),function(){clearTimeout(P.current.setCaretTimeout),clearTimeout(P.current.focusTimeout)}},[]);var ee=o,te=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},ne=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||($J(e,t),P.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&$J(e,t)},0))},F=function(e,t,n){return cY(e,t,v(e),n)},I=function(e,t,n){var r=v(t),i=sY(t,w,e,n,r,y,b);return i=cY(t,i,r),i},L=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=rY(n);n.value=t,o=I(s,t,c),o!==void 0&&ne(n,o,t)}t!==w&&k(te(t,a),{event:i,source:r})};(0,K.useEffect)(function(){var e=O.current,t=e.formattedValue,n=e.numAsString;(w!==t||T!==n)&&k(te(w,T),{event:void 0,source:IJ.props})},[w,T]);var re=N.current?rY(N.current):void 0;(typeof window<`u`?K.useLayoutEffect:K.useEffect)(function(){var e=N.current;if(w!==O.current.formattedValue&&e){var t=I(O.current.formattedValue,w,re);e.value=w,ne(e,t,w)}},[w]);var ie=function(e,t,n){var r=t.target,i=D.current?tY(D.current,r.selectionEnd):eY(w,e),a=Object.assign(Object.assign({},i),{lastValue:w}),o=s(e,a),c=ee(o);if(o=s(c,void 0),d&&!d(te(c,o))){var l=t.target,u=I(e,w,rY(l));return l.value=w,ne(l,u,w),!1}return L({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},ae=function(e,t){t===void 0&&(t=0),D.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},oe=function(e){var t=e.target.value;ie(t,e,IJ.event)&&f(e),D.current=void 0},se=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),ae(t,s);return}var l=o;c?(l=F(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=F(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=F(a,o,`left`)),l!==o&&ne(t,l,a),p(e),ae(t,s)},ce=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=F(r,e);i!==e&&ne(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),ae(t)},le=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;N.current=t,P.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=F(a,r);o!==r&&!(r===0&&i===a.length)&&ne(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ue=function(e){N.current=null,clearTimeout(P.current.focusTimeout),clearTimeout(P.current.setCaretTimeout),g(e)},R=j&&iY()?`numeric`:void 0,de=Object.assign({inputMode:R},x,{type:t,value:w,onChange:oe,onKeyDown:se,onMouseUp:ce,onFocus:le,onBlur:ue});if(n===`text`)return i?K.createElement(K.Fragment,null,i(w,x)||null):K.createElement(`span`,Object.assign({},x,{ref:a}),w);if(r){var fe=r;return K.createElement(fe,Object.assign({},de,{ref:a}))}return K.createElement(`input`,Object.assign({},de,{ref:a}))}function mY(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=hY(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=qJ(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=YJ(m,n,!!r)),l&&(p=GJ(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function hY(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function gY(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function _Y(e,t){return RegExp(`(^-)|[0-9]|`+UJ(e),t?`g`:void 0)}function vY(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function yY(e,t,n){var r;t===void 0&&(t=aY(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=hY(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(zJ(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=r?1:0;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=gY(y?`-`+e:e,i),e=(e.match(_Y(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(UJ(m),`g`),function(e,t){return t===O?`.`:``});var k=qJ(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function bY(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,n.length+(a?1:0));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function xY(e){var t=hY(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
65
- Decimal separator can't be same as thousand separator.
66
- thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
67
- decimalSeparator: `+r+` (default value for decimalSeparator is .)
68
- `);return i.startsWith(`-`)&&a&&(console.error(`
69
- Prefix can't start with '-' when allowNegative is true.
70
- prefix: `+i+`
71
- allowNegative: `+a+`
72
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function SY(e){e=xY(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=LJ);var a=e.onBlur;a===void 0&&(a=LJ);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=FJ(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=hY(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return mY(t,e)},y=function(t,n){return yY(t,n,e)},b=BJ(d)?u:d,x=f??vY(b,l,t);BJ(d)?BJ(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return HJ(e)?e:(typeof e==`number`&&(e=ZJ(e)),x&&typeof s==`number`?QJ(e,s,!!c):e)},C=uY(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:zJ(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=eY(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return bY(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&$J(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?($J(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&$J(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&$J(t,a-1),r===`Delete`&&d[a]===f&&$J(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=JJ(n)),c&&s&&(n=QJ(n,s,c)),n!==T&&D({formattedValue:mY(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:IJ.event}),a(t)}})}function CY(e){var t=SY(e);return K.createElement(pY,Object.assign({},t))}var wY={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`};function TY({direction:e,style:t,...n}){return(0,q.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,q.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var EY=/^(0\.0*|-0(\.0*)?)$/,DY=/^-?0\d+(\.\d+)?\.?$/,OY=/\.\d*0$/,kY=/^-?\d+\.$/;function AY(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function jY(e){return typeof e==`number`?e<2**53-1:e===``||AY(e)&&Number(e)<2**53-1}function MY(e){return e.toString().replace(`.`,``).length}function NY(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&MY(t)<14&&t!==``}function PY(e,t,n){return e===void 0?!0:(t===void 0||e>=t)&&(n===void 0||e<=n)}var FY={step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},IY=hP((e,{size:t})=>({controls:{"--ni-chevron-size":BM(t,`ni-chevron-size`)}}));function LY(e,t,n){let r=e.toString(),i=kY.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=ZM(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}var RY=$((e,t)=>{let n=Z(`NumberInput`,FY,e),{className:r,classNames:i,styles:a,unstyled:o,vars:s,onChange:c,onValueChange:l,value:u,defaultValue:d,max:f,min:p,step:m,hideControls:h,rightSection:g,isAllowed:_,clampBehavior:v,onBlur:y,allowDecimal:b,decimalScale:x,onKeyDown:S,onKeyDownCapture:C,handlersRef:w,startValue:T,disabled:E,rightSectionPointerEvents:D,allowNegative:O,readOnly:k,size:A,rightSectionWidth:j,stepHoldInterval:M,stepHoldDelay:N,allowLeadingZeros:P,withKeyboardEvents:ee,trimLeadingZeroesOnBlur:te,allowedDecimalSeparators:ne,attributes:F,...I}=n,L=X({name:`NumberInput`,classes:wY,props:n,classNames:i,styles:a,unstyled:o,attributes:F,vars:s,varsResolver:IY}),{resolvedClassNames:re,resolvedStyles:ie}=OF({classNames:i,styles:a,props:n}),[ae,oe]=MN({value:u,defaultValue:d,finalValue:``,onChange:c}),se=N!==void 0&&M!==void 0,ce=(0,K.useRef)(null),le=(0,K.useRef)(null),ue=(0,K.useRef)(0),R=(e,t)=>{t.source===`event`&&oe(NY(e.floatValue,e.value)&&!EY.test(e.value)&&!(P&&DY.test(e.value))&&!OY.test(e.value)&&!kY.test(e.value)?e.floatValue:e.value),l?.(e,t)},de=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},fe=e=>{ce.current&&e!==void 0&&ce.current.setSelectionRange(e,e)},pe=(0,K.useRef)(RM);pe.current=()=>{if(!jY(ae))return;let e,t=de(ae),n=de(m),r=Math.max(t,n),i=10**r;if(!AY(ae)&&(typeof ae!=`number`||Number.isNaN(ae)))e=ZM(T,p,f);else if(f!==void 0){let t=(Math.round(Number(ae)*i)+Math.round(m*i))/i;e=t<=f?t:f}else e=(Math.round(Number(ae)*i)+Math.round(m*i))/i;let a=e.toFixed(r);oe(parseFloat(a)),l?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>fe(ce.current?.value.length),0)};let me=(0,K.useRef)(RM);me.current=()=>{if(!jY(ae))return;let e,t=p===void 0?O?-(2**53-1):0:p,n=de(ae),r=de(m),i=Math.max(n,r),a=10**i;if(!AY(ae)&&typeof ae!=`number`||Number.isNaN(ae))e=ZM(T,t,f);else{let n=(Math.round(Number(ae)*a)-Math.round(m*a))/a;e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);oe(parseFloat(o)),l?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>fe(ce.current?.value.length),0)};let he=e=>{let t=e.clipboardData.getData(`text`),n=I.decimalSeparator||`.`,r=(ne||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=ce.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>fe(o),0)}}I.onPaste?.(e)},ge=e=>{S?.(e),!(k||!ee)&&(e.key===`ArrowUp`&&(e.preventDefault(),pe.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),me.current?.()))},_e=e=>{if(C?.(e),e.key===`Backspace`){let t=ce.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>fe(0),0))}},ve=e=>{let t=ae;v===`blur`&&typeof t==`number`&&(t=ZM(t,p,f)),te&&typeof t==`string`&&de(t)<15&&(t=LY(t,f,p)),ae!==t&&oe(t),y?.(e)};DN(w,{increment:pe.current,decrement:me.current});let ye=e=>{e?pe.current?.():me.current?.(),ue.current+=1},be=e=>{if(ye(e),se){let t=typeof M==`number`?M:M(ue.current);le.current=window.setTimeout(()=>be(e),t)}},xe=(e,t)=>{e.preventDefault(),ce.current?.focus(),ye(t),se&&(le.current=window.setTimeout(()=>be(t),N))},z=()=>{le.current&&window.clearTimeout(le.current),le.current=null,ue.current=0},Se=(0,q.jsxs)(`div`,{...L(`controls`),children:[(0,q.jsx)(iV,{...L(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof ae==`number`&&f!==void 0&&ae>=f,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{xe(e,!0)},onPointerUp:z,onPointerLeave:z,children:(0,q.jsx)(TY,{direction:`up`})}),(0,q.jsx)(iV,{...L(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof ae==`number`&&p!==void 0&&ae<=p,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{xe(e,!1)},onPointerUp:z,onPointerLeave:z,children:(0,q.jsx)(TY,{direction:`down`})})]});return(0,q.jsx)(aU,{component:CY,allowNegative:O,className:_P(wY.root,r),size:A,inputMode:`decimal`,...I,readOnly:k,disabled:E,value:ae,getInputRef:kN(t,ce),onValueChange:R,rightSection:h||k||!jY(ae)?g:g||Se,classNames:re,styles:ie,unstyled:o,__staticSelector:`NumberInput`,decimalScale:b?x:0,onPaste:he,onKeyDown:ge,onKeyDownCapture:_e,rightSectionPointerEvents:D??(E?`none`:void 0),rightSectionWidth:j??`var(--ni-right-section-width-${A||`sm`})`,allowLeadingZeros:P,allowedDecimalSeparators:ne,onBlur:ve,attributes:F,isAllowed:e=>v===`strict`?_?_(e)&&PY(e.floatValue,p,f):PY(e.floatValue,p,f):_?_(e):!0})});RY.classes={...aU.classes,...wY},RY.displayName=`@mantine/core/NumberInput`;var zY={root:`m_f61ca620`,input:`m_ccf8da4c`,innerInput:`m_f2d85dd2`,visibilityToggle:`m_b1072d44`},BY={visibilityToggleIcon:({reveal:e})=>(0,q.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`var(--psi-icon-size)`,height:`var(--psi-icon-size)`},children:(0,q.jsx)(`path`,{d:e?`M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z`:`M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})},VY=hP((e,{size:t})=>({root:{"--psi-icon-size":BM(t,`psi-icon-size`),"--psi-button-size":BM(t,`psi-button-size`)}})),HY=$((e,t)=>{let n=Z(`PasswordInput`,BY,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,required:l,error:u,leftSection:d,disabled:f,id:p,variant:m,inputContainer:h,description:g,label:_,size:v,errorProps:y,descriptionProps:b,labelProps:x,withAsterisk:S,inputWrapperOrder:C,wrapperProps:w,radius:T,rightSection:E,rightSectionWidth:D,rightSectionPointerEvents:O,leftSectionWidth:k,visible:A,defaultVisible:j,onVisibilityChange:M,visibilityToggleIcon:N,visibilityToggleButtonProps:P,rightSectionProps:ee,leftSectionProps:te,leftSectionPointerEvents:ne,withErrorStyles:F,mod:I,attributes:L,...re}=n,ie=TN(p),[ae,oe]=MN({value:A,defaultValue:j,finalValue:!1,onChange:M}),se=()=>oe(!ae),ce=X({name:`PasswordInput`,classes:zY,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:L,vars:c,varsResolver:VY}),{resolvedClassNames:le,resolvedStyles:ue}=OF({classNames:r,styles:o,props:n}),{styleProps:R,rest:de}=$F(re),fe=y?.id||`${ie}-error`,pe=b?.id||`${ie}-description`,me=`${u&&typeof u!=`boolean`?fe:``} ${g?pe:``}`,he=me.trim().length>0?me.trim():void 0,ge=(0,q.jsx)(oH,{...ce(`visibilityToggle`),disabled:f,radius:T,"aria-hidden":!P,"aria-pressed":ae,tabIndex:-1,...P,variant:P?.variant??`subtle`,color:`gray`,unstyled:s,onTouchEnd:e=>{e.preventDefault(),P?.onTouchEnd?.(e),se()},onMouseDown:e=>{e.preventDefault(),P?.onMouseDown?.(e),se()},onKeyDown:e=>{P?.onKeyDown?.(e),e.key===` `&&(e.preventDefault(),se())},children:(0,q.jsx)(N,{reveal:ae})});return(0,q.jsx)(nU.Wrapper,{required:l,id:ie,label:_,error:u,description:g,size:v,classNames:le,styles:ue,__staticSelector:`PasswordInput`,__stylesApiProps:n,unstyled:s,withAsterisk:S,inputWrapperOrder:C,inputContainer:h,variant:m,labelProps:{...x,htmlFor:ie},descriptionProps:{...b,id:pe},errorProps:{...y,id:fe},mod:I,attributes:L,...ce(`root`),...R,...w,children:(0,q.jsx)(nU,{component:`div`,error:u,leftSection:d,size:v,classNames:{...le,input:_P(zY.input,le.input)},styles:ue,radius:T,disabled:f,__staticSelector:`PasswordInput`,__stylesApiProps:n,rightSectionWidth:D,rightSection:E??ge,variant:m,unstyled:s,leftSectionWidth:k,rightSectionPointerEvents:O||`all`,rightSectionProps:ee,leftSectionProps:te,leftSectionPointerEvents:ne,withAria:!1,withErrorStyles:F,attributes:L,children:(0,q.jsx)(`input`,{required:l,"data-invalid":!!u||void 0,"data-with-left-section":!!d||void 0,...ce(`innerInput`),disabled:f,id:ie,ref:t,...de,"aria-describedby":he,autoComplete:de.autoComplete||`off`,type:ae?`text`:`password`})})})});HY.classes={...aU.classes,...zY},HY.displayName=`@mantine/core/PasswordInput`;var UY={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},[WY,GY]=kM(`Progress.Root component was not found in tree`),KY=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=Z(`ProgressLabel`,null,e);return(0,q.jsx)(Q,{ref:t,...GY().getStyles(`label`,{className:r,style:i,classNames:n,styles:a}),...s})});KY.classes=UY,KY.displayName=`@mantine/core/ProgressLabel`;var qY=hP((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":BM(t,`progress-size`),"--progress-radius":n===void 0?void 0:HM(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),JY=$((e,t)=>{let n=Z(`ProgressRoot`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,autoContrast:l,transitionDuration:u,orientation:d,attributes:f,mod:p,...m}=n,h=X({name:`Progress`,classes:UY,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:f,vars:c,varsResolver:qY});return(0,q.jsx)(WY,{value:{getStyles:h,autoContrast:l},children:(0,q.jsx)(Q,{ref:t,mod:[{orientation:d},p],...h(`root`),...m})})});JY.classes=UY,JY.displayName=`@mantine/core/ProgressRoot`;var YY={withAria:!0},XY=$((e,t)=>{let{classNames:n,className:r,style:i,styles:a,vars:o,value:s,withAria:c,color:l,striped:u,animated:d,mod:f,...p}=Z(`ProgressSection`,YY,e),m=GY(),h=sF(),g=c?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,q.jsx)(Q,{ref:t,...m.getStyles(`section`,{className:r,classNames:n,styles:a,style:i}),...p,...g,mod:[{striped:u||d,animated:d},f],__vars:{"--progress-section-size":`${s}%`,"--progress-section-color":WP(l,h),"--progress-label-color":GF(m.autoContrast,h)?fF({color:l,theme:h,autoContrast:m.autoContrast}):void 0}})});XY.classes=UY,XY.displayName=`@mantine/core/ProgressSection`;var ZY=$((e,t)=>{let n=Z(`Progress`,null,e),{value:r,classNames:i,styles:a,vars:o,color:s,striped:c,animated:l,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:p}=OF({classNames:i,styles:a,props:n});return(0,q.jsx)(JY,{ref:t,classNames:f,styles:p,vars:o,...d,children:(0,q.jsx)(XY,{value:r,color:s,striped:c,animated:l,"aria-label":u})})});ZY.classes=UY,ZY.displayName=`@mantine/core/Progress`,ZY.Section=XY,ZY.Root=JY,ZY.Label=KY;var QY={duration:100,transition:`fade`};function $Y(e,t){return{...QY,...t,...e}}var eX={tooltip:`m_1b3c8819`,arrow:`m_f898399f`};function tX({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,K.useState)(n),a=(0,K.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=mB({placement:t,middleware:[wz({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,K.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,K.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=uL(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var nX={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:LM(`popover`)},rX=hP((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:HM(t),"--tooltip-bg":n?WP(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),iX=$((e,t)=>{let n=Z(`TooltipFloating`,nX,e),{children:r,refProp:i,withinPortal:a,style:o,className:s,classNames:c,styles:l,unstyled:u,radius:d,color:f,label:p,offset:m,position:h,multiline:g,zIndex:_,disabled:v,defaultOpened:y,variant:b,vars:x,portalProps:S,attributes:C,...w}=n,T=sF(),E=X({name:`TooltipFloating`,props:n,classes:eX,className:s,style:o,classNames:c,styles:l,unstyled:u,attributes:C,rootSelector:`tooltip`,vars:x,varsResolver:rX}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:M,setOpened:N}=tX({offset:m,position:h,defaultOpened:y}),P=mP(r);if(!P)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let ee=kN(j,uP(P),t),te=P.props,ne=e=>{te.onMouseEnter?.(e),D(e),N(!0)},F=e=>{te.onMouseLeave?.(e),N(!1)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(wV,{...S,withinPortal:a,children:(0,q.jsx)(Q,{...w,...E(`tooltip`,{style:{...CI(o,T),zIndex:_,display:!v&&A?`block`:`none`,top:(k&&Math.round(k))??``,left:(O&&Math.round(O))??``}}),variant:b,ref:M,mod:{multiline:g},children:p})}),(0,K.cloneElement)(P,{...te,[i]:ee,onMouseEnter:ne,onMouseLeave:F})]})});iX.classes=eX,iX.displayName=`@mantine/core/TooltipFloating`;var aX=(0,K.createContext)(!1),oX=aX.Provider,sX=()=>(0,K.useContext)(aX),cX={openDelay:0,closeDelay:0};function lX(e){let{openDelay:t,closeDelay:n,children:r}=Z(`TooltipGroup`,cX,e);return(0,q.jsx)(oX,{value:!0,children:(0,q.jsx)(sB,{delay:{open:t,close:n},children:r})})}lX.displayName=`@mantine/core/TooltipGroup`,lX.extend=e=>e;function uX(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function dX(e){let t=uX(e.middlewares),n=[Cz(e.offset)];return t.shift&&n.push(wz(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?Ez():Ez(t.flip)),n.push(Az({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?kz():kz(t.inline)):e.inline&&n.push(kz()),n}function fX(e){let[t,n]=(0,K.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=sX(),a=TN(),o=(0,K.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=mB({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:dX(e),whileElementsMounted:az}),{delay:m,currentId:h,setCurrentId:g}=cB(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=vB([rB(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),gB(l,{enabled:e.events?.focus,visibleOnly:!0}),bB(l,{role:`tooltip`}),fB(l,{enabled:e.opened===void 0})]);lN(()=>{e.onPositionChange?.(d)},[d]);let y=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:y,opened:r,placement:d}}var pX={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:LM(`popover`),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},mX=hP((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:HM(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),hX=$((e,t)=>{let n=Z(`Tooltip`,pX,e),{children:r,position:i,refProp:a,label:o,openDelay:s,closeDelay:c,onPositionChange:l,opened:u,defaultOpened:d,withinPortal:f,radius:p,color:m,classNames:h,styles:g,unstyled:_,style:v,className:y,withArrow:b,arrowSize:x,arrowOffset:S,arrowRadius:C,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,zIndex:k,disabled:A,positionDependencies:j,onClick:M,onMouseEnter:N,onMouseLeave:P,inline:ee,variant:te,keepMounted:ne,vars:F,portalProps:I,mod:L,floatingStrategy:re,middlewares:ie,autoContrast:ae,attributes:oe,target:se,...ce}=Z(`Tooltip`,pX,n),{dir:le}=FI(),ue=(0,K.useRef)(null),R=fX({position:hV(le,i),closeDelay:c,openDelay:s,onPositionChange:l,opened:u,defaultOpened:d,events:O,arrowRef:ue,arrowOffset:S,offset:typeof T==`number`?T+(b?x/2:0):T,positionDependencies:[...j,se??r],inline:ee,strategy:re,middlewares:ie});(0,K.useEffect)(()=>{let e=se instanceof HTMLElement?se:typeof se==`string`?document.querySelector(se):se?.current||null;e&&R.reference(e)},[se,R]);let de=X({name:`Tooltip`,props:n,classes:eX,className:y,style:v,classNames:h,styles:g,unstyled:_,attributes:oe,rootSelector:`tooltip`,vars:F,varsResolver:mX}),fe=mP(r);if(!se&&!fe)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);if(se){let e=$Y(E,{duration:100,transition:`fade`});return(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(wV,{...I,withinPortal:f,children:(0,q.jsx)(AV,{...e,keepMounted:ne,mounted:!A&&!!R.opened,duration:R.isGroupPhase?10:e.duration,children:e=>(0,q.jsxs)(Q,{...ce,"data-fixed":re===`fixed`||void 0,variant:te,mod:[{multiline:D},L],...R.getFloatingProps({ref:R.floating,className:de(`tooltip`).className,style:{...de(`tooltip`).style,...e,zIndex:k,top:R.y??0,left:R.x??0}}),children:[o,(0,q.jsx)(mV,{ref:ue,arrowX:R.arrowX,arrowY:R.arrowY,visible:b,position:R.placement,arrowSize:x,arrowOffset:S,arrowRadius:C,arrowPosition:w,...de(`arrow`)})]})})})})}let pe=fe.props,me=kN(R.reference,uP(fe),t),he=$Y(E,{duration:100,transition:`fade`});return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(wV,{...I,withinPortal:f,children:(0,q.jsx)(AV,{...he,keepMounted:ne,mounted:!A&&!!R.opened,duration:R.isGroupPhase?10:he.duration,children:e=>(0,q.jsxs)(Q,{...ce,"data-fixed":re===`fixed`||void 0,variant:te,mod:[{multiline:D},L],...R.getFloatingProps({ref:R.floating,className:de(`tooltip`).className,style:{...de(`tooltip`).style,...e,zIndex:k,top:R.y??0,left:R.x??0}}),children:[o,(0,q.jsx)(mV,{ref:ue,arrowX:R.arrowX,arrowY:R.arrowY,visible:b,position:R.placement,arrowSize:x,arrowOffset:S,arrowRadius:C,arrowPosition:w,...de(`arrow`)})]})})}),(0,K.cloneElement)(fe,R.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...pe,className:_P(y,pe.className),[a]:me}))]})});hX.classes=eX,hX.displayName=`@mantine/core/Tooltip`,hX.Floating=iX,hX.Group=lX;var gX={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},_X={withItemsBorders:!0},vX=hP((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:HM(t),"--sc-color":n?WP(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":BM(i,`sc-padding`),"--sc-font-size":UM(i)}})),yX=$((e,t)=>{let n=Z(`SegmentedControl`,_X,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,data:l,value:u,defaultValue:d,onChange:f,size:p,name:m,disabled:h,readOnly:g,fullWidth:_,orientation:v,radius:y,color:b,transitionDuration:x,transitionTimingFunction:S,variant:C,autoContrast:w,withItemsBorders:T,mod:E,attributes:D,...O}=n,k=X({name:`SegmentedControl`,props:n,classes:gX,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:D,vars:c,varsResolver:vX}),A=sF(),j=l.map(e=>typeof e==`string`?{label:e,value:e}:e),M=iP(),[N,P]=(0,K.useState)(QM()),[ee,te]=(0,K.useState)(null),[ne,F]=(0,K.useState)({}),I=(e,t)=>{ne[t]=e,F(ne)},[L,re]=MN({value:u,defaultValue:d,finalValue:Array.isArray(l)?j.find(e=>!e.disabled)?.value??l[0]?.value??null:null,onChange:f}),ie=TN(m),ae=j.map(e=>(0,K.createElement)(Q,{...k(`control`),mod:{active:L===e.value,orientation:v},key:e.value},(0,K.createElement)(`input`,{...k(`input`),disabled:h||e.disabled,type:`radio`,name:ie,value:e.value,id:`${ie}-${e.value}`,checked:L===e.value,onChange:()=>!g&&re(e.value),"data-focus-ring":A.focusRing,key:`${e.value}-input`}),(0,K.createElement)(Q,{component:`label`,...k(`label`),mod:{active:L===e.value&&!(h||e.disabled),disabled:h||e.disabled,"read-only":g},htmlFor:`${ie}-${e.value}`,ref:t=>I(t,e.value),__vars:{"--sc-label-color":b===void 0?void 0:fF({color:b,theme:A,autoContrast:w})},key:`${e.value}-label`},(0,q.jsx)(`span`,{...k(`innerLabel`),children:e.label})))),oe=kN(t,e=>te(e));return IN(()=>{P(QM())},[l.length]),l.length===0?null:(0,q.jsxs)(Q,{...k(`root`),variant:C,size:p,ref:oe,mod:[{"full-width":_,orientation:v,initialized:M,"with-items-borders":T},E],...O,role:`radiogroup`,"data-disabled":h,children:[typeof L==`string`&&(0,q.jsx)(pU,{target:ne[L],parent:ee,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...k(`indicator`)},N),ae]})});yX.classes=gX,yX.displayName=`@mantine/core/SegmentedControl`;var bX={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},xX=$((e,t)=>{let n=Z(`Select`,bX,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:x,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,size:O,searchable:k,rightSection:A,checkIconPosition:j,withCheckIcon:M,withAlignedLabels:N,nothingFoundMessage:P,name:ee,form:te,searchValue:ne,defaultSearchValue:F,onSearchChange:I,allowDeselect:L,error:re,rightSectionPointerEvents:ie,id:ae,clearable:oe,clearButtonProps:se,hiddenInputProps:ce,renderOption:le,onClear:ue,autoComplete:R,scrollAreaProps:de,__defaultRightSection:fe,__clearSection:pe,__clearable:me,chevronColor:he,autoSelectOnBlur:ge,openOnFocus:_e,attributes:ve,...ye}=n,be=(0,K.useMemo)(()=>YU(h),[h]),xe=(0,K.useRef)({}),z=(0,K.useMemo)(()=>XU(be),[be]),Se=TN(ae),[B,V,Ce]=MN({value:g,defaultValue:_,finalValue:null,onChange:m}),we=typeof B==`string`?B in z?z[B]:xe.current[B]:void 0,Te=eP(we),[Ee,De,Oe]=MN({value:ne,defaultValue:F,finalValue:we?we.label:``,onChange:I}),ke=wW({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y?ke.selectFirstOption():ke.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(ke.resetSelectedOption,0)}}),Ae=e=>{De(e),ke.resetSelectedOption()},{resolvedClassNames:je,resolvedStyles:Me}=OF({props:n,styles:i,classNames:r});(0,K.useEffect)(()=>{v&&ke.selectFirstOption()},[v,Ee]),(0,K.useEffect)(()=>{g===null&&Ae(``),typeof g==`string`&&we&&(Te?.value!==we.value||Te?.label!==we.label)&&Ae(we.label)},[g,we]),(0,K.useEffect)(()=>{!Ce&&!Oe&&Ae(typeof B==`string`?B in z?z[B]?.label:xe.current[B]?.label||``:``)},[z,B]),(0,K.useEffect)(()=>{B&&B in z&&(xe.current[B]=z[B])},[z,B]);let Ne=(0,q.jsx)(DW.ClearButton,{...se,onClear:()=>{V(null,null),Ae(``),ue?.()}}),Pe=oe&&!!B&&!C&&!S;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(DW,{store:ke,__staticSelector:`Select`,classNames:je,styles:Me,unstyled:a,readOnly:S,size:O,attributes:ve,keepMounted:ge,onOptionSubmit:e=>{b?.(e);let t=L&&z[e].value===B?null:z[e],n=t?t.value:null;n!==B&&V(n,t),!Ce&&Ae(typeof n==`string`&&t?.label||``),ke.closeDropdown()},...x,children:[(0,q.jsx)(DW.Target,{targetType:k?`input`:`button`,autoComplete:R,children:(0,q.jsx)(aU,{id:Se,ref:t,__defaultRightSection:(0,q.jsx)(DW.Chevron,{size:O,error:re,unstyled:a,color:he}),__clearSection:Ne,__clearable:Pe,rightSection:A,rightSectionPointerEvents:ie||`none`,...ye,size:O,__staticSelector:`Select`,disabled:C,readOnly:S||!k,value:Ee,onChange:e=>{Ae(e.currentTarget.value),ke.openDropdown(),v&&ke.selectFirstOption()},onFocus:e=>{_e&&k&&ke.openDropdown(),d?.(e)},onBlur:e=>{ge&&ke.clickSelectedOption(),k&&ke.closeDropdown();let t=typeof B==`string`&&(B in z?z[B]:xe.current[B]);Ae(t&&t.label||``),f?.(e)},onClick:e=>{k?ke.openDropdown():ke.toggleDropdown(),p?.(e)},classNames:je,styles:Me,unstyled:a,pointer:!k,error:re,attributes:ve})}),(0,q.jsx)(iG,{data:be,hidden:S||C,filter:w,search:Ee,limit:T,hiddenWhenEmpty:!P,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!k&&we?.label!==Ee,value:B,checkIconPosition:j,withCheckIcon:M,withAlignedLabels:N,nothingFoundMessage:P,unstyled:a,labelId:ye.label?`${Se}-label`:void 0,"aria-label":ye.label?void 0:ye[`aria-label`],renderOption:le,scrollAreaProps:de})]}),(0,q.jsx)(DW.HiddenInput,{value:B,name:ee,form:te,disabled:C,...ce})]})});xX.classes={...aU.classes,...DW.classes},xX.displayName=`@mantine/core/Select`;var SX={container:`m_925c2d2c`,root:`m_2415a157`};function CX({spacing:e,verticalSpacing:t,cols:n,selector:r}){let i=sF(),a=t===void 0?e:t,o=EM({"--sg-spacing-x":VM(YM(e)),"--sg-spacing-y":VM(YM(a)),"--sg-cols":YM(n)?.toString()}),s=_M(i.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=VM(e[r])),typeof a==`object`&&a[r]!==void 0&&(t[r][`--sg-spacing-y`]=VM(a[r])),typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,q.jsx)(QF,{styles:o,media:JM(_M(s),i.breakpoints).filter(e=>_M(s[e.value]).length>0).map(e=>({query:`(min-width: ${i.breakpoints[e.value]})`,styles:s[e.value]})),selector:r})}function wX(e){return typeof e==`object`&&e?_M(e):[]}function TX(e){return e.sort((e,t)=>SM(e)-SM(t))}function EX({spacing:e,verticalSpacing:t,cols:n}){return TX(Array.from(new Set([...wX(e),...wX(t),...wX(n)])))}function DX({spacing:e,verticalSpacing:t,cols:n,selector:r}){let i=t===void 0?e:t,a=EM({"--sg-spacing-x":VM(YM(e)),"--sg-spacing-y":VM(YM(i)),"--sg-cols":YM(n)?.toString()}),o=EX({spacing:e,verticalSpacing:t,cols:n}),s=o.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=VM(e[r])),typeof i==`object`&&i[r]!==void 0&&(t[r][`--sg-spacing-y`]=VM(i[r])),typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,q.jsx)(QF,{styles:a,container:o.map(e=>({query:`simple-grid (min-width: ${e})`,styles:s[e]})),selector:r})}var OX={cols:1,spacing:`md`,type:`media`},kX=$((e,t)=>{let n=Z(`SimpleGrid`,OX,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,cols:l,verticalSpacing:u,spacing:d,type:f,attributes:p,...m}=n,h=X({name:`SimpleGrid`,classes:SX,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:p,vars:c}),g=SI();return f===`container`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(DX,{...n,selector:`.${g}`}),(0,q.jsx)(`div`,{...h(`container`),children:(0,q.jsx)(Q,{ref:t,...h(`root`,{className:g}),...m})})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(CX,{...n,selector:`.${g}`}),(0,q.jsx)(Q,{ref:t,...h(`root`,{className:g}),...m})]})});kX.classes=SX,kX.displayName=`@mantine/core/SimpleGrid`;var[AX,jX]=kM(`SliderProvider was not found in tree`),MX={root:`m_dd36362e`,label:`m_c9357328`,thumb:`m_c9a9a60a`,trackContainer:`m_a8645c2`,track:`m_c9ade57f`,bar:`m_38aeed47`,markWrapper:`m_b7b0423a`,mark:`m_dd33bc19`,markLabel:`m_68c77a5b`},NX=(0,K.forwardRef)(({size:e,disabled:t,variant:n,color:r,thumbSize:i,radius:a,...o},s)=>{let{getStyles:c}=jX();return(0,q.jsx)(Q,{tabIndex:-1,variant:n,size:e,ref:s,...c(`root`),...o})});NX.displayName=`@mantine/core/SliderRoot`;var PX=(0,K.forwardRef)(({max:e,min:t,value:n,position:r,label:i,dragging:a,onMouseDown:o,onKeyDownCapture:s,labelTransitionProps:c,labelAlwaysOn:l,thumbLabel:u,onFocus:d,onBlur:f,showLabelOnHover:p,isHovered:m,children:h=null,disabled:g},_)=>{let{getStyles:v}=jX(),[y,b]=(0,K.useState)(!1),x=l||a||y||p&&m;return(0,q.jsxs)(Q,{tabIndex:0,role:`slider`,"aria-label":u,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":n,ref:_,__vars:{"--slider-thumb-offset":`${r}%`},...v(`thumb`,{focusable:!0}),mod:{dragging:a,disabled:g},onFocus:e=>{b(!0),typeof d==`function`&&d(e)},onBlur:e=>{b(!1),typeof f==`function`&&f(e)},onTouchStart:o,onMouseDown:o,onKeyDownCapture:s,onClick:e=>e.stopPropagation(),children:[h,(0,q.jsx)(AV,{mounted:i!=null&&!!x,transition:`fade`,duration:0,...c,children:e=>(0,q.jsx)(`div`,{...v(`label`,{style:e}),children:i})})]})});PX.displayName=`@mantine/core/SliderThumb`;function FX({value:e,min:t,max:n}){let r=(e-t)/(n-t)*100;return Math.min(Math.max(r,0),100)}function IX({mark:e,offset:t,value:n,inverted:r=!1}){return r?typeof t==`number`&&e.value<=t||e.value>=n:typeof t==`number`?e.value>=t&&e.value<=n:e.value<=n}function LX({marks:e,min:t,max:n,disabled:r,value:i,offset:a,inverted:o}){let{getStyles:s}=jX();return e?(0,q.jsx)(`div`,{children:e.map((e,c)=>(0,K.createElement)(Q,{...s(`markWrapper`),__vars:{"--mark-offset":`${FX({value:e.value,min:t,max:n})}%`},key:c},(0,q.jsx)(Q,{...s(`mark`),mod:{filled:IX({mark:e,value:i,offset:a,inverted:o}),disabled:r}}),e.label&&(0,q.jsx)(`div`,{...s(`markLabel`),children:e.label})))}):null}LX.displayName=`@mantine/core/SliderMarks`;function RX({filled:e,children:t,offset:n,disabled:r,marksOffset:i,inverted:a,containerProps:o,...s}){let{getStyles:c}=jX();return(0,q.jsx)(Q,{...c(`trackContainer`),mod:{disabled:r},...o,children:(0,q.jsxs)(Q,{...c(`track`),mod:{inverted:a,disabled:r},children:[(0,q.jsx)(Q,{mod:{inverted:a,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...c(`bar`)}),t,(0,q.jsx)(LX,{...s,offset:i,disabled:r,inverted:a})]})})}RX.displayName=`@mantine/core/SliderTrack`;function zX({value:e,containerWidth:t,min:n,max:r,step:i,precision:a}){let o=(t?Math.min(Math.max(e,0),t)/t:e)*(r-n),s=(o===0?0:Math.round(o/i)*i)+n,c=Math.max(s,n);return a===void 0?c:Number(c.toFixed(a))}function BX(e,t){return parseFloat(e.toFixed(t))}function VX(e){if(!e)return 0;let t=e.toString().split(`.`);return t.length>1?t[1].length:0}function HX(e,t){let n=[...t].sort((e,t)=>e.value-t.value).find(t=>t.value>e);return n?n.value:e}function UX(e,t){let n=[...t].sort((e,t)=>t.value-e.value).find(t=>t.value<e);return n?n.value:e}function WX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[0].value:0}function GX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[t.length-1].value:100}var KX={radius:`xl`,min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:`fade`,duration:0},thumbLabel:``,showLabelOnHover:!0,scale:e=>e,size:`md`},qX=hP((e,{size:t,color:n,thumbSize:r,radius:i})=>({root:{"--slider-size":BM(t,`slider-size`),"--slider-color":n?WP(n,e):void 0,"--slider-radius":i===void 0?void 0:HM(i),"--slider-thumb-size":r===void 0?`calc(var(--slider-size) * 2)`:Y(r)}})),JX=$((e,t)=>{let n=Z(`Slider`,KX,e),{classNames:r,styles:i,value:a,onChange:o,onChangeEnd:s,size:c,min:l,max:u,domain:d,step:f,precision:p,defaultValue:m,name:h,marks:g,label:_,labelTransitionProps:v,labelAlwaysOn:y,thumbLabel:b,showLabelOnHover:x,thumbChildren:S,disabled:C,unstyled:w,scale:T,inverted:E,className:D,style:O,vars:k,hiddenInputProps:A,restrictToMarks:j,thumbProps:M,attributes:N,...P}=n,ee=X({name:`Slider`,props:n,classes:MX,classNames:r,className:D,styles:i,style:O,attributes:N,vars:k,varsResolver:qX,unstyled:w}),{dir:te}=FI(),[ne,F]=(0,K.useState)(!1),[I,L]=MN({value:typeof a==`number`?ZM(a,l,u):a,defaultValue:typeof m==`number`?ZM(m,l,u):m,finalValue:ZM(0,l,u),onChange:o}),re=(0,K.useRef)(I),ie=(0,K.useRef)(s);(0,K.useEffect)(()=>{ie.current=s},[s]);let ae=(0,K.useRef)(null),oe=(0,K.useRef)(null),[se,ce]=d||[l,u],le=FX({value:I,min:se,max:ce}),ue=T(I),R=typeof _==`function`?_(ue):_,de=p??VX(f),{ref:fe,active:pe}=jN((0,K.useCallback)(({x:e})=>{if(!C){let t=ZM(zX({value:e,min:se,max:ce,step:f,precision:de}),l,u);L(j&&g?.length?lP(t,g.map(e=>e.value)):t),re.current=t}},[C,l,u,se,ce,f,de,L,g,j]),{onScrubEnd:(0,K.useCallback)(()=>{if(!C&&ie.current){let e=j&&g?.length?lP(re.current,g.map(e=>e.value)):re.current;ie.current(e)}},[C,g,j])},te),me=(0,K.useCallback)(e=>{!C&&ie.current&&ie.current(e)},[C]),he=e=>{if(!C)switch(e.key){case`ArrowUp`:{if(e.preventDefault(),oe.current?.focus(),j&&g){let e=HX(I,g);L(e),me(e);break}let t=BX(Math.min(Math.max(I+f,l),u),de);L(t),me(t);break}case`ArrowRight`:{if(e.preventDefault(),oe.current?.focus(),j&&g){let e=te===`rtl`?UX(I,g):HX(I,g);L(e),me(e);break}let t=BX(Math.min(Math.max(te===`rtl`?I-f:I+f,l),u),de);L(t),me(t);break}case`ArrowDown`:{if(e.preventDefault(),oe.current?.focus(),j&&g){let e=UX(I,g);L(e),me(e);break}let t=BX(Math.min(Math.max(I-f,l),u),de);L(t),me(t);break}case`ArrowLeft`:{if(e.preventDefault(),oe.current?.focus(),j&&g){let e=te===`rtl`?HX(I,g):UX(I,g);L(e),me(e);break}let t=BX(Math.min(Math.max(te===`rtl`?I+f:I-f,l),u),de);L(t),me(t);break}case`Home`:if(e.preventDefault(),oe.current?.focus(),j&&g){L(WX(g)),me(WX(g));break}L(l),me(l);break;case`End`:if(e.preventDefault(),oe.current?.focus(),j&&g){L(GX(g)),me(GX(g));break}L(u),me(u);break}};return(0,q.jsx)(AX,{value:{getStyles:ee},children:(0,q.jsxs)(NX,{...P,ref:kN(t,ae),onKeyDownCapture:he,onMouseDownCapture:()=>ae.current?.focus(),size:c,disabled:C,children:[(0,q.jsx)(RX,{inverted:E,offset:0,filled:le,marks:g,min:se,max:ce,value:ue,disabled:C,containerProps:{ref:fe,onMouseEnter:x?()=>F(!0):void 0,onMouseLeave:x?()=>F(!1):void 0},children:(0,q.jsx)(PX,{max:ce,min:se,value:ue,position:le,dragging:pe,label:R,ref:oe,labelTransitionProps:v,labelAlwaysOn:y,thumbLabel:b,showLabelOnHover:x,isHovered:ne,disabled:C,...M,children:S})}),(0,q.jsx)(`input`,{type:`hidden`,name:h,value:ue,...A})]})})});JX.classes=MX,JX.displayName=`@mantine/core/Slider`;var YX={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},XX=(0,K.createContext)(null),ZX=XX.Provider,QX=()=>(0,K.useContext)(XX),$X=$((e,t)=>{let{value:n,defaultValue:r,onChange:i,size:a,wrapperProps:o,children:s,readOnly:c,disabled:l,...u}=Z(`SwitchGroup`,null,e),[d,f]=MN({value:n,defaultValue:r,finalValue:[],onChange:i});return(0,q.jsx)(ZX,{value:{value:d,onChange:e=>{let t=e.currentTarget.value;!c&&f(d.includes(t)?d.filter(e=>e!==t):[...d,t])},size:a,disabled:l},children:(0,q.jsx)(nU.Wrapper,{size:a,ref:t,...o,...u,labelElement:`div`,__staticSelector:`SwitchGroup`,children:(0,q.jsx)(VW,{role:`group`,children:s})})})});$X.classes=nU.Wrapper.classes,$X.displayName=`@mantine/core/SwitchGroup`;var eZ={labelPosition:`right`,withThumbIndicator:!0},tZ=hP((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:HM(t),"--switch-height":BM(r,`switch-height`),"--switch-width":BM(r,`switch-width`),"--switch-thumb-size":BM(r,`switch-thumb-size`),"--switch-label-font-size":BM(r,`switch-label-font-size`),"--switch-track-label-padding":BM(r,`switch-track-label-padding`),"--switch-color":n?WP(n,e):void 0}})),nZ=$((e,t)=>{let n=Z(`Switch`,eZ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,color:l,label:u,offLabel:d,onLabel:f,id:p,size:m,radius:h,wrapperProps:g,thumbIcon:_,checked:v,defaultChecked:y,onChange:b,labelPosition:x,description:S,error:C,disabled:w,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=n,j=QX(),M=m||j?.size,N=X({name:`Switch`,props:n,classes:YX,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:k,vars:c,varsResolver:tZ}),{styleProps:P,rest:ee}=$F(A),te=TN(p),ne={checked:j?.value.includes(ee.value)??v,onChange:e=>{j?.onChange(e),b?.(e)},disabled:j?.disabled??w},[F,I]=MN({value:ne.checked??v,defaultValue:y,finalValue:!1});return(0,q.jsxs)(AW,{...N(`root`),__staticSelector:`Switch`,__stylesApiProps:n,id:te,size:M,labelPosition:x,label:u,description:S,error:C,disabled:ne.disabled,bodyElement:`label`,labelElement:`span`,classNames:r,styles:o,unstyled:s,"data-checked":ne.checked,variant:T,ref:E,mod:D,inert:ee.inert,...P,...g,children:[(0,q.jsx)(`input`,{...ee,...ne,checked:F,"data-checked":ne.checked,onChange:e=>{ne.onChange?.(e),I(e.currentTarget.checked)},id:te,ref:t,type:`checkbox`,role:`switch`,inert:ee.inert,...N(`input`)}),(0,q.jsxs)(Q,{"aria-hidden":`true`,component:`span`,mod:{error:C,"label-position":x,"without-labels":!f&&!d},...N(`track`),children:[(0,q.jsx)(Q,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!_},...N(`thumb`),children:_}),(0,q.jsx)(`span`,{...N(`trackLabel`),children:F?f:d})]})]})});nZ.classes={...YX,...kW},nZ.displayName=`@mantine/core/Switch`,nZ.Group=$X;function rZ({data:e,value:t}){let n=t.map(e=>e.trim().toLowerCase());return e.reduce((e,t)=>(QW(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(e.label.toLowerCase().trim())===-1)}):n.indexOf(t.label.toLowerCase().trim())===-1&&e.push(t),e),[])}function iZ(e,t){return e?t.split(RegExp(`[${e.join(``)}]`)).map(e=>e.trim()).filter(e=>e!==``):[t]}function aZ({splitChars:e,allowDuplicates:t,maxTags:n,value:r,currentTags:i,isDuplicate:a,onDuplicate:o}){let s=iZ(e,r),c=[];if(t)c.push(...i,...s);else{c.push(...i);for(let e of s)(a?e=>a(e,c):e=>c.some(t=>t.toLowerCase()===e.toLowerCase()))(e)?o?.(e):c.push(e)}return n?c.slice(0,n):c}var oZ={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[`,`],hiddenInputValuesDivider:`,`,openOnFocus:!0,size:`sm`},sZ=$((e,t)=>{let n=Z(`TagsInput`,oZ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,size:l,value:u,defaultValue:d,onChange:f,onKeyDown:p,maxTags:m,allowDuplicates:h,onDuplicate:g,variant:_,data:v,dropdownOpened:y,defaultDropdownOpened:b,onDropdownOpen:x,onDropdownClose:S,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:w,onOptionSubmit:T,comboboxProps:E,filter:D,limit:O,withScrollArea:k,maxDropdownHeight:A,searchValue:j,defaultSearchValue:M,onSearchChange:N,readOnly:P,disabled:ee,splitChars:te,onFocus:ne,onBlur:F,onPaste:I,radius:L,rightSection:re,rightSectionWidth:ie,rightSectionPointerEvents:ae,rightSectionProps:oe,leftSection:se,leftSectionWidth:ce,leftSectionPointerEvents:le,leftSectionProps:ue,inputContainer:R,inputWrapperOrder:de,withAsterisk:fe,required:pe,labelProps:me,descriptionProps:he,errorProps:ge,wrapperProps:_e,description:ve,label:ye,error:be,withErrorStyles:xe,name:z,form:Se,id:B,clearable:V,clearButtonProps:Ce,hiddenInputProps:we,hiddenInputValuesDivider:Te,mod:Ee,renderOption:De,onRemove:Oe,onClear:ke,scrollAreaProps:Ae,acceptValueOnBlur:je,isDuplicate:Me,openOnFocus:Ne,attributes:Pe,...H}=n,Fe=TN(B),Ie=YU(v),Le=XU(Ie),Re=(0,K.useRef)(null),ze=kN(Re,t),Be=wW({opened:y,defaultOpened:b,onDropdownOpen:()=>{x?.(),w&&Be.selectFirstOption()},onDropdownClose:()=>{S?.(),Be.resetSelectedOption()}}),{styleProps:Ve,rest:{type:He,autoComplete:Ue,...We}}=$F(H),[Ge,Ke]=MN({value:u,defaultValue:d,finalValue:[],onChange:f}),[qe,Je]=MN({value:j,defaultValue:M,finalValue:``,onChange:N}),Ye=e=>{Je(e),Be.resetSelectedOption()},Xe=X({name:`TagsInput`,classes:{},props:n,classNames:r,styles:o,unstyled:s}),{resolvedClassNames:Ze,resolvedStyles:Qe}=OF({props:n,styles:o,classNames:r}),$e=e=>{if((Me?Me(e,Ge):Ge.some(t=>t.toLowerCase()===e.toLowerCase()))&&(g?.(e),!h)){Ye(``);return}Ge.length<m&&(T?.(e),Ye(``),e.length>0&&Ke([...Ge,e]))},et=e=>{if(p?.(e),e.isPropagationStopped())return;let t=qe.trim(),{length:n}=t;if(te.includes(e.key)&&n>0&&(Ke(aZ({splitChars:te,allowDuplicates:h,maxTags:m,value:qe,currentTags:Ge,isDuplicate:Me,onDuplicate:g})),Ye(``),e.preventDefault()),e.key===`Enter`&&n>0&&!e.nativeEvent.isComposing){if(e.preventDefault(),document.querySelector(`#${Be.listId} [data-combobox-option][data-combobox-selected]`))return;$e(t)}e.key===`Backspace`&&n===0&&Ge.length>0&&!e.nativeEvent.isComposing&&!P&&(Oe?.(Ge[Ge.length-1]),Ke(Ge.slice(0,Ge.length-1)))},tt=e=>{I?.(e),e.preventDefault(),e.clipboardData&&(Ke(aZ({splitChars:te,allowDuplicates:h,maxTags:m,value:`${qe}${e.clipboardData.getData(`text/plain`)}`,currentTags:Ge,isDuplicate:Me,onDuplicate:g})),Ye(``))},nt=Ge.map((e,t)=>(0,q.jsx)(xJ,{withRemoveButton:!P,onRemove:()=>{let n=Ge.slice();n.splice(t,1),Ke(n),Oe?.(e)},unstyled:s,disabled:ee,attributes:Pe,...Xe(`pill`),children:e},`${e}-${t}`));(0,K.useEffect)(()=>{C&&Be.selectFirstOption()},[C,Ge,qe]);let rt=(0,q.jsx)(DW.ClearButton,{...Ce,onClear:()=>{Ke([]),Ye(``),Re.current?.focus(),Be.openDropdown(),ke?.()}});return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(DW,{store:Be,classNames:Ze,styles:Qe,unstyled:s,size:l,readOnly:P,__staticSelector:`TagsInput`,attributes:Pe,onOptionSubmit:e=>{T?.(e),Ye(``),Ge.length<m&&Ke([...Ge,Le[e].label]),Be.resetSelectedOption()},...E,children:[(0,q.jsx)(DW.DropdownTarget,{children:(0,q.jsx)(EJ,{...Ve,__staticSelector:`TagsInput`,classNames:Ze,styles:Qe,unstyled:s,size:l,className:i,style:a,variant:_,disabled:ee,radius:L,rightSection:re,__clearSection:rt,__clearable:V&&Ge.length>0&&!ee&&!P,rightSectionWidth:ie,rightSectionPointerEvents:ae,rightSectionProps:oe,leftSection:se,leftSectionWidth:ce,leftSectionPointerEvents:le,leftSectionProps:ue,inputContainer:R,inputWrapperOrder:de,withAsterisk:fe,required:pe,labelProps:me,descriptionProps:he,errorProps:ge,wrapperProps:_e,description:ve,label:ye,error:be,withErrorStyles:xe,__stylesApiProps:{...n,multiline:!0},id:Fe,mod:Ee,attributes:Pe,children:(0,q.jsxs)(xJ.Group,{disabled:ee,unstyled:s,...Xe(`pillsList`),children:[nt,(0,q.jsx)(DW.EventsTarget,{autoComplete:Ue,children:(0,q.jsx)(EJ.Field,{...We,ref:ze,...Xe(`inputField`),unstyled:s,onKeyDown:et,onFocus:e=>{ne?.(e),Ne&&Be.openDropdown()},onBlur:e=>{F?.(e),je&&$e(qe),Be.closeDropdown()},onPaste:tt,value:qe,onChange:e=>Ye(e.currentTarget.value),required:pe&&Ge.length===0,disabled:ee,readOnly:P,id:Fe})})]})})}),(0,q.jsx)(iG,{data:rZ({data:Ie,value:Ge}),hidden:P||ee,filter:D,search:qe,limit:O,hiddenWhenEmpty:!0,withScrollArea:k,maxDropdownHeight:A,unstyled:s,labelId:ye?`${Fe}-label`:void 0,"aria-label":ye?void 0:H[`aria-label`],renderOption:De,scrollAreaProps:Ae})]}),(0,q.jsx)(DW.HiddenInput,{name:z,form:Se,value:Ge,valuesDivider:Te,disabled:ee,...we})]})});sZ.classes={...aU.classes,...DW.classes},sZ.displayName=`@mantine/core/TagsInput`;var cZ=$((e,t)=>(0,q.jsx)(aU,{component:`input`,ref:t,...Z(`TextInput`,null,e),__staticSelector:`TextInput`}));cZ.classes=aU.classes,cZ.displayName=`@mantine/core/TextInput`;var lZ={root:`m_f698e191`,subtree:`m_75f3ecf`,node:`m_f6970eb1`,label:`m_dc283425`};function uZ(e,t,n){if(!e||!t)return[];let r=n.indexOf(e),i=n.indexOf(t),a=Math.min(r,i),o=Math.max(r,i);return n.slice(a,o+1)}function dZ({node:e,getStyles:t,rootIndex:n,controller:r,expandOnClick:i,selectOnClick:a,isSubtree:o,level:s=1,renderNode:c,flatValues:l,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f}){let p=(0,K.useRef)(null),m=(e.children||[]).map(e=>(0,q.jsx)(dZ,{node:e,flatValues:l,getStyles:t,rootIndex:void 0,level:s+1,controller:r,expandOnClick:i,isSubtree:!0,renderNode:c,selectOnClick:a,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f},e.value)),h=t=>{if(t.nativeEvent.code===`ArrowRight`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]?t.currentTarget.querySelector(`[role=treeitem]`)?.focus():r.expand(e.value)),t.nativeEvent.code===`ArrowLeft`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]&&(e.children||[]).length>0?r.collapse(e.value):o&&jM(t.currentTarget,`[role=treeitem]`)?.focus()),t.nativeEvent.code===`ArrowDown`||t.nativeEvent.code===`ArrowUp`){let e=jM(t.currentTarget,`[data-tree-root]`);if(!e)return;t.stopPropagation(),t.preventDefault();let n=Array.from(e.querySelectorAll(`[role=treeitem]`)),i=n.indexOf(t.currentTarget);if(i===-1)return;let a=t.nativeEvent.code===`ArrowDown`?i+1:i-1;if(n[a]?.focus(),t.shiftKey){let e=n[a];e&&r.setSelectedState(uZ(r.anchorNode,e.dataset.value,l))}}t.nativeEvent.code===`Space`&&(d&&(t.stopPropagation(),t.preventDefault(),r.toggleExpanded(e.value)),f&&(t.stopPropagation(),t.preventDefault(),r.isNodeChecked(e.value)?r.uncheckNode(e.value):r.checkNode(e.value)))},g=t=>{t.stopPropagation(),u&&t.shiftKey&&r.anchorNode?(r.setSelectedState(uZ(r.anchorNode,e.value,l)),p.current?.focus()):(i&&r.toggleExpanded(e.value),a&&r.select(e.value),p.current?.focus())},_=r.selectedState.includes(e.value),v={...t(`label`),onClick:g,"data-selected":_||void 0,"data-value":e.value,"data-hovered":r.hoveredNode===e.value||void 0};return(0,q.jsxs)(`li`,{...t(`node`,{style:{"--label-offset":`calc(var(--level-offset) * ${s-1})`}}),role:`treeitem`,"aria-selected":_,"data-value":e.value,"data-selected":_||void 0,"data-hovered":r.hoveredNode===e.value||void 0,"data-level":s,tabIndex:n===0?0:-1,onKeyDown:h,ref:p,onMouseOver:t=>{t.stopPropagation(),r.setHoveredNode(e.value)},onMouseLeave:e=>{e.stopPropagation(),r.setHoveredNode(null)},children:[typeof c==`function`?c({node:e,level:s,selected:_,tree:r,expanded:r.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:v}):(0,q.jsx)(`div`,{...v,children:e.label}),r.expandedState[e.value]&&m.length>0&&(0,q.jsx)(Q,{component:`ul`,role:`group`,...t(`subtree`),"data-level":s,children:m})]})}dZ.displayName=`@mantine/core/TreeNode`;function fZ(e,t,n=[]){let r=[];for(let i of e)if(Array.isArray(i.children)&&i.children.length>0){let e=fZ(i.children,t,n);if(e.currentTreeChecked.length===i.children.length){let t=e.currentTreeChecked.every(e=>e.checked),a={checked:t,indeterminate:!t,value:i.value,hasChildren:!0};r.push(a),n.push(a)}else if(e.currentTreeChecked.length>0){let e={checked:!1,indeterminate:!0,value:i.value,hasChildren:!0};r.push(e),n.push(e)}}else if(t.includes(i.value)){let e={checked:!0,indeterminate:!1,value:i.value,hasChildren:!1};r.push(e),n.push(e)}return{result:n,currentTreeChecked:r}}function pZ(e,t){for(let n of t){if(n.value===e)return n;if(Array.isArray(n.children)){let t=pZ(e,n.children);if(t)return t}}return null}function mZ(e,t,n=[]){let r=pZ(e,t);return r?!Array.isArray(r.children)||r.children.length===0?[r.value]:(r.children.forEach(e=>{Array.isArray(e.children)&&e.children.length>0?mZ(e.value,t,n):n.push(e.value)}),n):n}function hZ(e){return e.reduce((e,t)=>(Array.isArray(t.children)&&t.children.length>0?e.push(...hZ(t.children)):e.push(t.value),e),[])}function gZ(e,t,n){return n.length===0?!1:n.includes(e)?!0:fZ(t,n).result.some(t=>t.value===e&&t.checked)}var _Z=cP(gZ);function vZ(e,t,n){return n.length===0?!1:fZ(t,n).result.some(t=>t.value===e&&t.indeterminate)}var yZ=cP(vZ);function bZ(e,t,n,r={}){return t.forEach(t=>{r[t.value]=t.value in e?e[t.value]:t.value===n,Array.isArray(t.children)&&bZ(e,t.children,n,r)}),r}function xZ(e,t){let n=bZ({},e,[]);return t===`*`?Object.keys(n).reduce((e,t)=>({...e,[t]:!0}),{}):(t.forEach(e=>{n[e]=!0}),n)}function SZ(e,t){let n=[];return e.forEach(e=>n.push(...mZ(e,t))),Array.from(new Set(n))}function CZ({initialSelectedState:e=[],initialCheckedState:t=[],initialExpandedState:n={},multiple:r=!1,onNodeCollapse:i,onNodeExpand:a}={}){let[o,s]=(0,K.useState)([]),[c,l]=(0,K.useState)(n),[u,d]=(0,K.useState)(e),[f,p]=(0,K.useState)(t),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(null),v=(0,K.useCallback)(e=>{l(t=>bZ(t,e,u)),p(t=>SZ(t,e)),s(e)},[u,f]),y=(0,K.useCallback)(e=>{l(t=>{let n={...t,[e]:!t[e]};return n[e]?a?.(e):i?.(e),n})},[i,a]),b=(0,K.useCallback)(e=>{l(t=>(t[e]!==!1&&i?.(e),{...t,[e]:!1}))},[i]),x=(0,K.useCallback)(e=>{l(t=>(t[e]!==!0&&a?.(e),{...t,[e]:!0}))},[a]),S=(0,K.useCallback)(()=>{l(e=>{let t={...e};return Object.keys(t).forEach(e=>{t[e]=!0}),t})},[]),C=(0,K.useCallback)(()=>{l(e=>{let t={...e};return Object.keys(t).forEach(e=>{t[e]=!1}),t})},[]),w=(0,K.useCallback)(e=>d(t=>r?t.includes(e)?(h(null),t.filter(t=>t!==e)):(h(e),[...t,e]):t.includes(e)?(h(null),[]):(h(e),[e])),[]),T=(0,K.useCallback)(e=>{h(e),d(t=>r?t.includes(e)?t:[...t,e]:[e])},[]),E=(0,K.useCallback)(e=>{m===e&&h(null),d(t=>t.filter(t=>t!==e))},[]),D=(0,K.useCallback)(()=>{d([]),h(null)},[]);return{multiple:r,expandedState:c,selectedState:u,checkedState:f,anchorNode:m,initialize:v,toggleExpanded:y,collapse:b,expand:x,expandAllNodes:S,collapseAllNodes:C,setExpandedState:l,checkNode:(0,K.useCallback)(e=>{let t=mZ(e,o);p(e=>Array.from(new Set([...e,...t])))},[o]),uncheckNode:(0,K.useCallback)(e=>{let t=mZ(e,o);p(e=>e.filter(e=>!t.includes(e)))},[o]),checkAllNodes:(0,K.useCallback)(()=>{p(()=>hZ(o))},[o]),uncheckAllNodes:(0,K.useCallback)(()=>{p([])},[]),setCheckedState:p,toggleSelected:w,select:T,deselect:E,clearSelected:D,setSelectedState:d,hoveredNode:g,setHoveredNode:_,getCheckedNodes:()=>fZ(o,f).result,isNodeChecked:e=>_Z(e,o,f),isNodeIndeterminate:e=>yZ(e,o,f)}}function wZ(e){return e.reduce((e,t)=>(e.push(t.value),t.children&&e.push(...wZ(t.children)),e),[])}var TZ={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},EZ=hP((e,{levelOffset:t})=>({root:{"--level-offset":VM(t)}})),DZ=$((e,t)=>{let n=Z(`Tree`,TZ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,data:l,expandOnClick:u,tree:d,renderNode:f,selectOnClick:p,clearSelectionOnOutsideClick:m,allowRangeSelection:h,expandOnSpace:g,levelOffset:_,checkOnSpace:v,attributes:y,...b}=n,x=CZ(),S=d||x,C=X({name:`Tree`,classes:lZ,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:y,vars:c,varsResolver:EZ}),w=kN(t,rN(()=>m&&S.clearSelected())),T=(0,K.useMemo)(()=>wZ(l),[l]);(0,K.useEffect)(()=>{S.initialize(l)},[l]);let E=l.map((e,t)=>(0,q.jsx)(dZ,{node:e,getStyles:C,rootIndex:t,expandOnClick:u,selectOnClick:p,controller:S,renderNode:f,flatValues:T,allowRangeSelection:h,expandOnSpace:g,checkOnSpace:v},e.value));return(0,q.jsx)(Q,{component:`ul`,ref:w,...C(`root`),...b,role:`tree`,"aria-multiselectable":S.multiple,"data-tree-root":!0,children:E})});DZ.displayName=`@mantine/core/Tree`,DZ.classes=lZ;var OZ={name:`Editorial`,description:`Serif typography with newspaper elegance`,defaultColorScheme:`light`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap`}]},primaryColor:`ink`,primaryShade:{light:7,dark:3},autoContrast:!0,fontFamily:`"Source Serif 4", "Georgia", "Times New Roman", serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`"Playfair Display", "Georgia", "Times New Roman", serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.5rem`,lineHeight:`1.15`},h2:{fontSize:`1.75rem`,lineHeight:`1.2`},h3:{fontSize:`1.375rem`,lineHeight:`1.3`},h4:{fontSize:`1.125rem`,lineHeight:`1.4`},h5:{fontSize:`1rem`,lineHeight:`1.5`},h6:{fontSize:`0.875rem`,lineHeight:`1.5`}}},defaultRadius:`sm`,radius:{xs:`2px`,sm:`3px`,md:`4px`,lg:`6px`,xl:`8px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.06)`,sm:`0 1px 3px rgba(0, 0, 0, 0.08)`,md:`0 2px 6px rgba(0, 0, 0, 0.08)`,lg:`0 4px 12px rgba(0, 0, 0, 0.1)`,xl:`0 8px 24px rgba(0, 0, 0, 0.1)`},colors:{ink:[`#f5f3f0`,`#e8e4de`,`#d4cec5`,`#b5ad9f`,`#8c8272`,`#6b6050`,`#4a4035`,`#332b22`,`#1f1812`,`#0d0a07`],burgundy:[`#faf0f0`,`#f0d4d4`,`#e0adad`,`#cc8585`,`#b35e5e`,`#944545`,`#763636`,`#5a2828`,`#3d1b1b`,`#220f0f`],gray:[`#faf9f7`,`#f0eee9`,`#e0dcd5`,`#c8c2b8`,`#a8a194`,`#8a8273`,`#6b6456`,`#504a3f`,`#36322b`,`#1e1b17`],dark:[`#d5d2cd`,`#aba59c`,`#817a6e`,`#5e584e`,`#46413a`,`#36322c`,`#2a2721`,`#201d19`,`#171411`,`#0d0b09`]},components:{Button:bG.extend({defaultProps:{fw:600},styles:{root:{letterSpacing:`0.02em`}}}),ActionIcon:oH.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Paper:lV.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:EG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:cZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:cG.extend({defaultProps:{fw:600,variant:`outline`},styles:{root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,letterSpacing:`0.04em`,textTransform:`uppercase`,fontSize:`0.65rem`}}})}},kZ={name:`Midnight`,description:`Clean, developer-focused design`,primaryColor:`pink`,primaryShade:{light:7,dark:8},fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},radius:{xs:`3px`,sm:`6px`,md:`6px`,lg:`8px`,xl:`12px`},defaultRadius:`sm`,colors:{dark:[`#d0d7de`,`#8b949e`,`#6e7681`,`#484f58`,`#30363d`,`#21262d`,`#161b22`,`#151b23`,`#0d1117`,`#010409`],gray:[`#f6f8fa`,`#eaeef2`,`#d0d7de`,`#afb8c1`,`#8c959f`,`#6e7781`,`#57606a`,`#424a53`,`#32383f`,`#24292f`],blue:[`#ddf4ff`,`#b6e3ff`,`#80ccff`,`#54aeff`,`#218bff`,`#0969da`,`#0550ae`,`#033d8b`,`#0a3069`,`#002155`],green:[`#dafbe1`,`#aceebb`,`#6fdd8b`,`#4ac26b`,`#2da44e`,`#1a7f37`,`#116329`,`#044f1e`,`#003d16`,`#002d11`],red:[`#ffebe9`,`#ffcecb`,`#ffaba8`,`#ff8182`,`#fa4549`,`#cf222e`,`#a40e26`,`#82071e`,`#660018`,`#4c0014`]}},AZ={name:`Monochrome`,description:`Pure black and white — zero color, maximum typography`,primaryColor:`mono`,primaryShade:{light:8,dark:1},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`800`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.25rem`,lineHeight:`1.15`},h2:{fontSize:`1.625rem`,lineHeight:`1.25`},h3:{fontSize:`1.25rem`,lineHeight:`1.35`},h4:{fontSize:`1.0625rem`,lineHeight:`1.45`},h5:{fontSize:`0.9375rem`,lineHeight:`1.5`},h6:{fontSize:`0.8125rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`0`,xl:`2px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.08)`,sm:`0 1px 4px rgba(0, 0, 0, 0.1)`,md:`0 2px 8px rgba(0, 0, 0, 0.12)`,lg:`0 4px 16px rgba(0, 0, 0, 0.14)`,xl:`0 8px 32px rgba(0, 0, 0, 0.16)`},colors:{mono:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],gray:[`#f5f5f5`,`#e5e5e5`,`#cccccc`,`#b0b0b0`,`#909090`,`#707070`,`#555555`,`#3a3a3a`,`#252525`,`#121212`],blue:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],green:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],red:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],dark:[`#d0d0d0`,`#a0a0a0`,`#707070`,`#505050`,`#383838`,`#282828`,`#1c1c1c`,`#141414`,`#0a0a0a`,`#000000`]},components:{Button:bG.extend({defaultProps:{fw:700},styles:{root:{border:`2px solid currentColor`,letterSpacing:`0.03em`,textTransform:`uppercase`,fontSize:`0.8125rem`}}}),ActionIcon:oH.extend({styles:{root:{border:`2px solid currentColor`}}}),Paper:lV.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:EG.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:cZ.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`}}}),Badge:cG.extend({defaultProps:{fw:700,variant:`outline`},styles:{root:{textTransform:`uppercase`,letterSpacing:`0.06em`,fontSize:`0.65rem`,border:`2px solid currentColor`}}})}},jZ={name:`Rosé Pine`,description:`Muted pinks and golds on warm dark backgrounds`,defaultColorScheme:`dark`,primaryColor:`rose`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`4px`,sm:`6px`,md:`8px`,lg:`12px`,xl:`16px`},shadows:{xs:`0 1px 3px rgba(0, 0, 0, 0.2)`,sm:`0 2px 6px rgba(0, 0, 0, 0.2)`,md:`0 4px 12px rgba(0, 0, 0, 0.25)`,lg:`0 8px 24px rgba(0, 0, 0, 0.3)`,xl:`0 12px 36px rgba(0, 0, 0, 0.35)`},colors:{rose:[`#faf0f4`,`#f2d8e3`,`#eabdd0`,`#e0a0bb`,`#d4849f`,`#c4748f`,`#b06282`,`#9a5275`,`#7a3f5e`,`#5c2e47`],gold:[`#fdf8ec`,`#f8ecc8`,`#f2dda0`,`#eacb72`,`#e0b94d`,`#c9a33e`,`#a98830`,`#866b24`,`#634f1a`,`#403310`],pine:[`#ecf5f0`,`#d0e6da`,`#add4be`,`#86c0a0`,`#62ac84`,`#4e9670`,`#3e7a5a`,`#2f5e44`,`#20412f`,`#12251b`],foam:[`#edf6f7`,`#d2e9eb`,`#b0d9dd`,`#8bc6cc`,`#6ab3bb`,`#569da5`,`#438088`,`#33636a`,`#23454a`,`#14292c`],red:[`#f9eef0`,`#efd3d8`,`#e3b2bb`,`#d68e9b`,`#c86c7c`,`#b25566`,`#944454`,`#733442`,`#52252f`,`#33161d`],gray:[`#f4f0f2`,`#e4dde1`,`#cec5cb`,`#b5aab2`,`#9a8e96`,`#7e737a`,`#635a60`,`#4a4248`,`#332d31`,`#1e1a1c`],dark:[`#e0d8e0`,`#b0a6b2`,`#817786`,`#615768`,`#4a3f54`,`#3a3044`,`#2a2436`,`#211e2e`,`#1a1724`,`#110f1a`]},components:{Button:bG.extend({defaultProps:{fw:500},styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),ActionIcon:oH.extend({styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),Paper:lV.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:EG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:cZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:cG.extend({defaultProps:{fw:500}})}},MZ={name:`Soft Brutalism`,description:`Pastel pop with bold borders and offset shadows`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap`}]},primaryColor:`lavender`,primaryShade:{light:5,dark:7},autoContrast:!0,cursorType:`pointer`,fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`6px`,sm:`8px`,md:`12px`,lg:`16px`,xl:`24px`},shadows:{xs:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`,sm:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,md:`4px 4px 0 0 rgba(100, 80, 140, 0.2)`,lg:`6px 6px 0 0 rgba(100, 80, 140, 0.25)`,xl:`8px 8px 0 0 rgba(100, 80, 140, 0.3)`},colors:{lavender:[`#f3f0fa`,`#e4dcf4`,`#d1c4e9`,`#b4a7d6`,`#9a8bc4`,`#7f6cb0`,`#6a549e`,`#543f87`,`#3d2d6b`,`#2a1d52`],peach:[`#fef3ec`,`#fce4d0`,`#f9d0ae`,`#f4b886`,`#f4a261`,`#e68a42`,`#c67234`,`#a35a28`,`#6b3a1a`,`#4a2710`],mint:[`#ecfaf0`,`#d4f2dc`,`#b3e8c2`,`#8edba4`,`#81c995`,`#5ab874`,`#42a05c`,`#2e8548`,`#1a5c2e`,`#0f3f1e`],coral:[`#fef0ef`,`#fcd9d7`,`#f8b8b4`,`#f29490`,`#e97171`,`#d65454`,`#b83e3e`,`#962d2d`,`#6b1f1f`,`#4a1414`],gray:[`#faf8f6`,`#f0ece8`,`#ddd7d0`,`#c4bbb2`,`#a89e95`,`#8c8279`,`#6e655d`,`#524b44`,`#3a342f`,`#24211e`],dark:[`#d4d0dc`,`#a9a2b5`,`#7e7690`,`#5c546e`,`#443c56`,`#342d45`,`#2a2339`,`#1e1a2e`,`#161224`,`#0f0c1a`]},components:{Button:bG.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`,boxShadow:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,transition:`box-shadow 0.15s ease, transform 0.15s ease`}}}),ActionIcon:oH.extend({styles:{root:{border:`2px solid currentColor`,boxShadow:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`}}}),Paper:lV.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:EG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:cZ.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`,transition:`box-shadow 0.15s ease, border-color 0.15s ease`}}}),Badge:cG.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`}}})}},NZ={name:`Terminal`,description:`Green phosphor on black — monospace hacker aesthetic`,defaultColorScheme:`dark`,primaryColor:`terminal`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`1.75rem`,lineHeight:`1.3`},h2:{fontSize:`1.375rem`,lineHeight:`1.35`},h3:{fontSize:`1.125rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`2px`,xl:`4px`},shadows:{xs:`none`,sm:`none`,md:`0 0 8px rgba(0, 255, 65, 0.08)`,lg:`0 0 16px rgba(0, 255, 65, 0.1)`,xl:`0 0 24px rgba(0, 255, 65, 0.12)`},colors:{terminal:[`#e6fff0`,`#b3ffd1`,`#80ffb3`,`#4dff94`,`#00ff41`,`#00d636`,`#00ad2b`,`#008521`,`#005c17`,`#00330d`],amber:[`#fff8e6`,`#ffecb3`,`#ffe080`,`#ffd54d`,`#ffca28`,`#d4a520`,`#aa8418`,`#806310`,`#554208`,`#2b2104`],red:[`#ffe6e6`,`#ffb3b3`,`#ff8080`,`#ff4d4d`,`#ff1a1a`,`#d41515`,`#aa1010`,`#800c0c`,`#550808`,`#2b0404`],gray:[`#e8eaed`,`#c8cdd3`,`#a4aab3`,`#808892`,`#5f6872`,`#474f58`,`#363c44`,`#282d33`,`#1c2026`,`#12151a`],dark:[`#c9cdd2`,`#8b9198`,`#5c636b`,`#3d444c`,`#2b3138`,`#1e242b`,`#151a20`,`#0e1216`,`#080c0f`,`#020303`]},components:{Button:bG.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`,fontSize:`0.8125rem`}}}),ActionIcon:oH.extend({styles:{root:{border:`1px solid currentColor`}}}),Paper:lV.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:EG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:cZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`,fontFamily:`inherit`}}}),Badge:cG.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`}}})}},PZ=ak({name:`alepha.ui.themeList`,schema:G.array(G.json()),default:[sj,kZ,MZ,NZ,OZ,jZ,AZ]}),FZ=class e{alepha=D(ck);cookie=ZA({name:`theme`,schema:aj.schema,ttl:[1,`year`]});overridesCookie=ZA({name:`themeOverrides`,schema:oj.schema,ttl:[1,`year`]});head=KA(()=>{let e=this.getTheme();return!e||!e.name?{}:{htmlAttributes:{"data-theme":this.slugify(e.name)},...e.head}});setTheme(e){if(!this.alepha.store.get(PZ)[e])throw new p(`Theme with index ${e} not found`);this.cookie.set({index:e}),this.alepha.store.set(aj,{index:e}),this.alepha.isBrowser()&&this.alepha.inject(JA).refreshGlobalHead()}slugify(e){return e.toLowerCase().replace(/\s+/g,`-`)}static FONT_SIZE_MULTIPLIERS={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static SCALE_VALUES={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static DEFAULT_FONT_SIZES={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`};getTheme(){let t=this.getThemeIndex(),n=this.alepha.store.get(PZ),r=n[t]||n[0]||sj,i=this.getThemeOverrides();if(!i.primaryColor&&!i.radius&&!i.fontFamily&&!i.fontSize&&!i.scale)return r;let a={...r,...i.primaryColor&&{primaryColor:i.primaryColor},...i.radius&&{defaultRadius:i.radius},...i.fontFamily&&{fontFamily:i.fontFamily},...i.scale&&i.scale!==`md`&&{scale:e.SCALE_VALUES[i.scale]??1}};if(i.fontSize&&i.fontSize!==`md`){let t=e.FONT_SIZE_MULTIPLIERS[i.fontSize]??1,n=r.fontSizes??e.DEFAULT_FONT_SIZES;a.fontSizes=Object.fromEntries(Object.entries(n).map(([e,n])=>[e,`${(Number.parseFloat(String(n))*t).toFixed(4)}rem`]))}return a}setThemeOverrides(e){this.overridesCookie.set(e),this.alepha.store.set(oj,e),this.alepha.isBrowser()&&this.alepha.inject(JA).refreshGlobalHead()}getThemeOverrides(){try{return this.overridesCookie.get()??this.alepha.store.get(oj)??{}}catch{return this.alepha.store.get(oj)??{}}}resetThemeOverrides(){this.setThemeOverrides({})}getThemeIndex(){try{return this.cookie.get()?.index??this.alepha.store.get(aj)?.index??0}catch{return this.alepha.store.get(aj)?.index??0}}},IZ=(0,K.createContext)(null);IZ.displayName=`@mantine/modals/ModalsContext`;function LZ(){let e=(0,K.useContext)(IZ);if(!e)throw Error(`[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component`);return e}function RZ({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:``,confirm:``},closeOnConfirm:i=!0,closeOnCancel:a=!0,groupProps:o,onCancel:s,onConfirm:c,children:l}){let{cancel:u,confirm:d}=r,f=LZ(),p=n=>{typeof t?.onClick==`function`&&t?.onClick(n),typeof s==`function`&&s(),a&&f.closeModal(e)},m=t=>{typeof n?.onClick==`function`&&n?.onClick(t),typeof c==`function`&&c(),i&&f.closeModal(e)};return(0,q.jsxs)(q.Fragment,{children:[l&&(0,q.jsx)(Q,{mb:`md`,children:l}),(0,q.jsxs)(gH,{mt:l?0:`md`,justify:`flex-end`,...o,children:[(0,q.jsx)(bG,{variant:`default`,...t,onClick:p,children:t?.children||u}),(0,q.jsx)(bG,{...n,onClick:m,children:n?.children||d})]})]})}var[zZ,BZ]=oP(`mantine-modals`),VZ={open:e=>{let t=e.modalId||QM();return BZ(`openModal`)({...e,modalId:t}),t},close:BZ(`closeModal`),closeAll:BZ(`closeAllModals`),openConfirmModal:e=>{let t=e.modalId||QM();return BZ(`openConfirmModal`)({...e,modalId:t}),t},openContextModal:e=>{let t=e.modalId||QM();return BZ(`openContextModal`)({...e,modalId:t}),t},updateModal:e=>BZ(`updateModal`)(e),updateContextModal:e=>BZ(`updateContextModal`)(e)};function HZ(e,t){t&&e.type===`confirm`&&e.props.onCancel?.(),e.props.onClose?.()}function UZ(e,t){switch(t.type){case`OPEN`:return{current:t.modal,modals:[...e.modals,t.modal]};case`CLOSE`:{if(!e.modals.find(e=>e.id===t.modalId))return e;let n=e.modals.filter(e=>e.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case`CLOSE_ALL`:return e.modals.length?{current:e.current,modals:[]}:e;case`UPDATE`:{let{modalId:n,newProps:r}=t,i=e.modals.map(e=>e.id===n?e.type===`content`||e.type===`confirm`?{...e,props:{...e.props,...r}}:e.type===`context`?{...e,props:{...e.props,...r,innerProps:{...e.props.innerProps,...r.innerProps}}}:e:e),a=e.current?.id===n&&i.find(e=>e.id===n)||e.current;return{...e,modals:i,current:a}}default:return e}}function WZ(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u,...d}=e;return{confirmProps:{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u},modalProps:{id:t,...d}}}function GZ({children:e,modalProps:t,labels:n,modals:r}){let[i,a]=(0,K.useReducer)(UZ,{modals:[],current:null}),o=(0,K.useRef)(i);o.current=i;let s=(0,K.useCallback)(e=>{o.current.modals.concat().reverse().forEach(t=>{HZ(t,e)}),a({type:`CLOSE_ALL`,canceled:e})},[o,a]),c=(0,K.useCallback)(({modalId:e,...t})=>{let n=e||QM();return a({type:`OPEN`,modal:{id:n,type:`content`,props:t}}),n},[a]),l=(0,K.useCallback)(({modalId:e,...t})=>{let n=e||QM();return a({type:`OPEN`,modal:{id:n,type:`confirm`,props:t}}),n},[a]),u=(0,K.useCallback)((e,{modalId:t,...n})=>{let r=t||QM();return a({type:`OPEN`,modal:{id:r,type:`context`,props:n,ctx:e}}),r},[a]),d=(0,K.useCallback)((e,t)=>{let n=o.current.modals.find(t=>t.id===e);n&&HZ(n,t),a({type:`CLOSE`,modalId:e,canceled:t})},[o,a]),f=(0,K.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]),p=(0,K.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]);zZ({openModal:c,openConfirmModal:l,openContextModal:({modal:e,...t})=>u(e,t),closeModal:d,closeContextModal:d,closeAllModals:s,updateModal:f,updateContextModal:p});let m={modalProps:t||{},modals:i.modals,openModal:c,openConfirmModal:l,openContextModal:u,closeModal:d,closeContextModal:d,closeAll:s,updateModal:f,updateContextModal:p},{modalProps:h,content:g}=(()=>{let e=o.current.current;switch(e?.type){case`context`:{let{innerProps:t,...n}=e.props,i=r[e.ctx];return{modalProps:n,content:(0,q.jsx)(i,{innerProps:t,context:m,id:e.id})}}case`confirm`:{let{modalProps:t,confirmProps:r}=WZ(e.props);return{modalProps:t,content:(0,q.jsx)(RZ,{...r,id:e.id,labels:e.props.labels||n})}}case`content`:{let{children:t,...n}=e.props;return{modalProps:n,content:t}}default:return{modalProps:{},content:null}}})();return(0,q.jsxs)(IZ.Provider,{value:m,children:[(0,q.jsx)(dJ,{zIndex:LM(`modal`)+1,...t,...h,opened:i.modals.length>0,onClose:()=>d(i.current?.id),children:g}),e]})}var KZ=({options:e,onClose:t})=>(0,q.jsxs)(q.Fragment,{children:[e?.message&&(0,q.jsx)(bU,{mb:`md`,children:e.message}),(0,q.jsx)(cU,{justify:`flex-end`,children:(0,q.jsx)(bG,{onClick:t,children:e?.okLabel||`OK`})})]}),qZ=({options:e,onConfirm:t})=>(0,q.jsxs)(q.Fragment,{children:[e?.message&&(0,q.jsx)(bU,{mb:`md`,children:e.message}),(0,q.jsxs)(cU,{justify:`flex-end`,children:[(0,q.jsx)(bG,{variant:`subtle`,onClick:()=>t(!1),children:e?.cancelLabel||`Cancel`}),(0,q.jsx)(bG,{color:e?.confirmColor||`blue`,onClick:()=>t(!0),children:e?.confirmLabel||`Confirm`})]})]}),JZ=({options:e,onSubmit:t})=>{let[n,r]=(0,K.useState)(e?.defaultValue||``),i=(0,K.useRef)(null);(0,K.useEffect)(()=>{i.current?.focus()},[]);let a=()=>{(!e?.required||n.trim())&&t(n)};return(0,q.jsxs)(q.Fragment,{children:[e?.message&&(0,q.jsx)(bU,{mb:`md`,children:e.message}),(0,q.jsx)(cZ,{ref:i,label:e?.label,placeholder:e?.placeholder,value:n,onChange:e=>r(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&a()},required:e?.required,mb:`md`}),(0,q.jsxs)(cU,{justify:`flex-end`,gap:`xs`,children:[(0,q.jsx)(bG,{variant:`subtle`,onClick:()=>t(null),children:e?.cancelLabel||`Cancel`}),(0,q.jsx)(bG,{onClick:a,disabled:e?.required&&!n.trim(),children:e?.submitLabel||`OK`})]})]})},YZ=class{options={default:{centered:!0,withCloseButton:!0,size:`md`,overlayProps:{backgroundOpacity:.55,blur:3},transitionProps:{transition:`pop`,duration:200}}};alert(e){return new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())},i=this.open({...e,title:e?.title||`Alert`,onClose:r,content:(0,q.jsx)(KZ,{options:e,onClose:()=>{this.close(i),r()}})})})}confirm(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Confirm`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(!1),content:(0,q.jsx)(qZ,{options:e,onConfirm:e=>{r(e),this.close(i)}})})})}prompt(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Input`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(null),content:(0,q.jsx)(JZ,{options:e,onSubmit:e=>{r(e),this.close(i)}})})})}open(e){return VZ.open({...this.options.default,...e,children:e?.content||e?.message})}close(e){e?VZ.close(e):VZ.closeAll()}};function XZ(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function ZZ(e){return(0,K.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function QZ(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var $Z=XZ({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),eQ=(e=$Z)=>ZZ(e);function tQ(e,t){let n=e.getState(),r=QZ(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function nQ(e,t=$Z){let n=e.id||QM();return tQ(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function rQ(e,t=$Z){return tQ(t,t=>t.filter(t=>t.id===e?(t.onClose?.(t),!1):!0)),e}function iQ(e,t=$Z){return tQ(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function aQ(e=$Z){tQ(e,()=>[])}function oQ(e=$Z){tQ(e,t=>t.slice(0,e.getState().limit))}var sQ={show:nQ,hide:rQ,update:iQ,clean:aQ,cleanQueue:oQ,updateState:tQ};function cQ(e,t){return cQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cQ(e,t)}function lQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cQ(e,t)}var uQ={disabled:!1},dQ=K.createContext(null),fQ=function(e){return e.scrollTop},pQ=`unmounted`,mQ=`exited`,hQ=`entering`,gQ=`entered`,_Q=`exiting`,vQ=function(e){lQ(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=mQ,r.appearStatus=hQ):o=gQ:o=t.unmountOnExit||t.mountOnEnter?pQ:mQ,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:mQ}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=hQ):(n===`entering`||n===`entered`)&&(t=_Q)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:hz.default.findDOMNode(this);n&&fQ(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:pQ})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[hz.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||uQ.disabled){this.safeSetState({status:gQ},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:hQ},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:gQ},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:hz.default.findDOMNode(this);if(!t||uQ.disabled){this.safeSetState({status:mQ},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:_Q},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:mQ},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:hz.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=aq(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return K.createElement(dQ.Provider,{value:null},typeof n==`function`?n(e,r):K.cloneElement(K.Children.only(n),r))},t}(K.Component);vQ.contextType=dQ,vQ.propTypes={};function yQ(){}vQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yQ,onEntering:yQ,onEntered:yQ,onExit:yQ,onExiting:yQ,onExited:yQ},vQ.UNMOUNTED=pQ,vQ.EXITED=mQ,vQ.ENTERING=hQ,vQ.ENTERED=gQ,vQ.EXITING=_Q;function bQ(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function xQ(e,t){var n=function(e){return t&&(0,K.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&K.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function SQ(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function CQ(e,t,n){return n[t]==null?e.props[t]:n[t]}function wQ(e,t){return xQ(e.children,function(n){return(0,K.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:CQ(n,`appear`,e),enter:CQ(n,`enter`,e),exit:CQ(n,`exit`,e)})})}function TQ(e,t,n){var r=xQ(e.children),i=SQ(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,K.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,K.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,K.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:CQ(o,`exit`,e),enter:CQ(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,K.cloneElement)(o,{in:!1}):c&&s&&(0,K.isValidElement)(l)&&(i[a]=(0,K.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:CQ(o,`exit`,e),enter:CQ(o,`enter`,e)}))}}),i}var EQ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},DQ={component:`div`,childFactory:function(e){return e}},OQ=function(e){lQ(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(bQ(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?wQ(e,r):TQ(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=xQ(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=iq({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=aq(e,[`component`,`childFactory`]),i=this.state.contextValue,a=EQ(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?K.createElement(dQ.Provider,{value:i},a):K.createElement(dQ.Provider,{value:i},K.createElement(t,r,a))},t}(K.Component);OQ.propTypes={},OQ.defaultProps=DQ;var kQ=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function AQ(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),kQ.reduce((e,t)=>(e[t]=[],e),{}))}var jQ={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},MQ={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function NQ({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:jQ[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:MQ[o]},l={opacity:0,maxHeight:0,transform:jQ[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function PQ(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var FQ=(0,K.forwardRef)(({data:e,onHide:t,autoClose:n,...r},i)=>{let{autoClose:a,message:o,...s}=e,c=PQ(n,e.autoClose),l=(0,K.useRef)(-1),u=()=>window.clearTimeout(l.current),d=()=>{t(e.id),u()},f=()=>{typeof c==`number`&&(l.current=window.setTimeout(d,c))};return(0,K.useEffect)(()=>{e.onOpen?.(e)},[]),(0,K.useEffect)(()=>(f(),u),[c]),(0,q.jsx)(PJ,{...r,...s,onClose:d,ref:i,onMouseEnter:u,onMouseLeave:f,children:o})});FQ.displayName=`@mantine/notifications/NotificationContainer`;var IQ={root:`m_b37d9ac7`,notification:`m_5ed0edd0`},LQ=vQ,RQ={position:`bottom-right`,autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:LM(`overlay`),store:$Z,withinPortal:!0},zQ=hP((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":Y(n)}})),BQ=$((e,t)=>{let n=Z(`Notifications`,RQ,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,position:l,autoClose:u,transitionDuration:d,containerWidth:f,notificationMaxHeight:p,limit:m,zIndex:h,store:g,portalProps:_,withinPortal:v,...y}=n,b=sF(),x=eQ(g),S=SN(),C=NN(),w=(0,K.useRef)({}),T=(0,K.useRef)(0),E=b.respectReducedMotion&&C?1:d,D=X({name:`Notifications`,classes:IQ,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,vars:c,varsResolver:zQ});(0,K.useEffect)(()=>{g?.updateState(e=>({...e,limit:m||5,defaultPosition:l}))},[m,l]),lN(()=>{x.notifications.length>T.current&&setTimeout(()=>S(),0),T.current=x.notifications.length},[x.notifications]);let O=AQ(x.notifications,l),k=kQ.reduce((e,t)=>(e[t]=O[t].map(({style:e,...n})=>(0,q.jsx)(LQ,{timeout:E,onEnter:()=>w.current[n.id].offsetHeight,nodeRef:{current:w.current[n.id]},children:r=>(0,q.jsx)(FQ,{ref:e=>{e&&(w.current[n.id]=e)},data:n,onHide:e=>rQ(e,g),autoClose:u,...D(`notification`,{style:{...NQ({state:r,position:t,transitionDuration:E,maxHeight:p}),...e}})})},n.id)),e),{});return(0,q.jsxs)(wV,{withinPortal:v,..._,children:[(0,q.jsx)(Q,{...D(`root`),"data-position":`top-center`,ref:t,...y,children:(0,q.jsx)(OQ,{children:k[`top-center`]})}),(0,q.jsx)(Q,{...D(`root`),"data-position":`top-left`,...y,children:(0,q.jsx)(OQ,{children:k[`top-left`]})}),(0,q.jsx)(Q,{...D(`root`,{className:gM.classNames.fullWidth}),"data-position":`top-right`,...y,children:(0,q.jsx)(OQ,{children:k[`top-right`]})}),(0,q.jsx)(Q,{...D(`root`,{className:gM.classNames.fullWidth}),"data-position":`bottom-right`,...y,children:(0,q.jsx)(OQ,{children:k[`bottom-right`]})}),(0,q.jsx)(Q,{...D(`root`),"data-position":`bottom-left`,...y,children:(0,q.jsx)(OQ,{children:k[`bottom-left`]})}),(0,q.jsx)(Q,{...D(`root`),"data-position":`bottom-center`,...y,children:(0,q.jsx)(OQ,{children:k[`bottom-center`]})})]})});BQ.classes=IQ,BQ.displayName=`@mantine/notifications/Notifications`,BQ.show=sQ.show,BQ.hide=sQ.hide,BQ.update=sQ.update,BQ.clean=sQ.clean,BQ.cleanQueue=sQ.cleanQueue,BQ.updateState=sQ.updateState;var VQ={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},HQ=(e,t,n,r)=>{let i=(0,K.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,K.createElement)(`svg`,{ref:u,...VQ[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,K.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,K.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},UQ=HQ(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),WQ=HQ(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),GQ=HQ(`outline`,`at`,`At`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28`,key:`svg-1`}]]),KQ=HQ(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),qQ=HQ(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),JQ=HQ(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),YQ=HQ(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),XQ=HQ(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),ZQ=HQ(`outline`,`color-picker`,`ColorPicker`,[[`path`,{d:`M11 7l6 6`,key:`svg-0`}],[`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4`,key:`svg-1`}]]),QQ=HQ(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),$Q=HQ(`outline`,`file`,`File`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}]]),e$=HQ(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),t$=HQ(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),n$=HQ(`outline`,`hash`,`Hash`,[[`path`,{d:`M5 9l14 0`,key:`svg-0`}],[`path`,{d:`M5 15l14 0`,key:`svg-1`}],[`path`,{d:`M11 4l-4 16`,key:`svg-2`}],[`path`,{d:`M17 4l-4 16`,key:`svg-3`}]]),r$=HQ(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),i$=HQ(`outline`,`info-triangle`,`InfoTriangle`,[[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),a$=HQ(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),o$=HQ(`outline`,`language`,`Language`,[[`path`,{d:`M9 6.371c0 4.418 -2.239 6.629 -5 6.629`,key:`svg-0`}],[`path`,{d:`M4 6.371h7`,key:`svg-1`}],[`path`,{d:`M5 9c0 2.144 2.252 3.908 6 4`,key:`svg-2`}],[`path`,{d:`M12 20l4 -9l4 9`,key:`svg-3`}],[`path`,{d:`M19.1 18h-6.2`,key:`svg-4`}],[`path`,{d:`M6.694 3l.793 .582`,key:`svg-5`}]]),s$=HQ(`outline`,`layout-sidebar-left-collapse`,`LayoutSidebarLeftCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4v16`,key:`svg-1`}],[`path`,{d:`M15 10l-2 2l2 2`,key:`svg-2`}]]),c$=HQ(`outline`,`layout-sidebar-right-collapse`,`LayoutSidebarRightCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M9 10l2 2l-2 2`,key:`svg-2`}]]),l$=HQ(`outline`,`letter-case`,`LetterCase`,[[`path`,{d:`M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0`,key:`svg-0`}],[`path`,{d:`M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5`,key:`svg-1`}],[`path`,{d:`M3 13h7`,key:`svg-2`}],[`path`,{d:`M21 12v7`,key:`svg-3`}]]),u$=HQ(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),d$=HQ(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),f$=HQ(`outline`,`mail`,`Mail`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M3 7l9 6l9 -6`,key:`svg-1`}]]),p$=HQ(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),m$=HQ(`outline`,`palette`,`Palette`,[[`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`,key:`svg-0`}],[`path`,{d:`M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}]]),h$=HQ(`outline`,`phone`,`Phone`,[[`path`,{d:`M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2`,key:`svg-0`}]]),g$=HQ(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),_$=HQ(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),v$=HQ(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),y$=HQ(`outline`,`square-rounded`,`SquareRounded`,[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9c0 7.2 -1.8 9 -9 9c-7.2 0 -9 -1.8 -9 -9c0 -7.2 1.8 -9 9 -9`,key:`svg-0`}]]),b$=HQ(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),x$=HQ(`outline`,`toggle-left`,`ToggleLeft`,[[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),S$=HQ(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),C$=HQ(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),w$=class{raw=sQ;options={default:{radius:`md`,withBorder:!0,withCloseButton:!0,autoClose:5e3,position:`top-center`}};show(e){sQ.show({...this.options.default,...e})}info(e){typeof e==`string`&&(e={message:e}),this.show({color:`blue`,icon:(0,q.jsx)(r$,{size:20}),title:`Info`,message:`Information notification`,...e})}success(e){typeof e==`string`&&(e={message:e}),this.show({color:`green`,icon:(0,q.jsx)(qQ,{size:16}),title:`Success`,message:`Operation completed successfully`,...e})}warning(e){typeof e==`string`&&(e={message:e}),this.show({color:`yellow`,icon:(0,q.jsx)(UQ,{size:20}),title:`Warning`,message:`Please review this warning`,...e})}danger(e){typeof e==`string`&&(e={message:e}),this.show({color:`red`,icon:(0,q.jsx)(C$,{size:20}),title:`Error`,message:`An error occurred`,...e})}},T$=class{fetch(e,t={}){throw new p(`Fetch is not available for this environment.`)}render(e,t={}){throw new p(`Render is not available for this environment.`)}},E$=e=>x(D$,e),D$=class extends b{reactPageService=D(T$);onInit(){this.options.static&&(this.options.use??=[],this.options.use.some(e=>e[f]?.name===`$cache`)||this.options.use.push(gA({name:`page:${this.name}`,provider:`memory`,ttl:[1,`week`]})))}get name(){return this.options.name??this.config.propertyKey}async render(e){return this.reactPageService.render(this.name,e)}async fetch(e){return this.reactPageService.fetch(this.options.path||``,e)}};E$[u]=D$;var O$=class{routePathRegex=/^\/[A-Za-z0-9._~!$&%'()*+,;=:@{}?/-]*$/;tree={children:{}};cache=new Map;match(e){if(this.cache.has(e))return this.cache.get(e);let t=this.mapParams(this.createRouteMatch(e));return this.cache.set(e,t),t}test(e){if(!this.routePathRegex.test(e))throw new p(`Route '${e}' is not valid`)}push(e){let t=e.path.replaceAll(`//`,`/`);this.test(t);let n=this.createParts(t),r=this.tree;for(let i=0;i<n.length;i++){let a=i===n.length-1,o=n[i].toLowerCase();if(o===`*`&&a){r.wildcard={route:e};break}if(o.includes(`*`))throw new p(`Route '${t}' has an invalid wildcard syntax`);if(o.includes(`{`)||o.includes(`}`))if(o.startsWith(`{`)&&o.endsWith(`}`))o=`:${o.slice(1,-1)}`;else throw new p(`Route '${t}' has an invalid param syntax`);if(o.startsWith(`:`)){let o=n[i].slice(1).replaceAll(`}`,``);if(!o)throw new p(`Route '${t}' has an empty param name`);r.param?r.param.name!==o&&(e.mapParams??={},e.mapParams[r.param.name]=o):r.param={name:o,children:{}},a&&(r.param.route=e),r=r.param;continue}r.children[o]||(r.children[o]={children:{}}),a&&(r.children[o].route=e),r=r.children[o]}}createRouteMatch(e){if(e[0]!==`/`)throw new p(`Path '${e}' must start with "/"`);let t=this.createParts(e),n=this.tree,r,i={};for(let e=0;e<t.length;e++){let a=t[e].toLowerCase();if(n.children[a])n.wildcard&&(r=n.wildcard),n=n.children[a];else if(n.param)n.wildcard&&(r=n.wildcard),i[n.param.name]=t[e],n=n.param;else if(n.wildcard)return i[`*`]=t.slice(e).join(`/`),{route:n.wildcard.route,params:i};else return{route:r?.route,params:i}}return n?.route?{route:n.route,params:i}:n.wildcard?{route:n.wildcard.route,params:i}:{route:r?.route,params:i}}mapParams(e){if(e.route?.mapParams&&e.params)for(let[t,n]of Object.entries(e.route.mapParams))e.params[t]&&(e.params[n]=e.params[t],delete e.params[t]);return e}createParts(e){let t=e.split(`?`)[0].replaceAll(`//`,`/`);return t.endsWith(`/`)&&t.length>1&&(t=t.slice(0,-1)),t.split(`/`).slice(1)}},k$=e=>(0,q.jsxs)(`div`,{style:{width:`100%`,minHeight:`90vh`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,fontFamily:`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,padding:`2rem`,...e.style},children:[(0,q.jsx)(`div`,{style:{fontSize:`6rem`,fontWeight:200,lineHeight:1},children:`404`}),(0,q.jsx)(`div`,{style:{fontSize:`0.875rem`,marginTop:`1rem`,opacity:.6},children:`Page not found`})]}),A$=class extends p{redirect;constructor(e){super(`Redirection`),this.redirect=e}},j$=()=>{let[e]=IA(`alepha.react.router.state`);if(!e)throw new p(`Missing react router state`);return e},M$=`ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace`,N$=e=>e.alepha.isProduction()?(0,q.jsx)(I$,{error:e.error}):(0,q.jsx)(P$,{...e}),P$=e=>{let[t,n]=(0,K.useState)(!1),r=j$().url.pathname,i=()=>{let t=R$(e.error);typeof navigator<`u`&&navigator.clipboard&&(navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3))},a=z$(e.error);return(0,q.jsx)(`div`,{style:B$.overlay,children:(0,q.jsxs)(`div`,{style:B$.card,children:[(0,q.jsxs)(`div`,{style:B$.header,children:[(0,q.jsxs)(`div`,{style:B$.headerLeft,children:[(0,q.jsx)(`div`,{style:B$.icon,children:`!`}),(0,q.jsx)(`div`,{style:B$.title,children:e.error.name||`Error`})]}),(0,q.jsxs)(`div`,{style:B$.headerRight,children:[e.onRetry&&(0,q.jsx)(`button`,{type:`button`,style:B$.retryBtn,onClick:e.onRetry,children:`Retry`}),(0,q.jsx)(`button`,{type:`button`,style:B$.copyBtn,onClick:i,children:t?`Copied`:`Copy`})]})]}),(0,q.jsx)(F$,{error:e.error}),(0,q.jsxs)(`div`,{style:B$.meta,children:[r&&(0,q.jsx)(`span`,{style:B$.metaItem,children:r}),(0,q.jsx)(`span`,{style:B$.metaItem,children:new Date().toLocaleTimeString()}),a&&(0,q.jsx)(`span`,{style:B$.statusBadge,children:a})]})]})})},F$=e=>{let{error:t,depth:n=0}=e;return(0,q.jsxs)(q.Fragment,{children:[n>0&&(0,q.jsx)(`div`,{style:B$.causedBy,children:`Caused by:`}),(0,q.jsxs)(`pre`,{style:B$.messageBlock,children:[t.name,`: `,t.message]}),t.stack&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{style:B$.stackLabel,children:`STACK TRACE`}),(0,q.jsx)(`pre`,{style:B$.stackBlock,children:L$(t.stack)})]}),t.cause instanceof Error&&(0,q.jsx)(F$,{error:t.cause,depth:n+1})]})},I$=e=>{let t=e.error.requestId;return(0,q.jsx)(`div`,{style:V$.page,children:(0,q.jsxs)(`div`,{style:V$.card,children:[(0,q.jsx)(`div`,{style:V$.heading,children:`Something went wrong`}),(0,q.jsx)(`div`,{style:V$.subtitle,children:`We're having trouble processing your request.`}),t&&(0,q.jsxs)(`div`,{style:V$.refText,children:[`Reference: `,t]}),(0,q.jsxs)(`div`,{style:V$.actions,children:[(0,q.jsx)(`button`,{type:`button`,style:V$.reloadBtn,onClick:()=>{typeof window<`u`&&window.location.reload()},children:`Reload page`}),(0,q.jsx)(`a`,{href:`/`,style:V$.homeLink,children:`Go home`})]})]})})};function L$(e){return e.split(`
73
- `).slice(1).map(e=>e.trim()).join(`
74
- `)}function R$(e){let t=[],n=(e,r)=>{r>0&&t.push(`
75
- Caused by:`),t.push(`${e.name}: ${e.message}`),e.stack&&t.push(L$(e.stack)),e.cause instanceof Error&&n(e.cause,r+1)};return n(e,0),t.join(`
76
- `)}function z$(e){if(`status`in e&&typeof e.status==`number`)return e.status}var B$={overlay:{position:`fixed`,inset:0,zIndex:2147483647,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`24px`,backgroundColor:`rgba(0, 0, 0, 0.75)`,backdropFilter:`blur(4px)`,fontFamily:M$,fontSize:`13px`,color:`#e5e7eb`,boxSizing:`border-box`,overflow:`auto`},card:{width:`100%`,maxWidth:`900px`,maxHeight:`90vh`,overflow:`auto`,padding:`24px`,backgroundColor:`#111`,borderLeft:`4px solid #ef4444`,borderRadius:`8px`,boxShadow:`0 25px 50px rgba(0, 0, 0, 0.5)`},header:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`20px`,flexWrap:`wrap`,gap:`12px`},headerLeft:{display:`flex`,alignItems:`center`,gap:`12px`,minWidth:0},headerRight:{display:`flex`,gap:`8px`,flexShrink:0},icon:{width:`28px`,height:`28px`,borderRadius:`50%`,backgroundColor:`#ef4444`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:`16px`,flexShrink:0},title:{color:`#f87171`,fontSize:`18px`,fontWeight:700},retryBtn:{padding:`6px 16px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`6px`,cursor:`pointer`,fontFamily:M$,fontSize:`12px`,fontWeight:600},copyBtn:{padding:`6px 16px`,backgroundColor:`transparent`,color:`#9ca3af`,border:`1px solid #374151`,borderRadius:`6px`,cursor:`pointer`,fontFamily:M$,fontSize:`12px`,fontWeight:600},messageBlock:{margin:`0 0 12px`,padding:`12px`,backgroundColor:`#1f2937`,borderRadius:`6px`,color:`#f9fafb`,fontSize:`13px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflow:`auto`},stackLabel:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`6px`,fontWeight:600},stackBlock:{margin:`0 0 20px`,padding:`12px`,backgroundColor:`#0f172a`,borderRadius:`6px`,color:`#94a3b8`,fontSize:`12px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-all`,overflow:`auto`},causedBy:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`8px`,paddingTop:`12px`,borderTop:`1px solid #374151`,fontWeight:600},meta:{display:`flex`,gap:`16px`,alignItems:`center`,paddingTop:`12px`,borderTop:`1px solid #1f2937`,flexWrap:`wrap`},metaItem:{fontSize:`11px`,color:`#6b7280`},statusBadge:{fontSize:`11px`,color:`#fbbf24`,backgroundColor:`#422006`,padding:`2px 8px`,borderRadius:`4px`,fontWeight:600}},V$={page:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#0f172a`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,padding:`24px`},card:{textAlign:`center`,maxWidth:`440px`},heading:{fontSize:`28px`,fontWeight:700,color:`#f1f5f9`,marginBottom:`12px`},subtitle:{fontSize:`16px`,color:`#94a3b8`,marginBottom:`24px`,lineHeight:1.5},refText:{fontSize:`13px`,color:`#64748b`,marginBottom:`24px`,fontFamily:M$},actions:{display:`flex`,gap:`12px`,justifyContent:`center`,alignItems:`center`},reloadBtn:{padding:`10px 24px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`8px`,cursor:`pointer`,fontSize:`14px`,fontWeight:600},homeLink:{padding:`10px 24px`,color:`#94a3b8`,textDecoration:`none`,fontSize:`14px`}},H$=(0,K.createContext)(void 0),U$=(0,K.memo)(e=>{let t=(0,K.use)(H$),n=t?.index??0,r=t?.onError,i=j$(),a=Yk(),[o,s]=(0,K.useState)(0),[c,l]=(0,K.useState)(i.layers[n]?.element),[u,d]=(0,K.useState)(``),f=(0,K.useRef)(0),p=(0,K.useRef)(0);FA({"react:transition:begin":async({previous:e,state:t})=>{let r=e.layers[n];if(!r||`${t.url.pathname}/`.startsWith(`${r.path}/`))return;let i=W$(r.route?.animation,t,`exit`);if(i){let e=i.duration||200;p.current=Date.now(),f.current=e,d(i.animation)}else p.current=0,f.current=0,d(``)},"react:transition:end":async({state:e})=>{let t=e.layers[n];if(p.current){let e=f.current,t=Date.now()-p.current;t<e&&await new Promise(n=>setTimeout(n,e-t))}if(!t?.cache){l(t?.element);let n=W$(t?.route?.animation,e,`enter`);d(n?n.animation:``)}}},[]);let m=c??e.children??null;return u&&(m=(0,q.jsx)(`div`,{style:{display:`flex`,flex:1,height:`100%`,width:`100%`,position:`relative`,overflow:`hidden`},children:(0,q.jsx)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,animation:u},children:m})})),e.errorBoundary===!1?(0,q.jsx)(q.Fragment,{children:m}):e.errorBoundary?(0,q.jsx)(Dk,{fallback:e.errorBoundary,children:m},o):(0,q.jsx)(Dk,{fallback:e=>{let t=r?.(e,i)??(0,q.jsx)(N$,{error:e,alepha:a});return t instanceof A$?`Redirection inside ErrorBoundary is not allowed.`:t},children:m},o)});function W$(e,t,n=`enter`){if(!e)return;let r=typeof e==`function`?e(t):e;if(typeof r==`string`)return n===`exit`?void 0:{duration:300,animation:`300ms ${r}`};if(typeof r==`object`){let e=r[n],t=typeof e==`object`?e.duration??300:300,i=typeof e==`object`?e.name:e;return{duration:t,animation:`${t}ms ${typeof e==`object`?e.timing??``:``} ${i}`}}}var G$=ak({name:`alepha.react.page.options`,description:`Configuration options for the React page provider.`,schema:G.object({strictMode:G.boolean({default:!0}),staticFilePattern:G.string()}),default:{strictMode:!0,staticFilePattern:`\\.[a-zA-Z0-9]{1,10}$`}}),K$=class{dateTimeProvider=D(Gk);log=aA();options=bk(G$);alepha=D(ck);pages=[];nextIdCursor=0;configure=j({on:`configure`,handler:()=>{let e=!1,t=this.alepha.primitives(E$),n=e=>{if(e.options.parent)return!0;for(let n of t)if((n.options.children?Array.isArray(n.options.children)?n.options.children:n.options.children():[]).includes(e))return!0};for(let r of t)r.options.path===`/*`&&(e=!0),!n(r)&&this.add(this.map(t,r));!e&&t.length>0&&this.add({path:`/*`,name:`notFound`,component:k$,onServerResponse:({reply:e})=>{e.status=404}})}});getPages(){return this.pages}getConcretePages(){let e=[];for(let t of this.pages){if(t.children&&t.children.length>0)continue;let n=this.pathname(t.name);if(n.includes(`:`)||n.includes(`*`)){if(typeof t.static==`object`){let n=t.static.entries;if(n&&n.length>0)for(let r of n){let n=r.params,i=this.compile(t.path??``,n);!i.includes(`:`)&&!i.includes(`*`)&&e.push({...t,name:n[Object.keys(n)[0]],staticName:t.name,path:i,...r})}}continue}e.push(t)}return e}page(e){for(let t of this.pages)if(t.name===e)return t;throw new p(`Page '${e}' not found`)}pathname(e,t={}){let n=this.page(e);if(!n)throw new p(`Page ${e} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;if(r=this.compile(r,t.params??{}),t.query){let e=new URLSearchParams(t.query);e.toString()&&(r+=`?${e.toString()}`)}return r.replace(/\/\/+/g,`/`)||`/`}url(e,t={}){return new URL(this.pathname(e,t),t.host??`http://localhost`)}root(e){let t=(0,K.createElement)(Ok.Provider,{value:this.alepha},(0,K.createElement)(U$,{},e.layers[0]?.element));return this.options.strictMode?(0,K.createElement)(K.StrictMode,{},t):t}convertStringObjectToObject=(e,t)=>{if(G.schema.isObject(e)&&typeof t==`object`){for(let n in e.properties)if(G.schema.isObject(e.properties[n])&&typeof t[n]==`string`)try{t[n]=this.alepha.codec.decode(e.properties[n],decodeURIComponent(t[n]))}catch{}}return t};async createLayers(e,t,n=[]){let r={},i=[{route:e}],a=e.parent;for(;a;)i.unshift({route:a}),a=a.parent;let o=!1;for(let e=0;e<i.length;e++){let a=i[e],s=a.route,c={};try{this.convertStringObjectToObject(s.schema?.query,t.query),c.query=s.schema?.query?this.alepha.codec.decode(s.schema.query,t.query):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}try{c.params=s.schema?.params?this.alepha.codec.decode(s.schema.params,t.params):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}if(a.config={...c},n?.[e]&&!o&&n[e].name===s.name){let t=e=>e?e.replace(/\/\/+/g,`/`):`/`;if(JSON.stringify({part:t(n[e].part),params:n[e].config?.params??{}})===JSON.stringify({part:t(s.path),params:c.params??{}})){a.props=n[e].props,a.error=n[e].error,a.cache=!0,r={...r,...a.props};continue}o=!0}if(s.redirect)return{redirect:s.redirect};if(s.loader)try{let e=Object.create(t);Object.assign(e,c,r);let n=await s.loader?.(e)??{};a.props={...n},r={...r,...n}}catch(e){if(e instanceof A$)return{redirect:e.redirect};this.log.error(`Page loader has failed`,e),a.error=e instanceof Error?e:Error(String(e));break}}let s=``;for(let e=0;e<i.length;e++){let n=i[e],a=n.props??{},o={...n.config?.params};for(let e of Object.keys(o))o[e]=String(o[e]);s+=`/`,s+=n.route.path?this.compile(n.route.path,o):``;let c=s.replace(/\/+/,`/`),l=this.getErrorHandler(n.route);if(l){let e=t.onError;t.onError=(t,n)=>{let r=l(t,n);return r===void 0?e(t,n):r}}if(!n.error)try{let i=await this.createElement(n.route,{...n.route.props?n.route.props():{},...a,...r},t.url);t.layers.push({name:n.route.name,props:a,part:n.route.path,config:n.config,element:this.renderView(e+1,c,i,n.route),index:e+1,path:c,route:n.route,cache:n.cache})}catch(e){n.error=e instanceof Error?e:Error(String(e))}if(n.error)try{let r=await t.onError(n.error,t);if(r===void 0)throw n.error;if(r instanceof A$)return{redirect:r.redirect};r===null&&(r=this.renderError(n.error)),t.layers.push({props:a,error:n.error,name:n.route.name,part:n.route.path,config:n.config,element:this.renderView(e+1,c,r,n.route),index:e+1,path:c,route:n.route,cache:n.cache});break}catch(e){if(e instanceof A$)return{redirect:e.redirect};throw e}}return{state:t}}getErrorHandler(e){if(e.errorHandler)return e.errorHandler;let t=e.parent;for(;t;){if(t.errorHandler)return t.errorHandler;t=t.parent}}async createElement(e,t,n){if(e.lazy&&e.component&&this.log.warn(`Page ${e.name} has both lazy and component options, lazy will be used`),e.lazy)try{return(0,K.createElement)((await e.lazy()).default,t)}catch(e){if(this.alepha.isBrowser()&&this.isChunkLoadError(e)&&this.reloadAfterChunkError(n))return;throw e}if(e.component)return(0,K.createElement)(e.component,t)}isChunkLoadError(e){if(!(e instanceof Error))return!1;let t=e.message;return/Failed to fetch dynamically imported module/.test(t)||/error loading dynamically imported module/i.test(t)||/Unable to preload CSS/.test(t)||/Importing a module script failed/.test(t)}reloadAfterChunkError(e){let t=`alepha:chunk-reload`,n=sessionStorage.getItem(t),r=this.dateTimeProvider.nowMillis();return n&&r-Number(n)<1e4?(this.log.error(`Chunk load failed after recent reload, not retrying to avoid loop`),!1):(this.log.warn(`Chunk load failed after deployment, reloading page`),sessionStorage.setItem(t,String(r)),window.location.assign(e?e.pathname+e.search:window.location.href),!0)}renderError(e){return(0,K.createElement)(N$,{error:e,alepha:this.alepha})}renderEmptyView(){return(0,K.createElement)(U$,{})}href(e,t={}){let n=this.pages.find(t=>t.name===e.options.name);if(!n)throw new p(`Page ${e.options.name} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;return r=this.compile(r,t),r.replace(/\/\/+/g,`/`)||`/`}compile(e,t={}){for(let[n,r]of Object.entries(t))e=e.replace(`:${n}`,r);return e}renderView(e,t,n,r){n??=this.renderEmptyView();let i=r.client?(0,K.createElement)(Ek,typeof r.client==`object`?r.client:{},n):n;return(0,K.createElement)(H$.Provider,{value:{index:e,path:t,onError:this.getErrorHandler(r)??(e=>this.renderError(e))}},i)}map(e,t){let n=t.options.children?Array.isArray(t.options.children)?t.options.children:t.options.children():[];return n.push(...(t=>{let n=[];for(let r of e)r.options.parent===t&&n.push(r);return n})(t)),{...t.options,name:t.name,parent:void 0,children:n.map(t=>this.map(e,t))}}add(e){if(this.alepha.isReady())throw new p(`Router is already initialized`);e.name??=this.nextId();let t=e;if(t.match=this.createMatch(t),this.pages.push(t),t.children)for(let e of t.children)e.parent=t,this.add(e)}createMatch(e){let t=e.path??`/`,n=e.parent;for(;n;)t=`${n.path??``}/${t}`,n=n.parent;let r=t.replace(/\/\/+/g,`/`);return r.endsWith(`/`)&&r!==`/`&&(r=r.slice(0,-1)),r}nextId(){return this.nextIdCursor+=1,`P${this.nextIdCursor}`}},q$=e=>e&&typeof e==`object`&&typeof e.path==`string`&&typeof e.page==`object`,J$=class extends O${log=aA();alepha=D(ck);pageApi=D(K$);browserHeadProvider=D(JA);add(e){this.pageApi.add(e)}configure=j({on:`configure`,handler:async()=>{for(let e of this.pageApi.getPages())(e.component||e.lazy||e.redirect)&&this.push({path:e.match,page:e})}});async transition(e,t=[],n={}){let{pathname:r,search:i}=e,a={url:e,query:{},params:{},layers:[],onError:()=>null,meta:n};await this.alepha.events.emit(`react:action:begin`,{type:`transition`}),await this.alepha.events.emit(`react:transition:begin`,{previous:this.alepha.store.get(`alepha.react.router.state`),state:a});try{let{route:e,params:n}=this.match(r),o={};if(i)for(let[e,t]of new URLSearchParams(i).entries())o[e]=String(t);if(e?.page.can&&!e.page.can())throw new TA(`Access denied to this page.`);if(a.name=e?.page.name,a.query=o,a.params=n??{},q$(e)){let{redirect:n}=await this.pageApi.createLayers(e.page,a,t);if(n)return n}a.layers.length===0&&a.layers.push({name:`not-found`,element:(0,K.createElement)(k$),index:0,path:`/`}),await this.alepha.events.emit(`react:action:success`,{type:`transition`}),await this.alepha.events.emit(`react:transition:success`,{state:a})}catch(e){this.log.error(`Transition has failed`,e);let t;try{let n=a.onError(e,a);n!=null&&!(n instanceof A$)&&(t=n)}catch{}a.layers=[{name:`error`,element:t??this.pageApi.renderError(e),index:0,path:`/`}],await this.alepha.events.emit(`react:action:error`,{type:`transition`,error:e}),await this.alepha.events.emit(`react:transition:error`,{error:e,state:a})}if(t)for(let e=0;e<t.length;e++){let n=t[e];a.layers[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onLeave?.()}for(let e=0;e<a.layers.length;e++){let n=a.layers[e];t?.[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onEnter?.()}this.alepha.store.set(`alepha.react.router.state`,a),await this.alepha.events.emit(`react:action:end`,{type:`transition`}),await this.alepha.events.emit(`react:transition:end`,{state:a}),this.browserHeadProvider.fillAndRenderHead(a)}root(e){return this.pageApi.root(e)}},Y$=ak({name:`alepha.react.browser.options`,schema:G.object({scrollRestoration:G.enum([`top`,`manual`])}),default:{scrollRestoration:`top`}}),X$=class{log=aA();client=D(AA);alepha=D(ck);router=D(J$);dateTimeProvider=D(Gk);browserHeadProvider=D(JA);options=bk(Y$);get rootId(){return`root`}getRootElement(){let e=this.document.getElementById(this.rootId);if(e)return e;let t=this.document.createElement(`div`);return t.id=this.rootId,this.document.body.prepend(t),t}transitioning;get state(){return this.alepha.store.get(`alepha.react.router.state`)}get document(){return window.document}get history(){return window.history}get location(){return window.location}get base(){let e=`/__devtools`;return e===`/`?``:e}get url(){let e=this.location.pathname+this.location.search;return this.base?e.replace(this.base,``):e}pushState(e,t){let n=this.base+e;t?this.history.replaceState({},``,n):this.history.pushState({},``,n)}async invalidate(e){let t=[];if(this.log.trace(`Invalidating layers`),e){let[n]=Object.keys(e),r=e[n];for(let e of this.state.layers){if(e.props?.[n]){t.push({...e,props:{...e.props,[n]:r}});break}t.push(e)}}await this.render({previous:t})}async push(e,t={}){if(this.log.trace(`Going to ${e}`,{url:e,options:t}),await this.render({url:e,previous:t.force?[]:this.state.layers,meta:t.meta}),this.state.url.pathname+this.state.url.search!==e){this.pushState(this.state.url.pathname+this.state.url.search);return}this.pushState(e,t.replace)}async render(e={}){let t=e.previous??this.state.layers,n=e.url??this.url,r=this.dateTimeProvider.now();this.transitioning={to:n,from:this.state?.url.pathname},this.log.debug(`Transitioning...`,{to:n});let i=await this.router.transition(new URL(`http://localhost${n}`),t,e.meta);if(i)if(this.log.info(`Redirecting to`,{redirect:i}),i.startsWith(`http`))window.location.href=i;else return await this.render({url:i});let a=this.dateTimeProvider.now().diff(r);this.log.info(`Transition OK [${a}ms]`,this.transitioning),this.transitioning=void 0}getHydrationState(){try{let e=this.document.getElementById(`__ssr`);if(e?.textContent)return JSON.parse(e.textContent)}catch(e){console.error(e)}}onTransitionEnd=j({on:`react:transition:end`,handler:()=>{this.options.scrollRestoration===`top`&&typeof window<`u`&&!this.alepha.isTest()&&(this.log.trace(`Restoring scroll position to top`),window.scrollTo(0,0))}});ready=j({on:`ready`,handler:async()=>{let e=this.getHydrationState(),t=e?.[`alepha.react.router.layers`]??[];if(e)for(let[t,n]of Object.entries(e))t!==`alepha.react.router.layers`&&this.alepha.set(t,n);await this.render({previous:t});let n=this.router.root(this.state);await this.alepha.events.emit(`react:browser:render`,{element:n,root:this.getRootElement(),hydration:e,state:this.state}),window.addEventListener(`popstate`,()=>{this.base+this.state.url.pathname!==this.location.pathname&&(this.log.debug(`Popstate event triggered - rendering new state`,{url:this.location.pathname+this.location.search}),this.render())})}})},Z$=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Q$=o(((e,t)=>{t.exports=Z$()})),$$=o((e=>{var t=Q$(),n=Tk(),r=LI();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function F(e){return{current:e}}function I(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function L(e,t){ne++,te[ne]=e.current,e.current=t}var re=F(null),ie=F(null),ae=F(null),oe=F(null);function se(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(re),L(re,e)}function ce(){I(re),I(ie),I(ae)}function le(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Jd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ue(e){ie.current===e&&(I(re),I(ie)),oe.current===e&&(I(oe),ip._currentValue=ee)}var R,de;function fe(e){if(R===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||``,de=-1<e.stack.indexOf(`
77
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
78
- `+R+e+de}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
79
- `),l=s.split(`
80
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
81
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?fe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return e.child!==t&&t!==null?fe(`Suspense Fallback`):fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return fe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
82
- Error generating stack: `+e.message+`
83
- `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,z=t.unstable_now,Se=t.unstable_getCurrentPriorityLevel,B=t.unstable_ImmediatePriority,V=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var H=256,Fe=262144,Ie=4194304;function Le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Re(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Be(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ve(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=P.p;return e===0?(e=window.event,e===void 0?32:bp(e.type)):e}function Ze(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_f(e);e!==null;){if(n=e[$e])return n;e=_f(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),vt={},yt={};function bt(e){return _e.call(yt,e)?!0:_e.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Wt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(Cu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,`passive`,{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=f({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=f({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(f({},bn,{dataTransfer:0})),Cn=fn(f({},hn,{relatedTarget:0})),wn=fn(f({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(f({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(f({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(f({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(f({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(f({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(f({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(f({},bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=fn(f({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=tn&&`CompositionEvent`in window,Bn=null;tn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=tn&&`TextEvent`in window&&!Bn,Hn=tn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),sn=on=an=null,qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=jd(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){Cd(e,0)}function nr(e){if(Ot(ut(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(tn){var ar;if(tn){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Jt(e)),$t(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!_e.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Sr=tn&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,Er=!1;function Dr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Er||Cr==null||Cr!==kt(r)||(r=Cr,`selectionStart`in r&&xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&gr(Tr,r)||(Tr=r,r=jd(wr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var kr={animationend:Or(`Animation`,`AnimationEnd`),animationiteration:Or(`Animation`,`AnimationIteration`),animationstart:Or(`Animation`,`AnimationStart`),transitionrun:Or(`Transition`,`TransitionRun`),transitionstart:Or(`Transition`,`TransitionStart`),transitioncancel:Or(`Transition`,`TransitionCancel`),transitionend:Or(`Transition`,`TransitionEnd`)},Ar={},jr={};tn&&(jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),`TransitionEvent`in window||delete kr.transitionend.transition);function Mr(e){if(Ar[e])return Ar[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jr)return Ar[e]=t[n];return e}var Nr=Mr(`animationend`),Pr=Mr(`animationiteration`),Fr=Mr(`animationstart`),Ir=Mr(`transitionrun`),Lr=Mr(`transitionstart`),Rr=Mr(`transitioncancel`),zr=Mr(`transitionend`),Br=new Map,Vr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Vr.push(`scrollEnd`);function Hr(e,t){Br.set(e,t),ht(t,[e])}var Ur=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Wr=[],Gr=0,Kr=0;function qr(){for(var e=Gr,t=Kr=Gr=0;t<e;){var n=Wr[t];Wr[t++]=null;var r=Wr[t];Wr[t++]=null;var i=Wr[t];Wr[t++]=null;var a=Wr[t];if(Wr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Zr(n,i,a)}}function Jr(e,t,n,r){Wr[Gr++]=e,Wr[Gr++]=t,Wr[Gr++]=n,Wr[Gr++]=r,Kr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Yr(e,t,n,r){return Jr(e,t,n,r),Qr(e)}function Xr(e,t){return Jr(e,null,null,t),Qr(e)}function Zr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Qr(e){if(50<mu)throw mu=0,hu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(e,t,n,r){return new ei(e,t,n,r)}function ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ri(e,t){var n=e.alternate;return n===null?(n=ti(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ii(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ai(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ni(e)&&(s=1);else if(typeof e==`string`)s=Yf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ti(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return oi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ti(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ti(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ti(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ti(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function oi(e,t,n,r){return e=ti(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ti(6,e,null,t),e.lanes=n,e}function ci(e){var t=ti(18,null,null,0);return t.stateNode=e,t}function li(e,t,n){return t=ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function di(e,t){if(typeof e==`object`&&e){var n=ui.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},ui.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var fi=[],pi=0,mi=null,hi=0,gi=[],_i=0,vi=null,yi=1,bi=``;function xi(e,t){fi[pi++]=hi,fi[pi++]=mi,mi=e,hi=t}function Si(e,t,n){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,vi=e;var r=yi;e=bi;var i=32-je(r)-1;r&=~(1<<i),n+=1;var a=32-je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,yi=1<<32-je(t)+i|n<<i|r,bi=a+e}else yi=1<<a|n<<i|r,bi=e}function Ci(e){e.return!==null&&(xi(e,1),Si(e,1,0))}function wi(e){for(;e===mi;)mi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null;for(;e===vi;)vi=gi[--_i],gi[_i]=null,bi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null}function Ti(e,t){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,yi=t.id,bi=t.overflow,vi=e}var Ei=null,Di=null,Oi=!1,ki=null,Ai=!1,ji=Error(i(519));function Mi(e){throw Ri(di(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ji}function Ni(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:wd(`cancel`,t),wd(`close`,t);break;case`iframe`:case`object`:case`embed`:wd(`load`,t);break;case`video`:case`audio`:for(n=0;n<xd.length;n++)wd(xd[n],t);break;case`source`:wd(`error`,t);break;case`img`:case`image`:case`link`:wd(`error`,t),wd(`load`,t);break;case`details`:wd(`toggle`,t);break;case`input`:wd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:wd(`invalid`,t);break;case`textarea`:wd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ld(t.textContent,n)?(r.popover!=null&&(wd(`beforetoggle`,t),wd(`toggle`,t)),r.onScroll!=null&&wd(`scroll`,t),r.onScrollEnd!=null&&wd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Mi(e,!0)}function Pi(e){for(Ei=e.return;Ei;)switch(Ei.tag){case 5:case 31:case 13:Ai=!1;return;case 27:case 3:Ai=!0;return;default:Ei=Ei.return}}function Fi(e){if(e!==Ei)return!1;if(!Oi)return Pi(e),Oi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Yd(e.type,e.memoizedProps)),n=!n),n&&Di&&Mi(e),Pi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=gf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=gf(e)}else t===27?(t=Di,rf(e.type)?(e=hf,hf=null,Di=e):Di=t):Di=Ei?mf(e.stateNode.nextSibling):null;return!0}function Ii(){Di=Ei=null,Oi=!1}function Li(){var e=ki;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),ki=null),e}function Ri(e){ki===null?ki=[e]:ki.push(e)}var zi=F(null),Bi=null,Vi=null;function Hi(e,t,n){L(zi,t._currentValue),t._currentValue=n}function Ui(e){e._currentValue=zi.current,I(zi)}function Wi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Gi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Wi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Wi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ki(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ip]:e.push(ip))}a=a.return}e!==null&&Gi(t,e,n,r),t.flags|=262144}function qi(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ji(e){Bi=e,Vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yi(e){return Zi(Bi,e)}function Xi(e,t){return Bi===null&&Ji(e),Zi(e,t)}function Zi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vi===null){if(e===null)throw Error(i(308));Vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vi=Vi.next=t;return n}var Qi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},$i=t.unstable_scheduleCallback,ea=t.unstable_NormalPriority,ta={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function na(){return{controller:new Qi,data:new Map,refCount:0}}function ra(e){e.refCount--,e.refCount===0&&$i(ea,function(){e.controller.abort()})}var ia=null,aa=0,oa=0,sa=null;function ca(e,t){if(ia===null){var n=ia=[];aa=0,oa=hd(),sa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return aa++,t.then(la,la),t}function la(){if(--aa===0&&ia!==null){sa!==null&&(sa.status=`fulfilled`);var e=ia;ia=null,oa=0,sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ua(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var da=N.S;N.S=function(e,t){ru=z(),typeof t==`object`&&t&&typeof t.then==`function`&&ca(e,t),da!==null&&da(e,t)};var fa=F(null);function pa(){var e=fa.current;return e===null?Rl.pooledCache:e}function ma(e,t){t===null?L(fa,fa.current):L(fa,t.pool)}function ha(){var e=pa();return e===null?null:{parent:ta._currentValue,pool:e}}var ga=Error(i(460)),_a=Error(i(474)),va=Error(i(542)),ya={then:function(){}};function ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ta(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ta(e),e}throw Ca=t,ga}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ca=e,ga):e}}var Ca=null;function wa(){if(Ca===null)throw Error(i(459));var e=Ca;return Ca=null,e}function Ta(e){if(e===ga||e===va)throw Error(i(483))}var Ea=null,Da=0;function Oa(e){var t=Da;return Da+=1,Ea===null&&(Ea=[]),xa(Ea,e,t)}function ka(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Aa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ri(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=si(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Sa(i)===t.type)?(t=a(t,n.props),ka(t,n),t.return=e,t):(t=ai(n.type,n.key,n.props,null,e.mode,r),ka(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=oi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ai(t.type,t.key,t.props,null,e.mode,n),ka(n,t),n.return=e,n;case h:return t=li(t,e.mode,n),t.return=e,t;case T:return t=Sa(t),f(e,t,n)}if(M(t)||k(t))return t=oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Oa(t),n);if(t.$$typeof===b)return f(e,Xi(e,t),n);Aa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Sa(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Oa(n),r);if(n.$$typeof===b)return p(e,t,Xi(e,n),r);Aa(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Sa(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Oa(r),i);if(r.$$typeof===b)return _(e,t,n,Xi(t,r),i);Aa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Oi&&xi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Oi&&xi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Oi&&xi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Oi&&xi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Oi&&xi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Oi&&xi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Sa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ka(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=oi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ai(o.type,o.key,o.props,null,e.mode,c),ka(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=li(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Sa(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Oa(o),c);if(o.$$typeof===b)return x(e,r,Xi(e,o),c);Aa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Da=0;var i=x(e,t,n,r);return Ea=null,i}catch(t){if(t===ga||t===va)throw t;var a=ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ma=ja(!0),Na=ja(!1),Pa=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Qr(e),Zr(e,null,n),t}return Jr(e,r,t,n),Qr(e)}function za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}function Ba(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Va=!1;function Ha(){if(Va){var e=sa;if(e!==null)throw e}}function Ua(e,t,n,r){Va=!1;var i=e.updateQueue;Pa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Bl&p)===p:(r&p)===p){p!==0&&p===oa&&(Va=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Pa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Wa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ga(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Wa(n[e],t)}var Ka=F(null),qa=F(0);function Ja(e,t){e=Kl,L(qa,e),L(Ka,t),Kl=e|t.baseLanes}function Ya(){L(qa,Kl),L(Ka,Ka.current)}function Xa(){Kl=qa.current,I(Ka),I(qa)}var Za=F(null),Qa=null;function $a(e){var t=e.alternate;L(io,io.current&1),L(Za,e),Qa===null&&(t===null||Ka.current!==null||t.memoizedState!==null)&&(Qa=e)}function eo(e){L(io,io.current),L(Za,e),Qa===null&&(Qa=e)}function to(e){e.tag===22?(L(io,io.current),L(Za,e),Qa===null&&(Qa=e)):no(e)}function no(){L(io,io.current),L(Za,Za.current)}function ro(e){I(Za),Qa===e&&(Qa=null),I(io)}var io=F(0);function ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||df(n)||ff(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oo=0,so=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return oo=a,so=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){N.H=Is;var t=co!==null&&co.next!==null;if(oo=0,lo=co=so=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&qi(e)&&(tc=!0))}function So(e,t,n,r){so=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=co=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(so.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}oo=0,lo=co=so=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?so.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=so.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?so.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw so.alternate===null?Error(i(467)):Error(i(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?so.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=xa(go,e,t),t=so,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===b)return Yi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=so.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=so.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),so.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),co,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(oo&f)===f:(Bl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===oa&&(d=!0);else if((oo&p)===p){u=u.next,p===oa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,so.lanes|=p,Jl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,so.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&(tc=!0,d&&(n=sa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);hr(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=so,a=Oo(),o=Oi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!hr((co||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||oo&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=so.updateQueue,t===null?(t=ko(),so.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function Ho(e){var t=Xr(e,2);t!==null&&vu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Ae(!0);try{n()}finally{Ae(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,co,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(Oi){var n=Rl.formState;if(n!==null){a:{var r=so;if(Oi){if(Di){b:{for(var i=Di,a=Ai;i.nodeType!==8;){if(!a){i=null;break b}if(i=mf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Di=mf(i.nextSibling),r=i.data===`F!`;break a}}Mi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,so,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,so,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,so,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),co,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===ga?va:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(so.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=co;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=so.updateQueue,t===null&&(t=ko(),so.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();so.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(so.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){so.flags|=4;var t=so.updateQueue;if(t===null)t=ko(),so.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||oo&1073741824&&!(Bl&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),so.lanes|=e,Jl|=e,n)}function ys(e,t,n,r){return hr(n,t)?n:Ka.current===null?!(oo&42)||oo&1073741824&&!(Bl&261930)?(tc=!0,e.memoizedState=n):(e=_u(),so.lanes|=e,Jl|=e,t):(e=vs(e,n,r),hr(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,Ms(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,ua(c,r),gu(e)):js(e,t,r,gu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,ee,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},gu())}function Ts(){return Yi(ip)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=La(n);var r=Ra(t,e,n);r!==null&&(vu(r,t,n),za(r,t,n)),t={cache:na()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Yr(e,t,n,r),n!==null&&(vu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,gu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,o))return Jr(e,t,i,0),Rl===null&&qr(),!1}catch{}if(n=Yr(e,t,i,r),n!==null)return vu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=Yr(e,n,r,2),t!==null&&vu(t,e,2)}function Ns(e){var t=e.alternate;return e===so||t!==null&&t===so}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Is={readContext:Yi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Yi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Yi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,so,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,so,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,so,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=so,a=Do();if(Oi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Bl&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(Oi){var n=bi,r=yi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,so,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,so)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Yi,use:jo,useCallback:gs,useContext:Yi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Yi,use:jo,useCallback:gs,useContext:Yi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return co===null?vs(n,e,t):ys(n,co.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=La(r);i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(vu(t,e,r),za(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=La(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(vu(t,e,r),za(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=La(n);r.tag=2,t!=null&&(r.callback=t),t=Ra(e,r,n),t!==null&&(vu(t,e,n),za(t,e,n))}};function Hs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(i,a):!0}function Us(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Ur(e)}function Ks(e){console.error(e)}function qs(e){Ur(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){return n=La(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=La(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ki(t,n,a,!0),n=Za.current,n!==null){switch(n.tag){case 31:case 13:return Qa===null?Au():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,a)),!1;case 22:return n.flags|=65536,r===ya?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Yu(e,r,a)),!1}throw Error(i(435,n.tag))}return Yu(e,r,a),Au(),!1}if(Oi)return t=Za.current,t===null?(r!==ji&&(t=Error(i(423),{cause:r}),Ri(di(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=di(r,n),a=Xs(e.stateNode,r,a),Ba(e,a),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ji&&(e=Error(i(422),{cause:r}),Ri(di(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=di(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Ba(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Ba(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Na(t,null,n,r):Ma(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ji(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(Oi&&s&&Ci(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ri(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ma(t,a===null?null:a.cachePool),a===null?Ya():Ja(t,a),to(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ma(t,null),Ya(),no(t)):(ma(t,a.cachePool),Ja(t,a),no(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=pa();return a=a===null?null:{parent:ta._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ma(t,null),Ya(),to(t),e!==null&&Ki(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Ma(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,ro(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Oi){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(eo(t),(e=Di)?(e=uf(e,Ai),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw Mi(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(eo(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(tc||Ki(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=Rl,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xr(e,s),vu(r,e,s),ec;Au(),t=uc(e,t,n)}else e=o.treeContext,Di=mf(s.nextSibling),Ei=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ti(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ri(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Ji(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(Oi&&r&&Ci(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Ji(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(Oi&&r&&Ci(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Ji(t),t.stateNode===null){var a=$r,o=n.contextType;typeof o==`object`&&o&&(a=Yi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Fa(t),o=n.contextType,a.context=typeof o==`object`&&o?Yi(o):$r,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Vs.enqueueReplaceState(a,a.state,null),Ua(t,r,a,i),Ha(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=$r,typeof u==`object`&&u&&(o=Yi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Us(t,a,r,o),Pa=!1;var f=t.memoizedState;a.state=f,Ua(t,r,a,i),Ha(),l=t.memoizedState,s||f!==l||Pa?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Pa||Hs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ia(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=$r,typeof l==`object`&&l&&(c=Yi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Us(t,a,r,c),Pa=!1,f=t.memoizedState,a.state=f,Ua(t,r,a,i),Ha();var p=t.memoizedState;o!==d||f!==p||Pa||e!==null&&e.dependencies!==null&&qi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Pa||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ma(t,e.child,null,i),t.child=Ma(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Ii(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ha()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(io.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Oi){if(a?$a(t):no(t),(e=Di)?(e=uf(e,Ai),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw Mi(t);return ff(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(no(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=oi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):($a(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?($a(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(no(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=oi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ma(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(no(t),t.child=e.child,t.flags|=128,t=null);else if($a(t),ff(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ri({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Ki(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Rl,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Xr(e,r),vu(s,e,r),ec;df(c)||Au(),t=Cc(e,t,n)}else df(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Di=mf(c.nextSibling),Ei=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ti(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(no(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ri(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=oi(c,a,n,null),c.flags|=2):c=ri(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=ha():(l=ta._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):($a(t),n=e.child,e=n.sibling,n=ri(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=ti(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Ma(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wi(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=io.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(io,o),nc(e,t,r,n),r=Oi?hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ki(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&qi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Hi(t,ta,e.memoizedState.cache),Ii();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,eo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?($a(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):($a(t),t.flags|=128,null);$a(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Ki(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(io,io.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Hi(t,ta,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,Oi&&t.flags&1048576&&Si(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e==`function`)ni(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=rc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ia(e,t),Ua(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Hi(t,ta,r),r!==o.cache&&Gi(t,[ta],n,!0),Ha(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==a){a=di(Error(i(424)),t),Ri(a),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Di=mf(e.firstChild),Ei=t,Oi=!0,ki=null,Ai=!0,n=Na(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ii(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=Ff(t.type,null,t.pendingProps,null))?t.memoizedState=n:Oi||(n=t.type,e=t.pendingProps,r=Kd(ae.current).createElement(n),r[$e]=t,r[et]=e,Bd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Ff(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Oi&&(r=t.stateNode=vf(t.type,t.pendingProps,ae.current),Ei=t,Ai=!0,a=Di,rf(t.type)?(hf=a,Di=mf(r.firstChild)):Di=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oi&&((a=r=Di)&&(r=cf(r,t.type,t.pendingProps,Ai),r===null?a=!1:(t.stateNode=r,Ei=t,Di=mf(r.firstChild),Ai=!1,a=!0)),a||Mi(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Yd(a,o)?r=null:s!==null&&Yd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),ip._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&Oi&&((e=n=Di)&&(n=lf(n,t.pendingProps,Ai),n===null?e=!1:(t.stateNode=n,Ei=t,Di=null,e=!0)),e||Mi(t)),null;case 13:return bc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ma(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Hi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ji(t),a=Yi(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Ji(t),r=Yi(ta),e===null?(a=pa(),a===null&&(a=Rl,o=na(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Fa(t),Hi(t,ta,a)):((e.lanes&n)!==0&&(Ia(e,t),Ua(t,null,null,n),Ha()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Hi(t,ta,r),r!==a.cache&&Gi(t,[ta],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Hi(t,ta,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Ca=ya,_a}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xf(t))if(Du())e.flags|=8192;else throw Ca=ya,_a}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Ql|=t)}function Fc(e,t){if(!Oi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ui(ta),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Li())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=re.current,Fi(t)?Ni(t,e):(e=vf(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=re.current,Fi(t))Ni(t,o);else{var s=Kd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[$e]=t,o[et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ei,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||Mi(t,!0)}else e=Kd(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Fi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[$e]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ro(t),t):(ro(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Fi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[$e]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ro(t),t):(ro(t),null)}return ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return ce(),e===null&&Dd(t.stateNode.containerInfo),Ic(t),null;case 10:return Ui(t.type),Ic(t),null;case 19:if(I(io),r=t.memoizedState,r===null)return Ic(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ao(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ii(n,e),n=n.sibling;return L(io,io.current&1|2),Oi&&xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&z()>iu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ao(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Oi)return Ic(t),null}else 2*z()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=z(),e.sibling=null,n=io.current,L(io,a?n&1|2:n&1),Oi&&xi(t,r.treeForkCount),e);case 22:case 23:return ro(t),Xa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ui(ta),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(ta),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(ro(t),t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(io),null;case 4:return ce(),null;case 10:return Ui(t.type),null;case 22:case 23:return ro(t),Xa(),e!==null&&I(fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui(ta),null;case 25:return null;default:return null}}function zc(e,t){switch(wi(t),t.tag){case 3:Ui(ta),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&ro(t);break;case 13:ro(t);break;case 19:I(io);break;case 10:Ui(t.type);break;case 22:case 23:ro(t),Xa(),e!==null&&I(fa);break;case 24:Ui(ta)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ju(t,t.return,e)}}function U(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ju(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ju(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ga(t,n)}catch(t){Ju(e,e.return,t)}}}function Hc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ju(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ju(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ju(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ju(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ju(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[et]=t}catch(t){Ju(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rf(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[$e]=e,t[et]=n}catch(t){Ju(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Wd=pp,e=br(e),xr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},pp=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ju(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)sf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:sf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Bc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ju(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ju(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ga(e,t)}catch(e){Ju(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ul(e,n);break;case 13:vl(e,n),r&4&&W(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qu.bind(null,n),pf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Qc=i,$c=a}break;case 30:break;default:vl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(ke&&typeof ke.onCommitFiberUnmount==`function`)try{ke.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;rf(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),yf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){Ju(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){Ju(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,af(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),zp(e)):af(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:U(2,n,t),$c||U(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zp(e)}catch(e){Ju(t,t.return,e)}}}function W(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zp(e)}catch(e){Ju(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=$u.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(rf(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(i(160));ll(o,s,a),ol=null,sl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(U(3,e,e.return),Bc(3,e),U(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Bd(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Jf(a,e.type,e.stateNode);else e.stateNode=Hf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Jf(a,e.type,e.stateNode):Hf(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Ju(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Kc(e,a,n===null?a:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ju(e,e.return,t)}}break;case 3:if(Kf=null,a=ml,ml=Sf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zp(t.containerInfo)}catch(t){Ju(e,e.return,t)}el&&(el=!1,_l(e));break;case 4:r=ml,ml=Sf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=z()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||a,$c=d||l,pl(t,e),$c=d,Qc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Qc||$c||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ju(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Ju(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?of(m,!0):of(l.stateNode,!1)}catch(e){Ju(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Xc(e,Jc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Xc(e,Jc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Yc(e,Jc(e),s);break;default:throw Error(i(161))}}catch(t){Ju(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:U(4,t,t.return),yl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),yl(t);break;case 27:yf(t.stateNode);case 26:case 5:Wc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Bc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ju(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Wa(c[i],s)}catch(e){Ju(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ul(i,a);break;case 13:bl(i,a,n),n&&o&4&&W(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Uc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ra(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ju(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Zf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=Sf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&U(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:U(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:U(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ra(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Fl={getCacheForType:function(e){var t=Yi(ta),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Yi(ta).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,zl=null,Bl=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return Ll&2&&Bl!==0?Bl&-Bl:N.T===null?Xe():hd()}function _u(){if(Zl===0)if(!(Bl&536870912)||Oi){var e=Fe;Fe<<=1,!(Fe&3932160)&&(Fe=262144),Zl=e}else Zl=536870912;return e=Za.current,e!==null&&(e.flags|=32),Zl}function vu(e,t,n){(e===Rl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,Bl,Zl,!1)),Ue(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(Yl|=n),ql===4&&Su(e,Bl,Zl,!1)),sd(e))}function yu(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ze(e,t),a=r?Nu(e,t):ju(e,t,!0),o=r;do{if(a===0){Wl&&!r&&Su(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!xu(n)){a=ju(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,a=4;break a}o=eu,eu=a,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=nu+300-z(),10<a)){if(Su(r,t,Zl,!Ul),Re(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Qd(bu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),a);break a}bu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);sd(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},kl(t,a,d);var m=(a&62914560)===a?nu-z():(a&4194048)===a?ru-z():0;if(m=$f(d,m),m!==null){uu=a,e.cancelPendingCommit=m(Bu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}Bu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Su(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function Cu(){return Ll&6?!0:(cd(0,!1),!1)}function wu(){if(zl!==null){if(Vl===0)var e=zl.return;else e=zl,Vi=Bi=null,Eo(e),Ea=null,Da=0,e=zl;for(;e!==null;)zc(e.alternate,e),e=e.return;zl=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,$d(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,wu(),Rl=e,zl=n=ri(e.current,null),Bl=t,Vl=0,Hl=null,Ul=!1,Wl=ze(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-je(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,qr(),n}function Eu(e,t){so=null,N.H=Is,t===ga||t===va?(t=wa(),Vl=3):t===_a?(t=wa(),Vl=4):Vl=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,zl===null&&(ql=1,Js(e,di(t,e.current)))}function Du(){var e=Za.current;return e===null?!0:(Bl&4194048)===Bl?Qa===null:(Bl&62914560)===Bl||Bl&536870912?e===Qa:!1}function Ou(){var e=N.H;return N.H=Is,e===null?Is:e}function ku(){var e=N.A;return N.A=Fl,e}function Au(){ql=4,Ul||(Bl&4194048)!==Bl&&Za.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Rl===null||Su(Rl,Bl,Zl,!1)}function ju(e,t,n){var r=Ll;Ll|=2;var i=Ou(),a=ku();(Rl!==e||Bl!==t)&&(au=null,Tu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&zl!==null){var s=zl,c=Hl;switch(Vl){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:Za.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Lu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Lu(e,s,c,l)}}Mu(),o=ql;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,Vi=Bi=null,Ll=r,N.H=i,N.A=a,zl===null&&(Rl=null,Bl=0,qr()),o}function Mu(){for(;zl!==null;)Fu(zl)}function Nu(e,t){var n=Ll;Ll|=2;var r=Ou(),a=ku();Rl!==e||Bl!==t?(au=null,iu=z()+500,Tu(e,t)):Wl=ze(e,t);a:do try{if(Vl!==0&&zl!==null){t=zl;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Lu(e,t,o,1);break;case 2:case 9:if(ba(o)){Vl=0,Hl=null,Iu(t);break}t=function(){Vl!==2&&Vl!==9||Rl!==e||(Vl=7),sd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:ba(o)?(Vl=0,Hl=null,Iu(t)):(Vl=0,Hl=null,Lu(e,t,o,7));break;case 5:var s=null;switch(zl.tag){case 26:s=zl.memoizedState;case 5:case 27:var c=zl;if(s?Xf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)zl=l;else{var u=c.return;u===null?zl=null:(zl=u,Ru(u))}break b}}Vl=0,Hl=null,Lu(e,t,o,5);break;case 6:Vl=0,Hl=null,Lu(e,t,o,6);break;case 8:wu(),ql=6;break a;default:throw Error(i(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return Vi=Bi=null,N.H=r,N.A=a,Ll=n,zl===null?(Rl=null,Bl=0,qr(),ql):0}function Pu(){for(;zl!==null&&!be();)Fu(zl)}function Fu(e){var t=Ac(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Ru(e):zl=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Bl);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Bl);break;case 5:Eo(t);default:zc(n,t),t=zl=ii(t,Kl),t=Ac(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Ru(e):zl=t}function Lu(e,t,n,r){Vi=Bi=null,Eo(t),Ea=null,Da=0;var i=t.return;try{if($s(e,i,t,n,Bl)){ql=1,Js(e,di(n,e.current)),zl=null;return}}catch(t){if(i!==null)throw zl=i,t;ql=1,Js(e,di(n,e.current)),zl=null;return}t.flags&32768?(Oi||r===1?e=!0:Wl||Bl&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=Za.current,r!==null&&r.tag===13&&(r.flags|=16384))),zu(t,e)):Ru(t)}function Ru(e){var t=e;do{if(t.flags&32768){zu(t,Ul);return}e=t.return;var n=Lc(t.alternate,t,Kl);if(n!==null){zl=n;return}if(t=t.sibling,t!==null){zl=t;return}zl=t=e}while(t!==null);ql===0&&(ql=5)}function zu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,zl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){zl=e;return}zl=e=n}while(e!==null);ql=6,zl=null}function Bu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Gu();while(su!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Kr,We(e,n,o,s,c,l),e===Rl&&(zl=Rl=null,Bl=0),lu=t,cu=e,uu=n,du=o,fu=a,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ed(Ce,function(){return Ku(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Ll,Ll|=4;try{rl(e,t,n)}finally{Ll=s,P.p=a,N.T=r}}su=1,Vu(),Hu(),Uu()}}function Vu(){if(su===1){su=0;var e=cu,t=lu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=Gd,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=vr(s,h),v=vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}pp=!!Wd,Gd=Wd=null}finally{Ll=i,P.p=r,N.T=n}}e.current=t,su=2}}function Hu(){if(su===2){su=0;var e=cu,t=lu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Ll;Ll|=4;try{il(e,t.alternate,t)}finally{Ll=i,P.p=r,N.T=n}}su=3}}function Uu(){if(su===4||su===3){su=0,xe();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Wu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),Ye(n),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot==`function`)try{ke.onCommitFiberRoot(Oe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}uu&3&&Gu(),sd(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,cd(0,!1)}}function Wu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ra(t)))}function Gu(){return Vu(),Hu(),Uu(),Ku()}function Ku(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=Ye(uu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,cd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{P.p=a,N.T=r,Wu(e,t)}}function qu(e,t,n){t=di(n,t),t=Xs(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(Ue(e,2),sd(e))}function Ju(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=di(n,e),n=Zs(2),r=Ra(t,n,2),r!==null&&(Qs(n,r,t,e),Ue(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>z()-nu?!(Ll&2)&&Tu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),sd(e)}function Zu(e,t){t===0&&(t=Ve()),e=Xr(e,t),e!==null&&(Ue(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return ve(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=Bl,a=Re(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ze(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Zd()&&(e=od);for(var t=z(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}su!==0&&su!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Be(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Bl,n=Re(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),Ye(n)){case 2:case 8:n=V;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=fd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(r),e.callbackPriority=2,e.callbackNode=null,2}function fd(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gu()&&e.callbackNode!==n)return null;var r=Bl;return r=Re(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),dd(e,z()),e.callbackNode!=null&&e.callbackNode===n?fd.bind(null,e):null)}function pd(e,t){if(Gu())return null;yu(e,t,!0)}function md(){tf(function(){Ll&6?ve(B,ld):ud()})}function hd(){if(od===0){var e=oa;e===0&&(e=H,H<<=1,!(H&261888)&&(H=256)),od=e}return od}function gd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function _d(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=gd((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?gd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(od!==0){var e=o?_d(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?_d(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var yd=0;yd<Vr.length;yd++){var bd=Vr[yd];Hr(bd.toLowerCase(),`on`+(bd[0].toUpperCase()+bd.slice(1)))}Hr(Nr,`onAnimationEnd`),Hr(Pr,`onAnimationIteration`),Hr(Fr,`onAnimationStart`),Hr(`dblclick`,`onDoubleClick`),Hr(`focusin`,`onFocus`),Hr(`focusout`,`onBlur`),Hr(Ir,`onTransitionRun`),Hr(Lr,`onTransitionStart`),Hr(Rr,`onTransitionCancel`),Hr(zr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var xd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Sd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(xd));function Cd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}}}}function wd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(Od(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),Od(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,pt.forEach(function(t){t!==`selectionchange`&&(Sd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function Od(e,t,n,r){switch(bp(t)){case 2:var i=mp;break;case 8:i=hp;break;default:i=gp}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function kd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=Br.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=Mn;break;case`focusin`:u=`focus`,l=Cn;break;case`focusout`:u=`blur`,l=Cn;break;case`beforeblur`:case`afterblur`:l=Cn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Pn;break;case Nr:case Pr:case Fr:l=wn;break;case zr:l=Fn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=In;break;case`copy`:case`cut`:case`paste`:l=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Nn;break;case`toggle`:case`beforetoggle`:l=Ln}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(Ad(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Md,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Nd(s,c,l,d,!1),u!==null&&f!==null&&Nd(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=rr;else if(Zn(c))if(ir)v=pr;else{v=dr;var y=ur}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:Er=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Er=!1,Dr(s,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Dr(s,n,i)}var b;if(zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else qn?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,qn=!0)),y=jd(r,x),0<y.length&&(x=new En(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?Jn(e,n):Yn(e,n))&&(x=jd(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),vd(s,e,r,n,i)}Cd(s,t)})}function Ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Ad(e,i,a)),i=en(e,t),i!=null&&r.push(Ad(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Md(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Ad(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Ad(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Id(e){return(typeof e==`string`?e:``+e).replace(Pd,`
84
- `).replace(Fd,``)}function Ld(e,t){return t=Id(t),Id(e)===t}function Rd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Rd(e,t,`name`,a.name,a,null),Rd(e,t,`formEncType`,a.formEncType,a,null),Rd(e,t,`formMethod`,a.formMethod,a,null),Rd(e,t,`formTarget`,a.formTarget,a,null)):(Rd(e,t,`encType`,a.encType,a,null),Rd(e,t,`method`,a.method,a,null),Rd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&wd(`scroll`,e);break;case`onScrollEnd`:r!=null&&wd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:wd(`beforetoggle`,e),wd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function zd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&wd(`scroll`,e);break;case`onScrollEnd`:r!=null&&wd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Bd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:wd(`error`,e),wd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,o,s,n,null)}}a&&Rd(e,t,`srcSet`,n.srcSet,n,null),r&&Rd(e,t,`src`,n.src,n,null);return;case`input`:wd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Rd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in wd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Rd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in wd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Rd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Rd(e,t,l,r,n,null)}return;case`dialog`:wd(`beforetoggle`,e),wd(`toggle`,e),wd(`cancel`,e),wd(`close`,e);break;case`iframe`:case`object`:wd(`load`,e);break;case`video`:case`audio`:for(r=0;r<xd.length;r++)wd(xd[r],e);break;case`image`:wd(`error`,e),wd(`load`,e);break;case`details`:wd(`toggle`,e);break;case`embed`:case`source`:case`link`:wd(`error`,e),wd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&zd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Rd(e,t,c,r,n,null))}function Vd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Rd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Rd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Rd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Rd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Rd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Rd(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Rd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Rd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Rd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Rd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&zd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||zd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Rd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Rd(e,t,f,p,r,m)}function Hd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ud(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Hd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Wd=null,Gd=null;function Kd(e){return e.nodeType===9?e:e.ownerDocument}function qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Jd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Yd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xd=null;function Zd(){var e=window.event;return e&&e.type===`popstate`?e===Xd?!1:(Xd=e,!0):(Xd=null,!1)}var Qd=typeof setTimeout==`function`?setTimeout:void 0,$d=typeof clearTimeout==`function`?clearTimeout:void 0,ef=typeof Promise==`function`?Promise:void 0,tf=typeof queueMicrotask==`function`?queueMicrotask:ef===void 0?Qd:function(e){return ef.resolve(null).then(e).catch(nf)};function nf(e){setTimeout(function(){throw e})}function rf(e){return e===`head`}function af(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),zp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)yf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,yf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&yf(e.ownerDocument.body);n=i}while(n);zp(t)}function of(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function sf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:sf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=mf(e.nextSibling),e===null)break}return null}function lf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mf(e.nextSibling),e===null))return null;return e}function uf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mf(e.nextSibling),e===null))return null;return e}function df(e){return e.data===`$?`||e.data===`$~`}function ff(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function mf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var hf=null;function gf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function vf(e,t,n){switch(t=Kd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function yf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var bf=new Map,xf=new Set;function Sf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Cf=P.d;P.d={f:wf,r:Tf,D:Of,C:kf,L:Af,m:jf,X:Nf,S:Mf,M:Pf};function wf(){var e=Cf.f(),t=Cu();return e||t}function Tf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):Cf.r(e)}var Ef=typeof document>`u`?null:document;function Df(e,t,n){var r=Ef;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e){Cf.D(e),Df(`dns-prefetch`,e,null)}function kf(e,t){Cf.C(e,t),Df(`preconnect`,e,t)}function Af(e,t,n){Cf.L(e,t,n);var r=Ef;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=If(e);break;case`script`:a=Bf(e)}bf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function jf(e,t){Cf.m(e,t);var n=Ef;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!bf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),bf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Mf(e,t,n){Cf.S(e,t,n);var r=Ef;if(r&&e){var i=dt(r).hoistableStyles,a=If(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);ft(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nf(e,t){Cf.X(e,t);var n=Ef;if(n&&e){var r=dt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=f({src:e,async:!0},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),ft(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t){Cf.M(e,t);var n=Ef;if(n&&e){var r=dt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),ft(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t,n,r){var a=(a=ae.current)?Sf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=If(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=If(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),bf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bf.set(e,n),o||zf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function If(e){return`href="`+jt(e)+`"`}function Lf(e){return`link[rel="stylesheet"][`+e+`]`}function Rf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function zf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),ft(t),e.head.appendChild(t))}function Bf(e){return`[src="`+jt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Bd(r,`style`,a),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=If(n.href);var o=e.querySelector(Lf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Rf(n),(a=bf.get(a))&&Wf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=Bf(n.src),(a=e.querySelector(Vf(o)))?(t.instance=a,ft(a),a):(r=n,(a=bf.get(o))&&(r=f({},n),Gf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Bd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Kf=null;function qf(e,t,n){if(Kf===null){var r=new Map,i=Kf=new Map;i.set(n,r)}else i=Kf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=If(r.href),a=t.querySelector(Lf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Rf(r),(i=bf.get(i))&&Wf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&np(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Qf===0&&(Qf=62500*Ud());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&np(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ep.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ip={$$typeof:b,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function ap(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function op(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ap(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=na(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Fa(a),e}function sp(e){return e?(e=$r,e):$r}function cp(e,t,n,r,i,a){i=sp(i),r.context===null?r.context=i:r.pendingContext=i,r=La(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ra(e,r,t),n!==null&&(vu(n,e,t),za(n,e,t))}function lp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function up(e,t){lp(e,t),(e=e.alternate)&&lp(e,t)}function dp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&vu(t,e,67108864),up(e,67108864)}}function fp(e){if(e.tag===13||e.tag===31){var t=gu();t=Je(t);var n=Xr(e,t);n!==null&&vu(n,e,t),up(e,t)}}var pp=!0;function mp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,gp(e,t,n,r)}finally{P.p=a,N.T=i}}function hp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,gp(e,t,n,r)}finally{P.p=a,N.T=i}}function gp(e,t,n,r){if(pp){var i=_p(r);if(i===null)kd(e,t,r,vp,n),kp(e,r);else if(jp(i,e,t,n,r))r.stopPropagation();else if(kp(e,r),t&4&&-1<Op.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-je(o);s.entanglements[1]|=c,o&=~c}sd(a),!(Ll&6)&&(iu=z()+500,cd(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&vu(s,a,2),Cu(),up(a,2)}if(a=_p(r),a===null&&kd(e,t,r,vp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}function _p(e){return e=Jt(e),yp(e)}var vp=null;function yp(e){if(vp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vp=e,null}function bp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Se()){case B:return 2;case V:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var xp=!1,Sp=null,Cp=null,wp=null,Tp=new Map,Ep=new Map,Dp=[],Op=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function kp(e,t){switch(e){case`focusin`:case`focusout`:Sp=null;break;case`dragenter`:case`dragleave`:Cp=null;break;case`mouseover`:case`mouseout`:wp=null;break;case`pointerover`:case`pointerout`:Tp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ep.delete(t.pointerId)}}function Ap(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&dp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function jp(e,t,n,r,i){switch(t){case`focusin`:return Sp=Ap(Sp,e,t,n,r,i),!0;case`dragenter`:return Cp=Ap(Cp,e,t,n,r,i),!0;case`mouseover`:return wp=Ap(wp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Tp.set(a,Ap(Tp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ep.set(a,Ap(Ep.get(a)||null,e,t,n,r,i)),!0}return!1}function Mp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){fp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){fp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Np(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_p(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&dp(t),e.blockedOn=n,!1;t.shift()}return!0}function Pp(e,t,n){Np(e)&&n.delete(t)}function Fp(){xp=!1,Sp!==null&&Np(Sp)&&(Sp=null),Cp!==null&&Np(Cp)&&(Cp=null),wp!==null&&Np(wp)&&(wp=null),Tp.forEach(Pp),Ep.forEach(Pp)}function Ip(e,n){e.blockedOn===n&&(e.blockedOn=null,xp||(xp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Fp)))}var Lp=null;function Rp(e){Lp!==e&&(Lp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Lp===e&&(Lp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(yp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function zp(e){function t(t){return Ip(t,e)}Sp!==null&&Ip(Sp,e),Cp!==null&&Ip(Cp,e),wp!==null&&Ip(wp,e),Tp.forEach(t),Ep.forEach(t);for(var n=0;n<Dp.length;n++){var r=Dp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Dp.length&&(n=Dp[0],n.blockedOn===null);)Mp(n),n.blockedOn===null&&Dp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Rp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(yp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Rp(n)}}}function Bp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Vp(e){this._internalRoot=e}Hp.prototype.render=Vp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;cp(n,gu(),e,t,null,null)},Hp.prototype.unmount=Vp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cp(e.current,2,null,e,null,null),Cu(),t[tt]=null}};function Hp(e){this._internalRoot=e}Hp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dp.length&&t!==0&&t<Dp[n].priority;n++);Dp.splice(n,0,e),n===0&&Mp(e)}};var Up=n.version;if(Up!==`19.2.4`)throw Error(i(527,Up,`19.2.4`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Wp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Gp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gp.isDisabled&&Gp.supportsFiber)try{Oe=Gp.inject(Wp),ke=Gp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=op(e,1,!1,null,null,n,r,null,o,s,c,Bp),e[tt]=t.current,Dd(e),new Vp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Gs,c=Ks,l=qs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=op(e,1,!0,t,n??null,r,o,u,s,c,l,Bp),t.context=sp(null),n=t.current,r=gu(),r=Je(r),o=La(r),o.callback=null,Ra(n,o,r),n=r,t.current.lanes=n,Ue(t,n),sd(t),e[tt]=t.current,Dd(e),new Hp(t)}})),e1=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=$$()}))(),t1=class{log=aA();root;onBrowserRender=j({on:`react:browser:render`,handler:async({hydration:e,root:t,element:n})=>{e?.[`alepha.react.router.layers`]?(this.root=(0,e1.hydrateRoot)(t,n),this.log.info(`Hydrated root element`)):(this.root??=(0,e1.createRoot)(t),this.root.render(n),this.log.info(`Created root element`))}})},n1=class{alepha=D(ck);pageApi=D(K$);get state(){return this.alepha.store.get(`alepha.react.router.state`)}get pages(){return this.pageApi.getPages()}get concretePages(){return this.pageApi.getConcretePages()}get browser(){if(this.alepha.isBrowser())return this.alepha.inject(X$)}isActive(e,t={}){let n=this.state.url.pathname,r=n===e||n===`${e}/`||`${n}/`===e;return t.startWith&&!r&&(r=n.startsWith(e)),r}node(e,t={}){let n=this.pageApi.page(e);return!n.lazy&&!n.component?{...n,label:n.label??n.name,children:void 0}:{...n,label:n.label??n.name,href:this.path(e,t),children:void 0}}path(e,t={}){return this.pageApi.pathname(e,{params:{...this.state?.params,...t.params},query:t.query})}async reload(){this.browser&&await this.push(this.location.pathname+this.location.search,{replace:!0,force:!0})}getURL(){return this.browser?new URL(this.location.href):this.state.url}get location(){if(!this.browser)throw new p(`Browser is required`);return this.browser.location}get current(){return this.state}get pathname(){return this.state.url.pathname}get query(){let e={};for(let[t,n]of new URLSearchParams(this.state.url.search).entries())e[t]=String(n);return e}async back(){this.browser?.history.back()}async forward(){this.browser?.history.forward()}async invalidate(e){await this.browser?.invalidate(e)}async push(e,t){for(let n of this.pages)if(n.name===e){await this.browser?.push(this.path(e,t),t);return}await this.browser?.push(e,t)}anchor(e,t={}){let n=e;for(let r of this.pages)if(r.name===e){n=this.path(e,t);break}return{href:this.base(n),onClick:e=>{e.stopPropagation(),e.preventDefault(),this.push(n,t).catch(console.error)}}}base(e){let t=`/__devtools`;return t===`/`?e:t+e}setQueryParams(e,t={}){let n=typeof e==`function`?e:()=>e,r=new URLSearchParams(n(this.query)).toString(),i=r?`${this.pathname}?${r}`:this.pathname,a=this.base(i);t.push?window.history.pushState({},``,a):window.history.replaceState({},``,a)}},r1=()=>Xk(n1),i1=e=>{let t=r1();return(0,K.createElement)(`a`,{...e,...t.anchor(e.href)},e.children)},a1=e=>{j$();let t=r1(),[n,r]=(0,K.useState)(!1),i=typeof e==`string`?{href:e}:{...e,href:e.href},a=i.href,o=t.isActive(a,i);return{isPending:n,isActive:o,anchorProps:{href:t.base(a),onClick:async e=>{if(e?.stopPropagation(),e?.preventDefault(),!o&&!n){r(!0);try{await t.push(a)}finally{r(!1)}}}}}},o1=(e,t={})=>{let n=Yk(),r=t.key??`q`,i=r1(),a=i.query[r],[o={},s]=(0,K.useState)(c1(n,e,i.query[r]));return(0,K.useEffect)(()=>{s(c1(n,e,a))},[a]),[o,t=>{s(t),i.setQueryParams(i=>({...i,[r]:s1(n,e,t)}))}]},s1=(e,t,n)=>btoa(JSON.stringify(e.codec.decode(t,n))),c1=(e,t,n)=>{try{return e.codec.decode(t,JSON.parse(atob(decodeURIComponent(n))))}catch{return}};C({name:`alepha.react.router`,primitives:[E$],services:[K$,J$,X$,n1,t1,T$],register:e=>e.with(LA).with(YA).with(Jk).with(OA).with(PA).with(K$).with(X$).with(J$).with(t1).with(n1)});var l1=class{root=E$({path:`/`,component:j0})},u1={root:`m_8f2832ae`,section:`m_7a0fe999`};function d1(e){let t=.5;return e>=0&&e<=20?t=10:e>=20&&e<=50?t=4:e>=50&&e<=80?t=2:e>=80&&e<=99?t=1:e>=99&&e<=100&&(t=0),e+t}var f1=()=>XZ({mounted:!1,progress:0,interval:0,step:1,stepInterval:100,timeouts:[]}),p1=e=>ZZ(e);function m1(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function h1(e){m1(e=>({progress:Math.max(e.progress-e.step,0)}),e)}function g1(e,t){m1(()=>({progress:ZM(e,0,100),mounted:!0}),t)}function _1(e){m1(e=>(window.clearInterval(e.interval),e.timeouts.forEach(e=>window.clearTimeout(e)),{timeouts:[]}),e)}function v1(e){_1(e),m1(t=>({progress:100,timeouts:[window.setTimeout(()=>{m1(()=>({mounted:!1}),e)},50),window.setTimeout(()=>{m1(()=>({progress:0}),e)},t.stepInterval+50)]}),e)}function y1(e){m1(e=>({progress:d1(e.progress),mounted:!0}),e),m1(t=>(window.clearInterval(t.interval),{interval:window.setInterval(()=>{m1(e=>({progress:d1(e.progress),mounted:!0}),e)},t.stepInterval),mounted:!0}),e)}function b1(e){m1(e=>(window.clearInterval(e.interval),{interval:-1}),e)}function x1(e){_1(e),b1(e),m1(()=>({progress:0,mounted:!1}),e)}function S1(e){m1(t=>{let n=Math.min(t.progress+t.step,100),r=n!==100&&n!==0;if(!r){let i=window.setTimeout(()=>x1(e),t.stepInterval+50);return{progress:n,mounted:r,timeouts:[...t.timeouts,i]}}return{progress:n,mounted:r}},e)}function C1(){let e=f1();return[e,{start:()=>y1(e),stop:()=>b1(e),reset:()=>x1(e),set:t=>g1(t,e),increment:()=>S1(e),decrement:()=>h1(e),complete:()=>v1(e),cleanup:()=>_1(e)}]}var[w1,T1]=C1(),{start:E1,stop:D1,reset:O1,set:k1,increment:A1,decrement:j1,complete:M1,cleanup:N1}=T1;function P1({initialProgress:e=0,color:t,size:n=3,stepInterval:r=500,withinPortal:i=!0,portalProps:a,zIndex:o=LM(`max`),store:s=w1,...c}){s.initialize({mounted:!1,progress:e,interval:-1,step:1,stepInterval:r,timeouts:[]});let l=p1(s);return(0,K.useEffect)(()=>()=>x1(s),[s]),(0,q.jsx)(wV,{...a,withinPortal:i,children:(0,q.jsx)(ZY,{radius:0,value:l.progress,size:n,color:t,classNames:u1,"data-mounted":l.mounted||void 0,__vars:{"--nprogress-z-index":o?.toString()},...c})})}P1.displayName=`@mantine/nprogress/NavigationProgress`;var F1=()=>{IA(aj),IA(oj);let e=Xk(FZ);return[e.getTheme(),t=>{e.setTheme(t.index)},{overrides:e.getThemeOverrides(),setOverrides:t=>{e.setThemeOverrides(t)},resetOverrides:()=>{e.resetThemeOverrides()}}]},I1=()=>Xk(w$),L1=()=>XZ({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),R1=e=>ZZ(e);function z1(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function B1(e){z1(()=>({opened:!0,selected:-1}),e)}function V1(e){z1(()=>({opened:!1}),e)}function H1(e){z1(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function U1(e,t){t.updateState(t=>({...t,selected:e}))}function W1(e,t){t.updateState(t=>({...t,listId:e}))}function G1(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=G1(e,n.shadowRoot);if(t)return t}let i=G1(e,n);if(i)return i}return null}function K1(e,t){let n=t.getState(),r=n.listId?G1(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=ZM(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),U1(o,t),o}function q1(e){return K1(e.getState().selected+1,e)}function J1(e){return K1(e.getState().selected-1,e)}function Y1(e){G1(`#${e.getState().listId} [data-selected]`)?.click()}function X1(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function Z1(e,t){z1(()=>({query:e}),t),Promise.resolve().then(()=>{K1(0,t),z1(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function Q1({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:e?!1:t.empty}))}var $1={open:B1,close:V1,toggle:H1,updateState:z1,setSelectedAction:U1,setListId:W1,selectAction:K1,selectNextAction:q1,selectPreviousAction:J1,triggerSelectedAction:Y1,registerAction:X1,setQuery:Z1,clearSpotlightState:Q1};function e0(){let e=L1();return[e,{open:()=>B1(e),close:()=>V1(e),toggle:()=>H1(e)}]}var[t0,n0]=e0(),{open:r0,close:i0,toggle:a0}=n0;function o0(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}function s0(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function c0(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function l0(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var u0=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return c0(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||s0(e.keywords).includes(n))&&r[1].push(e)}),l0(r.flat())};function d0(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(o0(r)){let i=d0(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var f0={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},[p0,m0]=kM(`Spotlight component was not found in tree`),h0={dimmedSections:!0,highlightQuery:!1},g0=$((e,t)=>{let{className:n,style:r,classNames:i,styles:a,id:o,description:s,label:c,leftSection:l,rightSection:u,children:d,dimmedSections:f,highlightQuery:p,highlightColor:m,closeSpotlightOnTrigger:h,onClick:g,onMouseDown:_,keywords:v,vars:y,...b}=Z(`SpotlightAction`,h0,e),x=m0(),S={classNames:i,styles:a},C=p&&typeof c==`string`?(0,q.jsx)(eq,{component:`span`,highlight:x.query,color:m,...x.getStyles(`actionLabel`,S),children:c}):(0,q.jsx)(`span`,{...x.getStyles(`actionLabel`,S),children:c});return(0,q.jsx)(iV,{ref:t,"data-action":!0,...x.getStyles(`action`,{className:n,style:r,...S}),...b,onMouseDown:e=>{e.preventDefault(),_?.(e)},onClick:e=>{g?.(e),(h??x.closeOnActionTrigger)&&$1.close(x.store)},tabIndex:-1,children:d||(0,q.jsxs)(q.Fragment,{children:[l&&(0,q.jsx)(Q,{component:`span`,mod:{position:`left`,dimmed:f},...x.getStyles(`actionSection`,S),children:l}),(0,q.jsxs)(`span`,{...x.getStyles(`actionBody`,S),children:[C,(0,q.jsx)(`span`,{...x.getStyles(`actionDescription`,S),children:s})]}),u&&(0,q.jsx)(Q,{component:`span`,mod:{position:`right`,dimmed:f},...x.getStyles(`actionSection`,S),children:u})]})})});g0.classes=f0,g0.displayName=`@mantine/spotlight/SpotlightAction`;var _0=$((e,t)=>{let{className:n,style:r,styles:i,classNames:a,label:o,children:s,...c}=Z(`SpotlightActionsGroup`,null,e);return(0,q.jsx)(Q,{...m0().getStyles(`actionsGroup`,{className:n,style:r,classNames:a,styles:i}),ref:t,...c,__vars:{"--spotlight-label":`'${o?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:s})});_0.classes=f0,_0.displayName=`@mantine/core/SpotlightActionsGroup`;var v0=$((e,t)=>{let{className:n,style:r,id:i,children:a,vars:o,classNames:s,styles:c,...l}=Z(`SpotlightActionsList`,null,e),u=m0(),d=`mantine-${(0,K.useId)().replace(/:/g,``)}`,f=i||d;return(0,K.useEffect)(()=>($1.setListId(f,u.store),()=>$1.setListId(``,u.store)),[]),(0,q.jsx)(eV.Autosize,{...u.getStyles(`actionsList`,{className:n,style:r,classNames:s,styles:c}),ref:t,type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:f,...l,children:a})});v0.classes=f0,v0.displayName=`@mantine/spotlight/SpotlightActionsList`;var y0=$((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=Z(`SpotlightEmpty`,null,e);return(0,q.jsx)(Q,{ref:t,...m0().getStyles(`empty`,{classNames:i,styles:a,className:n,style:r}),...o})});y0.classes=f0,y0.displayName=`@mantine/spotlight/SpotlightEmpty`;var b0=$((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=Z(`SpotlightFooter`,null,e);return(0,q.jsx)(Q,{ref:t,...m0().getStyles(`footer`,{className:n,classNames:i,style:r,styles:a}),...o})});b0.classes=f0,b0.displayName=`@mantine/spotlight/SpotlightFooter`;function x0(e,t){if(!e)return[];let n=()=>$1.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var S0={size:600,yOffset:80,zIndex:LM(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:t0,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},C0=$((e,t)=>{let n=Z(`SpotlightRoot`,S0,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,store:l,children:u,query:d,onQueryChange:f,transitionProps:p,clearQueryOnClose:m,shortcut:h,tagsToIgnore:g,triggerOnContentEditable:_,disabled:v,onSpotlightOpen:y,onSpotlightClose:b,forceOpened:x,closeOnActionTrigger:S,maxHeight:C,scrollable:w,attributes:T,...E}=n,D=sF(),{opened:O,query:k}=R1(l),A=typeof d==`string`?d:k,j=e=>{f?.(e),$1.setQuery(e,l)},M=X({name:`Spotlight`,classes:f0,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:T});return UN(x0(h,l),g,_),lN(()=>{O?y?.():b?.()},[O]),v?null:(0,q.jsx)(p0,{value:{getStyles:M,query:A,setQuery:j,store:l,closeOnActionTrigger:S},children:(0,q.jsx)(dJ,{ref:t,...E,withCloseButton:!1,opened:O||!!x,padding:0,onClose:()=>$1.close(l),className:i,style:a,classNames:bP({theme:D,classNames:[f0,r],props:n,stylesCtx:void 0}),styles:xP({theme:D,styles:o,props:n,stylesCtx:void 0}),transitionProps:{...p,onExited:()=>{m&&j(``),$1.clearSpotlightState({clearQuery:m},l),p?.onExited?.()}},__vars:{"--spotlight-max-height":w?Y(C):void 0},__staticSelector:`Spotlight`,"data-scrollable":w||void 0,children:u})})});C0.classes=f0,C0.displayName=`@mantine/spotlight/SpotlightRoot`;var w0={size:`lg`},T0=$((e,t)=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,vars:o,value:s,...c}=Z(`SpotlightSearch`,w0,e),l=m0(),u=l.getStyles(`search`),[d,f]=(0,K.useState)(!1),p=e=>{i?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),$1.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),$1.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),$1.triggerSelectedAction(l.store)))};return(0,q.jsx)(nU,{ref:t,classNames:[{input:u.className},n],styles:[{input:u.style},r],...c,value:s??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),a?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});T0.classes=f0,T0.displayName=`@mantine/spotlight/SpotlightSearch`;var E0={size:600,yOffset:80,limit:1/0,zIndex:LM(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:t0,filter:u0,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},D0=$((e,t)=>{let{searchProps:n,filter:r,query:i,onQueryChange:a,actions:o,nothingFound:s,highlightQuery:c,limit:l,scrollAreaProps:u,...d}=Z(`Spotlight`,E0,e),[f,p]=MN({value:i,defaultValue:``,finalValue:``,onChange:a}),m=d0(r(f,o),l).map(e=>{if(o0(e)){let t=e.actions.map(({id:e,...t})=>(0,q.jsx)(g0,{highlightQuery:c,...t},e));return(0,q.jsx)(_0,{label:e.group,children:t},e.group)}return(0,q.jsx)(g0,{highlightQuery:c,...e},e.id)});return(0,q.jsxs)(C0,{...d,query:f,onQueryChange:p,ref:t,children:[(0,q.jsx)(T0,{...n}),m.length>0&&(0,q.jsx)(v0,{...u,children:m}),m.length===0&&s&&(0,q.jsx)(y0,{children:s})]})});D0.classes=f0,D0.displayName=`@mantine/spotlight/Spotlight`,D0.Search=T0,D0.ActionsList=v0,D0.Action=g0,D0.Empty=y0,D0.ActionsGroup=_0,D0.Footer=b0,D0.Root=C0,D0.open=n0.open,D0.close=n0.close,D0.toggle=n0.toggle;var O0=G.object({id:G.text({description:`Unique identifier for the user.`}),name:G.optional(G.text({description:`Full name of the user.`})),email:G.optional(G.text({description:`Email address of the user.`,format:`email`})),username:G.optional(G.text({description:`Preferred username of the user.`})),picture:G.optional(G.text({description:`URL to the user's profile picture.`})),sessionId:G.optional(G.text({description:`Session identifier for the user, if applicable.`})),organizations:G.optional(G.array(G.text(),{description:`List of organizations the user belongs to.`})),roles:G.optional(G.array(G.text(),{description:`List of roles assigned to the user.`})),realm:G.optional(G.text({description:`The realm (issuer) the user was authenticated from.`}))}),k0=ak({name:`alepha.security.user`,schema:G.optional(O0)});G.object({name:G.text({description:`Name of the permission.`}),group:G.optional(G.text({description:`Group of the permission.`})),description:G.optional(G.text({description:`Describe the permission.`})),method:G.optional(G.text({description:`HTTP method of the permission. When available.`})),path:G.optional(G.text({description:`Pathname of the permission. When available.`}))}),G.object({name:G.text({description:`Name of the role.`}),description:G.optional(G.text({description:`Describe the role.`})),default:G.optional(G.boolean({description:`If true, this role will be assigned to all users by default.`})),permissions:G.array(G.object({name:G.text({description:`Name of the permission.`}),ownership:G.optional(G.boolean({description:`If true, user will only have access to it's own resources.`})),exclude:G.optional(G.array(G.text(),{description:`Exclude some permissions. Useful when 'name' is a wildcard.`}))}))}),C({name:`alepha.security`});var A0=e=>{let t=e.shortcut??`mod+K`,n=e.searchPlaceholder??`Search...`,r=e.nothingFound??`Nothing found...`,i=r1(),[a]=IA(k0);return(0,q.jsx)(D0,{actions:(0,K.useMemo)(()=>i.concretePages.filter(e=>!(e.can&&!e.can())).map(e=>({id:e.name,label:e.label??e.name,description:e.description,onClick:()=>e.staticName?i.push(e.staticName,{params:e.params}):i.push(e.name),leftSection:r2(e.icon)})),[a]),shortcut:t,limit:10,searchProps:{leftSection:(0,q.jsx)(_$,{size:M0.sizes.icon.md}),placeholder:n},nothingFound:r})},j0=e=>{let t=I1(),[n]=F1();FA({"react:transition:begin":()=>{T1.start()},"react:transition:end":()=>{T1.complete()},"react:action:error":({error:e,type:n})=>{n===`transition`||e instanceof zA||e instanceof tk||t.danger({title:e.name||`Error`,message:e.message??`An error occurred while processing your action.`})}},[]);let r=e.mantine?.defaultColorScheme??n.defaultColorScheme;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(YF,{defaultColorScheme:r,...e.colorSchemeScript}),(0,q.jsxs)(EF,{...e.mantine,defaultColorScheme:r,theme:{...n,...e.mantine?.theme},children:[(0,q.jsx)(BQ,{...e.notifications}),(0,q.jsx)(P1,{...e.navigationProgress}),(0,q.jsxs)(GZ,{...e.modals,children:[e.omnibar!==!1&&(0,q.jsx)(A0,{...e.omnibar}),e.children??(0,q.jsx)(U$,{})]})]})]})},M0={colors:{transparent:`transparent`,background:`var(--alepha-ground)`,surface:`var(--alepha-surface)`,elevated:`var(--alepha-elevated)`,border:`var(--alepha-border)`},sizes:{icon:{xs:16,sm:20,md:24,lg:28,xl:32}}};function N0(e){return(0,K.isValidElement)(e)?!1:typeof e==`function`||typeof e==`object`&&!!e&&`$$typeof`in e}var P0=e=>{let t=sF(),n={...e};n.variant;let{tooltip:r,menu:i,icon:a,iconSize:o,...s}=n;if(n.intent&&(n.intent===`primary`?s.color??=t.primaryColor:n.intent===`success`?(s.c??=`white`,s.color??=`green`):n.intent===`danger`?(s.c??=`white`,s.color??=`red`):n.intent===`warning`?s.color??=`yellow`:n.intent===`info`&&(s.c??=`white`,s.color??=`blue`)),n.icon){let e=M0.sizes.icon,t=n.iconSize??e[n.size||`sm`],r=N0(n.icon)?(0,q.jsx)(n.icon,{size:t}):(0,q.jsx)(`span`,{children:n.icon});n.children?s.leftSection=r:(s.children=K.Children.only(r),s.p??=8)}if(n.leftSection&&!n.children&&(s.px??=`xs`),n.textVisibleFrom){let{children:e,textVisibleFrom:t,leftSection:n,...a}=s;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(cU,{w:`100%`,visibleFrom:t,children:(0,q.jsx)(P0,{flex:1,...a,leftSection:n,tooltip:r,menu:i,children:e})}),(0,q.jsx)(cU,{w:`100%`,hiddenFrom:t,children:(0,q.jsx)(P0,{px:`xs`,...a,"aria-label":typeof e==`string`?e:void 0,tooltip:r,menu:i,children:n})})]})}let c=`href`in s&&s.href?s.href.startsWith(`http`)||s.target?(0,q.jsx)(B0,{...s,href:s.href,children:s.children}):(0,q.jsx)(z0,{...s,href:s.href,children:s.children}):(delete s.classNameActive,delete s.variantActive,delete s.propsActive,`action`in s&&s.action?(0,q.jsx)(L0,{...s,action:s.action,children:s.children}):`onClick`in s&&s.onClick?(0,q.jsx)(R0,{...s,onClick:s.onClick,children:s.children}):`form`in s&&s.form?s.type===`reset`?(0,q.jsx)(I0,{...s,form:s.form,children:s.children}):(0,q.jsx)(F0,{...s,form:s.form,children:s.children}):(0,q.jsx)(bG,{...s,children:s.children}));if(i&&(c=(0,q.jsxs)(Jq,{position:i.position||`bottom-start`,width:i.width||200,shadow:i.shadow||`md`,trigger:i.on===`hover`?`hover`:`click`,...i.menuProps,children:[(0,q.jsx)(Jq.Target,{...i.targetProps,children:c}),(0,q.jsx)(Jq.Dropdown,{children:i.items.map((e,t)=>(0,q.jsx)(V0,{item:e,index:t},t))})]})),r){let e={openDelay:1e3};return(0,q.jsx)(hX,{...typeof r==`string`||typeof r==`number`?{...e,label:r,children:c}:{...e,...r,children:c}})}return c},F0=e=>{let{form:t,...n}=e,r=RA(t);return(0,q.jsx)(bG,{...n,loading:r.loading,disabled:r.loading,type:`submit`,children:e.children})},I0=e=>{let{form:t,...n}=e,r=RA(t);return(0,q.jsx)(bG,{...n,disabled:r.loading,type:`reset`,children:e.children})},L0=e=>{let{action:t,...n}=e;return(0,q.jsx)(bG,{...n,disabled:t.loading||e.disabled,loading:t.loading,onClick:()=>t.run(),children:e.children})},R0=({preventDefault:e,...t})=>{let n=Zk({handler:async n=>{e&&n.preventDefault(),await t.onClick(n)}},[t.onClick,e]);return(0,q.jsx)(bG,{...t,disabled:n.loading||t.disabled,loading:n.loading,onClick:n.run,children:t.children})},z0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,onClick:o,anchorProps:s,anchor:c,...l}=e,u=r1(),{isPending:d,isActive:f}=a1(t?{href:e.href,...t}:{href:e.href}),p=u.anchor(e.href,a);i&&f&&Object.assign(l,i);let m=e=>{o?.(e),p.onClick?.(e)},h=l.className||``;return f&&t!==!1&&n&&(l.className=`${h} ${n}`.trim()),s||c?(0,q.jsx)(CU,{component:`a`,...p,...l,...s,onClick:m,children:e.children}):(0,q.jsx)(bG,{component:`a`,loading:d,...l,...p,onClick:m,variant:f&&t!==!1?r??`filled`:l.variant??`subtle`,children:e.children})},B0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,target:o,...s}=e;return(0,q.jsx)(bG,{component:`a`,target:o,...s,children:e.children})},V0=e=>{let{item:t,index:n}=e,r=r1(),i=Zk({handler:async e=>{await t.onClick?.()}},[t.onClick]);if(t.type===`divider`)return(0,q.jsx)(Jq.Divider,{},n);if(t.type===`label`)return(0,q.jsx)(Jq.Label,{children:t.label},n);if(t.children&&t.children.length>0)return(0,q.jsxs)(Jq,{trigger:`hover`,position:`right-start`,offset:2,children:[(0,q.jsx)(Jq.Target,{children:(0,q.jsx)(Jq.Item,{leftSection:t.icon,rightSection:(0,q.jsx)(YQ,{size:14}),children:t.label})}),(0,q.jsx)(Jq.Dropdown,{children:t.children.map((e,t)=>(0,q.jsx)(V0,{item:e,index:t},t))})]},n);let a={};return e.item.onClick?a.onClick=i.run:e.item.href&&Object.assign(a,r.anchor(e.item.href)),(0,q.jsx)(Jq.Item,{leftSection:t.icon??(t.active?(0,q.jsx)(qQ,{size:M0.sizes.icon.sm}):(0,q.jsx)(cU,{w:M0.sizes.icon.sm})),onClick:t.onClick,color:t.color,...a,children:t.label},n)},H0=e=>{let[t,n]=IA(ij);return(0,q.jsx)(dG,{opened:!t.closed,onClick:()=>n({...t,closed:!t.closed}),hiddenFrom:`md`,size:`sm`,...e})},U0=e=>{let{setColorScheme:t}=qF(),n=()=>{t((document.documentElement.getAttribute(`data-mantine-color-scheme`)??`light`)===`dark`?`light`:`dark`)},r=e.size??`sm`,i=M0.sizes.icon[r]??M0.sizes.icon.sm;return(0,q.jsx)(P0,{onClick:n,variant:e.variant??`default`,size:r,"aria-label":`Toggle color scheme`,icon:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(b$,{size:i,className:`alepha-light-hidden`}),(0,q.jsx)(p$,{size:i,className:`alepha-dark-hidden`})]}),...e})},W0=e=>{let t=nj();return(0,q.jsx)(P0,{variant:`default`,icon:o$,menu:{items:t.languages.map(e=>({label:t.tr(e),onClick:()=>t.setLang(e),active:t.lang===e}))},...e})},G0=e=>{let t=ZN(),n=t===`macos`||t===`ios`?`⌘`:`Ctrl`;return e.collapsed?(0,q.jsx)(P0,{variant:`subtle`,onClick:n0.open,icon:_$,tooltip:{label:`Search`,position:`right`},...e.actionProps}):(0,q.jsx)(P0,{variant:`default`,onClick:n0.open,justify:`space-between`,rightSection:(0,q.jsxs)(Aq,{visibleFrom:`sm`,size:`sm`,children:[(0,q.jsx)(Ek,{children:n}),`+K`]}),radius:`md`,...e.actionProps,children:(0,q.jsxs)(cU,{align:`center`,gap:`xs`,children:[(0,q.jsx)(_$,{size:16,color:`gray`}),(0,q.jsx)(cU,{visibleFrom:`sm`,miw:192,children:(0,q.jsx)(bU,{size:`xs`,c:`dimmed`,children:`Search...`})})]})})},K0=()=>Xk(YZ),q0=[`red`,`pink`,`grape`,`violet`,`indigo`,`blue`,`cyan`,`teal`,`green`,`lime`,`yellow`,`orange`],J0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],Y0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],X0=[{label:`System`,value:``},{label:`Inter`,value:`Inter, sans-serif`},{label:`Mono`,value:`ui-monospace, SFMono-Regular, Menlo, monospace`},{label:`Serif`,value:`Georgia, 'Times New Roman', serif`}],Z0=()=>{let[,,e]=F1(),t=K0(),n=sF(),{overrides:r,setOverrides:i}=e,a=r.primaryColor||n.primaryColor,o=r.radius||n.defaultRadius||`md`,s=r.fontFamily||``,c=r.fontSize||`md`,l=r.scale||`md`,u=e=>{i({...r,...e})};return(0,q.jsxs)(cU,{direction:`column`,gap:`lg`,children:[(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{fw:500,size:`sm`,children:`Primary Color`}),(0,q.jsx)(kX,{cols:6,spacing:`xs`,children:q0.map(e=>(0,q.jsx)(cU,{justify:`center`,children:(0,q.jsx)(AG,{color:n.colors[e]?.[6]??e,onClick:()=>u({primaryColor:e}),style:{cursor:`pointer`},size:32,children:a===e&&(0,q.jsx)(qQ,{size:14,color:`white`})})},e))})]}),(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{fw:500,size:`sm`,children:`Border Radius`}),(0,q.jsx)(cU,{gap:`xs`,children:J0.map(e=>(0,q.jsx)(P0,{variant:String(o)===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({radius:e.value}),children:e.label},e.value))})]}),(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{fw:500,size:`sm`,children:`Font Family`}),(0,q.jsx)(xX,{data:X0,value:s,onChange:e=>u({fontFamily:e??``}),allowDeselect:!1})]}),(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{fw:500,size:`sm`,children:`Font Size`}),(0,q.jsx)(cU,{gap:`xs`,children:Y0.map(e=>(0,q.jsx)(P0,{variant:c===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({fontSize:e.value}),children:e.label},e.value))})]}),(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{fw:500,size:`sm`,children:`Scale`}),(0,q.jsx)(cU,{gap:`xs`,children:Y0.map(e=>(0,q.jsx)(P0,{variant:l===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({scale:e.value}),children:e.label},e.value))})]}),(0,q.jsxs)(cU,{justify:`space-between`,children:[(0,q.jsx)(P0,{variant:`subtle`,color:`red`,onClick:()=>e.resetOverrides(),children:`Reset`}),(0,q.jsx)(P0,{variant:`default`,px:`xl`,onClick:()=>t.close(),children:`OK`})]})]})},Q0=e=>{let{expert:t,...n}=e,[r,i]=F1(),a=IA(PZ)[0],o=K0(),s=a.map((e,t)=>({label:e.name,onClick:()=>i({index:t}),active:r.name===e.name}));return t&&s.push({type:`divider`},{label:`Customize...`,onClick:()=>{o.open({title:`Customize Theme`,content:(0,q.jsx)(Z0,{})})}}),(0,q.jsx)(P0,{variant:`default`,icon:m$,menu:{items:s},...n})},$0=e=>{let[t,n]=IA(ij);return(0,q.jsx)(P0,{icon:t.collapsed?c$:s$,visibleFrom:`md`,variant:`default`,onClick:()=>{n({...t,collapsed:!t.collapsed})},tooltip:{position:`right`,label:t.collapsed?`Show sidebar`:`Hide sidebar`},...e})},e2=(0,K.forwardRef)((e,t)=>{let{fill:n,center:r,centerX:i,centerY:a,col:o,ground:s,surface:c,elevated:l,rounded:u,bordered:d,borderedTop:f,borderedBottom:p,shadowed:m,overflow:h,form:g,..._}=e;if(n&&(_.flex??=1),o&&(_.direction??=`column`),r&&(_.align??=`center`,_.justify??=`center`),i&&(_.justify??=`center`),a&&(_.align??=`center`),s?_.bg=`var(--alepha-ground)`:c?_.bg=`var(--alepha-surface)`:l&&(_.bg=`var(--alepha-elevated)`),u&&(_.bdrs=u===!0?`md`:u),d&&(_.bd=`1px solid var(--alepha-border)`),f&&(_.style={borderTop:`1px solid var(--alepha-border)`,..._.style??{}}),p&&(_.style={borderBottom:`1px solid var(--alepha-border)`,..._.style??{}}),m&&(_.className=`${_.className??``} shadow-${m===!0?`md`:m}`.trim()),h&&(_.className=`${_.className??``} overflow-auto`.trim()),g){let e=typeof g==`object`?g:{};return e instanceof VA&&(e=e.props),(0,q.jsx)(cU,{ref:t,component:`form`,...e,..._})}return(0,q.jsx)(cU,{ref:t,..._})});e2.displayName=`Flex`;var t2=e=>{let{items:t=[]}=e,n=r1(),r=(e,t)=>{if(e.can&&!e.can())return null;if(`type`in e){if(e.type===`burger`)return(0,q.jsx)(H0,{},t);if(e.type===`dark`)return(0,q.jsx)(U0,{...e.props},t);if(e.type===`theme`)return(0,q.jsx)(Q0,{...e.props},t);if(e.type===`search`)return(0,q.jsx)(G0,{...e.props},t);if(e.type===`lang`)return(0,q.jsx)(W0,{...e.props},t);if(e.type===`spacer`)return(0,q.jsx)(e2,{w:16},t);if(e.type===`divider`)return(0,q.jsx)(CK,{orientation:`vertical`},t);if(e.type===`logo`)return i(e,t);if(e.type===`back`)return a(e,t)}return`element`in e?e.element:null},i=(e,t)=>{let{src:n,text:r,icon:i,href:a,height:o=32,width:s,fontWeight:c=700,fontSize:l=`lg`}=e.props??{},u=n?(0,q.jsx)(rq,{src:n,h:o,w:s,fit:`contain`}):i?typeof i==`function`?(0,q.jsx)(i,{}):i:r?(0,q.jsx)(a2,{fw:c,size:l,children:r}):null;return a?(0,q.jsx)(CU,{component:i1,href:a,underline:`never`,c:`inherit`,children:u},t):(0,q.jsx)(e2,{children:u},t)},a=(e,t)=>{let{label:r=`Back`,iconOnly:i=!0,href:a,icon:o}=e.props??{},s=o?typeof o==`function`?(0,q.jsx)(o,{size:18}):o:(0,q.jsx)(WQ,{size:18}),c=()=>{a?n.push(a):n.back()};return i?(0,q.jsx)(P0,{icon:s,variant:`subtle`,color:`gray`,onClick:c,tooltip:{label:r,position:`bottom`}},t):(0,q.jsx)(P0,{leftSection:s,variant:`subtle`,color:`gray`,onClick:c,children:r},t)},o=t.filter(e=>e.position===`left`),s=t.filter(e=>e.position===`center`),c=t.filter(e=>e.position===`right`),l=(0,q.jsxs)(e2,{h:`100%`,align:`center`,px:e.container?0:`md`,justify:`space-between`,...e.flexProps,children:[(0,q.jsx)(e2,{flex:1,children:o.map((e,t)=>(0,q.jsx)(e2,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))}),(0,q.jsx)(e2,{children:s.map((e,t)=>(0,q.jsx)(e2,{mx:`md`,align:`center`,children:r(e,t)},t))}),(0,q.jsx)(e2,{flex:1,align:`center`,justify:`end`,children:c.map((e,t)=>(0,q.jsx)(e2,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))})]});return e.container?(0,q.jsx)(yK,{h:`100%`,...typeof e.container==`boolean`?{}:e.container,children:l}):l},n2=(0,K.forwardRef)((e,t)=>(0,q.jsx)(yK,{ref:t,...e}));n2.displayName=`Container`;var r2=(e,t)=>e?(0,K.isValidElement)(e)?e:N0(e)?(0,q.jsx)(e,{size:t??M0.sizes.icon.md}):e:null,i2={primary:`blue`,info:`cyan`,success:`green`,warning:`yellow`,danger:`red`},a2=(0,K.forwardRef)((e,t)=>{let{intent:n,bold:r,italic:i,light:a,muted:o,small:s,uppercase:c,capitalize:l,center:u,monospace:d,title:f,...p}=e;return n&&(p.c??=i2[n]),r&&(p.fw??=700),a&&(p.fw??=300),i&&(p.fs??=`italic`),o&&(p.c??=`dimmed`),s&&(p.size??=`xs`),c&&(p.tt??=`uppercase`),l&&(p.tt??=`capitalize`),u&&(p.ta??=`center`),d&&(p.ff??=`monospace`),f&&(p.size??=`xl`),(0,q.jsx)(bU,{ref:t,...p})});a2.displayName=`Text`;var o2=e=>{let t=r1(),n=()=>{e.onItemClick?.(e.item),e.item.onClick?.()},r=e.item.children&&e.item.children.length>0,i=r?{on:`hover`,position:`right`,menuProps:{arrowPosition:`center`,arrowSize:10,withArrow:!0},items:[{type:`label`,label:e.item.label},...e.item.children.filter(e=>!e.can||e.can()).map(e=>({label:e.label,icon:r2(e.icon,M0.sizes.icon.sm),href:e.href,active:e.href?t.isActive(e.href,{startWith:e.activeStartsWith}):void 0}))]}:void 0;return(0,q.jsx)(e2,{w:`100%`,justify:`center`,pos:`relative`,children:(0,q.jsx)(P0,{size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,variant:`default`,propsActive:{variant:`outline`},tooltip:r?void 0:{label:e.item.label,position:`right`},onClick:r?void 0:n,icon:r2(e.item.icon,M0.sizes.icon.sm)??(0,q.jsx)(y$,{size:M0.sizes.icon.sm}),href:r?void 0:e.item.href,target:r?void 0:e.item.target,menu:i,...e.item.actionProps})})},s2=e=>{let t=r1(),n=(0,K.useCallback)(e=>{if(!e.children)return!1;for(let r of e.children)if(r.href&&t.isActive(r.href)||n(r))return!0;return!1},[]),[r,i]=(0,K.useState)(n(e.item));return FA({"react:transition:end":()=>{n(e.item)&&i(!0)}},[]),e.level>2?null:(0,q.jsxs)(e2,{direction:`column`,ps:e.level===0?0:32,pos:`relative`,children:[(0,q.jsx)(P0,{w:`100%`,justify:`space-between`,href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,fw:`normal`,variant:`default`,propsActive:{variant:`outline`},radius:e.item.theme?.radius??e.theme.button?.radius??`md`,onClick:t=>{e.item.target||t.preventDefault(),e.item.children&&e.item.children.length>0?i(!r):(e.onItemClick?.(e.item),e.item.onClick?.())},leftSection:(0,q.jsxs)(e2,{w:`100%`,align:`center`,gap:`sm`,children:[r2(e.item.icon,M0.sizes.icon.sm),(0,q.jsx)(e2,{direction:`column`,children:(0,q.jsx)(e2,{children:e.item.label})})]}),rightSection:e.item.children?(0,q.jsx)(e2,{children:r?(0,q.jsx)(JQ,{size:14}):(0,q.jsx)(YQ,{size:14})}):e.item.rightSection,...e.item.actionProps}),e.item.children&&r&&(0,q.jsxs)(e2,{direction:`column`,"data-parent-level":e.level,gap:2,py:2,children:[(0,q.jsx)(e2,{style:{position:`absolute`,width:1,background:`linear-gradient(to bottom, transparent, var(--mantine-color-default-border), transparent)`,top:48,left:20+32*e.level,bottom:16}}),e.item.children.filter(e=>!e.can||e.can()).map((t,n)=>(0,q.jsx)(s2,{item:t,level:e.level+1,onItemClick:e.onItemClick,theme:e.theme},n))]})]})},c2=e=>{let t=r1(),n=(e,t,n)=>(0,q.jsx)(e2,{h:1,bg:`var(--mantine-color-default-border)`,my:`xs`,mx:t?`calc(-1 * var(--mantine-spacing-md))`:n?0:`sm`},e),r=(t,i,a)=>{if(`type`in t){if(t.type===`spacer`)return a?null:(0,q.jsx)(e2,{h:16},i);if(t.type===`divider`)return n(i,t.fill,a);if(t.type===`search`)return(0,q.jsx)(e2,{mb:`xs`,w:`100%`,justify:`center`,pos:`relative`,children:(0,q.jsx)(G0,{collapsed:a})},i);if(t.type===`toggle`)return(0,q.jsx)($0,{},i);if(t.type===`section`)return t.children&&t.children.length>0&&!t.children.some(e=>!(`can`in e)||!e.can||e.can())?null:a?(0,q.jsx)(K.Fragment,{children:t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))},i):(0,q.jsxs)(K.Fragment,{children:[(0,q.jsxs)(e2,{mt:`md`,align:`center`,gap:`xs`,children:[r2(t.icon,M0.sizes.icon.sm),(0,q.jsx)(a2,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:`bold`,children:t.label})]}),t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))]},i)}return`element`in t?(0,q.jsx)(K.Fragment,{children:t.element},i):t.can&&!t.can()||t.children&&t.children.length>0&&!t.children.some(e=>!e.can||e.can())?null:a?(0,q.jsx)(o2,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i):(0,q.jsx)(s2,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i)},i=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){let n=t.concretePages.filter(e=>!e.can||e.can()).map(e=>({label:e.label??e.name,icon:r2(e.icon),href:t.path(e.name)}));if(typeof e.autoPopulateMenu==`object`&&e.autoPopulateMenu.startsWith){let t=e.autoPopulateMenu.startsWith;return n.filter(e=>e.href?.startsWith(t))}return n}return[]},a=e.items?e.gap??8:`xs`,o=(0,K.useMemo)(()=>i(),[e.items,e.autoPopulateMenu]),s=t=>(0,q.jsxs)(e2,{flex:1,py:`md`,direction:`column`,...e.flexProps,children:[(0,q.jsx)(e2,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`top`).map((e,n)=>r(e,n,t))}),(0,q.jsx)(e2,{gap:a,px:`md`,direction:`column`,flex:1,children:o.filter(e=>!e.position).map((e,n)=>r(e,n,t))}),(0,q.jsx)(e2,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`bottom`).map((e,n)=>r(e,n,t))})]});return e.collapsed?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(e2,{flex:1,direction:`column`,visibleFrom:`md`,children:s(!0)}),(0,q.jsx)(e2,{flex:1,direction:`column`,hiddenFrom:`md`,children:s(!1)})]}):s(!1)},l2=e=>{let t=r1(),[n,r]=IA(ij),i=e.sidebarProps?.collapsed===void 0?n.collapsed:e.sidebarProps.collapsed,{collapsedWidth:a,expandedWidth:o}=n,s=()=>{if(e.noSidebarWhen?.paths){for(let n of e.noSidebarWhen.paths)if(t.isActive(n,{startWith:!0}))return!1}return!0},[c,l]=(0,K.useState)(s());FA({"react:transition:end":()=>{l(s())},"react:transition:begin":()=>{r({...n,closed:!0})}},[n]);let u=[{position:`left`,type:`burger`}],d={...e.appBarProps};d.container??=e.container;let f=c&&e.sidebarProps!==void 0,p=e.appBarProps||e.header,m=e.footer;e.footerHeight&&(m??=(0,q.jsx)(e2,{h:e.footerHeight}));let h=e.headerHeight??60,g=e.footerHeight??24,_=p?h:0,v=m?g:0,y=i?a:o,b=e.children??(0,q.jsx)(U$,{});return(0,q.jsxs)(qU,{layout:`alt`,w:`100%`,h:`100vh`,flex:1,header:p?{height:h}:void 0,navbar:f?{width:{base:y},breakpoint:`md`,collapsed:{mobile:n.closed}}:void 0,footer:m?{height:g}:void 0,...e.appShellProps,children:[p&&(0,q.jsx)(qU.Header,{...e.appShellHeaderProps,children:e.header??(0,q.jsx)(t2,{items:u,...d})}),f&&(0,q.jsxs)(qU.Navbar,{...e.appShellNavbarProps,children:[e.navbarHeader?(0,q.jsx)(e2,{style:{borderBottom:`1px solid var(--mantine-color-default-border)`},h:_,children:e.navbarHeader({collapsed:i})}):null,(0,q.jsx)(c2,{...e.sidebarProps??{},collapsed:i}),e.navbarFooter?(0,q.jsx)(e2,{style:{borderTop:`1px solid var(--mantine-color-default-border)`},h:v,children:e.navbarFooter}):null]}),(0,q.jsx)(qU.Main,{display:`flex`,bg:`var(--alepha-ground)`,pos:`relative`,h:e.fill?`100%`:`inherit`,...e.appShellMainProps,children:e.container?(0,q.jsx)(n2,{...typeof e.container==`boolean`?{}:e.container,children:b}):b}),m&&(0,q.jsx)(qU.Footer,{...e.appShellFooterProps,children:m})]})},u2=(e,t)=>{let n=e.input.props.id,r=e.label??(`title`in e.input.schema&&typeof e.input.schema.title==`string`?e.input.schema.title:void 0)??S6(e.input.path),i=e.description??(`description`in e.input.schema&&typeof e.input.schema.description==`string`?e.input.schema.description:void 0),a=t.error&&t.error instanceof tk?t.error.value.message:void 0,o=e.icon?(0,K.isValidElement)(e.icon)?e.icon:(0,K.createElement)(e.icon,{size:M0.sizes.icon.sm}):b6({type:e.input.schema&&`type`in e.input.schema?String(e.input.schema.type):void 0,format:e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,name:e.input.props.name,isEnum:e.input.schema&&`enum`in e.input.schema&&!!e.input.schema.enum,isArray:e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,size:e.size}),s=e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,c=e.input.required,l=e.input.schema,u=e.input.props?.[`data-testid`],d={label:r,description:i,error:a,required:c,disabled:!1,...u?{"data-testid":u}:{}};return`minLength`in l&&typeof l.minLength==`number`&&(d.minLength=l.minLength),`maxLength`in l&&typeof l.maxLength==`number`&&(d.maxLength=l.maxLength),`minimum`in l&&typeof l.minimum==`number`&&(d.minimum=l.minimum),`maximum`in l&&typeof l.maximum==`number`&&(d.maximum=l.maximum),{id:n,icon:o,format:s,schema:e.input.schema,inputProps:d}},d2=e=>{let t=Yk(),n=(0,K.useRef)(0),[r,i]=(0,K.useState)(()=>{let t=e?.initialValue;return Array.isArray(t)?t.map(e=>({key:n.current++,value:e})):[]}),a=(0,K.useCallback)(e=>{if(!Array.isArray(e)){i([]);return}i(t=>t.length===e.length&&t.every((t,n)=>t.value===e[n])?t:(n.current=0,e.map(e=>({key:n.current++,value:e}))))},[]);return(0,K.useEffect)(()=>{if(!e?.form)return;let n=e.form.id,r=e.path;return t.events.on(`form:change`,e=>{e.id===n&&e.path===r&&a(e.value)})},[t,e,a]),{items:r,setItems:(0,K.useCallback)(t=>{i(t),e?.set(t.map(e=>e.value))},[e]),nextKey:(0,K.useCallback)(()=>n.current++,[])}},f2=(e,t,n,r,i,a)=>({schema:t,path:`${e.path}/${n}`,required:!1,form:e.form,initialValue:i,props:{id:`${e.props.id}-${n}`,name:`${e.props.name}[${n}]`},set:a}),p2=(e,t,n,r,i,a,o)=>({schema:t.properties[n],path:`${e.path}/${r}/${n}`,required:t.required?.includes(n)??!1,form:e.form,initialValue:a?.[n],props:{id:`${e.props.id}-${r}-${n}`,name:`${e.props.name}[${r}].${n}`},set:e=>o(n,e)}),m2=e=>{let{inputProps:t}=u2(e,{}),{items:n,setItems:r,nextKey:i}=d2(e.input);if(!e.input?.props)return null;let a=e.input.schema;if(!a||!(`items`in a))return null;let o=a.items,s=o&&`properties`in o,{min:c=0,max:l=1/0,columns:u=1}=e,d=()=>{if(n.length>=l)return;let e;if(s){e={};let t=o;for(let[n,r]of Object.entries(t.properties))`default`in r&&(e[n]=r.default)}else e=``;r([...n,{key:i(),value:e}])},f=e=>{n.length<=c||r(n.filter((t,n)=>n!==e))},p=(e,t)=>{let i=[...n];i[e]={...i[e],value:t},r(i)},m=(e,t,i)=>{let a=[...n];a[e]={...a[e],value:{...a[e].value,[t]:i}},r(a)},h=12/u,g=s?o:null,_=g?Object.keys(g.properties):[],v=()=>(0,q.jsxs)(cU,{direction:`column`,gap:`sm`,children:[n.map((t,r)=>(0,q.jsxs)(cU,{gap:`sm`,align:`flex-start`,p:`xs`,bg:M0.colors.surface,style:{borderRadius:`var(--mantine-radius-sm)`},children:[e.sortable&&(0,q.jsx)(oH,{variant:`subtle`,color:`gray`,style:{cursor:`grab`},children:(0,q.jsx)(t$,{size:16})}),g?(0,q.jsx)(KK,{style:{flex:1},gutter:`sm`,children:_.map(n=>{let i=e.controlProps?.[n]??{},a=p2(e.input,g,n,r,t.key,t.value,(e,t)=>m(r,e,t));return(0,q.jsx)(KK.Col,{span:h,children:(0,q.jsx)(s6,{input:a,...i})},n)})}):(0,q.jsx)(cU,{style:{flex:1},children:(0,q.jsx)(s6,{input:f2(e.input,o,r,t.key,t.value,e=>p(r,e)),...e.itemControlProps})}),(0,q.jsx)(oH,{variant:`subtle`,color:`red`,onClick:()=>f(r),disabled:n.length<=c,children:(0,q.jsx)(S$,{size:16})})]},t.key)),(0,q.jsxs)(iV,{onClick:d,disabled:n.length>=l,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 12px`,borderRadius:`var(--mantine-radius-sm)`,border:`1px dashed var(--mantine-color-dimmed)`,color:`var(--mantine-color-dimmed)`,fontSize:`var(--mantine-font-size-sm)`,cursor:n.length>=l?`not-allowed`:`pointer`,opacity:n.length>=l?.5:1,transition:`all 150ms ease`},onMouseEnter:e=>{n.length<l&&(e.currentTarget.style.borderColor=`var(--mantine-color-blue-filled)`,e.currentTarget.style.color=`var(--mantine-color-blue-filled)`,e.currentTarget.style.background=`var(--mantine-color-blue-light)`)},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--mantine-color-dimmed)`,e.currentTarget.style.color=`var(--mantine-color-dimmed)`,e.currentTarget.style.background=`transparent`},children:[(0,q.jsx)(g$,{size:14}),e.addLabel??`Add`]})]});return e.variant===`plain`?(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[t.label&&(0,q.jsx)(bU,{size:`sm`,fw:500,children:t.label}),t.description&&(0,q.jsx)(bU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,q.jsx)(bU,{size:`sm`,c:`red`,children:t.error})]}):(0,q.jsx)(DK,{legend:t.label,children:(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[t.description&&(0,q.jsx)(bU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,q.jsx)(bU,{size:`sm`,c:`red`,children:t.error})]})})};function h2({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function g2({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=h2({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?g2({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function _2(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function v2(e){return e.current?.map(e=>e.map(e=>e.length))}function y2({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=_2(i.key);a&&(i.preventDefault(),g2({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:v2(e)}))}function b2(e,t){let n=e?(0,J.default)(e):(0,J.default)();if(t===``)return n.format(`YYYY-MM-DD HH:mm:ss`);let[r,i,a=0]=t.split(`:`).map(Number);return n=n.set(`hour`,r),n=n.set(`minute`,i),n=n.set(`second`,a),n=n.set(`millisecond`,0),n.format(`YYYY-MM-DD HH:mm:ss`)}function x2(e){return e==null||e===``?e:(0,J.default)(e).format(`YYYY-MM-DD`)}function S2(e){return e==null||e===``?e:(0,J.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function C2({minDate:e,maxDate:t}){let n=(0,J.default)();return!e&&!t?x2(n):e&&(0,J.default)(n).isBefore(e)?x2(e):t&&(0,J.default)(n).isAfter(t)?x2(t):x2(n)}function w2(e,t,n){return!e&&!t?S2(n):e&&(0,J.default)(n).isBefore(e)?S2(e):t&&(0,J.default)(n).isAfter(t)?S2(t):S2(n)}var T2=(0,K.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function E2(){let e=(0,K.useContext)(T2),t=(0,K.useCallback)(t=>t||e.locale,[e.locale]),n=(0,K.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,K.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,K.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function D2({value:e,type:t,withTime:n}){let r=n?S2:x2;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} \u2013 ${n}`:`${t} \u2013`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function O2({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,q.jsx)(`input`,{type:`hidden`,value:D2({value:e,type:t,withTime:i}),name:n,form:r})}O2.displayName=`@mantine/dates/HiddenDatesInput`;var k2={input:`m_468e7eda`},A2=$((e,t)=>{let n=Z(`TimeInput`,null,e),{classNames:r,styles:i,unstyled:a,vars:o,withSeconds:s,minTime:c,maxTime:l,value:u,onChange:d,step:f,...p}=n,{resolvedClassNames:m,resolvedStyles:h}=OF({classNames:r,styles:i,props:n}),g=e=>{if(c!==void 0||l!==void 0){let[t,n,r]=e.split(`:`).map(Number);if(c){let[e,i,a]=c.split(`:`).map(Number);if(t<e||t===e&&n<i||s&&t===e&&n===i&&r<a)return-1}if(l){let[e,i,a]=l.split(`:`).map(Number);if(t>e||t===e&&n>i||s&&t===e&&n===i&&r>a)return 1}}return 0},_=e=>{if(n.onBlur?.(e),c!==void 0||l!==void 0){let t=e.currentTarget.value;if(t){let r=g(t);r===1?(l&&(e.currentTarget.value=l),n.onChange?.(e)):r===-1&&(c&&(e.currentTarget.value=c),n.onChange?.(e))}}};return(0,q.jsx)(aU,{classNames:{...m,input:_P(k2.input,m?.input)},styles:h,unstyled:a,ref:t,value:u,step:f??(s?1:60),...p,onChange:d,onBlur:_,type:`time`,__staticSelector:`TimeInput`})});A2.classes=aU.classes,A2.displayName=`@mantine/dates/TimeInput`;function j2(e){return e<10?`0${e}`:`${e}`}var M2=e=>Number(e.toFixed(0)[0]),N2=(0,K.forwardRef)(({value:e,min:t,max:n,onChange:r,focusable:i,step:a,onNextInput:o,onPreviousInput:s,onFocus:c,readOnly:l,allowTemporaryZero:u=!1,placeholder:d=`--`,...f},p)=>{let m=M2(n),h=n+1-a,g=e=>{if(l)return;let i=e.replace(/\D/g,``);if(i!==``){let a=parseInt(i,10),s=u&&a===0&&t>0?0:ZM(a,t,n);r(s),(s>m||e.startsWith(`00`))&&o?.()}},_=i=>{l||((i.key===`0`||i.key===`Num0`)&&e===0&&(i.preventDefault(),o?.()),i.key===`Home`&&(i.preventDefault(),r(t)),i.key===`End`&&(i.preventDefault(),r(n)),(i.key===`Backspace`||i.key===`Delete`)&&(i.preventDefault(),e===null?s?.():r(null)),i.key===`ArrowRight`&&(i.preventDefault(),o?.()),i.key===`ArrowLeft`&&(i.preventDefault(),s?.()),i.key===`ArrowUp`&&(i.preventDefault(),r(e===null?t:ZM(e+a,t,h))),i.key===`ArrowDown`&&(i.preventDefault(),r(e===null?h:ZM(e-a,t,h))))};return(0,q.jsx)(`input`,{ref:p,type:`text`,role:`spinbutton`,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:`numeric`,placeholder:d,value:e===null?``:j2(e),onChange:e=>g(e.currentTarget.value),onKeyDown:_,onFocus:e=>{e.currentTarget.select(),c?.(e)},onClick:e=>{e.stopPropagation(),e.currentTarget.select()},onMouseDown:e=>e.stopPropagation(),...f})});N2.displayName=`@mantine/dates/SpinInput`;var[P2,F2]=kM(`TimeInput component was not found in the component tree`),I2=(0,K.forwardRef)(({labels:e,value:t,onChange:n,className:r,style:i,onPreviousInput:a,readOnly:o,onMouseDown:s,onTouchStart:c,inputType:l,...u},d)=>{let f=F2(),p=r=>{o||(r.key===`Home`&&(r.preventDefault(),n(e.am)),r.key===`End`&&(r.preventDefault(),n(e.pm)),(r.key===`Backspace`||r.key===`Delete`)&&(r.preventDefault(),t===null?a?.():n(null)),r.key===`ArrowLeft`&&(r.preventDefault(),a?.()),(r.key===`ArrowUp`||r.key===`ArrowDown`)&&(r.preventDefault(),n(t===e.am?e.pm:e.am)),r.code===`KeyA`&&(r.preventDefault(),n(e.am)),r.code===`KeyP`&&(r.preventDefault(),n(e.pm)))};if(l===`input`){let e=t||`--`,n=e.length+1;return(0,q.jsx)(`input`,{...f.getStyles(`field`,{className:r,style:i}),ref:d,value:e,size:n,readOnly:!0,onChange:()=>{},onClick:(e=>e.stopPropagation()),onKeyDown:p,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u})}return(0,q.jsxs)(`select`,{...f.getStyles(`field`,{className:r,style:i}),ref:d,value:t||``,onChange:e=>!o&&n(e.target.value||null),onClick:e=>e.stopPropagation(),onKeyDown:p,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u,children:[(0,q.jsx)(`option`,{value:``,children:`--`}),(0,q.jsx)(`option`,{value:e.am,children:e.am}),(0,q.jsx)(`option`,{value:e.pm,children:e.pm})]})});I2.displayName=`@mantine/dates/AmPmInput`;function L2({value:e,active:t,onSelect:n}){let r=F2();return(0,q.jsx)(iV,{mod:{active:t},onClick:()=>n(e),onMouseDown:e=>e.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles(`control`),children:typeof e==`number`?j2(e):e})}L2.displayName=`@mantine/dates/TimeControl`;function R2({labels:e,value:t,onSelect:n}){let r=F2(),i=[e.am,e.pm].map(e=>(0,q.jsx)(L2,{value:e,active:t===e,onSelect:n},e));return(0,q.jsx)(`div`,{...r.getStyles(`controlsList`),children:i})}R2.displayName=`@mantine/dates/AmPmControlsList`;function z2(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function B2(e,t,n){let r=[];for(let i=e;i<=t;i+=n)r.push(i);return r}function V2({min:e,max:t,step:n,value:r,onSelect:i,reversed:a}){let o=F2(),s=(0,K.useRef)(null),c=B2(e,t,n),l=(a?c.reverse():c).map(e=>(0,q.jsx)(L2,{value:e,active:r===e,onSelect:i},e));return(0,K.useEffect)(()=>{r!==null&&requestAnimationFrame(()=>{let e=s.current?.querySelector(`[data-value="${r}"]`);z2(e,s.current)||e?.scrollIntoView({block:`nearest`})})},[r]),(0,q.jsx)(eV,{h:o.maxDropdownContentHeight,type:`never`,viewportRef:s,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,q.jsx)(`div`,{...o.getStyles(`controlsList`),children:l})})}V2.displayName=`@mantine/dates/TimeControlsList`;var H2={fieldsRoot:`m_7a8f1e6d`,fieldsGroup:`m_d6bb0a54`,controlsList:`m_b97ecb26`,controlsListGroup:`m_31fe42f9`,dropdown:`m_9c4817c3`,control:`m_154c536b`,presetControl:`m_7be09d0c`,presetsGroup:`m_7d00001d`,presetsGroupLabel:`m_d8d918d7`,field:`m_6b43ba88`};function U2(e){let[t=null,n=null,r=null]=e.split(`:`).map(Number);return{hours:t,minutes:n,seconds:r}}function W2({time:e,compare:t,withSeconds:n}){let r=U2(e),i=U2(t);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function G2(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:``}`}function K2({value:e,format:t,amPmLabels:n,withSeconds:r}){let i=U2(typeof e==`string`?e:G2(e,r));if(i.hours===null||i.minutes===null)return null;if(t===`24h`)return`${j2(i.hours)}:${j2(i.minutes)}${r?`:${j2(i.seconds||0)}`:``}`;let a=i.hours>=12;return`${i.hours%12==0?12:i.hours%12}:${j2(i.minutes)}${r?`:${j2(i.seconds||0)}`:``} ${a?n.pm:n.am}`}function q2({value:e,format:t=`24h`,amPmLabels:n={am:`AM`,pm:`PM`},withSeconds:r=!1}){return(0,q.jsx)(q.Fragment,{children:K2({value:e,format:t,amPmLabels:n,withSeconds:r})})}q2.displayName=`@mantine/dates/TimeValue`;function J2({value:e,active:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=F2();return(0,q.jsx)(iV,{mod:{active:t},onClick:()=>n(e),...o.getStyles(`presetControl`),children:(0,q.jsx)(q2,{withSeconds:a,value:e,format:r,amPmLabels:i})})}J2.displayName=`@mantine/dates/TimePresetControl`;function Y2({value:e,data:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=F2(),s=t.values.map(t=>(0,q.jsx)(J2,{value:t,format:r,amPmLabels:i,withSeconds:a,active:W2({time:t,compare:e,withSeconds:a}),onChange:n},t));return(0,q.jsxs)(`div`,{...o.getStyles(`presetsGroup`),children:[(0,q.jsx)(`div`,{...o.getStyles(`presetsGroupLabel`),children:t.label}),(0,q.jsx)(kX,{cols:a?2:3,spacing:4,children:s})]})}Y2.displayName=`@mantine/dates/TimePresetGroup`;function X2({presets:e,format:t,amPmLabels:n,withSeconds:r,value:i,onChange:a}){let o=F2();if(e.length===0)return null;if(typeof e[0]==`string`){let s=e.map(e=>(0,q.jsx)(J2,{value:e,format:t,amPmLabels:n,withSeconds:r,active:W2({time:e,compare:i,withSeconds:r}),onChange:a},e));return(0,q.jsx)(eV.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,q.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:(0,q.jsx)(kX,{cols:r?2:3,spacing:4,children:s})})})}let s=e.map((e,o)=>(0,q.jsx)(Y2,{data:e,value:i,format:t,amPmLabels:n,withSeconds:r,onChange:a},o));return(0,q.jsx)(eV.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,q.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:s})})}X2.displayName=`@mantine/dates/TimePresets`;function Z2(e){let[t=0,n=0,r=0]=e.split(`:`).map(Number);return t*3600+n*60+r}function Q2(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return{timeString:`${j2(t)}:${j2(n)}:${j2(r)}`,hours:t,minutes:n,seconds:r}}function $2(e,t,n){let r=Z2(e),i=t?Z2(t):-1/0,a=n?Z2(n):1/0;return Q2(Math.max(i,Math.min(r,a)))}function e4({hours:e,minutes:t,seconds:n,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};let i=e>=12?r.pm:r.am;return{hours:e%12==0?12:e%12,minutes:typeof t==`number`?t:null,seconds:typeof n==`number`?n:null,amPm:i}}function t4({time:e,format:t,amPmLabels:n}){if(e===``)return{hours:null,minutes:null,seconds:null,amPm:null};let{hours:r,minutes:i,seconds:a}=U2(e),o={hours:r,minutes:i,seconds:a};return t===`12h`?e4({...o,amPmLabels:n}):{...o,amPm:null}}function n4({hours:e,minutes:t,seconds:n,amPm:r,amPmLabels:i,withSeconds:a}){let o=e;return r===i.pm&&e!==12?o+=12:r===i.am&&e===12&&(o=0),`${j2(o)}:${j2(t)}${a?`:${j2(n||0)}`:``}`}function r4({hours:e,minutes:t,seconds:n,format:r,withSeconds:i,amPm:a,amPmLabels:o}){return e===null||t===null||i&&n===null?{valid:!1,value:``}:r===`24h`?{valid:!0,value:`${j2(e)}:${j2(t)}${i?`:${j2(n)}`:``}`}:a===null?{valid:!1,value:``}:{valid:!0,value:n4({hours:e,minutes:t,seconds:n,amPm:a,amPmLabels:o,withSeconds:i})}}function i4({value:e,defaultValue:t,onChange:n,format:r,amPmLabels:i,withSeconds:a=!1,min:o,max:s,clearable:c,readOnly:l,disabled:u,pasteSplit:d}){let f=t4({time:e||t||``,amPmLabels:i,format:r}),p=r4({hours:f.hours,minutes:f.minutes,seconds:f.seconds,format:r,withSeconds:a,amPm:f.amPm,amPmLabels:i}),m=(0,K.useRef)(!0),h=(0,K.useRef)(!p.valid),[g,_]=(0,K.useState)(f.hours),[v,y]=(0,K.useState)(f.minutes),[b,x]=(0,K.useState)(f.seconds),[S,C]=(0,K.useState)(f.amPm),w=c&&!l&&!u&&(g!==null||v!==null||b!==null||S!==null),T=(0,K.useRef)(null),E=(0,K.useRef)(null),D=(0,K.useRef)(null),O=(0,K.useRef)(null),k=e=>{e===`hours`&&T.current?.focus(),e===`minutes`&&E.current?.focus(),e===`seconds`&&D.current?.focus(),e===`amPm`&&O.current?.focus()},A=(e,t)=>{let o=r4({hours:g,minutes:v,seconds:b,amPm:S,[e]:t,format:r,withSeconds:a,amPmLabels:i});o.valid?(m.current=!1,h.current=!1,e===`hours`&&_(t),e===`minutes`&&y(t),e===`seconds`&&x(t),e===`amPm`&&C(t),n?.(o.value)):(m.current=!1,h.current||=(n?.(``),!0))},j=e=>{m.current=!1;let t=t4({time:e,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm),h.current=!r4({...t,format:r,withSeconds:a,amPmLabels:i}).valid,n?.(e)},M=e=>{let t=e;r===`12h`&&typeof e==`number`&&e>12&&(t=(e-1)%12+1),_(t),A(`hours`,t),k(`hours`)},N=e=>{y(e),A(`minutes`,e),k(`minutes`)},P=e=>{x(e),A(`seconds`,e),k(`seconds`)},ee=e=>{C(e),A(`amPm`,e),k(`amPm`)},te=()=>{m.current=!1,_(null),y(null),x(null),C(null),n?.(``),h.current=!0,k(`hours`)},ne=e=>{e.preventDefault();let t=e.clipboardData.getData(`text`),c=(d||t4)({time:t,format:r,amPmLabels:i}),l=r4({...c,format:r,withSeconds:a,amPmLabels:i});if(l.valid){m.current=!1;let e=$2(l.value,o||`00:00:00`,s||`23:59:59`);n?.(e.timeString),_(c.hours),y(c.minutes),x(c.seconds),C(c.amPm)}},F=r4({hours:g,minutes:v,seconds:b,format:r,withSeconds:a,amPm:S,amPmLabels:i});return lN(()=>{if(e===``){m.current=!1,_(null),y(null),x(null),C(null),m.current=!0;return}if(m.current&&typeof e==`string`){let t=t4({time:e||``,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm)}m.current=!0},[e]),{refs:{hours:T,minutes:E,seconds:D,amPm:O},values:{hours:g,minutes:v,seconds:b,amPm:S},setHours:M,setMinutes:N,setSeconds:P,setAmPm:ee,focus:k,clear:te,onPaste:ne,setTimeString:j,isClearable:w,hiddenInputValue:F.value}}var a4={hoursStep:1,minutesStep:1,secondsStep:1,format:`24h`,amPmLabels:{am:`AM`,pm:`PM`},pasteSplit:t4,maxDropdownContentHeight:200,hoursPlaceholder:`--`,minutesPlaceholder:`--`,secondsPlaceholder:`--`},o4=hP((e,{size:t})=>({dropdown:{"--control-font-size":UM(t)}})),s4=$((e,t)=>{let n=Z(`TimePicker`,a4,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,onClick:l,format:u,value:d,defaultValue:f,onChange:p,hoursStep:m,minutesStep:h,secondsStep:g,withSeconds:_,hoursInputLabel:v,minutesInputLabel:y,secondsInputLabel:b,amPmInputLabel:x,amPmLabels:S,clearable:C,onMouseDown:w,onFocusCapture:T,onBlurCapture:E,min:D,max:O,popoverProps:k,withDropdown:A,rightSection:j,onFocus:M,onBlur:N,clearButtonProps:P,hoursInputProps:ee,minutesInputProps:te,secondsInputProps:ne,amPmSelectProps:F,readOnly:I,disabled:L,size:re,name:ie,form:ae,hiddenInputProps:oe,labelProps:se,pasteSplit:ce,hoursRef:le,minutesRef:ue,secondsRef:R,amPmRef:de,presets:fe,maxDropdownContentHeight:pe,scrollAreaProps:me,attributes:he,reverseTimeControlsList:ge,hoursPlaceholder:_e,minutesPlaceholder:ve,secondsPlaceholder:ye,...be}=n,{resolvedClassNames:xe,resolvedStyles:z}=OF({classNames:r,styles:o,props:n}),Se=X({name:`TimePicker`,classes:H2,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:he,vars:c,varsResolver:o4}),B=i4({value:d,defaultValue:f,onChange:p,format:u,amPmLabels:S,withSeconds:_,min:D,max:O,clearable:C,disabled:L,readOnly:I,pasteSplit:ce}),V=kN(B.refs.hours,le),Ce=kN(B.refs.minutes,ue),we=kN(B.refs.seconds,R),Te=kN(B.refs.amPm,de),Ee=TN(),De=(0,K.useRef)(!1),[Oe,ke]=(0,K.useState)(!1),Ae=e=>{De.current||(De.current=!0,M?.(e))},je=e=>{if(!e.currentTarget.contains(e.relatedTarget)){let t=B.values,n=r4({...t,format:u,amPmLabels:S,withSeconds:!!_});if(n.valid&&(D||O)){let e=$2(n.value,D,O);e.timeString!==n.value&&B.setTimeString(e.timeString)}De.current=!1,N?.(e)}};return(0,q.jsx)(P2,{value:{getStyles:Se,scrollAreaProps:me,maxDropdownContentHeight:pe},children:(0,q.jsxs)(WV,{opened:Oe,transitionProps:{duration:0},position:`bottom-start`,withRoles:!1,disabled:L||I||!A,...k,children:[(0,q.jsx)(WV.Target,{children:(0,q.jsxs)(aU,{component:`div`,size:re,disabled:L,ref:t,onClick:e=>{l?.(e),B.focus(`hours`)},onMouseDown:e=>{e.preventDefault(),w?.(e)},onFocusCapture:e=>{ke(!0),T?.(e)},onBlurCapture:e=>{ke(!1),E?.(e)},rightSection:j||B.isClearable&&(0,q.jsx)(dH,{...P,size:re,onClick:e=>{B.clear(),P?.onClick?.(e)},onMouseDown:e=>{e.preventDefault(),P?.onMouseDown?.(e)}}),labelProps:{htmlFor:Ee,...se},style:a,className:i,classNames:xe,styles:z,__staticSelector:`TimePicker`,...be,children:[(0,q.jsx)(`div`,{...Se(`fieldsRoot`),dir:`ltr`,children:(0,q.jsxs)(`div`,{...Se(`fieldsGroup`),onBlur:je,children:[(0,q.jsx)(N2,{id:Ee,...ee,...Se(`field`,{className:ee?.className,style:ee?.style}),value:B.values.hours,onChange:B.setHours,onNextInput:()=>B.focus(`minutes`),min:u===`12h`?1:0,max:u===`12h`?12:23,allowTemporaryZero:u===`12h`,focusable:!0,step:m,ref:V,"aria-label":v,readOnly:I,disabled:L,onPaste:B.onPaste,onFocus:e=>{Ae(e),ee?.onFocus?.(e)},onBlur:e=>{let t=e.currentTarget.value;u===`12h`&&(t?parseInt(t,10):null)===0&&B.setHours(12),ee?.onBlur?.(e)},placeholder:_e}),(0,q.jsx)(`span`,{children:`:`}),(0,q.jsx)(N2,{...te,...Se(`field`,{className:te?.className,style:te?.style}),value:B.values.minutes,onChange:B.setMinutes,min:0,max:59,focusable:!0,step:h,ref:Ce,onPreviousInput:()=>B.focus(`hours`),onNextInput:()=>_?B.focus(`seconds`):B.focus(`amPm`),"aria-label":y,tabIndex:-1,readOnly:I,disabled:L,onPaste:B.onPaste,onFocus:e=>{Ae(e),te?.onFocus?.(e)},placeholder:ve}),_&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{children:`:`}),(0,q.jsx)(N2,{...ne,...Se(`field`,{className:ne?.className,style:ne?.style}),value:B.values.seconds,onChange:B.setSeconds,min:0,max:59,focusable:!0,step:g,ref:we,onPreviousInput:()=>B.focus(`minutes`),onNextInput:()=>B.focus(`amPm`),"aria-label":b,tabIndex:-1,readOnly:I,disabled:L,onPaste:B.onPaste,onFocus:e=>{Ae(e),ne?.onFocus?.(e)},placeholder:ye})]}),u===`12h`&&(0,q.jsx)(I2,{...F,inputType:A?`input`:`select`,labels:S,value:B.values.amPm,onChange:B.setAmPm,ref:Te,"aria-label":x,onPreviousInput:()=>_?B.focus(`seconds`):B.focus(`minutes`),readOnly:I,disabled:L,tabIndex:-1,onPaste:B.onPaste,onFocus:e=>{Ae(e),F?.onFocus?.(e)}})]})}),(0,q.jsx)(`input`,{type:`hidden`,name:ie,form:ae,value:B.hiddenInputValue,...oe})]})}),(0,q.jsx)(WV.Dropdown,{...Se(`dropdown`),onMouseDown:e=>e.preventDefault(),children:fe?(0,q.jsx)(X2,{value:B.hiddenInputValue,onChange:B.setTimeString,format:u,presets:fe,amPmLabels:S,withSeconds:_||!1}):(0,q.jsxs)(`div`,{...Se(`controlsListGroup`),children:[(0,q.jsx)(V2,{min:u===`12h`?1:0,max:u===`12h`?12:23,step:m,value:B.values.hours,onSelect:B.setHours,reversed:ge}),(0,q.jsx)(V2,{min:0,max:59,step:h,value:B.values.minutes,onSelect:B.setMinutes,reversed:ge}),_&&(0,q.jsx)(V2,{min:0,max:59,step:g,value:B.values.seconds,onSelect:B.setSeconds,reversed:ge}),u===`12h`&&(0,q.jsx)(R2,{labels:S,value:B.values.amPm,onSelect:B.setAmPm})]})})]})})});s4.displayName=`@mantine/dates/TimePicker`,s4.classes=H2;var c4={day:`m_396ce5cb`},l4=hP((e,{size:t})=>({day:{"--day-size":BM(t,`day-size`)}})),u4=$((e,t)=>{let n=Z(`Day`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,date:l,disabled:u,__staticSelector:d,weekend:f,outside:p,selected:m,renderDay:h,inRange:g,firstInRange:_,lastInRange:v,hidden:y,static:b,highlightToday:x,attributes:S,...C}=n;return(0,q.jsx)(iV,{...X({name:d||`Day`,classes:c4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:S,vars:c,varsResolver:l4,rootSelector:`day`})(`day`,{style:y?{display:`none`}:void 0}),component:b?`div`:`button`,ref:t,disabled:u,"data-today":(0,J.default)(l).isSame(new Date,`day`)||void 0,"data-hidden":y||void 0,"data-highlight-today":x||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!p&&f||void 0,"data-outside":!u&&p||void 0,"data-selected":!u&&m||void 0,"data-in-range":g&&!u||void 0,"data-first-in-range":_&&!u||void 0,"data-last-in-range":v&&!u||void 0,"data-static":b||void 0,unstyled:s,...C,children:h?.(l)||(0,J.default)(l).date()})});u4.classes=c4,u4.displayName=`@mantine/dates/Day`;function d4({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,J.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,J.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,J.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var f4={weekday:`m_18a3eca`},p4=hP((e,{size:t})=>({weekdaysRow:{"--wr-fz":UM(t),"--wr-spacing":VM(t)}})),m4=$((e,t)=>{let n=Z(`WeekdaysRow`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,cellComponent:f=`th`,__staticSelector:p,withWeekNumbers:m,attributes:h,...g}=n,_=X({name:p||`WeekdaysRow`,classes:f4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:p4,rootSelector:`weekdaysRow`}),v=E2(),y=d4({locale:v.getLocale(l),format:d,firstDayOfWeek:v.getFirstDayOfWeek(u)}).map((e,t)=>(0,q.jsx)(f,{..._(`weekday`),children:e},t));return(0,q.jsxs)(Q,{component:`tr`,ref:t,..._(`weekdaysRow`),...g,children:[m&&(0,q.jsx)(f,{..._(`weekday`),children:`#`}),y]})});m4.classes=f4,m4.displayName=`@mantine/dates/WeekdaysRow`;function h4(e,t=1){let n=(0,J.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function g4(e,t=1){let n=(0,J.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function _4({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,J.default)((0,J.default)(e).subtract((0,J.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=h4(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,J.default)(g4(i,t));for(;(0,J.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,J.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function v4(e,t){return(0,J.default)(e).format(`YYYY-MM`)===(0,J.default)(t).format(`YYYY-MM`)}function y4(e,t){return t?(0,J.default)(e).isAfter((0,J.default)(t).subtract(1,`day`),`day`):!0}function b4(e,t){return t?(0,J.default)(e).isBefore((0,J.default)(t).add(1,`day`),`day`):!0}function x4({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>b4(e,n)&&y4(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||v4(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,J.default)().isSame(e,`date`))||s[0]}var S4=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);J.default.extend(S4.default);function C4(e){return(0,J.default)(e.find(e=>(0,J.default)(e).day()===1)).isoWeek()}var w4={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},T4={withCellSpacing:!0},E4=hP((e,{size:t})=>({weekNumber:{"--wn-fz":UM(t),"--wn-size":BM(t,`wn-size`)}})),D4=$((e,t)=>{let n=Z(`Month`,T4,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,locale:u,firstDayOfWeek:d,weekdayFormat:f,month:p,weekendDays:m,getDayProps:h,excludeDate:g,minDate:_,maxDate:v,renderDay:y,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:S,static:C,__getDayRef:w,__onDayKeyDown:T,__onDayClick:E,__onDayMouseEnter:D,__preventFocus:O,__stopPropagation:k,withCellSpacing:A,size:j,highlightToday:M,withWeekNumbers:N,attributes:P,...ee}=n,te=X({name:l||`Month`,classes:w4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:P,vars:c,varsResolver:E4,rootSelector:`month`}),ne=E2(),F=_4({month:p,firstDayOfWeek:ne.getFirstDayOfWeek(d),consistentWeeks:ne.consistentWeeks}),I=x4({dates:F,minDate:x2(_),maxDate:x2(v),getDayProps:h,excludeDate:g,hideOutsideDates:b,month:p}),{resolvedClassNames:L,resolvedStyles:re}=OF({classNames:r,styles:o,props:n}),ie=F.map((e,t)=>{let n=e.map((e,n)=>{let r=!v4(e,p),i=S?.(e)||(0,J.default)(e).locale(u||ne.locale).format(`D MMMM YYYY`),a=h?.(e),o=(0,J.default)(e).isSame(I,`date`);return(0,q.jsx)(`td`,{...te(`monthCell`),"data-with-spacing":A||void 0,children:(0,q.jsx)(u4,{__staticSelector:l||`Month`,classNames:L,styles:re,unstyled:s,"data-mantine-stop-propagation":k||void 0,highlightToday:M,renderDay:y,date:e,size:j,weekend:ne.getWeekendDays(m).includes((0,J.default)(e).get(`day`)),outside:r,hidden:b?r:!1,"aria-label":i,static:C,disabled:g?.(e)||!b4(e,x2(v))||!y4(e,x2(_)),ref:e=>{e&&w?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),T?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),D?.(t,e)},onClick:t=>{a?.onClick?.(t),E?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),O&&e.preventDefault()},tabIndex:O||!o?-1:0})},e.toString())});return(0,q.jsxs)(`tr`,{...te(`monthRow`),children:[N&&(0,q.jsx)(`td`,{...te(`weekNumber`),children:C4(e)}),n]},t)});return(0,q.jsxs)(Q,{component:`table`,...te(`month`),size:j,ref:t,...ee,children:[!x&&(0,q.jsx)(`thead`,{...te(`monthThead`),children:(0,q.jsx)(m4,{__staticSelector:l||`Month`,locale:u,firstDayOfWeek:d,weekdayFormat:f,size:j,classNames:L,styles:re,unstyled:s,withWeekNumbers:N})}),(0,q.jsx)(`tbody`,{...te(`monthTbody`),children:ie})]})});D4.classes=w4,D4.displayName=`@mantine/dates/Month`;var O4={pickerControl:`m_dc6a3c71`},k4=hP((e,{size:t})=>({pickerControl:{"--dpc-fz":UM(t),"--dpc-size":BM(t,`dpc-size`)}})),A4=$((e,t)=>{let n=Z(`PickerControl`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,firstInRange:l,lastInRange:u,inRange:d,__staticSelector:f,selected:p,disabled:m,attributes:h,...g}=n;return(0,q.jsx)(iV,{...X({name:f||`PickerControl`,classes:O4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:h,vars:c,varsResolver:k4,rootSelector:`pickerControl`})(`pickerControl`),ref:t,unstyled:s,"data-picker-control":!0,"data-selected":p&&!m||void 0,"data-disabled":m||void 0,"data-in-range":d&&!m&&!p||void 0,"data-first-in-range":l&&!m||void 0,"data-last-in-range":u&&!m||void 0,disabled:m,...g})});A4.classes=O4,A4.displayName=`@mantine/dates/PickerControl`;function j4({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,J.default)(e).isBefore(t,`year`)||n&&(0,J.default)(e).isAfter(n,`year`))}function M4({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!j4({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,J.default)().isSame(e,`year`))||i[0]}function N4(e){let t=(0,J.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,J.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var P4={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},F4={yearsListFormat:`YYYY`,withCellSpacing:!0},I4=$((e,t)=>{let n=Z(`YearsList`,F4,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,decade:l,yearsListFormat:u,locale:d,minDate:f,maxDate:p,getYearControlProps:m,__staticSelector:h,__getControlRef:g,__onControlKeyDown:_,__onControlClick:v,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:x,withCellSpacing:S,size:C,attributes:w,...T}=n,E=X({name:h||`YearsList`,classes:P4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:w,vars:c,rootSelector:`yearsList`}),D=E2(),O=N4(l),k=M4({years:O,minDate:f,maxDate:p,getYearControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,J.default)(e).isSame(k,`year`);return(0,q.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":S||void 0,children:(0,q.jsx)(A4,{...E(`yearsListControl`),size:C,unstyled:s,"data-mantine-stop-propagation":x||void 0,disabled:j4({year:e,minDate:f,maxDate:p}),ref:e=>{e&&g?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),_?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),v?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),y?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),b&&e.preventDefault()},tabIndex:b||!i?-1:0,children:r?.children??(0,J.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,q.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,q.jsx)(Q,{component:`table`,ref:t,size:C,...E(`yearsList`),...T,children:(0,q.jsx)(`tbody`,{children:A})})});I4.classes=P4,I4.displayName=`@mantine/dates/YearsList`;function L4({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,J.default)(e).isBefore(t,`month`)||n&&(0,J.default)(e).isAfter(n,`month`))}function R4({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!L4({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,J.default)().isSame(e,`month`))||i[0]}function z4(e){let t=(0,J.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,J.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var B4={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},V4={monthsListFormat:`MMM`,withCellSpacing:!0},H4=$((e,t)=>{let n=Z(`MonthsList`,V4,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,year:u,monthsListFormat:d,locale:f,minDate:p,maxDate:m,getMonthControlProps:h,__getControlRef:g,__onControlKeyDown:_,__onControlClick:v,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:x,withCellSpacing:S,size:C,attributes:w,...T}=n,E=X({name:l||`MonthsList`,classes:B4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:w,vars:c,rootSelector:`monthsList`}),D=E2(),O=z4(u),k=R4({months:O,minDate:x2(p),maxDate:x2(m),getMonthControlProps:h}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=h?.(e),i=(0,J.default)(e).isSame(k,`month`);return(0,q.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":S||void 0,children:(0,q.jsx)(A4,{...E(`monthsListControl`),size:C,unstyled:s,__staticSelector:l||`MonthsList`,"data-mantine-stop-propagation":x||void 0,disabled:L4({month:e,minDate:x2(p),maxDate:x2(m)}),ref:e=>{e&&g?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),_?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),v?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),y?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),b&&e.preventDefault()},tabIndex:b||!i?-1:0,children:r?.children??(0,J.default)(e).locale(D.getLocale(f)).format(d)})},n)});return(0,q.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,q.jsx)(Q,{component:`table`,ref:t,size:C,...E(`monthsList`),...T,children:(0,q.jsx)(`tbody`,{children:A})})});H4.classes=B4,H4.displayName=`@mantine/dates/MonthsList`;var U4={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},W4={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},G4=hP((e,{size:t})=>({calendarHeader:{"--dch-control-size":BM(t,`dch-control-size`),"--dch-fz":UM(t)}})),K4=$((e,t)=>{let n=Z(`CalendarHeader`,W4,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,nextIcon:l,previousIcon:u,nextLabel:d,previousLabel:f,onNext:p,onPrevious:m,onLevelClick:h,label:g,nextDisabled:_,previousDisabled:v,hasNextLevel:y,levelControlAriaLabel:b,withNext:x,withPrevious:S,headerControlsOrder:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=n,k=X({name:w||`CalendarHeader`,classes:U4,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:D,vars:c,varsResolver:G4,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=S&&(0,K.createElement)(iV,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":f,onClick:m,unstyled:s,onMouseDown:A,disabled:v,"data-disabled":v||void 0,tabIndex:T||v?-1:0,"data-mantine-stop-propagation":E||void 0},u||(0,q.jsx)(hU,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,K.createElement)(iV,{component:y?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:y?h:void 0,unstyled:s,onMouseDown:y?A:void 0,disabled:!y,"data-static":!y||void 0,"aria-label":b,tabIndex:T||!y?-1:0,"data-mantine-stop-propagation":E||void 0},g),N=x&&(0,K.createElement)(iV,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":d,onClick:p,unstyled:s,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,q.jsx)(hU,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=C.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,q.jsx)(Q,{...k(`calendarHeader`),ref:t,...O,children:P})});K4.classes=U4,K4.displayName=`@mantine/dates/CalendarHeader`;function q4(e){let t=N4(e);return[t[0][0],t[3][0]]}var J4={decadeLabelFormat:`YYYY`},Y4=$((e,t)=>{let{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,nextDisabled:b,previousDisabled:x,levelControlAriaLabel:S,withNext:C,withPrevious:w,headerControlsOrder:T,decadeLabelFormat:E,classNames:D,styles:O,unstyled:k,__staticSelector:A,__stopPropagation:j,size:M,attributes:N,...P}=Z(`DecadeLevel`,J4,e),ee=E2(),[te,ne]=q4(n),F={__staticSelector:A||`DecadeLevel`,classNames:D,styles:O,unstyled:k,size:M,attributes:N},I=typeof b==`boolean`?b:a?!(0,J.default)(ne).endOf(`year`).isBefore(a):!1,L=typeof x==`boolean`?x:i?!(0,J.default)(te).startOf(`year`).isAfter(i):!1,re=(e,t)=>(0,J.default)(e).locale(r||ee.locale).format(t);return(0,q.jsxs)(Q,{"data-decade-level":!0,size:M,ref:t,...P,children:[(0,q.jsx)(K4,{label:typeof E==`function`?E(te,ne):`${re(te,E)} \u2013 ${re(ne,E)}`,__preventFocus:p,__stopPropagation:j,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,nextDisabled:I,previousDisabled:L,hasNextLevel:!1,levelControlAriaLabel:S,withNext:C,withPrevious:w,headerControlsOrder:T,...F}),(0,q.jsx)(I4,{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,__preventFocus:p,__stopPropagation:j,withCellSpacing:f,...F})]})});Y4.classes={...I4.classes,...K4.classes},Y4.displayName=`@mantine/dates/DecadeLevel`;var X4={yearLabelFormat:`YYYY`},Z4=$((e,t)=>{let{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,onLevelClick:b,nextDisabled:x,previousDisabled:S,hasNextLevel:C,levelControlAriaLabel:w,withNext:T,withPrevious:E,headerControlsOrder:D,yearLabelFormat:O,__staticSelector:k,__stopPropagation:A,size:j,classNames:M,styles:N,unstyled:P,attributes:ee,...te}=Z(`YearLevel`,X4,e),ne=E2(),F={__staticSelector:k||`YearLevel`,classNames:M,styles:N,unstyled:P,size:j,attributes:ee},I=typeof x==`boolean`?x:a?!(0,J.default)(n).endOf(`year`).isBefore(a):!1,L=typeof S==`boolean`?S:i?!(0,J.default)(n).startOf(`year`).isAfter(i):!1;return(0,q.jsxs)(Q,{"data-year-level":!0,size:j,ref:t,...te,children:[(0,q.jsx)(K4,{label:typeof O==`function`?O(n):(0,J.default)(n).locale(r||ne.locale).format(O),__preventFocus:p,__stopPropagation:A,nextIcon:m,previousIcon:h,nextLabel:g,previousLabel:_,onNext:v,onPrevious:y,onLevelClick:b,nextDisabled:I,previousDisabled:L,hasNextLevel:C,levelControlAriaLabel:w,withNext:T,withPrevious:E,headerControlsOrder:D,...F}),(0,q.jsx)(H4,{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__getControlRef:c,__onControlKeyDown:l,__onControlClick:u,__onControlMouseEnter:d,__preventFocus:p,__stopPropagation:A,withCellSpacing:f,...F})]})});Z4.classes={...K4.classes,...H4.classes},Z4.displayName=`@mantine/dates/YearLevel`;var Q4={monthLabelFormat:`MMMM YYYY`},$4=$((e,t)=>{let{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:h,__onDayKeyDown:g,__onDayClick:_,__onDayMouseEnter:v,withCellSpacing:y,highlightToday:b,withWeekNumbers:x,__preventFocus:S,__stopPropagation:C,nextIcon:w,previousIcon:T,nextLabel:E,previousLabel:D,onNext:O,onPrevious:k,onLevelClick:A,nextDisabled:j,previousDisabled:M,hasNextLevel:N,levelControlAriaLabel:P,withNext:ee,withPrevious:te,headerControlsOrder:ne,monthLabelFormat:F,classNames:I,styles:L,unstyled:re,__staticSelector:ie,size:ae,static:oe,attributes:se,...ce}=Z(`MonthLevel`,Q4,e),le=E2(),ue={__staticSelector:ie||`MonthLevel`,classNames:I,styles:L,unstyled:re,size:ae,attributes:se},R=typeof j==`boolean`?j:u?!(0,J.default)(n).endOf(`month`).isBefore(u):!1,de=typeof M==`boolean`?M:l?!(0,J.default)(n).startOf(`month`).isAfter(l):!1;return(0,q.jsxs)(Q,{"data-month-level":!0,size:ae,ref:t,...ce,children:[(0,q.jsx)(K4,{label:typeof F==`function`?F(n):(0,J.default)(n).locale(r||le.locale).format(F),__preventFocus:S,__stopPropagation:C,nextIcon:w,previousIcon:T,nextLabel:E,previousLabel:D,onNext:O,onPrevious:k,onLevelClick:A,nextDisabled:R,previousDisabled:de,hasNextLevel:N,levelControlAriaLabel:P,withNext:ee,withPrevious:te,headerControlsOrder:ne,...ue}),(0,q.jsx)(D4,{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:h,__onDayKeyDown:g,__onDayClick:_,__onDayMouseEnter:v,__preventFocus:S,__stopPropagation:C,static:oe,withCellSpacing:y,highlightToday:b,withWeekNumbers:x,...ue})]})});$4.classes={...D4.classes,...K4.classes},$4.displayName=`@mantine/dates/MonthLevel`;var e3={levelsGroup:`m_30b26e33`},t3=$((e,t)=>{let n=Z(`LevelsGroup`,null,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,__staticSelector:l,attributes:u,...d}=n;return(0,q.jsx)(Q,{ref:t,...X({name:l||`LevelsGroup`,classes:e3,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:u,vars:c,rootSelector:`levelsGroup`})(`levelsGroup`),...d})});t3.classes=e3,t3.displayName=`@mantine/dates/LevelsGroup`;var n3={numberOfColumns:1},r3=$((e,t)=>{let{decade:n,locale:r,minDate:i,maxDate:a,yearsListFormat:o,getYearControlProps:s,__onControlClick:c,__onControlMouseEnter:l,withCellSpacing:u,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,nextDisabled:v,previousDisabled:y,headerControlsOrder:b,classNames:x,styles:S,unstyled:C,__staticSelector:w,__stopPropagation:T,numberOfColumns:E,levelControlAriaLabel:D,decadeLabelFormat:O,size:k,vars:A,attributes:j,...M}=Z(`DecadeLevelGroup`,n3,e),N=(0,K.useRef)([]),P=Array(E).fill(0).map((e,t)=>{let A=(0,J.default)(n).add(t*10,`years`).format(`YYYY-MM-DD`);return(0,q.jsx)(Y4,{size:k,yearsListFormat:o,decade:A,withNext:t===E-1,withPrevious:t===0,decadeLabelFormat:O,__onControlClick:c,__onControlMouseEnter:l,__onControlKeyDown:(e,n)=>y2({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,n,r)=>{Array.isArray(N.current[t])||(N.current[t]=[]),Array.isArray(N.current[t][e])||(N.current[t][e]=[]),N.current[t][e][n]=r},levelControlAriaLabel:typeof D==`function`?D(A):D,locale:r,minDate:i,maxDate:a,__preventFocus:d,__stopPropagation:T,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,nextDisabled:v,previousDisabled:y,getYearControlProps:s,__staticSelector:w||`DecadeLevelGroup`,classNames:x,styles:S,unstyled:C,withCellSpacing:u,headerControlsOrder:b,attributes:j},t)});return(0,q.jsx)(t3,{classNames:x,styles:S,__staticSelector:w||`DecadeLevelGroup`,ref:t,size:k,unstyled:C,attributes:j,...M,children:P})});r3.classes={...t3.classes,...Y4.classes},r3.displayName=`@mantine/dates/DecadeLevelGroup`;var i3={numberOfColumns:1},a3=$((e,t)=>{let{year:n,locale:r,minDate:i,maxDate:a,monthsListFormat:o,getMonthControlProps:s,__onControlClick:c,__onControlMouseEnter:l,withCellSpacing:u,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,onLevelClick:v,nextDisabled:y,previousDisabled:b,hasNextLevel:x,headerControlsOrder:S,classNames:C,styles:w,unstyled:T,__staticSelector:E,__stopPropagation:D,numberOfColumns:O,levelControlAriaLabel:k,yearLabelFormat:A,size:j,vars:M,attributes:N,...P}=Z(`YearLevelGroup`,i3,e),ee=(0,K.useRef)([]),te=Array(O).fill(0).map((e,t)=>{let M=(0,J.default)(n).add(t,`years`).format(`YYYY-MM-DD`);return(0,q.jsx)(Z4,{size:j,monthsListFormat:o,year:M,withNext:t===O-1,withPrevious:t===0,yearLabelFormat:A,__stopPropagation:D,__onControlClick:c,__onControlMouseEnter:l,__onControlKeyDown:(e,n)=>y2({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:ee}),__getControlRef:(e,n,r)=>{Array.isArray(ee.current[t])||(ee.current[t]=[]),Array.isArray(ee.current[t][e])||(ee.current[t][e]=[]),ee.current[t][e][n]=r},levelControlAriaLabel:typeof k==`function`?k(M):k,locale:r,minDate:i,maxDate:a,__preventFocus:d,nextIcon:f,previousIcon:p,nextLabel:m,previousLabel:h,onNext:g,onPrevious:_,onLevelClick:v,nextDisabled:y,previousDisabled:b,hasNextLevel:x,getMonthControlProps:s,classNames:C,styles:w,unstyled:T,__staticSelector:E||`YearLevelGroup`,withCellSpacing:u,headerControlsOrder:S,attributes:N},t)});return(0,q.jsx)(t3,{classNames:C,styles:w,__staticSelector:E||`YearLevelGroup`,ref:t,size:j,unstyled:T,attributes:N,...P,children:te})});a3.classes={...Z4.classes,...t3.classes},a3.displayName=`@mantine/dates/YearLevelGroup`;var o3={numberOfColumns:1},s3=$((e,t)=>{let{month:n,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__onDayClick:h,__onDayMouseEnter:g,withCellSpacing:_,highlightToday:v,withWeekNumbers:y,__preventFocus:b,nextIcon:x,previousIcon:S,nextLabel:C,previousLabel:w,onNext:T,onPrevious:E,onLevelClick:D,nextDisabled:O,previousDisabled:k,hasNextLevel:A,headerControlsOrder:j,classNames:M,styles:N,unstyled:P,numberOfColumns:ee,levelControlAriaLabel:te,monthLabelFormat:ne,__staticSelector:F,__stopPropagation:I,size:L,static:re,vars:ie,attributes:ae,...oe}=Z(`MonthLevelGroup`,o3,e),se=(0,K.useRef)([]),ce=Array(ee).fill(0).map((e,t)=>{let ie=(0,J.default)(n).add(t,`months`).format(`YYYY-MM-DD`);return(0,q.jsx)($4,{month:ie,withNext:t===ee-1,withPrevious:t===0,monthLabelFormat:ne,__stopPropagation:I,__onDayClick:h,__onDayMouseEnter:g,__onDayKeyDown:(e,n)=>y2({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:se}),__getDayRef:(e,n,r)=>{Array.isArray(se.current[t])||(se.current[t]=[]),Array.isArray(se.current[t][e])||(se.current[t][e]=[]),se.current[t][e][n]=r},levelControlAriaLabel:typeof te==`function`?te(ie):te,locale:r,firstDayOfWeek:i,weekdayFormat:a,weekendDays:o,getDayProps:s,excludeDate:c,minDate:l,maxDate:u,renderDay:d,hideOutsideDates:f,hideWeekdays:p,getDayAriaLabel:m,__preventFocus:b,nextIcon:x,previousIcon:S,nextLabel:C,previousLabel:w,onNext:T,onPrevious:E,onLevelClick:D,nextDisabled:O,previousDisabled:k,hasNextLevel:A,classNames:M,styles:N,unstyled:P,__staticSelector:F||`MonthLevelGroup`,size:L,static:re,withCellSpacing:_,highlightToday:v,withWeekNumbers:y,headerControlsOrder:j,attributes:ae},t)});return(0,q.jsx)(t3,{classNames:M,styles:N,__staticSelector:F||`MonthLevelGroup`,ref:t,size:L,attributes:ae,...oe,children:ce})});s3.classes={...t3.classes,...$4.classes},s3.displayName=`@mantine/dates/MonthLevelGroup`;var c3={input:`m_6fa5e2aa`},l3=$((e,t)=>{let{inputProps:n,wrapperProps:r,placeholder:i,classNames:a,styles:o,unstyled:s,popoverProps:c,modalProps:l,dropdownType:u,children:d,formattedValue:f,dropdownHandlers:p,dropdownOpened:m,onClick:h,clearable:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=rU(`PickerInputBase`,{size:`sm`},e),A=(0,q.jsx)(nU.ClearButton,{onClick:_,unstyled:s,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),p.close()};return(0,q.jsxs)(q.Fragment,{children:[u===`modal`&&!x&&(0,q.jsx)(dJ,{opened:m,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:s,...l,children:d}),(0,q.jsx)(nU.Wrapper,{...r,children:(0,q.jsxs)(WV,{position:`bottom-start`,opened:m,trapFocus:!0,returnFocus:!1,unstyled:s,onClose:D,...c,disabled:c?.disabled||u===`modal`||x,onChange:e=>{e||(c?.onClose?.(),j())},children:[(0,q.jsx)(WV.Target,{children:(0,q.jsx)(nU,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{h?.(e),p.toggle()},__clearSection:A,__clearable:g&&b&&!x&&!S,rightSection:y,...n,ref:t,classNames:{...a,input:_P(c3.input,a?.input)},...k,children:f||(0,q.jsx)(nU.Placeholder,{error:n.error,unstyled:s,classNames:a,styles:o,__staticSelector:n.__staticSelector,children:i})})}),(0,q.jsx)(WV.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),(0,q.jsx)(O2,{value:C,name:w,form:T,type:E,withTime:O})]})});l3.classes=c3,l3.displayName=`@mantine/dates/PickerInputBase`;var u3=e=>e===`range`?[null,null]:e===`multiple`?[]:null,d3=(e,t)=>{let n=t?S2:x2;return Array.isArray(e)?e.map(n):n(e)};function f3({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,K.useRef)(e),[o,s,c]=MN({value:d3(t,i),defaultValue:d3(n,i),finalValue:u3(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?u3(e):n,s(l))),[l,s,c]}function p3(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function m3(e){return e===0?`month`:e===1?`year`:`decade`}function h3(e,t,n){return m3(ZM(p3(e,0),p3(t,0),p3(n,2)))}var g3={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},_3=$((e,t)=>{let n=Z(`Calendar`,g3,e),{vars:r,maxLevel:i,minLevel:a,defaultLevel:o,level:s,onLevelChange:c,date:l,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:p,ariaLabels:m,nextLabel:h,previousLabel:g,onYearSelect:_,onMonthSelect:v,onYearMouseEnter:y,onMonthMouseEnter:b,headerControlsOrder:x,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:C,__setDateRef:w,__setLevelRef:T,firstDayOfWeek:E,weekdayFormat:D,weekendDays:O,getDayProps:k,excludeDate:A,renderDay:j,hideOutsideDates:M,hideWeekdays:N,getDayAriaLabel:P,monthLabelFormat:ee,nextIcon:te,previousIcon:ne,__onDayClick:F,__onDayMouseEnter:I,withCellSpacing:L,highlightToday:re,withWeekNumbers:ie,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,classNames:R,styles:de,unstyled:fe,minDate:pe,maxDate:me,locale:he,__staticSelector:ge,size:_e,__preventFocus:ve,__stopPropagation:ye,onNextDecade:be,onPreviousDecade:xe,onNextYear:z,onPreviousYear:Se,onNextMonth:B,onPreviousMonth:V,static:Ce,enableKeyboardNavigation:we,attributes:Te,...Ee}=n,{resolvedClassNames:De,resolvedStyles:Oe}=OF({classNames:R,styles:de,props:n}),[ke,Ae]=MN({value:s?h3(s,a,i):void 0,defaultValue:o?h3(o,a,i):void 0,finalValue:h3(void 0,a,i),onChange:c}),[je,Me]=f3({type:`default`,value:x2(l),defaultValue:x2(u),onChange:d});(0,K.useImperativeHandle)(w,()=>e=>{Me(e)}),(0,K.useImperativeHandle)(T,()=>e=>{Ae(e)});let Ne={__staticSelector:ge||`Calendar`,styles:Oe,classNames:De,unstyled:fe,size:_e,attributes:Te},Pe=p||f||1,H=new Date,Fe=pe&&(0,J.default)(H).isAfter(pe)?pe:(0,J.default)(H).format(`YYYY-MM-DD`),Ie=je||Fe,Le=()=>{let e=(0,J.default)(Ie).add(Pe,`month`).format(`YYYY-MM-DD`);B?.(e),Me(e)},Re=()=>{let e=(0,J.default)(Ie).subtract(Pe,`month`).format(`YYYY-MM-DD`);V?.(e),Me(e)},ze=()=>{let e=(0,J.default)(Ie).add(Pe,`year`).format(`YYYY-MM-DD`);z?.(e),Me(e)},Be=()=>{let e=(0,J.default)(Ie).subtract(Pe,`year`).format(`YYYY-MM-DD`);Se?.(e),Me(e)},Ve=()=>{let e=(0,J.default)(Ie).add(10*Pe,`year`).format(`YYYY-MM-DD`);be?.(e),Me(e)},He=()=>{let e=(0,J.default)(Ie).subtract(10*Pe,`year`).format(`YYYY-MM-DD`);xe?.(e),Me(e)},Ue=(0,K.useRef)(null);return(0,K.useEffect)(()=>{if(!we||Ce)return;let e=e=>{if(!Ue.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),He()):t&&(e.preventDefault(),Be());break;case`ArrowDown`:t&&n?(e.preventDefault(),Ve()):t&&(e.preventDefault(),ze());break;case`y`:case`Y`:ke===`month`&&(e.preventDefault(),Ae(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[we,Ce,ke,ze,Be,Ve,He]),(0,q.jsxs)(Q,{ref:e=>{Ue.current=e,typeof t==`function`?t(e):t&&(t.current=e)},size:_e,"data-calendar":!0,...Ee,children:[ke===`month`&&(0,q.jsx)(s3,{month:Ie,minDate:pe,maxDate:me,firstDayOfWeek:E,weekdayFormat:D,weekendDays:O,getDayProps:k,excludeDate:A,renderDay:j,hideOutsideDates:M,hideWeekdays:N,getDayAriaLabel:P,onNext:Le,onPrevious:Re,hasNextLevel:i!==`month`,onLevelClick:()=>Ae(`year`),numberOfColumns:f,locale:he,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth??h,nextIcon:te,previousLabel:m?.previousMonth??g,previousIcon:ne,monthLabelFormat:ee,__onDayClick:F,__onDayMouseEnter:I,__preventFocus:ve,__stopPropagation:ye,static:Ce,withCellSpacing:L,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:x,...Ne}),ke===`year`&&(0,q.jsx)(a3,{year:Ie,numberOfColumns:f,minDate:pe,maxDate:me,monthsListFormat:ae,getMonthControlProps:oe,locale:he,onNext:ze,onPrevious:Be,hasNextLevel:i!==`month`&&i!==`year`,onLevelClick:()=>Ae(`decade`),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear??h,nextIcon:te,previousLabel:m?.previousYear??g,previousIcon:ne,yearLabelFormat:se,__onControlMouseEnter:b,__onControlClick:(e,t)=>{C&&Me(t),Ae(h3(`month`,a,i)),v?.(t)},__preventFocus:ve,__stopPropagation:ye,withCellSpacing:L,headerControlsOrder:x,...Ne}),ke===`decade`&&(0,q.jsx)(r3,{decade:Ie,minDate:pe,maxDate:me,yearsListFormat:ce,getYearControlProps:le,locale:he,onNext:Ve,onPrevious:He,numberOfColumns:f,nextLabel:m?.nextDecade??h,nextIcon:te,previousLabel:m?.previousDecade??g,previousIcon:ne,decadeLabelFormat:ue,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Me(t),Ae(h3(`year`,a,i)),_?.(t)},__preventFocus:ve,__stopPropagation:ye,withCellSpacing:L,headerControlsOrder:x,...Ne})]})});_3.classes={...r3.classes,...a3.classes,...s3.classes},_3.displayName=`@mantine/dates/Calendar`;function v3(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:te,getDayProps:ne,excludeDate:F,renderDay:I,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:fe,minDate:pe,maxDate:me,locale:he,...ge}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:te,getDayProps:ne,excludeDate:F,renderDay:I,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:fe,minDate:pe,maxDate:me,locale:he},others:ge}}function y3(e,t){let n=[...t].sort((e,t)=>(0,J.default)(e).isAfter((0,J.default)(t))?1:-1);return(0,J.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,J.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function b3({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=f3({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,K.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,K.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,J.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,J.default)(e).isAfter((0,J.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,J.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,J.default)(e).isSame(n,t))?l(c.filter(e=>!(0,J.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,J.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?y3(e,[f,u]):c[0]&&c[1]?y3(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,J.default)(e).isSame(c[0],t)?!(f&&(0,J.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,J.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,J.default)(f).isBefore(c[0])&&(0,J.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,J.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,J.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,J.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,J.default)(c[0]).isSame(n,t)||void 0};let r=(0,J.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,K.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var x3={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},S3=hP((e,{size:t})=>({datePickerRoot:{"--preset-font-size":UM(t)}})),C3={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},w3=$((e,t)=>{let n=Z(`DatePicker`,C3,e),{allowDeselect:r,allowSingleDateInRange:i,value:a,defaultValue:o,onChange:s,onMouseLeave:c,classNames:l,styles:u,__staticSelector:d,__onDayClick:f,__onDayMouseEnter:p,__onPresetSelect:m,__stopPropagation:h,presets:g,className:_,style:v,unstyled:y,size:b,vars:x,attributes:S,...C}=n,{calendarProps:w,others:T}=v3(C),E=(0,K.useRef)(null),D=(0,K.useRef)(null),O=X({name:d||`DatePicker`,classes:x3,props:n,className:_,style:v,classNames:l,styles:u,unstyled:y,attributes:S,rootSelector:g?`datePickerRoot`:void 0,varsResolver:S3,vars:x}),{onDateChange:k,onRootMouseLeave:A,onHoveredDateChange:j,getControlProps:M,_value:N,setValue:P}=b3({type:T.type,level:`day`,allowDeselect:r,allowSingleDateInRange:i,value:a,defaultValue:o,onChange:s,onMouseLeave:c}),{resolvedClassNames:ee,resolvedStyles:te}=OF({classNames:l,styles:u,props:n}),ne=(0,q.jsx)(_3,{ref:t,classNames:ee,styles:te,__staticSelector:d||`DatePicker`,onMouseLeave:A,size:b,...w,...g?{}:T,__stopPropagation:h,__setDateRef:E,__setLevelRef:D,minLevel:w.minLevel||`month`,__onDayMouseEnter:(e,t)=>{j(t),p?.(e,t)},__onDayClick:(e,t)=>{k(t),f?.(e,t)},getDayProps:e=>({...M(e),...w.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof N==`string`?v4(e,N):!1,...w.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof N==`string`?(0,J.default)(e).isSame(N,`year`):!1,...w.getYearControlProps?.(e)}),hideOutsideDates:w.hideOutsideDates??w.numberOfColumns!==1,...g?{}:{className:_,style:v,attributes:S}});if(!g)return ne;let F=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(E.current?.(t),D.current?.(`month`),m?m(t):P(e))},I=g.map((e,t)=>(0,q.jsx)(iV,{...O(`presetButton`),onClick:()=>F(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":h||void 0,children:e.label},t));return(0,q.jsxs)(Q,{...O(`datePickerRoot`),size:b,...T,children:[(0,q.jsx)(`div`,{...O(`presetsList`),children:I}),ne]})});w3.classes=_3.classes,w3.displayName=`@mantine/dates/DatePicker`;function T3(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,J.default)(t).format(`YYYY-MM-DD`)}function E3({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,J.default)(e).isAfter(t,`date`)||n&&(0,J.default)(e).isBefore(n,`date`))}var D3={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},O3=$((e,t)=>{let{inputProps:n,wrapperProps:r,value:i,defaultValue:a,onChange:o,clearable:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,dateParser:p,minDate:m,maxDate:h,fixOnBlur:g,onFocus:_,onBlur:v,onClick:y,onKeyDown:b,readOnly:x,name:S,form:C,rightSection:w,unstyled:T,classNames:E,styles:D,allowDeselect:O,date:k,defaultDate:A,onDateChange:j,getMonthControlProps:M,getYearControlProps:N,disabled:P,...ee}=rU(`DateInput`,D3,e),te=(0,K.useRef)(null),ne=(0,K.useRef)(null),[F,I]=(0,K.useState)(!1),{calendarProps:L,others:re}=v3(ee),ie=E2(),ae=p||(e=>{let t=(0,J.default)(e,f,ie.getLocale(d)).toDate();return Number.isNaN(t.getTime())?T3(e):(0,J.default)(t).format(`YYYY-MM-DD`)}),oe=O===void 0?s:O,se=e=>e?(0,J.default)(e).locale(ie.getLocale(d)).format(f):``,[ce,le,ue]=f3({type:`default`,value:i,defaultValue:a,onChange:o}),[R,de]=f3({type:`default`,value:k,defaultValue:a||A,onChange:j});(0,K.useEffect)(()=>{ue&&i!==null&&de(i)},[ue,i]);let[fe,pe]=(0,K.useState)(se(ce));(0,K.useEffect)(()=>{pe(se(ce))},[ie.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),I(!0),t.trim()===``&&(O||s))le(null);else{let e=ae(t);e&&E3({date:e,minDate:m,maxDate:h})&&(le(e),de(e))}},he=e=>{v?.(e),I(!1),g&&pe(se(ce))},ge=e=>{_?.(e),I(!0)},_e=e=>{y?.(e),I(!0)},ve=e=>{e.key===`Escape`&&I(!1),b?.(e)},ye=e=>({...u?.(e),selected:(0,J.default)(ce).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=oe&&(0,J.default)(ce).isSame(e,`day`)?null:e;le(n),!ue&&n&&pe(se(n)),I(!1)}}),be=(0,q.jsx)(nU.ClearButton,{onClick:()=>{le(null),!ue&&pe(``),I(!1)},unstyled:T,...c}),xe=s&&!!ce&&!x&&!P;return lN(()=>{ce!==void 0&&!F&&pe(se(ce))},[ce]),rN(()=>I(!1),void 0,[te.current,ne.current]),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(nU.Wrapper,{...r,__staticSelector:`DateInput`,ref:te,children:(0,q.jsxs)(WV,{opened:F,trapFocus:!1,position:`bottom-start`,disabled:x||P,withRoles:!1,unstyled:T,...l,children:[(0,q.jsx)(WV.Target,{children:(0,q.jsx)(nU,{"data-dates-input":!0,"data-read-only":x||void 0,autoComplete:`off`,ref:t,value:fe,onChange:me,onBlur:he,onFocus:ge,onClick:_e,onKeyDown:ve,readOnly:x,rightSection:w,__clearSection:be,__clearable:xe,...n,...re,disabled:P,__staticSelector:`DateInput`})}),(0,q.jsx)(WV.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:ne,children:(0,q.jsx)(_3,{__staticSelector:`DateInput`,...L,classNames:E,styles:D,unstyled:T,__preventFocus:!0,minDate:m,maxDate:h,locale:d,getDayProps:ye,size:n.size,date:R,onDateChange:de,getMonthControlProps:e=>({selected:typeof ce==`string`?v4(e,ce):!1,...M?.(e)}),getYearControlProps:e=>({selected:typeof ce==`string`?(0,J.default)(e).isSame(ce,`year`):!1,...N?.(e)}),attributes:r.attributes})})]})}),(0,q.jsx)(O2,{name:S,form:C,value:ce,type:`default`})]})});O3.classes={...nU.classes,..._3.classes},O3.displayName=`@mantine/dates/DateInput`;var k3={timeWrapper:`m_208d2562`,timeInput:`m_62ee059`};function A3({minDate:e,value:t}){let n=e?(0,J.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}function j3({maxDate:e,value:t}){let n=e?(0,J.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}var M3={dropdownType:`popover`,size:`sm`},N3=$((e,t)=>{let n=Z(`DateTimePicker`,M3,e),{value:r,defaultValue:i,onChange:a,valueFormat:o,locale:s,classNames:c,styles:l,unstyled:u,timePickerProps:d,submitButtonProps:f,withSeconds:p,level:m,defaultLevel:h,size:g,variant:_,dropdownType:v,vars:y,minDate:b,maxDate:x,defaultDate:S,defaultTimeValue:C,presets:w,attributes:T,onDropdownClose:E,...D}=n,O=X({name:`DateTimePicker`,classes:k3,props:n,classNames:c,styles:l,unstyled:u,attributes:T,vars:y}),{resolvedClassNames:k,resolvedStyles:A}=OF({classNames:c,styles:l,props:n}),j=o||(p?`DD/MM/YYYY HH:mm:ss`:`DD/MM/YYYY HH:mm`),M=(0,K.useRef)(null),N=kN(M,d?.hoursRef),{calendarProps:{allowSingleDateInRange:P,...ee},others:te}=v3(D),ne=E2(),[F,I]=f3({type:`default`,value:r,defaultValue:i,onChange:a,withTime:!0}),L=S||F,re=e=>e?(0,J.default)(e).format(p?`HH:mm:ss`:`HH:mm`):``,[ie,ae]=(0,K.useState)(C||re(F)),[oe,se]=(0,K.useState)(m||h||`month`),[ce,le]=QN(!1),ue=F?(0,J.default)(F).locale(ne.getLocale(s)).format(j):``,R=e=>{d?.onChange?.(e),ae(e),e&&I(b2(F,e))},de=e=>{e&&I(b2(w2(b,x,e),ie||C||``)),M.current?.focus()},fe=e=>{e.key===`Enter`&&(e.preventDefault(),le.close())};lN(()=>{ce||ae(re(F))},[F,ce]),lN(()=>{ce&&se(`month`)},[ce]);let pe=v===`popover`,me=()=>{let e=w2(b,x,F);F&&F!==e&&I(w2(b,x,F)),E?.()};return(0,q.jsxs)(l3,{formattedValue:ue,dropdownOpened:D.disabled?!1:ce,dropdownHandlers:le,classNames:k,styles:A,unstyled:u,ref:t,onClear:()=>I(null),shouldClear:!!F,value:F,size:g,variant:_,dropdownType:v,...te,type:`default`,__staticSelector:`DateTimePicker`,onDropdownClose:me,withTime:!0,attributes:T,children:[(0,q.jsx)(w3,{...ee,maxDate:x,minDate:b,size:g,variant:_,type:`default`,value:F,defaultDate:L||C2({maxDate:x,minDate:b}),onChange:de,locale:s,classNames:k,styles:A,unstyled:u,__staticSelector:`DateTimePicker`,__stopPropagation:pe,level:m,defaultLevel:h,onLevelChange:e=>{se(e),ee.onLevelChange?.(e)},presets:w,__onPresetSelect:e=>{I(e),e&&ae(re(e))},attributes:T}),oe===`month`&&(0,q.jsxs)(`div`,{...O(`timeWrapper`),children:[(0,q.jsx)(s4,{value:ie,withSeconds:p,unstyled:u,min:A3({minDate:b,value:F}),max:j3({maxDate:x,value:F}),...d,...O(`timeInput`,{className:d?.className,style:d?.style}),onChange:R,onKeyDown:fe,size:g,"data-mantine-stop-propagation":pe||void 0,hoursRef:N,attributes:T}),(0,q.jsx)(oH,{variant:`default`,size:`input-${g||`sm`}`,...O(`submitButton`,{className:f?.className,style:f?.style}),unstyled:u,"data-mantine-stop-propagation":pe||void 0,children:(0,q.jsx)(UW,{size:`30%`}),...f,onClick:e=>{f?.onClick?.(e),le.close(),me()}})]})]})});N3.classes={...k3,...l3.classes,...w3.classes},N3.displayName=`@mantine/dates/DateTimePicker`;var P3=e=>{let t=RA(e.input),[n,r]=BA(e.input),{inputProps:i,id:a,icon:o,format:s}=u2(e,t);if(!e.input?.props)return null;if(e.datetime||s===`date-time`){let t=typeof e.datetime==`object`?e.datetime:{};return(0,q.jsx)(N3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString():void 0),...t})}if(e.date||s===`date`){let t=typeof e.date==`object`?e.date:{};return(0,q.jsx)(O3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString().slice(0,10):void 0),...t})}if(e.time||s===`time`){let t=typeof e.time==`object`?e.time:{};return(0,q.jsx)(A2,{...i,id:a,leftSection:o,value:n??``,onChange:e=>r(e.currentTarget.value),...t})}return null},F3=e=>{let t=RA(e.input),[n,r]=BA(e.input),{inputProps:i,id:a,icon:o}=u2(e,t);if(!e.input?.props)return null;if(e.sliderProps){let t=e.sliderProps.min??i.minimum??0,o=e.sliderProps.max??i.maximum??100;return(0,q.jsx)(nU.Wrapper,{...i,children:(0,q.jsx)(`div`,{style:{height:32,padding:8},children:(0,q.jsx)(JX,{...i,id:a,...e.sliderProps,value:n??0,min:t,max:o,label:()=>n,onChange:e=>r(e)})})})}return(0,q.jsx)(RY,{...i,id:a,leftSection:o,...e.numberInputProps,value:n??``,onChange:e=>{r(e===null?void 0:Number(e))}})},I3=e=>{let{inputProps:t}=u2(e,{});if(!e.input?.props)return null;let n=e.input.schema;if(!n?.properties)return null;let r=Object.keys(n.properties),i=12/(e.columns??1),a=e.input.items,o=()=>(0,q.jsx)(KK,{children:r.map(t=>{let n=e.controlProps?.[t]??{},r=a?.[t];return r?(0,q.jsx)(KK.Col,{span:i,children:(0,q.jsx)(s6,{input:r,...n})},t):null})});return e.variant===`plain`?o():(0,q.jsx)(DK,{legend:t.label,children:(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[t.description&&(0,q.jsx)(bU,{size:`sm`,c:`dimmed`,children:t.description}),o(),t.error&&(0,q.jsx)(bU,{size:`sm`,c:`red`,children:t.error})]})})};function L3(e){return!e||e.trim()===``?{}:new R3(e).parse()}var R3=class{pos=0;query;constructor(e){this.query=e.trim()}parse(){return this.parseExpression()}parseExpression(){return this.parseOr()}parseOr(){let e=this.parseAnd();if(this.peek()===`|`){let t=[e];for(;this.peek()===`|`;)this.consume(`|`),t.push(this.parseAnd());return{or:t}}return e}parseAnd(){let e=this.parsePrimary();if(this.peek()===`&`){let t=[e];for(;this.peek()===`&`;)this.consume(`&`),t.push(this.parsePrimary());return{and:t}}return e}parsePrimary(){if(this.skipWhitespace(),this.peek()===`(`){this.consume(`(`);let e=this.parseExpression();return this.consume(`)`),e}return this.parseCondition()}parseCondition(){let e=this.parseFieldPath();this.skipWhitespace();let t=this.parseOperator();this.skipWhitespace();let n=this.parseValue();if(n===``)throw new p(`Expected value for field '${e.join(`.`)}'`);return this.buildCondition(e,t,n)}parseFieldPath(){let e=[],t=``;for(;this.pos<this.query.length;){let n=this.query[this.pos];if(n===`.`&&t){e.push(t),t=``,this.pos++;continue}if(n===`=`||n===`!`||n===`>`||n===`<`||n===` `)break;t+=n,this.pos++}return t&&e.push(t),e}parseOperator(){this.skipWhitespace();let e=this.query.slice(this.pos);if(e.startsWith(`>=`))return this.pos+=2,`>=`;if(e.startsWith(`<=`))return this.pos+=2,`<=`;if(e.startsWith(`!=`))return this.pos+=2,`!=`;let t=this.query[this.pos];if(t===`=`||t===`>`||t===`<`)return this.pos++,t;throw new p(`Expected operator at position ${this.pos}`)}parseValue(){if(this.skipWhitespace(),this.query.slice(this.pos,this.pos+4).toLowerCase()===`null`)return this.pos+=4,null;if(this.query[this.pos]===`[`)return this.parseArray();if(this.query[this.pos]===`"`||this.query[this.pos]===`'`)return this.parseQuotedString();let e=``;for(;this.pos<this.query.length;){let t=this.query[this.pos];if(t===`&`||t===`|`||t===`)`)break;e+=t,this.pos++}return this.coerceValue(e.trim())}parseArray(){this.consume(`[`);let e=[];for(;this.pos<this.query.length&&this.query[this.pos]!==`]`;){if(this.skipWhitespace(),this.query[this.pos]===`"`||this.query[this.pos]===`'`)e.push(this.parseQuotedString());else{let t=``;for(;this.pos<this.query.length&&this.query[this.pos]!==`,`&&this.query[this.pos]!==`]`;)t+=this.query[this.pos],this.pos++;e.push(this.coerceValue(t.trim()))}this.skipWhitespace(),this.query[this.pos]===`,`&&this.pos++}return this.consume(`]`),e}parseQuotedString(){let e=this.query[this.pos];this.pos++;let t=``,n=!1;for(;this.pos<this.query.length;){let r=this.query[this.pos];if(n){t+=r,n=!1,this.pos++;continue}if(r===`\\`){n=!0,this.pos++;continue}if(r===e){this.pos++;break}t+=r,this.pos++}return t}coerceValue(e){return/^-?\d+$/.test(e)?parseInt(e,10):/^-?\d+\.\d+$/.test(e)?parseFloat(e):e.toLowerCase()===`true`?!0:e.toLowerCase()===`false`?!1:e}buildCondition(e,t,n){let r;if(t===`=`)if(n===null)r={isNull:!0};else if(Array.isArray(n))r={inArray:n};else if(typeof n==`string`&&n.includes(`*`)){let e=n.startsWith(`*`),t=n.endsWith(`*`),i=n.replace(/^\*|\*$/g,``);r=e&&t?{contains:i}:e?{endsWith:i}:t?{startsWith:i}:{eq:n}}else r={eq:n};else if(t===`!=`)r=n===null?{isNotNull:!0}:{ne:n};else if(t===`>`)r={gt:n};else if(t===`>=`)r={gte:n};else if(t===`<`)r={lt:n};else if(t===`<=`)r={lte:n};else throw new p(`Unsupported operator: ${t}`);if(e.length===1)return{[e[0]]:r};let i=r;for(let t=e.length-1;t>=0;t--)i={[e[t]]:i};return i}peek(){return this.skipWhitespace(),this.query[this.pos]||``}consume(e){if(this.skipWhitespace(),this.query[this.pos]!==e)throw new p(`Expected '${e}' at position ${this.pos}, got '${this.query[this.pos]}'`);this.pos++}skipWhitespace(){for(;this.pos<this.query.length&&/\s/.test(this.query[this.pos]);)this.pos++}},z3=(e,t,n)=>(Object.assign(e,{[t]:n??{}}),e),B3=Symbol.for(`Alepha.Postgres.Default`),V3=Symbol.for(`Alepha.Postgres.PrimaryKey`),H3=Symbol.for(`Alepha.Postgres.CreatedAt`),U3=Symbol.for(`Alepha.Postgres.UpdatedAt`),W3=Symbol.for(`Alepha.Postgres.DeletedAt`),G3=Symbol.for(`Alepha.Postgres.Version`),K3=Symbol.for(`Alepha.Postgres.Identity`),q3=Symbol.for(`Alepha.Postgres.Enum`),J3=Symbol.for(`Alepha.Postgres.Ref`),Y3=Symbol.for(`Alepha.Postgres.Generated`),X3=Symbol.for(`Alepha.Postgres.Serial`),Z3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];Y3 in r||(B3 in r?t[n]=G.optional(r):t[n]=r)}return G.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},Q3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];Y3 in r||(G.schema.isOptional(r)?t[n]=G.optional(G.union([r,G.raw.Null()])):t[n]=r)}return G.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},$3=e=>new e6(e),e6=class e{options;constructor(e){this.options=e}alias(t){let n=new e(this.options);return new Proxy(n,{get(e,n,r){return n===`$alias`?t:Reflect.get(e,n,r)}})}get cols(){let e={};for(let t of Object.keys(this.schema.properties))e[t]={name:t,entity:this};return e}get name(){return this.options.name}get schema(){return this.options.schema}get insertSchema(){return Z3(this.options.schema)}get updateSchema(){return Q3(this.options.schema)}};$3[u]=e6;var t6=e=>new n6(e),n6=class{options;isView=!0;constructor(e){this.options=e}get name(){return this.options.name}get schema(){return this.options.schema}get materialized(){return this.options.materialized??!1}};t6[u]=n6,new class{attr=z3;identityPrimaryKey=(e,t)=>z3(z3(z3(G.integer(t),V3),K3,e),B3);bigIdentityPrimaryKey=(e,t)=>z3(z3(z3(G.int64(t),V3),K3,e),B3);uuidPrimaryKey=()=>z3(z3(G.uuid(),V3),B3);primaryKey(e,t,n){if(!e||G.schema.isInteger(e))return z3(z3(z3(G.integer(t),V3),K3,n),B3);if(G.schema.isString(e)&&e.format===`uuid`)return z3(z3(G.uuid(),V3),B3);if(G.schema.isNumber(e)&&e.format===`int64`)return z3(z3(z3(G.number(t),V3),K3,n),B3);if(G.schema.isBigInt(e))return z3(z3(z3(G.bigint(t),V3),K3,n),B3);throw new p(`Unsupported type for primary key: ${e}`)}default=(e,t)=>(t!=null&&Object.assign(e,{default:t}),this.attr(e,B3));version=(e={})=>this.default(z3(G.integer(e),G3),0);createdAt=e=>z3(z3(G.datetime(e),H3),B3);updatedAt=e=>z3(z3(G.datetime(e),U3),B3);deletedAt=e=>z3(G.optional(G.datetime(e)),W3);enum=(e,t,n)=>z3(G.enum(e,{description:t?.description,...n}),q3,t);ref=(e,t,n)=>{let r=n??{onDelete:G.schema.isOptional(e)?`set null`:`cascade`};return this.attr(e,J3,{ref:t,actions:r})};page=(e,t)=>Sk(e,t)},z3(z3(z3(G.integer(),V3),X3),B3),C({name:`alepha.orm`,primitives:[],services:[Jk]});var r6=e=>{let{fields:t,onInsert:n}=e;return(0,q.jsxs)(cU,{gap:`md`,align:`flex-start`,wrap:`nowrap`,bg:M0.colors.surface,p:`sm`,bdrs:`sm`,children:[(0,q.jsxs)(cU,{direction:`column`,gap:`md`,style:{flex:1},children:[(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{size:`sm`,fw:600,children:`Operators`}),(0,q.jsx)(cU,{direction:`column`,gap:4,children:Object.entries(y6).map(([e,t])=>(0,q.jsxs)(cU,{gap:`xs`,wrap:`nowrap`,children:[(0,q.jsx)(P0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(t.symbol),children:t.symbol}),(0,q.jsx)(bU,{size:`xs`,c:`dimmed`,style:{flex:1},children:t.label})]},e))})]}),(0,q.jsx)(CK,{}),(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,children:[(0,q.jsx)(bU,{size:`sm`,fw:600,children:`Logic`}),(0,q.jsxs)(cU,{direction:`column`,gap:4,children:[(0,q.jsxs)(cU,{gap:`xs`,wrap:`nowrap`,children:[(0,q.jsx)(P0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`&`),children:`&`}),(0,q.jsx)(bU,{size:`xs`,c:`dimmed`,children:`AND`})]}),(0,q.jsxs)(cU,{gap:`xs`,wrap:`nowrap`,children:[(0,q.jsx)(P0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`|`),children:`|`}),(0,q.jsx)(bU,{size:`xs`,c:`dimmed`,children:`OR`})]})]})]})]}),t.length>0&&(0,q.jsx)(CK,{orientation:`vertical`}),t.length>0&&(0,q.jsxs)(cU,{direction:`column`,gap:`xs`,style:{flex:2},children:[(0,q.jsx)(bU,{size:`sm`,fw:600,children:`Fields`}),(0,q.jsx)(cU,{direction:`column`,gap:4,style:{maxHeight:300,overflowY:`auto`},children:t.map(e=>(0,q.jsxs)(cU,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,children:[(0,q.jsx)(P0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`end`,miw:120,onClick:()=>n(e.path),children:e.path}),(0,q.jsxs)(cU,{mt:3,direction:`column`,gap:2,style:{flex:1,minWidth:0},children:[(0,q.jsx)(bU,{size:`xs`,c:`dimmed`,lineClamp:1,children:e.description||e.type}),e.enum&&(0,q.jsx)(cU,{gap:0,wrap:`wrap`,children:e.enum.map(e=>(0,q.jsx)(P0,{px:`xs`,size:`xs`,h:24,onClick:()=>n(e),children:e},e))})]}),(0,q.jsx)(cG,{size:`xs`,variant:`light`,style:{flexShrink:0},children:e.type})]},e.path))})]})]})},i6=e=>{let{schema:t,value:n=``,onChange:r,placeholder:i=`Enter query or click for assistance...`,...a}=e,[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(n),u=(0,K.useRef)(null),d=t?v6(t):[],[f,p]=(0,K.useState)(null),m=e=>{try{L3(e.trim())}catch(e){return p(e.message),!1}return p(null),!0},h=e=>{l(e),m(e)&&r?.(e)},g=()=>{l(``),r?.(``),m(``)},_=e=>{let t=c?`${c}${e} `:`${e} `;l(t),m(t)&&r?.(t),setTimeout(()=>{u.current?.focus();let e=u.current?.value.length||0;u.current?.setSelectionRange(e,e)},0)};return FA({"form:change":e=>{e.id===u.current?.form?.id&&e.path===a[`data-path`]&&l(e.value??``)}},[]),(0,q.jsxs)(WV,{width:800,position:`bottom-start`,shadow:`md`,opened:o,onChange:s,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:`fade-up`,duration:200,timingFunction:`ease`},children:[(0,q.jsx)(WV.Target,{children:(0,q.jsx)(cZ,{ref:u,placeholder:i,value:c,onChange:e=>h(e.currentTarget.value),onFocus:()=>s(!0),leftSection:f?(0,q.jsx)(i$,{size:16}):(0,q.jsx)(e$,{size:16}),rightSection:c&&(0,q.jsx)(oH,{size:`sm`,variant:`subtle`,color:`gray`,onClick:g,children:(0,q.jsx)(C$,{size:14})}),...a})}),(0,q.jsx)(WV.Dropdown,{bg:`transparent`,p:`xs`,bd:`1px solid ${M0.colors.border}`,style:{backdropFilter:`blur(20px)`},children:(0,q.jsx)(r6,{fields:d,onInsert:_})})]})},a6=e=>{let t=RA(e.input),[n,r]=BA(e.input),{inputProps:i,id:a,icon:o}=u2(e,t),s=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,c=e.input.schema&&`type`in e.input.schema&&(e.input.schema.type===`integer`||e.input.schema.type===`number`),l=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`boolean`,u=e.input.schema&&`enum`in e.input.schema&&Array.isArray(e.input.schema.enum)?e.input.schema.enum:[],{data:d,loading:f,mode:p,search:m}=o6(e.loader,e.loaderThreshold??100,e.loaderDebounce??300,e.input.initialValue),[h,g]=(0,K.useState)([]),_=JSON.stringify(u);(0,K.useEffect)(()=>{!e.input?.props||e.loader||(l&&u.length===0?g([{value:`true`,label:`True`},{value:`false`,label:`False`}]):g(u))},[e.input,e.loader,_,l]);let v=e.loader?d:h;if(!e.input?.props)return null;let y=e=>e==null?e:c?Number(e):l?e===`true`:e;if(e.segmentedProps){let t=typeof e.segmentedProps==`object`?e.segmentedProps:{},a=t.data??v.slice(0,10);return(0,q.jsx)(nU.Wrapper,{...i,children:(0,q.jsx)(cU,{my:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,q.jsx)(yX,{disabled:i.disabled,value:n==null?``:String(n),...t,onChange:e=>{r(y(e))},data:a})})})}let b={size:e.size,id:a,leftSection:f?(0,q.jsx)(QV,{color:`gray`,size:10}):o,data:v},x={...b,searchable:!0,rightSection:(0,q.jsx)(`span`,{})},S=p===`long`?{filter:({options:e})=>e,onSearchChange:m.run}:{};if(e.creatable&&(s||e.tagsInputProps)){let t=e.tagsInputProps??{};return(0,q.jsx)(sZ,{...i,...b,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}if(e.creatable){let t=e.autocompleteProps??{};return(0,q.jsx)(aG,{...i,...b,...S,value:n==null?``:String(n),onChange:e=>{r(y(e))},...t})}if(s||e.multiSelectProps){let t=typeof e.multiSelectProps==`object`?e.multiSelectProps:{};return(0,q.jsx)(AJ,{...i,...x,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}let C=typeof e.selectProps==`object`?e.selectProps:{};return p===`static`?(0,q.jsx)(xX,{...i,...x,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C}):(0,q.jsx)(xX,{...i,...x,...S,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C})},o6=(e,t,n,r)=>{let[i,a]=(0,K.useState)([]),[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(`static`),u=(0,K.useRef)(new Map);return Zk({name:`select:loader:init`,runOnInit:!0,handler:async()=>{if(!e){l(`static`);return}s(!0);try{let n=await e(``),i=n.length<=t;if(l(i?`short`:`long`),u.current.set(``,n),a(n),!i&&r!=null&&String(r)!==``){let t=await e(``,[String(r)]);t.length>0&&a(e=>{let n=new Set(e.map(e=>typeof e==`string`?e:e.value)),r=t.filter(e=>{let t=typeof e==`string`?e:e.value;return!n.has(t)});return[...e,...r]})}}finally{s(!1)}}},[e,t]),{data:i,loading:o,mode:c,search:Zk({debounce:n,handler:async t=>{if(!(!e||c!==`long`)){if(u.current.has(t)){a(u.current.get(t));return}s(!0);try{let n=await e(t);u.current.set(t,n),a(n)}finally{s(!1)}}}},[e,c,n])}},s6=e=>{let t=RA(e.input,[`error`]),[n,r]=BA(e.input);if(!e.input?.props)return null;let{inputProps:i,id:a,icon:o,format:s,schema:c}=u2(e,t),l={...e,...c.$control};if(l.query)return(0,q.jsx)(i6,{...i,schema:l.query,value:n,onChange:e=>{r(e)}});if(l.custom){let e=l.custom;return(0,q.jsx)(nU.Wrapper,{...i,children:(0,q.jsx)(cU,{flex:1,mt:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,q.jsx)(e,{value:n,onChange:e=>{r(e)}})})})}let u=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`object`&&`properties`in l.input.schema;if(l.object||u){let e=typeof l.object==`object`?l.object:{};return(0,q.jsx)(I3,{input:l.input,label:l.label,description:l.description,...e})}let d=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`array`,f=d&&`items`in l.input.schema&&l.input.schema.items&&typeof l.input.schema.items==`object`&&`properties`in l.input.schema.items;if(l.array||f){let e=typeof l.array==`object`?l.array:{};return(0,q.jsx)(m2,{input:l.input,label:l.label,description:l.description,...e})}if(l.number||!l.select&&l.input.schema&&`type`in l.input.schema&&(l.input.schema.type===`number`||l.input.schema.type===`integer`)){let e=typeof l.number==`object`?l.number:{};return l.slider&&(e.sliderProps??={}),(0,q.jsx)(F3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.file){let e=typeof l.file==`object`?l.file:{};return(0,q.jsx)(MK,{...i,size:l.size,id:a,leftSection:o,onChange:e=>r(e),...e})}if(l.color||s===`color`){let e=typeof l.color==`object`?l.color:{};return(0,q.jsx)(gK,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e),...e})}if(l.input.schema&&`enum`in l.input.schema&&l.input.schema.enum||d&&!f||l.select){let e=typeof l.select==`object`?l.select:{};return l.segmented&&(e.segmentedProps??={}),(0,q.jsx)(a6,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`boolean`){if(l.switch){let e=typeof l.switch==`object`?l.switch:{};return(0,q.jsx)(nZ,{...i,size:l.size,id:a,color:`blue`,checked:!!n,onChange:e=>{r(e.currentTarget.checked)},...e})}let e={input:l.input,selectProps:{data:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}]}};return(0,q.jsx)(a6,{size:l.size,label:l.label,description:l.description,icon:o,...e})}if(l.password||l.input.props.name?.includes(`password`)){let e=typeof l.password==`object`?l.password:{};return(0,q.jsx)(HY,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.area){let e=typeof l.area==`object`?l.area:{};return(0,q.jsx)(Dq,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.date||l.datetime||l.time||s===`date`||s===`date-time`||s===`time`)return(0,q.jsx)(P3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,date:l.date,datetime:l.datetime,time:l.time});let p=typeof l.text==`object`?l.text:{},m=()=>{switch(s){case`email`:return`email`;case`url`:case`uri`:return`url`;case`tel`:case`phone`:return`tel`;default:return l.input.props.type??`text`}};return(0,q.jsx)(cZ,{...i,size:l.size,id:a,leftSection:o,type:m(),value:n??``,onChange:e=>r(e.target.value),...p})},c6=e=>{let{form:t,columns:n=3,children:r,controlProps:i,fieldControlProps:a,skipFormElement:o=!1,skipSubmitButton:s=!1,submitButtonProps:c,fill:l=!0,size:u}=e,{dirty:d}=RA(t,[`dirty`]),f=e.schema||t.options.schema;if(!f?.properties)return null;let p=Object.keys(f.properties),m=typeof n==`number`?{xs:12,sm:6,lg:12/n}:{base:n.base?12/n.base:void 0,xs:n.xs?12/n.xs:12,sm:n.sm?12/n.sm:6,md:n.md?12/n.md:void 0,lg:n.lg?12/n.lg:4,xl:n.xl?12/n.xl:void 0},h=()=>r?(0,q.jsx)(q.Fragment,{children:r(t.input)}):(0,q.jsx)(KK,{children:p.map(e=>{let n=t.input[e],r=f.properties[e];if(!n||!r)return null;let o=r&&`type`in r&&r.type===`object`,s=r&&`type`in r&&r.type===`array`&&`items`in r&&r.items&&`properties`in r.items,c=o||s?12:m,l={...i,...a?.[e]};return u&&(l.size=u),(0,q.jsx)(KK.Col,{span:c,children:(0,q.jsx)(s6,{input:n,...l})},e)})}),g=(0,q.jsxs)(cU,{direction:`column`,gap:`sm`,flex:l?1:void 0,...e.flexProps,children:[(0,q.jsx)(cU,{direction:`column`,gap:`sm`,flex:1,children:h()}),!s&&(0,q.jsx)(EG,{w:`100%`,withBorder:!0,children:(0,q.jsxs)(cU,{gap:`sm`,flex:1,children:[(0,q.jsx)(cU,{}),(0,q.jsx)(cU,{flex:1}),(0,q.jsxs)(cU,{gap:`sm`,children:[(0,q.jsx)(P0,{variant:`subtle`,type:`reset`,disabled:!d,children:`Reset`}),(0,q.jsx)(P0,{intent:`primary`,form:t,disabled:!d,...c,children:c?.children??`Submit`})]})]})})]});return o?g:(0,q.jsx)(cU,{component:`form`,flex:l?1:void 0,...t.props,...e.flexProps,children:g})},l6=e=>{let[t,n]=(0,K.useState)(!1),r=(0,K.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e.value),n(!0),setTimeout(()=>n(!1),1500)},[e.value]);return(0,q.jsx)(oH,{size:e.iconSize+4,variant:`transparent`,c:t?`green`:`dimmed`,onClick:r,className:`alepha-json-viewer-copy`,children:t?(0,q.jsx)(qQ,{size:e.iconSize}):(0,q.jsx)(QQ,{size:e.iconSize})})},u6={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},d6={root:{fontFamily:`var(--mantine-font-family-monospace)`},chevron:{flexShrink:0,color:`var(--mantine-color-dimmed)`},key:{color:`var(--mantine-color-cyan-text)`,fontWeight:500},colon:{color:`var(--mantine-color-dimmed)`},string:{color:`var(--mantine-color-teal-text)`},number:{color:`var(--mantine-color-blue-text)`},boolean:{color:`var(--mantine-color-violet-text)`},null:{color:`var(--mantine-color-dimmed)`,fontStyle:`italic`},preview:{color:`var(--mantine-color-dimmed)`}},f6=e=>e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:typeof e,p6=e=>{let{nodeValue:t,nodeKey:n,path:r,isArrayItem:i}=e.node,a=f6(t),o=a===`object`||a===`array`,s=()=>{if(!o)return null;let n=(a===`array`?t:Object.keys(t)).length,r=a===`array`?`item`:`key`;return e.expanded?null:(0,q.jsx)(bU,{fs:`italic`,component:`span`,size:e.size,style:d6.preview,children:n===0?a===`array`?`[]`:`{}`:a===`array`?`[ ${n} ${n===1?r:`${r}s`} ]`:`{ ${n} ${n===1?r:`${r}s`} }`})},c=()=>o?JSON.stringify(t,null,2):String(t??``);return(0,q.jsxs)(cU,{gap:6,wrap:`nowrap`,...e.elementProps,className:`alepha-json-viewer-row ${e.elementProps.className||``}`,children:[e.hasChildren?e.expanded?(0,q.jsx)(JQ,{size:e.config.icon,style:d6.chevron}):(0,q.jsx)(YQ,{size:e.config.icon,style:d6.chevron}):(0,q.jsx)(`span`,{style:{width:e.config.icon,flexShrink:0}}),n!==void 0&&!i&&(0,q.jsxs)(bU,{component:`span`,size:e.size,children:[(0,q.jsx)(`span`,{style:d6.key,children:e.showQuotes?`"${n}"`:n}),(0,q.jsx)(`span`,{style:d6.colon,children:`:`})]}),n!==void 0&&i&&(0,q.jsxs)(bU,{component:`span`,size:e.size,children:[(0,q.jsx)(`span`,{style:d6.key,children:n}),(0,q.jsx)(`span`,{style:d6.colon,children:`:`})]}),e.hasChildren?s():o?a===`array`?(0,q.jsx)(bU,{component:`span`,size:e.size,style:d6.preview,children:`[]`}):(0,q.jsx)(bU,{component:`span`,size:e.size,style:d6.preview,children:`{}`}):e.renderValue(t,n,r),e.showCopyButton&&(0,q.jsx)(l6,{value:c(),iconSize:e.config.icon})]})},m6=e=>{let{data:t,defaultExpandedDepth:n=2,maxDepth:r=10,size:i=`sm`,showQuotes:a=!1,showCopyButton:o=!0,formatValue:s}=e,c=u6[i]||u6.sm,l=(0,K.useMemo)(()=>{let e=f6(t);if(e===`object`||e===`array`){let n=(e===`array`?t.map((e,t)=>[String(t),e]):Object.entries(t)).map(([t,n])=>h6(n,[],t,e===`array`,r)).filter(e=>e!==null);return[{value:`root`,label:``,nodeValue:t,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:n.length>0?n:void 0}]}let n=h6(t,[],void 0,!1,r);return n?[n]:[]},[t,r]),u=CZ({initialExpandedState:(0,K.useMemo)(()=>n===0?{}:n===1/0?xZ(l,`*`):xZ(l,g6(l,n+1)),[l,n])}),d=(0,K.useCallback)((e,t,n)=>{let r=s?.(t,e,n);if(r!==void 0)return(0,q.jsx)(bU,{component:`span`,size:i,style:d6.string,className:`alepha-json-viewer-value`,title:String(e),children:r});let a=f6(e);switch(a){case`string`:return(0,q.jsxs)(bU,{style:d6.string,component:`span`,size:i,className:`alepha-json-viewer-value`,title:e,children:[`"`,e,`"`]});case`number`:return(0,q.jsx)(bU,{component:`span`,size:i,style:d6.number,children:e});case`boolean`:return(0,q.jsx)(bU,{component:`span`,size:i,style:d6.boolean,children:String(e)});case`null`:case`undefined`:return(0,q.jsx)(bU,{component:`span`,size:i,style:d6.null,children:a});default:return(0,q.jsx)(bU,{component:`span`,size:i,children:String(e)})}},[s,a,i]),f=(0,K.useCallback)(({node:e,expanded:t,hasChildren:n,elementProps:r})=>(0,q.jsx)(p6,{node:e,expanded:t,hasChildren:n,elementProps:r,size:i,config:c,showQuotes:a,showCopyButton:o,renderValue:d}),[c,d,o,a,i]);return l.length===0?(0,q.jsx)(bU,{size:i,style:d6.null,children:t===null?`null`:t===void 0?`undefined`:`{}`}):(0,q.jsx)(DZ,{data:l,tree:u,levelOffset:c.levelOffset,expandOnClick:!0,renderNode:f,styles:{root:d6.root}})},h6=(e,t=[],n,r=!1,i=10)=>{let a=n===void 0?t:[...t,n],o=a.length>0?a.join(`.`):`root`;if(a.length>i)return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r};let s=f6(e);if(s===`object`||s===`array`){let t=(s===`array`?e.map((e,t)=>[String(t),e]):Object.entries(e)).map(([e,t])=>h6(t,a,e,s===`array`,i)).filter(e=>e!==null);return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r,children:t.length>0?t:void 0}}return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r}},g6=(e,t,n=0)=>{if(n>=t)return[];let r=[];for(let i of e)i.children&&(r.push(i.value),r.push(...g6(i.children,t,n+1)));return r},_6=(e={})=>{let{alepha:t}=y();return e.themes&&t.store.set(PZ,e.themes),t.inject(l1)};function v6(e,t=``){let n=[];if(!e||typeof e!=`object`)return n;let r=`properties`in e?e.properties:e;if(!r||typeof r!=`object`)return n;for(let[e,i]of Object.entries(r)){if(typeof i!=`object`||!i)continue;let r=i,a=t?`${t}.${e}`:e,o=`format`in r?r.format:void 0,s=`type`in r?r.type:`object`;o===`date-time`?s=`datetime`:o===`date`?s=`date`:o===`time`?s=`time`:o===`duration`&&(s=`duration`);let c={name:e,path:a,type:s,format:o,description:`description`in r?r.description:void 0};`enum`in r&&r.enum&&(c.enum=r.enum,c.type=`enum`),`type`in r&&r.type===`object`&&`properties`in r&&typeof r.properties==`object`&&(c.nested=v6(r.properties,a)),n.push(c),c.nested&&n.push(...c.nested)}return n}var y6={eq:{symbol:`=`,label:`equals`,example:`name=John`},ne:{symbol:`!=`,label:`not equals`,example:`status!=archived`},gt:{symbol:`>`,label:`greater than`,example:`age>18`},gte:{symbol:`>=`,label:`greater or equal`,example:`age>=18`},lt:{symbol:`<`,label:`less than`,example:`age<65`},lte:{symbol:`<=`,label:`less or equal`,example:`age<=65`},null:{symbol:`=null`,label:`is null`,example:`deletedAt=null`},notNull:{symbol:`!=null`,label:`is not null`,example:`email!=null`},in:{symbol:`[...]`,label:`in array`,example:`status=[active,pending]`}},b6=e=>{let{type:t,format:n,name:r,isEnum:i,isArray:a,size:o=`xs`}=e,s=M0.sizes.icon[o]-4;if(n)switch(n){case`email`:return(0,q.jsx)(f$,{size:s});case`url`:case`uri`:return(0,q.jsx)(u$,{size:s});case`tel`:case`phone`:return(0,q.jsx)(h$,{size:s});case`date`:return(0,q.jsx)(KQ,{size:s});case`date-time`:return(0,q.jsx)(KQ,{size:s});case`time`:return(0,q.jsx)(XQ,{size:s});case`color`:return(0,q.jsx)(ZQ,{size:s});case`uuid`:return(0,q.jsx)(a$,{size:s})}if(r){let e=r.toLowerCase();if(e.includes(`password`)||e.includes(`secret`))return(0,q.jsx)(a$,{size:s});if(e.includes(`email`)||e.includes(`mail`))return(0,q.jsx)(f$,{size:s});if(e.includes(`url`)||e.includes(`link`))return(0,q.jsx)(u$,{size:s});if(e.includes(`phone`)||e.includes(`tel`))return(0,q.jsx)(h$,{size:s});if(e.includes(`color`))return(0,q.jsx)(m$,{size:s});if(e.includes(`file`)||e.includes(`upload`))return(0,q.jsx)($Q,{size:s});if(e.includes(`date`))return(0,q.jsx)(KQ,{size:s});if(e.includes(`time`))return(0,q.jsx)(XQ,{size:s})}if(i||a)return(0,q.jsx)(v$,{size:s});if(t)switch(t){case`boolean`:return(0,q.jsx)(x$,{size:s});case`number`:case`integer`:return(0,q.jsx)(n$,{size:s});case`array`:return(0,q.jsx)(d$,{size:s});case`string`:return(0,q.jsx)(l$,{size:s})}return(0,q.jsx)(GQ,{size:s})},x6=e=>e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),S6=e=>{let t=e.split(`/`).filter(e=>e&&!/^\d+$/.test(e));return x6(t[t.length-1]||e.replaceAll(`/`,``))};C({name:`alepha.ui`,services:[YZ,w$,FZ,l1],register:e=>{e.with(rj),e.with(YA),e.with(UA),e.with(FZ),e.with(YZ),e.with(w$)}});export{LI as $,HQ as A,KK as B,QQ as C,lk as Ct,qQ as D,l as Dt,JQ as E,o as Et,xX as F,bU as G,EG as H,yX as I,dH as J,cU as K,hX as L,cZ as M,nZ as N,WQ as O,kX as P,eV as Q,RY as R,a$ as S,Ck as St,YQ as T,C as Tt,cG as U,CK as V,ZW as W,lV as X,QV as Y,iV as Z,S$ as _,wA as _t,e2 as a,X as at,d$ as b,Ak as bt,U0 as c,WP as ct,o1 as d,TN as dt,FI as et,r1 as f,HM as ft,C$ as g,HA as gt,E$ as h,Y as ht,l2 as i,GF as it,kZ as j,UQ as k,P0 as l,hP as lt,j$ as m,kM as mt,m6 as n,Q as nt,K0 as o,fF as ot,U$ as p,FM as pt,aU as q,c6 as r,Z as rt,G0 as s,sF as st,_6 as t,$ as tt,M0 as u,MN as ut,_$ as v,Zk as vt,XQ as w,G as wt,u$ as x,Tk as xt,g$ as y,Xk as yt,Dq as z};