@owox/backend 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/commands/create-migration-template.js +8 -0
  2. package/dist/public/assets/index-CISA6IwH.css +1 -0
  3. package/dist/public/assets/index-xNsUEA9g.js +550 -0
  4. package/dist/public/index.html +2 -2
  5. package/dist/{app.module.js → src/app.module.js} +2 -5
  6. package/dist/src/common/schemas/google-service-account-key.schema.js +33 -0
  7. package/dist/src/common/zod/zod-transformer.js +14 -0
  8. package/dist/src/config/data-source-options.config.js +49 -0
  9. package/dist/{config → src/config}/express-static.config.js +7 -3
  10. package/dist/src/config/get-sqlite-database-path.js +36 -0
  11. package/dist/src/config/migrations.config.js +30 -0
  12. package/dist/src/data-marts/connector-types/connector-definition.js +11 -0
  13. package/dist/src/data-marts/connector-types/connector-fields-schema.js +18 -0
  14. package/dist/src/data-marts/connector-types/connector-specification.js +20 -0
  15. package/dist/src/data-marts/controllers/connector.controller.js +79 -0
  16. package/dist/src/data-marts/controllers/data-destination.controller.js +124 -0
  17. package/dist/{data-marts → src/data-marts}/controllers/data-mart.controller.js +20 -2
  18. package/dist/src/data-marts/controllers/report.controller.js +159 -0
  19. package/dist/src/data-marts/controllers/spec/connector.api.js +20 -0
  20. package/dist/src/data-marts/controllers/spec/data-destination.api.js +28 -0
  21. package/dist/{data-marts → src/data-marts}/controllers/spec/data-mart.api.js +4 -0
  22. package/dist/src/data-marts/controllers/spec/report.api.js +55 -0
  23. package/dist/src/data-marts/data-destination-types/data-destination-config.guards.js +13 -0
  24. package/dist/src/data-marts/data-destination-types/data-destination-config.type.js +7 -0
  25. package/dist/src/data-marts/data-destination-types/data-destination-credentials.guards.js +13 -0
  26. package/dist/src/data-marts/data-destination-types/data-destination-credentials.type.js +9 -0
  27. package/dist/src/data-marts/data-destination-types/data-destination-facades.js +10 -0
  28. package/dist/src/data-marts/data-destination-types/data-destination-providers.js +40 -0
  29. package/dist/src/data-marts/data-destination-types/enums/data-destination-type.enum.js +17 -0
  30. package/dist/src/data-marts/data-destination-types/facades/data-destination-access-validator.facade.js +40 -0
  31. package/dist/{data-marts/data-storage-types/facades/data-storage-title.facade.js → src/data-marts/data-destination-types/facades/data-destination-credentials-validator.facade.js} +13 -13
  32. package/dist/{data-marts/data-storage-types/athena/services/athena-title.generator.js → src/data-marts/data-destination-types/google-sheets/adapters/google-sheets-api-adapter.factory.js} +9 -12
  33. package/dist/src/data-marts/data-destination-types/google-sheets/adapters/google-sheets-api.adapter.js +104 -0
  34. package/dist/src/data-marts/data-destination-types/google-sheets/schemas/google-sheets-config.schema.js +11 -0
  35. package/dist/src/data-marts/data-destination-types/google-sheets/schemas/google-sheets-credentials.schema.js +13 -0
  36. package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-access-validator.js +59 -0
  37. package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-credentials-validator.js +45 -0
  38. package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-report-writer.js +158 -0
  39. package/dist/src/data-marts/data-destination-types/google-sheets/services/sheet-formatters/sheet-header-formatter.js +54 -0
  40. package/dist/src/data-marts/data-destination-types/google-sheets/services/sheet-formatters/sheet-metadata-formatter.js +60 -0
  41. package/dist/src/data-marts/data-destination-types/interfaces/data-destination-access-validator.interface.js +17 -0
  42. package/dist/src/data-marts/data-destination-types/interfaces/data-destination-credentials-validator.interface.js +15 -0
  43. package/dist/src/data-marts/data-destination-types/interfaces/data-destination-report-writer.interface.js +3 -0
  44. package/dist/src/data-marts/data-marts.module.js +127 -0
  45. package/dist/{data-marts/data-storage-types/bigquery/services/bigquery-title.generator.js → src/data-marts/data-storage-types/athena/adapters/athena-api-adapter.factory.js} +9 -12
  46. package/dist/src/data-marts/data-storage-types/athena/adapters/athena-api.adapter.js +91 -0
  47. package/dist/src/data-marts/data-storage-types/athena/adapters/s3-api-adapter.factory.js +21 -0
  48. package/dist/src/data-marts/data-storage-types/athena/adapters/s3-api.adapter.js +53 -0
  49. package/dist/src/data-marts/data-storage-types/athena/services/athena-report-reader.service.js +158 -0
  50. package/dist/src/data-marts/data-storage-types/bigquery/adapters/bigquery-api-adapter.factory.js +21 -0
  51. package/dist/src/data-marts/data-storage-types/bigquery/adapters/bigquery-api.adapter.js +36 -0
  52. package/dist/src/data-marts/data-storage-types/bigquery/schemas/bigquery-credentials.schema.js +6 -0
  53. package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-report-reader.service.js +132 -0
  54. package/dist/src/data-marts/data-storage-types/data-storage-config.guards.js +13 -0
  55. package/dist/src/data-marts/data-storage-types/data-storage-credentials.guards.js +13 -0
  56. package/dist/src/data-marts/data-storage-types/data-storage-credentials.type.js +3 -0
  57. package/dist/src/data-marts/data-storage-types/data-storage-facades.js +6 -0
  58. package/dist/src/data-marts/data-storage-types/data-storage-providers.js +32 -0
  59. package/dist/src/data-marts/data-storage-types/interfaces/data-storage-report-reader.interface.js +3 -0
  60. package/dist/src/data-marts/dto/domain/create-data-destination.command.js +17 -0
  61. package/dist/src/data-marts/dto/domain/create-report.command.js +21 -0
  62. package/dist/src/data-marts/dto/domain/data-destination.dto.js +23 -0
  63. package/dist/src/data-marts/dto/domain/delete-data-destination.command.js +13 -0
  64. package/dist/src/data-marts/dto/domain/get-data-destination.command.js +13 -0
  65. package/dist/src/data-marts/dto/domain/get-report.command.js +15 -0
  66. package/dist/src/data-marts/dto/domain/list-data-destinations.command.js +11 -0
  67. package/dist/src/data-marts/dto/domain/list-reports-by-data-mart.command.js +15 -0
  68. package/dist/src/data-marts/dto/domain/list-reports-by-project.command.js +13 -0
  69. package/dist/src/data-marts/dto/domain/report-data-batch.dto.js +13 -0
  70. package/dist/src/data-marts/dto/domain/report-data-description.dto.js +13 -0
  71. package/dist/src/data-marts/dto/domain/report.dto.js +31 -0
  72. package/dist/src/data-marts/dto/domain/run-data-mart.command.js +15 -0
  73. package/dist/src/data-marts/dto/domain/run-report.command.js +3 -0
  74. package/dist/src/data-marts/dto/domain/update-data-destination.command.js +17 -0
  75. package/dist/src/data-marts/dto/domain/update-report.command.js +21 -0
  76. package/dist/src/data-marts/dto/presentation/connector-definition-response-api.dto.js +37 -0
  77. package/dist/src/data-marts/dto/presentation/connector-fields-response-api.dto.js +60 -0
  78. package/dist/src/data-marts/dto/presentation/connector-specification-response-api.dto.js +65 -0
  79. package/dist/src/data-marts/dto/presentation/create-data-destination-api.dto.js +42 -0
  80. package/dist/src/data-marts/dto/presentation/create-report-request-api.dto.js +46 -0
  81. package/dist/src/data-marts/dto/presentation/data-destination-response-api.dto.js +57 -0
  82. package/dist/src/data-marts/dto/presentation/report-response-api.dto.js +75 -0
  83. package/dist/src/data-marts/dto/presentation/update-data-destination-api.dto.js +35 -0
  84. package/dist/src/data-marts/dto/presentation/update-report-request-api.dto.js +39 -0
  85. package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/connector-definition.schema.js +23 -0
  86. package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/data-mart-definition.guards.js +23 -0
  87. package/dist/src/data-marts/entities/data-destination.entity.js +66 -0
  88. package/dist/src/data-marts/entities/data-mart-run.entity.js +63 -0
  89. package/dist/src/data-marts/entities/report.entity.js +85 -0
  90. package/dist/{data-marts → src/data-marts}/enums/data-mart-definition-type.enum.js +1 -0
  91. package/dist/src/data-marts/enums/data-mart-run-status.enum.js +10 -0
  92. package/dist/src/data-marts/enums/report-run-status.enum.js +10 -0
  93. package/dist/src/data-marts/mappers/connector.mapper.js +54 -0
  94. package/dist/src/data-marts/mappers/data-destination.mapper.js +58 -0
  95. package/dist/{data-marts → src/data-marts}/mappers/data-mart.mapper.js +4 -0
  96. package/dist/{data-marts → src/data-marts}/mappers/data-storage.mapper.js +2 -6
  97. package/dist/src/data-marts/mappers/report.mapper.js +81 -0
  98. package/dist/src/data-marts/services/connector-execution.service.js +190 -0
  99. package/dist/src/data-marts/services/connector.service.js +79 -0
  100. package/dist/src/data-marts/services/data-destination.service.js +39 -0
  101. package/dist/src/data-marts/use-cases/connector/available-connector.service.js +29 -0
  102. package/dist/src/data-marts/use-cases/connector/fields-connector.service.js +29 -0
  103. package/dist/src/data-marts/use-cases/connector/specification-connector.service.js +29 -0
  104. package/dist/src/data-marts/use-cases/create-data-destination.service.js +51 -0
  105. package/dist/src/data-marts/use-cases/create-report.service.js +83 -0
  106. package/dist/src/data-marts/use-cases/delete-data-destination.service.js +59 -0
  107. package/dist/src/data-marts/use-cases/delete-report.service.js +46 -0
  108. package/dist/src/data-marts/use-cases/get-data-destination.service.js +34 -0
  109. package/dist/src/data-marts/use-cases/get-report.service.js +51 -0
  110. package/dist/src/data-marts/use-cases/list-data-destinations.service.js +42 -0
  111. package/dist/src/data-marts/use-cases/list-reports-by-data-mart.service.js +47 -0
  112. package/dist/src/data-marts/use-cases/list-reports-by-project.service.js +47 -0
  113. package/dist/src/data-marts/use-cases/run-data-mart.service.js +39 -0
  114. package/dist/src/data-marts/use-cases/run-report.service.js +97 -0
  115. package/dist/src/data-marts/use-cases/update-data-destination.service.js +52 -0
  116. package/dist/src/data-marts/use-cases/update-report.service.js +77 -0
  117. package/dist/src/data-source.js +11 -0
  118. package/dist/src/load-env.js +34 -0
  119. package/dist/{main.js → src/main.js} +7 -1
  120. package/dist/src/migrations/1750350724543-create-data-mart-and-data-storage-tables.js +53 -0
  121. package/dist/src/migrations/helper.js +13 -0
  122. package/package.json +28 -9
  123. package/dist/config/database.config.js +0 -31
  124. package/dist/data-marts/data-marts.module.js +0 -65
  125. package/dist/data-marts/data-storage-types/bigquery/schemas/bigquery-credentials.schema.js +0 -11
  126. package/dist/data-marts/data-storage-types/data-storage-facades.js +0 -7
  127. package/dist/data-marts/data-storage-types/data-storage-providers.js +0 -27
  128. package/dist/data-marts/data-storage-types/interfaces/data-storage-title-generator.interface.js +0 -3
  129. package/dist/public/assets/index-BZJIHZWS.js +0 -502
  130. package/dist/public/assets/index-BpZgB8Pl.css +0 -1
  131. /package/dist/{common → src/common}/authorization-context/authorization.context.js +0 -0
  132. /package/dist/{common → src/common}/common.module.js +0 -0
  133. /package/dist/{common → src/common}/exceptions/access-validation.exception.js +0 -0
  134. /package/dist/{common → src/common}/exceptions/base-exception.filter.js +0 -0
  135. /package/dist/{common → src/common}/exceptions/base.exception.js +0 -0
  136. /package/dist/{common → src/common}/exceptions/business-violation.exception.js +0 -0
  137. /package/dist/{common → src/common}/resolver/type-resolver.js +0 -0
  138. /package/dist/{common → src/common}/resolver/typed-component.resolver.js +0 -0
  139. /package/dist/{common → src/common}/scheduler/facades/scheduler-facade.impl.js +0 -0
  140. /package/dist/{common → src/common}/scheduler/scheduler.module.js +0 -0
  141. /package/dist/{common → src/common}/scheduler/services/fetchers/time-based-trigger-fetcher.factory.js +0 -0
  142. /package/dist/{common → src/common}/scheduler/services/fetchers/time-based-trigger-fetcher.service.js +0 -0
  143. /package/dist/{common → src/common}/scheduler/services/graceful-shutdown.service.js +0 -0
  144. /package/dist/{common → src/common}/scheduler/services/runners/abstract-trigger-runner.service.js +0 -0
  145. /package/dist/{common → src/common}/scheduler/services/runners/direct-trigger-runner.service.js +0 -0
  146. /package/dist/{common → src/common}/scheduler/services/runners/pubsub-trigger-runner.service.js +0 -0
  147. /package/dist/{common → src/common}/scheduler/services/runners/trigger-runner.factory.js +0 -0
  148. /package/dist/{common → src/common}/scheduler/services/runners/trigger-runner.interface.js +0 -0
  149. /package/dist/{common → src/common}/scheduler/services/system-time.service.js +0 -0
  150. /package/dist/{common → src/common}/scheduler/shared/entities/scheduled-trigger.entity.js +0 -0
  151. /package/dist/{common → src/common}/scheduler/shared/entities/time-based-trigger.entity.js +0 -0
  152. /package/dist/{common → src/common}/scheduler/shared/scheduler.facade.js +0 -0
  153. /package/dist/{common → src/common}/scheduler/shared/time-based-trigger-handler.interface.js +0 -0
  154. /package/dist/{config → src/config}/global-pipes.config.js +0 -0
  155. /package/dist/{config → src/config}/swagger.config.js +0 -0
  156. /package/dist/{data-marts → src/data-marts}/controllers/data-storage.controller.js +0 -0
  157. /package/dist/{data-marts → src/data-marts}/controllers/spec/data-storage.api.js +0 -0
  158. /package/dist/{data-marts → src/data-marts}/data-storage-types/athena/schemas/athena-config.schema.js +0 -0
  159. /package/dist/{data-marts → src/data-marts}/data-storage-types/athena/schemas/athena-credentials.schema.js +0 -0
  160. /package/dist/{data-marts → src/data-marts}/data-storage-types/athena/services/athena-access.validator.js +0 -0
  161. /package/dist/{data-marts → src/data-marts}/data-storage-types/bigquery/schemas/bigquery-config.schema.js +0 -0
  162. /package/dist/{data-marts → src/data-marts}/data-storage-types/bigquery/services/bigquery-access.validator.js +0 -0
  163. /package/dist/{data-marts → src/data-marts}/data-storage-types/data-storage-config.type.js +0 -0
  164. /package/dist/{data-marts → src/data-marts}/data-storage-types/enums/data-storage-type.enum.js +0 -0
  165. /package/dist/{data-marts → src/data-marts}/data-storage-types/facades/data-storage-access.facade.js +0 -0
  166. /package/dist/{data-marts → src/data-marts}/data-storage-types/interfaces/data-storage-access-validator.interface.js +0 -0
  167. /package/dist/{data-marts → src/data-marts}/dto/domain/create-data-mart.command.js +0 -0
  168. /package/dist/{data-marts → src/data-marts}/dto/domain/create-data-storage.command.js +0 -0
  169. /package/dist/{data-marts → src/data-marts}/dto/domain/data-mart.dto.js +0 -0
  170. /package/dist/{data-marts → src/data-marts}/dto/domain/data-storage.dto.js +0 -0
  171. /package/dist/{data-marts → src/data-marts}/dto/domain/delete-data-mart.command.js +0 -0
  172. /package/dist/{data-marts → src/data-marts}/dto/domain/delete-data-storage.command.js +0 -0
  173. /package/dist/{data-marts → src/data-marts}/dto/domain/get-data-mart.command.js +0 -0
  174. /package/dist/{data-marts → src/data-marts}/dto/domain/get-data-storage.command.js +0 -0
  175. /package/dist/{data-marts → src/data-marts}/dto/domain/list-data-marts.command.js +0 -0
  176. /package/dist/{data-marts → src/data-marts}/dto/domain/list-data-storages.command.js +0 -0
  177. /package/dist/{data-marts → src/data-marts}/dto/domain/publish-data-mart.command.js +0 -0
  178. /package/dist/{data-marts → src/data-marts}/dto/domain/update-data-mart-definition.command.js +0 -0
  179. /package/dist/{data-marts → src/data-marts}/dto/domain/update-data-mart-description.command.js +0 -0
  180. /package/dist/{data-marts → src/data-marts}/dto/domain/update-data-mart-title.command.js +0 -0
  181. /package/dist/{data-marts → src/data-marts}/dto/domain/update-data-storage.command.js +0 -0
  182. /package/dist/{data-marts → src/data-marts}/dto/presentation/create-data-mart-request-api.dto.js +0 -0
  183. /package/dist/{data-marts → src/data-marts}/dto/presentation/create-data-mart-response-api.dto.js +0 -0
  184. /package/dist/{data-marts → src/data-marts}/dto/presentation/create-data-storage-api.dto.js +0 -0
  185. /package/dist/{data-marts → src/data-marts}/dto/presentation/data-mart-response-api.dto.js +0 -0
  186. /package/dist/{data-marts → src/data-marts}/dto/presentation/data-storage-list-response-api.dto.js +0 -0
  187. /package/dist/{data-marts → src/data-marts}/dto/presentation/data-storage-response-api.dto.js +0 -0
  188. /package/dist/{data-marts → src/data-marts}/dto/presentation/update-data-mart-definition-api.dto.js +0 -0
  189. /package/dist/{data-marts → src/data-marts}/dto/presentation/update-data-mart-description-api.dto.js +0 -0
  190. /package/dist/{data-marts → src/data-marts}/dto/presentation/update-data-mart-title-api.dto.js +0 -0
  191. /package/dist/{data-marts → src/data-marts}/dto/presentation/update-data-storage-api.dto.js +0 -0
  192. /package/dist/{data-marts → src/data-marts}/dto/schemas/data-mart-table-definitions/data-mart-definition.js +0 -0
  193. /package/dist/{data-marts → src/data-marts}/dto/schemas/data-mart-table-definitions/sql-definition.schema.js +0 -0
  194. /package/dist/{data-marts → src/data-marts}/dto/schemas/data-mart-table-definitions/table-definition.schema.js +0 -0
  195. /package/dist/{data-marts → src/data-marts}/dto/schemas/data-mart-table-definitions/table-pattern-definition.schema.js +0 -0
  196. /package/dist/{data-marts → src/data-marts}/dto/schemas/data-mart-table-definitions/view-definition.schema.js +0 -0
  197. /package/dist/{data-marts → src/data-marts}/entities/data-mart.entity.js +0 -0
  198. /package/dist/{data-marts → src/data-marts}/entities/data-storage.entity.js +0 -0
  199. /package/dist/{data-marts → src/data-marts}/enums/data-mart-status.enum.js +0 -0
  200. /package/dist/{data-marts → src/data-marts}/services/data-mart.service.js +0 -0
  201. /package/dist/{data-marts → src/data-marts}/services/data-storage.service.js +0 -0
  202. /package/dist/{data-marts → src/data-marts}/use-cases/create-data-mart.service.js +0 -0
  203. /package/dist/{data-marts → src/data-marts}/use-cases/create-data-storage.service.js +0 -0
  204. /package/dist/{data-marts → src/data-marts}/use-cases/delete-data-mart.service.js +0 -0
  205. /package/dist/{data-marts → src/data-marts}/use-cases/delete-data-storage.service.js +0 -0
  206. /package/dist/{data-marts → src/data-marts}/use-cases/get-data-mart.service.js +0 -0
  207. /package/dist/{data-marts → src/data-marts}/use-cases/get-data-storage.service.js +0 -0
  208. /package/dist/{data-marts → src/data-marts}/use-cases/list-data-marts.service.js +0 -0
  209. /package/dist/{data-marts → src/data-marts}/use-cases/list-data-storages.service.js +0 -0
  210. /package/dist/{data-marts → src/data-marts}/use-cases/publish-data-mart.service.js +0 -0
  211. /package/dist/{data-marts → src/data-marts}/use-cases/update-data-mart-definition.service.js +0 -0
  212. /package/dist/{data-marts → src/data-marts}/use-cases/update-data-mart-description.service.js +0 -0
  213. /package/dist/{data-marts → src/data-marts}/use-cases/update-data-mart-title.service.js +0 -0
  214. /package/dist/{data-marts → src/data-marts}/use-cases/update-data-storage.service.js +0 -0
@@ -1,502 +0,0 @@
1
- var wD=Object.defineProperty;var ED=(e,t,n)=>t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Jb=(e,t,n)=>ED(e,typeof t!="symbol"?t+"":t,n);function _D(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(a,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function hE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yp={exports:{}},Us={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var eS;function CD(){if(eS)return Us;eS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,i,s){var u=null;if(s!==void 0&&(u=""+s),i.key!==void 0&&(u=""+i.key),"key"in i){s={};for(var d in i)d!=="key"&&(s[d]=i[d])}else s=i;return i=s.ref,{$$typeof:e,type:a,key:u,ref:i!==void 0?i:null,props:s}}return Us.Fragment=t,Us.jsx=n,Us.jsxs=n,Us}var tS;function RD(){return tS||(tS=1,yp.exports=CD()),yp.exports}var p=RD(),xp={exports:{}},ot={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var nS;function AD(){if(nS)return ot;nS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,E={};function C(N,H,P){this.props=N,this.context=H,this.refs=E,this.updater=P||S}C.prototype.isReactComponent={},C.prototype.setState=function(N,H){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,H,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function R(){}R.prototype=C.prototype;function T(N,H,P){this.props=N,this.context=H,this.refs=E,this.updater=P||S}var D=T.prototype=new R;D.constructor=T,w(D,C.prototype),D.isPureReactComponent=!0;var j=Array.isArray,O={H:null,A:null,T:null,S:null,V:null},M=Object.prototype.hasOwnProperty;function I(N,H,P,B,oe,de){return P=de.ref,{$$typeof:e,type:N,key:H,ref:P!==void 0?P:null,props:de}}function Z(N,H){return I(N.type,H,void 0,void 0,void 0,N.props)}function ee(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function se(N){var H={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(P){return H[P]})}var ye=/\/+/g;function me(N,H){return typeof N=="object"&&N!==null&&N.key!=null?se(""+N.key):H.toString(36)}function ve(){}function ce(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(ve,ve):(N.status="pending",N.then(function(H){N.status==="pending"&&(N.status="fulfilled",N.value=H)},function(H){N.status==="pending"&&(N.status="rejected",N.reason=H)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function te(N,H,P,B,oe){var de=typeof N;(de==="undefined"||de==="boolean")&&(N=null);var pe=!1;if(N===null)pe=!0;else switch(de){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(N.$$typeof){case e:case t:pe=!0;break;case g:return pe=N._init,te(pe(N._payload),H,P,B,oe)}}if(pe)return oe=oe(N),pe=B===""?"."+me(N,0):B,j(oe)?(P="",pe!=null&&(P=pe.replace(ye,"$&/")+"/"),te(oe,H,P,"",function(Le){return Le})):oe!=null&&(ee(oe)&&(oe=Z(oe,P+(oe.key==null||N&&N.key===oe.key?"":(""+oe.key).replace(ye,"$&/")+"/")+pe)),H.push(oe)),1;pe=0;var ue=B===""?".":B+":";if(j(N))for(var Ce=0;Ce<N.length;Ce++)B=N[Ce],de=ue+me(B,Ce),pe+=te(B,H,P,de,oe);else if(Ce=x(N),typeof Ce=="function")for(N=Ce.call(N),Ce=0;!(B=N.next()).done;)B=B.value,de=ue+me(B,Ce++),pe+=te(B,H,P,de,oe);else if(de==="object"){if(typeof N.then=="function")return te(ce(N),H,P,B,oe);throw H=String(N),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return pe}function k(N,H,P){if(N==null)return N;var B=[],oe=0;return te(N,B,"","",function(de){return H.call(P,de,oe++)}),B}function q(N){if(N._status===-1){var H=N._result;H=H(),H.then(function(P){(N._status===0||N._status===-1)&&(N._status=1,N._result=P)},function(P){(N._status===0||N._status===-1)&&(N._status=2,N._result=P)}),N._status===-1&&(N._status=0,N._result=H)}if(N._status===1)return N._result.default;throw N._result}var V=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function re(){}return ot.Children={map:k,forEach:function(N,H,P){k(N,function(){H.apply(this,arguments)},P)},count:function(N){var H=0;return k(N,function(){H++}),H},toArray:function(N){return k(N,function(H){return H})||[]},only:function(N){if(!ee(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ot.Component=C,ot.Fragment=n,ot.Profiler=i,ot.PureComponent=T,ot.StrictMode=a,ot.Suspense=f,ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ot.__COMPILER_RUNTIME={__proto__:null,c:function(N){return O.H.useMemoCache(N)}},ot.cache=function(N){return function(){return N.apply(null,arguments)}},ot.cloneElement=function(N,H,P){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var B=w({},N.props),oe=N.key,de=void 0;if(H!=null)for(pe in H.ref!==void 0&&(de=void 0),H.key!==void 0&&(oe=""+H.key),H)!M.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(B[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)B.children=P;else if(1<pe){for(var ue=Array(pe),Ce=0;Ce<pe;Ce++)ue[Ce]=arguments[Ce+2];B.children=ue}return I(N.type,oe,void 0,void 0,de,B)},ot.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:s,_context:N},N},ot.createElement=function(N,H,P){var B,oe={},de=null;if(H!=null)for(B in H.key!==void 0&&(de=""+H.key),H)M.call(H,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(oe[B]=H[B]);var pe=arguments.length-2;if(pe===1)oe.children=P;else if(1<pe){for(var ue=Array(pe),Ce=0;Ce<pe;Ce++)ue[Ce]=arguments[Ce+2];oe.children=ue}if(N&&N.defaultProps)for(B in pe=N.defaultProps,pe)oe[B]===void 0&&(oe[B]=pe[B]);return I(N,de,void 0,void 0,null,oe)},ot.createRef=function(){return{current:null}},ot.forwardRef=function(N){return{$$typeof:d,render:N}},ot.isValidElement=ee,ot.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:q}},ot.memo=function(N,H){return{$$typeof:h,type:N,compare:H===void 0?null:H}},ot.startTransition=function(N){var H=O.T,P={};O.T=P;try{var B=N(),oe=O.S;oe!==null&&oe(P,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(re,V)}catch(de){V(de)}finally{O.T=H}},ot.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},ot.use=function(N){return O.H.use(N)},ot.useActionState=function(N,H,P){return O.H.useActionState(N,H,P)},ot.useCallback=function(N,H){return O.H.useCallback(N,H)},ot.useContext=function(N){return O.H.useContext(N)},ot.useDebugValue=function(){},ot.useDeferredValue=function(N,H){return O.H.useDeferredValue(N,H)},ot.useEffect=function(N,H,P){var B=O.H;if(typeof P=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return B.useEffect(N,H)},ot.useId=function(){return O.H.useId()},ot.useImperativeHandle=function(N,H,P){return O.H.useImperativeHandle(N,H,P)},ot.useInsertionEffect=function(N,H){return O.H.useInsertionEffect(N,H)},ot.useLayoutEffect=function(N,H){return O.H.useLayoutEffect(N,H)},ot.useMemo=function(N,H){return O.H.useMemo(N,H)},ot.useOptimistic=function(N,H){return O.H.useOptimistic(N,H)},ot.useReducer=function(N,H,P){return O.H.useReducer(N,H,P)},ot.useRef=function(N){return O.H.useRef(N)},ot.useState=function(N){return O.H.useState(N)},ot.useSyncExternalStore=function(N,H,P){return O.H.useSyncExternalStore(N,H,P)},ot.useTransition=function(){return O.H.useTransition()},ot.version="19.1.0",ot}var rS;function tv(){return rS||(rS=1,xp.exports=AD()),xp.exports}var y=tv();const tt=hE(y),mE=_D({__proto__:null,default:tt},[y]);var bp={exports:{}},Is={},Sp={exports:{}},wp={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var aS;function TD(){return aS||(aS=1,function(e){function t(k,q){var V=k.length;k.push(q);e:for(;0<V;){var re=V-1>>>1,N=k[re];if(0<i(N,q))k[re]=q,k[V]=N,V=re;else break e}}function n(k){return k.length===0?null:k[0]}function a(k){if(k.length===0)return null;var q=k[0],V=k.pop();if(V!==q){k[0]=V;e:for(var re=0,N=k.length,H=N>>>1;re<H;){var P=2*(re+1)-1,B=k[P],oe=P+1,de=k[oe];if(0>i(B,V))oe<N&&0>i(de,B)?(k[re]=de,k[oe]=V,re=oe):(k[re]=B,k[P]=V,re=P);else if(oe<N&&0>i(de,V))k[re]=de,k[oe]=V,re=oe;else break e}}return q}function i(k,q){var V=k.sortIndex-q.sortIndex;return V!==0?V:k.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,b=null,x=3,S=!1,w=!1,E=!1,C=!1,R=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function j(k){for(var q=n(h);q!==null;){if(q.callback===null)a(h);else if(q.startTime<=k)a(h),q.sortIndex=q.expirationTime,t(f,q);else break;q=n(h)}}function O(k){if(E=!1,j(k),!w)if(n(f)!==null)w=!0,M||(M=!0,me());else{var q=n(h);q!==null&&te(O,q.startTime-k)}}var M=!1,I=-1,Z=5,ee=-1;function se(){return C?!0:!(e.unstable_now()-ee<Z)}function ye(){if(C=!1,M){var k=e.unstable_now();ee=k;var q=!0;try{e:{w=!1,E&&(E=!1,T(I),I=-1),S=!0;var V=x;try{t:{for(j(k),b=n(f);b!==null&&!(b.expirationTime>k&&se());){var re=b.callback;if(typeof re=="function"){b.callback=null,x=b.priorityLevel;var N=re(b.expirationTime<=k);if(k=e.unstable_now(),typeof N=="function"){b.callback=N,j(k),q=!0;break t}b===n(f)&&a(f),j(k)}else a(f);b=n(f)}if(b!==null)q=!0;else{var H=n(h);H!==null&&te(O,H.startTime-k),q=!1}}break e}finally{b=null,x=V,S=!1}q=void 0}}finally{q?me():M=!1}}}var me;if(typeof D=="function")me=function(){D(ye)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,ce=ve.port2;ve.port1.onmessage=ye,me=function(){ce.postMessage(null)}}else me=function(){R(ye,0)};function te(k,q){I=R(function(){k(e.unstable_now())},q)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(k){switch(x){case 1:case 2:case 3:var q=3;break;default:q=x}var V=x;x=q;try{return k()}finally{x=V}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(k,q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var V=x;x=k;try{return q()}finally{x=V}},e.unstable_scheduleCallback=function(k,q,V){var re=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?re+V:re):V=re,k){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=V+N,k={id:g++,callback:q,priorityLevel:k,startTime:V,expirationTime:N,sortIndex:-1},V>re?(k.sortIndex=V,t(h,k),n(f)===null&&k===n(h)&&(E?(T(I),I=-1):E=!0,te(O,V-re))):(k.sortIndex=N,t(f,k),w||S||(w=!0,M||(M=!0,me()))),k},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(k){var q=x;return function(){var V=x;x=q;try{return k.apply(this,arguments)}finally{x=V}}}}(wp)),wp}var oS;function DD(){return oS||(oS=1,Sp.exports=TD()),Sp.exports}var Ep={exports:{}},xn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var iS;function MD(){if(iS)return xn;iS=1;var e=tv();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(f,h,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:b==null?null:""+b,children:f,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,xn.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(f,h,null,g)},xn.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},xn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},xn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},xn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:S}):g==="script"&&a.d.X(f,{crossOrigin:b,integrity:x,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},xn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},xn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},xn.requestFormReset=function(f){a.d.r(f)},xn.unstable_batchedUpdates=function(f,h){return f(h)},xn.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},xn.useFormStatus=function(){return u.H.useHostTransitionStatus()},xn.version="19.1.0",xn}var lS;function pE(){if(lS)return Ep.exports;lS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ep.exports=MD(),Ep.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var sS;function OD(){if(sS)return Is;sS=1;var e=DD(),t=tv(),n=pE();function a(r){var o="https://react.dev/errors/"+r;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var o=r,l=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(l=o.return),r=o.return;while(r)}return o.tag===3?l:null}function u(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function d(r){if(s(r)!==r)throw Error(a(188))}function f(r){var o=r.alternate;if(!o){if(o=s(r),o===null)throw Error(a(188));return o!==r?null:r}for(var l=r,c=o;;){var m=l.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){l=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===l)return d(m),r;if(v===c)return d(m),o;v=v.sibling}throw Error(a(188))}if(l.return!==c.return)l=m,c=v;else{for(var _=!1,A=m.child;A;){if(A===l){_=!0,l=m,c=v;break}if(A===c){_=!0,c=m,l=v;break}A=A.sibling}if(!_){for(A=v.child;A;){if(A===l){_=!0,l=v,c=m;break}if(A===c){_=!0,c=v,l=m;break}A=A.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==c)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:o}function h(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r;for(r=r.child;r!==null;){if(o=h(r),o!==null)return o;r=r.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),T=Symbol.for("react.consumer"),D=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),ye=Symbol.iterator;function me(r){return r===null||typeof r!="object"?null:(r=ye&&r[ye]||r["@@iterator"],typeof r=="function"?r:null)}var ve=Symbol.for("react.client.reference");function ce(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ve?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case M:return"SuspenseList";case ee:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case D:return(r.displayName||"Context")+".Provider";case T:return(r._context.displayName||"Context")+".Consumer";case j:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return o=r.displayName||null,o!==null?o:ce(r.type)||"Memo";case Z:o=r._payload,r=r._init;try{return ce(r(o))}catch{}}return null}var te=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},re=[],N=-1;function H(r){return{current:r}}function P(r){0>N||(r.current=re[N],re[N]=null,N--)}function B(r,o){N++,re[N]=r.current,r.current=o}var oe=H(null),de=H(null),pe=H(null),ue=H(null);function Ce(r,o){switch(B(pe,o),B(de,r),B(oe,null),o.nodeType){case 9:case 11:r=(r=o.documentElement)&&(r=r.namespaceURI)?Ab(r):0;break;default:if(r=o.tagName,o=o.namespaceURI)o=Ab(o),r=Tb(o,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}P(oe),B(oe,r)}function Le(){P(oe),P(de),P(pe)}function ke(r){r.memoizedState!==null&&B(ue,r);var o=oe.current,l=Tb(o,r.type);o!==l&&(B(de,r),B(oe,l))}function Je(r){de.current===r&&(P(oe),P(de)),ue.current===r&&(P(ue),ks._currentValue=V)}var nt=Object.prototype.hasOwnProperty,Gt=e.unstable_scheduleCallback,Pt=e.unstable_cancelCallback,tr=e.unstable_shouldYield,br=e.unstable_requestPaint,qt=e.unstable_now,Ri=e.unstable_getCurrentPriorityLevel,nr=e.unstable_ImmediatePriority,z=e.unstable_UserBlockingPriority,Q=e.unstable_NormalPriority,ae=e.unstable_LowPriority,Ee=e.unstable_IdlePriority,we=e.log,xe=e.unstable_setDisableYieldValue,Ae=null,$e=null;function ut(r){if(typeof we=="function"&&xe(r),$e&&typeof $e.setStrictMode=="function")try{$e.setStrictMode(Ae,r)}catch{}}var Ct=Math.clz32?Math.clz32:Ai,Oa=Math.log,nn=Math.LN2;function Ai(r){return r>>>=0,r===0?32:31-(Oa(r)/nn|0)|0}var Sr=256,wr=4194304;function Er(r){var o=r&42;if(o!==0)return o;switch(r&-r){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:case 262144:case 524288:case 1048576:case 2097152:return r&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Fr(r,o,l){var c=r.pendingLanes;if(c===0)return 0;var m=0,v=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var A=c&134217727;return A!==0?(c=A&~v,c!==0?m=Er(c):(_&=A,_!==0?m=Er(_):l||(l=A&~r,l!==0&&(m=Er(l))))):(A=c&~v,A!==0?m=Er(A):_!==0?m=Er(_):l||(l=c&~r,l!==0&&(m=Er(l)))),m===0?0:o!==0&&o!==m&&(o&v)===0&&(v=m&-m,l=o&-o,v>=l||v===32&&(l&4194048)!==0)?o:m}function rr(r,o){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&o)===0}function jo(r,o){switch(r){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ti(){var r=Sr;return Sr<<=1,(Sr&4194048)===0&&(Sr=256),r}function Zu(){var r=wr;return wr<<=1,(wr&62914560)===0&&(wr=4194304),r}function Di(r){for(var o=[],l=0;31>l;l++)o.push(r);return o}function ko(r,o){r.pendingLanes|=o,o!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Yu(r,o,l,c,m,v){var _=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var A=r.entanglements,L=r.expirationTimes,K=r.hiddenUpdates;for(l=_&~l;0<l;){var ie=31-Ct(l),fe=1<<ie;A[ie]=0,L[ie]=-1;var X=K[ie];if(X!==null)for(K[ie]=null,ie=0;ie<X.length;ie++){var W=X[ie];W!==null&&(W.lane&=-536870913)}l&=~fe}c!==0&&Lo(r,c,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(_&~o))}function Lo(r,o,l){r.pendingLanes|=o,r.suspendedLanes&=~o;var c=31-Ct(o);r.entangledLanes|=o,r.entanglements[c]=r.entanglements[c]|1073741824|l&4194090}function Po(r,o){var l=r.entangledLanes|=o;for(r=r.entanglements;l;){var c=31-Ct(l),m=1<<c;m&o|r[c]&o&&(r[c]|=o),l&=~m}}function Hl(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Bl(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function F(){var r=q.p;return r!==0?r:(r=window.event,r===void 0?32:Zb(r.type))}function G(r,o){var l=q.p;try{return q.p=r,o()}finally{q.p=l}}var J=Math.random().toString(36).slice(2),he="__reactFiber$"+J,be="__reactProps$"+J,Pe="__reactContainer$"+J,He="__reactEvents$"+J,De="__reactListeners$"+J,Ie="__reactHandles$"+J,Ve="__reactResources$"+J,Ye="__reactMarker$"+J;function Fe(r){delete r[he],delete r[be],delete r[He],delete r[De],delete r[Ie]}function Qe(r){var o=r[he];if(o)return o;for(var l=r.parentNode;l;){if(o=l[Pe]||l[he]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(r=Nb(r);r!==null;){if(l=r[he])return l;r=Nb(r)}return o}r=l,l=r.parentNode}return null}function yt(r){if(r=r[he]||r[Pe]){var o=r.tag;if(o===5||o===6||o===13||o===26||o===27||o===3)return r}return null}function zt(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r.stateNode;throw Error(a(33))}function Vt(r){var o=r[Ve];return o||(o=r[Ve]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function wt(r){r[Ye]=!0}var pt=new Set,Na={};function _n(r,o){ar(r,o),ar(r+"Capture",o)}function ar(r,o){for(Na[r]=o,r=0;r<o.length;r++)pt.add(o[r])}var Tn=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]*$"),ja={},ka={};function Gl(r){return nt.call(ka,r)?!0:nt.call(ja,r)?!1:Tn.test(r)?ka[r]=!0:(ja[r]=!0,!1)}function or(r,o,l){if(Gl(o))if(l===null)r.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(o);return}}r.setAttribute(o,""+l)}}function na(r,o,l){if(l===null)r.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttribute(o,""+l)}}function ct(r,o,l,c){if(c===null)r.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(o,l,""+c)}}var vn,_r;function Cr(r){if(vn===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);vn=o&&o[1]||"",_r=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+vn+r+_r}var zo=!1;function Ut(r,o){if(!r||zo)return"";zo=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(o){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(W){var X=W}Reflect.construct(r,[],fe)}else{try{fe.call()}catch(W){X=W}r.call(fe.prototype)}}else{try{throw Error()}catch(W){X=W}(fe=r())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(W){if(W&&X&&typeof W.stack=="string")return[W.stack,X.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),_=v[0],A=v[1];if(_&&A){var L=_.split(`
44
- `),K=A.split(`
45
- `);for(m=c=0;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;for(;m<K.length&&!K[m].includes("DetermineComponentFrameRoot");)m++;if(c===L.length||m===K.length)for(c=L.length-1,m=K.length-1;1<=c&&0<=m&&L[c]!==K[m];)m--;for(;1<=c&&0<=m;c--,m--)if(L[c]!==K[m]){if(c!==1||m!==1)do if(c--,m--,0>m||L[c]!==K[m]){var ie=`
46
- `+L[c].replace(" at new "," at ");return r.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",r.displayName)),ie}while(1<=c&&0<=m);break}}}finally{zo=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?Cr(l):""}function La(r){switch(r.tag){case 26:case 27:case 5:return Cr(r.type);case 16:return Cr("Lazy");case 13:return Cr("Suspense");case 19:return Cr("SuspenseList");case 0:case 15:return Ut(r.type,!1);case 11:return Ut(r.type.render,!1);case 1:return Ut(r.type,!0);case 31:return Cr("Activity");default:return""}}function ql(r){try{var o="";do o+=La(r),r=r.return;while(r);return o}catch(l){return`
47
- Error generating stack: `+l.message+`
48
- `+l.stack}}function Dn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function wy(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function vT(r){var o=wy(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),c=""+r[o];if(!r.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var m=l.get,v=l.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return m.call(this)},set:function(_){c=""+_,v.call(this,_)}}),Object.defineProperty(r,o,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(_){c=""+_},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function Ku(r){r._valueTracker||(r._valueTracker=vT(r))}function Ey(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return r&&(c=wy(r)?r.checked?"true":"false":r.value),r=c,r!==l?(o.setValue(r),!0):!1}function Qu(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var yT=/[\n"\\]/g;function ir(r){return r.replace(yT,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function ph(r,o,l,c,m,v,_,A){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),o!=null?_==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+Dn(o)):r.value!==""+Dn(o)&&(r.value=""+Dn(o)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),o!=null?gh(r,_,Dn(o)):l!=null?gh(r,_,Dn(l)):c!=null&&r.removeAttribute("value"),m==null&&v!=null&&(r.defaultChecked=!!v),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+Dn(A):r.removeAttribute("name")}function _y(r,o,l,c,m,v,_,A){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),o!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||o!=null))return;l=l!=null?""+Dn(l):"",o=o!=null?""+Dn(o):l,A||o===r.value||(r.value=o),r.defaultValue=o}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=A?r.checked:!!c,r.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_)}function gh(r,o,l){o==="number"&&Qu(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Mi(r,o,l,c){if(r=r.options,o){o={};for(var m=0;m<l.length;m++)o["$"+l[m]]=!0;for(l=0;l<r.length;l++)m=o.hasOwnProperty("$"+r[l].value),r[l].selected!==m&&(r[l].selected=m),m&&c&&(r[l].defaultSelected=!0)}else{for(l=""+Dn(l),o=null,m=0;m<r.length;m++){if(r[m].value===l){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}o!==null||r[m].disabled||(o=r[m])}o!==null&&(o.selected=!0)}}function Cy(r,o,l){if(o!=null&&(o=""+Dn(o),o!==r.value&&(r.value=o),l==null)){r.defaultValue!==o&&(r.defaultValue=o);return}r.defaultValue=l!=null?""+Dn(l):""}function Ry(r,o,l,c){if(o==null){if(c!=null){if(l!=null)throw Error(a(92));if(te(c)){if(1<c.length)throw Error(a(93));c=c[0]}l=c}l==null&&(l=""),o=l}l=Dn(o),r.defaultValue=l,c=r.textContent,c===l&&c!==""&&c!==null&&(r.value=c)}function Oi(r,o){if(o){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=o;return}}r.textContent=o}var xT=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 Ay(r,o,l){var c=o.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="":c?r.setProperty(o,l):typeof l!="number"||l===0||xT.has(o)?o==="float"?r.cssFloat=l:r[o]=(""+l).trim():r[o]=l+"px"}function Ty(r,o,l){if(o!=null&&typeof o!="object")throw Error(a(62));if(r=r.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in o)c=o[m],o.hasOwnProperty(m)&&l[m]!==c&&Ay(r,m,c)}else for(var v in o)o.hasOwnProperty(v)&&Ay(r,v,o[v])}function vh(r){if(r.indexOf("-")===-1)return!1;switch(r){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 bT=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"]]),ST=/^[\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 Xu(r){return ST.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}var yh=null;function xh(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ni=null,ji=null;function Dy(r){var o=yt(r);if(o&&(r=o.stateNode)){var l=r[be]||null;e:switch(r=o.stateNode,o.type){case"input":if(ph(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),o=l.name,l.type==="radio"&&o!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ir(""+o)+'"][type="radio"]'),o=0;o<l.length;o++){var c=l[o];if(c!==r&&c.form===r.form){var m=c[be]||null;if(!m)throw Error(a(90));ph(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(o=0;o<l.length;o++)c=l[o],c.form===r.form&&Ey(c)}break e;case"textarea":Cy(r,l.value,l.defaultValue);break e;case"select":o=l.value,o!=null&&Mi(r,!!l.multiple,o,!1)}}}var bh=!1;function My(r,o,l){if(bh)return r(o,l);bh=!0;try{var c=r(o);return c}finally{if(bh=!1,(Ni!==null||ji!==null)&&(Pc(),Ni&&(o=Ni,r=ji,ji=Ni=null,Dy(o),r)))for(o=0;o<r.length;o++)Dy(r[o])}}function Zl(r,o){var l=r.stateNode;if(l===null)return null;var c=l[be]||null;if(c===null)return null;l=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(a(231,o,typeof l));return l}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sh=!1;if(ra)try{var Yl={};Object.defineProperty(Yl,"passive",{get:function(){Sh=!0}}),window.addEventListener("test",Yl,Yl),window.removeEventListener("test",Yl,Yl)}catch{Sh=!1}var Pa=null,wh=null,Wu=null;function Oy(){if(Wu)return Wu;var r,o=wh,l=o.length,c,m="value"in Pa?Pa.value:Pa.textContent,v=m.length;for(r=0;r<l&&o[r]===m[r];r++);var _=l-r;for(c=1;c<=_&&o[l-c]===m[v-c];c++);return Wu=m.slice(r,1<c?1-c:void 0)}function Ju(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function ec(){return!0}function Ny(){return!1}function Mn(r){function o(l,c,m,v,_){this._reactName=l,this._targetInst=m,this.type=c,this.nativeEvent=v,this.target=_,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(l=r[A],this[A]=l?l(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?ec:Ny,this.isPropagationStopped=Ny,this}return g(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ec)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ec)},persist:function(){},isPersistent:ec}),o}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tc=Mn(Fo),Kl=g({},Fo,{view:0,detail:0}),wT=Mn(Kl),Eh,_h,Ql,nc=g({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rh,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ql&&(Ql&&r.type==="mousemove"?(Eh=r.screenX-Ql.screenX,_h=r.screenY-Ql.screenY):_h=Eh=0,Ql=r),Eh)},movementY:function(r){return"movementY"in r?r.movementY:_h}}),jy=Mn(nc),ET=g({},nc,{dataTransfer:0}),_T=Mn(ET),CT=g({},Kl,{relatedTarget:0}),Ch=Mn(CT),RT=g({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),AT=Mn(RT),TT=g({},Fo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),DT=Mn(TT),MT=g({},Fo,{data:0}),ky=Mn(MT),OT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NT={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"},jT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kT(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=jT[r])?!!o[r]:!1}function Rh(){return kT}var LT=g({},Kl,{key:function(r){if(r.key){var o=OT[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Ju(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?NT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rh,charCode:function(r){return r.type==="keypress"?Ju(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ju(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),PT=Mn(LT),zT=g({},nc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ly=Mn(zT),FT=g({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rh}),UT=Mn(FT),IT=g({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),VT=Mn(IT),$T=g({},nc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),HT=Mn($T),BT=g({},Fo,{newState:0,oldState:0}),GT=Mn(BT),qT=[9,13,27,32],Ah=ra&&"CompositionEvent"in window,Xl=null;ra&&"documentMode"in document&&(Xl=document.documentMode);var ZT=ra&&"TextEvent"in window&&!Xl,Py=ra&&(!Ah||Xl&&8<Xl&&11>=Xl),zy=" ",Fy=!1;function Uy(r,o){switch(r){case"keyup":return qT.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iy(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ki=!1;function YT(r,o){switch(r){case"compositionend":return Iy(o);case"keypress":return o.which!==32?null:(Fy=!0,zy);case"textInput":return r=o.data,r===zy&&Fy?null:r;default:return null}}function KT(r,o){if(ki)return r==="compositionend"||!Ah&&Uy(r,o)?(r=Oy(),Wu=wh=Pa=null,ki=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Py&&o.locale!=="ko"?null:o.data;default:return null}}var QT={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 Vy(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!QT[r.type]:o==="textarea"}function $y(r,o,l,c){Ni?ji?ji.push(c):ji=[c]:Ni=c,o=$c(o,"onChange"),0<o.length&&(l=new tc("onChange","change",null,l,c),r.push({event:l,listeners:o}))}var Wl=null,Jl=null;function XT(r){wb(r,0)}function rc(r){var o=zt(r);if(Ey(o))return r}function Hy(r,o){if(r==="change")return o}var By=!1;if(ra){var Th;if(ra){var Dh="oninput"in document;if(!Dh){var Gy=document.createElement("div");Gy.setAttribute("oninput","return;"),Dh=typeof Gy.oninput=="function"}Th=Dh}else Th=!1;By=Th&&(!document.documentMode||9<document.documentMode)}function qy(){Wl&&(Wl.detachEvent("onpropertychange",Zy),Jl=Wl=null)}function Zy(r){if(r.propertyName==="value"&&rc(Jl)){var o=[];$y(o,Jl,r,xh(r)),My(XT,o)}}function WT(r,o,l){r==="focusin"?(qy(),Wl=o,Jl=l,Wl.attachEvent("onpropertychange",Zy)):r==="focusout"&&qy()}function JT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return rc(Jl)}function e2(r,o){if(r==="click")return rc(o)}function t2(r,o){if(r==="input"||r==="change")return rc(o)}function n2(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Un=typeof Object.is=="function"?Object.is:n2;function es(r,o){if(Un(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var l=Object.keys(r),c=Object.keys(o);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var m=l[c];if(!nt.call(o,m)||!Un(r[m],o[m]))return!1}return!0}function Yy(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ky(r,o){var l=Yy(r);r=0;for(var c;l;){if(l.nodeType===3){if(c=r+l.textContent.length,r<=o&&c>=o)return{node:l,offset:o-r};r=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Yy(l)}}function Qy(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Qy(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Xy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var o=Qu(r.document);o instanceof r.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)r=o.contentWindow;else break;o=Qu(r.document)}return o}function Mh(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}var r2=ra&&"documentMode"in document&&11>=document.documentMode,Li=null,Oh=null,ts=null,Nh=!1;function Wy(r,o,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Nh||Li==null||Li!==Qu(c)||(c=Li,"selectionStart"in c&&Mh(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ts&&es(ts,c)||(ts=c,c=$c(Oh,"onSelect"),0<c.length&&(o=new tc("onSelect","select",null,o,l),r.push({event:o,listeners:c}),o.target=Li)))}function Uo(r,o){var l={};return l[r.toLowerCase()]=o.toLowerCase(),l["Webkit"+r]="webkit"+o,l["Moz"+r]="moz"+o,l}var Pi={animationend:Uo("Animation","AnimationEnd"),animationiteration:Uo("Animation","AnimationIteration"),animationstart:Uo("Animation","AnimationStart"),transitionrun:Uo("Transition","TransitionRun"),transitionstart:Uo("Transition","TransitionStart"),transitioncancel:Uo("Transition","TransitionCancel"),transitionend:Uo("Transition","TransitionEnd")},jh={},Jy={};ra&&(Jy=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function Io(r){if(jh[r])return jh[r];if(!Pi[r])return r;var o=Pi[r],l;for(l in o)if(o.hasOwnProperty(l)&&l in Jy)return jh[r]=o[l];return r}var e0=Io("animationend"),t0=Io("animationiteration"),n0=Io("animationstart"),a2=Io("transitionrun"),o2=Io("transitionstart"),i2=Io("transitioncancel"),r0=Io("transitionend"),a0=new Map,kh="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(" ");kh.push("scrollEnd");function Rr(r,o){a0.set(r,o),_n(o,[r])}var o0=new WeakMap;function lr(r,o){if(typeof r=="object"&&r!==null){var l=o0.get(r);return l!==void 0?l:(o={value:r,source:o,stack:ql(o)},o0.set(r,o),o)}return{value:r,source:o,stack:ql(o)}}var sr=[],zi=0,Lh=0;function ac(){for(var r=zi,o=Lh=zi=0;o<r;){var l=sr[o];sr[o++]=null;var c=sr[o];sr[o++]=null;var m=sr[o];sr[o++]=null;var v=sr[o];if(sr[o++]=null,c!==null&&m!==null){var _=c.pending;_===null?m.next=m:(m.next=_.next,_.next=m),c.pending=m}v!==0&&i0(l,m,v)}}function oc(r,o,l,c){sr[zi++]=r,sr[zi++]=o,sr[zi++]=l,sr[zi++]=c,Lh|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Ph(r,o,l,c){return oc(r,o,l,c),ic(r)}function Fi(r,o){return oc(r,null,null,o),ic(r)}function i0(r,o,l){r.lanes|=l;var c=r.alternate;c!==null&&(c.lanes|=l);for(var m=!1,v=r.return;v!==null;)v.childLanes|=l,c=v.alternate,c!==null&&(c.childLanes|=l),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(m=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,m&&o!==null&&(m=31-Ct(l),r=v.hiddenUpdates,c=r[m],c===null?r[m]=[o]:c.push(o),o.lane=l|536870912),v):null}function ic(r){if(50<Rs)throw Rs=0,$m=null,Error(a(185));for(var o=r.return;o!==null;)r=o,o=r.return;return r.tag===3?r.stateNode:null}var Ui={};function l2(r,o,l,c){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(r,o,l,c){return new l2(r,o,l,c)}function zh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function aa(r,o){var l=r.alternate;return l===null?(l=In(r.tag,o,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=o,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,o=r.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function l0(r,o){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,o=l.dependencies,r.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),r}function lc(r,o,l,c,m,v){var _=0;if(c=r,typeof r=="function")zh(r)&&(_=1);else if(typeof r=="string")_=uD(r,l,oe.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case ee:return r=In(31,l,o,m),r.elementType=ee,r.lanes=v,r;case w:return Vo(l.children,m,v,o);case E:_=8,m|=24;break;case C:return r=In(12,l,o,m|2),r.elementType=C,r.lanes=v,r;case O:return r=In(13,l,o,m),r.elementType=O,r.lanes=v,r;case M:return r=In(19,l,o,m),r.elementType=M,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case R:case D:_=10;break e;case T:_=9;break e;case j:_=11;break e;case I:_=14;break e;case Z:_=16,c=null;break e}_=29,l=Error(a(130,r===null?"null":typeof r,"")),c=null}return o=In(_,l,o,m),o.elementType=r,o.type=c,o.lanes=v,o}function Vo(r,o,l,c){return r=In(7,r,c,o),r.lanes=l,r}function Fh(r,o,l){return r=In(6,r,null,o),r.lanes=l,r}function Uh(r,o,l){return o=In(4,r.children!==null?r.children:[],r.key,o),o.lanes=l,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}var Ii=[],Vi=0,sc=null,uc=0,ur=[],cr=0,$o=null,oa=1,ia="";function Ho(r,o){Ii[Vi++]=uc,Ii[Vi++]=sc,sc=r,uc=o}function s0(r,o,l){ur[cr++]=oa,ur[cr++]=ia,ur[cr++]=$o,$o=r;var c=oa;r=ia;var m=32-Ct(c)-1;c&=~(1<<m),l+=1;var v=32-Ct(o)+m;if(30<v){var _=m-m%5;v=(c&(1<<_)-1).toString(32),c>>=_,m-=_,oa=1<<32-Ct(o)+m|l<<m|c,ia=v+r}else oa=1<<v|l<<m|c,ia=r}function Ih(r){r.return!==null&&(Ho(r,1),s0(r,1,0))}function Vh(r){for(;r===sc;)sc=Ii[--Vi],Ii[Vi]=null,uc=Ii[--Vi],Ii[Vi]=null;for(;r===$o;)$o=ur[--cr],ur[cr]=null,ia=ur[--cr],ur[cr]=null,oa=ur[--cr],ur[cr]=null}var Cn=null,Ht=null,_t=!1,Bo=null,Ur=!1,$h=Error(a(519));function Go(r){var o=Error(a(418,""));throw as(lr(o,r)),$h}function u0(r){var o=r.stateNode,l=r.type,c=r.memoizedProps;switch(o[he]=r,o[be]=c,l){case"dialog":mt("cancel",o),mt("close",o);break;case"iframe":case"object":case"embed":mt("load",o);break;case"video":case"audio":for(l=0;l<Ts.length;l++)mt(Ts[l],o);break;case"source":mt("error",o);break;case"img":case"image":case"link":mt("error",o),mt("load",o);break;case"details":mt("toggle",o);break;case"input":mt("invalid",o),_y(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),Ku(o);break;case"select":mt("invalid",o);break;case"textarea":mt("invalid",o),Ry(o,c.value,c.defaultValue,c.children),Ku(o)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||o.textContent===""+l||c.suppressHydrationWarning===!0||Rb(o.textContent,l)?(c.popover!=null&&(mt("beforetoggle",o),mt("toggle",o)),c.onScroll!=null&&mt("scroll",o),c.onScrollEnd!=null&&mt("scrollend",o),c.onClick!=null&&(o.onclick=Hc),o=!0):o=!1,o||Go(r)}function c0(r){for(Cn=r.return;Cn;)switch(Cn.tag){case 5:case 13:Ur=!1;return;case 27:case 3:Ur=!0;return;default:Cn=Cn.return}}function ns(r){if(r!==Cn)return!1;if(!_t)return c0(r),_t=!0,!1;var o=r.tag,l;if((l=o!==3&&o!==27)&&((l=o===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||ap(r.type,r.memoizedProps)),l=!l),l&&Ht&&Go(r),c0(r),o===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8)if(l=r.data,l==="/$"){if(o===0){Ht=Tr(r.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++;r=r.nextSibling}Ht=null}}else o===27?(o=Ht,Wa(r.type)?(r=sp,sp=null,Ht=r):Ht=o):Ht=Cn?Tr(r.stateNode.nextSibling):null;return!0}function rs(){Ht=Cn=null,_t=!1}function d0(){var r=Bo;return r!==null&&(jn===null?jn=r:jn.push.apply(jn,r),Bo=null),r}function as(r){Bo===null?Bo=[r]:Bo.push(r)}var Hh=H(null),qo=null,la=null;function za(r,o,l){B(Hh,o._currentValue),o._currentValue=l}function sa(r){r._currentValue=Hh.current,P(Hh)}function Bh(r,o,l){for(;r!==null;){var c=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),r===l)break;r=r.return}}function Gh(r,o,l,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var v=m.dependencies;if(v!==null){var _=m.child;v=v.firstContext;e:for(;v!==null;){var A=v;v=m;for(var L=0;L<o.length;L++)if(A.context===o[L]){v.lanes|=l,A=v.alternate,A!==null&&(A.lanes|=l),Bh(v.return,l,r),c||(_=null);break e}v=A.next}}else if(m.tag===18){if(_=m.return,_===null)throw Error(a(341));_.lanes|=l,v=_.alternate,v!==null&&(v.lanes|=l),Bh(_,l,r),_=null}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===r){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}}function os(r,o,l,c){r=null;for(var m=o,v=!1;m!==null;){if(!v){if((m.flags&524288)!==0)v=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var _=m.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var A=m.type;Un(m.pendingProps.value,_.value)||(r!==null?r.push(A):r=[A])}}else if(m===ue.current){if(_=m.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(ks):r=[ks])}m=m.return}r!==null&&Gh(o,r,l,c),o.flags|=262144}function cc(r){for(r=r.firstContext;r!==null;){if(!Un(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Zo(r){qo=r,la=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function yn(r){return f0(qo,r)}function dc(r,o){return qo===null&&Zo(r),f0(r,o)}function f0(r,o){var l=o._currentValue;if(o={context:o,memoizedValue:l,next:null},la===null){if(r===null)throw Error(a(308));la=o,r.dependencies={lanes:0,firstContext:o},r.flags|=524288}else la=la.next=o;return l}var s2=typeof AbortController<"u"?AbortController:function(){var r=[],o=this.signal={aborted:!1,addEventListener:function(l,c){r.push(c)}};this.abort=function(){o.aborted=!0,r.forEach(function(l){return l()})}},u2=e.unstable_scheduleCallback,c2=e.unstable_NormalPriority,rn={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qh(){return{controller:new s2,data:new Map,refCount:0}}function is(r){r.refCount--,r.refCount===0&&u2(c2,function(){r.controller.abort()})}var ls=null,Zh=0,$i=0,Hi=null;function d2(r,o){if(ls===null){var l=ls=[];Zh=0,$i=Km(),Hi={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Zh++,o.then(h0,h0),o}function h0(){if(--Zh===0&&ls!==null){Hi!==null&&(Hi.status="fulfilled");var r=ls;ls=null,$i=0,Hi=null;for(var o=0;o<r.length;o++)(0,r[o])()}}function f2(r,o){var l=[],c={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return r.then(function(){c.status="fulfilled",c.value=o;for(var m=0;m<l.length;m++)(0,l[m])(o)},function(m){for(c.status="rejected",c.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),c}var m0=k.S;k.S=function(r,o){typeof o=="object"&&o!==null&&typeof o.then=="function"&&d2(r,o),m0!==null&&m0(r,o)};var Yo=H(null);function Yh(){var r=Yo.current;return r!==null?r:Lt.pooledCache}function fc(r,o){o===null?B(Yo,Yo.current):B(Yo,o.pool)}function p0(){var r=Yh();return r===null?null:{parent:rn._currentValue,pool:r}}var ss=Error(a(460)),g0=Error(a(474)),hc=Error(a(542)),Kh={then:function(){}};function v0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function mc(){}function y0(r,o,l){switch(l=r[l],l===void 0?r.push(o):l!==o&&(o.then(mc,mc),o=l),o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,b0(r),r;default:if(typeof o.status=="string")o.then(mc,mc);else{if(r=Lt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=o,r.status="pending",r.then(function(c){if(o.status==="pending"){var m=o;m.status="fulfilled",m.value=c}},function(c){if(o.status==="pending"){var m=o;m.status="rejected",m.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,b0(r),r}throw us=o,ss}}var us=null;function x0(){if(us===null)throw Error(a(459));var r=us;return us=null,r}function b0(r){if(r===ss||r===hc)throw Error(a(483))}var Fa=!1;function Qh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xh(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ua(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Ia(r,o,l){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Dt&2)!==0){var m=c.pending;return m===null?o.next=o:(o.next=m.next,m.next=o),c.pending=o,o=ic(r),i0(r,null,l),o}return oc(r,c,o,l),ic(r)}function cs(r,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194048)!==0)){var c=o.lanes;c&=r.pendingLanes,l|=c,o.lanes=l,Po(r,l)}}function Wh(r,o){var l=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var m=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?m=v=_:v=v.next=_,l=l.next}while(l!==null);v===null?m=v=o:v=v.next=o}else m=v=o;l={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=o:r.next=o,l.lastBaseUpdate=o}var Jh=!1;function ds(){if(Jh){var r=Hi;if(r!==null)throw r}}function fs(r,o,l,c){Jh=!1;var m=r.updateQueue;Fa=!1;var v=m.firstBaseUpdate,_=m.lastBaseUpdate,A=m.shared.pending;if(A!==null){m.shared.pending=null;var L=A,K=L.next;L.next=null,_===null?v=K:_.next=K,_=L;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,A=ie.lastBaseUpdate,A!==_&&(A===null?ie.firstBaseUpdate=K:A.next=K,ie.lastBaseUpdate=L))}if(v!==null){var fe=m.baseState;_=0,ie=K=L=null,A=v;do{var X=A.lane&-536870913,W=X!==A.lane;if(W?(gt&X)===X:(c&X)===X){X!==0&&X===$i&&(Jh=!0),ie!==null&&(ie=ie.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Ke=r,Be=A;X=o;var jt=l;switch(Be.tag){case 1:if(Ke=Be.payload,typeof Ke=="function"){fe=Ke.call(jt,fe,X);break e}fe=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=Be.payload,X=typeof Ke=="function"?Ke.call(jt,fe,X):Ke,X==null)break e;fe=g({},fe,X);break e;case 2:Fa=!0}}X=A.callback,X!==null&&(r.flags|=64,W&&(r.flags|=8192),W=m.callbacks,W===null?m.callbacks=[X]:W.push(X))}else W={lane:X,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ie===null?(K=ie=W,L=fe):ie=ie.next=W,_|=X;if(A=A.next,A===null){if(A=m.shared.pending,A===null)break;W=A,A=W.next,W.next=null,m.lastBaseUpdate=W,m.shared.pending=null}}while(!0);ie===null&&(L=fe),m.baseState=L,m.firstBaseUpdate=K,m.lastBaseUpdate=ie,v===null&&(m.shared.lanes=0),Ya|=_,r.lanes=_,r.memoizedState=fe}}function S0(r,o){if(typeof r!="function")throw Error(a(191,r));r.call(o)}function w0(r,o){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)S0(l[r],o)}var Bi=H(null),pc=H(0);function E0(r,o){r=pa,B(pc,r),B(Bi,o),pa=r|o.baseLanes}function em(){B(pc,pa),B(Bi,Bi.current)}function tm(){pa=pc.current,P(Bi),P(pc)}var Va=0,it=null,Ot=null,Jt=null,gc=!1,Gi=!1,Ko=!1,vc=0,hs=0,qi=null,h2=0;function Zt(){throw Error(a(321))}function nm(r,o){if(o===null)return!1;for(var l=0;l<o.length&&l<r.length;l++)if(!Un(r[l],o[l]))return!1;return!0}function rm(r,o,l,c,m,v){return Va=v,it=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,k.H=r===null||r.memoizedState===null?ix:lx,Ko=!1,v=l(c,m),Ko=!1,Gi&&(v=C0(o,l,c,m)),_0(r),v}function _0(r){k.H=Ec;var o=Ot!==null&&Ot.next!==null;if(Va=0,Jt=Ot=it=null,gc=!1,hs=0,qi=null,o)throw Error(a(300));r===null||sn||(r=r.dependencies,r!==null&&cc(r)&&(sn=!0))}function C0(r,o,l,c){it=r;var m=0;do{if(Gi&&(qi=null),hs=0,Gi=!1,25<=m)throw Error(a(301));if(m+=1,Jt=Ot=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}k.H=b2,v=o(l,c)}while(Gi);return v}function m2(){var r=k.H,o=r.useState()[0];return o=typeof o.then=="function"?ms(o):o,r=r.useState()[0],(Ot!==null?Ot.memoizedState:null)!==r&&(it.flags|=1024),o}function am(){var r=vc!==0;return vc=0,r}function om(r,o,l){o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~l}function im(r){if(gc){for(r=r.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}gc=!1}Va=0,Jt=Ot=it=null,Gi=!1,hs=vc=0,qi=null}function On(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?it.memoizedState=Jt=r:Jt=Jt.next=r,Jt}function en(){if(Ot===null){var r=it.alternate;r=r!==null?r.memoizedState:null}else r=Ot.next;var o=Jt===null?it.memoizedState:Jt.next;if(o!==null)Jt=o,Ot=r;else{if(r===null)throw it.alternate===null?Error(a(467)):Error(a(310));Ot=r,r={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},Jt===null?it.memoizedState=Jt=r:Jt=Jt.next=r}return Jt}function lm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ms(r){var o=hs;return hs+=1,qi===null&&(qi=[]),r=y0(qi,r,o),o=it,(Jt===null?o.memoizedState:Jt.next)===null&&(o=o.alternate,k.H=o===null||o.memoizedState===null?ix:lx),r}function yc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ms(r);if(r.$$typeof===D)return yn(r)}throw Error(a(438,String(r)))}function sm(r){var o=null,l=it.updateQueue;if(l!==null&&(o=l.memoCache),o==null){var c=it.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(m){return m.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),l===null&&(l=lm(),it.updateQueue=l),l.memoCache=o,l=o.data[o.index],l===void 0)for(l=o.data[o.index]=Array(r),c=0;c<r;c++)l[c]=se;return o.index++,l}function ua(r,o){return typeof o=="function"?o(r):o}function xc(r){var o=en();return um(o,Ot,r)}function um(r,o,l){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=l;var m=r.baseQueue,v=c.pending;if(v!==null){if(m!==null){var _=m.next;m.next=v.next,v.next=_}o.baseQueue=m=v,c.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{o=m.next;var A=_=null,L=null,K=o,ie=!1;do{var fe=K.lane&-536870913;if(fe!==K.lane?(gt&fe)===fe:(Va&fe)===fe){var X=K.revertLane;if(X===0)L!==null&&(L=L.next={lane:0,revertLane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),fe===$i&&(ie=!0);else if((Va&X)===X){K=K.next,X===$i&&(ie=!0);continue}else fe={lane:0,revertLane:K.revertLane,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},L===null?(A=L=fe,_=v):L=L.next=fe,it.lanes|=X,Ya|=X;fe=K.action,Ko&&l(v,fe),v=K.hasEagerState?K.eagerState:l(v,fe)}else X={lane:fe,revertLane:K.revertLane,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},L===null?(A=L=X,_=v):L=L.next=X,it.lanes|=fe,Ya|=fe;K=K.next}while(K!==null&&K!==o);if(L===null?_=v:L.next=A,!Un(v,r.memoizedState)&&(sn=!0,ie&&(l=Hi,l!==null)))throw l;r.memoizedState=v,r.baseState=_,r.baseQueue=L,c.lastRenderedState=v}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function cm(r){var o=en(),l=o.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var c=l.dispatch,m=l.pending,v=o.memoizedState;if(m!==null){l.pending=null;var _=m=m.next;do v=r(v,_.action),_=_.next;while(_!==m);Un(v,o.memoizedState)||(sn=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),l.lastRenderedState=v}return[v,c]}function R0(r,o,l){var c=it,m=en(),v=_t;if(v){if(l===void 0)throw Error(a(407));l=l()}else l=o();var _=!Un((Ot||m).memoizedState,l);_&&(m.memoizedState=l,sn=!0),m=m.queue;var A=D0.bind(null,c,m,r);if(ps(2048,8,A,[r]),m.getSnapshot!==o||_||Jt!==null&&Jt.memoizedState.tag&1){if(c.flags|=2048,Zi(9,bc(),T0.bind(null,c,m,l,o),null),Lt===null)throw Error(a(349));v||(Va&124)!==0||A0(c,o,l)}return l}function A0(r,o,l){r.flags|=16384,r={getSnapshot:o,value:l},o=it.updateQueue,o===null?(o=lm(),it.updateQueue=o,o.stores=[r]):(l=o.stores,l===null?o.stores=[r]:l.push(r))}function T0(r,o,l,c){o.value=l,o.getSnapshot=c,M0(o)&&O0(r)}function D0(r,o,l){return l(function(){M0(o)&&O0(r)})}function M0(r){var o=r.getSnapshot;r=r.value;try{var l=o();return!Un(r,l)}catch{return!0}}function O0(r){var o=Fi(r,2);o!==null&&Gn(o,r,2)}function dm(r){var o=On();if(typeof r=="function"){var l=r;if(r=l(),Ko){ut(!0);try{l()}finally{ut(!1)}}}return o.memoizedState=o.baseState=r,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:r},o}function N0(r,o,l,c){return r.baseState=l,um(r,Ot,typeof c=="function"?c:ua)}function p2(r,o,l,c,m){if(wc(r))throw Error(a(485));if(r=o.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){v.listeners.push(_)}};k.T!==null?l(!0):v.isTransition=!1,c(v),l=o.pending,l===null?(v.next=o.pending=v,j0(o,v)):(v.next=l.next,o.pending=l.next=v)}}function j0(r,o){var l=o.action,c=o.payload,m=r.state;if(o.isTransition){var v=k.T,_={};k.T=_;try{var A=l(m,c),L=k.S;L!==null&&L(_,A),k0(r,o,A)}catch(K){fm(r,o,K)}finally{k.T=v}}else try{v=l(m,c),k0(r,o,v)}catch(K){fm(r,o,K)}}function k0(r,o,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){L0(r,o,c)},function(c){return fm(r,o,c)}):L0(r,o,l)}function L0(r,o,l){o.status="fulfilled",o.value=l,P0(o),r.state=l,o=r.pending,o!==null&&(l=o.next,l===o?r.pending=null:(l=l.next,o.next=l,j0(r,l)))}function fm(r,o,l){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=l,P0(o),o=o.next;while(o!==c)}r.action=null}function P0(r){r=r.listeners;for(var o=0;o<r.length;o++)(0,r[o])()}function z0(r,o){return o}function F0(r,o){if(_t){var l=Lt.formState;if(l!==null){e:{var c=it;if(_t){if(Ht){t:{for(var m=Ht,v=Ur;m.nodeType!==8;){if(!v){m=null;break t}if(m=Tr(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){Ht=Tr(m.nextSibling),c=m.data==="F!";break e}}Go(c)}c=!1}c&&(o=l[0])}}return l=On(),l.memoizedState=l.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:z0,lastRenderedState:o},l.queue=c,l=rx.bind(null,it,c),c.dispatch=l,c=dm(!1),v=vm.bind(null,it,!1,c.queue),c=On(),m={state:o,dispatch:null,action:r,pending:null},c.queue=m,l=p2.bind(null,it,m,v,l),m.dispatch=l,c.memoizedState=r,[o,l,!1]}function U0(r){var o=en();return I0(o,Ot,r)}function I0(r,o,l){if(o=um(r,o,z0)[0],r=xc(ua)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=ms(o)}catch(_){throw _===ss?hc:_}else c=o;o=en();var m=o.queue,v=m.dispatch;return l!==o.memoizedState&&(it.flags|=2048,Zi(9,bc(),g2.bind(null,m,l),null)),[c,v,r]}function g2(r,o){r.action=o}function V0(r){var o=en(),l=Ot;if(l!==null)return I0(o,l,r);en(),o=o.memoizedState,l=en();var c=l.queue.dispatch;return l.memoizedState=r,[o,c,!1]}function Zi(r,o,l,c){return r={tag:r,create:l,deps:c,inst:o,next:null},o=it.updateQueue,o===null&&(o=lm(),it.updateQueue=o),l=o.lastEffect,l===null?o.lastEffect=r.next=r:(c=l.next,l.next=r,r.next=c,o.lastEffect=r),r}function bc(){return{destroy:void 0,resource:void 0}}function $0(){return en().memoizedState}function Sc(r,o,l,c){var m=On();c=c===void 0?null:c,it.flags|=r,m.memoizedState=Zi(1|o,bc(),l,c)}function ps(r,o,l,c){var m=en();c=c===void 0?null:c;var v=m.memoizedState.inst;Ot!==null&&c!==null&&nm(c,Ot.memoizedState.deps)?m.memoizedState=Zi(o,v,l,c):(it.flags|=r,m.memoizedState=Zi(1|o,v,l,c))}function H0(r,o){Sc(8390656,8,r,o)}function B0(r,o){ps(2048,8,r,o)}function G0(r,o){return ps(4,2,r,o)}function q0(r,o){return ps(4,4,r,o)}function Z0(r,o){if(typeof o=="function"){r=r();var l=o(r);return function(){typeof l=="function"?l():o(null)}}if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Y0(r,o,l){l=l!=null?l.concat([r]):null,ps(4,4,Z0.bind(null,o,r),l)}function hm(){}function K0(r,o){var l=en();o=o===void 0?null:o;var c=l.memoizedState;return o!==null&&nm(o,c[1])?c[0]:(l.memoizedState=[r,o],r)}function Q0(r,o){var l=en();o=o===void 0?null:o;var c=l.memoizedState;if(o!==null&&nm(o,c[1]))return c[0];if(c=r(),Ko){ut(!0);try{r()}finally{ut(!1)}}return l.memoizedState=[c,o],c}function mm(r,o,l){return l===void 0||(Va&1073741824)!==0?r.memoizedState=o:(r.memoizedState=l,r=Jx(),it.lanes|=r,Ya|=r,l)}function X0(r,o,l,c){return Un(l,o)?l:Bi.current!==null?(r=mm(r,l,c),Un(r,o)||(sn=!0),r):(Va&42)===0?(sn=!0,r.memoizedState=l):(r=Jx(),it.lanes|=r,Ya|=r,o)}function W0(r,o,l,c,m){var v=q.p;q.p=v!==0&&8>v?v:8;var _=k.T,A={};k.T=A,vm(r,!1,o,l);try{var L=m(),K=k.S;if(K!==null&&K(A,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ie=f2(L,c);gs(r,o,ie,Bn(r))}else gs(r,o,c,Bn(r))}catch(fe){gs(r,o,{then:function(){},status:"rejected",reason:fe},Bn())}finally{q.p=v,k.T=_}}function v2(){}function pm(r,o,l,c){if(r.tag!==5)throw Error(a(476));var m=J0(r).queue;W0(r,m,o,V,l===null?v2:function(){return ex(r),l(c)})}function J0(r){var o=r.memoizedState;if(o!==null)return o;o={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:V},next:null};var l={};return o.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:l},next:null},r.memoizedState=o,r=r.alternate,r!==null&&(r.memoizedState=o),o}function ex(r){var o=J0(r).next.queue;gs(r,o,{},Bn())}function gm(){return yn(ks)}function tx(){return en().memoizedState}function nx(){return en().memoizedState}function y2(r){for(var o=r.return;o!==null;){switch(o.tag){case 24:case 3:var l=Bn();r=Ua(l);var c=Ia(o,r,l);c!==null&&(Gn(c,o,l),cs(c,o,l)),o={cache:qh()},r.payload=o;return}o=o.return}}function x2(r,o,l){var c=Bn();l={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},wc(r)?ax(o,l):(l=Ph(r,o,l,c),l!==null&&(Gn(l,r,c),ox(l,o,c)))}function rx(r,o,l){var c=Bn();gs(r,o,l,c)}function gs(r,o,l,c){var m={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(wc(r))ax(o,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var _=o.lastRenderedState,A=v(_,l);if(m.hasEagerState=!0,m.eagerState=A,Un(A,_))return oc(r,o,m,0),Lt===null&&ac(),!1}catch{}finally{}if(l=Ph(r,o,m,c),l!==null)return Gn(l,r,c),ox(l,o,c),!0}return!1}function vm(r,o,l,c){if(c={lane:2,revertLane:Km(),action:c,hasEagerState:!1,eagerState:null,next:null},wc(r)){if(o)throw Error(a(479))}else o=Ph(r,l,c,2),o!==null&&Gn(o,r,2)}function wc(r){var o=r.alternate;return r===it||o!==null&&o===it}function ax(r,o){Gi=gc=!0;var l=r.pending;l===null?o.next=o:(o.next=l.next,l.next=o),r.pending=o}function ox(r,o,l){if((l&4194048)!==0){var c=o.lanes;c&=r.pendingLanes,l|=c,o.lanes=l,Po(r,l)}}var Ec={readContext:yn,use:yc,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt},ix={readContext:yn,use:yc,useCallback:function(r,o){return On().memoizedState=[r,o===void 0?null:o],r},useContext:yn,useEffect:H0,useImperativeHandle:function(r,o,l){l=l!=null?l.concat([r]):null,Sc(4194308,4,Z0.bind(null,o,r),l)},useLayoutEffect:function(r,o){return Sc(4194308,4,r,o)},useInsertionEffect:function(r,o){Sc(4,2,r,o)},useMemo:function(r,o){var l=On();o=o===void 0?null:o;var c=r();if(Ko){ut(!0);try{r()}finally{ut(!1)}}return l.memoizedState=[c,o],c},useReducer:function(r,o,l){var c=On();if(l!==void 0){var m=l(o);if(Ko){ut(!0);try{l(o)}finally{ut(!1)}}}else m=o;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=x2.bind(null,it,r),[c.memoizedState,r]},useRef:function(r){var o=On();return r={current:r},o.memoizedState=r},useState:function(r){r=dm(r);var o=r.queue,l=rx.bind(null,it,o);return o.dispatch=l,[r.memoizedState,l]},useDebugValue:hm,useDeferredValue:function(r,o){var l=On();return mm(l,r,o)},useTransition:function(){var r=dm(!1);return r=W0.bind(null,it,r.queue,!0,!1),On().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,o,l){var c=it,m=On();if(_t){if(l===void 0)throw Error(a(407));l=l()}else{if(l=o(),Lt===null)throw Error(a(349));(gt&124)!==0||A0(c,o,l)}m.memoizedState=l;var v={value:l,getSnapshot:o};return m.queue=v,H0(D0.bind(null,c,v,r),[r]),c.flags|=2048,Zi(9,bc(),T0.bind(null,c,v,l,o),null),l},useId:function(){var r=On(),o=Lt.identifierPrefix;if(_t){var l=ia,c=oa;l=(c&~(1<<32-Ct(c)-1)).toString(32)+l,o="«"+o+"R"+l,l=vc++,0<l&&(o+="H"+l.toString(32)),o+="»"}else l=h2++,o="«"+o+"r"+l.toString(32)+"»";return r.memoizedState=o},useHostTransitionStatus:gm,useFormState:F0,useActionState:F0,useOptimistic:function(r){var o=On();o.memoizedState=o.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=l,o=vm.bind(null,it,!0,l),l.dispatch=o,[r,o]},useMemoCache:sm,useCacheRefresh:function(){return On().memoizedState=y2.bind(null,it)}},lx={readContext:yn,use:yc,useCallback:K0,useContext:yn,useEffect:B0,useImperativeHandle:Y0,useInsertionEffect:G0,useLayoutEffect:q0,useMemo:Q0,useReducer:xc,useRef:$0,useState:function(){return xc(ua)},useDebugValue:hm,useDeferredValue:function(r,o){var l=en();return X0(l,Ot.memoizedState,r,o)},useTransition:function(){var r=xc(ua)[0],o=en().memoizedState;return[typeof r=="boolean"?r:ms(r),o]},useSyncExternalStore:R0,useId:tx,useHostTransitionStatus:gm,useFormState:U0,useActionState:U0,useOptimistic:function(r,o){var l=en();return N0(l,Ot,r,o)},useMemoCache:sm,useCacheRefresh:nx},b2={readContext:yn,use:yc,useCallback:K0,useContext:yn,useEffect:B0,useImperativeHandle:Y0,useInsertionEffect:G0,useLayoutEffect:q0,useMemo:Q0,useReducer:cm,useRef:$0,useState:function(){return cm(ua)},useDebugValue:hm,useDeferredValue:function(r,o){var l=en();return Ot===null?mm(l,r,o):X0(l,Ot.memoizedState,r,o)},useTransition:function(){var r=cm(ua)[0],o=en().memoizedState;return[typeof r=="boolean"?r:ms(r),o]},useSyncExternalStore:R0,useId:tx,useHostTransitionStatus:gm,useFormState:V0,useActionState:V0,useOptimistic:function(r,o){var l=en();return Ot!==null?N0(l,Ot,r,o):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:sm,useCacheRefresh:nx},Yi=null,vs=0;function _c(r){var o=vs;return vs+=1,Yi===null&&(Yi=[]),y0(Yi,r,o)}function ys(r,o){o=o.props.ref,r.ref=o!==void 0?o:null}function Cc(r,o){throw o.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(o),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r)))}function sx(r){var o=r._init;return o(r._payload)}function ux(r){function o($,U){if(r){var Y=$.deletions;Y===null?($.deletions=[U],$.flags|=16):Y.push(U)}}function l($,U){if(!r)return null;for(;U!==null;)o($,U),U=U.sibling;return null}function c($){for(var U=new Map;$!==null;)$.key!==null?U.set($.key,$):U.set($.index,$),$=$.sibling;return U}function m($,U){return $=aa($,U),$.index=0,$.sibling=null,$}function v($,U,Y){return $.index=Y,r?(Y=$.alternate,Y!==null?(Y=Y.index,Y<U?($.flags|=67108866,U):Y):($.flags|=67108866,U)):($.flags|=1048576,U)}function _($){return r&&$.alternate===null&&($.flags|=67108866),$}function A($,U,Y,le){return U===null||U.tag!==6?(U=Fh(Y,$.mode,le),U.return=$,U):(U=m(U,Y),U.return=$,U)}function L($,U,Y,le){var Me=Y.type;return Me===w?ie($,U,Y.props.children,le,Y.key):U!==null&&(U.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Z&&sx(Me)===U.type)?(U=m(U,Y.props),ys(U,Y),U.return=$,U):(U=lc(Y.type,Y.key,Y.props,null,$.mode,le),ys(U,Y),U.return=$,U)}function K($,U,Y,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==Y.containerInfo||U.stateNode.implementation!==Y.implementation?(U=Uh(Y,$.mode,le),U.return=$,U):(U=m(U,Y.children||[]),U.return=$,U)}function ie($,U,Y,le,Me){return U===null||U.tag!==7?(U=Vo(Y,$.mode,le,Me),U.return=$,U):(U=m(U,Y),U.return=$,U)}function fe($,U,Y){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Fh(""+U,$.mode,Y),U.return=$,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return Y=lc(U.type,U.key,U.props,null,$.mode,Y),ys(Y,U),Y.return=$,Y;case S:return U=Uh(U,$.mode,Y),U.return=$,U;case Z:var le=U._init;return U=le(U._payload),fe($,U,Y)}if(te(U)||me(U))return U=Vo(U,$.mode,Y,null),U.return=$,U;if(typeof U.then=="function")return fe($,_c(U),Y);if(U.$$typeof===D)return fe($,dc($,U),Y);Cc($,U)}return null}function X($,U,Y,le){var Me=U!==null?U.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Me!==null?null:A($,U,""+Y,le);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:return Y.key===Me?L($,U,Y,le):null;case S:return Y.key===Me?K($,U,Y,le):null;case Z:return Me=Y._init,Y=Me(Y._payload),X($,U,Y,le)}if(te(Y)||me(Y))return Me!==null?null:ie($,U,Y,le,null);if(typeof Y.then=="function")return X($,U,_c(Y),le);if(Y.$$typeof===D)return X($,U,dc($,Y),le);Cc($,Y)}return null}function W($,U,Y,le,Me){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return $=$.get(Y)||null,A(U,$,""+le,Me);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return $=$.get(le.key===null?Y:le.key)||null,L(U,$,le,Me);case S:return $=$.get(le.key===null?Y:le.key)||null,K(U,$,le,Me);case Z:var dt=le._init;return le=dt(le._payload),W($,U,Y,le,Me)}if(te(le)||me(le))return $=$.get(Y)||null,ie(U,$,le,Me,null);if(typeof le.then=="function")return W($,U,Y,_c(le),Me);if(le.$$typeof===D)return W($,U,Y,dc(U,le),Me);Cc(U,le)}return null}function Ke($,U,Y,le){for(var Me=null,dt=null,Ue=U,Ge=U=0,cn=null;Ue!==null&&Ge<Y.length;Ge++){Ue.index>Ge?(cn=Ue,Ue=null):cn=Ue.sibling;var Et=X($,Ue,Y[Ge],le);if(Et===null){Ue===null&&(Ue=cn);break}r&&Ue&&Et.alternate===null&&o($,Ue),U=v(Et,U,Ge),dt===null?Me=Et:dt.sibling=Et,dt=Et,Ue=cn}if(Ge===Y.length)return l($,Ue),_t&&Ho($,Ge),Me;if(Ue===null){for(;Ge<Y.length;Ge++)Ue=fe($,Y[Ge],le),Ue!==null&&(U=v(Ue,U,Ge),dt===null?Me=Ue:dt.sibling=Ue,dt=Ue);return _t&&Ho($,Ge),Me}for(Ue=c(Ue);Ge<Y.length;Ge++)cn=W(Ue,$,Ge,Y[Ge],le),cn!==null&&(r&&cn.alternate!==null&&Ue.delete(cn.key===null?Ge:cn.key),U=v(cn,U,Ge),dt===null?Me=cn:dt.sibling=cn,dt=cn);return r&&Ue.forEach(function(ro){return o($,ro)}),_t&&Ho($,Ge),Me}function Be($,U,Y,le){if(Y==null)throw Error(a(151));for(var Me=null,dt=null,Ue=U,Ge=U=0,cn=null,Et=Y.next();Ue!==null&&!Et.done;Ge++,Et=Y.next()){Ue.index>Ge?(cn=Ue,Ue=null):cn=Ue.sibling;var ro=X($,Ue,Et.value,le);if(ro===null){Ue===null&&(Ue=cn);break}r&&Ue&&ro.alternate===null&&o($,Ue),U=v(ro,U,Ge),dt===null?Me=ro:dt.sibling=ro,dt=ro,Ue=cn}if(Et.done)return l($,Ue),_t&&Ho($,Ge),Me;if(Ue===null){for(;!Et.done;Ge++,Et=Y.next())Et=fe($,Et.value,le),Et!==null&&(U=v(Et,U,Ge),dt===null?Me=Et:dt.sibling=Et,dt=Et);return _t&&Ho($,Ge),Me}for(Ue=c(Ue);!Et.done;Ge++,Et=Y.next())Et=W(Ue,$,Ge,Et.value,le),Et!==null&&(r&&Et.alternate!==null&&Ue.delete(Et.key===null?Ge:Et.key),U=v(Et,U,Ge),dt===null?Me=Et:dt.sibling=Et,dt=Et);return r&&Ue.forEach(function(SD){return o($,SD)}),_t&&Ho($,Ge),Me}function jt($,U,Y,le){if(typeof Y=="object"&&Y!==null&&Y.type===w&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:e:{for(var Me=Y.key;U!==null;){if(U.key===Me){if(Me=Y.type,Me===w){if(U.tag===7){l($,U.sibling),le=m(U,Y.props.children),le.return=$,$=le;break e}}else if(U.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Z&&sx(Me)===U.type){l($,U.sibling),le=m(U,Y.props),ys(le,Y),le.return=$,$=le;break e}l($,U);break}else o($,U);U=U.sibling}Y.type===w?(le=Vo(Y.props.children,$.mode,le,Y.key),le.return=$,$=le):(le=lc(Y.type,Y.key,Y.props,null,$.mode,le),ys(le,Y),le.return=$,$=le)}return _($);case S:e:{for(Me=Y.key;U!==null;){if(U.key===Me)if(U.tag===4&&U.stateNode.containerInfo===Y.containerInfo&&U.stateNode.implementation===Y.implementation){l($,U.sibling),le=m(U,Y.children||[]),le.return=$,$=le;break e}else{l($,U);break}else o($,U);U=U.sibling}le=Uh(Y,$.mode,le),le.return=$,$=le}return _($);case Z:return Me=Y._init,Y=Me(Y._payload),jt($,U,Y,le)}if(te(Y))return Ke($,U,Y,le);if(me(Y)){if(Me=me(Y),typeof Me!="function")throw Error(a(150));return Y=Me.call(Y),Be($,U,Y,le)}if(typeof Y.then=="function")return jt($,U,_c(Y),le);if(Y.$$typeof===D)return jt($,U,dc($,Y),le);Cc($,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,U!==null&&U.tag===6?(l($,U.sibling),le=m(U,Y),le.return=$,$=le):(l($,U),le=Fh(Y,$.mode,le),le.return=$,$=le),_($)):l($,U)}return function($,U,Y,le){try{vs=0;var Me=jt($,U,Y,le);return Yi=null,Me}catch(Ue){if(Ue===ss||Ue===hc)throw Ue;var dt=In(29,Ue,null,$.mode);return dt.lanes=le,dt.return=$,dt}finally{}}}var Ki=ux(!0),cx=ux(!1),dr=H(null),Ir=null;function $a(r){var o=r.alternate;B(an,an.current&1),B(dr,r),Ir===null&&(o===null||Bi.current!==null||o.memoizedState!==null)&&(Ir=r)}function dx(r){if(r.tag===22){if(B(an,an.current),B(dr,r),Ir===null){var o=r.alternate;o!==null&&o.memoizedState!==null&&(Ir=r)}}else Ha()}function Ha(){B(an,an.current),B(dr,dr.current)}function ca(r){P(dr),Ir===r&&(Ir=null),P(an)}var an=H(0);function Rc(r){for(var o=r;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||lp(l)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}function ym(r,o,l,c){o=r.memoizedState,l=l(c,o),l=l==null?o:g({},o,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var xm={enqueueSetState:function(r,o,l){r=r._reactInternals;var c=Bn(),m=Ua(c);m.payload=o,l!=null&&(m.callback=l),o=Ia(r,m,c),o!==null&&(Gn(o,r,c),cs(o,r,c))},enqueueReplaceState:function(r,o,l){r=r._reactInternals;var c=Bn(),m=Ua(c);m.tag=1,m.payload=o,l!=null&&(m.callback=l),o=Ia(r,m,c),o!==null&&(Gn(o,r,c),cs(o,r,c))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var l=Bn(),c=Ua(l);c.tag=2,o!=null&&(c.callback=o),o=Ia(r,c,l),o!==null&&(Gn(o,r,l),cs(o,r,l))}};function fx(r,o,l,c,m,v,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,v,_):o.prototype&&o.prototype.isPureReactComponent?!es(l,c)||!es(m,v):!0}function hx(r,o,l,c){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,c),o.state!==r&&xm.enqueueReplaceState(o,o.state,null)}function Qo(r,o){var l=o;if("ref"in o){l={};for(var c in o)c!=="ref"&&(l[c]=o[c])}if(r=r.defaultProps){l===o&&(l=g({},l));for(var m in r)l[m]===void 0&&(l[m]=r[m])}return l}var Ac=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)};function mx(r){Ac(r)}function px(r){console.error(r)}function gx(r){Ac(r)}function Tc(r,o){try{var l=r.onUncaughtError;l(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function vx(r,o,l){try{var c=r.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function bm(r,o,l){return l=Ua(l),l.tag=3,l.payload={element:null},l.callback=function(){Tc(r,o)},l}function yx(r){return r=Ua(r),r.tag=3,r}function xx(r,o,l,c){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var v=c.value;r.payload=function(){return m(v)},r.callback=function(){vx(o,l,c)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){vx(o,l,c),typeof m!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function S2(r,o,l,c,m){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=l.alternate,o!==null&&os(o,l,m,!0),l=dr.current,l!==null){switch(l.tag){case 13:return Ir===null?Bm():l.alternate===null&&Bt===0&&(Bt=3),l.flags&=-257,l.flags|=65536,l.lanes=m,c===Kh?l.flags|=16384:(o=l.updateQueue,o===null?l.updateQueue=new Set([c]):o.add(c),qm(r,c,m)),!1;case 22:return l.flags|=65536,c===Kh?l.flags|=16384:(o=l.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=o):(l=o.retryQueue,l===null?o.retryQueue=new Set([c]):l.add(c)),qm(r,c,m)),!1}throw Error(a(435,l.tag))}return qm(r,c,m),Bm(),!1}if(_t)return o=dr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=m,c!==$h&&(r=Error(a(422),{cause:c}),as(lr(r,l)))):(c!==$h&&(o=Error(a(423),{cause:c}),as(lr(o,l))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=lr(c,l),m=bm(r.stateNode,c,m),Wh(r,m),Bt!==4&&(Bt=2)),!1;var v=Error(a(520),{cause:c});if(v=lr(v,l),Cs===null?Cs=[v]:Cs.push(v),Bt!==4&&(Bt=2),o===null)return!0;c=lr(c,l),l=o;do{switch(l.tag){case 3:return l.flags|=65536,r=m&-m,l.lanes|=r,r=bm(l.stateNode,c,r),Wh(l,r),!1;case 1:if(o=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ka===null||!Ka.has(v))))return l.flags|=65536,m&=-m,l.lanes|=m,m=yx(m),xx(m,r,l,c),Wh(l,m),!1}l=l.return}while(l!==null);return!1}var bx=Error(a(461)),sn=!1;function fn(r,o,l,c){o.child=r===null?cx(o,null,l,c):Ki(o,r.child,l,c)}function Sx(r,o,l,c,m){l=l.render;var v=o.ref;if("ref"in c){var _={};for(var A in c)A!=="ref"&&(_[A]=c[A])}else _=c;return Zo(o),c=rm(r,o,l,_,v,m),A=am(),r!==null&&!sn?(om(r,o,m),da(r,o,m)):(_t&&A&&Ih(o),o.flags|=1,fn(r,o,c,m),o.child)}function wx(r,o,l,c,m){if(r===null){var v=l.type;return typeof v=="function"&&!zh(v)&&v.defaultProps===void 0&&l.compare===null?(o.tag=15,o.type=v,Ex(r,o,v,c,m)):(r=lc(l.type,null,c,o,o.mode,m),r.ref=o.ref,r.return=o,o.child=r)}if(v=r.child,!Tm(r,m)){var _=v.memoizedProps;if(l=l.compare,l=l!==null?l:es,l(_,c)&&r.ref===o.ref)return da(r,o,m)}return o.flags|=1,r=aa(v,c),r.ref=o.ref,r.return=o,o.child=r}function Ex(r,o,l,c,m){if(r!==null){var v=r.memoizedProps;if(es(v,c)&&r.ref===o.ref)if(sn=!1,o.pendingProps=c=v,Tm(r,m))(r.flags&131072)!==0&&(sn=!0);else return o.lanes=r.lanes,da(r,o,m)}return Sm(r,o,l,c,m)}function _x(r,o,l){var c=o.pendingProps,m=c.children,v=r!==null?r.memoizedState:null;if(c.mode==="hidden"){if((o.flags&128)!==0){if(c=v!==null?v.baseLanes|l:l,r!==null){for(m=o.child=r.child,v=0;m!==null;)v=v|m.lanes|m.childLanes,m=m.sibling;o.childLanes=v&~c}else o.childLanes=0,o.child=null;return Cx(r,o,c,l)}if((l&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},r!==null&&fc(o,v!==null?v.cachePool:null),v!==null?E0(o,v):em(),dx(o);else return o.lanes=o.childLanes=536870912,Cx(r,o,v!==null?v.baseLanes|l:l,l)}else v!==null?(fc(o,v.cachePool),E0(o,v),Ha(),o.memoizedState=null):(r!==null&&fc(o,null),em(),Ha());return fn(r,o,m,l),o.child}function Cx(r,o,l,c){var m=Yh();return m=m===null?null:{parent:rn._currentValue,pool:m},o.memoizedState={baseLanes:l,cachePool:m},r!==null&&fc(o,null),em(),dx(o),r!==null&&os(r,o,c,!0),null}function Dc(r,o){var l=o.ref;if(l===null)r!==null&&r.ref!==null&&(o.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(o.flags|=4194816)}}function Sm(r,o,l,c,m){return Zo(o),l=rm(r,o,l,c,void 0,m),c=am(),r!==null&&!sn?(om(r,o,m),da(r,o,m)):(_t&&c&&Ih(o),o.flags|=1,fn(r,o,l,m),o.child)}function Rx(r,o,l,c,m,v){return Zo(o),o.updateQueue=null,l=C0(o,c,l,m),_0(r),c=am(),r!==null&&!sn?(om(r,o,v),da(r,o,v)):(_t&&c&&Ih(o),o.flags|=1,fn(r,o,l,v),o.child)}function Ax(r,o,l,c,m){if(Zo(o),o.stateNode===null){var v=Ui,_=l.contextType;typeof _=="object"&&_!==null&&(v=yn(_)),v=new l(c,v),o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=xm,o.stateNode=v,v._reactInternals=o,v=o.stateNode,v.props=c,v.state=o.memoizedState,v.refs={},Qh(o),_=l.contextType,v.context=typeof _=="object"&&_!==null?yn(_):Ui,v.state=o.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(ym(o,l,_,c),v.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(_=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),_!==v.state&&xm.enqueueReplaceState(v,v.state,null),fs(o,c,v,m),ds(),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(r===null){v=o.stateNode;var A=o.memoizedProps,L=Qo(l,A);v.props=L;var K=v.context,ie=l.contextType;_=Ui,typeof ie=="object"&&ie!==null&&(_=yn(ie));var fe=l.getDerivedStateFromProps;ie=typeof fe=="function"||typeof v.getSnapshotBeforeUpdate=="function",A=o.pendingProps!==A,ie||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(A||K!==_)&&hx(o,v,c,_),Fa=!1;var X=o.memoizedState;v.state=X,fs(o,c,v,m),ds(),K=o.memoizedState,A||X!==K||Fa?(typeof fe=="function"&&(ym(o,l,fe,c),K=o.memoizedState),(L=Fa||fx(o,l,L,c,X,K,_))?(ie||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=K),v.props=c,v.state=K,v.context=_,c=L):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{v=o.stateNode,Xh(r,o),_=o.memoizedProps,ie=Qo(l,_),v.props=ie,fe=o.pendingProps,X=v.context,K=l.contextType,L=Ui,typeof K=="object"&&K!==null&&(L=yn(K)),A=l.getDerivedStateFromProps,(K=typeof A=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(_!==fe||X!==L)&&hx(o,v,c,L),Fa=!1,X=o.memoizedState,v.state=X,fs(o,c,v,m),ds();var W=o.memoizedState;_!==fe||X!==W||Fa||r!==null&&r.dependencies!==null&&cc(r.dependencies)?(typeof A=="function"&&(ym(o,l,A,c),W=o.memoizedState),(ie=Fa||fx(o,l,ie,c,X,W,L)||r!==null&&r.dependencies!==null&&cc(r.dependencies))?(K||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,W,L),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,W,L)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=W),v.props=c,v.state=W,v.context=L,c=ie):(typeof v.componentDidUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&X===r.memoizedState||(o.flags|=1024),c=!1)}return v=c,Dc(r,o),c=(o.flags&128)!==0,v||c?(v=o.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:v.render(),o.flags|=1,r!==null&&c?(o.child=Ki(o,r.child,null,m),o.child=Ki(o,null,l,m)):fn(r,o,l,m),o.memoizedState=v.state,r=o.child):r=da(r,o,m),r}function Tx(r,o,l,c){return rs(),o.flags|=256,fn(r,o,l,c),o.child}var wm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Em(r){return{baseLanes:r,cachePool:p0()}}function _m(r,o,l){return r=r!==null?r.childLanes&~l:0,o&&(r|=fr),r}function Dx(r,o,l){var c=o.pendingProps,m=!1,v=(o.flags&128)!==0,_;if((_=v)||(_=r!==null&&r.memoizedState===null?!1:(an.current&2)!==0),_&&(m=!0,o.flags&=-129),_=(o.flags&32)!==0,o.flags&=-33,r===null){if(_t){if(m?$a(o):Ha(),_t){var A=Ht,L;if(L=A){e:{for(L=A,A=Ur;L.nodeType!==8;){if(!A){A=null;break e}if(L=Tr(L.nextSibling),L===null){A=null;break e}}A=L}A!==null?(o.memoizedState={dehydrated:A,treeContext:$o!==null?{id:oa,overflow:ia}:null,retryLane:536870912,hydrationErrors:null},L=In(18,null,null,0),L.stateNode=A,L.return=o,o.child=L,Cn=o,Ht=null,L=!0):L=!1}L||Go(o)}if(A=o.memoizedState,A!==null&&(A=A.dehydrated,A!==null))return lp(A)?o.lanes=32:o.lanes=536870912,null;ca(o)}return A=c.children,c=c.fallback,m?(Ha(),m=o.mode,A=Mc({mode:"hidden",children:A},m),c=Vo(c,m,l,null),A.return=o,c.return=o,A.sibling=c,o.child=A,m=o.child,m.memoizedState=Em(l),m.childLanes=_m(r,_,l),o.memoizedState=wm,c):($a(o),Cm(o,A))}if(L=r.memoizedState,L!==null&&(A=L.dehydrated,A!==null)){if(v)o.flags&256?($a(o),o.flags&=-257,o=Rm(r,o,l)):o.memoizedState!==null?(Ha(),o.child=r.child,o.flags|=128,o=null):(Ha(),m=c.fallback,A=o.mode,c=Mc({mode:"visible",children:c.children},A),m=Vo(m,A,l,null),m.flags|=2,c.return=o,m.return=o,c.sibling=m,o.child=c,Ki(o,r.child,null,l),c=o.child,c.memoizedState=Em(l),c.childLanes=_m(r,_,l),o.memoizedState=wm,o=m);else if($a(o),lp(A)){if(_=A.nextSibling&&A.nextSibling.dataset,_)var K=_.dgst;_=K,c=Error(a(419)),c.stack="",c.digest=_,as({value:c,source:null,stack:null}),o=Rm(r,o,l)}else if(sn||os(r,o,l,!1),_=(l&r.childLanes)!==0,sn||_){if(_=Lt,_!==null&&(c=l&-l,c=(c&42)!==0?1:Hl(c),c=(c&(_.suspendedLanes|l))!==0?0:c,c!==0&&c!==L.retryLane))throw L.retryLane=c,Fi(r,c),Gn(_,r,c),bx;A.data==="$?"||Bm(),o=Rm(r,o,l)}else A.data==="$?"?(o.flags|=192,o.child=r.child,o=null):(r=L.treeContext,Ht=Tr(A.nextSibling),Cn=o,_t=!0,Bo=null,Ur=!1,r!==null&&(ur[cr++]=oa,ur[cr++]=ia,ur[cr++]=$o,oa=r.id,ia=r.overflow,$o=o),o=Cm(o,c.children),o.flags|=4096);return o}return m?(Ha(),m=c.fallback,A=o.mode,L=r.child,K=L.sibling,c=aa(L,{mode:"hidden",children:c.children}),c.subtreeFlags=L.subtreeFlags&65011712,K!==null?m=aa(K,m):(m=Vo(m,A,l,null),m.flags|=2),m.return=o,c.return=o,c.sibling=m,o.child=c,c=m,m=o.child,A=r.child.memoizedState,A===null?A=Em(l):(L=A.cachePool,L!==null?(K=rn._currentValue,L=L.parent!==K?{parent:K,pool:K}:L):L=p0(),A={baseLanes:A.baseLanes|l,cachePool:L}),m.memoizedState=A,m.childLanes=_m(r,_,l),o.memoizedState=wm,c):($a(o),l=r.child,r=l.sibling,l=aa(l,{mode:"visible",children:c.children}),l.return=o,l.sibling=null,r!==null&&(_=o.deletions,_===null?(o.deletions=[r],o.flags|=16):_.push(r)),o.child=l,o.memoizedState=null,l)}function Cm(r,o){return o=Mc({mode:"visible",children:o},r.mode),o.return=r,r.child=o}function Mc(r,o){return r=In(22,r,null,o),r.lanes=0,r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},r}function Rm(r,o,l){return Ki(o,r.child,null,l),r=Cm(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Mx(r,o,l){r.lanes|=o;var c=r.alternate;c!==null&&(c.lanes|=o),Bh(r.return,o,l)}function Am(r,o,l,c,m){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:m}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=l,v.tailMode=m)}function Ox(r,o,l){var c=o.pendingProps,m=c.revealOrder,v=c.tail;if(fn(r,o,c.children,l),c=an.current,(c&2)!==0)c=c&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Mx(r,l,o);else if(r.tag===19)Mx(r,l,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}c&=1}switch(B(an,c),m){case"forwards":for(l=o.child,m=null;l!==null;)r=l.alternate,r!==null&&Rc(r)===null&&(m=l),l=l.sibling;l=m,l===null?(m=o.child,o.child=null):(m=l.sibling,l.sibling=null),Am(o,!1,m,l,v);break;case"backwards":for(l=null,m=o.child,o.child=null;m!==null;){if(r=m.alternate,r!==null&&Rc(r)===null){o.child=m;break}r=m.sibling,m.sibling=l,l=m,m=r}Am(o,!0,l,null,v);break;case"together":Am(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function da(r,o,l){if(r!==null&&(o.dependencies=r.dependencies),Ya|=o.lanes,(l&o.childLanes)===0)if(r!==null){if(os(r,o,l,!1),(l&o.childLanes)===0)return null}else return null;if(r!==null&&o.child!==r.child)throw Error(a(153));if(o.child!==null){for(r=o.child,l=aa(r,r.pendingProps),o.child=l,l.return=o;r.sibling!==null;)r=r.sibling,l=l.sibling=aa(r,r.pendingProps),l.return=o;l.sibling=null}return o.child}function Tm(r,o){return(r.lanes&o)!==0?!0:(r=r.dependencies,!!(r!==null&&cc(r)))}function w2(r,o,l){switch(o.tag){case 3:Ce(o,o.stateNode.containerInfo),za(o,rn,r.memoizedState.cache),rs();break;case 27:case 5:ke(o);break;case 4:Ce(o,o.stateNode.containerInfo);break;case 10:za(o,o.type,o.memoizedProps.value);break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?($a(o),o.flags|=128,null):(l&o.child.childLanes)!==0?Dx(r,o,l):($a(o),r=da(r,o,l),r!==null?r.sibling:null);$a(o);break;case 19:var m=(r.flags&128)!==0;if(c=(l&o.childLanes)!==0,c||(os(r,o,l,!1),c=(l&o.childLanes)!==0),m){if(c)return Ox(r,o,l);o.flags|=128}if(m=o.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),B(an,an.current),c)break;return null;case 22:case 23:return o.lanes=0,_x(r,o,l);case 24:za(o,rn,r.memoizedState.cache)}return da(r,o,l)}function Nx(r,o,l){if(r!==null)if(r.memoizedProps!==o.pendingProps)sn=!0;else{if(!Tm(r,l)&&(o.flags&128)===0)return sn=!1,w2(r,o,l);sn=(r.flags&131072)!==0}else sn=!1,_t&&(o.flags&1048576)!==0&&s0(o,uc,o.index);switch(o.lanes=0,o.tag){case 16:e:{r=o.pendingProps;var c=o.elementType,m=c._init;if(c=m(c._payload),o.type=c,typeof c=="function")zh(c)?(r=Qo(c,r),o.tag=1,o=Ax(null,o,c,r,l)):(o.tag=0,o=Sm(null,o,c,r,l));else{if(c!=null){if(m=c.$$typeof,m===j){o.tag=11,o=Sx(null,o,c,r,l);break e}else if(m===I){o.tag=14,o=wx(null,o,c,r,l);break e}}throw o=ce(c)||c,Error(a(306,o,""))}}return o;case 0:return Sm(r,o,o.type,o.pendingProps,l);case 1:return c=o.type,m=Qo(c,o.pendingProps),Ax(r,o,c,m,l);case 3:e:{if(Ce(o,o.stateNode.containerInfo),r===null)throw Error(a(387));c=o.pendingProps;var v=o.memoizedState;m=v.element,Xh(r,o),fs(o,c,null,l);var _=o.memoizedState;if(c=_.cache,za(o,rn,c),c!==v.cache&&Gh(o,[rn],l,!0),ds(),c=_.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:_.cache},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){o=Tx(r,o,c,l);break e}else if(c!==m){m=lr(Error(a(424)),o),as(m),o=Tx(r,o,c,l);break e}else{switch(r=o.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Ht=Tr(r.firstChild),Cn=o,_t=!0,Bo=null,Ur=!0,l=cx(o,null,c,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(rs(),c===m){o=da(r,o,l);break e}fn(r,o,c,l)}o=o.child}return o;case 26:return Dc(r,o),r===null?(l=Pb(o.type,null,o.pendingProps,null))?o.memoizedState=l:_t||(l=o.type,r=o.pendingProps,c=Bc(pe.current).createElement(l),c[he]=o,c[be]=r,mn(c,l,r),wt(c),o.stateNode=c):o.memoizedState=Pb(o.type,r.memoizedProps,o.pendingProps,r.memoizedState),null;case 27:return ke(o),r===null&&_t&&(c=o.stateNode=jb(o.type,o.pendingProps,pe.current),Cn=o,Ur=!0,m=Ht,Wa(o.type)?(sp=m,Ht=Tr(c.firstChild)):Ht=m),fn(r,o,o.pendingProps.children,l),Dc(r,o),r===null&&(o.flags|=4194304),o.child;case 5:return r===null&&_t&&((m=c=Ht)&&(c=Q2(c,o.type,o.pendingProps,Ur),c!==null?(o.stateNode=c,Cn=o,Ht=Tr(c.firstChild),Ur=!1,m=!0):m=!1),m||Go(o)),ke(o),m=o.type,v=o.pendingProps,_=r!==null?r.memoizedProps:null,c=v.children,ap(m,v)?c=null:_!==null&&ap(m,_)&&(o.flags|=32),o.memoizedState!==null&&(m=rm(r,o,m2,null,null,l),ks._currentValue=m),Dc(r,o),fn(r,o,c,l),o.child;case 6:return r===null&&_t&&((r=l=Ht)&&(l=X2(l,o.pendingProps,Ur),l!==null?(o.stateNode=l,Cn=o,Ht=null,r=!0):r=!1),r||Go(o)),null;case 13:return Dx(r,o,l);case 4:return Ce(o,o.stateNode.containerInfo),c=o.pendingProps,r===null?o.child=Ki(o,null,c,l):fn(r,o,c,l),o.child;case 11:return Sx(r,o,o.type,o.pendingProps,l);case 7:return fn(r,o,o.pendingProps,l),o.child;case 8:return fn(r,o,o.pendingProps.children,l),o.child;case 12:return fn(r,o,o.pendingProps.children,l),o.child;case 10:return c=o.pendingProps,za(o,o.type,c.value),fn(r,o,c.children,l),o.child;case 9:return m=o.type._context,c=o.pendingProps.children,Zo(o),m=yn(m),c=c(m),o.flags|=1,fn(r,o,c,l),o.child;case 14:return wx(r,o,o.type,o.pendingProps,l);case 15:return Ex(r,o,o.type,o.pendingProps,l);case 19:return Ox(r,o,l);case 31:return c=o.pendingProps,l=o.mode,c={mode:c.mode,children:c.children},r===null?(l=Mc(c,l),l.ref=o.ref,o.child=l,l.return=o,o=l):(l=aa(r.child,c),l.ref=o.ref,o.child=l,l.return=o,o=l),o;case 22:return _x(r,o,l);case 24:return Zo(o),c=yn(rn),r===null?(m=Yh(),m===null&&(m=Lt,v=qh(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=l),m=v),o.memoizedState={parent:c,cache:m},Qh(o),za(o,rn,m)):((r.lanes&l)!==0&&(Xh(r,o),fs(o,null,null,l),ds()),m=r.memoizedState,v=o.memoizedState,m.parent!==c?(m={parent:c,cache:c},o.memoizedState=m,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=m),za(o,rn,c)):(c=v.cache,za(o,rn,c),c!==m.cache&&Gh(o,[rn],l,!0))),fn(r,o,o.pendingProps.children,l),o.child;case 29:throw o.pendingProps}throw Error(a(156,o.tag))}function fa(r){r.flags|=4}function jx(r,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Vb(o)){if(o=dr.current,o!==null&&((gt&4194048)===gt?Ir!==null:(gt&62914560)!==gt&&(gt&536870912)===0||o!==Ir))throw us=Kh,g0;r.flags|=8192}}function Oc(r,o){o!==null&&(r.flags|=4),r.flags&16384&&(o=r.tag!==22?Zu():536870912,r.lanes|=o,Ji|=o)}function xs(r,o){if(!_t)switch(r.tailMode){case"hidden":o=r.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function $t(r){var o=r.alternate!==null&&r.alternate.child===r.child,l=0,c=0;if(o)for(var m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=l,o}function E2(r,o,l){var c=o.pendingProps;switch(Vh(o),o.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(o),null;case 1:return $t(o),null;case 3:return l=o.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),sa(rn),Le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(ns(o)?fa(o):r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,d0())),$t(o),null;case 26:return l=o.memoizedState,r===null?(fa(o),l!==null?($t(o),jx(o,l)):($t(o),o.flags&=-16777217)):l?l!==r.memoizedState?(fa(o),$t(o),jx(o,l)):($t(o),o.flags&=-16777217):(r.memoizedProps!==c&&fa(o),$t(o),o.flags&=-16777217),null;case 27:Je(o),l=pe.current;var m=o.type;if(r!==null&&o.stateNode!=null)r.memoizedProps!==c&&fa(o);else{if(!c){if(o.stateNode===null)throw Error(a(166));return $t(o),null}r=oe.current,ns(o)?u0(o):(r=jb(m,c,l),o.stateNode=r,fa(o))}return $t(o),null;case 5:if(Je(o),l=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==c&&fa(o);else{if(!c){if(o.stateNode===null)throw Error(a(166));return $t(o),null}if(r=oe.current,ns(o))u0(o);else{switch(m=Bc(pe.current),r){case 1:r=m.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:r=m.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":r=m.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":r=m.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":r=m.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof c.is=="string"?m.createElement("select",{is:c.is}):m.createElement("select"),c.multiple?r.multiple=!0:c.size&&(r.size=c.size);break;default:r=typeof c.is=="string"?m.createElement(l,{is:c.is}):m.createElement(l)}}r[he]=o,r[be]=c;e:for(m=o.child;m!==null;){if(m.tag===5||m.tag===6)r.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===o)break e;for(;m.sibling===null;){if(m.return===null||m.return===o)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}o.stateNode=r;e:switch(mn(r,l,c),l){case"button":case"input":case"select":case"textarea":r=!!c.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&fa(o)}}return $t(o),o.flags&=-16777217,null;case 6:if(r&&o.stateNode!=null)r.memoizedProps!==c&&fa(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(a(166));if(r=pe.current,ns(o)){if(r=o.stateNode,l=o.memoizedProps,c=null,m=Cn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[he]=o,r=!!(r.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Rb(r.nodeValue,l)),r||Go(o)}else r=Bc(r).createTextNode(c),r[he]=o,o.stateNode=r}return $t(o),null;case 13:if(c=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=ns(o),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=o.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[he]=o}else rs(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;$t(o),m=!1}else m=d0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return o.flags&256?(ca(o),o):(ca(o),null)}if(ca(o),(o.flags&128)!==0)return o.lanes=l,o;if(l=c!==null,r=r!==null&&r.memoizedState!==null,l){c=o.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool);var v=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==m&&(c.flags|=2048)}return l!==r&&l&&(o.child.flags|=8192),Oc(o,o.updateQueue),$t(o),null;case 4:return Le(),r===null&&Jm(o.stateNode.containerInfo),$t(o),null;case 10:return sa(o.type),$t(o),null;case 19:if(P(an),m=o.memoizedState,m===null)return $t(o),null;if(c=(o.flags&128)!==0,v=m.rendering,v===null)if(c)xs(m,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(v=Rc(r),v!==null){for(o.flags|=128,xs(m,!1),r=v.updateQueue,o.updateQueue=r,Oc(o,r),o.subtreeFlags=0,r=l,l=o.child;l!==null;)l0(l,r),l=l.sibling;return B(an,an.current&1|2),o.child}r=r.sibling}m.tail!==null&&qt()>kc&&(o.flags|=128,c=!0,xs(m,!1),o.lanes=4194304)}else{if(!c)if(r=Rc(v),r!==null){if(o.flags|=128,c=!0,r=r.updateQueue,o.updateQueue=r,Oc(o,r),xs(m,!0),m.tail===null&&m.tailMode==="hidden"&&!v.alternate&&!_t)return $t(o),null}else 2*qt()-m.renderingStartTime>kc&&l!==536870912&&(o.flags|=128,c=!0,xs(m,!1),o.lanes=4194304);m.isBackwards?(v.sibling=o.child,o.child=v):(r=m.last,r!==null?r.sibling=v:o.child=v,m.last=v)}return m.tail!==null?(o=m.tail,m.rendering=o,m.tail=o.sibling,m.renderingStartTime=qt(),o.sibling=null,r=an.current,B(an,c?r&1|2:r&1),o):($t(o),null);case 22:case 23:return ca(o),tm(),c=o.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(l&536870912)!==0&&(o.flags&128)===0&&($t(o),o.subtreeFlags&6&&(o.flags|=8192)):$t(o),l=o.updateQueue,l!==null&&Oc(o,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==l&&(o.flags|=2048),r!==null&&P(Yo),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),sa(rn),$t(o),null;case 25:return null;case 30:return null}throw Error(a(156,o.tag))}function _2(r,o){switch(Vh(o),o.tag){case 1:return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return sa(rn),Le(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 26:case 27:case 5:return Je(o),null;case 13:if(ca(o),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(a(340));rs()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return P(an),null;case 4:return Le(),null;case 10:return sa(o.type),null;case 22:case 23:return ca(o),tm(),r!==null&&P(Yo),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 24:return sa(rn),null;case 25:return null;default:return null}}function kx(r,o){switch(Vh(o),o.tag){case 3:sa(rn),Le();break;case 26:case 27:case 5:Je(o);break;case 4:Le();break;case 13:ca(o);break;case 19:P(an);break;case 10:sa(o.type);break;case 22:case 23:ca(o),tm(),r!==null&&P(Yo);break;case 24:sa(rn)}}function bs(r,o){try{var l=o.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var m=c.next;l=m;do{if((l.tag&r)===r){c=void 0;var v=l.create,_=l.inst;c=v(),_.destroy=c}l=l.next}while(l!==m)}}catch(A){kt(o,o.return,A)}}function Ba(r,o,l){try{var c=o.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var v=m.next;c=v;do{if((c.tag&r)===r){var _=c.inst,A=_.destroy;if(A!==void 0){_.destroy=void 0,m=o;var L=l,K=A;try{K()}catch(ie){kt(m,L,ie)}}}c=c.next}while(c!==v)}}catch(ie){kt(o,o.return,ie)}}function Lx(r){var o=r.updateQueue;if(o!==null){var l=r.stateNode;try{w0(o,l)}catch(c){kt(r,r.return,c)}}}function Px(r,o,l){l.props=Qo(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(c){kt(r,o,c)}}function Ss(r,o){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof l=="function"?r.refCleanup=l(c):l.current=c}}catch(m){kt(r,o,m)}}function Vr(r,o){var l=r.ref,c=r.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(m){kt(r,o,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){kt(r,o,m)}else l.current=null}function zx(r){var o=r.type,l=r.memoizedProps,c=r.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(m){kt(r,r.return,m)}}function Dm(r,o,l){try{var c=r.stateNode;G2(c,r.type,l,o),c[be]=o}catch(m){kt(r,r.return,m)}}function Fx(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Wa(r.type)||r.tag===4}function Mm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Fx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Wa(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Om(r,o,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,o?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,o):(o=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,o.appendChild(r),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Hc));else if(c!==4&&(c===27&&Wa(r.type)&&(l=r.stateNode,o=null),r=r.child,r!==null))for(Om(r,o,l),r=r.sibling;r!==null;)Om(r,o,l),r=r.sibling}function Nc(r,o,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,o?l.insertBefore(r,o):l.appendChild(r);else if(c!==4&&(c===27&&Wa(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(Nc(r,o,l),r=r.sibling;r!==null;)Nc(r,o,l),r=r.sibling}function Ux(r){var o=r.stateNode,l=r.memoizedProps;try{for(var c=r.type,m=o.attributes;m.length;)o.removeAttributeNode(m[0]);mn(o,c,l),o[he]=r,o[be]=l}catch(v){kt(r,r.return,v)}}var ha=!1,Yt=!1,Nm=!1,Ix=typeof WeakSet=="function"?WeakSet:Set,un=null;function C2(r,o){if(r=r.containerInfo,np=Qc,r=Xy(r),Mh(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var m=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var _=0,A=-1,L=-1,K=0,ie=0,fe=r,X=null;t:for(;;){for(var W;fe!==l||m!==0&&fe.nodeType!==3||(A=_+m),fe!==v||c!==0&&fe.nodeType!==3||(L=_+c),fe.nodeType===3&&(_+=fe.nodeValue.length),(W=fe.firstChild)!==null;)X=fe,fe=W;for(;;){if(fe===r)break t;if(X===l&&++K===m&&(A=_),X===v&&++ie===c&&(L=_),(W=fe.nextSibling)!==null)break;fe=X,X=fe.parentNode}fe=W}l=A===-1||L===-1?null:{start:A,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(rp={focusedElem:r,selectionRange:l},Qc=!1,un=o;un!==null;)if(o=un,r=o.child,(o.subtreeFlags&1024)!==0&&r!==null)r.return=o,un=r;else for(;un!==null;){switch(o=un,v=o.alternate,r=o.flags,o.tag){case 0:break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,l=o,m=v.memoizedProps,v=v.memoizedState,c=l.stateNode;try{var Ke=Qo(l.type,m,l.elementType===l.type);r=c.getSnapshotBeforeUpdate(Ke,v),c.__reactInternalSnapshotBeforeUpdate=r}catch(Be){kt(l,l.return,Be)}}break;case 3:if((r&1024)!==0){if(r=o.stateNode.containerInfo,l=r.nodeType,l===9)ip(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":ip(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=o.sibling,r!==null){r.return=o.return,un=r;break}un=o.return}}function Vx(r,o,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Ga(r,l),c&4&&bs(5,l);break;case 1:if(Ga(r,l),c&4)if(r=l.stateNode,o===null)try{r.componentDidMount()}catch(_){kt(l,l.return,_)}else{var m=Qo(l.type,o.memoizedProps);o=o.memoizedState;try{r.componentDidUpdate(m,o,r.__reactInternalSnapshotBeforeUpdate)}catch(_){kt(l,l.return,_)}}c&64&&Lx(l),c&512&&Ss(l,l.return);break;case 3:if(Ga(r,l),c&64&&(r=l.updateQueue,r!==null)){if(o=null,l.child!==null)switch(l.child.tag){case 27:case 5:o=l.child.stateNode;break;case 1:o=l.child.stateNode}try{w0(r,o)}catch(_){kt(l,l.return,_)}}break;case 27:o===null&&c&4&&Ux(l);case 26:case 5:Ga(r,l),o===null&&c&4&&zx(l),c&512&&Ss(l,l.return);break;case 12:Ga(r,l);break;case 13:Ga(r,l),c&4&&Bx(r,l),c&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=k2.bind(null,l),W2(r,l))));break;case 22:if(c=l.memoizedState!==null||ha,!c){o=o!==null&&o.memoizedState!==null||Yt,m=ha;var v=Yt;ha=c,(Yt=o)&&!v?qa(r,l,(l.subtreeFlags&8772)!==0):Ga(r,l),ha=m,Yt=v}break;case 30:break;default:Ga(r,l)}}function $x(r){var o=r.alternate;o!==null&&(r.alternate=null,$x(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&Fe(o)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var It=null,Nn=!1;function ma(r,o,l){for(l=l.child;l!==null;)Hx(r,o,l),l=l.sibling}function Hx(r,o,l){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(Ae,l)}catch{}switch(l.tag){case 26:Yt||Vr(l,o),ma(r,o,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Yt||Vr(l,o);var c=It,m=Nn;Wa(l.type)&&(It=l.stateNode,Nn=!1),ma(r,o,l),Ms(l.stateNode),It=c,Nn=m;break;case 5:Yt||Vr(l,o);case 6:if(c=It,m=Nn,It=null,ma(r,o,l),It=c,Nn=m,It!==null)if(Nn)try{(It.nodeType===9?It.body:It.nodeName==="HTML"?It.ownerDocument.body:It).removeChild(l.stateNode)}catch(v){kt(l,o,v)}else try{It.removeChild(l.stateNode)}catch(v){kt(l,o,v)}break;case 18:It!==null&&(Nn?(r=It,Ob(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),Fs(r)):Ob(It,l.stateNode));break;case 4:c=It,m=Nn,It=l.stateNode.containerInfo,Nn=!0,ma(r,o,l),It=c,Nn=m;break;case 0:case 11:case 14:case 15:Yt||Ba(2,l,o),Yt||Ba(4,l,o),ma(r,o,l);break;case 1:Yt||(Vr(l,o),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Px(l,o,c)),ma(r,o,l);break;case 21:ma(r,o,l);break;case 22:Yt=(c=Yt)||l.memoizedState!==null,ma(r,o,l),Yt=c;break;default:ma(r,o,l)}}function Bx(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Fs(r)}catch(l){kt(o,o.return,l)}}function R2(r){switch(r.tag){case 13:case 19:var o=r.stateNode;return o===null&&(o=r.stateNode=new Ix),o;case 22:return r=r.stateNode,o=r._retryCache,o===null&&(o=r._retryCache=new Ix),o;default:throw Error(a(435,r.tag))}}function jm(r,o){var l=R2(r);o.forEach(function(c){var m=L2.bind(null,r,c);l.has(c)||(l.add(c),c.then(m,m))})}function Vn(r,o){var l=o.deletions;if(l!==null)for(var c=0;c<l.length;c++){var m=l[c],v=r,_=o,A=_;e:for(;A!==null;){switch(A.tag){case 27:if(Wa(A.type)){It=A.stateNode,Nn=!1;break e}break;case 5:It=A.stateNode,Nn=!1;break e;case 3:case 4:It=A.stateNode.containerInfo,Nn=!0;break e}A=A.return}if(It===null)throw Error(a(160));Hx(v,_,m),It=null,Nn=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(o.subtreeFlags&13878)for(o=o.child;o!==null;)Gx(o,r),o=o.sibling}var Ar=null;function Gx(r,o){var l=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Vn(o,r),$n(r),c&4&&(Ba(3,r,r.return),bs(3,r),Ba(5,r,r.return));break;case 1:Vn(o,r),$n(r),c&512&&(Yt||l===null||Vr(l,l.return)),c&64&&ha&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var m=Ar;if(Vn(o,r),$n(r),c&512&&(Yt||l===null||Vr(l,l.return)),c&4){var v=l!==null?l.memoizedState:null;if(c=r.memoizedState,l===null)if(c===null)if(r.stateNode===null){e:{c=r.type,l=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Ye]||v[he]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(c),m.head.insertBefore(v,m.querySelector("head > title"))),mn(v,c,l),v[he]=r,wt(v),c=v;break e;case"link":var _=Ub("link","href",m).get(c+(l.href||""));if(_){for(var A=0;A<_.length;A++)if(v=_[A],v.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&v.getAttribute("rel")===(l.rel==null?null:l.rel)&&v.getAttribute("title")===(l.title==null?null:l.title)&&v.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(A,1);break t}}v=m.createElement(c),mn(v,c,l),m.head.appendChild(v);break;case"meta":if(_=Ub("meta","content",m).get(c+(l.content||""))){for(A=0;A<_.length;A++)if(v=_[A],v.getAttribute("content")===(l.content==null?null:""+l.content)&&v.getAttribute("name")===(l.name==null?null:l.name)&&v.getAttribute("property")===(l.property==null?null:l.property)&&v.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&v.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(A,1);break t}}v=m.createElement(c),mn(v,c,l),m.head.appendChild(v);break;default:throw Error(a(468,c))}v[he]=r,wt(v),c=v}r.stateNode=c}else Ib(m,r.type,r.stateNode);else r.stateNode=Fb(m,c,r.memoizedProps);else v!==c?(v===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):v.count--,c===null?Ib(m,r.type,r.stateNode):Fb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Dm(r,r.memoizedProps,l.memoizedProps)}break;case 27:Vn(o,r),$n(r),c&512&&(Yt||l===null||Vr(l,l.return)),l!==null&&c&4&&Dm(r,r.memoizedProps,l.memoizedProps);break;case 5:if(Vn(o,r),$n(r),c&512&&(Yt||l===null||Vr(l,l.return)),r.flags&32){m=r.stateNode;try{Oi(m,"")}catch(W){kt(r,r.return,W)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Dm(r,m,l!==null?l.memoizedProps:m)),c&1024&&(Nm=!0);break;case 6:if(Vn(o,r),$n(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,l=r.stateNode;try{l.nodeValue=c}catch(W){kt(r,r.return,W)}}break;case 3:if(Zc=null,m=Ar,Ar=Gc(o.containerInfo),Vn(o,r),Ar=m,$n(r),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Fs(o.containerInfo)}catch(W){kt(r,r.return,W)}Nm&&(Nm=!1,qx(r));break;case 4:c=Ar,Ar=Gc(r.stateNode.containerInfo),Vn(o,r),$n(r),Ar=c;break;case 12:Vn(o,r),$n(r);break;case 13:Vn(o,r),$n(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Um=qt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,jm(r,c)));break;case 22:m=r.memoizedState!==null;var L=l!==null&&l.memoizedState!==null,K=ha,ie=Yt;if(ha=K||m,Yt=ie||L,Vn(o,r),Yt=ie,ha=K,$n(r),c&8192)e:for(o=r.stateNode,o._visibility=m?o._visibility&-2:o._visibility|1,m&&(l===null||L||ha||Yt||Xo(r)),l=null,o=r;;){if(o.tag===5||o.tag===26){if(l===null){L=l=o;try{if(v=L.stateNode,m)_=v.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{A=L.stateNode;var fe=L.memoizedProps.style,X=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;A.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(W){kt(L,L.return,W)}}}else if(o.tag===6){if(l===null){L=o;try{L.stateNode.nodeValue=m?"":L.memoizedProps}catch(W){kt(L,L.return,W)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===r)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break e;for(;o.sibling===null;){if(o.return===null||o.return===r)break e;l===o&&(l=null),o=o.return}l===o&&(l=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=r.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,jm(r,l))));break;case 19:Vn(o,r),$n(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,jm(r,c)));break;case 30:break;case 21:break;default:Vn(o,r),$n(r)}}function $n(r){var o=r.flags;if(o&2){try{for(var l,c=r.return;c!==null;){if(Fx(c)){l=c;break}c=c.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,v=Mm(r);Nc(r,v,m);break;case 5:var _=l.stateNode;l.flags&32&&(Oi(_,""),l.flags&=-33);var A=Mm(r);Nc(r,A,_);break;case 3:case 4:var L=l.stateNode.containerInfo,K=Mm(r);Om(r,K,L);break;default:throw Error(a(161))}}catch(ie){kt(r,r.return,ie)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function qx(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var o=r;qx(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),r=r.sibling}}function Ga(r,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Vx(r,o.alternate,o),o=o.sibling}function Xo(r){for(r=r.child;r!==null;){var o=r;switch(o.tag){case 0:case 11:case 14:case 15:Ba(4,o,o.return),Xo(o);break;case 1:Vr(o,o.return);var l=o.stateNode;typeof l.componentWillUnmount=="function"&&Px(o,o.return,l),Xo(o);break;case 27:Ms(o.stateNode);case 26:case 5:Vr(o,o.return),Xo(o);break;case 22:o.memoizedState===null&&Xo(o);break;case 30:Xo(o);break;default:Xo(o)}r=r.sibling}}function qa(r,o,l){for(l=l&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,m=r,v=o,_=v.flags;switch(v.tag){case 0:case 11:case 15:qa(m,v,l),bs(4,v);break;case 1:if(qa(m,v,l),c=v,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(K){kt(c,c.return,K)}if(c=v,m=c.updateQueue,m!==null){var A=c.stateNode;try{var L=m.shared.hiddenCallbacks;if(L!==null)for(m.shared.hiddenCallbacks=null,m=0;m<L.length;m++)S0(L[m],A)}catch(K){kt(c,c.return,K)}}l&&_&64&&Lx(v),Ss(v,v.return);break;case 27:Ux(v);case 26:case 5:qa(m,v,l),l&&c===null&&_&4&&zx(v),Ss(v,v.return);break;case 12:qa(m,v,l);break;case 13:qa(m,v,l),l&&_&4&&Bx(m,v);break;case 22:v.memoizedState===null&&qa(m,v,l),Ss(v,v.return);break;case 30:break;default:qa(m,v,l)}o=o.sibling}}function km(r,o){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&is(l))}function Lm(r,o){r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&is(r))}function $r(r,o,l,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Zx(r,o,l,c),o=o.sibling}function Zx(r,o,l,c){var m=o.flags;switch(o.tag){case 0:case 11:case 15:$r(r,o,l,c),m&2048&&bs(9,o);break;case 1:$r(r,o,l,c);break;case 3:$r(r,o,l,c),m&2048&&(r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&is(r)));break;case 12:if(m&2048){$r(r,o,l,c),r=o.stateNode;try{var v=o.memoizedProps,_=v.id,A=v.onPostCommit;typeof A=="function"&&A(_,o.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(L){kt(o,o.return,L)}}else $r(r,o,l,c);break;case 13:$r(r,o,l,c);break;case 23:break;case 22:v=o.stateNode,_=o.alternate,o.memoizedState!==null?v._visibility&2?$r(r,o,l,c):ws(r,o):v._visibility&2?$r(r,o,l,c):(v._visibility|=2,Qi(r,o,l,c,(o.subtreeFlags&10256)!==0)),m&2048&&km(_,o);break;case 24:$r(r,o,l,c),m&2048&&Lm(o.alternate,o);break;default:$r(r,o,l,c)}}function Qi(r,o,l,c,m){for(m=m&&(o.subtreeFlags&10256)!==0,o=o.child;o!==null;){var v=r,_=o,A=l,L=c,K=_.flags;switch(_.tag){case 0:case 11:case 15:Qi(v,_,A,L,m),bs(8,_);break;case 23:break;case 22:var ie=_.stateNode;_.memoizedState!==null?ie._visibility&2?Qi(v,_,A,L,m):ws(v,_):(ie._visibility|=2,Qi(v,_,A,L,m)),m&&K&2048&&km(_.alternate,_);break;case 24:Qi(v,_,A,L,m),m&&K&2048&&Lm(_.alternate,_);break;default:Qi(v,_,A,L,m)}o=o.sibling}}function ws(r,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var l=r,c=o,m=c.flags;switch(c.tag){case 22:ws(l,c),m&2048&&km(c.alternate,c);break;case 24:ws(l,c),m&2048&&Lm(c.alternate,c);break;default:ws(l,c)}o=o.sibling}}var Es=8192;function Xi(r){if(r.subtreeFlags&Es)for(r=r.child;r!==null;)Yx(r),r=r.sibling}function Yx(r){switch(r.tag){case 26:Xi(r),r.flags&Es&&r.memoizedState!==null&&dD(Ar,r.memoizedState,r.memoizedProps);break;case 5:Xi(r);break;case 3:case 4:var o=Ar;Ar=Gc(r.stateNode.containerInfo),Xi(r),Ar=o;break;case 22:r.memoizedState===null&&(o=r.alternate,o!==null&&o.memoizedState!==null?(o=Es,Es=16777216,Xi(r),Es=o):Xi(r));break;default:Xi(r)}}function Kx(r){var o=r.alternate;if(o!==null&&(r=o.child,r!==null)){o.child=null;do o=r.sibling,r.sibling=null,r=o;while(r!==null)}}function _s(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];un=c,Xx(c,r)}Kx(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Qx(r),r=r.sibling}function Qx(r){switch(r.tag){case 0:case 11:case 15:_s(r),r.flags&2048&&Ba(9,r,r.return);break;case 3:_s(r);break;case 12:_s(r);break;case 22:var o=r.stateNode;r.memoizedState!==null&&o._visibility&2&&(r.return===null||r.return.tag!==13)?(o._visibility&=-3,jc(r)):_s(r);break;default:_s(r)}}function jc(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];un=c,Xx(c,r)}Kx(r)}for(r=r.child;r!==null;){switch(o=r,o.tag){case 0:case 11:case 15:Ba(8,o,o.return),jc(o);break;case 22:l=o.stateNode,l._visibility&2&&(l._visibility&=-3,jc(o));break;default:jc(o)}r=r.sibling}}function Xx(r,o){for(;un!==null;){var l=un;switch(l.tag){case 0:case 11:case 15:Ba(8,l,o);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:is(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,un=c;else e:for(l=r;un!==null;){c=un;var m=c.sibling,v=c.return;if($x(c),c===l){un=null;break e}if(m!==null){m.return=v,un=m;break e}un=v}}}var A2={getCacheForType:function(r){var o=yn(rn),l=o.data.get(r);return l===void 0&&(l=r(),o.data.set(r,l)),l}},T2=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Lt=null,ht=null,gt=0,Mt=0,Hn=null,Za=!1,Wi=!1,Pm=!1,pa=0,Bt=0,Ya=0,Wo=0,zm=0,fr=0,Ji=0,Cs=null,jn=null,Fm=!1,Um=0,kc=1/0,Lc=null,Ka=null,hn=0,Qa=null,el=null,tl=0,Im=0,Vm=null,Wx=null,Rs=0,$m=null;function Bn(){if((Dt&2)!==0&&gt!==0)return gt&-gt;if(k.T!==null){var r=$i;return r!==0?r:Km()}return F()}function Jx(){fr===0&&(fr=(gt&536870912)===0||_t?Ti():536870912);var r=dr.current;return r!==null&&(r.flags|=32),fr}function Gn(r,o,l){(r===Lt&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)&&(nl(r,0),Xa(r,gt,fr,!1)),ko(r,l),((Dt&2)===0||r!==Lt)&&(r===Lt&&((Dt&2)===0&&(Wo|=l),Bt===4&&Xa(r,gt,fr,!1)),Hr(r))}function eb(r,o,l){if((Dt&6)!==0)throw Error(a(327));var c=!l&&(o&124)===0&&(o&r.expiredLanes)===0||rr(r,o),m=c?O2(r,o):Gm(r,o,!0),v=c;do{if(m===0){Wi&&!c&&Xa(r,o,0,!1);break}else{if(l=r.current.alternate,v&&!D2(l)){m=Gm(r,o,!1),v=!1;continue}if(m===2){if(v=o,r.errorRecoveryDisabledLanes&v)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){o=_;e:{var A=r;m=Cs;var L=A.current.memoizedState.isDehydrated;if(L&&(nl(A,_).flags|=256),_=Gm(A,_,!1),_!==2){if(Pm&&!L){A.errorRecoveryDisabledLanes|=v,Wo|=v,m=4;break e}v=jn,jn=m,v!==null&&(jn===null?jn=v:jn.push.apply(jn,v))}m=_}if(v=!1,m!==2)continue}}if(m===1){nl(r,0),Xa(r,o,0,!0);break}e:{switch(c=r,v=m,v){case 0:case 1:throw Error(a(345));case 4:if((o&4194048)!==o)break;case 6:Xa(c,o,fr,!Za);break e;case 2:jn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((o&62914560)===o&&(m=Um+300-qt(),10<m)){if(Xa(c,o,fr,!Za),Fr(c,0,!0)!==0)break e;c.timeoutHandle=Db(tb.bind(null,c,l,jn,Lc,Fm,o,fr,Wo,Ji,Za,v,2,-0,0),m);break e}tb(c,l,jn,Lc,Fm,o,fr,Wo,Ji,Za,v,0,-0,0)}}break}while(!0);Hr(r)}function tb(r,o,l,c,m,v,_,A,L,K,ie,fe,X,W){if(r.timeoutHandle=-1,fe=o.subtreeFlags,(fe&8192||(fe&16785408)===16785408)&&(js={stylesheets:null,count:0,unsuspend:cD},Yx(o),fe=fD(),fe!==null)){r.cancelPendingCommit=fe(sb.bind(null,r,o,v,l,c,m,_,A,L,ie,1,X,W)),Xa(r,v,_,!K);return}sb(r,o,v,l,c,m,_,A,L)}function D2(r){for(var o=r;;){var l=o.tag;if((l===0||l===11||l===15)&&o.flags&16384&&(l=o.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var m=l[c],v=m.getSnapshot;m=m.value;try{if(!Un(v(),m))return!1}catch{return!1}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Xa(r,o,l,c){o&=~zm,o&=~Wo,r.suspendedLanes|=o,r.pingedLanes&=~o,c&&(r.warmLanes|=o),c=r.expirationTimes;for(var m=o;0<m;){var v=31-Ct(m),_=1<<v;c[v]=-1,m&=~_}l!==0&&Lo(r,l,o)}function Pc(){return(Dt&6)===0?(As(0),!1):!0}function Hm(){if(ht!==null){if(Mt===0)var r=ht.return;else r=ht,la=qo=null,im(r),Yi=null,vs=0,r=ht;for(;r!==null;)kx(r.alternate,r),r=r.return;ht=null}}function nl(r,o){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,Z2(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Hm(),Lt=r,ht=l=aa(r.current,null),gt=o,Mt=0,Hn=null,Za=!1,Wi=rr(r,o),Pm=!1,Ji=fr=zm=Wo=Ya=Bt=0,jn=Cs=null,Fm=!1,(o&8)!==0&&(o|=o&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=o;0<c;){var m=31-Ct(c),v=1<<m;o|=r[m],c&=~v}return pa=o,ac(),l}function nb(r,o){it=null,k.H=Ec,o===ss||o===hc?(o=x0(),Mt=3):o===g0?(o=x0(),Mt=4):Mt=o===bx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Hn=o,ht===null&&(Bt=1,Tc(r,lr(o,r.current)))}function rb(){var r=k.H;return k.H=Ec,r===null?Ec:r}function ab(){var r=k.A;return k.A=A2,r}function Bm(){Bt=4,Za||(gt&4194048)!==gt&&dr.current!==null||(Wi=!0),(Ya&134217727)===0&&(Wo&134217727)===0||Lt===null||Xa(Lt,gt,fr,!1)}function Gm(r,o,l){var c=Dt;Dt|=2;var m=rb(),v=ab();(Lt!==r||gt!==o)&&(Lc=null,nl(r,o)),o=!1;var _=Bt;e:do try{if(Mt!==0&&ht!==null){var A=ht,L=Hn;switch(Mt){case 8:Hm(),_=6;break e;case 3:case 2:case 9:case 6:dr.current===null&&(o=!0);var K=Mt;if(Mt=0,Hn=null,rl(r,A,L,K),l&&Wi){_=0;break e}break;default:K=Mt,Mt=0,Hn=null,rl(r,A,L,K)}}M2(),_=Bt;break}catch(ie){nb(r,ie)}while(!0);return o&&r.shellSuspendCounter++,la=qo=null,Dt=c,k.H=m,k.A=v,ht===null&&(Lt=null,gt=0,ac()),_}function M2(){for(;ht!==null;)ob(ht)}function O2(r,o){var l=Dt;Dt|=2;var c=rb(),m=ab();Lt!==r||gt!==o?(Lc=null,kc=qt()+500,nl(r,o)):Wi=rr(r,o);e:do try{if(Mt!==0&&ht!==null){o=ht;var v=Hn;t:switch(Mt){case 1:Mt=0,Hn=null,rl(r,o,v,1);break;case 2:case 9:if(v0(v)){Mt=0,Hn=null,ib(o);break}o=function(){Mt!==2&&Mt!==9||Lt!==r||(Mt=7),Hr(r)},v.then(o,o);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:v0(v)?(Mt=0,Hn=null,ib(o)):(Mt=0,Hn=null,rl(r,o,v,7));break;case 5:var _=null;switch(ht.tag){case 26:_=ht.memoizedState;case 5:case 27:var A=ht;if(!_||Vb(_)){Mt=0,Hn=null;var L=A.sibling;if(L!==null)ht=L;else{var K=A.return;K!==null?(ht=K,zc(K)):ht=null}break t}}Mt=0,Hn=null,rl(r,o,v,5);break;case 6:Mt=0,Hn=null,rl(r,o,v,6);break;case 8:Hm(),Bt=6;break e;default:throw Error(a(462))}}N2();break}catch(ie){nb(r,ie)}while(!0);return la=qo=null,k.H=c,k.A=m,Dt=l,ht!==null?0:(Lt=null,gt=0,ac(),Bt)}function N2(){for(;ht!==null&&!tr();)ob(ht)}function ob(r){var o=Nx(r.alternate,r,pa);r.memoizedProps=r.pendingProps,o===null?zc(r):ht=o}function ib(r){var o=r,l=o.alternate;switch(o.tag){case 15:case 0:o=Rx(l,o,o.pendingProps,o.type,void 0,gt);break;case 11:o=Rx(l,o,o.pendingProps,o.type.render,o.ref,gt);break;case 5:im(o);default:kx(l,o),o=ht=l0(o,pa),o=Nx(l,o,pa)}r.memoizedProps=r.pendingProps,o===null?zc(r):ht=o}function rl(r,o,l,c){la=qo=null,im(o),Yi=null,vs=0;var m=o.return;try{if(S2(r,m,o,l,gt)){Bt=1,Tc(r,lr(l,r.current)),ht=null;return}}catch(v){if(m!==null)throw ht=m,v;Bt=1,Tc(r,lr(l,r.current)),ht=null;return}o.flags&32768?(_t||c===1?r=!0:Wi||(gt&536870912)!==0?r=!1:(Za=r=!0,(c===2||c===9||c===3||c===6)&&(c=dr.current,c!==null&&c.tag===13&&(c.flags|=16384))),lb(o,r)):zc(o)}function zc(r){var o=r;do{if((o.flags&32768)!==0){lb(o,Za);return}r=o.return;var l=E2(o.alternate,o,pa);if(l!==null){ht=l;return}if(o=o.sibling,o!==null){ht=o;return}ht=o=r}while(o!==null);Bt===0&&(Bt=5)}function lb(r,o){do{var l=_2(r.alternate,r);if(l!==null){l.flags&=32767,ht=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!o&&(r=r.sibling,r!==null)){ht=r;return}ht=r=l}while(r!==null);Bt=6,ht=null}function sb(r,o,l,c,m,v,_,A,L){r.cancelPendingCommit=null;do Fc();while(hn!==0);if((Dt&6)!==0)throw Error(a(327));if(o!==null){if(o===r.current)throw Error(a(177));if(v=o.lanes|o.childLanes,v|=Lh,Yu(r,l,v,_,A,L),r===Lt&&(ht=Lt=null,gt=0),el=o,Qa=r,tl=l,Im=v,Vm=m,Wx=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,P2(Q,function(){return hb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,m=q.p,q.p=2,_=Dt,Dt|=4;try{C2(r,o,l)}finally{Dt=_,q.p=m,k.T=c}}hn=1,ub(),cb(),db()}}function ub(){if(hn===1){hn=0;var r=Qa,o=el,l=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var c=q.p;q.p=2;var m=Dt;Dt|=4;try{Gx(o,r);var v=rp,_=Xy(r.containerInfo),A=v.focusedElem,L=v.selectionRange;if(_!==A&&A&&A.ownerDocument&&Qy(A.ownerDocument.documentElement,A)){if(L!==null&&Mh(A)){var K=L.start,ie=L.end;if(ie===void 0&&(ie=K),"selectionStart"in A)A.selectionStart=K,A.selectionEnd=Math.min(ie,A.value.length);else{var fe=A.ownerDocument||document,X=fe&&fe.defaultView||window;if(X.getSelection){var W=X.getSelection(),Ke=A.textContent.length,Be=Math.min(L.start,Ke),jt=L.end===void 0?Be:Math.min(L.end,Ke);!W.extend&&Be>jt&&(_=jt,jt=Be,Be=_);var $=Ky(A,Be),U=Ky(A,jt);if($&&U&&(W.rangeCount!==1||W.anchorNode!==$.node||W.anchorOffset!==$.offset||W.focusNode!==U.node||W.focusOffset!==U.offset)){var Y=fe.createRange();Y.setStart($.node,$.offset),W.removeAllRanges(),Be>jt?(W.addRange(Y),W.extend(U.node,U.offset)):(Y.setEnd(U.node,U.offset),W.addRange(Y))}}}}for(fe=[],W=A;W=W.parentNode;)W.nodeType===1&&fe.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<fe.length;A++){var le=fe[A];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Qc=!!np,rp=np=null}finally{Dt=m,q.p=c,k.T=l}}r.current=o,hn=2}}function cb(){if(hn===2){hn=0;var r=Qa,o=el,l=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var c=q.p;q.p=2;var m=Dt;Dt|=4;try{Vx(r,o.alternate,o)}finally{Dt=m,q.p=c,k.T=l}}hn=3}}function db(){if(hn===4||hn===3){hn=0,br();var r=Qa,o=el,l=tl,c=Wx;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?hn=5:(hn=0,el=Qa=null,fb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(Ka=null),Bl(l),o=o.stateNode,$e&&typeof $e.onCommitFiberRoot=="function")try{$e.onCommitFiberRoot(Ae,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=k.T,m=q.p,q.p=2,k.T=null;try{for(var v=r.onRecoverableError,_=0;_<c.length;_++){var A=c[_];v(A.value,{componentStack:A.stack})}}finally{k.T=o,q.p=m}}(tl&3)!==0&&Fc(),Hr(r),m=r.pendingLanes,(l&4194090)!==0&&(m&42)!==0?r===$m?Rs++:(Rs=0,$m=r):Rs=0,As(0)}}function fb(r,o){(r.pooledCacheLanes&=o)===0&&(o=r.pooledCache,o!=null&&(r.pooledCache=null,is(o)))}function Fc(r){return ub(),cb(),db(),hb()}function hb(){if(hn!==5)return!1;var r=Qa,o=Im;Im=0;var l=Bl(tl),c=k.T,m=q.p;try{q.p=32>l?32:l,k.T=null,l=Vm,Vm=null;var v=Qa,_=tl;if(hn=0,el=Qa=null,tl=0,(Dt&6)!==0)throw Error(a(331));var A=Dt;if(Dt|=4,Qx(v.current),Zx(v,v.current,_,l),Dt=A,As(0,!1),$e&&typeof $e.onPostCommitFiberRoot=="function")try{$e.onPostCommitFiberRoot(Ae,v)}catch{}return!0}finally{q.p=m,k.T=c,fb(r,o)}}function mb(r,o,l){o=lr(l,o),o=bm(r.stateNode,o,2),r=Ia(r,o,2),r!==null&&(ko(r,2),Hr(r))}function kt(r,o,l){if(r.tag===3)mb(r,r,l);else for(;o!==null;){if(o.tag===3){mb(o,r,l);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ka===null||!Ka.has(c))){r=lr(l,r),l=yx(2),c=Ia(o,l,2),c!==null&&(xx(l,c,o,r),ko(c,2),Hr(c));break}}o=o.return}}function qm(r,o,l){var c=r.pingCache;if(c===null){c=r.pingCache=new T2;var m=new Set;c.set(o,m)}else m=c.get(o),m===void 0&&(m=new Set,c.set(o,m));m.has(l)||(Pm=!0,m.add(l),r=j2.bind(null,r,o,l),o.then(r,r))}function j2(r,o,l){var c=r.pingCache;c!==null&&c.delete(o),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,Lt===r&&(gt&l)===l&&(Bt===4||Bt===3&&(gt&62914560)===gt&&300>qt()-Um?(Dt&2)===0&&nl(r,0):zm|=l,Ji===gt&&(Ji=0)),Hr(r)}function pb(r,o){o===0&&(o=Zu()),r=Fi(r,o),r!==null&&(ko(r,o),Hr(r))}function k2(r){var o=r.memoizedState,l=0;o!==null&&(l=o.retryLane),pb(r,l)}function L2(r,o){var l=0;switch(r.tag){case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(l=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(o),pb(r,l)}function P2(r,o){return Gt(r,o)}var Uc=null,al=null,Zm=!1,Ic=!1,Ym=!1,Jo=0;function Hr(r){r!==al&&r.next===null&&(al===null?Uc=al=r:al=al.next=r),Ic=!0,Zm||(Zm=!0,F2())}function As(r,o){if(!Ym&&Ic){Ym=!0;do for(var l=!1,c=Uc;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var v=0;else{var _=c.suspendedLanes,A=c.pingedLanes;v=(1<<31-Ct(42|r)+1)-1,v&=m&~(_&~A),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,xb(c,v))}else v=gt,v=Fr(c,c===Lt?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||rr(c,v)||(l=!0,xb(c,v));c=c.next}while(l);Ym=!1}}function z2(){gb()}function gb(){Ic=Zm=!1;var r=0;Jo!==0&&(q2()&&(r=Jo),Jo=0);for(var o=qt(),l=null,c=Uc;c!==null;){var m=c.next,v=vb(c,o);v===0?(c.next=null,l===null?Uc=m:l.next=m,m===null&&(al=l)):(l=c,(r!==0||(v&3)!==0)&&(Ic=!0)),c=m}As(r)}function vb(r,o){for(var l=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var _=31-Ct(v),A=1<<_,L=m[_];L===-1?((A&l)===0||(A&c)!==0)&&(m[_]=jo(A,o)):L<=o&&(r.expiredLanes|=A),v&=~A}if(o=Lt,l=gt,l=Fr(r,r===o?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,l===0||r===o&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Pt(c),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||rr(r,l)){if(o=l&-l,o===r.callbackPriority)return o;switch(c!==null&&Pt(c),Bl(l)){case 2:case 8:l=z;break;case 32:l=Q;break;case 268435456:l=Ee;break;default:l=Q}return c=yb.bind(null,r),l=Gt(l,c),r.callbackPriority=o,r.callbackNode=l,o}return c!==null&&c!==null&&Pt(c),r.callbackPriority=2,r.callbackNode=null,2}function yb(r,o){if(hn!==0&&hn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(Fc()&&r.callbackNode!==l)return null;var c=gt;return c=Fr(r,r===Lt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(eb(r,c,o),vb(r,qt()),r.callbackNode!=null&&r.callbackNode===l?yb.bind(null,r):null)}function xb(r,o){if(Fc())return null;eb(r,o,!0)}function F2(){Y2(function(){(Dt&6)!==0?Gt(nr,z2):gb()})}function Km(){return Jo===0&&(Jo=Ti()),Jo}function bb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Xu(""+r)}function Sb(r,o){var l=o.ownerDocument.createElement("input");return l.name=o.name,l.value=o.value,r.id&&l.setAttribute("form",r.id),o.parentNode.insertBefore(l,o),r=new FormData(r),l.parentNode.removeChild(l),r}function U2(r,o,l,c,m){if(o==="submit"&&l&&l.stateNode===m){var v=bb((m[be]||null).action),_=c.submitter;_&&(o=(o=_[be]||null)?bb(o.formAction):_.getAttribute("formAction"),o!==null&&(v=o,_=null));var A=new tc("action","action",null,c,m);r.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Jo!==0){var L=_?Sb(m,_):new FormData(m);pm(l,{pending:!0,data:L,method:m.method,action:v},null,L)}}else typeof v=="function"&&(A.preventDefault(),L=_?Sb(m,_):new FormData(m),pm(l,{pending:!0,data:L,method:m.method,action:v},v,L))},currentTarget:m}]})}}for(var Qm=0;Qm<kh.length;Qm++){var Xm=kh[Qm],I2=Xm.toLowerCase(),V2=Xm[0].toUpperCase()+Xm.slice(1);Rr(I2,"on"+V2)}Rr(e0,"onAnimationEnd"),Rr(t0,"onAnimationIteration"),Rr(n0,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(a2,"onTransitionRun"),Rr(o2,"onTransitionStart"),Rr(i2,"onTransitionCancel"),Rr(r0,"onTransitionEnd"),ar("onMouseEnter",["mouseout","mouseover"]),ar("onMouseLeave",["mouseout","mouseover"]),ar("onPointerEnter",["pointerout","pointerover"]),ar("onPointerLeave",["pointerout","pointerover"]),_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_n("onBeforeInput",["compositionend","keypress","textInput","paste"]),_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),$2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function wb(r,o){o=(o&4)!==0;for(var l=0;l<r.length;l++){var c=r[l],m=c.event;c=c.listeners;e:{var v=void 0;if(o)for(var _=c.length-1;0<=_;_--){var A=c[_],L=A.instance,K=A.currentTarget;if(A=A.listener,L!==v&&m.isPropagationStopped())break e;v=A,m.currentTarget=K;try{v(m)}catch(ie){Ac(ie)}m.currentTarget=null,v=L}else for(_=0;_<c.length;_++){if(A=c[_],L=A.instance,K=A.currentTarget,A=A.listener,L!==v&&m.isPropagationStopped())break e;v=A,m.currentTarget=K;try{v(m)}catch(ie){Ac(ie)}m.currentTarget=null,v=L}}}}function mt(r,o){var l=o[He];l===void 0&&(l=o[He]=new Set);var c=r+"__bubble";l.has(c)||(Eb(o,r,2,!1),l.add(c))}function Wm(r,o,l){var c=0;o&&(c|=4),Eb(l,r,c,o)}var Vc="_reactListening"+Math.random().toString(36).slice(2);function Jm(r){if(!r[Vc]){r[Vc]=!0,pt.forEach(function(l){l!=="selectionchange"&&($2.has(l)||Wm(l,!1,r),Wm(l,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Vc]||(o[Vc]=!0,Wm("selectionchange",!1,o))}}function Eb(r,o,l,c){switch(Zb(o)){case 2:var m=pD;break;case 8:m=gD;break;default:m=hp}l=m.bind(null,o,l,r),m=void 0,!Sh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(o,l,{capture:!0,passive:m}):r.addEventListener(o,l,!0):m!==void 0?r.addEventListener(o,l,{passive:m}):r.addEventListener(o,l,!1)}function ep(r,o,l,c,m){var v=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var A=c.stateNode.containerInfo;if(A===m)break;if(_===4)for(_=c.return;_!==null;){var L=_.tag;if((L===3||L===4)&&_.stateNode.containerInfo===m)return;_=_.return}for(;A!==null;){if(_=Qe(A),_===null)return;if(L=_.tag,L===5||L===6||L===26||L===27){c=v=_;continue e}A=A.parentNode}}c=c.return}My(function(){var K=v,ie=xh(l),fe=[];e:{var X=a0.get(r);if(X!==void 0){var W=tc,Ke=r;switch(r){case"keypress":if(Ju(l)===0)break e;case"keydown":case"keyup":W=PT;break;case"focusin":Ke="focus",W=Ch;break;case"focusout":Ke="blur",W=Ch;break;case"beforeblur":case"afterblur":W=Ch;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=_T;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=UT;break;case e0:case t0:case n0:W=AT;break;case r0:W=VT;break;case"scroll":case"scrollend":W=wT;break;case"wheel":W=HT;break;case"copy":case"cut":case"paste":W=DT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Ly;break;case"toggle":case"beforetoggle":W=GT}var Be=(o&4)!==0,jt=!Be&&(r==="scroll"||r==="scrollend"),$=Be?X!==null?X+"Capture":null:X;Be=[];for(var U=K,Y;U!==null;){var le=U;if(Y=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Y===null||$===null||(le=Zl(U,$),le!=null&&Be.push(Ds(U,le,Y))),jt)break;U=U.return}0<Be.length&&(X=new W(X,Ke,null,l,ie),fe.push({event:X,listeners:Be}))}}if((o&7)===0){e:{if(X=r==="mouseover"||r==="pointerover",W=r==="mouseout"||r==="pointerout",X&&l!==yh&&(Ke=l.relatedTarget||l.fromElement)&&(Qe(Ke)||Ke[Pe]))break e;if((W||X)&&(X=ie.window===ie?ie:(X=ie.ownerDocument)?X.defaultView||X.parentWindow:window,W?(Ke=l.relatedTarget||l.toElement,W=K,Ke=Ke?Qe(Ke):null,Ke!==null&&(jt=s(Ke),Be=Ke.tag,Ke!==jt||Be!==5&&Be!==27&&Be!==6)&&(Ke=null)):(W=null,Ke=K),W!==Ke)){if(Be=jy,le="onMouseLeave",$="onMouseEnter",U="mouse",(r==="pointerout"||r==="pointerover")&&(Be=Ly,le="onPointerLeave",$="onPointerEnter",U="pointer"),jt=W==null?X:zt(W),Y=Ke==null?X:zt(Ke),X=new Be(le,U+"leave",W,l,ie),X.target=jt,X.relatedTarget=Y,le=null,Qe(ie)===K&&(Be=new Be($,U+"enter",Ke,l,ie),Be.target=Y,Be.relatedTarget=jt,le=Be),jt=le,W&&Ke)t:{for(Be=W,$=Ke,U=0,Y=Be;Y;Y=ol(Y))U++;for(Y=0,le=$;le;le=ol(le))Y++;for(;0<U-Y;)Be=ol(Be),U--;for(;0<Y-U;)$=ol($),Y--;for(;U--;){if(Be===$||$!==null&&Be===$.alternate)break t;Be=ol(Be),$=ol($)}Be=null}else Be=null;W!==null&&_b(fe,X,W,Be,!1),Ke!==null&&jt!==null&&_b(fe,jt,Ke,Be,!0)}}e:{if(X=K?zt(K):window,W=X.nodeName&&X.nodeName.toLowerCase(),W==="select"||W==="input"&&X.type==="file")var Me=Hy;else if(Vy(X))if(By)Me=t2;else{Me=JT;var dt=WT}else W=X.nodeName,!W||W.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?K&&vh(K.elementType)&&(Me=Hy):Me=e2;if(Me&&(Me=Me(r,K))){$y(fe,Me,l,ie);break e}dt&&dt(r,X,K),r==="focusout"&&K&&X.type==="number"&&K.memoizedProps.value!=null&&gh(X,"number",X.value)}switch(dt=K?zt(K):window,r){case"focusin":(Vy(dt)||dt.contentEditable==="true")&&(Li=dt,Oh=K,ts=null);break;case"focusout":ts=Oh=Li=null;break;case"mousedown":Nh=!0;break;case"contextmenu":case"mouseup":case"dragend":Nh=!1,Wy(fe,l,ie);break;case"selectionchange":if(r2)break;case"keydown":case"keyup":Wy(fe,l,ie)}var Ue;if(Ah)e:{switch(r){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else ki?Uy(r,l)&&(Ge="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(Py&&l.locale!=="ko"&&(ki||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&ki&&(Ue=Oy()):(Pa=ie,wh="value"in Pa?Pa.value:Pa.textContent,ki=!0)),dt=$c(K,Ge),0<dt.length&&(Ge=new ky(Ge,r,null,l,ie),fe.push({event:Ge,listeners:dt}),Ue?Ge.data=Ue:(Ue=Iy(l),Ue!==null&&(Ge.data=Ue)))),(Ue=ZT?YT(r,l):KT(r,l))&&(Ge=$c(K,"onBeforeInput"),0<Ge.length&&(dt=new ky("onBeforeInput","beforeinput",null,l,ie),fe.push({event:dt,listeners:Ge}),dt.data=Ue)),U2(fe,r,K,l,ie)}wb(fe,o)})}function Ds(r,o,l){return{instance:r,listener:o,currentTarget:l}}function $c(r,o){for(var l=o+"Capture",c=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=Zl(r,l),m!=null&&c.unshift(Ds(r,m,v)),m=Zl(r,o),m!=null&&c.push(Ds(r,m,v))),r.tag===3)return c;r=r.return}return[]}function ol(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function _b(r,o,l,c,m){for(var v=o._reactName,_=[];l!==null&&l!==c;){var A=l,L=A.alternate,K=A.stateNode;if(A=A.tag,L!==null&&L===c)break;A!==5&&A!==26&&A!==27||K===null||(L=K,m?(K=Zl(l,v),K!=null&&_.unshift(Ds(l,K,L))):m||(K=Zl(l,v),K!=null&&_.push(Ds(l,K,L)))),l=l.return}_.length!==0&&r.push({event:o,listeners:_})}var H2=/\r\n?/g,B2=/\u0000|\uFFFD/g;function Cb(r){return(typeof r=="string"?r:""+r).replace(H2,`
49
- `).replace(B2,"")}function Rb(r,o){return o=Cb(o),Cb(r)===o}function Hc(){}function Nt(r,o,l,c,m,v){switch(l){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||Oi(r,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&Oi(r,""+c);break;case"className":na(r,"class",c);break;case"tabIndex":na(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":na(r,l,c);break;case"style":Ty(r,c,v);break;case"data":if(o!=="object"){na(r,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||l!=="href")){r.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Xu(""+c),r.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(l,"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 v=="function"&&(l==="formAction"?(o!=="input"&&Nt(r,o,"name",m.name,m,null),Nt(r,o,"formEncType",m.formEncType,m,null),Nt(r,o,"formMethod",m.formMethod,m,null),Nt(r,o,"formTarget",m.formTarget,m,null)):(Nt(r,o,"encType",m.encType,m,null),Nt(r,o,"method",m.method,m,null),Nt(r,o,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Xu(""+c),r.setAttribute(l,c);break;case"onClick":c!=null&&(r.onclick=Hc);break;case"onScroll":c!=null&&mt("scroll",r);break;case"onScrollEnd":c!=null&&mt("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}l=Xu(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""+c):r.removeAttribute(l);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":c===!0?r.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,c):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(l,c):r.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(l):r.setAttribute(l,c);break;case"popover":mt("beforetoggle",r),mt("toggle",r),or(r,"popover",c);break;case"xlinkActuate":ct(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ct(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ct(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ct(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ct(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ct(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ct(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ct(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ct(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":or(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=bT.get(l)||l,or(r,l,c))}}function tp(r,o,l,c,m,v){switch(l){case"style":Ty(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof c=="string"?Oi(r,c):(typeof c=="number"||typeof c=="bigint")&&Oi(r,""+c);break;case"onScroll":c!=null&&mt("scroll",r);break;case"onScrollEnd":c!=null&&mt("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Hc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Na.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),o=l.slice(2,m?l.length-7:void 0),v=r[be]||null,v=v!=null?v[l]:null,typeof v=="function"&&r.removeEventListener(o,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(o,c,m);break e}l in r?r[l]=c:c===!0?r.setAttribute(l,""):or(r,l,c)}}}function mn(r,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",r),mt("load",r);var c=!1,m=!1,v;for(v in l)if(l.hasOwnProperty(v)){var _=l[v];if(_!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:Nt(r,o,v,_,l,null)}}m&&Nt(r,o,"srcSet",l.srcSet,l,null),c&&Nt(r,o,"src",l.src,l,null);return;case"input":mt("invalid",r);var A=v=_=m=null,L=null,K=null;for(c in l)if(l.hasOwnProperty(c)){var ie=l[c];if(ie!=null)switch(c){case"name":m=ie;break;case"type":_=ie;break;case"checked":L=ie;break;case"defaultChecked":K=ie;break;case"value":v=ie;break;case"defaultValue":A=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,o));break;default:Nt(r,o,c,ie,l,null)}}_y(r,v,A,L,K,_,m,!1),Ku(r);return;case"select":mt("invalid",r),c=_=v=null;for(m in l)if(l.hasOwnProperty(m)&&(A=l[m],A!=null))switch(m){case"value":v=A;break;case"defaultValue":_=A;break;case"multiple":c=A;default:Nt(r,o,m,A,l,null)}o=v,l=_,r.multiple=!!c,o!=null?Mi(r,!!c,o,!1):l!=null&&Mi(r,!!c,l,!0);return;case"textarea":mt("invalid",r),v=m=c=null;for(_ in l)if(l.hasOwnProperty(_)&&(A=l[_],A!=null))switch(_){case"value":c=A;break;case"defaultValue":m=A;break;case"children":v=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(a(91));break;default:Nt(r,o,_,A,l,null)}Ry(r,c,m,v),Ku(r);return;case"option":for(L in l)if(l.hasOwnProperty(L)&&(c=l[L],c!=null))switch(L){case"selected":r.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Nt(r,o,L,c,l,null)}return;case"dialog":mt("beforetoggle",r),mt("toggle",r),mt("cancel",r),mt("close",r);break;case"iframe":case"object":mt("load",r);break;case"video":case"audio":for(c=0;c<Ts.length;c++)mt(Ts[c],r);break;case"image":mt("error",r),mt("load",r);break;case"details":mt("toggle",r);break;case"embed":case"source":case"link":mt("error",r),mt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in l)if(l.hasOwnProperty(K)&&(c=l[K],c!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:Nt(r,o,K,c,l,null)}return;default:if(vh(o)){for(ie in l)l.hasOwnProperty(ie)&&(c=l[ie],c!==void 0&&tp(r,o,ie,c,l,void 0));return}}for(A in l)l.hasOwnProperty(A)&&(c=l[A],c!=null&&Nt(r,o,A,c,l,null))}function G2(r,o,l,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,_=null,A=null,L=null,K=null,ie=null;for(W in l){var fe=l[W];if(l.hasOwnProperty(W)&&fe!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":L=fe;default:c.hasOwnProperty(W)||Nt(r,o,W,null,c,fe)}}for(var X in c){var W=c[X];if(fe=l[X],c.hasOwnProperty(X)&&(W!=null||fe!=null))switch(X){case"type":v=W;break;case"name":m=W;break;case"checked":K=W;break;case"defaultChecked":ie=W;break;case"value":_=W;break;case"defaultValue":A=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,o));break;default:W!==fe&&Nt(r,o,X,W,c,fe)}}ph(r,_,A,L,K,ie,v,m);return;case"select":W=_=A=X=null;for(v in l)if(L=l[v],l.hasOwnProperty(v)&&L!=null)switch(v){case"value":break;case"multiple":W=L;default:c.hasOwnProperty(v)||Nt(r,o,v,null,c,L)}for(m in c)if(v=c[m],L=l[m],c.hasOwnProperty(m)&&(v!=null||L!=null))switch(m){case"value":X=v;break;case"defaultValue":A=v;break;case"multiple":_=v;default:v!==L&&Nt(r,o,m,v,c,L)}o=A,l=_,c=W,X!=null?Mi(r,!!l,X,!1):!!c!=!!l&&(o!=null?Mi(r,!!l,o,!0):Mi(r,!!l,l?[]:"",!1));return;case"textarea":W=X=null;for(A in l)if(m=l[A],l.hasOwnProperty(A)&&m!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Nt(r,o,A,null,c,m)}for(_ in c)if(m=c[_],v=l[_],c.hasOwnProperty(_)&&(m!=null||v!=null))switch(_){case"value":X=m;break;case"defaultValue":W=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&Nt(r,o,_,m,c,v)}Cy(r,X,W);return;case"option":for(var Ke in l)if(X=l[Ke],l.hasOwnProperty(Ke)&&X!=null&&!c.hasOwnProperty(Ke))switch(Ke){case"selected":r.selected=!1;break;default:Nt(r,o,Ke,null,c,X)}for(L in c)if(X=c[L],W=l[L],c.hasOwnProperty(L)&&X!==W&&(X!=null||W!=null))switch(L){case"selected":r.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:Nt(r,o,L,X,c,W)}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 Be in l)X=l[Be],l.hasOwnProperty(Be)&&X!=null&&!c.hasOwnProperty(Be)&&Nt(r,o,Be,null,c,X);for(K in c)if(X=c[K],W=l[K],c.hasOwnProperty(K)&&X!==W&&(X!=null||W!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(a(137,o));break;default:Nt(r,o,K,X,c,W)}return;default:if(vh(o)){for(var jt in l)X=l[jt],l.hasOwnProperty(jt)&&X!==void 0&&!c.hasOwnProperty(jt)&&tp(r,o,jt,void 0,c,X);for(ie in c)X=c[ie],W=l[ie],!c.hasOwnProperty(ie)||X===W||X===void 0&&W===void 0||tp(r,o,ie,X,c,W);return}}for(var $ in l)X=l[$],l.hasOwnProperty($)&&X!=null&&!c.hasOwnProperty($)&&Nt(r,o,$,null,c,X);for(fe in c)X=c[fe],W=l[fe],!c.hasOwnProperty(fe)||X===W||X==null&&W==null||Nt(r,o,fe,X,c,W)}var np=null,rp=null;function Bc(r){return r.nodeType===9?r:r.ownerDocument}function Ab(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tb(r,o){if(r===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&o==="foreignObject"?0:r}function ap(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var op=null;function q2(){var r=window.event;return r&&r.type==="popstate"?r===op?!1:(op=r,!0):(op=null,!1)}var Db=typeof setTimeout=="function"?setTimeout:void 0,Z2=typeof clearTimeout=="function"?clearTimeout:void 0,Mb=typeof Promise=="function"?Promise:void 0,Y2=typeof queueMicrotask=="function"?queueMicrotask:typeof Mb<"u"?function(r){return Mb.resolve(null).then(r).catch(K2)}:Db;function K2(r){setTimeout(function(){throw r})}function Wa(r){return r==="head"}function Ob(r,o){var l=o,c=0,m=0;do{var v=l.nextSibling;if(r.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"){if(0<c&&8>c){l=c;var _=r.ownerDocument;if(l&1&&Ms(_.documentElement),l&2&&Ms(_.body),l&4)for(l=_.head,Ms(l),_=l.firstChild;_;){var A=_.nextSibling,L=_.nodeName;_[Ye]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&_.rel.toLowerCase()==="stylesheet"||l.removeChild(_),_=A}}if(m===0){r.removeChild(v),Fs(o);return}m--}else l==="$"||l==="$?"||l==="$!"?m++:c=l.charCodeAt(0)-48;else c=0;l=v}while(l);Fs(o)}function ip(r){var o=r.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ip(l),Fe(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function Q2(r,o,l,c){for(;r.nodeType===1;){var m=l;if(r.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Ye])switch(o){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(o==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Tr(r.nextSibling),r===null)break}return null}function X2(r,o,l){if(o==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=Tr(r.nextSibling),r===null))return null;return r}function lp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState==="complete"}function W2(r,o){var l=r.ownerDocument;if(r.data!=="$?"||l.readyState==="complete")o();else{var c=function(){o(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Tr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?"||o==="F!"||o==="F")break;if(o==="/$")return null}}return r}var sp=null;function Nb(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return r;o--}else l==="/$"&&o++}r=r.previousSibling}return null}function jb(r,o,l){switch(o=Bc(l),r){case"html":if(r=o.documentElement,!r)throw Error(a(452));return r;case"head":if(r=o.head,!r)throw Error(a(453));return r;case"body":if(r=o.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ms(r){for(var o=r.attributes;o.length;)r.removeAttributeNode(o[0]);Fe(r)}var hr=new Map,kb=new Set;function Gc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ga=q.d;q.d={f:J2,r:eD,D:tD,C:nD,L:rD,m:aD,X:iD,S:oD,M:lD};function J2(){var r=ga.f(),o=Pc();return r||o}function eD(r){var o=yt(r);o!==null&&o.tag===5&&o.type==="form"?ex(o):ga.r(r)}var il=typeof document>"u"?null:document;function Lb(r,o,l){var c=il;if(c&&typeof o=="string"&&o){var m=ir(o);m='link[rel="'+r+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),kb.has(m)||(kb.add(m),r={rel:r,crossOrigin:l,href:o},c.querySelector(m)===null&&(o=c.createElement("link"),mn(o,"link",r),wt(o),c.head.appendChild(o)))}}function tD(r){ga.D(r),Lb("dns-prefetch",r,null)}function nD(r,o){ga.C(r,o),Lb("preconnect",r,o)}function rD(r,o,l){ga.L(r,o,l);var c=il;if(c&&r&&o){var m='link[rel="preload"][as="'+ir(o)+'"]';o==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+ir(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+ir(l.imageSizes)+'"]')):m+='[href="'+ir(r)+'"]';var v=m;switch(o){case"style":v=ll(r);break;case"script":v=sl(r)}hr.has(v)||(r=g({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:r,as:o},l),hr.set(v,r),c.querySelector(m)!==null||o==="style"&&c.querySelector(Os(v))||o==="script"&&c.querySelector(Ns(v))||(o=c.createElement("link"),mn(o,"link",r),wt(o),c.head.appendChild(o)))}}function aD(r,o){ga.m(r,o);var l=il;if(l&&r){var c=o&&typeof o.as=="string"?o.as:"script",m='link[rel="modulepreload"][as="'+ir(c)+'"][href="'+ir(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=sl(r)}if(!hr.has(v)&&(r=g({rel:"modulepreload",href:r},o),hr.set(v,r),l.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ns(v)))return}c=l.createElement("link"),mn(c,"link",r),wt(c),l.head.appendChild(c)}}}function oD(r,o,l){ga.S(r,o,l);var c=il;if(c&&r){var m=Vt(c).hoistableStyles,v=ll(r);o=o||"default";var _=m.get(v);if(!_){var A={loading:0,preload:null};if(_=c.querySelector(Os(v)))A.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":o},l),(l=hr.get(v))&&up(r,l);var L=_=c.createElement("link");wt(L),mn(L,"link",r),L._p=new Promise(function(K,ie){L.onload=K,L.onerror=ie}),L.addEventListener("load",function(){A.loading|=1}),L.addEventListener("error",function(){A.loading|=2}),A.loading|=4,qc(_,o,c)}_={type:"stylesheet",instance:_,count:1,state:A},m.set(v,_)}}}function iD(r,o){ga.X(r,o);var l=il;if(l&&r){var c=Vt(l).hoistableScripts,m=sl(r),v=c.get(m);v||(v=l.querySelector(Ns(m)),v||(r=g({src:r,async:!0},o),(o=hr.get(m))&&cp(r,o),v=l.createElement("script"),wt(v),mn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function lD(r,o){ga.M(r,o);var l=il;if(l&&r){var c=Vt(l).hoistableScripts,m=sl(r),v=c.get(m);v||(v=l.querySelector(Ns(m)),v||(r=g({src:r,async:!0,type:"module"},o),(o=hr.get(m))&&cp(r,o),v=l.createElement("script"),wt(v),mn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Pb(r,o,l,c){var m=(m=pe.current)?Gc(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(o=ll(l.href),l=Vt(m).hoistableStyles,c=l.get(o),c||(c={type:"style",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=ll(l.href);var v=Vt(m).hoistableStyles,_=v.get(r);if(_||(m=m.ownerDocument||m,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,_),(v=m.querySelector(Os(r)))&&!v._p&&(_.instance=v,_.state.loading=5),hr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},hr.set(r,l),v||sD(m,r,l,_.state))),o&&c===null)throw Error(a(528,""));return _}if(o&&c!==null)throw Error(a(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=sl(l),l=Vt(m).hoistableScripts,c=l.get(o),c||(c={type:"script",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ll(r){return'href="'+ir(r)+'"'}function Os(r){return'link[rel="stylesheet"]['+r+"]"}function zb(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function sD(r,o,l,c){r.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=r.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),mn(o,"link",l),wt(o),r.head.appendChild(o))}function sl(r){return'[src="'+ir(r)+'"]'}function Ns(r){return"script[async]"+r}function Fb(r,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var c=r.querySelector('style[data-href~="'+ir(l.href)+'"]');if(c)return o.instance=c,wt(c),c;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),wt(c),mn(c,"style",m),qc(c,l.precedence,r),o.instance=c;case"stylesheet":m=ll(l.href);var v=r.querySelector(Os(m));if(v)return o.state.loading|=4,o.instance=v,wt(v),v;c=zb(l),(m=hr.get(m))&&up(c,m),v=(r.ownerDocument||r).createElement("link"),wt(v);var _=v;return _._p=new Promise(function(A,L){_.onload=A,_.onerror=L}),mn(v,"link",c),o.state.loading|=4,qc(v,l.precedence,r),o.instance=v;case"script":return v=sl(l.src),(m=r.querySelector(Ns(v)))?(o.instance=m,wt(m),m):(c=l,(m=hr.get(v))&&(c=g({},l),cp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),wt(m),mn(m,"link",c),r.head.appendChild(m),o.instance=m);case"void":return null;default:throw Error(a(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,qc(c,l.precedence,r));return o.instance}function qc(r,o,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,_=0;_<c.length;_++){var A=c[_];if(A.dataset.precedence===o)v=A;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(r,o.firstChild))}function up(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.title==null&&(r.title=o.title)}function cp(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.integrity==null&&(r.integrity=o.integrity)}var Zc=null;function Ub(r,o,l){if(Zc===null){var c=new Map,m=Zc=new Map;m.set(l,c)}else m=Zc,c=m.get(l),c||(c=new Map,m.set(l,c));if(c.has(r))return c;for(c.set(r,null),l=l.getElementsByTagName(r),m=0;m<l.length;m++){var v=l[m];if(!(v[Ye]||v[he]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var _=v.getAttribute(o)||"";_=r+_;var A=c.get(_);A?A.push(v):c.set(_,[v])}}return c}function Ib(r,o,l){r=r.ownerDocument||r,r.head.insertBefore(l,o==="title"?r.querySelector("head > title"):null)}function uD(r,o,l){if(l===1||o.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return r=o.disabled,typeof o.precedence=="string"&&r==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Vb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}var js=null;function cD(){}function dD(r,o,l){if(js===null)throw Error(a(475));var c=js;if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var m=ll(l.href),v=r.querySelector(Os(m));if(v){r=v._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(c.count++,c=Yc.bind(c),r.then(c,c)),o.state.loading|=4,o.instance=v,wt(v);return}v=r.ownerDocument||r,l=zb(l),(m=hr.get(m))&&up(l,m),v=v.createElement("link"),wt(v);var _=v;_._p=new Promise(function(A,L){_.onload=A,_.onerror=L}),mn(v,"link",l),o.instance=v}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(o,r),(r=o.state.preload)&&(o.state.loading&3)===0&&(c.count++,o=Yc.bind(c),r.addEventListener("load",o),r.addEventListener("error",o))}}function fD(){if(js===null)throw Error(a(475));var r=js;return r.stylesheets&&r.count===0&&dp(r,r.stylesheets),0<r.count?function(o){var l=setTimeout(function(){if(r.stylesheets&&dp(r,r.stylesheets),r.unsuspend){var c=r.unsuspend;r.unsuspend=null,c()}},6e4);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(l)}}:null}function Yc(){if(this.count--,this.count===0){if(this.stylesheets)dp(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Kc=null;function dp(r,o){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Kc=new Map,o.forEach(hD,r),Kc=null,Yc.call(r))}function hD(r,o){if(!(o.state.loading&4)){var l=Kc.get(r);if(l)var c=l.get(null);else{l=new Map,Kc.set(r,l);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var _=m[v];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),c=_)}c&&l.set(null,c)}m=o.instance,_=m.getAttribute("data-precedence"),v=l.get(_)||c,v===c&&l.set(null,m),l.set(_,m),this.count++,c=Yc.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),o.state.loading|=4}}var ks={$$typeof:D,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function mD(r,o,l,c,m,v,_,A){this.tag=1,this.containerInfo=r,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=Di(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Di(0),this.hiddenUpdates=Di(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function $b(r,o,l,c,m,v,_,A,L,K,ie,fe){return r=new mD(r,o,l,_,A,L,K,fe),o=1,v===!0&&(o|=24),v=In(3,null,null,o),r.current=v,v.stateNode=r,o=qh(),o.refCount++,r.pooledCache=o,o.refCount++,v.memoizedState={element:c,isDehydrated:l,cache:o},Qh(v),r}function Hb(r){return r?(r=Ui,r):Ui}function Bb(r,o,l,c,m,v){m=Hb(m),c.context===null?c.context=m:c.pendingContext=m,c=Ua(o),c.payload={element:l},v=v===void 0?null:v,v!==null&&(c.callback=v),l=Ia(r,c,o),l!==null&&(Gn(l,r,o),cs(l,r,o))}function Gb(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<o?l:o}}function fp(r,o){Gb(r,o),(r=r.alternate)&&Gb(r,o)}function qb(r){if(r.tag===13){var o=Fi(r,67108864);o!==null&&Gn(o,r,67108864),fp(r,67108864)}}var Qc=!0;function pD(r,o,l,c){var m=k.T;k.T=null;var v=q.p;try{q.p=2,hp(r,o,l,c)}finally{q.p=v,k.T=m}}function gD(r,o,l,c){var m=k.T;k.T=null;var v=q.p;try{q.p=8,hp(r,o,l,c)}finally{q.p=v,k.T=m}}function hp(r,o,l,c){if(Qc){var m=mp(c);if(m===null)ep(r,o,c,Xc,l),Yb(r,c);else if(yD(m,r,o,l,c))c.stopPropagation();else if(Yb(r,c),o&4&&-1<vD.indexOf(r)){for(;m!==null;){var v=yt(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var _=Er(v.pendingLanes);if(_!==0){var A=v;for(A.pendingLanes|=2,A.entangledLanes|=2;_;){var L=1<<31-Ct(_);A.entanglements[1]|=L,_&=~L}Hr(v),(Dt&6)===0&&(kc=qt()+500,As(0))}}break;case 13:A=Fi(v,2),A!==null&&Gn(A,v,2),Pc(),fp(v,2)}if(v=mp(c),v===null&&ep(r,o,c,Xc,l),v===m)break;m=v}m!==null&&c.stopPropagation()}else ep(r,o,c,null,l)}}function mp(r){return r=xh(r),pp(r)}var Xc=null;function pp(r){if(Xc=null,r=Qe(r),r!==null){var o=s(r);if(o===null)r=null;else{var l=o.tag;if(l===13){if(r=u(o),r!==null)return r;r=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null)}}return Xc=r,null}function Zb(r){switch(r){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(Ri()){case nr:return 2;case z:return 8;case Q:case ae:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var gp=!1,Ja=null,eo=null,to=null,Ls=new Map,Ps=new Map,no=[],vD="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 Yb(r,o){switch(r){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":eo=null;break;case"mouseover":case"mouseout":to=null;break;case"pointerover":case"pointerout":Ls.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ps.delete(o.pointerId)}}function zs(r,o,l,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:o,domEventName:l,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},o!==null&&(o=yt(o),o!==null&&qb(o)),r):(r.eventSystemFlags|=c,o=r.targetContainers,m!==null&&o.indexOf(m)===-1&&o.push(m),r)}function yD(r,o,l,c,m){switch(o){case"focusin":return Ja=zs(Ja,r,o,l,c,m),!0;case"dragenter":return eo=zs(eo,r,o,l,c,m),!0;case"mouseover":return to=zs(to,r,o,l,c,m),!0;case"pointerover":var v=m.pointerId;return Ls.set(v,zs(Ls.get(v)||null,r,o,l,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Ps.set(v,zs(Ps.get(v)||null,r,o,l,c,m)),!0}return!1}function Kb(r){var o=Qe(r.target);if(o!==null){var l=s(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){r.blockedOn=o,G(r.priority,function(){if(l.tag===13){var c=Bn();c=Hl(c);var m=Fi(l,c);m!==null&&Gn(m,l,c),fp(l,c)}});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Wc(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var l=mp(r.nativeEvent);if(l===null){l=r.nativeEvent;var c=new l.constructor(l.type,l);yh=c,l.target.dispatchEvent(c),yh=null}else return o=yt(l),o!==null&&qb(o),r.blockedOn=l,!1;o.shift()}return!0}function Qb(r,o,l){Wc(r)&&l.delete(o)}function xD(){gp=!1,Ja!==null&&Wc(Ja)&&(Ja=null),eo!==null&&Wc(eo)&&(eo=null),to!==null&&Wc(to)&&(to=null),Ls.forEach(Qb),Ps.forEach(Qb)}function Jc(r,o){r.blockedOn===o&&(r.blockedOn=null,gp||(gp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xD)))}var ed=null;function Xb(r){ed!==r&&(ed=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ed===r&&(ed=null);for(var o=0;o<r.length;o+=3){var l=r[o],c=r[o+1],m=r[o+2];if(typeof c!="function"){if(pp(c||l)===null)continue;break}var v=yt(l);v!==null&&(r.splice(o,3),o-=3,pm(v,{pending:!0,data:m,method:l.method,action:c},c,m))}}))}function Fs(r){function o(L){return Jc(L,r)}Ja!==null&&Jc(Ja,r),eo!==null&&Jc(eo,r),to!==null&&Jc(to,r),Ls.forEach(o),Ps.forEach(o);for(var l=0;l<no.length;l++){var c=no[l];c.blockedOn===r&&(c.blockedOn=null)}for(;0<no.length&&(l=no[0],l.blockedOn===null);)Kb(l),l.blockedOn===null&&no.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var m=l[c],v=l[c+1],_=m[be]||null;if(typeof v=="function")_||Xb(l);else if(_){var A=null;if(v&&v.hasAttribute("formAction")){if(m=v,_=v[be]||null)A=_.formAction;else if(pp(m)!==null)continue}else A=_.action;typeof A=="function"?l[c+1]=A:(l.splice(c,3),c-=3),Xb(l)}}}function vp(r){this._internalRoot=r}td.prototype.render=vp.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(a(409));var l=o.current,c=Bn();Bb(l,c,r,o,null,null)},td.prototype.unmount=vp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Bb(r.current,2,null,r,null,null),Pc(),o[Pe]=null}};function td(r){this._internalRoot=r}td.prototype.unstable_scheduleHydration=function(r){if(r){var o=F();r={blockedOn:null,target:r,priority:o};for(var l=0;l<no.length&&o!==0&&o<no[l].priority;l++);no.splice(l,0,r),l===0&&Kb(r)}};var Wb=t.version;if(Wb!=="19.1.0")throw Error(a(527,Wb,"19.1.0"));q.findDOMNode=function(r){var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(o),r=r!==null?h(r):null,r=r===null?null:r.stateNode,r};var bD={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{Ae=nd.inject(bD),$e=nd}catch{}}return Is.createRoot=function(r,o){if(!i(r))throw Error(a(299));var l=!1,c="",m=mx,v=px,_=gx,A=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(m=o.onUncaughtError),o.onCaughtError!==void 0&&(v=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(A=o.unstable_transitionCallbacks)),o=$b(r,1,!1,null,null,l,c,m,v,_,A,null),r[Pe]=o.current,Jm(r),new vp(o)},Is.hydrateRoot=function(r,o,l){if(!i(r))throw Error(a(299));var c=!1,m="",v=mx,_=px,A=gx,L=null,K=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(L=l.unstable_transitionCallbacks),l.formState!==void 0&&(K=l.formState)),o=$b(r,1,!0,o,l??null,c,m,v,_,A,L,K),o.context=Hb(null),l=o.current,c=Bn(),c=Hl(c),m=Ua(c),m.callback=null,Ia(l,m,c),l=c,o.current.lanes=l,ko(o,l),Hr(o),r[Pe]=o.current,Jm(r),new td(o)},Is.version="19.1.0",Is}var uS;function ND(){if(uS)return bp.exports;uS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bp.exports=OD(),bp.exports}var jD=ND(),Vs={},cS;function kD(){if(cS)return Vs;cS=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.parse=u,Vs.serialize=h;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const x=function(){};return x.prototype=Object.create(null),x})();function u(x,S){const w=new s,E=x.length;if(E<2)return w;const C=(S==null?void 0:S.decode)||g;let R=0;do{const T=x.indexOf("=",R);if(T===-1)break;const D=x.indexOf(";",R),j=D===-1?E:D;if(T>j){R=x.lastIndexOf(";",T-1)+1;continue}const O=d(x,R,T),M=f(x,T,O),I=x.slice(O,M);if(w[I]===void 0){let Z=d(x,T+1,j),ee=f(x,j,Z);const se=C(x.slice(Z,ee));w[I]=se}R=j+1}while(R<E);return w}function d(x,S,w){do{const E=x.charCodeAt(S);if(E!==32&&E!==9)return S}while(++S<w);return w}function f(x,S,w){for(;S>w;){const E=x.charCodeAt(--S);if(E!==32&&E!==9)return S+1}return w}function h(x,S,w){const E=(w==null?void 0:w.encode)||encodeURIComponent;if(!e.test(x))throw new TypeError(`argument name is invalid: ${x}`);const C=E(S);if(!t.test(C))throw new TypeError(`argument val is invalid: ${S}`);let R=x+"="+C;if(!w)return R;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);R+="; Max-Age="+w.maxAge}if(w.domain){if(!n.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);R+="; Domain="+w.domain}if(w.path){if(!a.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);R+="; Path="+w.path}if(w.expires){if(!b(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);R+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(R+="; HttpOnly"),w.secure&&(R+="; Secure"),w.partitioned&&(R+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":R+="; Priority=Low";break;case"medium":R+="; Priority=Medium";break;case"high":R+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":R+="; SameSite=Strict";break;case"lax":R+="; SameSite=Lax";break;case"none":R+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return R}function g(x){if(x.indexOf("%")===-1)return x;try{return decodeURIComponent(x)}catch{return x}}function b(x){return i.call(x)==="[object Date]"}return Vs}kD();/**
50
- * react-router v7.6.2
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var gE=e=>{throw TypeError(e)},LD=(e,t,n)=>t.has(e)||gE("Cannot "+n),_p=(e,t,n)=>(LD(e,t,"read from private field"),n?n.call(e):t.get(e)),PD=(e,t,n)=>t.has(e)?gE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),dS="popstate";function zD(e={}){function t(a,i){let{pathname:s,search:u,hash:d}=a.location;return cu("",{pathname:s,search:u,hash:d},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(a,i){return typeof i=="string"?i:yo(i)}return UD(t,n,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function FD(){return Math.random().toString(36).substring(2,10)}function fS(e,t){return{usr:e.state,key:e.key,idx:t}}function cu(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ro(t):t,state:n,key:t&&t.key||a||FD()}}function yo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ro(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function UD(e,t,n,a={}){let{window:i=document.defaultView,v5Compat:s=!1}=a,u=i.history,d="POP",f=null,h=g();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function g(){return(u.state||{idx:null}).idx}function b(){d="POP";let C=g(),R=C==null?null:C-h;h=C,f&&f({action:d,location:E.location,delta:R})}function x(C,R){d="PUSH";let T=cu(E.location,C,R);h=g()+1;let D=fS(T,h),j=E.createHref(T);try{u.pushState(D,"",j)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(j)}s&&f&&f({action:d,location:E.location,delta:1})}function S(C,R){d="REPLACE";let T=cu(E.location,C,R);h=g();let D=fS(T,h),j=E.createHref(T);u.replaceState(D,"",j),s&&f&&f({action:d,location:E.location,delta:0})}function w(C){return vE(C)}let E={get action(){return d},get location(){return e(i,u)},listen(C){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(dS,b),f=C,()=>{i.removeEventListener(dS,b),f=null}},createHref(C){return t(i,C)},createURL:w,encodeLocation(C){let R=w(C);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:x,replace:S,go(C){return u.go(C)}};return E}function vE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ft(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:yo(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var Ws,hS=class{constructor(e){if(PD(this,Ws,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(_p(this,Ws).has(e))return _p(this,Ws).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){_p(this,Ws).set(e,t)}};Ws=new WeakMap;var ID=new Set(["lazy","caseSensitive","path","id","index","children"]);function VD(e){return ID.has(e)}var $D=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function HD(e){return $D.has(e)}function BD(e){return e.index===!0}function kd(e,t,n=[],a={}){return e.map((i,s)=>{let u=[...n,String(s)],d=typeof i.id=="string"?i.id:u.join("-");if(ft(i.index!==!0||!i.children,"Cannot specify children on an index route"),ft(!a[d],`Found a route id collision on id "${d}". Route id's must be globally unique within Data Router usages`),BD(i)){let f={...i,...t(i),id:d};return a[d]=f,f}else{let f={...i,...t(i),id:d,children:void 0};return a[d]=f,i.children&&(f.children=kd(i.children,t,u,a)),f}})}function so(e,t,n="/"){return wd(e,t,n,!1)}function wd(e,t,n,a){let i=typeof t=="string"?Ro(t):t,s=gr(i.pathname||"/",n);if(s==null)return null;let u=yE(e);qD(u);let d=null;for(let f=0;d==null&&f<u.length;++f){let h=rM(s);d=tM(u[f],h,a)}return d}function GD(e,t){let{route:n,pathname:a,params:i}=e;return{id:n.id,pathname:a,params:i,data:t[n.id],handle:n.handle}}function yE(e,t=[],n=[],a=""){let i=(s,u,d)=>{let f={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};f.relativePath.startsWith("/")&&(ft(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length));let h=Yr([a,f.relativePath]),g=n.concat(f);s.children&&s.children.length>0&&(ft(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),yE(s.children,t,g,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:JD(h,s.index),routesMeta:g})};return e.forEach((s,u)=>{var d;if(s.path===""||!((d=s.path)!=null&&d.includes("?")))i(s,u);else for(let f of xE(s.path))i(s,u,f)}),t}function xE(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(a.length===0)return i?[s,""]:[s];let u=xE(a.join("/")),d=[];return d.push(...u.map(f=>f===""?s:[s,f].join("/"))),i&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function qD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eM(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var ZD=/^:[\w-]+$/,YD=3,KD=2,QD=1,XD=10,WD=-2,mS=e=>e==="*";function JD(e,t){let n=e.split("/"),a=n.length;return n.some(mS)&&(a+=WD),t&&(a+=KD),n.filter(i=>!mS(i)).reduce((i,s)=>i+(ZD.test(s)?YD:s===""?QD:XD),a)}function eM(e,t){return e.length===t.length&&e.slice(0,-1).every((a,i)=>a===t[i])?e[e.length-1]-t[t.length-1]:0}function tM(e,t,n=!1){let{routesMeta:a}=e,i={},s="/",u=[];for(let d=0;d<a.length;++d){let f=a[d],h=d===a.length-1,g=s==="/"?t:t.slice(s.length)||"/",b=Ld({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},g),x=f.route;if(!b&&h&&n&&!a[a.length-1].route.index&&(b=Ld({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!b)return null;Object.assign(i,b.params),u.push({params:i,pathname:Yr([s,b.pathname]),pathnameBase:iM(Yr([s,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(s=Yr([s,b.pathnameBase]))}return u}function Ld(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=nM(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],u=s.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:a.reduce((h,{paramName:g,isOptional:b},x)=>{if(g==="*"){let w=d[x]||"";u=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const S=d[x];return b&&!S?h[g]=void 0:h[g]=(S||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:u,pattern:e}}function nM(e,t=!1,n=!0){Qt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(a.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),a]}function rM(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function gr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function aM(e,t="/"){let{pathname:n,search:a="",hash:i=""}=typeof e=="string"?Ro(e):e;return{pathname:n?n.startsWith("/")?n:oM(n,t):t,search:lM(a),hash:sM(i)}}function oM(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Cp(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vf(e){let t=bE(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function yf(e,t,n,a=!1){let i;typeof e=="string"?i=Ro(e):(i={...e},ft(!i.pathname||!i.pathname.includes("?"),Cp("?","pathname","search",i)),ft(!i.pathname||!i.pathname.includes("#"),Cp("#","pathname","hash",i)),ft(!i.search||!i.search.includes("#"),Cp("#","search","hash",i)));let s=e===""||i.pathname==="",u=s?"/":i.pathname,d;if(u==null)d=n;else{let b=t.length-1;if(!a&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),b-=1;i.pathname=x.join("/")}d=b>=0?t[b]:"/"}let f=aM(i,d),h=u&&u!=="/"&&u.endsWith("/"),g=(s||u===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||g)&&(f.pathname+="/"),f}var Yr=e=>e.join("/").replace(/\/\/+/g,"/"),iM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Pd=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function du(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var SE=["POST","PUT","PATCH","DELETE"],uM=new Set(SE),cM=["GET",...SE],dM=new Set(cM),fM=new Set([301,302,303,307,308]),hM=new Set([307,308]),Rp={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$s={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),wE="remix-router-transitions",EE=Symbol("ResetLoaderData");function gM(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";ft(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],i=e.mapRouteProperties||pM,s={},u=kd(e.routes,i,void 0,s),d,f=e.basename||"/",h=e.dataStrategy||SM,g={unstable_middleware:!1,...e.future},b=null,x=new Set,S=null,w=null,E=null,C=e.hydrationData!=null,R=so(u,e.history.location,f),T=!1,D=null,j;if(R==null&&!e.patchRoutesOnNavigation){let F=mr(404,{pathname:e.history.location.pathname}),{matches:G,route:J}=RS(u);j=!0,R=G,D={[J.id]:F}}else if(R&&!e.hydrationData&&Lo(R,u,e.history.location.pathname).active&&(R=null),R)if(R.some(F=>F.route.lazy))j=!1;else if(!R.some(F=>F.route.loader))j=!0;else{let F=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null;if(G){let J=R.findIndex(he=>G[he.route.id]!==void 0);j=R.slice(0,J+1).every(he=>!cg(he.route,F,G))}else j=R.every(J=>!cg(J.route,F,G))}else{j=!1,R=[];let F=Lo(null,u,e.history.location.pathname);F.active&&F.matches&&(T=!0,R=F.matches)}let O,M={historyAction:e.history.action,location:e.history.location,matches:R,initialized:j,navigation:Rp,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},I="POP",Z=!1,ee,se=!1,ye=new Map,me=null,ve=!1,ce=!1,te=new Set,k=new Map,q=0,V=-1,re=new Map,N=new Set,H=new Map,P=new Map,B=new Set,oe=new Map,de,pe=null;function ue(){if(b=e.history.listen(({action:F,location:G,delta:J})=>{if(de){de(),de=void 0;return}Qt(oe.size===0||J!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=jo({currentLocation:M.location,nextLocation:G,historyAction:F});if(he&&J!=null){let be=new Promise(Pe=>{de=Pe});e.history.go(J*-1),rr(he,{state:"blocked",location:G,proceed(){rr(he,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),be.then(()=>e.history.go(J))},reset(){let Pe=new Map(M.blockers);Pe.set(he,$s),ke({blockers:Pe})}});return}return Pt(F,G)}),n){NM(t,ye);let F=()=>jM(t,ye);t.addEventListener("pagehide",F),me=()=>t.removeEventListener("pagehide",F)}return M.initialized||Pt("POP",M.location,{initialHydration:!0}),O}function Ce(){b&&b(),me&&me(),x.clear(),ee&&ee.abort(),M.fetchers.forEach((F,G)=>Ct(G)),M.blockers.forEach((F,G)=>Fr(G))}function Le(F){return x.add(F),()=>x.delete(F)}function ke(F,G={}){M={...M,...F};let J=[],he=[];M.fetchers.forEach((be,Pe)=>{be.state==="idle"&&(B.has(Pe)?J.push(Pe):he.push(Pe))}),B.forEach(be=>{!M.fetchers.has(be)&&!k.has(be)&&J.push(be)}),[...x].forEach(be=>be(M,{deletedFetchers:J,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),J.forEach(be=>Ct(be)),he.forEach(be=>M.fetchers.delete(be))}function Je(F,G,{flushSync:J}={}){var Ve,Ye;let he=M.actionData!=null&&M.navigation.formMethod!=null&&Zn(M.navigation.formMethod)&&M.navigation.state==="loading"&&((Ve=F.state)==null?void 0:Ve._isRedirect)!==!0,be;G.actionData?Object.keys(G.actionData).length>0?be=G.actionData:be=null:he?be=M.actionData:be=null;let Pe=G.loaderData?_S(M.loaderData,G.loaderData,G.matches||[],G.errors):M.loaderData,He=M.blockers;He.size>0&&(He=new Map(He),He.forEach((Fe,Qe)=>He.set(Qe,$s)));let De=Z===!0||M.navigation.formMethod!=null&&Zn(M.navigation.formMethod)&&((Ye=F.state)==null?void 0:Ye._isRedirect)!==!0;d&&(u=d,d=void 0),ve||I==="POP"||(I==="PUSH"?e.history.push(F,F.state):I==="REPLACE"&&e.history.replace(F,F.state));let Ie;if(I==="POP"){let Fe=ye.get(M.location.pathname);Fe&&Fe.has(F.pathname)?Ie={currentLocation:M.location,nextLocation:F}:ye.has(F.pathname)&&(Ie={currentLocation:F,nextLocation:M.location})}else if(se){let Fe=ye.get(M.location.pathname);Fe?Fe.add(F.pathname):(Fe=new Set([F.pathname]),ye.set(M.location.pathname,Fe)),Ie={currentLocation:M.location,nextLocation:F}}ke({...G,actionData:be,loaderData:Pe,historyAction:I,location:F,initialized:!0,navigation:Rp,revalidation:"idle",restoreScrollPosition:Yu(F,G.matches||M.matches),preventScrollReset:De,blockers:He},{viewTransitionOpts:Ie,flushSync:J===!0}),I="POP",Z=!1,se=!1,ve=!1,ce=!1,pe==null||pe.resolve(),pe=null}async function nt(F,G){if(typeof F=="number"){e.history.go(F);return}let J=ug(M.location,M.matches,f,F,G==null?void 0:G.fromRouteId,G==null?void 0:G.relative),{path:he,submission:be,error:Pe}=pS(!1,J,G),He=M.location,De=cu(M.location,he,G&&G.state);De={...De,...e.history.encodeLocation(De)};let Ie=G&&G.replace!=null?G.replace:void 0,Ve="PUSH";Ie===!0?Ve="REPLACE":Ie===!1||be!=null&&Zn(be.formMethod)&&be.formAction===M.location.pathname+M.location.search&&(Ve="REPLACE");let Ye=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,Fe=(G&&G.flushSync)===!0,Qe=jo({currentLocation:He,nextLocation:De,historyAction:Ve});if(Qe){rr(Qe,{state:"blocked",location:De,proceed(){rr(Qe,{state:"proceeding",proceed:void 0,reset:void 0,location:De}),nt(F,G)},reset(){let yt=new Map(M.blockers);yt.set(Qe,$s),ke({blockers:yt})}});return}await Pt(Ve,De,{submission:be,pendingError:Pe,preventScrollReset:Ye,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:Fe})}function Gt(){pe||(pe=kM()),xe(),ke({revalidation:"loading"});let F=pe.promise;return M.navigation.state==="submitting"?F:M.navigation.state==="idle"?(Pt(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),F):(Pt(I||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:se===!0}),F)}async function Pt(F,G,J){ee&&ee.abort(),ee=null,I=F,ve=(J&&J.startUninterruptedRevalidation)===!0,ko(M.location,M.matches),Z=(J&&J.preventScrollReset)===!0,se=(J&&J.enableViewTransition)===!0;let he=d||u,be=J&&J.overrideNavigation,Pe=J!=null&&J.initialHydration&&M.matches&&M.matches.length>0&&!T?M.matches:so(he,G,f),He=(J&&J.flushSync)===!0;if(Pe&&M.initialized&&!ce&&AM(M.location,G)&&!(J&&J.submission&&Zn(J.submission.formMethod))){Je(G,{matches:Pe},{flushSync:He});return}let De=Lo(Pe,he,G.pathname);if(De.active&&De.matches&&(Pe=De.matches),!Pe){let{error:Vt,notFoundMatches:wt,route:pt}=Ti(G.pathname);Je(G,{matches:wt,loaderData:{},errors:{[pt.id]:Vt}},{flushSync:He});return}ee=new AbortController;let Ie=ml(e.history,G,ee.signal,J&&J.submission),Ve=new hS(e.unstable_getContext?await e.unstable_getContext():void 0),Ye;if(J&&J.pendingError)Ye=[ti(Pe).route.id,{type:"error",error:J.pendingError}];else if(J&&J.submission&&Zn(J.submission.formMethod)){let Vt=await tr(Ie,G,J.submission,Pe,Ve,De.active,J&&J.initialHydration===!0,{replace:J.replace,flushSync:He});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[wt,pt]=Vt.pendingActionResult;if(qn(pt)&&du(pt.error)&&pt.error.status===404){ee=null,Je(G,{matches:Vt.matches,loaderData:{},errors:{[wt]:pt.error}});return}}Pe=Vt.matches||Pe,Ye=Vt.pendingActionResult,be=Ap(G,J.submission),He=!1,De.active=!1,Ie=ml(e.history,Ie.url,Ie.signal)}let{shortCircuited:Fe,matches:Qe,loaderData:yt,errors:zt}=await br(Ie,G,Pe,Ve,De.active,be,J&&J.submission,J&&J.fetcherSubmission,J&&J.replace,J&&J.initialHydration===!0,He,Ye);Fe||(ee=null,Je(G,{matches:Qe||Pe,...CS(Ye),loaderData:yt,errors:zt}))}async function tr(F,G,J,he,be,Pe,He,De={}){xe();let Ie=MM(G,J);if(ke({navigation:Ie},{flushSync:De.flushSync===!0}),Pe){let Fe=await Po(he,G.pathname,F.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let Qe=ti(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,pendingActionResult:[Qe,{type:"error",error:Fe.error}]}}else if(Fe.matches)he=Fe.matches;else{let{notFoundMatches:Qe,error:yt,route:zt}=Ti(G.pathname);return{matches:Qe,pendingActionResult:[zt.id,{type:"error",error:yt}]}}}let Ve,Ye=Js(he,G);if(!Ye.route.action&&!Ye.route.lazy)Ve={type:"error",error:mr(405,{method:F.method,pathname:G.pathname,routeId:Ye.route.id})};else{let Fe=xl(i,s,F,he,Ye,He?[]:a,be),Qe=await Ee(F,Fe,be,null);if(Ve=Qe[Ye.route.id],!Ve){for(let yt of he)if(Qe[yt.route.id]){Ve=Qe[yt.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(ni(Ve)){let Fe;return De&&De.replace!=null?Fe=De.replace:Fe=SS(Ve.response.headers.get("Location"),new URL(F.url),f)===M.location.pathname+M.location.search,await ae(F,Ve,!0,{submission:J,replace:Fe}),{shortCircuited:!0}}if(qn(Ve)){let Fe=ti(he,Ye.route.id);return(De&&De.replace)!==!0&&(I="PUSH"),{matches:he,pendingActionResult:[Fe.route.id,Ve,Ye.route.id]}}return{matches:he,pendingActionResult:[Ye.route.id,Ve]}}async function br(F,G,J,he,be,Pe,He,De,Ie,Ve,Ye,Fe){let Qe=Pe||Ap(G,He),yt=He||De||TS(Qe),zt=!ve&&!Ve;if(be){if(zt){let vn=qt(Fe);ke({navigation:Qe,...vn!==void 0?{actionData:vn}:{}},{flushSync:Ye})}let ct=await Po(J,G.pathname,F.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){let vn=ti(ct.partialMatches).route.id;return{matches:ct.partialMatches,loaderData:{},errors:{[vn]:ct.error}}}else if(ct.matches)J=ct.matches;else{let{error:vn,notFoundMatches:_r,route:Cr}=Ti(G.pathname);return{matches:_r,loaderData:{},errors:{[Cr.id]:vn}}}}let Vt=d||u,{dsMatches:wt,revalidatingFetchers:pt}=gS(F,he,i,s,e.history,M,J,yt,G,Ve?[]:a,Ve===!0,ce,te,B,H,N,Vt,f,e.patchRoutesOnNavigation!=null,Fe);if(V=++q,!e.dataStrategy&&!wt.some(ct=>ct.shouldLoad)&&pt.length===0){let ct=Sr();return Je(G,{matches:J,loaderData:{},errors:Fe&&qn(Fe[1])?{[Fe[0]]:Fe[1].error}:null,...CS(Fe),...ct?{fetchers:new Map(M.fetchers)}:{}},{flushSync:Ye}),{shortCircuited:!0}}if(zt){let ct={};if(!be){ct.navigation=Qe;let vn=qt(Fe);vn!==void 0&&(ct.actionData=vn)}pt.length>0&&(ct.fetchers=Ri(pt)),ke(ct,{flushSync:Ye})}pt.forEach(ct=>{nn(ct.key),ct.controller&&k.set(ct.key,ct.controller)});let Na=()=>pt.forEach(ct=>nn(ct.key));ee&&ee.signal.addEventListener("abort",Na);let{loaderResults:_n,fetcherResults:ar}=await we(wt,pt,F,he);if(F.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",Na),pt.forEach(ct=>k.delete(ct.key));let Tn=rd(_n);if(Tn)return await ae(F,Tn.result,!0,{replace:Ie}),{shortCircuited:!0};if(Tn=rd(ar),Tn)return N.add(Tn.key),await ae(F,Tn.result,!0,{replace:Ie}),{shortCircuited:!0};let{loaderData:ja,errors:ka}=ES(M,J,_n,Fe,pt,ar);Ve&&M.errors&&(ka={...M.errors,...ka});let Gl=Sr(),or=wr(V),na=Gl||or||pt.length>0;return{matches:J,loaderData:ja,errors:ka,...na?{fetchers:new Map(M.fetchers)}:{}}}function qt(F){if(F&&!qn(F[1]))return{[F[0]]:F[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Ri(F){return F.forEach(G=>{let J=M.fetchers.get(G.key),he=Hs(void 0,J?J.data:void 0);M.fetchers.set(G.key,he)}),new Map(M.fetchers)}async function nr(F,G,J,he){nn(F);let be=(he&&he.flushSync)===!0,Pe=d||u,He=ug(M.location,M.matches,f,J,G,he==null?void 0:he.relative),De=so(Pe,He,f),Ie=Lo(De,Pe,He);if(Ie.active&&Ie.matches&&(De=Ie.matches),!De){$e(F,G,mr(404,{pathname:He}),{flushSync:be});return}let{path:Ve,submission:Ye,error:Fe}=pS(!0,He,he);if(Fe){$e(F,G,Fe,{flushSync:be});return}let Qe=Js(De,Ve),yt=new hS(e.unstable_getContext?await e.unstable_getContext():void 0),zt=(he&&he.preventScrollReset)===!0;if(Ye&&Zn(Ye.formMethod)){await z(F,G,Ve,Qe,De,yt,Ie.active,be,zt,Ye);return}H.set(F,{routeId:G,path:Ve}),await Q(F,G,Ve,Qe,De,yt,Ie.active,be,zt,Ye)}async function z(F,G,J,he,be,Pe,He,De,Ie,Ve){xe(),H.delete(F);function Ye(Ut){if(!Ut.route.action&&!Ut.route.lazy){let La=mr(405,{method:Ve.formMethod,pathname:J,routeId:G});return $e(F,G,La,{flushSync:De}),!0}return!1}if(!He&&Ye(he))return;let Fe=M.fetchers.get(F);Ae(F,OM(Ve,Fe),{flushSync:De});let Qe=new AbortController,yt=ml(e.history,J,Qe.signal,Ve);if(He){let Ut=await Po(be,J,yt.signal,F);if(Ut.type==="aborted")return;if(Ut.type==="error"){$e(F,G,Ut.error,{flushSync:De});return}else if(Ut.matches){if(be=Ut.matches,he=Js(be,J),Ye(he))return}else{$e(F,G,mr(404,{pathname:J}),{flushSync:De});return}}k.set(F,Qe);let zt=q,Vt=xl(i,s,yt,be,he,a,Pe),pt=(await Ee(yt,Vt,Pe,F))[he.route.id];if(yt.signal.aborted){k.get(F)===Qe&&k.delete(F);return}if(B.has(F)){if(ni(pt)||qn(pt)){Ae(F,oo(void 0));return}}else{if(ni(pt))if(k.delete(F),V>zt){Ae(F,oo(void 0));return}else return N.add(F),Ae(F,Hs(Ve)),ae(yt,pt,!1,{fetcherSubmission:Ve,preventScrollReset:Ie});if(qn(pt)){$e(F,G,pt.error);return}}let Na=M.navigation.location||M.location,_n=ml(e.history,Na,Qe.signal),ar=d||u,Tn=M.navigation.state!=="idle"?so(ar,M.navigation.location,f):M.matches;ft(Tn,"Didn't find any matches after fetcher action");let ja=++q;re.set(F,ja);let ka=Hs(Ve,pt.data);M.fetchers.set(F,ka);let{dsMatches:Gl,revalidatingFetchers:or}=gS(_n,Pe,i,s,e.history,M,Tn,Ve,Na,a,!1,ce,te,B,H,N,ar,f,e.patchRoutesOnNavigation!=null,[he.route.id,pt]);or.filter(Ut=>Ut.key!==F).forEach(Ut=>{let La=Ut.key,ql=M.fetchers.get(La),Dn=Hs(void 0,ql?ql.data:void 0);M.fetchers.set(La,Dn),nn(La),Ut.controller&&k.set(La,Ut.controller)}),ke({fetchers:new Map(M.fetchers)});let na=()=>or.forEach(Ut=>nn(Ut.key));Qe.signal.addEventListener("abort",na);let{loaderResults:ct,fetcherResults:vn}=await we(Gl,or,_n,Pe);if(Qe.signal.aborted)return;if(Qe.signal.removeEventListener("abort",na),re.delete(F),k.delete(F),or.forEach(Ut=>k.delete(Ut.key)),M.fetchers.has(F)){let Ut=oo(pt.data);M.fetchers.set(F,Ut)}let _r=rd(ct);if(_r)return ae(_n,_r.result,!1,{preventScrollReset:Ie});if(_r=rd(vn),_r)return N.add(_r.key),ae(_n,_r.result,!1,{preventScrollReset:Ie});let{loaderData:Cr,errors:zo}=ES(M,Tn,ct,void 0,or,vn);wr(ja),M.navigation.state==="loading"&&ja>V?(ft(I,"Expected pending action"),ee&&ee.abort(),Je(M.navigation.location,{matches:Tn,loaderData:Cr,errors:zo,fetchers:new Map(M.fetchers)})):(ke({errors:zo,loaderData:_S(M.loaderData,Cr,Tn,zo),fetchers:new Map(M.fetchers)}),ce=!1)}async function Q(F,G,J,he,be,Pe,He,De,Ie,Ve){let Ye=M.fetchers.get(F);Ae(F,Hs(Ve,Ye?Ye.data:void 0),{flushSync:De});let Fe=new AbortController,Qe=ml(e.history,J,Fe.signal);if(He){let pt=await Po(be,J,Qe.signal,F);if(pt.type==="aborted")return;if(pt.type==="error"){$e(F,G,pt.error,{flushSync:De});return}else if(pt.matches)be=pt.matches,he=Js(be,J);else{$e(F,G,mr(404,{pathname:J}),{flushSync:De});return}}k.set(F,Fe);let yt=q,zt=xl(i,s,Qe,be,he,a,Pe),wt=(await Ee(Qe,zt,Pe,F))[he.route.id];if(k.get(F)===Fe&&k.delete(F),!Qe.signal.aborted){if(B.has(F)){Ae(F,oo(void 0));return}if(ni(wt))if(V>yt){Ae(F,oo(void 0));return}else{N.add(F),await ae(Qe,wt,!1,{preventScrollReset:Ie});return}if(qn(wt)){$e(F,G,wt.error);return}Ae(F,oo(wt.data))}}async function ae(F,G,J,{submission:he,fetcherSubmission:be,preventScrollReset:Pe,replace:He}={}){G.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let De=G.response.headers.get("Location");ft(De,"Expected a Location header on the redirect Response"),De=SS(De,new URL(F.url),f);let Ie=cu(M.location,De,{_isRedirect:!0});if(n){let zt=!1;if(G.response.headers.has("X-Remix-Reload-Document"))zt=!0;else if(nv.test(De)){const Vt=vE(De,!0);zt=Vt.origin!==t.location.origin||gr(Vt.pathname,f)==null}if(zt){He?t.location.replace(De):t.location.assign(De);return}}ee=null;let Ve=He===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ye,formAction:Fe,formEncType:Qe}=M.navigation;!he&&!be&&Ye&&Fe&&Qe&&(he=TS(M.navigation));let yt=he||be;if(hM.has(G.response.status)&&yt&&Zn(yt.formMethod))await Pt(Ve,Ie,{submission:{...yt,formAction:De},preventScrollReset:Pe||Z,enableViewTransition:J?se:void 0});else{let zt=Ap(Ie,he);await Pt(Ve,Ie,{overrideNavigation:zt,fetcherSubmission:be,preventScrollReset:Pe||Z,enableViewTransition:J?se:void 0})}}async function Ee(F,G,J,he){let be,Pe={};try{be=await wM(h,F,G,he,J,!1)}catch(He){return G.filter(De=>De.shouldLoad).forEach(De=>{Pe[De.route.id]={type:"error",error:He}}),Pe}if(F.signal.aborted)return Pe;for(let[He,De]of Object.entries(be))if(TM(De)){let Ie=De.result;Pe[He]={type:"redirect",response:CM(Ie,F,He,G,f)}}else Pe[He]=await _M(De);return Pe}async function we(F,G,J,he){let be=Ee(J,F,he,null),Pe=Promise.all(G.map(async Ie=>{if(Ie.matches&&Ie.match&&Ie.request&&Ie.controller){let Ye=(await Ee(Ie.request,Ie.matches,he,Ie.key))[Ie.match.route.id];return{[Ie.key]:Ye}}else return Promise.resolve({[Ie.key]:{type:"error",error:mr(404,{pathname:Ie.path})}})})),He=await be,De=(await Pe).reduce((Ie,Ve)=>Object.assign(Ie,Ve),{});return{loaderResults:He,fetcherResults:De}}function xe(){ce=!0,H.forEach((F,G)=>{k.has(G)&&te.add(G),nn(G)})}function Ae(F,G,J={}){M.fetchers.set(F,G),ke({fetchers:new Map(M.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function $e(F,G,J,he={}){let be=ti(M.matches,G);Ct(F),ke({errors:{[be.route.id]:J},fetchers:new Map(M.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function ut(F){return P.set(F,(P.get(F)||0)+1),B.has(F)&&B.delete(F),M.fetchers.get(F)||mM}function Ct(F){let G=M.fetchers.get(F);k.has(F)&&!(G&&G.state==="loading"&&re.has(F))&&nn(F),H.delete(F),re.delete(F),N.delete(F),B.delete(F),te.delete(F),M.fetchers.delete(F)}function Oa(F){let G=(P.get(F)||0)-1;G<=0?(P.delete(F),B.add(F)):P.set(F,G),ke({fetchers:new Map(M.fetchers)})}function nn(F){let G=k.get(F);G&&(G.abort(),k.delete(F))}function Ai(F){for(let G of F){let J=ut(G),he=oo(J.data);M.fetchers.set(G,he)}}function Sr(){let F=[],G=!1;for(let J of N){let he=M.fetchers.get(J);ft(he,`Expected fetcher: ${J}`),he.state==="loading"&&(N.delete(J),F.push(J),G=!0)}return Ai(F),G}function wr(F){let G=[];for(let[J,he]of re)if(he<F){let be=M.fetchers.get(J);ft(be,`Expected fetcher: ${J}`),be.state==="loading"&&(nn(J),re.delete(J),G.push(J))}return Ai(G),G.length>0}function Er(F,G){let J=M.blockers.get(F)||$s;return oe.get(F)!==G&&oe.set(F,G),J}function Fr(F){M.blockers.delete(F),oe.delete(F)}function rr(F,G){let J=M.blockers.get(F)||$s;ft(J.state==="unblocked"&&G.state==="blocked"||J.state==="blocked"&&G.state==="blocked"||J.state==="blocked"&&G.state==="proceeding"||J.state==="blocked"&&G.state==="unblocked"||J.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${J.state} -> ${G.state}`);let he=new Map(M.blockers);he.set(F,G),ke({blockers:he})}function jo({currentLocation:F,nextLocation:G,historyAction:J}){if(oe.size===0)return;oe.size>1&&Qt(!1,"A router only supports one blocker at a time");let he=Array.from(oe.entries()),[be,Pe]=he[he.length-1],He=M.blockers.get(be);if(!(He&&He.state==="proceeding")&&Pe({currentLocation:F,nextLocation:G,historyAction:J}))return be}function Ti(F){let G=mr(404,{pathname:F}),J=d||u,{matches:he,route:be}=RS(J);return{notFoundMatches:he,route:be,error:G}}function Zu(F,G,J){if(S=F,E=G,w=J||null,!C&&M.navigation===Rp){C=!0;let he=Yu(M.location,M.matches);he!=null&&ke({restoreScrollPosition:he})}return()=>{S=null,E=null,w=null}}function Di(F,G){return w&&w(F,G.map(he=>GD(he,M.loaderData)))||F.key}function ko(F,G){if(S&&E){let J=Di(F,G);S[J]=E()}}function Yu(F,G){if(S){let J=Di(F,G),he=S[J];if(typeof he=="number")return he}return null}function Lo(F,G,J){if(e.patchRoutesOnNavigation)if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:wd(G,J,f,!0)}}else return{active:!0,matches:wd(G,J,f,!0)||[]};return{active:!1,matches:null}}async function Po(F,G,J,he){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let be=F;for(;;){let Pe=d==null,He=d||u,De=s;try{await e.patchRoutesOnNavigation({signal:J,path:G,matches:be,fetcherKey:he,patch:(Ye,Fe)=>{J.aborted||vS(Ye,Fe,He,De,i)}})}catch(Ye){return{type:"error",error:Ye,partialMatches:be}}finally{Pe&&!J.aborted&&(u=[...u])}if(J.aborted)return{type:"aborted"};let Ie=so(He,G,f);if(Ie)return{type:"success",matches:Ie};let Ve=wd(He,G,f,!0);if(!Ve||be.length===Ve.length&&be.every((Ye,Fe)=>Ye.route.id===Ve[Fe].route.id))return{type:"success",matches:null};be=Ve}}function Hl(F){s={},d=kd(F,i,void 0,s)}function Bl(F,G){let J=d==null;vS(F,G,d||u,s,i),J&&(u=[...u],ke({}))}return O={get basename(){return f},get future(){return g},get state(){return M},get routes(){return u},get window(){return t},initialize:ue,subscribe:Le,enableScrollRestoration:Zu,navigate:nt,fetch:nr,revalidate:Gt,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:ut,deleteFetcher:Oa,dispose:Ce,getBlocker:Er,deleteBlocker:Fr,patchRoutes:Bl,_internalFetchControllers:k,_internalSetRoutes:Hl},O}function vM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ug(e,t,n,a,i,s){let u,d;if(i){u=[];for(let h of t)if(u.push(h),h.route.id===i){d=h;break}}else u=t,d=t[t.length-1];let f=yf(a||".",vf(u),gr(e.pathname,n)||e.pathname,s==="path");if(a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&d){let h=rv(f.search);if(d.route.index&&!h)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let g=new URLSearchParams(f.search),b=g.getAll("index");g.delete("index"),b.filter(S=>S).forEach(S=>g.append("index",S));let x=g.toString();f.search=x?`?${x}`:""}}return n!=="/"&&(f.pathname=f.pathname==="/"?n:Yr([n,f.pathname])),yo(f)}function pS(e,t,n){if(!n||!vM(n))return{path:t};if(n.formMethod&&!DM(n.formMethod))return{path:t,error:mr(405,{method:n.formMethod})};let a=()=>({path:t,error:mr(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),u=DE(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Zn(s))return a();let b=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((x,[S,w])=>`${x}${S}=${w}
59
- `,""):String(n.body);return{path:t,submission:{formMethod:s,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:b}}}else if(n.formEncType==="application/json"){if(!Zn(s))return a();try{let b=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:s,formAction:u,formEncType:n.formEncType,formData:void 0,json:b,text:void 0}}}catch{return a()}}}ft(typeof FormData=="function","FormData is not available in this environment");let d,f;if(n.formData)d=fg(n.formData),f=n.formData;else if(n.body instanceof FormData)d=fg(n.body),f=n.body;else if(n.body instanceof URLSearchParams)d=n.body,f=wS(d);else if(n.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(n.body),f=wS(d)}catch{return a()}let h={formMethod:s,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Zn(h.formMethod))return{path:t,submission:h};let g=Ro(t);return e&&g.search&&rv(g.search)&&d.append("index",""),g.search=`?${d}`,{path:yo(g),submission:h}}function gS(e,t,n,a,i,s,u,d,f,h,g,b,x,S,w,E,C,R,T,D){var ve;let j=D?qn(D[1])?D[1].error:D[1].data:void 0,O=i.createURL(s.location),M=i.createURL(f),I;if(g&&s.errors){let ce=Object.keys(s.errors)[0];I=u.findIndex(te=>te.route.id===ce)}else if(D&&qn(D[1])){let ce=D[0];I=u.findIndex(te=>te.route.id===ce)-1}let Z=D?D[1].statusCode:void 0,ee=Z&&Z>=400,se={currentUrl:O,currentParams:((ve=s.matches[0])==null?void 0:ve.params)||{},nextUrl:M,nextParams:u[0].params,...d,actionResult:j,actionStatus:Z},ye=u.map((ce,te)=>{let{route:k}=ce,q=null;if(I!=null&&te>I?q=!1:k.lazy?q=!0:k.loader==null?q=!1:g?q=cg(k,s.loaderData,s.errors):yM(s.loaderData,s.matches[te],ce)&&(q=!0),q!==null)return dg(n,a,e,ce,h,t,q);let V=ee?!1:b||O.pathname+O.search===M.pathname+M.search||O.search!==M.search||xM(s.matches[te],ce),re={...se,defaultShouldRevalidate:V},N=zd(ce,re);return dg(n,a,e,ce,h,t,N,re)}),me=[];return w.forEach((ce,te)=>{if(g||!u.some(B=>B.route.id===ce.routeId)||S.has(te))return;let k=s.fetchers.get(te),q=k&&k.state!=="idle"&&k.data===void 0,V=so(C,ce.path,R);if(!V){if(T&&q)return;me.push({key:te,routeId:ce.routeId,path:ce.path,matches:null,match:null,request:null,controller:null});return}if(E.has(te))return;let re=Js(V,ce.path),N=new AbortController,H=ml(i,ce.path,N.signal),P=null;if(x.has(te))x.delete(te),P=xl(n,a,H,V,re,h,t);else if(q)b&&(P=xl(n,a,H,V,re,h,t));else{let B={...se,defaultShouldRevalidate:ee?!1:b};zd(re,B)&&(P=xl(n,a,H,V,re,h,t,B))}P&&me.push({key:te,routeId:ce.routeId,path:ce.path,matches:P,match:re,request:H,controller:N})}),{dsMatches:ye,revalidatingFetchers:me}}function cg(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let a=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!a&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!i}function yM(e,t,n){let a=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return a||i}function xM(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function zd(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function vS(e,t,n,a,i){let s;if(e){let f=a[e];ft(f,`No route found to patch children into: routeId = ${e}`),f.children||(f.children=[]),s=f.children}else s=n;let u=t.filter(f=>!s.some(h=>_E(f,h))),d=kd(u,i,[e||"_","patch",String((s==null?void 0:s.length)||"0")],a);s.push(...d)}function _E(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,a)=>{var i;return(i=t.children)==null?void 0:i.some(s=>_E(n,s))}):!1}var yS=new WeakMap,CE=({key:e,route:t,manifest:n,mapRouteProperties:a})=>{let i=n[t.id];if(ft(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let s=i.lazy[e];if(!s)return;let u=yS.get(i);u||(u={},yS.set(i,u));let d=u[e];if(d)return d;let f=(async()=>{let h=VD(e),b=i[e]!==void 0&&e!=="hasErrorBoundary";if(h)Qt(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(b)Qt(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await s();x!=null&&(Object.assign(i,{[e]:x}),Object.assign(i,a(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(x=>x===void 0)&&(i.lazy=void 0))})();return u[e]=f,f},xS=new WeakMap;function bM(e,t,n,a,i){let s=n[e.id];if(ft(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=xS.get(s);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let b=(async()=>{ft(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),S={};for(let w in x){let E=x[w];if(E===void 0)continue;let C=HD(w),T=s[w]!==void 0&&w!=="hasErrorBoundary";C?Qt(!C,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?Qt(!T,`Route "${s.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=E}Object.assign(s,S),Object.assign(s,{...a(s),lazy:void 0})})();return xS.set(s,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let u=Object.keys(e.lazy),d=[],f;for(let g of u){if(i&&i.includes(g))continue;let b=CE({key:g,route:e,manifest:n,mapRouteProperties:a});b&&(d.push(b),g===t&&(f=b))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h==null||h.catch(()=>{}),f==null||f.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:f}}async function bS(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,s)=>{n[t[s].route.id]=i}),n}async function SM(e){return e.matches.some(t=>t.route.unstable_middleware)?RE(e,!1,()=>bS(e),(t,n)=>({[n]:{type:"error",result:t}})):bS(e)}async function RE(e,t,n,a){let{matches:i,request:s,params:u,context:d}=e,f={handlerResult:void 0};try{let h=i.flatMap(b=>b.route.unstable_middleware?b.route.unstable_middleware.map(x=>[b.route.id,x]):[]),g=await AE({request:s,params:u,context:d},h,t,f,n);return t?g:f.handlerResult}catch(h){if(!f.middlewareError)throw h;let g=await a(f.middlewareError.error,f.middlewareError.routeId);return f.handlerResult?Object.assign(f.handlerResult,g):g}}async function AE(e,t,n,a,i,s=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason?u.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${u.method} ${u.url}`);let d=t[s];if(!d)return a.handlerResult=await i(),a.handlerResult;let[f,h]=d,g=!1,b,x=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");g=!0,await AE(e,t,n,a,i,s+1)};try{let S=await h({request:e.request,params:e.params,context:e.context},x);return g?S===void 0?b:S:x()}catch(S){throw a.middlewareError?a.middlewareError.error!==S&&(a.middlewareError={routeId:f,error:S}):a.middlewareError={routeId:f,error:S},S}}function TE(e,t,n,a,i){let s=CE({key:"unstable_middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=bM(a.route,Zn(n.method)?"action":"loader",t,e,i);return{middleware:s,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function dg(e,t,n,a,i,s,u,d=null){let f=!1,h=TE(e,t,n,a,i);return{...a,_lazyPromises:h,shouldLoad:u,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler(g){return f=!0,d?typeof g=="boolean"?zd(a,{...d,defaultShouldRevalidate:g}):zd(a,d):u},resolve(g){return f||u||g&&n.method==="GET"&&(a.route.lazy||a.route.loader)?EM({request:n,match:a,lazyHandlerPromise:h==null?void 0:h.handler,lazyRoutePromise:h==null?void 0:h.route,handlerOverride:g,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function xl(e,t,n,a,i,s,u,d=null){return a.map(f=>f.route.id!==i.route.id?{...f,shouldLoad:!1,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler:()=>!1,_lazyPromises:TE(e,t,n,f,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:dg(e,t,n,f,s,u,!0,d))}async function wM(e,t,n,a,i,s){n.some(h=>{var g;return(g=h._lazyPromises)==null?void 0:g.middleware})&&await Promise.all(n.map(h=>{var g;return(g=h._lazyPromises)==null?void 0:g.middleware}));let u={request:t,params:n[0].params,context:i,matches:n},f=await e({...u,fetcherKey:a,unstable_runClientMiddleware:h=>{let g=u;return RE(g,!1,()=>h({...g,fetcherKey:a,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(b,x)=>({[x]:{type:"error",result:b}}))}});try{await Promise.all(n.flatMap(h=>{var g,b;return[(g=h._lazyPromises)==null?void 0:g.handler,(b=h._lazyPromises)==null?void 0:b.route]}))}catch{}return f}async function EM({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:a,handlerOverride:i,scopedContext:s}){let u,d,f=Zn(e.method),h=f?"action":"loader",g=b=>{let x,S=new Promise((C,R)=>x=R);d=()=>x(),e.signal.addEventListener("abort",d);let w=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${t.route.id}]`)):b({request:e,params:t.params,context:s},...C!==void 0?[C]:[]),E=(async()=>{try{return{type:"data",result:await(i?i(R=>w(R)):w())}}catch(C){return{type:"error",result:C}}})();return Promise.race([E,S])};try{let b=f?t.route.action:t.route.loader;if(n||a)if(b){let x,[S]=await Promise.all([g(b).catch(w=>{x=w}),n,a]);if(x!==void 0)throw x;u=S}else{await n;let x=f?t.route.action:t.route.loader;if(x)[u]=await Promise.all([g(x),a]);else if(h==="action"){let S=new URL(e.url),w=S.pathname+S.search;throw mr(405,{method:e.method,pathname:w,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(b)u=await g(b);else{let x=new URL(e.url),S=x.pathname+x.search;throw mr(404,{pathname:S})}}catch(b){return{type:"error",result:b}}finally{d&&e.signal.removeEventListener("abort",d)}return u}async function _M(e){var a,i,s,u,d,f;let{result:t,type:n}=e;if(ME(t)){let h;try{let g=t.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(g){return{type:"error",error:g}}return n==="error"?{type:"error",error:new Pd(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:"data",data:h,statusCode:t.status,headers:t.headers}}return n==="error"?AS(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new Pd(((s=t.init)==null?void 0:s.status)||500,void 0,t.data),statusCode:du(t)?t.status:void 0,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:du(t)?t.status:void 0}:AS(t)?{type:"data",data:t.data,statusCode:(d=t.init)==null?void 0:d.status,headers:(f=t.init)!=null&&f.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function CM(e,t,n,a,i){let s=e.headers.get("Location");if(ft(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!nv.test(s)){let u=a.slice(0,a.findIndex(d=>d.route.id===n)+1);s=ug(new URL(t.url),u,i,s),e.headers.set("Location",s)}return e}function SS(e,t,n){if(nv.test(e)){let a=e,i=a.startsWith("//")?new URL(t.protocol+a):new URL(a),s=gr(i.pathname,n)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function ml(e,t,n,a){let i=e.createURL(DE(t)).toString(),s={signal:n};if(a&&Zn(a.formMethod)){let{formMethod:u,formEncType:d}=a;s.method=u.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(a.json)):d==="text/plain"?s.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?s.body=fg(a.formData):s.body=a.formData}return new Request(i,s)}function fg(e){let t=new URLSearchParams;for(let[n,a]of e.entries())t.append(n,typeof a=="string"?a:a.name);return t}function wS(e){let t=new FormData;for(let[n,a]of e.entries())t.append(n,a);return t}function RM(e,t,n,a=!1,i=!1){let s={},u=null,d,f=!1,h={},g=n&&qn(n[1])?n[1].error:void 0;return e.forEach(b=>{if(!(b.route.id in t))return;let x=b.route.id,S=t[x];if(ft(!ni(S),"Cannot handle redirect results in processLoaderData"),qn(S)){let w=S.error;if(g!==void 0&&(w=g,g=void 0),u=u||{},i)u[x]=w;else{let E=ti(e,x);u[E.route.id]==null&&(u[E.route.id]=w)}a||(s[x]=EE),f||(f=!0,d=du(S.error)?S.error.status:500),S.headers&&(h[x]=S.headers)}else s[x]=S.data,S.statusCode&&S.statusCode!==200&&!f&&(d=S.statusCode),S.headers&&(h[x]=S.headers)}),g!==void 0&&n&&(u={[n[0]]:g},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:u,statusCode:d||200,loaderHeaders:h}}function ES(e,t,n,a,i,s){let{loaderData:u,errors:d}=RM(t,n,a);return i.filter(f=>!f.matches||f.matches.some(h=>h.shouldLoad)).forEach(f=>{let{key:h,match:g,controller:b}=f,x=s[h];if(ft(x,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(qn(x)){let S=ti(e.matches,g==null?void 0:g.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:x.error}),e.fetchers.delete(h)}else if(ni(x))ft(!1,"Unhandled fetcher revalidation redirect");else{let S=oo(x.data);e.fetchers.set(h,S)}}),{loaderData:u,errors:d}}function _S(e,t,n,a){let i=Object.entries(t).filter(([,s])=>s!==EE).reduce((s,[u,d])=>(s[u]=d,s),{});for(let s of n){let u=s.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&s.route.loader&&(i[u]=e[u]),a&&a.hasOwnProperty(u))break}return i}function CS(e){return e?qn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ti(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function RS(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function mr(e,{pathname:t,routeId:n,method:a,type:i,message:s}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&n?d=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${n}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&n?d=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:a&&(d=`Invalid request method "${a.toUpperCase()}"`)),new Pd(e||500,u,new Error(d),!0)}function rd(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[a,i]=t[n];if(ni(i))return{key:a,result:i}}}function DE(e){let t=typeof e=="string"?Ro(e):e;return yo({...t,hash:""})}function AM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function TM(e){return ME(e.result)&&fM.has(e.result.status)}function qn(e){return e.type==="error"}function ni(e){return(e&&e.type)==="redirect"}function AS(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ME(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function DM(e){return dM.has(e.toUpperCase())}function Zn(e){return uM.has(e.toUpperCase())}function rv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Js(e,t){let n=typeof t=="string"?Ro(t).search:t.search;if(e[e.length-1].route.index&&rv(n||""))return e[e.length-1];let a=bE(e);return a[a.length-1]}function TS(e){let{formMethod:t,formAction:n,formEncType:a,text:i,formData:s,json:u}=e;if(!(!t||!n||!a)){if(i!=null)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:a,formData:s,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:u,text:void 0}}}function Ap(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function MM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Hs(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function OM(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function oo(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function NM(e,t){try{let n=e.sessionStorage.getItem(wE);if(n){let a=JSON.parse(n);for(let[i,s]of Object.entries(a||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function jM(e,t){if(t.size>0){let n={};for(let[a,i]of t)n[a]=[...i];try{e.sessionStorage.setItem(wE,JSON.stringify(n))}catch(a){Qt(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function kM(){let e,t,n=new Promise((a,i)=>{e=async s=>{a(s);try{await n}catch{}},t=async s=>{i(s);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var bi=y.createContext(null);bi.displayName="DataRouter";var Cu=y.createContext(null);Cu.displayName="DataRouterState";var av=y.createContext({isTransitioning:!1});av.displayName="ViewTransition";var OE=y.createContext(new Map);OE.displayName="Fetchers";var LM=y.createContext(null);LM.displayName="Await";var Lr=y.createContext(null);Lr.displayName="Navigation";var xf=y.createContext(null);xf.displayName="Location";var vr=y.createContext({outlet:null,matches:[],isDataRoute:!1});vr.displayName="Route";var ov=y.createContext(null);ov.displayName="RouteError";function PM(e,{relative:t}={}){ft(Tl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=y.useContext(Lr),{hash:i,pathname:s,search:u}=Au(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:Yr([n,s])),a.createHref({pathname:d,search:u,hash:i})}function Tl(){return y.useContext(xf)!=null}function Ao(){return ft(Tl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(xf).location}var NE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jE(e){y.useContext(Lr).static||y.useLayoutEffect(e)}function Ru(){let{isDataRoute:e}=y.useContext(vr);return e?XM():zM()}function zM(){ft(Tl(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(bi),{basename:t,navigator:n}=y.useContext(Lr),{matches:a}=y.useContext(vr),{pathname:i}=Ao(),s=JSON.stringify(vf(a)),u=y.useRef(!1);return jE(()=>{u.current=!0}),y.useCallback((f,h={})=>{if(Qt(u.current,NE),!u.current)return;if(typeof f=="number"){n.go(f);return}let g=yf(f,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Yr([t,g.pathname])),(h.replace?n.replace:n.push)(g,h.state,h)},[t,n,s,i,e])}var kE=y.createContext(null);function LE(){return y.useContext(kE)}function FM(e){let t=y.useContext(vr).outlet;return t&&y.createElement(kE.Provider,{value:e},t)}function UM(){let{matches:e}=y.useContext(vr),t=e[e.length-1];return t?t.params:{}}function Au(e,{relative:t}={}){let{matches:n}=y.useContext(vr),{pathname:a}=Ao(),i=JSON.stringify(vf(n));return y.useMemo(()=>yf(e,JSON.parse(i),a,t==="path"),[e,i,a,t])}function IM(e,t,n,a){ft(Tl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=y.useContext(Lr),{matches:s}=y.useContext(vr),u=s[s.length-1],d=u?u.params:{},f=u?u.pathname:"/",h=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";PE(f,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
-
61
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let b=Ao(),x;x=b;let S=x.pathname||"/",w=S;if(h!=="/"){let R=h.replace(/^\//,"").split("/");w="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let E=so(e,{pathname:w});return Qt(g||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Qt(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),GM(E&&E.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Yr([h,i.encodeLocation?i.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?h:Yr([h,i.encodeLocation?i.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),s,n,a)}function VM(){let e=QM(),t=du(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},s={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:s},"ErrorBoundary")," or"," ",y.createElement("code",{style:s},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,u)}var $M=y.createElement(VM,null),HM=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?y.createElement(vr.Provider,{value:this.props.routeContext},y.createElement(ov.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function BM({routeContext:e,match:t,children:n}){let a=y.useContext(bi);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(vr.Provider,{value:e},n)}function GM(e,t=[],n=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let f=i.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);ft(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,d=-1;if(n)for(let f=0;f<i.length;f++){let h=i[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=f),h.route.id){let{loaderData:g,errors:b}=n,x=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!b||b[h.route.id]===void 0);if(h.route.lazy||x){u=!0,d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}return i.reduceRight((f,h,g)=>{let b,x=!1,S=null,w=null;n&&(b=s&&h.route.id?s[h.route.id]:void 0,S=h.route.errorElement||$M,u&&(d<0&&g===0?(PE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,w=null):d===g&&(x=!0,w=h.route.hydrateFallbackElement||null)));let E=t.concat(i.slice(0,g+1)),C=()=>{let R;return b?R=S:x?R=w:h.route.Component?R=y.createElement(h.route.Component,null):h.route.element?R=h.route.element:R=f,y.createElement(BM,{match:h,routeContext:{outlet:f,matches:E,isDataRoute:n!=null},children:R})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?y.createElement(HM,{location:n.location,revalidation:n.revalidation,component:S,error:b,children:C(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):C()},null)}function iv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qM(e){let t=y.useContext(bi);return ft(t,iv(e)),t}function ZM(e){let t=y.useContext(Cu);return ft(t,iv(e)),t}function YM(e){let t=y.useContext(vr);return ft(t,iv(e)),t}function lv(e){let t=YM(e),n=t.matches[t.matches.length-1];return ft(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function KM(){return lv("useRouteId")}function QM(){var a;let e=y.useContext(ov),t=ZM("useRouteError"),n=lv("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function XM(){let{router:e}=qM("useNavigate"),t=lv("useNavigate"),n=y.useRef(!1);return jE(()=>{n.current=!0}),y.useCallback(async(i,s={})=>{Qt(n.current,NE),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var DS={};function PE(e,t,n){!t&&!DS[e]&&(DS[e]=!0,Qt(!1,n))}var MS={};function OS(e,t){!e&&!MS[t]&&(MS[t]=!0,console.warn(t))}function WM(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Qt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:y.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Qt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Qt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var JM=["HydrateFallback","hydrateFallbackElement"],eO=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function tO({router:e,flushSync:t}){let[n,a]=y.useState(e.state),[i,s]=y.useState(),[u,d]=y.useState({isTransitioning:!1}),[f,h]=y.useState(),[g,b]=y.useState(),[x,S]=y.useState(),w=y.useRef(new Map),E=y.useCallback((D,{deletedFetchers:j,flushSync:O,viewTransitionOpts:M})=>{D.fetchers.forEach((Z,ee)=>{Z.data!==void 0&&w.current.set(ee,Z.data)}),j.forEach(Z=>w.current.delete(Z)),OS(O===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let I=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(OS(M==null||I,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!M||!I){t&&O?t(()=>a(D)):y.startTransition(()=>a(D));return}if(t&&O){t(()=>{g&&(f&&f.resolve(),g.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let Z=e.window.document.startViewTransition(()=>{t(()=>a(D))});Z.finished.finally(()=>{t(()=>{h(void 0),b(void 0),s(void 0),d({isTransitioning:!1})})}),t(()=>b(Z));return}g?(f&&f.resolve(),g.skipTransition(),S({state:D,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(s(D),d({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[e.window,t,g,f]);y.useLayoutEffect(()=>e.subscribe(E),[e,E]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&h(new eO)},[u]),y.useEffect(()=>{if(f&&i&&e.window){let D=i,j=f.promise,O=e.window.document.startViewTransition(async()=>{y.startTransition(()=>a(D)),await j});O.finished.finally(()=>{h(void 0),b(void 0),s(void 0),d({isTransitioning:!1})}),b(O)}},[i,f,e.window]),y.useEffect(()=>{f&&i&&n.location.key===i.location.key&&f.resolve()},[f,g,n.location,i]),y.useEffect(()=>{!u.isTransitioning&&x&&(s(x.state),d({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[u.isTransitioning,x]);let C=y.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,j,O)=>e.navigate(D,{state:j,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(D,j,O)=>e.navigate(D,{replace:!0,state:j,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[e]),R=e.basename||"/",T=y.useMemo(()=>({router:e,navigator:C,static:!1,basename:R}),[e,C,R]);return y.createElement(y.Fragment,null,y.createElement(bi.Provider,{value:T},y.createElement(Cu.Provider,{value:n},y.createElement(OE.Provider,{value:w.current},y.createElement(av.Provider,{value:u},y.createElement(oO,{basename:R,location:n.location,navigationType:n.historyAction,navigator:C},y.createElement(nO,{routes:e.routes,future:e.future,state:n})))))),null)}var nO=y.memo(rO);function rO({routes:e,future:t,state:n}){return IM(e,void 0,n,t)}function aO({to:e,replace:t,state:n,relative:a}){ft(Tl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=y.useContext(Lr);Qt(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=y.useContext(vr),{pathname:u}=Ao(),d=Ru(),f=yf(e,vf(s),u,a==="path"),h=JSON.stringify(f);return y.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:a})},[d,h,a,t,n]),null}function zE(e){return FM(e.context)}function oO({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:i,static:s=!1}){ft(!Tl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=y.useMemo(()=>({basename:u,navigator:i,static:s,future:{}}),[u,i,s]);typeof n=="string"&&(n=Ro(n));let{pathname:f="/",search:h="",hash:g="",state:b=null,key:x="default"}=n,S=y.useMemo(()=>{let w=gr(f,u);return w==null?null:{location:{pathname:w,search:h,hash:g,state:b,key:x},navigationType:a}},[u,f,h,g,b,x,a]);return Qt(S!=null,`<Router basename="${u}"> is not able to match the URL "${f}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Lr.Provider,{value:d},y.createElement(xf.Provider,{children:t,value:S}))}var Ed="get",_d="application/x-www-form-urlencoded";function bf(e){return e!=null&&typeof e.tagName=="string"}function iO(e){return bf(e)&&e.tagName.toLowerCase()==="button"}function lO(e){return bf(e)&&e.tagName.toLowerCase()==="form"}function sO(e){return bf(e)&&e.tagName.toLowerCase()==="input"}function uO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cO(e,t){return e.button===0&&(!t||t==="_self")&&!uO(e)}var ad=null;function dO(){if(ad===null)try{new FormData(document.createElement("form"),0),ad=!1}catch{ad=!0}return ad}var fO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Tp(e){return e!=null&&!fO.has(e)?(Qt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_d}"`),null):e}function hO(e,t){let n,a,i,s,u;if(lO(e)){let d=e.getAttribute("action");a=d?gr(d,t):null,n=e.getAttribute("method")||Ed,i=Tp(e.getAttribute("enctype"))||_d,s=new FormData(e)}else if(iO(e)||sO(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?gr(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Ed,i=Tp(e.getAttribute("formenctype"))||Tp(d.getAttribute("enctype"))||_d,s=new FormData(d,e),!dO()){let{name:h,type:g,value:b}=e;if(g==="image"){let x=h?`${h}.`:"";s.append(`${x}x`,"0"),s.append(`${x}y`,"0")}else h&&s.append(h,b)}}else{if(bf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ed,a=null,i=_d,u=e}return s&&i==="text/plain"&&(u=s,s=void 0),{action:a,method:n.toLowerCase(),encType:i,formData:s,body:u}}function sv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function mO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gO(e,t,n){let a=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let u=await mO(s,n);return u.links?u.links():[]}return[]}));return bO(a.flat(1).filter(pO).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function NS(e,t,n,a,i,s){let u=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var g;return n[h].pathname!==f.pathname||((g=n[h].route.path)==null?void 0:g.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return s==="assets"?t.filter((f,h)=>u(f,h)||d(f,h)):s==="data"?t.filter((f,h)=>{var b;let g=a.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(u(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((b=n[0])==null?void 0:b.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function vO(e,t,{includeHydrateFallback:n}={}){return yO(e.map(a=>{let i=t.routes[a.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function yO(e){return[...new Set(e)]}function xO(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function bO(e,t){let n=new Set;return new Set(t),e.reduce((a,i)=>{let s=JSON.stringify(xO(i));return n.has(s)||(n.add(s),a.push({key:s,link:i})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var SO=new Set([100,101,204,205]);function wO(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&gr(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function FE(){let e=y.useContext(bi);return sv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function EO(){let e=y.useContext(Cu);return sv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var uv=y.createContext(void 0);uv.displayName="FrameworkContext";function UE(){let e=y.useContext(uv);return sv(e,"You must render this element inside a <HydratedRouter> element"),e}function _O(e,t){let n=y.useContext(uv),[a,i]=y.useState(!1),[s,u]=y.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:g,onTouchStart:b}=t,x=y.useRef(null);y.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let E=R=>{R.forEach(T=>{u(T.isIntersecting)})},C=new IntersectionObserver(E,{threshold:.5});return x.current&&C.observe(x.current),()=>{C.disconnect()}}},[e]),y.useEffect(()=>{if(a){let E=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(E)}}},[a]);let S=()=>{i(!0)},w=()=>{i(!1),u(!1)};return n?e!=="intent"?[s,x,{}]:[s,x,{onFocus:Bs(d,S),onBlur:Bs(f,w),onMouseEnter:Bs(h,S),onMouseLeave:Bs(g,w),onTouchStart:Bs(b,S)}]:[!1,x,{}]}function Bs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function CO({page:e,...t}){let{router:n}=FE(),a=y.useMemo(()=>so(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?y.createElement(AO,{page:e,matches:a,...t}):null}function RO(e){let{manifest:t,routeModules:n}=UE(),[a,i]=y.useState([]);return y.useEffect(()=>{let s=!1;return gO(e,t,n).then(u=>{s||i(u)}),()=>{s=!0}},[e,t,n]),a}function AO({page:e,matches:t,...n}){let a=Ao(),{manifest:i,routeModules:s}=UE(),{basename:u}=FE(),{loaderData:d,matches:f}=EO(),h=y.useMemo(()=>NS(e,t,f,i,a,"data"),[e,t,f,i,a]),g=y.useMemo(()=>NS(e,t,f,i,a,"assets"),[e,t,f,i,a]),b=y.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,E=!1;if(t.forEach(R=>{var D;let T=i.routes[R.route.id];!T||!T.hasLoader||(!h.some(j=>j.route.id===R.route.id)&&R.route.id in d&&((D=s[R.route.id])!=null&&D.shouldRevalidate)||T.hasClientLoader?E=!0:w.add(R.route.id))}),w.size===0)return[];let C=wO(e,u);return E&&w.size>0&&C.searchParams.set("_routes",t.filter(R=>w.has(R.route.id)).map(R=>R.route.id).join(",")),[C.pathname+C.search]},[u,d,a,i,h,t,e,s]),x=y.useMemo(()=>vO(g,i),[g,i]),S=RO(g);return y.createElement(y.Fragment,null,b.map(w=>y.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>y.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:E})=>y.createElement("link",{key:w,...E})))}function TO(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var IE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{IE&&(window.__reactRouterVersion="7.6.2")}catch{}function DO(e,t){return gM({basename:t==null?void 0:t.basename,unstable_getContext:t==null?void 0:t.unstable_getContext,future:t==null?void 0:t.future,history:zD({window:t==null?void 0:t.window}),hydrationData:MO(),routes:e,mapRouteProperties:WM,hydrationRouteProperties:JM,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function MO(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:OO(e.errors)}),e}function OO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[a,i]of t)if(i&&i.__type==="RouteErrorResponse")n[a]=new Pd(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let u=new s(i.message);u.stack="",n[a]=u}catch{}}if(n[a]==null){let s=new Error(i.message);s.stack="",n[a]=s}}else n[a]=i;return n}var VE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tu=y.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:i,reloadDocument:s,replace:u,state:d,target:f,to:h,preventScrollReset:g,viewTransition:b,...x},S){let{basename:w}=y.useContext(Lr),E=typeof h=="string"&&VE.test(h),C,R=!1;if(typeof h=="string"&&E&&(C=h,IE))try{let ee=new URL(window.location.href),se=h.startsWith("//")?new URL(ee.protocol+h):new URL(h),ye=gr(se.pathname,w);se.origin===ee.origin&&ye!=null?h=ye+se.search+se.hash:R=!0}catch{Qt(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=PM(h,{relative:i}),[D,j,O]=_O(a,x),M=kO(h,{replace:u,state:d,target:f,preventScrollReset:g,relative:i,viewTransition:b});function I(ee){t&&t(ee),ee.defaultPrevented||M(ee)}let Z=y.createElement("a",{...x,...O,href:C||T,onClick:R||s?t:I,ref:TO(S,j),target:f,"data-discover":!E&&n==="render"?"true":void 0});return D&&!E?y.createElement(y.Fragment,null,Z,y.createElement(CO,{page:T})):Z});Tu.displayName="Link";var Fd=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:i=!1,style:s,to:u,viewTransition:d,children:f,...h},g){let b=Au(u,{relative:h.relative}),x=Ao(),S=y.useContext(Cu),{navigator:w,basename:E}=y.useContext(Lr),C=S!=null&&UO(b)&&d===!0,R=w.encodeLocation?w.encodeLocation(b).pathname:b.pathname,T=x.pathname,D=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;n||(T=T.toLowerCase(),D=D?D.toLowerCase():null,R=R.toLowerCase()),D&&E&&(D=gr(D,E)||D);const j=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let O=T===R||!i&&T.startsWith(R)&&T.charAt(j)==="/",M=D!=null&&(D===R||!i&&D.startsWith(R)&&D.charAt(R.length)==="/"),I={isActive:O,isPending:M,isTransitioning:C},Z=O?t:void 0,ee;typeof a=="function"?ee=a(I):ee=[a,O?"active":null,M?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let se=typeof s=="function"?s(I):s;return y.createElement(Tu,{...h,"aria-current":Z,className:ee,ref:g,style:se,to:u,viewTransition:d},typeof f=="function"?f(I):f)});Fd.displayName="NavLink";var NO=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:i,state:s,method:u=Ed,action:d,onSubmit:f,relative:h,preventScrollReset:g,viewTransition:b,...x},S)=>{let w=zO(),E=FO(d,{relative:h}),C=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&VE.test(d),T=D=>{if(f&&f(D),D.defaultPrevented)return;D.preventDefault();let j=D.nativeEvent.submitter,O=(j==null?void 0:j.getAttribute("formmethod"))||u;w(j||D.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:i,state:s,relative:h,preventScrollReset:g,viewTransition:b})};return y.createElement("form",{ref:S,method:C,action:E,onSubmit:a?f:T,...x,"data-discover":!R&&e==="render"?"true":void 0})});NO.displayName="Form";function jO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $E(e){let t=y.useContext(bi);return ft(t,jO(e)),t}function kO(e,{target:t,replace:n,state:a,preventScrollReset:i,relative:s,viewTransition:u}={}){let d=Ru(),f=Ao(),h=Au(e,{relative:s});return y.useCallback(g=>{if(cO(g,t)){g.preventDefault();let b=n!==void 0?n:yo(f)===yo(h);d(e,{replace:b,state:a,preventScrollReset:i,relative:s,viewTransition:u})}},[f,d,h,n,a,t,e,i,s,u])}var LO=0,PO=()=>`__${String(++LO)}__`;function zO(){let{router:e}=$E("useSubmit"),{basename:t}=y.useContext(Lr),n=KM();return y.useCallback(async(a,i={})=>{let{action:s,method:u,encType:d,formData:f,body:h}=hO(a,t);if(i.navigate===!1){let g=i.fetcherKey||PO();await e.fetch(g,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||u,formEncType:i.encType||d,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||u,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function FO(e,{relative:t}={}){let{basename:n}=y.useContext(Lr),a=y.useContext(vr);ft(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),s={...Au(e||".",{relative:t})},u=Ao();if(e==null){s.search=u.search;let d=new URLSearchParams(s.search),f=d.getAll("index");if(f.some(g=>g==="")){d.delete("index"),f.filter(b=>b).forEach(b=>d.append("index",b));let g=d.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Yr([n,s.pathname])),yo(s)}function UO(e,t={}){let n=y.useContext(av);ft(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=$E("useViewTransitionState"),i=Au(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=gr(n.currentLocation.pathname,a)||n.currentLocation.pathname,u=gr(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Ld(i.pathname,u)!=null||Ld(i.pathname,s)!=null}[...SO];var Dl=pE();const IO=hE(Dl);/**
62
- * react-router v7.6.2
63
- *
64
- * Copyright (c) Remix Software Inc.
65
- *
66
- * This source code is licensed under the MIT license found in the
67
- * LICENSE.md file in the root directory of this source tree.
68
- *
69
- * @license MIT
70
- */function VO(e){return y.createElement(tO,{flushSync:Dl.flushSync,...e})}function jS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ca(...e){return t=>{let n=!1;const a=e.map(i=>{const s=jS(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){const s=a[i];typeof s=="function"?s():jS(e[i],null)}}}}function St(...e){return y.useCallback(Ca(...e),e)}function xo(e){const t=$O(e),n=y.forwardRef((a,i)=>{const{children:s,...u}=a,d=y.Children.toArray(s),f=d.find(HO);if(f){const h=f.props.children,g=d.map(b=>b===f?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:b);return p.jsx(t,{...u,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,g):null})}return p.jsx(t,{...u,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var Sf=xo("Slot");function $O(e){const t=y.forwardRef((n,a)=>{const{children:i,...s}=n;if(y.isValidElement(i)){const u=GO(i),d=BO(s,i.props);return i.type!==y.Fragment&&(d.ref=a?Ca(a,u):u),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HE=Symbol("radix.slottable");function BE(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=HE,t}function HO(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HE}function BO(e,t){const n={...t};for(const a in t){const i=e[a],s=t[a];/^on[A-Z]/.test(a)?i&&s?n[a]=(...d)=>{const f=s(...d);return i(...d),f}:i&&(n[a]=i):a==="style"?n[a]={...i,...s}:a==="className"&&(n[a]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function GO(e){var a,i;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function GE(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=GE(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function qE(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=GE(e))&&(a&&(a+=" "),a+=t);return a}const kS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,LS=qE,cv=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return LS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,u=Object.keys(i).map(h=>{const g=n==null?void 0:n[h],b=s==null?void 0:s[h];if(g===null)return null;const x=kS(g)||kS(b);return i[h][x]}),d=n&&Object.entries(n).reduce((h,g)=>{let[b,x]=g;return x===void 0||(h[b]=x),h},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,g)=>{let{class:b,className:x,...S}=g;return Object.entries(S).every(w=>{let[E,C]=w;return Array.isArray(C)?C.includes({...s,...d}[E]):{...s,...d}[E]===C})?[...h,b,x]:h},[]);return LS(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
71
- * @license lucide-react v0.475.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const qO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ZE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/**
76
- * @license lucide-react v0.475.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */var ZO={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"};/**
81
- * @license lucide-react v0.475.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const YO=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:i="",children:s,iconNode:u,...d},f)=>y.createElement("svg",{ref:f,...ZO,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:ZE("lucide",i),...d},[...u.map(([h,g])=>y.createElement(h,g)),...Array.isArray(s)?s:[s]]));/**
86
- * @license lucide-react v0.475.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const Tt=(e,t)=>{const n=y.forwardRef(({className:a,...i},s)=>y.createElement(YO,{ref:s,iconNode:t,className:ZE(`lucide-${qO(e)}`,a),...i}));return n.displayName=`${e}`,n};/**
91
- * @license lucide-react v0.475.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const KO=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],QO=Tt("ArrowLeft",KO);/**
96
- * @license lucide-react v0.475.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const XO=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],YE=Tt("ArrowUpDown",XO);/**
101
- * @license lucide-react v0.475.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const WO=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],JO=Tt("BookOpen",WO);/**
106
- * @license lucide-react v0.475.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const eN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ud=Tt("Check",eN);/**
111
- * @license lucide-react v0.475.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const tN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ml=Tt("ChevronDown",tN);/**
116
- * @license lucide-react v0.475.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const nN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],rN=Tt("ChevronRight",nN);/**
121
- * @license lucide-react v0.475.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const aN=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],oN=Tt("ChevronUp",aN);/**
126
- * @license lucide-react v0.475.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const iN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],lN=Tt("ChevronsUpDown",iN);/**
131
- * @license lucide-react v0.475.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const sN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],uN=Tt("CircleAlert",sN);/**
136
- * @license lucide-react v0.475.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const cN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],dN=Tt("CircleHelp",cN);/**
141
- * @license lucide-react v0.475.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const fN=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],hN=Tt("Code",fN);/**
146
- * @license lucide-react v0.475.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const mN=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],KE=Tt("Database",mN);/**
151
- * @license lucide-react v0.475.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const pN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],gN=Tt("EllipsisVertical",pN);/**
156
- * @license lucide-react v0.475.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const vN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],QE=Tt("Ellipsis",vN);/**
161
- * @license lucide-react v0.475.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const yN=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xN=Tt("ExternalLink",yN);/**
166
- * @license lucide-react v0.475.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const bN=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],SN=Tt("EyeOff",bN);/**
171
- * @license lucide-react v0.475.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const wN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],EN=Tt("Eye",wN);/**
176
- * @license lucide-react v0.475.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const _N=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],CN=Tt("Globe",_N);/**
181
- * @license lucide-react v0.475.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const RN=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],AN=Tt("House",RN);/**
186
- * @license lucide-react v0.475.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const TN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],DN=Tt("Info",TN);/**
191
- * @license lucide-react v0.475.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const MN=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ON=Tt("Lock",MN);/**
196
- * @license lucide-react v0.475.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const NN=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],jN=Tt("MessageCircle",NN);/**
201
- * @license lucide-react v0.475.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const kN=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],LN=Tt("Moon",kN);/**
206
- * @license lucide-react v0.475.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const PN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],zN=Tt("PanelLeft",PN);/**
211
- * @license lucide-react v0.475.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const FN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dv=Tt("Plus",FN);/**
216
- * @license lucide-react v0.475.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const UN=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],IN=Tt("Scale",UN);/**
221
- * @license lucide-react v0.475.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const VN=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],fv=Tt("Search",VN);/**
226
- * @license lucide-react v0.475.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const $N=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],HN=Tt("Sun",$N);/**
231
- * @license lucide-react v0.475.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const BN=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],XE=Tt("Trash2",BN);/**
236
- * @license lucide-react v0.475.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const GN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],WE=Tt("X",GN),Dp=768;function qN(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Dp-1}px)`),a=()=>{t(window.innerWidth<Dp)};return n.addEventListener("change",a),t(window.innerWidth<Dp),()=>n.removeEventListener("change",a)},[]),!!e}const hv="-",ZN=e=>{const t=KN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{const d=u.split(hv);return d[0]===""&&d.length!==1&&d.shift(),JE(d,t)||YN(u)},getConflictingClassGroupIds:(u,d)=>{const f=n[u]||[];return d&&a[u]?[...f,...a[u]]:f}}},JE=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),i=a?JE(e.slice(1),a):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(hv);return(u=t.validators.find(({validator:d})=>d(s)))==null?void 0:u.classGroupId},PS=/^\[(.+)\]$/,YN=e=>{if(PS.test(e)){const t=PS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},KN=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const i in n)hg(n[i],a,i,t);return a},hg=(e,t,n,a)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:zS(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(QN(i)){hg(i(a),t,n,a);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,u])=>{hg(u,zS(t,s),n,a)})})},zS=(e,t)=>{let n=e;return t.split(hv).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},QN=e=>e.isThemeGetter,XN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const i=(s,u)=>{n.set(s,u),t++,t>e&&(t=0,a=n,n=new Map)};return{get(s){let u=n.get(s);if(u!==void 0)return u;if((u=a.get(s))!==void 0)return i(s,u),u},set(s,u){n.has(s)?n.set(s,u):i(s,u)}}},mg="!",pg=":",WN=pg.length,JN=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=i=>{const s=[];let u=0,d=0,f=0,h;for(let w=0;w<i.length;w++){let E=i[w];if(u===0&&d===0){if(E===pg){s.push(i.slice(f,w)),f=w+WN;continue}if(E==="/"){h=w;continue}}E==="["?u++:E==="]"?u--:E==="("?d++:E===")"&&d--}const g=s.length===0?i:i.substring(f),b=ej(g),x=b!==g,S=h&&h>f?h-f:void 0;return{modifiers:s,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:S}};if(t){const i=t+pg,s=a;a=u=>u.startsWith(i)?s(u.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(n){const i=a;a=s=>n({className:s,parseClassName:i})}return a},ej=e=>e.endsWith(mg)?e.substring(0,e.length-1):e.startsWith(mg)?e.substring(1):e,tj=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const i=[];let s=[];return a.forEach(u=>{u[0]==="["||t[u]?(i.push(...s.sort(),u),s=[]):s.push(u)}),i.push(...s.sort()),i}},nj=e=>({cache:XN(e.cacheSize),parseClassName:JN(e),sortModifiers:tj(e),...ZN(e)}),rj=/\s+/,aj=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:s}=t,u=[],d=e.trim().split(rj);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:b,modifiers:x,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:E}=n(g);if(b){f=g+(f.length>0?" "+f:f);continue}let C=!!E,R=a(C?w.substring(0,E):w);if(!R){if(!C){f=g+(f.length>0?" "+f:f);continue}if(R=a(w),!R){f=g+(f.length>0?" "+f:f);continue}C=!1}const T=s(x).join(":"),D=S?T+mg:T,j=D+R;if(u.includes(j))continue;u.push(j);const O=i(R,C);for(let M=0;M<O.length;++M){const I=O[M];u.push(D+I)}f=g+(f.length>0?" "+f:f)}return f};function oj(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=e1(t))&&(a&&(a+=" "),a+=n);return a}const e1=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=e1(e[a]))&&(n&&(n+=" "),n+=t);return n};function ij(e,...t){let n,a,i,s=u;function u(f){const h=t.reduce((g,b)=>b(g),e());return n=nj(h),a=n.cache.get,i=n.cache.set,s=d,d(f)}function d(f){const h=a(f);if(h)return h;const g=aj(f,n);return i(f,g),g}return function(){return s(oj.apply(null,arguments))}}const on=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},t1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,n1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lj=/^\d+\/\d+$/,sj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,dj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ul=e=>lj.test(e),lt=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>!!e&&Number.isInteger(Number(e)),Mp=e=>e.endsWith("%")&&lt(e.slice(0,-1)),va=e=>sj.test(e),hj=()=>!0,mj=e=>uj.test(e)&&!cj.test(e),r1=()=>!1,pj=e=>dj.test(e),gj=e=>fj.test(e),vj=e=>!Oe(e)&&!Ne(e),yj=e=>Ol(e,i1,r1),Oe=e=>t1.test(e),ei=e=>Ol(e,l1,mj),Op=e=>Ol(e,Ej,lt),FS=e=>Ol(e,a1,r1),xj=e=>Ol(e,o1,gj),od=e=>Ol(e,s1,pj),Ne=e=>n1.test(e),Gs=e=>Nl(e,l1),bj=e=>Nl(e,_j),US=e=>Nl(e,a1),Sj=e=>Nl(e,i1),wj=e=>Nl(e,o1),id=e=>Nl(e,s1,!0),Ol=(e,t,n)=>{const a=t1.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Nl=(e,t,n=!1)=>{const a=n1.exec(e);return a?a[1]?t(a[1]):n:!1},a1=e=>e==="position"||e==="percentage",o1=e=>e==="image"||e==="url",i1=e=>e==="length"||e==="size"||e==="bg-size",l1=e=>e==="length",Ej=e=>e==="number",_j=e=>e==="family-name",s1=e=>e==="shadow",Cj=()=>{const e=on("color"),t=on("font"),n=on("text"),a=on("font-weight"),i=on("tracking"),s=on("leading"),u=on("breakpoint"),d=on("container"),f=on("spacing"),h=on("radius"),g=on("shadow"),b=on("inset-shadow"),x=on("text-shadow"),S=on("drop-shadow"),w=on("blur"),E=on("perspective"),C=on("aspect"),R=on("ease"),T=on("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...j(),Ne,Oe],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],Z=()=>[Ne,Oe,f],ee=()=>[ul,"full","auto",...Z()],se=()=>[ao,"none","subgrid",Ne,Oe],ye=()=>["auto",{span:["full",ao,Ne,Oe]},ao,Ne,Oe],me=()=>[ao,"auto",Ne,Oe],ve=()=>["auto","min","max","fr",Ne,Oe],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...Z()],q=()=>[ul,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],V=()=>[e,Ne,Oe],re=()=>[...j(),US,FS,{position:[Ne,Oe]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Sj,yj,{size:[Ne,Oe]}],P=()=>[Mp,Gs,ei],B=()=>["","none","full",h,Ne,Oe],oe=()=>["",lt,Gs,ei],de=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[lt,Mp,US,FS],Ce=()=>["","none",w,Ne,Oe],Le=()=>["none",lt,Ne,Oe],ke=()=>["none",lt,Ne,Oe],Je=()=>[lt,Ne,Oe],nt=()=>[ul,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[va],breakpoint:[va],color:[hj],container:[va],"drop-shadow":[va],ease:["in","out","in-out"],font:[vj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[va],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[va],shadow:[va],spacing:["px",lt],text:[va],"text-shadow":[va],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ul,Oe,Ne,C]}],container:["container"],columns:[{columns:[lt,Oe,Ne,d]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[ao,"auto",Ne,Oe]}],basis:[{basis:[ul,"full","auto",d,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ul,"auto","initial","none",Oe]}],grow:[{grow:["",lt,Ne,Oe]}],shrink:[{shrink:["",lt,Ne,Oe]}],order:[{order:[ao,"first","last","none",Ne,Oe]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:ye()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:ye()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[d,"screen",...q()]}],"min-w":[{"min-w":[d,"screen","none",...q()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Gs,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ne,Op]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mp,Oe]}],"font-family":[{font:[bj,Oe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ne,Oe]}],"line-clamp":[{"line-clamp":[lt,"none",Ne,Op]}],leading:[{leading:[s,...Z()]}],"list-image":[{"list-image":["none",Ne,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Ne,ei]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[lt,"auto",Ne,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ao,Ne,Oe],radial:["",Ne,Oe],conic:[ao,Ne,Oe]},wj,xj]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Ne,Oe]}],"outline-w":[{outline:["",lt,Gs,ei]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",g,id,od]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",b,id,od]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[lt,ei]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",x,id,od]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[lt,Ne,Oe]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Ne,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Oe]}],filter:[{filter:["","none",Ne,Oe]}],blur:[{blur:Ce()}],brightness:[{brightness:[lt,Ne,Oe]}],contrast:[{contrast:[lt,Ne,Oe]}],"drop-shadow":[{"drop-shadow":["","none",S,id,od]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",lt,Ne,Oe]}],"hue-rotate":[{"hue-rotate":[lt,Ne,Oe]}],invert:[{invert:["",lt,Ne,Oe]}],saturate:[{saturate:[lt,Ne,Oe]}],sepia:[{sepia:["",lt,Ne,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Oe]}],"backdrop-blur":[{"backdrop-blur":Ce()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Ne,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Ne,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Ne,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Ne,Oe]}],"backdrop-invert":[{"backdrop-invert":["",lt,Ne,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Ne,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Ne,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Ne,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ne,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Ne,Oe]}],ease:[{ease:["linear","initial",R,Ne,Oe]}],delay:[{delay:[lt,Ne,Oe]}],animate:[{animate:["none",T,Ne,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ne,Oe]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Je()}],"skew-x":[{"skew-x":Je()}],"skew-y":[{"skew-y":Je()}],transform:[{transform:[Ne,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne,Oe]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[lt,Gs,ei,Op]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Rj=ij(Cj);function Se(...e){return Rj(qE(e))}const mv=cv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ft({className:e,variant:t,size:n,asChild:a=!1,...i}){const s=a?Sf:"button";return p.jsx(s,{"data-slot":"button",className:Se(mv({variant:t,size:n,className:e})),...i})}function Xn({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",className:Se("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}var Aj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=Aj.reduce((e,t)=>{const n=xo(`Primitive.${t}`),a=y.forwardRef((i,s)=>{const{asChild:u,...d}=i,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...d,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function u1(e,t){e&&Dl.flushSync(()=>e.dispatchEvent(t))}var Tj="Separator",IS="horizontal",Dj=["horizontal","vertical"],c1=y.forwardRef((e,t)=>{const{decorative:n,orientation:a=IS,...i}=e,s=Mj(a)?a:IS,d=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(We.div,{"data-orientation":s,...d,...i,ref:t})});c1.displayName=Tj;function Mj(e){return Dj.includes(e)}var Oj=c1;function d1({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return p.jsx(Oj,{"data-slot":"separator",decorative:n,orientation:t,className:Se("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function Te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Nj(e,t){const n=y.createContext(t),a=s=>{const{children:u,...d}=s,f=y.useMemo(()=>d,Object.values(d));return p.jsx(n.Provider,{value:f,children:u})};a.displayName=e+"Provider";function i(s){const u=y.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[a,i]}function ea(e,t=[]){let n=[];function a(s,u){const d=y.createContext(u),f=n.length;n=[...n,u];const h=b=>{var R;const{scope:x,children:S,...w}=b,E=((R=x==null?void 0:x[e])==null?void 0:R[f])||d,C=y.useMemo(()=>w,Object.values(w));return p.jsx(E.Provider,{value:C,children:S})};h.displayName=s+"Provider";function g(b,x){var E;const S=((E=x==null?void 0:x[e])==null?void 0:E[f])||d,w=y.useContext(S);if(w)return w;if(u!==void 0)return u;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[h,g]}const i=()=>{const s=n.map(u=>y.createContext(u));return function(d){const f=(d==null?void 0:d[e])||s;return y.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[a,jj(i,...t)]}function jj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const u=a.reduce((d,{useScope:f,scopeName:h})=>{const b=f(s)[`__scope${h}`];return{...d,...b}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var En=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},kj=mE[" useId ".trim().toString()]||(()=>{}),Lj=0;function gn(e){const[t,n]=y.useState(kj());return En(()=>{n(a=>a??String(Lj++))},[e]),t?`radix-${t}`:""}var Pj=mE[" useInsertionEffect ".trim().toString()]||En;function ui({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[i,s,u]=zj({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:i;{const g=y.useRef(e!==void 0);y.useEffect(()=>{const b=g.current;b!==d&&console.warn(`${a} is changing from ${b?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,a])}const h=y.useCallback(g=>{var b;if(d){const x=Fj(g)?g(e):g;x!==e&&((b=u.current)==null||b.call(u,x))}else s(g)},[d,e,s,u]);return[f,h]}function zj({defaultProp:e,onChange:t}){const[n,a]=y.useState(e),i=y.useRef(n),s=y.useRef(t);return Pj(()=>{s.current=t},[t]),y.useEffect(()=>{var u;i.current!==n&&((u=s.current)==null||u.call(s,n),i.current=n)},[n,i]),[n,a,s]}function Fj(e){return typeof e=="function"}function Wr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function Uj(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e);y.useEffect(()=>{const a=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var Ij="DismissableLayer",gg="dismissableLayer.update",Vj="dismissableLayer.pointerDownOutside",$j="dismissableLayer.focusOutside",VS,f1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jl=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,h=y.useContext(f1),[g,b]=y.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=y.useState({}),w=St(t,I=>b(I)),E=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(C),T=g?E.indexOf(g):-1,D=h.layersWithOutsidePointerEventsDisabled.size>0,j=T>=R,O=Gj(I=>{const Z=I.target,ee=[...h.branches].some(se=>se.contains(Z));!j||ee||(i==null||i(I),u==null||u(I),I.defaultPrevented||d==null||d())},x),M=qj(I=>{const Z=I.target;[...h.branches].some(se=>se.contains(Z))||(s==null||s(I),u==null||u(I),I.defaultPrevented||d==null||d())},x);return Uj(I=>{T===h.layers.size-1&&(a==null||a(I),!I.defaultPrevented&&d&&(I.preventDefault(),d()))},x),y.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(VS=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),$S(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=VS)}},[g,x,n,h]),y.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),$S())},[g,h]),y.useEffect(()=>{const I=()=>S({});return document.addEventListener(gg,I),()=>document.removeEventListener(gg,I)},[]),p.jsx(We.div,{...f,ref:w,style:{pointerEvents:D?j?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,O.onPointerDownCapture)})});jl.displayName=Ij;var Hj="DismissableLayerBranch",Bj=y.forwardRef((e,t)=>{const n=y.useContext(f1),a=y.useRef(null),i=St(t,a);return y.useEffect(()=>{const s=a.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(We.div,{...e,ref:i})});Bj.displayName=Hj;function Gj(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),a=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const s=d=>{if(d.target&&!a.current){let f=function(){h1(Vj,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function qj(e,t=globalThis==null?void 0:globalThis.document){const n=Wr(e),a=y.useRef(!1);return y.useEffect(()=>{const i=s=>{s.target&&!a.current&&h1($j,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function $S(){const e=new CustomEvent(gg);document.dispatchEvent(e)}function h1(e,t,n,{discrete:a}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),a?u1(i,s):i.dispatchEvent(s)}var Np="focusScope.autoFocusOnMount",jp="focusScope.autoFocusOnUnmount",HS={bubbles:!1,cancelable:!0},Zj="FocusScope",Du=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...u}=e,[d,f]=y.useState(null),h=Wr(i),g=Wr(s),b=y.useRef(null),x=St(t,E=>f(E)),S=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(a){let E=function(D){if(S.paused||!d)return;const j=D.target;d.contains(j)?b.current=j:io(b.current,{select:!0})},C=function(D){if(S.paused||!d)return;const j=D.relatedTarget;j!==null&&(d.contains(j)||io(b.current,{select:!0}))},R=function(D){if(document.activeElement===document.body)for(const O of D)O.removedNodes.length>0&&io(d)};document.addEventListener("focusin",E),document.addEventListener("focusout",C);const T=new MutationObserver(R);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",C),T.disconnect()}}},[a,d,S.paused]),y.useEffect(()=>{if(d){GS.add(S);const E=document.activeElement;if(!d.contains(E)){const R=new CustomEvent(Np,HS);d.addEventListener(Np,h),d.dispatchEvent(R),R.defaultPrevented||(Yj(Jj(m1(d)),{select:!0}),document.activeElement===E&&io(d))}return()=>{d.removeEventListener(Np,h),setTimeout(()=>{const R=new CustomEvent(jp,HS);d.addEventListener(jp,g),d.dispatchEvent(R),R.defaultPrevented||io(E??document.body,{select:!0}),d.removeEventListener(jp,g),GS.remove(S)},0)}}},[d,h,g,S]);const w=y.useCallback(E=>{if(!n&&!a||S.paused)return;const C=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(C&&R){const T=E.currentTarget,[D,j]=Kj(T);D&&j?!E.shiftKey&&R===j?(E.preventDefault(),n&&io(D,{select:!0})):E.shiftKey&&R===D&&(E.preventDefault(),n&&io(j,{select:!0})):R===T&&E.preventDefault()}},[n,a,S.paused]);return p.jsx(We.div,{tabIndex:-1,...u,ref:x,onKeyDown:w})});Du.displayName=Zj;function Yj(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(io(a,{select:t}),document.activeElement!==n)return}function Kj(e){const t=m1(e),n=BS(t,e),a=BS(t.reverse(),e);return[n,a]}function m1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const i=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||i?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function BS(e,t){for(const n of e)if(!Qj(n,{upTo:t}))return n}function Qj(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xj(e){return e instanceof HTMLInputElement&&"select"in e}function io(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xj(e)&&t&&e.select()}}var GS=Wj();function Wj(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qS(e,t),e.unshift(t)},remove(t){var n;e=qS(e,t),(n=e[0])==null||n.resume()}}}function qS(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function Jj(e){return e.filter(t=>t.tagName!=="A")}var e3="Portal",kl=y.forwardRef((e,t)=>{var d;const{container:n,...a}=e,[i,s]=y.useState(!1);En(()=>s(!0),[]);const u=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?IO.createPortal(p.jsx(We.div,{...a,ref:t}),u):null});kl.displayName=e3;function t3(e,t){return y.useReducer((n,a)=>t[n][a]??n,e)}var yr=e=>{const{present:t,children:n}=e,a=n3(t),i=typeof n=="function"?n({present:a.isPresent}):y.Children.only(n),s=St(a.ref,r3(i));return typeof n=="function"||a.isPresent?y.cloneElement(i,{ref:s}):null};yr.displayName="Presence";function n3(e){const[t,n]=y.useState(),a=y.useRef(null),i=y.useRef(e),s=y.useRef("none"),u=e?"mounted":"unmounted",[d,f]=t3(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=ld(a.current);s.current=d==="mounted"?h:"none"},[d]),En(()=>{const h=a.current,g=i.current;if(g!==e){const x=s.current,S=ld(h);e?f("MOUNT"):S==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(g&&x!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),En(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,b=S=>{const E=ld(a.current).includes(S.animationName);if(S.target===t&&E&&(f("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=S=>{S.target===t&&(s.current=ld(a.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",b),t.addEventListener("animationend",b),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",b),t.removeEventListener("animationend",b)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(h=>{a.current=h?getComputedStyle(h):null,n(h)},[])}}function ld(e){return(e==null?void 0:e.animationName)||"none"}function r3(e){var a,i;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kp=0;function wf(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ZS()),document.body.insertAdjacentElement("beforeend",e[1]??ZS()),kp++,()=>{kp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kp--}},[])}function ZS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Gr=function(){return Gr=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Gr.apply(this,arguments)};function p1(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n}function a3(e,t,n){if(n||arguments.length===2)for(var a=0,i=t.length,s;a<i;a++)(s||!(a in t))&&(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}var Cd="right-scroll-bar-position",Rd="width-before-scroll-bar",o3="with-scroll-bars-hidden",i3="--removed-body-scroll-bar-size";function Lp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function l3(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var i=n.value;i!==a&&(n.value=a,n.callback(a,i))}}}})[0];return n.callback=t,n.facade}var s3=typeof window<"u"?y.useLayoutEffect:y.useEffect,YS=new WeakMap;function u3(e,t){var n=l3(null,function(a){return e.forEach(function(i){return Lp(i,a)})});return s3(function(){var a=YS.get(n);if(a){var i=new Set(a),s=new Set(e),u=n.current;i.forEach(function(d){s.has(d)||Lp(d,null)}),s.forEach(function(d){i.has(d)||Lp(d,u)})}YS.set(n,e)},[e]),n}function c3(e){return e}function d3(e,t){t===void 0&&(t=c3);var n=[],a=!1,i={read:function(){if(a)throw new 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(s){var u=t(s,a);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(s){for(a=!0;n.length;){var u=n;n=[],u.forEach(s)}n={push:function(d){return s(d)},filter:function(){return n}}},assignMedium:function(s){a=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(s),u=n}var f=function(){var g=u;u=[],g.forEach(s)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(g){u.push(g),h()},filter:function(g){return u=u.filter(g),n}}}};return i}function f3(e){e===void 0&&(e={});var t=d3(null);return t.options=Gr({async:!0,ssr:!1},e),t}var g1=function(e){var t=e.sideCar,n=p1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return y.createElement(a,Gr({},n))};g1.isSideCarExport=!0;function h3(e,t){return e.useMedium(t),g1}var v1=f3(),Pp=function(){},Ef=y.forwardRef(function(e,t){var n=y.useRef(null),a=y.useState({onScrollCapture:Pp,onWheelCapture:Pp,onTouchMoveCapture:Pp}),i=a[0],s=a[1],u=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,b=e.shards,x=e.sideCar,S=e.noRelative,w=e.noIsolation,E=e.inert,C=e.allowPinchZoom,R=e.as,T=R===void 0?"div":R,D=e.gapMode,j=p1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=x,M=u3([n,t]),I=Gr(Gr({},j),i);return y.createElement(y.Fragment,null,g&&y.createElement(O,{sideCar:v1,removeScrollBar:h,shards:b,noRelative:S,noIsolation:w,inert:E,setCallbacks:s,allowPinchZoom:!!C,lockRef:n,gapMode:D}),u?y.cloneElement(y.Children.only(d),Gr(Gr({},I),{ref:M})):y.createElement(T,Gr({},I,{className:f,ref:M}),d))});Ef.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ef.classNames={fullWidth:Rd,zeroRight:Cd};var m3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function p3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=m3();return t&&e.setAttribute("nonce",t),e}function g3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function v3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var y3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=p3())&&(g3(t,n),v3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x3=function(){var e=y3();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},y1=function(){var e=x3(),t=function(n){var a=n.styles,i=n.dynamic;return e(a,i),null};return t},b3={left:0,top:0,right:0,gap:0},zp=function(e){return parseInt(e||"",10)||0},S3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[zp(n),zp(a),zp(i)]},w3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return b3;var t=S3(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},E3=y1(),bl="data-scroll-locked",_3=function(e,t,n,a){var i=e.left,s=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
241
- .`.concat(o3,` {
242
- overflow: hidden `).concat(a,`;
243
- padding-right: `).concat(d,"px ").concat(a,`;
244
- }
245
- body[`).concat(bl,`] {
246
- overflow: hidden `).concat(a,`;
247
- overscroll-behavior: contain;
248
- `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
249
- padding-left: `.concat(i,`px;
250
- padding-top: `).concat(s,`px;
251
- padding-right: `).concat(u,`px;
252
- margin-left:0;
253
- margin-top:0;
254
- margin-right: `).concat(d,"px ").concat(a,`;
255
- `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),`
256
- }
257
-
258
- .`).concat(Cd,` {
259
- right: `).concat(d,"px ").concat(a,`;
260
- }
261
-
262
- .`).concat(Rd,` {
263
- margin-right: `).concat(d,"px ").concat(a,`;
264
- }
265
-
266
- .`).concat(Cd," .").concat(Cd,` {
267
- right: 0 `).concat(a,`;
268
- }
269
-
270
- .`).concat(Rd," .").concat(Rd,` {
271
- margin-right: 0 `).concat(a,`;
272
- }
273
-
274
- body[`).concat(bl,`] {
275
- `).concat(i3,": ").concat(d,`px;
276
- }
277
- `)},KS=function(){var e=parseInt(document.body.getAttribute(bl)||"0",10);return isFinite(e)?e:0},C3=function(){y.useEffect(function(){return document.body.setAttribute(bl,(KS()+1).toString()),function(){var e=KS()-1;e<=0?document.body.removeAttribute(bl):document.body.setAttribute(bl,e.toString())}},[])},R3=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,i=a===void 0?"margin":a;C3();var s=y.useMemo(function(){return w3(i)},[i]);return y.createElement(E3,{styles:_3(s,!t,i,n?"":"!important")})},vg=!1;if(typeof window<"u")try{var sd=Object.defineProperty({},"passive",{get:function(){return vg=!0,!0}});window.addEventListener("test",sd,sd),window.removeEventListener("test",sd,sd)}catch{vg=!1}var cl=vg?{passive:!1}:!1,A3=function(e){return e.tagName==="TEXTAREA"},x1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!A3(e)&&n[t]==="visible")},T3=function(e){return x1(e,"overflowY")},D3=function(e){return x1(e,"overflowX")},QS=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=b1(e,a);if(i){var s=S1(e,a),u=s[1],d=s[2];if(u>d)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},M3=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},O3=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},b1=function(e,t){return e==="v"?T3(t):D3(t)},S1=function(e,t){return e==="v"?M3(t):O3(t)},N3=function(e,t){return e==="h"&&t==="rtl"?-1:1},j3=function(e,t,n,a,i){var s=N3(e,window.getComputedStyle(t).direction),u=s*a,d=n.target,f=t.contains(d),h=!1,g=u>0,b=0,x=0;do{if(!d)break;var S=S1(e,d),w=S[0],E=S[1],C=S[2],R=E-C-s*w;(w||R)&&b1(e,d)&&(b+=R,x+=w);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(b)<1||!g&&Math.abs(x)<1)&&(h=!0),h},ud=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},XS=function(e){return[e.deltaX,e.deltaY]},WS=function(e){return e&&"current"in e?e.current:e},k3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L3=function(e){return`
278
- .block-interactivity-`.concat(e,` {pointer-events: none;}
279
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
280
- `)},P3=0,dl=[];function z3(e){var t=y.useRef([]),n=y.useRef([0,0]),a=y.useRef(),i=y.useState(P3++)[0],s=y.useState(y1)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var E=a3([e.lockRef.current],(e.shards||[]).map(WS),!0).filter(Boolean);return E.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),E.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=y.useCallback(function(E,C){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!u.current.allowPinchZoom;var R=ud(E),T=n.current,D="deltaX"in E?E.deltaX:T[0]-R[0],j="deltaY"in E?E.deltaY:T[1]-R[1],O,M=E.target,I=Math.abs(D)>Math.abs(j)?"h":"v";if("touches"in E&&I==="h"&&M.type==="range")return!1;var Z=QS(I,M);if(!Z)return!0;if(Z?O=I:(O=I==="v"?"h":"v",Z=QS(I,M)),!Z)return!1;if(!a.current&&"changedTouches"in E&&(D||j)&&(a.current=O),!O)return!0;var ee=a.current||O;return j3(ee,C,E,ee==="h"?D:j)},[]),f=y.useCallback(function(E){var C=E;if(!(!dl.length||dl[dl.length-1]!==s)){var R="deltaY"in C?XS(C):ud(C),T=t.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&k3(O.delta,R)})[0];if(T&&T.should){C.cancelable&&C.preventDefault();return}if(!T){var D=(u.current.shards||[]).map(WS).filter(Boolean).filter(function(O){return O.contains(C.target)}),j=D.length>0?d(C,D[0]):!u.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),h=y.useCallback(function(E,C,R,T){var D={name:E,delta:C,target:R,should:T,shadowParent:F3(R)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(j){return j!==D})},1)},[]),g=y.useCallback(function(E){n.current=ud(E),a.current=void 0},[]),b=y.useCallback(function(E){h(E.type,XS(E),E.target,d(E,e.lockRef.current))},[]),x=y.useCallback(function(E){h(E.type,ud(E),E.target,d(E,e.lockRef.current))},[]);y.useEffect(function(){return dl.push(s),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:x}),document.addEventListener("wheel",f,cl),document.addEventListener("touchmove",f,cl),document.addEventListener("touchstart",g,cl),function(){dl=dl.filter(function(E){return E!==s}),document.removeEventListener("wheel",f,cl),document.removeEventListener("touchmove",f,cl),document.removeEventListener("touchstart",g,cl)}},[]);var S=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(s,{styles:L3(i)}):null,S?y.createElement(R3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function F3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U3=h3(v1,z3);var Mu=y.forwardRef(function(e,t){return y.createElement(Ef,Gr({},e,{ref:t,sideCar:U3}))});Mu.classNames=Ef.classNames;var I3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fl=new WeakMap,cd=new WeakMap,dd={},Fp=0,w1=function(e){return e&&(e.host||w1(e.parentNode))},V3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=w1(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},$3=function(e,t,n,a){var i=V3(t,Array.isArray(e)?e:[e]);dd[n]||(dd[n]=new WeakMap);var s=dd[n],u=[],d=new Set,f=new Set(i),h=function(b){!b||d.has(b)||(d.add(b),h(b.parentNode))};i.forEach(h);var g=function(b){!b||f.has(b)||Array.prototype.forEach.call(b.children,function(x){if(d.has(x))g(x);else try{var S=x.getAttribute(a),w=S!==null&&S!=="false",E=(fl.get(x)||0)+1,C=(s.get(x)||0)+1;fl.set(x,E),s.set(x,C),u.push(x),E===1&&w&&cd.set(x,!0),C===1&&x.setAttribute(n,"true"),w||x.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",x,R)}})};return g(t),d.clear(),Fp++,function(){u.forEach(function(b){var x=fl.get(b)-1,S=s.get(b)-1;fl.set(b,x),s.set(b,S),x||(cd.has(b)||b.removeAttribute(a),cd.delete(b)),S||b.removeAttribute(n)}),Fp--,Fp||(fl=new WeakMap,fl=new WeakMap,cd=new WeakMap,dd={})}},_f=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),i=I3(e);return i?(a.push.apply(a,Array.from(i.querySelectorAll("[aria-live], script"))),$3(a,i,n,"aria-hidden")):function(){return null}},Cf="Dialog",[E1,_1]=ea(Cf),[H3,Pr]=E1(Cf),C1=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:i,onOpenChange:s,modal:u=!0}=e,d=y.useRef(null),f=y.useRef(null),[h,g]=ui({prop:a,defaultProp:i??!1,onChange:s,caller:Cf});return p.jsx(H3,{scope:t,triggerRef:d,contentRef:f,contentId:gn(),titleId:gn(),descriptionId:gn(),open:h,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(b=>!b),[g]),modal:u,children:n})};C1.displayName=Cf;var R1="DialogTrigger",A1=y.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,i=Pr(R1,n),s=St(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vv(i.open),...a,ref:s,onClick:Te(e.onClick,i.onOpenToggle)})});A1.displayName=R1;var pv="DialogPortal",[B3,T1]=E1(pv,{forceMount:void 0}),D1=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:i}=e,s=Pr(pv,t);return p.jsx(B3,{scope:t,forceMount:n,children:y.Children.map(a,u=>p.jsx(yr,{present:n||s.open,children:p.jsx(kl,{asChild:!0,container:i,children:u})}))})};D1.displayName=pv;var Id="DialogOverlay",M1=y.forwardRef((e,t)=>{const n=T1(Id,e.__scopeDialog),{forceMount:a=n.forceMount,...i}=e,s=Pr(Id,e.__scopeDialog);return s.modal?p.jsx(yr,{present:a||s.open,children:p.jsx(q3,{...i,ref:t})}):null});M1.displayName=Id;var G3=xo("DialogOverlay.RemoveScroll"),q3=y.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,i=Pr(Id,n);return p.jsx(Mu,{as:G3,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":vv(i.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),ci="DialogContent",O1=y.forwardRef((e,t)=>{const n=T1(ci,e.__scopeDialog),{forceMount:a=n.forceMount,...i}=e,s=Pr(ci,e.__scopeDialog);return p.jsx(yr,{present:a||s.open,children:s.modal?p.jsx(Z3,{...i,ref:t}):p.jsx(Y3,{...i,ref:t})})});O1.displayName=ci;var Z3=y.forwardRef((e,t)=>{const n=Pr(ci,e.__scopeDialog),a=y.useRef(null),i=St(t,n.contentRef,a);return y.useEffect(()=>{const s=a.current;if(s)return _f(s)},[]),p.jsx(N1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),Y3=y.forwardRef((e,t)=>{const n=Pr(ci,e.__scopeDialog),a=y.useRef(!1),i=y.useRef(!1);return p.jsx(N1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,d;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(a.current||(d=n.triggerRef.current)==null||d.focus(),s.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:s=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),N1=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...u}=e,d=Pr(ci,n),f=y.useRef(null),h=St(t,f);return wf(),p.jsxs(p.Fragment,{children:[p.jsx(Du,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(jl,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":vv(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Q3,{titleId:d.titleId}),p.jsx(W3,{contentRef:f,descriptionId:d.descriptionId})]})]})}),gv="DialogTitle",j1=y.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,i=Pr(gv,n);return p.jsx(We.h2,{id:i.titleId,...a,ref:t})});j1.displayName=gv;var k1="DialogDescription",L1=y.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,i=Pr(k1,n);return p.jsx(We.p,{id:i.descriptionId,...a,ref:t})});L1.displayName=k1;var P1="DialogClose",z1=y.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,i=Pr(P1,n);return p.jsx(We.button,{type:"button",...a,ref:t,onClick:Te(e.onClick,()=>i.onOpenChange(!1))})});z1.displayName=P1;function vv(e){return e?"open":"closed"}var F1="DialogTitleWarning",[K3,U1]=Nj(F1,{contentName:ci,titleName:gv,docsSlug:"dialog"}),Q3=({titleId:e})=>{const t=U1(F1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
281
-
282
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
283
-
284
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},X3="DialogDescriptionWarning",W3=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${U1(X3).contentName}}.`;return y.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Rf=C1,J3=A1,Af=D1,Tf=M1,Df=O1,yv=j1,xv=L1,Mf=z1;function I1({...e}){return p.jsx(Rf,{"data-slot":"sheet",...e})}function e4({...e}){return p.jsx(Af,{"data-slot":"sheet-portal",...e})}function t4({className:e,...t}){return p.jsx(Tf,{"data-slot":"sheet-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function V1({className:e,children:t,side:n="right",...a}){return p.jsxs(e4,{children:[p.jsx(t4,{}),p.jsxs(Df,{"data-slot":"sheet-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...a,children:[t,p.jsxs(Mf,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[p.jsx(WE,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function $1({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-header",className:Se("flex flex-col gap-1.5 p-4",e),...t})}function n4({className:e,...t}){return p.jsx(yv,{"data-slot":"sheet-title",className:Se("text-foreground font-semibold",e),...t})}function r4({className:e,...t}){return p.jsx(xv,{"data-slot":"sheet-description",className:Se("text-muted-foreground text-sm",e),...t})}function JS({className:e,...t}){return p.jsx("div",{"data-slot":"skeleton",className:Se("bg-accent animate-pulse rounded-md",e),...t})}const a4=["top","right","bottom","left"],bo=Math.min,Qn=Math.max,Vd=Math.round,fd=Math.floor,Kr=e=>({x:e,y:e}),o4={left:"right",right:"left",bottom:"top",top:"bottom"},i4={start:"end",end:"start"};function yg(e,t,n){return Qn(e,bo(t,n))}function Ra(e,t){return typeof e=="function"?e(t):e}function Aa(e){return e.split("-")[0]}function Ll(e){return e.split("-")[1]}function bv(e){return e==="x"?"y":"x"}function Sv(e){return e==="y"?"height":"width"}function qr(e){return["top","bottom"].includes(Aa(e))?"y":"x"}function wv(e){return bv(qr(e))}function l4(e,t,n){n===void 0&&(n=!1);const a=Ll(e),i=wv(e),s=Sv(i);let u=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(u=$d(u)),[u,$d(u)]}function s4(e){const t=$d(e);return[xg(e),t,xg(t)]}function xg(e){return e.replace(/start|end/g,t=>i4[t])}function u4(e,t,n){const a=["left","right"],i=["right","left"],s=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:a:t?a:i;case"left":case"right":return t?s:u;default:return[]}}function c4(e,t,n,a){const i=Ll(e);let s=u4(Aa(e),n==="start",a);return i&&(s=s.map(u=>u+"-"+i),t&&(s=s.concat(s.map(xg)))),s}function $d(e){return e.replace(/left|right|bottom|top/g,t=>o4[t])}function d4(e){return{top:0,right:0,bottom:0,left:0,...e}}function H1(e){return typeof e!="number"?d4(e):{top:e,right:e,bottom:e,left:e}}function Hd(e){const{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}function ew(e,t,n){let{reference:a,floating:i}=e;const s=qr(t),u=wv(t),d=Sv(u),f=Aa(t),h=s==="y",g=a.x+a.width/2-i.width/2,b=a.y+a.height/2-i.height/2,x=a[d]/2-i[d]/2;let S;switch(f){case"top":S={x:g,y:a.y-i.height};break;case"bottom":S={x:g,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:b};break;case"left":S={x:a.x-i.width,y:b};break;default:S={x:a.x,y:a.y}}switch(Ll(t)){case"start":S[u]-=x*(n&&h?-1:1);break;case"end":S[u]+=x*(n&&h?-1:1);break}return S}const f4=async(e,t,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:s=[],platform:u}=n,d=s.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:b}=ew(h,a,f),x=a,S={},w=0;for(let E=0;E<d.length;E++){const{name:C,fn:R}=d[E],{x:T,y:D,data:j,reset:O}=await R({x:g,y:b,initialPlacement:a,placement:x,strategy:i,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});g=T??g,b=D??b,S={...S,[C]:{...S[C],...j}},O&&w<=50&&(w++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(h=O.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:g,y:b}=ew(h,x,f)),E=-1)}return{x:g,y:b,placement:x,strategy:i,middlewareData:S}};async function fu(e,t){var n;t===void 0&&(t={});const{x:a,y:i,platform:s,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:x=!1,padding:S=0}=Ra(t,e),w=H1(S),C=d[x?b==="floating"?"reference":"floating":b],R=Hd(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(C)))==null||n?C:C.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:h,rootBoundary:g,strategy:f})),T=b==="floating"?{x:a,y:i,width:u.floating.width,height:u.floating.height}:u.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),j=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},O=Hd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:D,strategy:f}):T);return{top:(R.top-O.top+w.top)/j.y,bottom:(O.bottom-R.bottom+w.bottom)/j.y,left:(R.left-O.left+w.left)/j.x,right:(O.right-R.right+w.right)/j.x}}const h4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:i,rects:s,platform:u,elements:d,middlewareData:f}=t,{element:h,padding:g=0}=Ra(e,t)||{};if(h==null)return{};const b=H1(g),x={x:n,y:a},S=wv(i),w=Sv(S),E=await u.getDimensions(h),C=S==="y",R=C?"top":"left",T=C?"bottom":"right",D=C?"clientHeight":"clientWidth",j=s.reference[w]+s.reference[S]-x[S]-s.floating[w],O=x[S]-s.reference[S],M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=M?M[D]:0;(!I||!await(u.isElement==null?void 0:u.isElement(M)))&&(I=d.floating[D]||s.floating[w]);const Z=j/2-O/2,ee=I/2-E[w]/2-1,se=bo(b[R],ee),ye=bo(b[T],ee),me=se,ve=I-E[w]-ye,ce=I/2-E[w]/2+Z,te=yg(me,ce,ve),k=!f.arrow&&Ll(i)!=null&&ce!==te&&s.reference[w]/2-(ce<me?se:ye)-E[w]/2<0,q=k?ce<me?ce-me:ce-ve:0;return{[S]:x[S]+q,data:{[S]:te,centerOffset:ce-te-q,...k&&{alignmentOffset:q}},reset:k}}}),m4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:i,middlewareData:s,rects:u,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:E=!0,...C}=Ra(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const R=Aa(i),T=qr(d),D=Aa(d)===d,j=await(f.isRTL==null?void 0:f.isRTL(h.floating)),O=x||(D||!E?[$d(d)]:s4(d)),M=w!=="none";!x&&M&&O.push(...c4(d,E,w,j));const I=[d,...O],Z=await fu(t,C),ee=[];let se=((a=s.flip)==null?void 0:a.overflows)||[];if(g&&ee.push(Z[R]),b){const ce=l4(i,u,j);ee.push(Z[ce[0]],Z[ce[1]])}if(se=[...se,{placement:i,overflows:ee}],!ee.every(ce=>ce<=0)){var ye,me;const ce=(((ye=s.flip)==null?void 0:ye.index)||0)+1,te=I[ce];if(te&&(!(b==="alignment"?T!==qr(te):!1)||se.every(V=>V.overflows[0]>0&&qr(V.placement)===T)))return{data:{index:ce,overflows:se},reset:{placement:te}};let k=(me=se.filter(q=>q.overflows[0]<=0).sort((q,V)=>q.overflows[1]-V.overflows[1])[0])==null?void 0:me.placement;if(!k)switch(S){case"bestFit":{var ve;const q=(ve=se.filter(V=>{if(M){const re=qr(V.placement);return re===T||re==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(re=>re>0).reduce((re,N)=>re+N,0)]).sort((V,re)=>V[1]-re[1])[0])==null?void 0:ve[0];q&&(k=q);break}case"initialPlacement":k=d;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function tw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nw(e){return a4.some(t=>e[t]>=0)}const p4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...i}=Ra(e,t);switch(a){case"referenceHidden":{const s=await fu(t,{...i,elementContext:"reference"}),u=tw(s,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:nw(u)}}}case"escaped":{const s=await fu(t,{...i,altBoundary:!0}),u=tw(s,n.floating);return{data:{escapedOffsets:u,escaped:nw(u)}}}default:return{}}}}};async function g4(e,t){const{placement:n,platform:a,elements:i}=e,s=await(a.isRTL==null?void 0:a.isRTL(i.floating)),u=Aa(n),d=Ll(n),f=qr(n)==="y",h=["left","top"].includes(u)?-1:1,g=s&&f?-1:1,b=Ra(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof w=="number"&&(S=d==="end"?w*-1:w),f?{x:S*g,y:x*h}:{x:x*h,y:S*g}}const v4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:i,y:s,placement:u,middlewareData:d}=t,f=await g4(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(a=d.arrow)!=null&&a.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:u}}}}},y4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:i}=t,{mainAxis:s=!0,crossAxis:u=!1,limiter:d={fn:C=>{let{x:R,y:T}=C;return{x:R,y:T}}},...f}=Ra(e,t),h={x:n,y:a},g=await fu(t,f),b=qr(Aa(i)),x=bv(b);let S=h[x],w=h[b];if(s){const C=x==="y"?"top":"left",R=x==="y"?"bottom":"right",T=S+g[C],D=S-g[R];S=yg(T,S,D)}if(u){const C=b==="y"?"top":"left",R=b==="y"?"bottom":"right",T=w+g[C],D=w-g[R];w=yg(T,w,D)}const E=d.fn({...t,[x]:S,[b]:w});return{...E,data:{x:E.x-n,y:E.y-a,enabled:{[x]:s,[b]:u}}}}}},x4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:i,rects:s,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=Ra(e,t),g={x:n,y:a},b=qr(i),x=bv(b);let S=g[x],w=g[b];const E=Ra(d,t),C=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const D=x==="y"?"height":"width",j=s.reference[x]-s.floating[D]+C.mainAxis,O=s.reference[x]+s.reference[D]-C.mainAxis;S<j?S=j:S>O&&(S=O)}if(h){var R,T;const D=x==="y"?"width":"height",j=["top","left"].includes(Aa(i)),O=s.reference[b]-s.floating[D]+(j&&((R=u.offset)==null?void 0:R[b])||0)+(j?0:C.crossAxis),M=s.reference[b]+s.reference[D]+(j?0:((T=u.offset)==null?void 0:T[b])||0)-(j?C.crossAxis:0);w<O?w=O:w>M&&(w=M)}return{[x]:S,[b]:w}}}},b4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:i,rects:s,platform:u,elements:d}=t,{apply:f=()=>{},...h}=Ra(e,t),g=await fu(t,h),b=Aa(i),x=Ll(i),S=qr(i)==="y",{width:w,height:E}=s.floating;let C,R;b==="top"||b==="bottom"?(C=b,R=x===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(R=b,C=x==="end"?"top":"bottom");const T=E-g.top-g.bottom,D=w-g.left-g.right,j=bo(E-g[C],T),O=bo(w-g[R],D),M=!t.middlewareData.shift;let I=j,Z=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(Z=D),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=T),M&&!x){const se=Qn(g.left,0),ye=Qn(g.right,0),me=Qn(g.top,0),ve=Qn(g.bottom,0);S?Z=w-2*(se!==0||ye!==0?se+ye:Qn(g.left,g.right)):I=E-2*(me!==0||ve!==0?me+ve:Qn(g.top,g.bottom))}await f({...t,availableWidth:Z,availableHeight:I});const ee=await u.getDimensions(d.floating);return w!==ee.width||E!==ee.height?{reset:{rects:!0}}:{}}}};function Of(){return typeof window<"u"}function Pl(e){return B1(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ta(e){var t;return(t=(B1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B1(e){return Of()?e instanceof Node||e instanceof Wn(e).Node:!1}function jr(e){return Of()?e instanceof Element||e instanceof Wn(e).Element:!1}function Jr(e){return Of()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function rw(e){return!Of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function Ou(e){const{overflow:t,overflowX:n,overflowY:a,display:i}=kr(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(i)}function S4(e){return["table","td","th"].includes(Pl(e))}function Nf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ev(e){const t=_v(),n=jr(e)?kr(e):e;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function w4(e){let t=So(e);for(;Jr(t)&&!_l(t);){if(Ev(t))return t;if(Nf(t))return null;t=So(t)}return null}function _v(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _l(e){return["html","body","#document"].includes(Pl(e))}function kr(e){return Wn(e).getComputedStyle(e)}function jf(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function So(e){if(Pl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rw(e)&&e.host||ta(e);return rw(t)?t.host:t}function G1(e){const t=So(e);return _l(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Ou(t)?t:G1(t)}function hu(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=G1(e),s=i===((a=e.ownerDocument)==null?void 0:a.body),u=Wn(i);if(s){const d=bg(u);return t.concat(u,u.visualViewport||[],Ou(i)?i:[],d&&n?hu(d):[])}return t.concat(i,hu(i,[],n))}function bg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function q1(e){const t=kr(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const i=Jr(e),s=i?e.offsetWidth:n,u=i?e.offsetHeight:a,d=Vd(n)!==s||Vd(a)!==u;return d&&(n=s,a=u),{width:n,height:a,$:d}}function Cv(e){return jr(e)?e:e.contextElement}function Sl(e){const t=Cv(e);if(!Jr(t))return Kr(1);const n=t.getBoundingClientRect(),{width:a,height:i,$:s}=q1(t);let u=(s?Vd(n.width):n.width)/a,d=(s?Vd(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const E4=Kr(0);function Z1(e){const t=Wn(e);return!_v()||!t.visualViewport?E4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function di(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Cv(e);let u=Kr(1);t&&(a?jr(a)&&(u=Sl(a)):u=Sl(e));const d=_4(s,n,a)?Z1(s):Kr(0);let f=(i.left+d.x)/u.x,h=(i.top+d.y)/u.y,g=i.width/u.x,b=i.height/u.y;if(s){const x=Wn(s),S=a&&jr(a)?Wn(a):a;let w=x,E=bg(w);for(;E&&a&&S!==w;){const C=Sl(E),R=E.getBoundingClientRect(),T=kr(E),D=R.left+(E.clientLeft+parseFloat(T.paddingLeft))*C.x,j=R.top+(E.clientTop+parseFloat(T.paddingTop))*C.y;f*=C.x,h*=C.y,g*=C.x,b*=C.y,f+=D,h+=j,w=Wn(E),E=bg(w)}}return Hd({width:g,height:b,x:f,y:h})}function Rv(e,t){const n=jf(e).scrollLeft;return t?t.left+n:di(ta(e)).left+n}function Y1(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=a.left+t.scrollLeft-(n?0:Rv(e,a)),s=a.top+t.scrollTop;return{x:i,y:s}}function C4(e){let{elements:t,rect:n,offsetParent:a,strategy:i}=e;const s=i==="fixed",u=ta(a),d=t?Nf(t.floating):!1;if(a===u||d&&s)return n;let f={scrollLeft:0,scrollTop:0},h=Kr(1);const g=Kr(0),b=Jr(a);if((b||!b&&!s)&&((Pl(a)!=="body"||Ou(u))&&(f=jf(a)),Jr(a))){const S=di(a);h=Sl(a),g.x=S.x+a.clientLeft,g.y=S.y+a.clientTop}const x=u&&!b&&!s?Y1(u,f,!0):Kr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+x.x,y:n.y*h.y-f.scrollTop*h.y+g.y+x.y}}function R4(e){return Array.from(e.getClientRects())}function A4(e){const t=ta(e),n=jf(e),a=e.ownerDocument.body,i=Qn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=Qn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+Rv(e);const d=-n.scrollTop;return kr(a).direction==="rtl"&&(u+=Qn(t.clientWidth,a.clientWidth)-i),{width:i,height:s,x:u,y:d}}function T4(e,t){const n=Wn(e),a=ta(e),i=n.visualViewport;let s=a.clientWidth,u=a.clientHeight,d=0,f=0;if(i){s=i.width,u=i.height;const h=_v();(!h||h&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}return{width:s,height:u,x:d,y:f}}function D4(e,t){const n=di(e,!0,t==="fixed"),a=n.top+e.clientTop,i=n.left+e.clientLeft,s=Jr(e)?Sl(e):Kr(1),u=e.clientWidth*s.x,d=e.clientHeight*s.y,f=i*s.x,h=a*s.y;return{width:u,height:d,x:f,y:h}}function aw(e,t,n){let a;if(t==="viewport")a=T4(e,n);else if(t==="document")a=A4(ta(e));else if(jr(t))a=D4(t,n);else{const i=Z1(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Hd(a)}function K1(e,t){const n=So(e);return n===t||!jr(n)||_l(n)?!1:kr(n).position==="fixed"||K1(n,t)}function M4(e,t){const n=t.get(e);if(n)return n;let a=hu(e,[],!1).filter(d=>jr(d)&&Pl(d)!=="body"),i=null;const s=kr(e).position==="fixed";let u=s?So(e):e;for(;jr(u)&&!_l(u);){const d=kr(u),f=Ev(u);!f&&d.position==="fixed"&&(i=null),(s?!f&&!i:!f&&d.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ou(u)&&!f&&K1(e,u))?a=a.filter(g=>g!==u):i=d,u=So(u)}return t.set(e,a),a}function O4(e){let{element:t,boundary:n,rootBoundary:a,strategy:i}=e;const u=[...n==="clippingAncestors"?Nf(t)?[]:M4(t,this._c):[].concat(n),a],d=u[0],f=u.reduce((h,g)=>{const b=aw(t,g,i);return h.top=Qn(b.top,h.top),h.right=bo(b.right,h.right),h.bottom=bo(b.bottom,h.bottom),h.left=Qn(b.left,h.left),h},aw(t,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function N4(e){const{width:t,height:n}=q1(e);return{width:t,height:n}}function j4(e,t,n){const a=Jr(t),i=ta(t),s=n==="fixed",u=di(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const f=Kr(0);function h(){f.x=Rv(i)}if(a||!a&&!s)if((Pl(t)!=="body"||Ou(i))&&(d=jf(t)),a){const S=di(t,!0,s,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else i&&h();s&&!a&&i&&h();const g=i&&!a&&!s?Y1(i,d):Kr(0),b=u.left+d.scrollLeft-f.x-g.x,x=u.top+d.scrollTop-f.y-g.y;return{x:b,y:x,width:u.width,height:u.height}}function Up(e){return kr(e).position==="static"}function ow(e,t){if(!Jr(e)||kr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ta(e)===n&&(n=n.ownerDocument.body),n}function Q1(e,t){const n=Wn(e);if(Nf(e))return n;if(!Jr(e)){let i=So(e);for(;i&&!_l(i);){if(jr(i)&&!Up(i))return i;i=So(i)}return n}let a=ow(e,t);for(;a&&S4(a)&&Up(a);)a=ow(a,t);return a&&_l(a)&&Up(a)&&!Ev(a)?n:a||w4(e)||n}const k4=async function(e){const t=this.getOffsetParent||Q1,n=this.getDimensions,a=await n(e.floating);return{reference:j4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function L4(e){return kr(e).direction==="rtl"}const P4={convertOffsetParentRelativeRectToViewportRelativeRect:C4,getDocumentElement:ta,getClippingRect:O4,getOffsetParent:Q1,getElementRects:k4,getClientRects:R4,getDimensions:N4,getScale:Sl,isElement:jr,isRTL:L4};function X1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function z4(e,t){let n=null,a;const i=ta(e);function s(){var d;clearTimeout(a),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),s();const h=e.getBoundingClientRect(),{left:g,top:b,width:x,height:S}=h;if(d||t(),!x||!S)return;const w=fd(b),E=fd(i.clientWidth-(g+x)),C=fd(i.clientHeight-(b+S)),R=fd(g),D={rootMargin:-w+"px "+-E+"px "+-C+"px "+-R+"px",threshold:Qn(0,bo(1,f))||1};let j=!0;function O(M){const I=M[0].intersectionRatio;if(I!==f){if(!j)return u();I?u(!1,I):a=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!X1(h,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(O,{...D,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,D)}n.observe(e)}return u(!0),s}function F4(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,h=Cv(e),g=i||s?[...h?hu(h):[],...hu(t)]:[];g.forEach(R=>{i&&R.addEventListener("scroll",n,{passive:!0}),s&&R.addEventListener("resize",n)});const b=h&&d?z4(h,n):null;let x=-1,S=null;u&&(S=new ResizeObserver(R=>{let[T]=R;T&&T.target===h&&S&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var D;(D=S)==null||D.observe(t)})),n()}),h&&!f&&S.observe(h),S.observe(t));let w,E=f?di(e):null;f&&C();function C(){const R=di(e);E&&!X1(E,R)&&n(),E=R,w=requestAnimationFrame(C)}return n(),()=>{var R;g.forEach(T=>{i&&T.removeEventListener("scroll",n),s&&T.removeEventListener("resize",n)}),b==null||b(),(R=S)==null||R.disconnect(),S=null,f&&cancelAnimationFrame(w)}}const U4=v4,I4=y4,V4=m4,$4=b4,H4=p4,iw=h4,B4=x4,G4=(e,t,n)=>{const a=new Map,i={platform:P4,...n},s={...i.platform,_c:a};return f4(e,t,{...i,platform:s})};var q4=typeof document<"u",Z4=function(){},Ad=q4?y.useLayoutEffect:Z4;function Bd(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,a,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Bd(e[a],t[a]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){const s=i[a];if(!(s==="_owner"&&e.$$typeof)&&!Bd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function W1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lw(e,t){const n=W1(e);return Math.round(t*n)/n}function Ip(e){const t=y.useRef(e);return Ad(()=>{t.current=e}),t}function Y4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:i,elements:{reference:s,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[g,b]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=y.useState(a);Bd(x,a)||S(a);const[w,E]=y.useState(null),[C,R]=y.useState(null),T=y.useCallback(V=>{V!==M.current&&(M.current=V,E(V))},[]),D=y.useCallback(V=>{V!==I.current&&(I.current=V,R(V))},[]),j=s||w,O=u||C,M=y.useRef(null),I=y.useRef(null),Z=y.useRef(g),ee=f!=null,se=Ip(f),ye=Ip(i),me=Ip(h),ve=y.useCallback(()=>{if(!M.current||!I.current)return;const V={placement:t,strategy:n,middleware:x};ye.current&&(V.platform=ye.current),G4(M.current,I.current,V).then(re=>{const N={...re,isPositioned:me.current!==!1};ce.current&&!Bd(Z.current,N)&&(Z.current=N,Dl.flushSync(()=>{b(N)}))})},[x,t,n,ye,me]);Ad(()=>{h===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,b(V=>({...V,isPositioned:!1})))},[h]);const ce=y.useRef(!1);Ad(()=>(ce.current=!0,()=>{ce.current=!1}),[]),Ad(()=>{if(j&&(M.current=j),O&&(I.current=O),j&&O){if(se.current)return se.current(j,O,ve);ve()}},[j,O,ve,se,ee]);const te=y.useMemo(()=>({reference:M,floating:I,setReference:T,setFloating:D}),[T,D]),k=y.useMemo(()=>({reference:j,floating:O}),[j,O]),q=y.useMemo(()=>{const V={position:n,left:0,top:0};if(!k.floating)return V;const re=lw(k.floating,g.x),N=lw(k.floating,g.y);return d?{...V,transform:"translate("+re+"px, "+N+"px)",...W1(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:N}},[n,d,k.floating,g.x,g.y]);return y.useMemo(()=>({...g,update:ve,refs:te,elements:k,floatingStyles:q}),[g,ve,te,k,q])}const K4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:i}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?iw({element:a.current,padding:i}).fn(n):{}:a?iw({element:a,padding:i}).fn(n):{}}}},Q4=(e,t)=>({...U4(e),options:[e,t]}),X4=(e,t)=>({...I4(e),options:[e,t]}),W4=(e,t)=>({...B4(e),options:[e,t]}),J4=(e,t)=>({...V4(e),options:[e,t]}),ek=(e,t)=>({...$4(e),options:[e,t]}),tk=(e,t)=>({...H4(e),options:[e,t]}),nk=(e,t)=>({...K4(e),options:[e,t]});var rk="Arrow",J1=y.forwardRef((e,t)=>{const{children:n,width:a=10,height:i=5,...s}=e;return p.jsx(We.svg,{...s,ref:t,width:a,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});J1.displayName=rk;var ak=J1;function ok(e){const[t,n]=y.useState(void 0);return En(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let u,d;if("borderBoxSize"in s){const f=s.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Av="Popper",[e_,To]=ea(Av),[ik,t_]=e_(Av),n_=e=>{const{__scopePopper:t,children:n}=e,[a,i]=y.useState(null);return p.jsx(ik,{scope:t,anchor:a,onAnchorChange:i,children:n})};n_.displayName=Av;var r_="PopperAnchor",a_=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...i}=e,s=t_(r_,n),u=y.useRef(null),d=St(t,u);return y.useEffect(()=>{s.onAnchorChange((a==null?void 0:a.current)||u.current)}),a?null:p.jsx(We.div,{...i,ref:d})});a_.displayName=r_;var Tv="PopperContent",[lk,sk]=e_(Tv),o_=y.forwardRef((e,t)=>{var ue,Ce,Le,ke,Je,nt;const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:s="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:w,...E}=e,C=t_(Tv,n),[R,T]=y.useState(null),D=St(t,Gt=>T(Gt)),[j,O]=y.useState(null),M=ok(j),I=(M==null?void 0:M.width)??0,Z=(M==null?void 0:M.height)??0,ee=a+(s!=="center"?"-"+s:""),se=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ye=Array.isArray(h)?h:[h],me=ye.length>0,ve={padding:se,boundary:ye.filter(ck),altBoundary:me},{refs:ce,floatingStyles:te,placement:k,isPositioned:q,middlewareData:V}=Y4({strategy:"fixed",placement:ee,whileElementsMounted:(...Gt)=>F4(...Gt,{animationFrame:S==="always"}),elements:{reference:C.anchor},middleware:[Q4({mainAxis:i+Z,alignmentAxis:u}),f&&X4({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?W4():void 0,...ve}),f&&J4({...ve}),ek({...ve,apply:({elements:Gt,rects:Pt,availableWidth:tr,availableHeight:br})=>{const{width:qt,height:Ri}=Pt.reference,nr=Gt.floating.style;nr.setProperty("--radix-popper-available-width",`${tr}px`),nr.setProperty("--radix-popper-available-height",`${br}px`),nr.setProperty("--radix-popper-anchor-width",`${qt}px`),nr.setProperty("--radix-popper-anchor-height",`${Ri}px`)}}),j&&nk({element:j,padding:d}),dk({arrowWidth:I,arrowHeight:Z}),x&&tk({strategy:"referenceHidden",...ve})]}),[re,N]=s_(k),H=Wr(w);En(()=>{q&&(H==null||H())},[q,H]);const P=(ue=V.arrow)==null?void 0:ue.x,B=(Ce=V.arrow)==null?void 0:Ce.y,oe=((Le=V.arrow)==null?void 0:Le.centerOffset)!==0,[de,pe]=y.useState();return En(()=>{R&&pe(window.getComputedStyle(R).zIndex)},[R]),p.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(ke=V.transformOrigin)==null?void 0:ke.x,(Je=V.transformOrigin)==null?void 0:Je.y].join(" "),...((nt=V.hide)==null?void 0:nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(lk,{scope:n,placedSide:re,onArrowChange:O,arrowX:P,arrowY:B,shouldHideArrow:oe,children:p.jsx(We.div,{"data-side":re,"data-align":N,...E,ref:D,style:{...E.style,animation:q?void 0:"none"}})})})});o_.displayName=Tv;var i_="PopperArrow",uk={top:"bottom",right:"left",bottom:"top",left:"right"},l_=y.forwardRef(function(t,n){const{__scopePopper:a,...i}=t,s=sk(i_,a),u=uk[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(ak,{...i,ref:n,style:{...i.style,display:"block"}})})});l_.displayName=i_;function ck(e){return e!==null}var dk=e=>({name:"transformOrigin",options:e,fn(t){var C,R,T;const{placement:n,rects:a,middlewareData:i}=t,u=((C=i.arrow)==null?void 0:C.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,g]=s_(n),b={start:"0%",center:"50%",end:"100%"}[g],x=(((R=i.arrow)==null?void 0:R.x)??0)+d/2,S=(((T=i.arrow)==null?void 0:T.y)??0)+f/2;let w="",E="";return h==="bottom"?(w=u?b:`${x}px`,E=`${-f}px`):h==="top"?(w=u?b:`${x}px`,E=`${a.floating.height+f}px`):h==="right"?(w=`${-f}px`,E=u?b:`${S}px`):h==="left"&&(w=`${a.floating.width+f}px`,E=u?b:`${S}px`),{data:{x:w,y:E}}}});function s_(e){const[t,n="center"]=e.split("-");return[t,n]}var kf=n_,Nu=a_,Lf=o_,Pf=l_,u_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fk="VisuallyHidden",c_=y.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...u_,...e.style}}));c_.displayName=fk;var hk=c_,[zf,E$]=ea("Tooltip",[To]),Ff=To(),d_="TooltipProvider",mk=700,Sg="tooltip.open",[pk,Dv]=zf(d_),f_=e=>{const{__scopeTooltip:t,delayDuration:n=mk,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:s}=e,u=y.useRef(!0),d=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),p.jsx(pk,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(f.current),u.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:d,onPointerInTransitChange:y.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:s})};f_.displayName=d_;var mu="Tooltip",[gk,ju]=zf(mu),h_=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:i,onOpenChange:s,disableHoverableContent:u,delayDuration:d}=e,f=Dv(mu,e.__scopeTooltip),h=Ff(t),[g,b]=y.useState(null),x=gn(),S=y.useRef(0),w=u??f.disableHoverableContent,E=d??f.delayDuration,C=y.useRef(!1),[R,T]=ui({prop:a,defaultProp:i??!1,onChange:I=>{I?(f.onOpen(),document.dispatchEvent(new CustomEvent(Sg))):f.onClose(),s==null||s(I)},caller:mu}),D=y.useMemo(()=>R?C.current?"delayed-open":"instant-open":"closed",[R]),j=y.useCallback(()=>{window.clearTimeout(S.current),S.current=0,C.current=!1,T(!0)},[T]),O=y.useCallback(()=>{window.clearTimeout(S.current),S.current=0,T(!1)},[T]),M=y.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{C.current=!0,T(!0),S.current=0},E)},[E,T]);return y.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),p.jsx(kf,{...h,children:p.jsx(gk,{scope:t,contentId:x,open:R,stateAttribute:D,trigger:g,onTriggerChange:b,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?M():j()},[f.isOpenDelayedRef,M,j]),onTriggerLeave:y.useCallback(()=>{w?O():(window.clearTimeout(S.current),S.current=0)},[O,w]),onOpen:j,onClose:O,disableHoverableContent:w,children:n})})};h_.displayName=mu;var wg="TooltipTrigger",m_=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,i=ju(wg,n),s=Dv(wg,n),u=Ff(n),d=y.useRef(null),f=St(t,d,i.onTriggerChange),h=y.useRef(!1),g=y.useRef(!1),b=y.useCallback(()=>h.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),p.jsx(Nu,{asChild:!0,...u,children:p.jsx(We.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:f,onPointerMove:Te(e.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),g.current=!0)}),onPointerLeave:Te(e.onPointerLeave,()=>{i.onTriggerLeave(),g.current=!1}),onPointerDown:Te(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:Te(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:Te(e.onBlur,i.onClose),onClick:Te(e.onClick,i.onClose)})})});m_.displayName=wg;var Mv="TooltipPortal",[vk,yk]=zf(Mv,{forceMount:void 0}),p_=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:i}=e,s=ju(Mv,t);return p.jsx(vk,{scope:t,forceMount:n,children:p.jsx(yr,{present:n||s.open,children:p.jsx(kl,{asChild:!0,container:i,children:a})})})};p_.displayName=Mv;var Cl="TooltipContent",g_=y.forwardRef((e,t)=>{const n=yk(Cl,e.__scopeTooltip),{forceMount:a=n.forceMount,side:i="top",...s}=e,u=ju(Cl,e.__scopeTooltip);return p.jsx(yr,{present:a||u.open,children:u.disableHoverableContent?p.jsx(v_,{side:i,...s,ref:t}):p.jsx(xk,{side:i,...s,ref:t})})}),xk=y.forwardRef((e,t)=>{const n=ju(Cl,e.__scopeTooltip),a=Dv(Cl,e.__scopeTooltip),i=y.useRef(null),s=St(t,i),[u,d]=y.useState(null),{trigger:f,onClose:h}=n,g=i.current,{onPointerInTransitChange:b}=a,x=y.useCallback(()=>{d(null),b(!1)},[b]),S=y.useCallback((w,E)=>{const C=w.currentTarget,R={x:w.clientX,y:w.clientY},T=Ek(R,C.getBoundingClientRect()),D=_k(R,T),j=Ck(E.getBoundingClientRect()),O=Ak([...D,...j]);d(O),b(!0)},[b]);return y.useEffect(()=>()=>x(),[x]),y.useEffect(()=>{if(f&&g){const w=C=>S(C,g),E=C=>S(C,f);return f.addEventListener("pointerleave",w),g.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",E)}}},[f,g,S,x]),y.useEffect(()=>{if(u){const w=E=>{const C=E.target,R={x:E.clientX,y:E.clientY},T=(f==null?void 0:f.contains(C))||(g==null?void 0:g.contains(C)),D=!Rk(R,u);T?x():D&&(x(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[f,g,u,h,x]),p.jsx(v_,{...e,ref:s})}),[bk,Sk]=zf(mu,{isInside:!1}),wk=BE("TooltipContent"),v_=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:u,...d}=e,f=ju(Cl,n),h=Ff(n),{onClose:g}=f;return y.useEffect(()=>(document.addEventListener(Sg,g),()=>document.removeEventListener(Sg,g)),[g]),y.useEffect(()=>{if(f.trigger){const b=x=>{const S=x.target;S!=null&&S.contains(f.trigger)&&g()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[f.trigger,g]),p.jsx(jl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:b=>b.preventDefault(),onDismiss:g,children:p.jsxs(Lf,{"data-state":f.stateAttribute,...h,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(wk,{children:a}),p.jsx(bk,{scope:n,isInside:!0,children:p.jsx(hk,{id:f.contentId,role:"tooltip",children:i||a})})]})})});g_.displayName=Cl;var y_="TooltipArrow",x_=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,i=Ff(n);return Sk(y_,n).isInside?null:p.jsx(Pf,{...i,...a,ref:t})});x_.displayName=y_;function Ek(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,a,i,s)){case s:return"left";case i:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function _k(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function Ck(e){const{top:t,right:n,bottom:a,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:a},{x:i,y:a}]}function Rk(e,t){const{x:n,y:a}=e;let i=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const d=t[s],f=t[u],h=d.x,g=d.y,b=f.x,x=f.y;g>a!=x>a&&n<(b-h)*(a-g)/(x-g)+h&&(i=!i)}return i}function Ak(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),Tk(t)}function Tk(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const i=e[a];for(;t.length>=2;){const s=t[t.length-1],u=t[t.length-2];if((s.x-u.x)*(i.y-u.y)>=(s.y-u.y)*(i.x-u.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const i=e[a];for(;n.length>=2;){const s=n[n.length-1],u=n[n.length-2];if((s.x-u.x)*(i.y-u.y)>=(s.y-u.y)*(i.x-u.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Dk=f_,Mk=h_,Ok=m_,Nk=p_,jk=g_,kk=x_;function li({delayDuration:e=0,...t}){return p.jsx(Dk,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function mo({...e}){return p.jsx(li,{children:p.jsx(Mk,{"data-slot":"tooltip",...e})})}function po({...e}){return p.jsx(Ok,{"data-slot":"tooltip-trigger",...e})}function go({className:e,sideOffset:t=0,children:n,...a}){return p.jsx(Nk,{children:p.jsxs(jk,{"data-slot":"tooltip-content",sideOffset:t,className:Se("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...a,children:[n,p.jsx(kk,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Lk="sidebar_state",Pk=60*60*24*7,zk="16rem",Fk="18rem",Uk="3rem",Ik="b",b_=y.createContext(null);function ku(){const e=y.useContext(b_);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Vk({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:i,children:s,...u}){const d=qN(),[f,h]=y.useState(!1),[g,b]=y.useState(e),x=t??g,S=y.useCallback(R=>{const T=typeof R=="function"?R(x):R;n?n(T):b(T),document.cookie=`${Lk}=${T}; path=/; max-age=${Pk}`},[n,x]),w=y.useCallback(()=>d?h(R=>!R):S(R=>!R),[d,S,h]);y.useEffect(()=>{const R=T=>{T.key===Ik&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),w())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[w]);const E=x?"expanded":"collapsed",C=y.useMemo(()=>({state:E,open:x,setOpen:S,isMobile:d,openMobile:f,setOpenMobile:h,toggleSidebar:w}),[E,x,S,d,f,h,w]);return p.jsx(b_.Provider,{value:C,children:p.jsx(li,{delayDuration:0,children:p.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zk,"--sidebar-width-icon":Uk,...i},className:Se("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...u,children:s})})})}function $k({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:i,...s}){const{isMobile:u,state:d,openMobile:f,setOpenMobile:h}=ku();return n==="none"?p.jsx("div",{"data-slot":"sidebar",className:Se("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),...s,children:i}):u?p.jsx(I1,{open:f,onOpenChange:h,...s,children:p.jsxs(V1,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Fk},side:e,children:[p.jsxs($1,{className:"sr-only",children:[p.jsx(n4,{children:"Sidebar"}),p.jsx(r4,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):p.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[p.jsx("div",{"data-slot":"sidebar-gap",className:Se("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),p.jsx("div",{"data-slot":"sidebar-container",className:Se("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...s,children:p.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function Hk({className:e,onClick:t,...n}){const{toggleSidebar:a}=ku();return p.jsxs(Ft,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:Se("size-7",e),onClick:i=>{t==null||t(i),a()},...n,children:[p.jsx(zN,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Bk({className:e,...t}){const{toggleSidebar:n}=ku();return p.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:Se("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Gk({className:e,...t}){return p.jsx("main",{"data-slot":"sidebar-inset",className:Se("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function qk({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Se("flex flex-col gap-2 p-2",e),...t})}function Zk({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Se("flex flex-col gap-2 p-2",e),...t})}function Yk({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Se("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function sw({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Se("relative flex w-full min-w-0 flex-col p-2",e),...t})}function uw({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Se("w-full text-sm",e),...t})}function Kk({className:e,...t}){return p.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Se("flex w-full min-w-0 flex-col gap-1",e),...t})}function Qk({className:e,...t}){return p.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Se("group/menu-item relative",e),...t})}const Xk=cv("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Wk({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:i,className:s,...u}){const d=e?Sf:"button",{isMobile:f,state:h}=ku(),g=p.jsx(d,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":a,"data-active":t,className:Se(Xk({variant:n,size:a}),s),...u});return i?(typeof i=="string"&&(i={children:i}),p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:g}),p.jsx(go,{side:"right",align:"center",hidden:h!=="collapsed"||f,...i})]})):g}var Jk=(e,t,n,a,i,s,u,d)=>{let f=document.documentElement,h=["light","dark"];function g(S){(Array.isArray(e)?e:[e]).forEach(w=>{let E=w==="class",C=E&&s?i.map(R=>s[R]||R):i;E?(f.classList.remove(...C),f.classList.add(s&&s[S]?s[S]:S)):f.setAttribute(w,S)}),b(S)}function b(S){d&&h.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)g(a);else try{let S=localStorage.getItem(t)||n,w=u&&S==="system"?x():S;g(w)}catch{}},cw=["light","dark"],S_="(prefers-color-scheme: dark)",eL=typeof window>"u",Ov=y.createContext(void 0),tL={setTheme:e=>{},themes:[]},w_=()=>{var e;return(e=y.useContext(Ov))!=null?e:tL},nL=e=>y.useContext(Ov)?y.createElement(y.Fragment,null,e.children):y.createElement(aL,{...e}),rL=["light","dark"],aL=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:i="theme",themes:s=rL,defaultTheme:u=n?"system":"light",attribute:d="data-theme",value:f,children:h,nonce:g,scriptProps:b})=>{let[x,S]=y.useState(()=>iL(i,u)),[w,E]=y.useState(()=>x==="system"?Vp():x),C=f?Object.values(f):s,R=y.useCallback(O=>{let M=O;if(!M)return;O==="system"&&n&&(M=Vp());let I=f?f[M]:M,Z=t?lL(g):null,ee=document.documentElement,se=ye=>{ye==="class"?(ee.classList.remove(...C),I&&ee.classList.add(I)):ye.startsWith("data-")&&(I?ee.setAttribute(ye,I):ee.removeAttribute(ye))};if(Array.isArray(d)?d.forEach(se):se(d),a){let ye=cw.includes(u)?u:null,me=cw.includes(M)?M:ye;ee.style.colorScheme=me}Z==null||Z()},[g]),T=y.useCallback(O=>{let M=typeof O=="function"?O(x):O;S(M);try{localStorage.setItem(i,M)}catch{}},[x]),D=y.useCallback(O=>{let M=Vp(O);E(M),x==="system"&&n&&!e&&R("system")},[x,e]);y.useEffect(()=>{let O=window.matchMedia(S_);return O.addListener(D),D(O),()=>O.removeListener(D)},[D]),y.useEffect(()=>{let O=M=>{M.key===i&&(M.newValue?S(M.newValue):T(u))};return window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)},[T]),y.useEffect(()=>{R(e??x)},[e,x]);let j=y.useMemo(()=>({theme:x,setTheme:T,forcedTheme:e,resolvedTheme:x==="system"?w:x,themes:n?[...s,"system"]:s,systemTheme:n?w:void 0}),[x,T,e,w,n,s]);return y.createElement(Ov.Provider,{value:j},y.createElement(oL,{forcedTheme:e,storageKey:i,attribute:d,enableSystem:n,enableColorScheme:a,defaultTheme:u,value:f,themes:s,nonce:g,scriptProps:b}),h)},oL=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:i,defaultTheme:s,value:u,themes:d,nonce:f,scriptProps:h})=>{let g=JSON.stringify([n,t,s,e,d,u,a,i]).slice(1,-1);return y.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${Jk.toString()})(${g})`}})}),iL=(e,t)=>{if(eL)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},lL=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Vp=e=>(e||(e=window.matchMedia(S_)),e.matches?"dark":"light");function sL(){const{setTheme:e,theme:t}=w_();return p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsxs(Ft,{variant:"ghost",size:"icon",className:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground dark:hover:bg-sidebar-accent dark:hover:text-sidebar-accent-foreground",onClick:()=>{e(t==="light"?"dark":"light")},children:[p.jsx(HN,{className:"size-5 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),p.jsx(LN,{className:"absolute size-5 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"}),p.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),p.jsx(go,{children:p.jsx("p",{children:"Toggle theme"})})]})}function Nv(e){const t=e+"CollectionProvider",[n,a]=ea(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=E=>{const{scope:C,children:R}=E,T=tt.useRef(null),D=tt.useRef(new Map).current;return p.jsx(i,{scope:C,itemMap:D,collectionRef:T,children:R})};u.displayName=t;const d=e+"CollectionSlot",f=xo(d),h=tt.forwardRef((E,C)=>{const{scope:R,children:T}=E,D=s(d,R),j=St(C,D.collectionRef);return p.jsx(f,{ref:j,children:T})});h.displayName=d;const g=e+"CollectionItemSlot",b="data-radix-collection-item",x=xo(g),S=tt.forwardRef((E,C)=>{const{scope:R,children:T,...D}=E,j=tt.useRef(null),O=St(C,j),M=s(g,R);return tt.useEffect(()=>(M.itemMap.set(j,{ref:j,...D}),()=>void M.itemMap.delete(j))),p.jsx(x,{[b]:"",ref:O,children:T})});S.displayName=g;function w(E){const C=s(e+"CollectionConsumer",E);return tt.useCallback(()=>{const T=C.collectionRef.current;if(!T)return[];const D=Array.from(T.querySelectorAll(`[${b}]`));return Array.from(C.itemMap.values()).sort((M,I)=>D.indexOf(M.ref.current)-D.indexOf(I.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:u,Slot:h,ItemSlot:S},w,a]}var uL=y.createContext(void 0);function jv(e){const t=y.useContext(uL);return e||t||"ltr"}var $p="rovingFocusGroup.onEntryFocus",cL={bubbles:!1,cancelable:!0},Lu="RovingFocusGroup",[Eg,E_,dL]=Nv(Lu),[fL,__]=ea(Lu,[dL]),[hL,mL]=fL(Lu),C_=y.forwardRef((e,t)=>p.jsx(Eg.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Eg.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(pL,{...e,ref:t})})}));C_.displayName=Lu;var pL=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...b}=e,x=y.useRef(null),S=St(t,x),w=jv(s),[E,C]=ui({prop:u,defaultProp:d??null,onChange:f,caller:Lu}),[R,T]=y.useState(!1),D=Wr(h),j=E_(n),O=y.useRef(!1),[M,I]=y.useState(0);return y.useEffect(()=>{const Z=x.current;if(Z)return Z.addEventListener($p,D),()=>Z.removeEventListener($p,D)},[D]),p.jsx(hL,{scope:n,orientation:a,dir:w,loop:i,currentTabStopId:E,onItemFocus:y.useCallback(Z=>C(Z),[C]),onItemShiftTab:y.useCallback(()=>T(!0),[]),onFocusableItemAdd:y.useCallback(()=>I(Z=>Z+1),[]),onFocusableItemRemove:y.useCallback(()=>I(Z=>Z-1),[]),children:p.jsx(We.div,{tabIndex:R||M===0?-1:0,"data-orientation":a,...b,ref:S,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{O.current=!0}),onFocus:Te(e.onFocus,Z=>{const ee=!O.current;if(Z.target===Z.currentTarget&&ee&&!R){const se=new CustomEvent($p,cL);if(Z.currentTarget.dispatchEvent(se),!se.defaultPrevented){const ye=j().filter(k=>k.focusable),me=ye.find(k=>k.active),ve=ye.find(k=>k.id===E),te=[me,ve,...ye].filter(Boolean).map(k=>k.ref.current);T_(te,g)}}O.current=!1}),onBlur:Te(e.onBlur,()=>T(!1))})})}),R_="RovingFocusGroupItem",A_=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:s,children:u,...d}=e,f=gn(),h=s||f,g=mL(R_,n),b=g.currentTabStopId===h,x=E_(n),{onFocusableItemAdd:S,onFocusableItemRemove:w,currentTabStopId:E}=g;return y.useEffect(()=>{if(a)return S(),()=>w()},[a,S,w]),p.jsx(Eg.ItemSlot,{scope:n,id:h,focusable:a,active:i,children:p.jsx(We.span,{tabIndex:b?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:Te(e.onMouseDown,C=>{a?g.onItemFocus(h):C.preventDefault()}),onFocus:Te(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Te(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const R=yL(C,g.orientation,g.dir);if(R!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let D=x().filter(j=>j.focusable).map(j=>j.ref.current);if(R==="last")D.reverse();else if(R==="prev"||R==="next"){R==="prev"&&D.reverse();const j=D.indexOf(C.currentTarget);D=g.loop?xL(D,j+1):D.slice(j+1)}setTimeout(()=>T_(D))}}),children:typeof u=="function"?u({isCurrentTabStop:b,hasTabStop:E!=null}):u})})});A_.displayName=R_;var gL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yL(e,t,n){const a=vL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return gL[a]}function T_(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function xL(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var bL=C_,SL=A_,_g=["Enter"," "],wL=["ArrowDown","PageUp","Home"],D_=["ArrowUp","PageDown","End"],EL=[...wL,...D_],_L={ltr:[..._g,"ArrowRight"],rtl:[..._g,"ArrowLeft"]},CL={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pu="Menu",[pu,RL,AL]=Nv(Pu),[Si,M_]=ea(Pu,[AL,To,__]),Uf=To(),O_=__(),[TL,wi]=Si(Pu),[DL,zu]=Si(Pu),N_=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:i,onOpenChange:s,modal:u=!0}=e,d=Uf(t),[f,h]=y.useState(null),g=y.useRef(!1),b=Wr(s),x=jv(i);return y.useEffect(()=>{const S=()=>{g.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>g.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(kf,{...d,children:p.jsx(TL,{scope:t,open:n,onOpenChange:b,content:f,onContentChange:h,children:p.jsx(DL,{scope:t,onClose:y.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:g,dir:x,modal:u,children:a})})})};N_.displayName=Pu;var ML="MenuAnchor",kv=y.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,i=Uf(n);return p.jsx(Nu,{...i,...a,ref:t})});kv.displayName=ML;var Lv="MenuPortal",[OL,j_]=Si(Lv,{forceMount:void 0}),k_=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:i}=e,s=wi(Lv,t);return p.jsx(OL,{scope:t,forceMount:n,children:p.jsx(yr,{present:n||s.open,children:p.jsx(kl,{asChild:!0,container:i,children:a})})})};k_.displayName=Lv;var pr="MenuContent",[NL,Pv]=Si(pr),L_=y.forwardRef((e,t)=>{const n=j_(pr,e.__scopeMenu),{forceMount:a=n.forceMount,...i}=e,s=wi(pr,e.__scopeMenu),u=zu(pr,e.__scopeMenu);return p.jsx(pu.Provider,{scope:e.__scopeMenu,children:p.jsx(yr,{present:a||s.open,children:p.jsx(pu.Slot,{scope:e.__scopeMenu,children:u.modal?p.jsx(jL,{...i,ref:t}):p.jsx(kL,{...i,ref:t})})})})}),jL=y.forwardRef((e,t)=>{const n=wi(pr,e.__scopeMenu),a=y.useRef(null),i=St(t,a);return y.useEffect(()=>{const s=a.current;if(s)return _f(s)},[]),p.jsx(zv,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kL=y.forwardRef((e,t)=>{const n=wi(pr,e.__scopeMenu);return p.jsx(zv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),LL=xo("MenuContent.ScrollLock"),zv=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:x,onDismiss:S,disableOutsideScroll:w,...E}=e,C=wi(pr,n),R=zu(pr,n),T=Uf(n),D=O_(n),j=RL(n),[O,M]=y.useState(null),I=y.useRef(null),Z=St(t,I,C.onContentChange),ee=y.useRef(0),se=y.useRef(""),ye=y.useRef(0),me=y.useRef(null),ve=y.useRef("right"),ce=y.useRef(0),te=w?Mu:y.Fragment,k=w?{as:LL,allowPinchZoom:!0}:void 0,q=re=>{var ue,Ce;const N=se.current+re,H=j().filter(Le=>!Le.disabled),P=document.activeElement,B=(ue=H.find(Le=>Le.ref.current===P))==null?void 0:ue.textValue,oe=H.map(Le=>Le.textValue),de=ZL(oe,N,B),pe=(Ce=H.find(Le=>Le.textValue===de))==null?void 0:Ce.ref.current;(function Le(ke){se.current=ke,window.clearTimeout(ee.current),ke!==""&&(ee.current=window.setTimeout(()=>Le(""),1e3))})(N),pe&&setTimeout(()=>pe.focus())};y.useEffect(()=>()=>window.clearTimeout(ee.current),[]),wf();const V=y.useCallback(re=>{var H,P;return ve.current===((H=me.current)==null?void 0:H.side)&&KL(re,(P=me.current)==null?void 0:P.area)},[]);return p.jsx(NL,{scope:n,searchRef:se,onItemEnter:y.useCallback(re=>{V(re)&&re.preventDefault()},[V]),onItemLeave:y.useCallback(re=>{var N;V(re)||((N=I.current)==null||N.focus(),M(null))},[V]),onTriggerLeave:y.useCallback(re=>{V(re)&&re.preventDefault()},[V]),pointerGraceTimerRef:ye,onPointerGraceIntentChange:y.useCallback(re=>{me.current=re},[]),children:p.jsx(te,{...k,children:p.jsx(Du,{asChild:!0,trapped:i,onMountAutoFocus:Te(s,re=>{var N;re.preventDefault(),(N=I.current)==null||N.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:p.jsx(jl,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:x,onDismiss:S,children:p.jsx(bL,{asChild:!0,...D,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:O,onCurrentTabStopIdChange:M,onEntryFocus:Te(f,re=>{R.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Lf,{role:"menu","aria-orientation":"vertical","data-state":X_(C.open),"data-radix-menu-content":"",dir:R.dir,...T,...E,ref:Z,style:{outline:"none",...E.style},onKeyDown:Te(E.onKeyDown,re=>{const H=re.target.closest("[data-radix-menu-content]")===re.currentTarget,P=re.ctrlKey||re.altKey||re.metaKey,B=re.key.length===1;H&&(re.key==="Tab"&&re.preventDefault(),!P&&B&&q(re.key));const oe=I.current;if(re.target!==oe||!EL.includes(re.key))return;re.preventDefault();const pe=j().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);D_.includes(re.key)&&pe.reverse(),GL(pe)}),onBlur:Te(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(ee.current),se.current="")}),onPointerMove:Te(e.onPointerMove,gu(re=>{const N=re.target,H=ce.current!==re.clientX;if(re.currentTarget.contains(N)&&H){const P=re.clientX>ce.current?"right":"left";ve.current=P,ce.current=re.clientX}}))})})})})})})});L_.displayName=pr;var PL="MenuGroup",Fv=y.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return p.jsx(We.div,{role:"group",...a,ref:t})});Fv.displayName=PL;var zL="MenuLabel",P_=y.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return p.jsx(We.div,{...a,ref:t})});P_.displayName=zL;var Gd="MenuItem",dw="menu.itemSelect",If=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...i}=e,s=y.useRef(null),u=zu(Gd,e.__scopeMenu),d=Pv(Gd,e.__scopeMenu),f=St(t,s),h=y.useRef(!1),g=()=>{const b=s.current;if(!n&&b){const x=new CustomEvent(dw,{bubbles:!0,cancelable:!0});b.addEventListener(dw,S=>a==null?void 0:a(S),{once:!0}),u1(b,x),x.defaultPrevented?h.current=!1:u.onClose()}};return p.jsx(z_,{...i,ref:f,disabled:n,onClick:Te(e.onClick,g),onPointerDown:b=>{var x;(x=e.onPointerDown)==null||x.call(e,b),h.current=!0},onPointerUp:Te(e.onPointerUp,b=>{var x;h.current||(x=b.currentTarget)==null||x.click()}),onKeyDown:Te(e.onKeyDown,b=>{const x=d.searchRef.current!=="";n||x&&b.key===" "||_g.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});If.displayName=Gd;var z_=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:i,...s}=e,u=Pv(Gd,n),d=O_(n),f=y.useRef(null),h=St(t,f),[g,b]=y.useState(!1),[x,S]=y.useState("");return y.useEffect(()=>{const w=f.current;w&&S((w.textContent??"").trim())},[s.children]),p.jsx(pu.ItemSlot,{scope:n,disabled:a,textValue:i??x,children:p.jsx(SL,{asChild:!0,...d,focusable:!a,children:p.jsx(We.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:h,onPointerMove:Te(e.onPointerMove,gu(w=>{a?u.onItemLeave(w):(u.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Te(e.onPointerLeave,gu(w=>u.onItemLeave(w))),onFocus:Te(e.onFocus,()=>b(!0)),onBlur:Te(e.onBlur,()=>b(!1))})})})}),FL="MenuCheckboxItem",F_=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...i}=e;return p.jsx(H_,{scope:e.__scopeMenu,checked:n,children:p.jsx(If,{role:"menuitemcheckbox","aria-checked":qd(n)?"mixed":n,...i,ref:t,"data-state":Iv(n),onSelect:Te(i.onSelect,()=>a==null?void 0:a(qd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});F_.displayName=FL;var U_="MenuRadioGroup",[UL,IL]=Si(U_,{value:void 0,onValueChange:()=>{}}),I_=y.forwardRef((e,t)=>{const{value:n,onValueChange:a,...i}=e,s=Wr(a);return p.jsx(UL,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Fv,{...i,ref:t})})});I_.displayName=U_;var V_="MenuRadioItem",$_=y.forwardRef((e,t)=>{const{value:n,...a}=e,i=IL(V_,e.__scopeMenu),s=n===i.value;return p.jsx(H_,{scope:e.__scopeMenu,checked:s,children:p.jsx(If,{role:"menuitemradio","aria-checked":s,...a,ref:t,"data-state":Iv(s),onSelect:Te(a.onSelect,()=>{var u;return(u=i.onValueChange)==null?void 0:u.call(i,n)},{checkForDefaultPrevented:!1})})})});$_.displayName=V_;var Uv="MenuItemIndicator",[H_,VL]=Si(Uv,{checked:!1}),B_=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...i}=e,s=VL(Uv,n);return p.jsx(yr,{present:a||qd(s.checked)||s.checked===!0,children:p.jsx(We.span,{...i,ref:t,"data-state":Iv(s.checked)})})});B_.displayName=Uv;var $L="MenuSeparator",G_=y.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return p.jsx(We.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});G_.displayName=$L;var HL="MenuArrow",q_=y.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,i=Uf(n);return p.jsx(Pf,{...i,...a,ref:t})});q_.displayName=HL;var BL="MenuSub",[_$,Z_]=Si(BL),eu="MenuSubTrigger",Y_=y.forwardRef((e,t)=>{const n=wi(eu,e.__scopeMenu),a=zu(eu,e.__scopeMenu),i=Z_(eu,e.__scopeMenu),s=Pv(eu,e.__scopeMenu),u=y.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=s,h={__scopeMenu:e.__scopeMenu},g=y.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return y.useEffect(()=>g,[g]),y.useEffect(()=>{const b=d.current;return()=>{window.clearTimeout(b),f(null)}},[d,f]),p.jsx(kv,{asChild:!0,...h,children:p.jsx(z_,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":X_(n.open),...e,ref:Ca(t,i.onTriggerChange),onClick:b=>{var x;(x=e.onClick)==null||x.call(e,b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Te(e.onPointerMove,gu(b=>{s.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Te(e.onPointerLeave,gu(b=>{var S,w;g();const x=(S=n.content)==null?void 0:S.getBoundingClientRect();if(x){const E=(w=n.content)==null?void 0:w.dataset.side,C=E==="right",R=C?-5:5,T=x[C?"left":"right"],D=x[C?"right":"left"];s.onPointerGraceIntentChange({area:[{x:b.clientX+R,y:b.clientY},{x:T,y:x.top},{x:D,y:x.top},{x:D,y:x.bottom},{x:T,y:x.bottom}],side:E}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(b),b.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Te(e.onKeyDown,b=>{var S;const x=s.searchRef.current!=="";e.disabled||x&&b.key===" "||_L[a.dir].includes(b.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),b.preventDefault())})})})});Y_.displayName=eu;var K_="MenuSubContent",Q_=y.forwardRef((e,t)=>{const n=j_(pr,e.__scopeMenu),{forceMount:a=n.forceMount,...i}=e,s=wi(pr,e.__scopeMenu),u=zu(pr,e.__scopeMenu),d=Z_(K_,e.__scopeMenu),f=y.useRef(null),h=St(t,f);return p.jsx(pu.Provider,{scope:e.__scopeMenu,children:p.jsx(yr,{present:a||s.open,children:p.jsx(pu.Slot,{scope:e.__scopeMenu,children:p.jsx(zv,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var b;u.isUsingKeyboardRef.current&&((b=f.current)==null||b.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Te(e.onFocusOutside,g=>{g.target!==d.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Te(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:Te(e.onKeyDown,g=>{var S;const b=g.currentTarget.contains(g.target),x=CL[u.dir].includes(g.key);b&&x&&(s.onOpenChange(!1),(S=d.trigger)==null||S.focus(),g.preventDefault())})})})})})});Q_.displayName=K_;function X_(e){return e?"open":"closed"}function qd(e){return e==="indeterminate"}function Iv(e){return qd(e)?"indeterminate":e?"checked":"unchecked"}function GL(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qL(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function ZL(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=qL(e,Math.max(s,0));i.length===1&&(u=u.filter(h=>h!==n));const f=u.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function YL(e,t){const{x:n,y:a}=e;let i=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const d=t[s],f=t[u],h=d.x,g=d.y,b=f.x,x=f.y;g>a!=x>a&&n<(b-h)*(a-g)/(x-g)+h&&(i=!i)}return i}function KL(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return YL(n,t)}function gu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var QL=N_,XL=kv,WL=k_,JL=L_,eP=Fv,tP=P_,nP=If,rP=F_,aP=I_,oP=$_,iP=B_,lP=G_,sP=q_,uP=Y_,cP=Q_,Vf="DropdownMenu",[dP,C$]=ea(Vf,[M_]),An=M_(),[fP,W_]=dP(Vf),J_=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:i,defaultOpen:s,onOpenChange:u,modal:d=!0}=e,f=An(t),h=y.useRef(null),[g,b]=ui({prop:i,defaultProp:s??!1,onChange:u,caller:Vf});return p.jsx(fP,{scope:t,triggerId:gn(),triggerRef:h,contentId:gn(),open:g,onOpenChange:b,onOpenToggle:y.useCallback(()=>b(x=>!x),[b]),modal:d,children:p.jsx(QL,{...f,open:g,onOpenChange:b,dir:a,modal:d,children:n})})};J_.displayName=Vf;var eC="DropdownMenuTrigger",tC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...i}=e,s=W_(eC,n),u=An(n);return p.jsx(XL,{asChild:!0,...u,children:p.jsx(We.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:Ca(t,s.triggerRef),onPointerDown:Te(e.onPointerDown,d=>{!a&&d.button===0&&d.ctrlKey===!1&&(s.onOpenToggle(),s.open||d.preventDefault())}),onKeyDown:Te(e.onKeyDown,d=>{a||(["Enter"," "].includes(d.key)&&s.onOpenToggle(),d.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});tC.displayName=eC;var hP="DropdownMenuPortal",nC=e=>{const{__scopeDropdownMenu:t,...n}=e,a=An(t);return p.jsx(WL,{...a,...n})};nC.displayName=hP;var rC="DropdownMenuContent",aC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=W_(rC,n),s=An(n),u=y.useRef(!1);return p.jsx(JL,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...a,ref:t,onCloseAutoFocus:Te(e.onCloseAutoFocus,d=>{var f;u.current||(f=i.triggerRef.current)==null||f.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:Te(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,g=f.button===2||h;(!i.modal||g)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aC.displayName=rC;var mP="DropdownMenuGroup",pP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(eP,{...i,...a,ref:t})});pP.displayName=mP;var gP="DropdownMenuLabel",vP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(tP,{...i,...a,ref:t})});vP.displayName=gP;var yP="DropdownMenuItem",oC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(nP,{...i,...a,ref:t})});oC.displayName=yP;var xP="DropdownMenuCheckboxItem",bP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(rP,{...i,...a,ref:t})});bP.displayName=xP;var SP="DropdownMenuRadioGroup",wP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(aP,{...i,...a,ref:t})});wP.displayName=SP;var EP="DropdownMenuRadioItem",_P=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(oP,{...i,...a,ref:t})});_P.displayName=EP;var CP="DropdownMenuItemIndicator",RP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(iP,{...i,...a,ref:t})});RP.displayName=CP;var AP="DropdownMenuSeparator",iC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(lP,{...i,...a,ref:t})});iC.displayName=AP;var TP="DropdownMenuArrow",DP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(sP,{...i,...a,ref:t})});DP.displayName=TP;var MP="DropdownMenuSubTrigger",OP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(uP,{...i,...a,ref:t})});OP.displayName=MP;var NP="DropdownMenuSubContent",jP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,i=An(n);return p.jsx(cP,{...i,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jP.displayName=NP;var kP=J_,LP=tC,PP=nC,lC=aC,sC=oC,uC=iC;const zl=kP,Fl=LP,Ei=y.forwardRef(({className:e,sideOffset:t=4,...n},a)=>p.jsx(PP,{children:p.jsx(lC,{ref:a,sideOffset:t,className:Se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),...n})}));Ei.displayName=lC.displayName;const Qr=y.forwardRef(({className:e,inset:t,...n},a)=>p.jsx(sC,{ref:a,className:Se("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Qr.displayName=sC.displayName;const $f=y.forwardRef(({className:e,...t},n)=>p.jsx(uC,{ref:n,className:Se("bg-muted -mx-1 my-1 h-px",e),...t}));$f.displayName=uC.displayName;const zP="data:image/svg+xml,%3csvg%20width='45'%20height='36'%20viewBox='0%200%2045%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1026_9)'%3e%3cpath%20d='M41.0124%202.70808C42.5841%204.28086%2043.2307%206.93134%2043.2307%206.93134C43.2307%206.93134%2044.1924%2012.2686%2044.1924%2019.5152C44.1924%209.25778%2040.7126%207.4971%2028.6169%207.4971H17.4622C11.2702%207.4971%2011.689%2013.72%2011.2702%2016.6815L10.7614%2021.156C10.5171%2025.8635%2011.3345%2028.7805%2016.1644%2028.7805C6.09372%2028.7805%200.499987%2030.4294%200.5%2016.2326C0.499994%209.80708%201.46893%206.93134%201.46893%206.93134C1.46893%206.93134%202.11548%204.28086%203.69048%202.70808C5.26549%201.13349%207.5998%200.975453%207.5998%200.975453C7.5998%200.975453%2012.4195%200.25%2021.9403%200.25C31.4612%200.25%2036.84%200.975453%2036.84%200.975453C36.84%200.975453%2039.4359%201.13349%2041.0124%202.70808Z'%20fill='url(%23paint0_linear_1026_9)'/%3e%3cpath%20d='M44.1907%2019.8412C44.1913%2019.9695%2044.1916%2020.0989%2044.1916%2020.2295C44.1916%2026.3837%2043.2754%2028.779%2043.2754%2028.779C43.2754%2028.779%2042.5584%2031.6808%2041.3343%2032.9343C39.3918%2034.9233%2037.3144%2035.0343%2037.3144%2035.0343C37.3144%2035.0343%2032.8453%2035.75%2023.229%2035.75C14.0031%2035.75%207.85921%2035.0387%207.85921%2035.0387C7.85921%2035.0387%205.26504%2034.8795%203.69004%2033.3064C2.11504%2031.7307%201.46849%2028.779%201.46849%2028.779C1.46849%2028.779%200.5%2022.7163%200.5%2016.0794C0.499988%2028.8752%205.0442%2028.7984%2013.3149%2028.6587H13.3149C14.2204%2028.6434%2015.1706%2028.6273%2016.1644%2028.6273H27.318C32.2013%2028.6273%2033.3039%2025.0731%2033.5164%2021.0028L34.0267%2014.7934C34.1626%2012.2409%2033.8337%2010.4287%2033.0336%209.26241C32.1612%207.99016%2030.6747%207.3439%2028.6169%207.3439C41.4253%207.3439%2044.1022%209.05998%2044.1907%2019.8412Z'%20fill='url(%23paint1_linear_1026_9)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_1026_9'%20x1='22.2878'%20y1='0.25'%20x2='22.4818'%20y2='30.5768'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2305D2FF'/%3e%3cstop%20offset='0.156227'%20stop-color='%2321A1F1'/%3e%3cstop%20offset='0.407114'%20stop-color='%231E88E5'/%3e%3cstop%20offset='0.72248'%20stop-color='%231E6EE5'/%3e%3cstop%20offset='1'%20stop-color='%23182FFF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_1026_9'%20x1='3.17783'%20y1='35.6937'%20x2='37.9386'%20y2='5.41095'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2324D8FF'/%3e%3cstop%20offset='0.156227'%20stop-color='%2321A1F1'/%3e%3cstop%20offset='0.407114'%20stop-color='%231E88E5'/%3e%3cstop%20offset='0.749106'%20stop-color='%231E7AE5'/%3e%3cstop%20offset='1'%20stop-color='%230046F9'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_1026_9'%3e%3crect%20width='45'%20height='36'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",FP=({width:e=45,height:t=36,className:n=""})=>p.jsx("img",{src:zP,alt:"OWOX Logo",width:e,height:t,className:n}),UP=({className:e,size:t=24})=>p.jsx("svg",{role:"img",viewBox:"0 0 24 24",width:t,height:t,className:e,xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fill:"currentColor",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})}),IP=({className:e,size:t=24})=>p.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,style:{minWidth:t,minHeight:t},children:[p.jsx("path",{d:"M10.6842 44.2221L0.419465 26.278C-0.139822 25.3001 -0.139822 23.6999 0.419465 22.722L10.6842 4.77786C11.2435 3.79993 12.6166 3 13.7355 3H34.265C35.3838 3 36.7567 3.79993 37.3163 4.77786L47.5801 22.722C48.14 23.6999 48.14 25.3001 47.5801 26.278L37.3163 44.2221C36.7567 45.2001 35.3838 46 34.265 46H13.7355C12.6166 46 11.2435 45.2001 10.6842 44.2221Z",fill:"#4486FA"}),p.jsx("path",{d:"M30.6154 18.3848L43.6923 32.8463L37.3828 43.85C36.8268 44.8118 35.4628 45.5986 34.3511 45.5986L17.5385 30.0771L30.6154 18.3848Z",fill:"#3778ED"}),p.jsx("path",{d:"M24.1539 33.1537C28.997 33.1537 32.9231 29.2276 32.9231 24.3845C32.9231 19.5414 28.997 15.6152 24.1539 15.6152C19.3108 15.6152 15.3846 19.5414 15.3846 24.3845C15.3846 29.2276 19.3108 33.1537 24.1539 33.1537Z",fill:"white"}),p.jsx("path",{d:"M31.2681 29.2331L34.3825 32.3476C34.7428 32.7079 34.7428 33.2925 34.3825 33.6528L33.7296 34.3057C33.3693 34.666 32.7847 34.666 32.4244 34.3057L29.3099 31.1913C28.9496 30.831 28.9496 30.2464 29.3099 29.886L29.9628 29.2331C30.3231 28.8728 30.9077 28.8728 31.2681 29.2331Z",fill:"white"}),p.jsx("path",{d:"M24.1538 31.0003C27.8074 31.0003 30.7692 28.0385 30.7692 24.3849C30.7692 20.7313 27.8074 17.7695 24.1538 17.7695C20.5003 17.7695 17.5385 20.7313 17.5385 24.3849C17.5385 28.0385 20.5003 31.0003 24.1538 31.0003Z",fill:"#4486FA"}),p.jsx("path",{d:"M24.1538 29.4615C26.9577 29.4615 29.2308 27.1884 29.2308 24.3845C29.2308 21.5806 26.9577 19.3076 24.1538 19.3076C21.3499 19.3076 19.0769 21.5806 19.0769 24.3845C19.0769 27.1884 21.3499 29.4615 24.1538 29.4615Z",fill:"#4486FA"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.3846 21.4619H25.2308V29.4619H23.3846V21.4619ZM26.4615 24.8465H28.3077V28.5388H26.4615V24.8465ZM21.8462 23.6158H20V28.5388H21.8462V23.6158Z",fill:"white"})]}),VP=({className:e,size:t=24})=>p.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,style:{minWidth:t,minHeight:t},children:[p.jsx("path",{d:"M24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46Z",fill:"#FF9900"}),p.jsx("path",{d:"M16.9283 17.9315V32.0659L24 36.1323L31.0717 32.0659V17.9315L24 13.8651L16.9283 17.9315Z",fill:"#FFFFFF"}),p.jsx("path",{d:"M24 18.7983L16.9283 14.732V26.8994L24 30.9658V18.7983Z",fill:"#D86613"}),p.jsx("path",{d:"M24 18.7983L31.0717 14.732V26.8994L24 30.9658V18.7983Z",fill:"#FFFFFF"}),p.jsx("path",{d:"M16.9283 26.8994L24 22.8331L31.0717 26.8994L24 30.9658L16.9283 26.8994Z",fill:"#D86613"})]}),$P=[{title:"GitHub Community",href:"https://github.com/OWOX/owox-data-marts",icon:UP},{title:"OWOX Website",href:"https://www.owox.com/",icon:CN},{type:"separator"},{title:"Discussions",href:"https://github.com/OWOX/owox-data-marts/discussions",icon:jN},{title:"Issues",href:"https://github.com/OWOX/owox-data-marts/issues",icon:uN},{type:"separator"},{title:"License",href:"https://github.com/OWOX/owox-data-marts#License-1-ov-file",icon:IN}];function HP(){const[e,t]=y.useState(!1),[n,a]=y.useState(0),i=y.useRef(null);return y.useLayoutEffect(()=>{i.current&&a(i.current.offsetWidth)},[]),p.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:"flex flex-col gap-2",children:p.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:"flex w-full min-w-0 flex-col gap-1",children:p.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:"group/menu-item relative",children:p.jsxs(zl,{open:e,onOpenChange:t,children:[p.jsx(Fl,{asChild:!0,children:p.jsxs("button",{ref:i,type:"button","data-slot":"dropdown-menu-trigger","data-sidebar":"menu-button","data-size":"lg","data-active":e?"true":"false","aria-haspopup":"menu","aria-expanded":e,"data-state":e?"open":"closed",className:"peer/menu-button ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-0! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",children:[p.jsx("div",{className:"text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-md border bg-white dark:bg-white/10",children:p.jsx(FP,{width:24,height:24})}),p.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[p.jsx("span",{className:"truncate font-medium",children:"OWOX Data Marts"}),p.jsx("span",{className:"text-muted-foreground truncate text-xs",children:"Community Edition"})]}),p.jsx(Ml,{className:`ml-auto size-4 transition-transform duration-200 ${e?"rotate-180":""}`})]})}),p.jsx(Ei,{align:"start",sideOffset:8,style:{width:n>0?n:void 0},className:"w-[var(--radix-dropdown-trigger-width)]",children:$P.map((s,u)=>{if(s.type==="separator")return p.jsx($f,{},`separator-${String(u)}`);const d=s.icon;return p.jsx(Qr,{asChild:!0,children:p.jsxs("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[p.jsx(d,{className:"size-4"}),s.title]})},s.href)})})]})})})})}const BP=[{title:"Overview",url:"/data-marts",icon:AN},{title:"Data Storages",url:"/data-storages",icon:KE}];function GP({variant:e="inset",collapsible:t="icon"}){return p.jsxs($k,{variant:e,collapsible:t,children:[p.jsx(qk,{children:p.jsx(HP,{})}),p.jsxs(Yk,{children:[p.jsx(sw,{children:p.jsx(uw,{children:p.jsxs(Fd,{to:"/data-marts/create","data-sidebar":"menu-button","data-size":"md",className:"peer/menu-button ring-sidebar-ring bg-brand-blue-500 hover:bg-brand-blue-600 text-brand-blue-500-foreground hover:text-brand-blue-600-foreground flex h-8 w-full items-center gap-2 overflow-hidden rounded-full p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-0! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",children:[p.jsx("div",{className:"flex aspect-square size-8 items-center justify-center",children:p.jsx(dv,{className:"size-4 shrink-0"})}),p.jsx("div",{className:"grid flex-1 text-left text-sm leading-tight",children:p.jsx("span",{className:"truncate font-medium",children:"Create new data mart"})})]})})}),p.jsx(sw,{children:p.jsx(uw,{children:p.jsx(Kk,{children:BP.map(n=>p.jsx(Qk,{children:p.jsx(Fd,{to:n.url,className:({isActive:a})=>`flex w-full items-center gap-2 rounded-md transition-colors ${a?"bg-sidebar-active text-sidebar-active-foreground hover:bg-sidebar-active hover:text-sidebar-active-foreground font-medium shadow-sm":"hover:bg-sidebar-active hover:text-sidebar-active-foreground"}`,children:p.jsxs(Wk,{children:[y.createElement(n.icon,{className:"size-4 shrink-0 transition-all "}),p.jsx("span",{children:n.title})]})})},n.title))})})})]}),p.jsx(Zk,{className:"p-2",children:p.jsx(sL,{})}),p.jsx(Bk,{})]})}function qP({children:e,...t}){return p.jsx(nL,{attribute:"class",defaultTheme:"system",enableSystem:!0,...t,children:e})}function cC(e,t){return function(){return e.apply(t,arguments)}}const{toString:ZP}=Object.prototype,{getPrototypeOf:Vv}=Object,{iterator:Hf,toStringTag:dC}=Symbol,Bf=(e=>t=>{const n=ZP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Bf(t)===e),Gf=e=>t=>typeof t===e,{isArray:Ul}=Array,vu=Gf("undefined");function YP(e){return e!==null&&!vu(e)&&e.constructor!==null&&!vu(e.constructor)&&Pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fC=zr("ArrayBuffer");function KP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fC(e.buffer),t}const QP=Gf("string"),Pn=Gf("function"),hC=Gf("number"),qf=e=>e!==null&&typeof e=="object",XP=e=>e===!0||e===!1,Td=e=>{if(Bf(e)!=="object")return!1;const t=Vv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dC in e)&&!(Hf in e)},WP=zr("Date"),JP=zr("File"),e5=zr("Blob"),t5=zr("FileList"),n5=e=>qf(e)&&Pn(e.pipe),r5=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pn(e.append)&&((t=Bf(e))==="formdata"||t==="object"&&Pn(e.toString)&&e.toString()==="[object FormData]"))},a5=zr("URLSearchParams"),[o5,i5,l5,s5]=["ReadableStream","Request","Response","Headers"].map(zr),u5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let a,i;if(typeof e!="object"&&(e=[e]),Ul(e))for(a=0,i=e.length;a<i;a++)t.call(null,e[a],a,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;let d;for(a=0;a<u;a++)d=s[a],t.call(null,e[d],d,e)}}function mC(e,t){t=t.toLowerCase();const n=Object.keys(e);let a=n.length,i;for(;a-- >0;)if(i=n[a],t===i.toLowerCase())return i;return null}const ri=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pC=e=>!vu(e)&&e!==ri;function Cg(){const{caseless:e}=pC(this)&&this||{},t={},n=(a,i)=>{const s=e&&mC(t,i)||i;Td(t[s])&&Td(a)?t[s]=Cg(t[s],a):Td(a)?t[s]=Cg({},a):Ul(a)?t[s]=a.slice():t[s]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Fu(arguments[a],n);return t}const c5=(e,t,n,{allOwnKeys:a}={})=>(Fu(t,(i,s)=>{n&&Pn(i)?e[s]=cC(i,n):e[s]=i},{allOwnKeys:a}),e),d5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),f5=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},h5=(e,t,n,a)=>{let i,s,u;const d={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)u=i[s],(!a||a(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=n!==!1&&Vv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},m5=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},p5=e=>{if(!e)return null;if(Ul(e))return e;let t=e.length;if(!hC(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},g5=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vv(Uint8Array)),v5=(e,t)=>{const a=(e&&e[Hf]).call(e);let i;for(;(i=a.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},y5=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},x5=zr("HTMLFormElement"),b5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,i){return a.toUpperCase()+i}),fw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),S5=zr("RegExp"),gC=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};Fu(n,(i,s)=>{let u;(u=t(i,s,e))!==!1&&(a[s]=u||i)}),Object.defineProperties(e,a)},w5=e=>{gC(e,(t,n)=>{if(Pn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(Pn(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},E5=(e,t)=>{const n={},a=i=>{i.forEach(s=>{n[s]=!0})};return Ul(e)?a(e):a(String(e).split(t)),n},_5=()=>{},C5=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function R5(e){return!!(e&&Pn(e.append)&&e[dC]==="FormData"&&e[Hf])}const A5=e=>{const t=new Array(10),n=(a,i)=>{if(qf(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[i]=a;const s=Ul(a)?[]:{};return Fu(a,(u,d)=>{const f=n(u,i+1);!vu(f)&&(s[d]=f)}),t[i]=void 0,s}}return a};return n(e,0)},T5=zr("AsyncFunction"),D5=e=>e&&(qf(e)||Pn(e))&&Pn(e.then)&&Pn(e.catch),vC=((e,t)=>e?setImmediate:t?((n,a)=>(ri.addEventListener("message",({source:i,data:s})=>{i===ri&&s===n&&a.length&&a.shift()()},!1),i=>{a.push(i),ri.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pn(ri.postMessage)),M5=typeof queueMicrotask<"u"?queueMicrotask.bind(ri):typeof process<"u"&&process.nextTick||vC,O5=e=>e!=null&&Pn(e[Hf]),ne={isArray:Ul,isArrayBuffer:fC,isBuffer:YP,isFormData:r5,isArrayBufferView:KP,isString:QP,isNumber:hC,isBoolean:XP,isObject:qf,isPlainObject:Td,isReadableStream:o5,isRequest:i5,isResponse:l5,isHeaders:s5,isUndefined:vu,isDate:WP,isFile:JP,isBlob:e5,isRegExp:S5,isFunction:Pn,isStream:n5,isURLSearchParams:a5,isTypedArray:g5,isFileList:t5,forEach:Fu,merge:Cg,extend:c5,trim:u5,stripBOM:d5,inherits:f5,toFlatObject:h5,kindOf:Bf,kindOfTest:zr,endsWith:m5,toArray:p5,forEachEntry:v5,matchAll:y5,isHTMLForm:x5,hasOwnProperty:fw,hasOwnProp:fw,reduceDescriptors:gC,freezeMethods:w5,toObjectSet:E5,toCamelCase:b5,noop:_5,toFiniteNumber:C5,findKey:mC,global:ri,isContextDefined:pC,isSpecCompliantForm:R5,toJSONObject:A5,isAsyncFn:T5,isThenable:D5,setImmediate:vC,asap:M5,isIterable:O5};function rt(e,t,n,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status?i.status:null)}ne.inherits(rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ne.toJSONObject(this.config),code:this.code,status:this.status}}});const yC=rt.prototype,xC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xC[e]={value:e}});Object.defineProperties(rt,xC);Object.defineProperty(yC,"isAxiosError",{value:!0});rt.from=(e,t,n,a,i,s)=>{const u=Object.create(yC);return ne.toFlatObject(e,u,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),rt.call(u,e.message,t,n,a,i),u.cause=e,u.name=e.name,s&&Object.assign(u,s),u};const N5=null;function Rg(e){return ne.isPlainObject(e)||ne.isArray(e)}function bC(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function hw(e,t,n){return e?e.concat(t).map(function(i,s){return i=bC(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function j5(e){return ne.isArray(e)&&!e.some(Rg)}const k5=ne.toFlatObject(ne,{},null,function(t){return/^is[A-Z]/.test(t)});function Zf(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,C){return!ne.isUndefined(C[E])});const a=n.metaTokens,i=n.visitor||g,s=n.dots,u=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(i))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(ne.isDate(w))return w.toISOString();if(!f&&ne.isBlob(w))throw new rt("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(w)||ne.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function g(w,E,C){let R=w;if(w&&!C&&typeof w=="object"){if(ne.endsWith(E,"{}"))E=a?E:E.slice(0,-2),w=JSON.stringify(w);else if(ne.isArray(w)&&j5(w)||(ne.isFileList(w)||ne.endsWith(E,"[]"))&&(R=ne.toArray(w)))return E=bC(E),R.forEach(function(D,j){!(ne.isUndefined(D)||D===null)&&t.append(u===!0?hw([E],j,s):u===null?E:E+"[]",h(D))}),!1}return Rg(w)?!0:(t.append(hw(C,E,s),h(w)),!1)}const b=[],x=Object.assign(k5,{defaultVisitor:g,convertValue:h,isVisitable:Rg});function S(w,E){if(!ne.isUndefined(w)){if(b.indexOf(w)!==-1)throw Error("Circular reference detected in "+E.join("."));b.push(w),ne.forEach(w,function(R,T){(!(ne.isUndefined(R)||R===null)&&i.call(t,R,ne.isString(T)?T.trim():T,E,x))===!0&&S(R,E?E.concat(T):[T])}),b.pop()}}if(!ne.isObject(e))throw new TypeError("data must be an object");return S(e),t}function mw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function $v(e,t){this._pairs=[],e&&Zf(e,this,t)}const SC=$v.prototype;SC.append=function(t,n){this._pairs.push([t,n])};SC.toString=function(t){const n=t?function(a){return t.call(this,a,mw)}:mw;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function L5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wC(e,t,n){if(!t)return e;const a=n&&n.encode||L5;ne.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=ne.isURLSearchParams(t)?t.toString():new $v(t,n).toString(a),s){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class pw{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ne.forEach(this.handlers,function(a){a!==null&&t(a)})}}const EC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P5=typeof URLSearchParams<"u"?URLSearchParams:$v,z5=typeof FormData<"u"?FormData:null,F5=typeof Blob<"u"?Blob:null,U5={isBrowser:!0,classes:{URLSearchParams:P5,FormData:z5,Blob:F5},protocols:["http","https","file","blob","url","data"]},Hv=typeof window<"u"&&typeof document<"u",Ag=typeof navigator=="object"&&navigator||void 0,I5=Hv&&(!Ag||["ReactNative","NativeScript","NS"].indexOf(Ag.product)<0),V5=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$5=Hv&&window.location.href||"http://localhost",H5=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hv,hasStandardBrowserEnv:I5,hasStandardBrowserWebWorkerEnv:V5,navigator:Ag,origin:$5},Symbol.toStringTag,{value:"Module"})),Sn={...H5,...U5};function B5(e,t){return Zf(e,new Sn.classes.URLSearchParams,Object.assign({visitor:function(n,a,i,s){return Sn.isNode&&ne.isBuffer(n)?(this.append(a,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function G5(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function q5(e){const t={},n=Object.keys(e);let a;const i=n.length;let s;for(a=0;a<i;a++)s=n[a],t[s]=e[s];return t}function _C(e){function t(n,a,i,s){let u=n[s++];if(u==="__proto__")return!0;const d=Number.isFinite(+u),f=s>=n.length;return u=!u&&ne.isArray(i)?i.length:u,f?(ne.hasOwnProp(i,u)?i[u]=[i[u],a]:i[u]=a,!d):((!i[u]||!ne.isObject(i[u]))&&(i[u]=[]),t(n,a,i[u],s)&&ne.isArray(i[u])&&(i[u]=q5(i[u])),!d)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(a,i)=>{t(G5(a),i,n,0)}),n}return null}function Z5(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(n||JSON.stringify)(e)}const Uu={transitional:EC,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const a=n.getContentType()||"",i=a.indexOf("application/json")>-1,s=ne.isObject(t);if(s&&ne.isHTMLForm(t)&&(t=new FormData(t)),ne.isFormData(t))return i?JSON.stringify(_C(t)):t;if(ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t)||ne.isReadableStream(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(s){if(a.indexOf("application/x-www-form-urlencoded")>-1)return B5(t,this.formSerializer).toString();if((d=ne.isFileList(t))||a.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Zf(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),Z5(t)):t}],transformResponse:[function(t){const n=this.transitional||Uu.transitional,a=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ne.isResponse(t)||ne.isReadableStream(t))return t;if(t&&ne.isString(t)&&(a&&!this.responseType||i)){const u=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(d){if(u)throw d.name==="SyntaxError"?rt.from(d,rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sn.classes.FormData,Blob:Sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],e=>{Uu.headers[e]={}});const Y5=ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),K5=e=>{const t={};let n,a,i;return e&&e.split(`
285
- `).forEach(function(u){i=u.indexOf(":"),n=u.substring(0,i).trim().toLowerCase(),a=u.substring(i+1).trim(),!(!n||t[n]&&Y5[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t},gw=Symbol("internals");function qs(e){return e&&String(e).trim().toLowerCase()}function Dd(e){return e===!1||e==null?e:ne.isArray(e)?e.map(Dd):String(e)}function Q5(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const X5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hp(e,t,n,a,i){if(ne.isFunction(a))return a.call(this,t,n);if(i&&(t=n),!!ne.isString(t)){if(ne.isString(a))return t.indexOf(a)!==-1;if(ne.isRegExp(a))return a.test(t)}}function W5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function J5(e,t){const n=ne.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(i,s,u){return this[a].call(this,t,i,s,u)},configurable:!0})})}let zn=class{constructor(t){t&&this.set(t)}set(t,n,a){const i=this;function s(d,f,h){const g=qs(f);if(!g)throw new Error("header name must be a non-empty string");const b=ne.findKey(i,g);(!b||i[b]===void 0||h===!0||h===void 0&&i[b]!==!1)&&(i[b||f]=Dd(d))}const u=(d,f)=>ne.forEach(d,(h,g)=>s(h,g,f));if(ne.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(ne.isString(t)&&(t=t.trim())&&!X5(t))u(K5(t),n);else if(ne.isObject(t)&&ne.isIterable(t)){let d={},f,h;for(const g of t){if(!ne.isArray(g))throw TypeError("Object iterator must return a key-value pair");d[h=g[0]]=(f=d[h])?ne.isArray(f)?[...f,g[1]]:[f,g[1]]:g[1]}u(d,n)}else t!=null&&s(n,t,a);return this}get(t,n){if(t=qs(t),t){const a=ne.findKey(this,t);if(a){const i=this[a];if(!n)return i;if(n===!0)return Q5(i);if(ne.isFunction(n))return n.call(this,i,a);if(ne.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qs(t),t){const a=ne.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||Hp(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let i=!1;function s(u){if(u=qs(u),u){const d=ne.findKey(a,u);d&&(!n||Hp(a,a[d],d,n))&&(delete a[d],i=!0)}}return ne.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let a=n.length,i=!1;for(;a--;){const s=n[a];(!t||Hp(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,a={};return ne.forEach(this,(i,s)=>{const u=ne.findKey(a,s);if(u){n[u]=Dd(i),delete n[s];return}const d=t?W5(s):String(s).trim();d!==s&&delete n[s],n[d]=Dd(i),a[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ne.forEach(this,(a,i)=>{a!=null&&a!==!1&&(n[i]=t&&ne.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
286
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(i=>a.set(i)),a}static accessor(t){const a=(this[gw]=this[gw]={accessors:{}}).accessors,i=this.prototype;function s(u){const d=qs(u);a[d]||(J5(i,u),a[d]=!0)}return ne.isArray(t)?t.forEach(s):s(t),this}};zn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ne.reduceDescriptors(zn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});ne.freezeMethods(zn);function Bp(e,t){const n=this||Uu,a=t||n,i=zn.from(a.headers);let s=a.data;return ne.forEach(e,function(d){s=d.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function CC(e){return!!(e&&e.__CANCEL__)}function Il(e,t,n){rt.call(this,e??"canceled",rt.ERR_CANCELED,t,n),this.name="CanceledError"}ne.inherits(Il,rt,{__CANCEL__:!0});function RC(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new rt("Request failed with status code "+n.status,[rt.ERR_BAD_REQUEST,rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ez(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tz(e,t){e=e||10;const n=new Array(e),a=new Array(e);let i=0,s=0,u;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),g=a[s];u||(u=h),n[i]=f,a[i]=h;let b=s,x=0;for(;b!==i;)x+=n[b++],b=b%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),h-u<t)return;const S=g&&h-g;return S?Math.round(x*1e3/S):void 0}}function nz(e,t){let n=0,a=1e3/t,i,s;const u=(h,g=Date.now())=>{n=g,i=null,s&&(clearTimeout(s),s=null),e.apply(null,h)};return[(...h)=>{const g=Date.now(),b=g-n;b>=a?u(h,g):(i=h,s||(s=setTimeout(()=>{s=null,u(i)},a-b)))},()=>i&&u(i)]}const Zd=(e,t,n=3)=>{let a=0;const i=tz(50,250);return nz(s=>{const u=s.loaded,d=s.lengthComputable?s.total:void 0,f=u-a,h=i(f),g=u<=d;a=u;const b={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:h||void 0,estimated:h&&d&&g?(d-u)/h:void 0,event:s,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(b)},n)},vw=(e,t)=>{const n=e!=null;return[a=>t[0]({lengthComputable:n,total:e,loaded:a}),t[1]]},yw=e=>(...t)=>ne.asap(()=>e(...t)),rz=Sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Sn.origin),Sn.navigator&&/(msie|trident)/i.test(Sn.navigator.userAgent)):()=>!0,az=Sn.hasStandardBrowserEnv?{write(e,t,n,a,i,s){const u=[e+"="+encodeURIComponent(t)];ne.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),ne.isString(a)&&u.push("path="+a),ne.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oz(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function iz(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function AC(e,t,n){let a=!oz(t);return e&&(a||n==!1)?iz(e,t):t}const xw=e=>e instanceof zn?{...e}:e;function fi(e,t){t=t||{};const n={};function a(h,g,b,x){return ne.isPlainObject(h)&&ne.isPlainObject(g)?ne.merge.call({caseless:x},h,g):ne.isPlainObject(g)?ne.merge({},g):ne.isArray(g)?g.slice():g}function i(h,g,b,x){if(ne.isUndefined(g)){if(!ne.isUndefined(h))return a(void 0,h,b,x)}else return a(h,g,b,x)}function s(h,g){if(!ne.isUndefined(g))return a(void 0,g)}function u(h,g){if(ne.isUndefined(g)){if(!ne.isUndefined(h))return a(void 0,h)}else return a(void 0,g)}function d(h,g,b){if(b in t)return a(h,g);if(b in e)return a(void 0,h)}const f={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(h,g,b)=>i(xw(h),xw(g),b,!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),function(g){const b=f[g]||i,x=b(e[g],t[g],g);ne.isUndefined(x)&&b!==d||(n[g]=x)}),n}const TC=e=>{const t=fi({},e);let{data:n,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:s,headers:u,auth:d}=t;t.headers=u=zn.from(u),t.url=wC(AC(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(ne.isFormData(n)){if(Sn.hasStandardBrowserEnv||Sn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((f=u.getContentType())!==!1){const[h,...g]=f?f.split(";").map(b=>b.trim()).filter(Boolean):[];u.setContentType([h||"multipart/form-data",...g].join("; "))}}if(Sn.hasStandardBrowserEnv&&(a&&ne.isFunction(a)&&(a=a(t)),a||a!==!1&&rz(t.url))){const h=i&&s&&az.read(s);h&&u.set(i,h)}return t},lz=typeof XMLHttpRequest<"u",sz=lz&&function(e){return new Promise(function(n,a){const i=TC(e);let s=i.data;const u=zn.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:h}=i,g,b,x,S,w;function E(){S&&S(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function R(){if(!C)return;const D=zn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),O={data:!d||d==="text"||d==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:D,config:e,request:C};RC(function(I){n(I),E()},function(I){a(I),E()},O),C=null}"onloadend"in C?C.onloadend=R:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(R)},C.onabort=function(){C&&(a(new rt("Request aborted",rt.ECONNABORTED,e,C)),C=null)},C.onerror=function(){a(new rt("Network Error",rt.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){let j=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||EC;i.timeoutErrorMessage&&(j=i.timeoutErrorMessage),a(new rt(j,O.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,e,C)),C=null},s===void 0&&u.setContentType(null),"setRequestHeader"in C&&ne.forEach(u.toJSON(),function(j,O){C.setRequestHeader(O,j)}),ne.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),d&&d!=="json"&&(C.responseType=i.responseType),h&&([x,w]=Zd(h,!0),C.addEventListener("progress",x)),f&&C.upload&&([b,S]=Zd(f),C.upload.addEventListener("progress",b),C.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(g=D=>{C&&(a(!D||D.type?new Il(null,e,C):D),C.abort(),C=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const T=ez(i.url);if(T&&Sn.protocols.indexOf(T)===-1){a(new rt("Unsupported protocol "+T+":",rt.ERR_BAD_REQUEST,e));return}C.send(s||null)})},uz=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let a=new AbortController,i;const s=function(h){if(!i){i=!0,d();const g=h instanceof Error?h:this.reason;a.abort(g instanceof rt?g:new Il(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,s(new rt(`timeout ${t} of ms exceeded`,rt.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),e=null)};e.forEach(h=>h.addEventListener("abort",s));const{signal:f}=a;return f.unsubscribe=()=>ne.asap(d),f}},cz=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let a=0,i;for(;a<n;)i=a+t,yield e.slice(a,i),a=i},dz=async function*(e,t){for await(const n of fz(e))yield*cz(n,t)},fz=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:a}=await t.read();if(n)break;yield a}}finally{await t.cancel()}},bw=(e,t,n,a)=>{const i=dz(e,t);let s=0,u,d=f=>{u||(u=!0,a&&a(f))};return new ReadableStream({async pull(f){try{const{done:h,value:g}=await i.next();if(h){d(),f.close();return}let b=g.byteLength;if(n){let x=s+=b;n(x)}f.enqueue(new Uint8Array(g))}catch(h){throw d(h),h}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},Yf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",DC=Yf&&typeof ReadableStream=="function",hz=Yf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),MC=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mz=DC&&MC(()=>{let e=!1;const t=new Request(Sn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Sw=64*1024,Tg=DC&&MC(()=>ne.isReadableStream(new Response("").body)),Yd={stream:Tg&&(e=>e.body)};Yf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yd[t]&&(Yd[t]=ne.isFunction(e[t])?n=>n[t]():(n,a)=>{throw new rt(`Response type '${t}' is not supported`,rt.ERR_NOT_SUPPORT,a)})})})(new Response);const pz=async e=>{if(e==null)return 0;if(ne.isBlob(e))return e.size;if(ne.isSpecCompliantForm(e))return(await new Request(Sn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ne.isArrayBufferView(e)||ne.isArrayBuffer(e))return e.byteLength;if(ne.isURLSearchParams(e)&&(e=e+""),ne.isString(e))return(await hz(e)).byteLength},gz=async(e,t)=>{const n=ne.toFiniteNumber(e.getContentLength());return n??pz(t)},vz=Yf&&(async e=>{let{url:t,method:n,data:a,signal:i,cancelToken:s,timeout:u,onDownloadProgress:d,onUploadProgress:f,responseType:h,headers:g,withCredentials:b="same-origin",fetchOptions:x}=TC(e);h=h?(h+"").toLowerCase():"text";let S=uz([i,s&&s.toAbortSignal()],u),w;const E=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let C;try{if(f&&mz&&n!=="get"&&n!=="head"&&(C=await gz(g,a))!==0){let O=new Request(t,{method:"POST",body:a,duplex:"half"}),M;if(ne.isFormData(a)&&(M=O.headers.get("content-type"))&&g.setContentType(M),O.body){const[I,Z]=vw(C,Zd(yw(f)));a=bw(O.body,Sw,I,Z)}}ne.isString(b)||(b=b?"include":"omit");const R="credentials"in Request.prototype;w=new Request(t,{...x,signal:S,method:n.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:R?b:void 0});let T=await fetch(w);const D=Tg&&(h==="stream"||h==="response");if(Tg&&(d||D&&E)){const O={};["status","statusText","headers"].forEach(ee=>{O[ee]=T[ee]});const M=ne.toFiniteNumber(T.headers.get("content-length")),[I,Z]=d&&vw(M,Zd(yw(d),!0))||[];T=new Response(bw(T.body,Sw,I,()=>{Z&&Z(),E&&E()}),O)}h=h||"text";let j=await Yd[ne.findKey(Yd,h)||"text"](T,e);return!D&&E&&E(),await new Promise((O,M)=>{RC(O,M,{data:j,headers:zn.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:w})})}catch(R){throw E&&E(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new rt("Network Error",rt.ERR_NETWORK,e,w),{cause:R.cause||R}):rt.from(R,R&&R.code,e,w)}}),Dg={http:N5,xhr:sz,fetch:vz};ne.forEach(Dg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ww=e=>`- ${e}`,yz=e=>ne.isFunction(e)||e===null||e===!1,OC={getAdapter:e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let n,a;const i={};for(let s=0;s<t;s++){n=e[s];let u;if(a=n,!yz(n)&&(a=Dg[(u=String(n)).toLowerCase()],a===void 0))throw new rt(`Unknown adapter '${u}'`);if(a)break;i[u||"#"+s]=a}if(!a){const s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let u=t?s.length>1?`since :
287
- `+s.map(ww).join(`
288
- `):" "+ww(s[0]):"as no adapter specified";throw new rt("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return a},adapters:Dg};function Gp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Il(null,e)}function Ew(e){return Gp(e),e.headers=zn.from(e.headers),e.data=Bp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),OC.getAdapter(e.adapter||Uu.adapter)(e).then(function(a){return Gp(e),a.data=Bp.call(e,e.transformResponse,a),a.headers=zn.from(a.headers),a},function(a){return CC(a)||(Gp(e),a&&a.response&&(a.response.data=Bp.call(e,e.transformResponse,a.response),a.response.headers=zn.from(a.response.headers))),Promise.reject(a)})}const NC="1.9.0",Kf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kf[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const _w={};Kf.transitional=function(t,n,a){function i(s,u){return"[Axios v"+NC+"] Transitional option '"+s+"'"+u+(a?". "+a:"")}return(s,u,d)=>{if(t===!1)throw new rt(i(u," has been removed"+(n?" in "+n:"")),rt.ERR_DEPRECATED);return n&&!_w[u]&&(_w[u]=!0,console.warn(i(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,u,d):!0}};Kf.spelling=function(t){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function xz(e,t,n){if(typeof e!="object")throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let i=a.length;for(;i-- >0;){const s=a[i],u=t[s];if(u){const d=e[s],f=d===void 0||u(d,s,e);if(f!==!0)throw new rt("option "+s+" must be "+f,rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new rt("Unknown option "+s,rt.ERR_BAD_OPTION)}}const Md={assertOptions:xz,validators:Kf},Br=Md.validators;let si=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pw,response:new pw}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{a.stack?s&&!String(a.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(a.stack+=`
289
- `+s):a.stack=s}catch{}}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fi(this.defaults,n);const{transitional:a,paramsSerializer:i,headers:s}=n;a!==void 0&&Md.assertOptions(a,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean)},!1),i!=null&&(ne.isFunction(i)?n.paramsSerializer={serialize:i}:Md.assertOptions(i,{encode:Br.function,serialize:Br.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Md.assertOptions(n,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=s&&ne.merge(s.common,s[n.method]);s&&ne.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),n.headers=zn.concat(u,s);const d=[];let f=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(f=f&&E.synchronous,d.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let g,b=0,x;if(!f){const w=[Ew.bind(this),void 0];for(w.unshift.apply(w,d),w.push.apply(w,h),x=w.length,g=Promise.resolve(n);b<x;)g=g.then(w[b++],w[b++]);return g}x=d.length;let S=n;for(b=0;b<x;){const w=d[b++],E=d[b++];try{S=w(S)}catch(C){E.call(this,C);break}}try{g=Ew.call(this,S)}catch(w){return Promise.reject(w)}for(b=0,x=h.length;b<x;)g=g.then(h[b++],h[b++]);return g}getUri(t){t=fi(this.defaults,t);const n=AC(t.baseURL,t.url,t.allowAbsoluteUrls);return wC(n,t.params,t.paramsSerializer)}};ne.forEach(["delete","get","head","options"],function(t){si.prototype[t]=function(n,a){return this.request(fi(a||{},{method:t,url:n,data:(a||{}).data}))}});ne.forEach(["post","put","patch"],function(t){function n(a){return function(s,u,d){return this.request(fi(d||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:s,data:u}))}}si.prototype[t]=n(),si.prototype[t+"Form"]=n(!0)});let bz=class jC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const a=this;this.promise.then(i=>{if(!a._listeners)return;let s=a._listeners.length;for(;s-- >0;)a._listeners[s](i);a._listeners=null}),this.promise.then=i=>{let s;const u=new Promise(d=>{a.subscribe(d),s=d}).then(i);return u.cancel=function(){a.unsubscribe(s)},u},t(function(s,u,d){a.reason||(a.reason=new Il(s,u,d),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=a=>{t.abort(a)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new jC(function(i){t=i}),cancel:t}}};function Sz(e){return function(n){return e.apply(null,n)}}function wz(e){return ne.isObject(e)&&e.isAxiosError===!0}const Mg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mg).forEach(([e,t])=>{Mg[t]=e});function kC(e){const t=new si(e),n=cC(si.prototype.request,t);return ne.extend(n,si.prototype,t,{allOwnKeys:!0}),ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return kC(fi(e,i))},n}const Wt=kC(Uu);Wt.Axios=si;Wt.CanceledError=Il;Wt.CancelToken=bz;Wt.isCancel=CC;Wt.VERSION=NC;Wt.toFormData=Zf;Wt.AxiosError=rt;Wt.Cancel=Wt.CanceledError;Wt.all=function(t){return Promise.all(t)};Wt.spread=Sz;Wt.isAxiosError=wz;Wt.mergeConfig=fi;Wt.AxiosHeaders=zn;Wt.formToJSON=e=>_C(ne.isHTMLForm(e)?new FormData(e):e);Wt.getAdapter=OC.getAdapter;Wt.HttpStatusCode=Mg;Wt.default=Wt;const{Axios:T$,AxiosError:D$,CanceledError:M$,isCancel:O$,CancelToken:N$,VERSION:j$,all:k$,Cancel:L$,isAxiosError:P$,spread:z$,toFormData:F$,AxiosHeaders:U$,HttpStatusCode:I$,formToJSON:V$,getAdapter:$$,mergeConfig:H$}=Wt,Ez={baseURL:"/api",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}},Ea=Wt.create(Ez);class LC{constructor(t){Jb(this,"baseUrl");this.baseUrl=t}async get(t,n,a){const i=this.createUrl(t);return(await Ea.get(i,{...a,params:n})).data}async post(t,n,a){const i=this.createUrl(t);return(await Ea.post(i,n,a)).data}async put(t,n,a){const i=this.createUrl(t);return(await Ea.put(i,n,a)).data}async patch(t,n,a){const i=this.createUrl(t);return(await Ea.patch(i,n,a)).data}async delete(t,n){const a=this.createUrl(t);return(await Ea.delete(a,n)).data}createUrl(t){return this.baseUrl?`${this.baseUrl}${t}`:t}}class _z{set(t,n){try{const a=typeof n=="object"?JSON.stringify(n):String(n);localStorage.setItem(t,a)}catch(a){console.error(`Error setting localStorage key "${t}":`,a)}}get(t,n){try{const a=localStorage.getItem(t);if(a===null)return null;switch(n){case"boolean":return a==="true";case"json":{const i=JSON.parse(a);return typeof i=="object"?i:null}default:return a}}catch(a){return console.error(`Error getting localStorage key "${t}":`,a),null}}remove(t){try{localStorage.removeItem(t)}catch(n){console.error(`Error removing localStorage key "${t}":`,n)}}has(t){try{return localStorage.getItem(t)!==null}catch(n){return console.error(`Error checking localStorage key "${t}":`,n),!1}}clear(){try{localStorage.clear()}catch(t){console.error("Error clearing localStorage:",t)}}}const Kd=new _z;function Cz({isLoading:e,className:t}){const[n,a]=y.useState(0),[i,s]=y.useState(!1);return y.useEffect(()=>{let u,d;return e?(s(!0),a(0),u=setInterval(()=>{a(f=>f<90?f+(90-f)/10:f)},200)):(a(100),d=setTimeout(()=>{s(!1)},300)),()=>{clearInterval(u),clearTimeout(d)}},[e]),p.jsx("div",{className:Se("fixed top-0 right-0 left-0 z-50 h-1 transition-opacity duration-300",!i&&"opacity-0",t),children:p.jsx("div",{className:"bg-brand-blue-500 h-full transition-all duration-300 ease-out",style:{width:`${n.toString()}%`}})})}const PC=y.createContext({isLoading:!1});function Rz({children:e}){const[t,n]=y.useState(0),a=t>0;return y.useEffect(()=>{const i=Ea.interceptors.request.use(u=>(n(d=>d+1),u),u=>(n(d=>Math.max(0,d-1)),Promise.reject(u))),s=Ea.interceptors.response.use(u=>(n(d=>Math.max(0,d-1)),u),u=>(n(d=>Math.max(0,d-1)),Promise.reject(u)));return()=>{Ea.interceptors.request.eject(i),Ea.interceptors.response.eject(s)}},[]),p.jsx(PC.Provider,{value:{isLoading:a},children:e})}function Az(){return y.useContext(PC)}const Cw="sidebar_state";function Tz(){const{state:e,isMobile:t}=ku(),a=t||e==="collapsed",{isLoading:i}=Az();return p.jsxs(p.Fragment,{children:[p.jsx(Cz,{isLoading:i}),p.jsx(GP,{variant:"inset",collapsible:"icon"}),p.jsx(Gk,{children:p.jsxs("div",{className:"relative h-full w-full",children:[a&&p.jsx("div",{className:"absolute top-7 left-4 z-10 md:hidden",children:p.jsx(Hk,{})}),p.jsx(zE,{})]})})]})}function Dz(){const[e,t]=y.useState(()=>Kd.get(Cw,"boolean")??!0),n=a=>{t(a),Kd.set(Cw,a)};return p.jsx(qP,{children:p.jsx(Rz,{children:p.jsx(Vk,{open:e,onOpenChange:n,children:p.jsx(Tz,{})})})})}function Mz(){return p.jsxs("div",{className:"app-container",children:[p.jsx("h1",{children:"About OWOX"}),p.jsx("p",{children:"OWOX Data Marts — Free, Open-Source Connectors for Data Analysts"})]})}function Oz(){return p.jsxs("div",{className:"app-container",children:[p.jsx("h1",{children:"404 - Page Not Found"}),p.jsx("p",{children:"The page you are looking for does not exist."}),p.jsx(Tu,{to:"/",children:"Go back to home"})]})}const Nz={items:[],loading:!1,error:null};function jz(e,t){switch(t.type){case"SET_ITEMS":return{...e,items:t.payload,loading:!1,error:null};case"SET_LOADING":return{...e,loading:!0,error:null};case"SET_ERROR":return{...e,loading:!1,error:t.payload};default:return e}}const zC=y.createContext(void 0);function kz({children:e}){const[t,n]=y.useReducer(jz,Nz);return p.jsx(zC.Provider,{value:{state:t,dispatch:n},children:e})}function Lz(){const e=y.useContext(zC);if(e===void 0)throw new Error("useDataMartListContext must be used within a DataMartListProvider");return e}class Pz extends LC{constructor(){super("/data-marts")}async getDataMarts(){return this.get("/")}async getDataMartById(t){return this.get(`/${t}`)}async createDataMart(t){return this.post("",t)}async updateDataMart(t,n){return this.patch(`/${t}`,n)}async deleteDataMart(t){return this.delete(`/${t}`)}async updateDataMartDescription(t,n){return this.put(`/${t}/description`,{description:n})}async updateDataMartTitle(t,n){return this.put(`/${t}/title`,{title:n})}async updateDataMartDefinition(t,n){return this.put(`/${t}/definition`,n)}async publishDataMart(t){return this.put(`/${t}/publish`)}}const Sa=new Pz;var ai=(e=>(e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED",e))(ai||{}),At=(e=>(e.SQL="SQL",e.TABLE="TABLE",e.VIEW="VIEW",e.TABLE_PATTERN="TABLE_PATTERN",e))(At||{});const FC={statuses:{[ai.DRAFT]:{code:ai.DRAFT,displayName:"Draft",description:"Data mart is in draft mode and not yet published"},[ai.PUBLISHED]:{code:ai.PUBLISHED,displayName:"Published",description:"Data mart is published and available for use"}},getInfo(e){return this.statuses[e]},getAllStatuses(){return Object.values(this.statuses)}},UC=e=>e?/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+$/.test(e):!1,IC=e=>e?/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_\-*]+$/.test(e):!1,zz=e=>e?UC(e)?"":"Invalid format. Expected: project.dataset.object":"Fully qualified name is required",Fz=e=>e?IC(e)?"":"Invalid format. Expected: project.dataset.table_* (with wildcards)":"Table pattern is required",VC=e=>{if(!e)return!1;const t=/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+$/,n=/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+$/;return t.test(e)||n.test(e)},$C=e=>{if(!e)return!1;const t=/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_\-*]+$/,n=/^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_\-*]+$/;return t.test(e)||n.test(e)},Uz=e=>e?VC(e)?"":"Invalid format. Expected: database.object or catalog.database.object":"Fully qualified name is required",Iz=e=>e?$C(e)?"":"Invalid format. Expected: database.table_* or catalog.database.table_* (with wildcards)":"Table pattern is required";function Vz(e){return"serviceAccount"in e}function $z(e){return"accessKeyId"in e&&"secretAccessKey"in e}const Hz=[{value:"US",label:"US (multiple regions)",group:"North America"},{value:"northamerica-northeast1",label:"Montréal",group:"North America"},{value:"northamerica-northeast2",label:"Toronto",group:"North America"},{value:"us-central1",label:"Iowa",group:"North America"},{value:"us-east1",label:"South Carolina",group:"North America"},{value:"us-east4",label:"Northern Virginia",group:"North America"},{value:"us-east5",label:"Columbus",group:"North America"},{value:"us-west1",label:"Oregon",group:"North America"},{value:"us-west2",label:"Los Angeles",group:"North America"},{value:"us-west3",label:"Salt Lake City",group:"North America"},{value:"us-west4",label:"Las Vegas",group:"North America"},{value:"EU",label:"EU (multiple regions)",group:"Europe"},{value:"europe-central2",label:"Warsaw",group:"Europe"},{value:"europe-north1",label:"Finland",group:"Europe"},{value:"europe-southwest1",label:"Madrid",group:"Europe"},{value:"europe-west1",label:"Belgium",group:"Europe"},{value:"europe-west2",label:"London",group:"Europe"},{value:"europe-west3",label:"Frankfurt",group:"Europe"},{value:"europe-west4",label:"Netherlands",group:"Europe"},{value:"europe-west6",label:"Zurich",group:"Europe"},{value:"europe-west8",label:"Milan",group:"Europe"},{value:"europe-west9",label:"Paris",group:"Europe"},{value:"europe-west12",label:"Turin",group:"Europe"},{value:"asia-east1",label:"Taiwan",group:"Asia Pacific"},{value:"asia-east2",label:"Hong Kong",group:"Asia Pacific"},{value:"asia-northeast1",label:"Tokyo",group:"Asia Pacific"},{value:"asia-northeast2",label:"Osaka",group:"Asia Pacific"},{value:"asia-northeast3",label:"Seoul",group:"Asia Pacific"},{value:"asia-south1",label:"Mumbai",group:"Asia Pacific"},{value:"asia-south2",label:"Delhi",group:"Asia Pacific"},{value:"asia-southeast1",label:"Singapore",group:"Asia Pacific"},{value:"asia-southeast2",label:"Jakarta",group:"Asia Pacific"},{value:"australia-southeast1",label:"Sydney",group:"Asia Pacific"},{value:"australia-southeast2",label:"Melbourne",group:"Asia Pacific"},{value:"southamerica-east1",label:"São Paulo",group:"Other"},{value:"southamerica-west1",label:"Santiago",group:"Other"},{value:"me-central1",label:"Doha",group:"Other"},{value:"me-central2",label:"Dammam",group:"Other"},{value:"me-west1",label:"Tel Aviv",group:"Other"},{value:"africa-south1",label:"Johannesburg",group:"Other"}];function Bz(e){return"projectId"in e}function Gz(e){return"databaseName"in e&&"outputBucket"in e}var at=(e=>(e.GOOGLE_BIGQUERY="GOOGLE_BIGQUERY",e.AWS_ATHENA="AWS_ATHENA",e))(at||{});const Og=({label:e,value:t,truncate:n=!1})=>{const a=typeof t=="string"?t.trim():t,i=a==="";return p.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[p.jsxs("span",{className:"text-muted-foreground text-sm",children:[e,":"]}),n&&a&&!i?p.jsx("span",{className:"truncate text-sm",title:a,children:a.length>30?a.substring(0,30)+"...":a}):p.jsx("span",{className:"text-sm",children:i||a===void 0?p.jsx("span",{className:"text-muted-foreground",children:"—"}):a})]})},qz=({type:e,config:t})=>{const n={[at.GOOGLE_BIGQUERY]:[{label:"Project ID",key:"projectId"},{label:"Location",key:"location"}],[at.AWS_ATHENA]:[{label:"Region",key:"region"},{label:"Database Name",key:"databaseName"},{label:"Output Bucket",key:"outputBucket"}]},a=t&&(e===at.GOOGLE_BIGQUERY&&Bz(t)||e===at.AWS_ATHENA&&Gz(t));return p.jsx("div",{className:"grid gap-2",children:n[e].map(({label:i,key:s})=>{let u;return a&&(u=(e===at.GOOGLE_BIGQUERY,t[s])),p.jsx(Og,{label:i,value:u},s)})})},HC=["private_key","private_key_id","client_email","client_id","client_x509_cert_url"];function Bv({className:e,...t}){return p.jsx("textarea",{"data-slot":"textarea",className:Se("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function BC({value:e,onChange:t,keysToMask:n=[],className:a,displayOnly:i=!1}){const s=(b,x)=>{if(!b||x.length===0)return!1;try{const S=JSON.parse(b),w=E=>typeof E!="object"||E===null?!1:Array.isArray(E)?E.some(C=>typeof C=="object"&&C!==null&&w(C)):Object.keys(E).some(C=>x.includes(C)||typeof E[C]=="object"&&E[C]!==null&&w(E[C]));return w(S)}catch{return!1}},u=i?!1:!e||n.length===0||!s(e,n),[d,f]=y.useState(u);y.useEffect(()=>{i?f(!1):(!e||n.length===0||!s(e,n))&&f(!0)},[e,n,i]);const h=b=>{if(!b)return"";try{const x=JSON.parse(b),S=C=>{if(typeof C!="object"||C===null)return C;const R=Array.isArray(C)?[...C]:{...C};return Array.isArray(R)?R.forEach((T,D)=>{typeof T=="object"&&T!==null&&(R[D]=S(T))}):Object.entries(R).forEach(([T,D])=>{if(n.includes(T))if(typeof D=="string"){const j=D.length;j>30?R[T]="*".repeat(Math.min(20,Math.ceil(j/3))):j>10?R[T]="*".repeat(Math.min(10,Math.ceil(j/2))):R[T]="*".repeat(j)}else R[T]="***";else typeof D=="object"&&D!==null&&(R[T]=S(D))}),R},E=S(typeof x=="object"?x:{});return JSON.stringify(E,null,2)}catch{return b}},g=e&&n.length>0&&s(e,n);return p.jsxs("div",{className:"relative",children:[!d&&g&&!i&&p.jsx(li,{children:p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsx("div",{className:"absolute top-2 left-2 z-10",children:p.jsx(ON,{className:"h-4 w-4 text-gray-500"})})}),p.jsx(go,{children:p.jsx("p",{children:"Content is locked in masked mode. Click the eye icon to enable editing."})})]})}),i?p.jsx("div",{className:`p-2 font-mono ${a??""} min-h-[150px] cursor-not-allowed whitespace-pre-wrap opacity-70`,children:h(e)}):p.jsx(Bv,{value:d?e:h(e),onChange:b=>{(d||!g)&&t&&t(b.target.value)},onFocus:b=>{!d&&g&&b.target.blur()},readOnly:!!(!d&&g),className:`font-mono ${a??""} ${!d&&g?"cursor-not-allowed opacity-70":""} min-h-[150px]`,rows:8}),g&&!i&&p.jsx(Ft,{type:"button",variant:"ghost",className:"absolute top-2 right-2",onClick:()=>{f(!d)},children:d?p.jsx(li,{children:p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(SN,{className:"h-4 w-4"}),p.jsx("span",{className:"text-xs",children:"Mask & Lock"})]})}),p.jsx(go,{children:p.jsx("p",{children:"Mask sensitive data and lock editing"})})]})}):p.jsx(li,{children:p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(EN,{className:"h-4 w-4"}),p.jsx("span",{className:"text-xs",children:"Show & Edit"})]})}),p.jsx(go,{children:p.jsx("p",{children:"Show sensitive data and enable editing"})})]})})})]})}const Zz=({type:e,credentials:t})=>{switch(e){case at.GOOGLE_BIGQUERY:{const a=t&&Vz(t)?String(t.serviceAccount):void 0;return p.jsx("div",{className:"grid gap-2",children:p.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[p.jsx("span",{className:"text-muted-foreground text-sm",children:"Service Account:"}),a?p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsx("span",{className:"cursor-help truncate text-sm",children:a.length>30?a.substring(0,30)+"...":a})}),p.jsx(go,{className:"max-w-md",children:p.jsx(BC,{displayOnly:!0,value:a,keysToMask:HC})})]}):p.jsx("span",{className:"text-sm",children:p.jsx("span",{className:"text-muted-foreground",children:"—"})})]})})}case at.AWS_ATHENA:{const n=t&&$z(t);return p.jsxs("div",{className:"grid gap-2",children:[p.jsx(Og,{label:"Access Key ID",value:n?String(t.accessKeyId):void 0}),p.jsx(Og,{label:"Secret Access Key",value:n&&t.secretAccessKey?"••••••••••••••••":void 0})]})}default:return p.jsx("p",{className:"text-gray-500 italic",children:"Unknown credential type"})}},Yz=({type:e,config:t,credentials:n})=>p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-medium",children:"Configuration"}),p.jsx(qz,{type:e,config:t})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-medium",children:"Credentials"}),p.jsx(Zz,{type:e,credentials:n})]})]}),Kz=cv("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Qd({className:e,variant:t,asChild:n=!1,...a}){const i=n?Sf:"span";return p.jsx(i,{"data-slot":"badge",className:Se(Kz({variant:t}),e),...a})}const _i={types:{[at.GOOGLE_BIGQUERY]:{type:at.GOOGLE_BIGQUERY,displayName:"Google BigQuery",icon:IP},[at.AWS_ATHENA]:{type:at.AWS_ATHENA,displayName:"AWS Athena",icon:VP}},getInfo(e){return this.types[e]},getAllTypes(){return Object.values(this.types)}};function Qz({dataStorage:e,isLoading:t=!1}){if(t)return p.jsx("div",{className:"space-y-4",children:p.jsx("div",{className:"grid gap-4",children:Array(4).fill(0).map((d,f)=>p.jsxs("div",{className:"space-y-1",children:[p.jsx(JS,{className:"h-5 w-24"}),p.jsx(JS,{className:"h-6 w-40"})]},f))})});if(!e)return p.jsx("div",{children:"No data storage information available."});const{type:n,config:a,credentials:i,createdAt:s,modifiedAt:u}=e;return p.jsx("div",{className:"space-y-2",children:p.jsxs("div",{className:"grid gap-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:e.title}),p.jsx(Qd,{variant:"secondary",className:"flex h-7 items-center gap-2",children:(()=>{const{displayName:d,icon:f}=_i.getInfo(n);return p.jsxs(p.Fragment,{children:[p.jsx(f,{}),d]})})()})]}),p.jsx("div",{className:"bg-muted/10 rounded-md border p-4",children:p.jsx(Yz,{type:n,config:a,credentials:i})}),p.jsxs("div",{className:"text-muted-foreground flex gap-6 text-xs",children:[p.jsxs("div",{children:[p.jsx("span",{className:"font-medium",children:"Created:"})," ",new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(s))]}),p.jsxs("div",{children:[p.jsx("span",{className:"font-medium",children:"Modified:"})," ",new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(u))]})]})]})})}const Xz=(e,t)=>{if(!e)return!1;switch(t){case at.GOOGLE_BIGQUERY:return UC(e);case at.AWS_ATHENA:return VC(e);default:return!1}},Wz=(e,t)=>{if(!e)return!1;switch(t){case at.GOOGLE_BIGQUERY:return IC(e);case at.AWS_ATHENA:return $C(e);default:return!1}},Jz=(e,t)=>{if(!e)return"Fully qualified name is required";switch(t){case at.GOOGLE_BIGQUERY:return zz(e);case at.AWS_ATHENA:return Uz(e);default:return"Unsupported storage type"}},e6=(e,t)=>{if(!e)return"Table pattern is required";switch(t){case at.GOOGLE_BIGQUERY:return Fz(e);case at.AWS_ATHENA:return Iz(e);default:return"Unsupported storage type"}},GC=e=>{switch(e){case at.GOOGLE_BIGQUERY:return"project.dataset.table";case at.AWS_ATHENA:return"database.table or catalog.database.table";default:return""}},t6=e=>{switch(e){case at.GOOGLE_BIGQUERY:return"project.dataset.table_*";case at.AWS_ATHENA:return"database.table_* or catalog.database.table_*";default:return""}},qC=e=>{switch(e){case at.GOOGLE_BIGQUERY:return"Enter the fully qualified name of the table (e.g., project.dataset.table)";case at.AWS_ATHENA:return"Enter the fully qualified name of the table (e.g., database.table or catalog.database.table)";default:return""}},n6=e=>{switch(e){case at.GOOGLE_BIGQUERY:return'Enter a pattern to match multiple tables (e.g., project.dataset.table_* will match all tables starting with "table_")';case at.AWS_ATHENA:return'Enter a pattern to match multiple tables (e.g., database.table_* will match all tables starting with "table_")';default:return""}};var bt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const u of i)s[u]=u;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),u={};for(const d of s)u[d]=i[d];return e.objectValues(u)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const u in i)Object.prototype.hasOwnProperty.call(i,u)&&s.push(u);return s},e.find=(i,s)=>{for(const u of i)if(s(u))return u},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function a(i,s=" | "){return i.map(u=>typeof u=="string"?`'${u}'`:u).join(s)}e.joinValues=a,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(bt||(bt={}));var Rw;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Rw||(Rw={}));const je=bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lo=e=>{switch(typeof e){case"undefined":return je.undefined;case"string":return je.string;case"number":return Number.isNaN(e)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(e)?je.array:e===null?je.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?je.promise:typeof Map<"u"&&e instanceof Map?je.map:typeof Set<"u"&&e instanceof Set?je.set:typeof Date<"u"&&e instanceof Date?je.date:je.object;default:return je.unknown}},ge=bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ta extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},a={_errors:[]},i=s=>{for(const u of s.issues)if(u.code==="invalid_union")u.unionErrors.map(i);else if(u.code==="invalid_return_type")i(u.returnTypeError);else if(u.code==="invalid_arguments")i(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return i(this),a}static assert(t){if(!(t instanceof Ta))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):a.push(t(i));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Ta.create=e=>new Ta(e);const Ng=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===je.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,bt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${bt.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${bt.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${bt.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:bt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,bt.assertNever(e)}return{message:n}};let r6=Ng;function a6(){return r6}const o6=e=>{const{data:t,path:n,errorMaps:a,issueData:i}=e,s=[...n,...i.path||[]],u={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...i,path:s,message:d}};function Re(e,t){const n=a6(),a=o6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ng?void 0:Ng].filter(i=>!!i)});e.common.issues.push(a)}class Jn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const i of n){if(i.status==="aborted")return Xe;i.status==="dirty"&&t.dirty(),a.push(i.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const i of n){const s=await i.key,u=await i.value;a.push({key:s,value:u})}return Jn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const i of n){const{key:s,value:u}=i;if(s.status==="aborted"||u.status==="aborted")return Xe;s.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof u.value<"u"||i.alwaysSet)&&(a[s.value]=u.value)}return{status:t.value,value:a}}}const Xe=Object.freeze({status:"aborted"}),tu=e=>({status:"dirty",value:e}),xr=e=>({status:"valid",value:e}),Aw=e=>e.status==="aborted",Tw=e=>e.status==="dirty",Rl=e=>e.status==="valid",Xd=e=>typeof Promise<"u"&&e instanceof Promise;var ze;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ze||(ze={}));class wo{constructor(t,n,a,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Dw=(e,t)=>{if(Rl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ta(e.common.issues);return this._error=n,this._error}}};function st(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:i}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:i}}class vt{get description(){return this._def.description}_getType(t){return lo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Jn,ctx:{common:t.parent.common,data:t.data,parsedType:lo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Xd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},i=this._parseSync({data:t,path:a.path,parent:a});return Dw(a,i)}"~validate"(t){var a,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return Rl(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(a=s==null?void 0:s.message)==null?void 0:a.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>Rl(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lo(t)},i=this._parse({data:t,path:a.path,parent:a}),s=await(Xd(i)?i:Promise.resolve(i));return Dw(a,s)}refine(t,n){const a=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const u=t(i),d=()=>s.addIssue({code:ge.custom,...a(i)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,i)=>t(a)?!0:(i.addIssue(typeof n=="function"?n(a,i):n),!1))}_refinement(t){return new pi({schema:this,typeName:et.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return _a.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xr.create(this)}promise(){return rf.create(this,this._def)}or(t){return Jd.create([this,t],this._def)}and(t){return ef.create(this,t,this._def)}transform(t){return new pi({...st(this._def),schema:this,typeName:et.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new af({...st(this._def),innerType:this,defaultValue:n,typeName:et.ZodDefault})}brand(){return new QC({typeName:et.ZodBranded,type:this,...st(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new of({...st(this._def),innerType:this,catchValue:n,typeName:et.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return qv.create(this,t)}readonly(){return lf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const i6=/^c[^\s-]{8,}$/i,l6=/^[0-9a-z]+$/,s6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,u6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,c6=/^[a-z0-9_-]{21}$/i,d6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,f6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,h6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,m6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qp;const p6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,g6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,v6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,y6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,x6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,b6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ZC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",S6=new RegExp(`^${ZC}$`);function YC(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function w6(e){return new RegExp(`^${YC(e)}$`)}function E6(e){let t=`${ZC}T${YC(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _6(e,t){return!!((t==="v4"||!t)&&p6.test(e)||(t==="v6"||!t)&&v6.test(e))}function C6(e,t){if(!d6.test(e))return!1;try{const[n]=e.split("."),a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(a));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function R6(e,t){return!!((t==="v4"||!t)&&g6.test(e)||(t==="v6"||!t)&&y6.test(e))}class fo extends vt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==je.string){const s=this._getOrReturnCtx(t);return Re(s,{code:ge.invalid_type,expected:je.string,received:s.parsedType}),Xe}const a=new Jn;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="length"){const u=t.data.length>s.value,d=t.data.length<s.value;(u||d)&&(i=this._getOrReturnCtx(t,i),u?Re(i,{code:ge.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):d&&Re(i,{code:ge.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),a.dirty())}else if(s.kind==="email")h6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"email",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="emoji")qp||(qp=new RegExp(m6,"u")),qp.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"emoji",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="uuid")u6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"uuid",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="nanoid")c6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"nanoid",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid")i6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"cuid",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid2")l6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"cuid2",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="ulid")s6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"ulid",code:ge.invalid_string,message:s.message}),a.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Re(i,{validation:"url",code:ge.invalid_string,message:s.message}),a.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"regex",code:ge.invalid_string,message:s.message}),a.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),a.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:{startsWith:s.value},message:s.message}),a.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:{endsWith:s.value},message:s.message}),a.dirty()):s.kind==="datetime"?E6(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:"datetime",message:s.message}),a.dirty()):s.kind==="date"?S6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:"date",message:s.message}),a.dirty()):s.kind==="time"?w6(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.invalid_string,validation:"time",message:s.message}),a.dirty()):s.kind==="duration"?f6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"duration",code:ge.invalid_string,message:s.message}),a.dirty()):s.kind==="ip"?_6(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"ip",code:ge.invalid_string,message:s.message}),a.dirty()):s.kind==="jwt"?C6(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"jwt",code:ge.invalid_string,message:s.message}),a.dirty()):s.kind==="cidr"?R6(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"cidr",code:ge.invalid_string,message:s.message}),a.dirty()):s.kind==="base64"?x6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"base64",code:ge.invalid_string,message:s.message}),a.dirty()):s.kind==="base64url"?b6.test(t.data)||(i=this._getOrReturnCtx(t,i),Re(i,{validation:"base64url",code:ge.invalid_string,message:s.message}),a.dirty()):bt.assertNever(s);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(i=>t.test(i),{validation:n,code:ge.invalid_string,...ze.errToObj(a)})}_addCheck(t){return new fo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ze.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ze.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ze.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ze.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ze.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ze.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ze.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ze.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ze.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ze.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ze.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ze.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ze.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ze.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ze.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ze.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ze.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ze.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ze.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ze.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ze.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ze.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ze.errToObj(n)})}nonempty(t){return this.min(1,ze.errToObj(t))}trim(){return new fo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fo.create=e=>new fo({checks:[],typeName:et.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...st(e)});function A6(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,i=n>a?n:a,s=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return s%u/10**i}class yu extends vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==je.number){const s=this._getOrReturnCtx(t);return Re(s,{code:ge.invalid_type,expected:je.number,received:s.parsedType}),Xe}let a;const i=new Jn;for(const s of this._def.checks)s.kind==="int"?bt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?A6(t.data,s.value)!==0&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.not_finite,message:s.message}),i.dirty()):bt.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ze.toString(n))}setLimit(t,n,a,i){return new yu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:ze.toString(i)}]})}_addCheck(t){return new yu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ze.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ze.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ze.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ze.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ze.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&bt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}yu.create=e=>new yu({checks:[],typeName:et.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...st(e)});class xu extends vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==je.bigint)return this._getInvalidInput(t);let a;const i=new Jn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),Re(a,{code:ge.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):bt.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Re(n,{code:ge.invalid_type,expected:je.bigint,received:n.parsedType}),Xe}gte(t,n){return this.setLimit("min",t,!0,ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ze.toString(n))}setLimit(t,n,a,i){return new xu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:ze.toString(i)}]})}_addCheck(t){return new xu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ze.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}xu.create=e=>new xu({checks:[],typeName:et.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...st(e)});class Mw extends vt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==je.boolean){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.boolean,received:a.parsedType}),Xe}return xr(t.data)}}Mw.create=e=>new Mw({typeName:et.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...st(e)});class Wd extends vt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==je.date){const s=this._getOrReturnCtx(t);return Re(s,{code:ge.invalid_type,expected:je.date,received:s.parsedType}),Xe}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Re(s,{code:ge.invalid_date}),Xe}const a=new Jn;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),a.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),Re(i,{code:ge.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),a.dirty()):bt.assertNever(s);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wd({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ze.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ze.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Wd.create=e=>new Wd({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:et.ZodDate,...st(e)});class Ow extends vt{_parse(t){if(this._getType(t)!==je.symbol){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.symbol,received:a.parsedType}),Xe}return xr(t.data)}}Ow.create=e=>new Ow({typeName:et.ZodSymbol,...st(e)});class jg extends vt{_parse(t){if(this._getType(t)!==je.undefined){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.undefined,received:a.parsedType}),Xe}return xr(t.data)}}jg.create=e=>new jg({typeName:et.ZodUndefined,...st(e)});class kg extends vt{_parse(t){if(this._getType(t)!==je.null){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.null,received:a.parsedType}),Xe}return xr(t.data)}}kg.create=e=>new kg({typeName:et.ZodNull,...st(e)});class Nw extends vt{constructor(){super(...arguments),this._any=!0}_parse(t){return xr(t.data)}}Nw.create=e=>new Nw({typeName:et.ZodAny,...st(e)});class jw extends vt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return xr(t.data)}}jw.create=e=>new jw({typeName:et.ZodUnknown,...st(e)});class Eo extends vt{_parse(t){const n=this._getOrReturnCtx(t);return Re(n,{code:ge.invalid_type,expected:je.never,received:n.parsedType}),Xe}}Eo.create=e=>new Eo({typeName:et.ZodNever,...st(e)});class kw extends vt{_parse(t){if(this._getType(t)!==je.undefined){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.void,received:a.parsedType}),Xe}return xr(t.data)}}kw.create=e=>new kw({typeName:et.ZodVoid,...st(e)});class Xr extends vt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),i=this._def;if(n.parsedType!==je.array)return Re(n,{code:ge.invalid_type,expected:je.array,received:n.parsedType}),Xe;if(i.exactLength!==null){const u=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(u||d)&&(Re(n,{code:u?ge.too_big:ge.too_small,minimum:d?i.exactLength.value:void 0,maximum:u?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),a.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Re(n,{code:ge.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),a.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Re(n,{code:ge.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>i.type._parseAsync(new wo(n,u,n.path,d)))).then(u=>Jn.mergeArray(a,u));const s=[...n.data].map((u,d)=>i.type._parseSync(new wo(n,u,n.path,d)));return Jn.mergeArray(a,s)}get element(){return this._def.type}min(t,n){return new Xr({...this._def,minLength:{value:t,message:ze.toString(n)}})}max(t,n){return new Xr({...this._def,maxLength:{value:t,message:ze.toString(n)}})}length(t,n){return new Xr({...this._def,exactLength:{value:t,message:ze.toString(n)}})}nonempty(t){return this.min(1,t)}}Xr.create=(e,t)=>new Xr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:et.ZodArray,...st(t)});function pl(e){if(e instanceof tn){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=_a.create(pl(a))}return new tn({...e._def,shape:()=>t})}else return e instanceof Xr?new Xr({...e._def,type:pl(e.element)}):e instanceof _a?_a.create(pl(e.unwrap())):e instanceof gi?gi.create(pl(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>pl(t))):e}class tn extends vt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=bt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==je.object){const h=this._getOrReturnCtx(t);return Re(h,{code:ge.invalid_type,expected:je.object,received:h.parsedType}),Xe}const{status:a,ctx:i}=this._processInputParams(t),{shape:s,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof Eo&&this._def.unknownKeys==="strip"))for(const h in i.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=s[h],b=i.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new wo(i,b,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof Eo){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:i.data[g]}});else if(h==="strict")d.length>0&&(Re(i,{code:ge.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const b=i.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new wo(i,b,i.path,g)),alwaysSet:g in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const b=await g.key,x=await g.value;h.push({key:b,value:x,alwaysSet:g.alwaysSet})}return h}).then(h=>Jn.mergeObjectSync(a,h)):Jn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return ze.errToObj,new tn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{var s,u;const i=((u=(s=this._def).errorMap)==null?void 0:u.call(s,n,a).message)??a.defaultError;return n.code==="unrecognized_keys"?{message:ze.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(t){return new tn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:et.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new tn({...this._def,catchall:t})}pick(t){const n={};for(const a of bt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new tn({...this._def,shape:()=>n})}omit(t){const n={};for(const a of bt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new tn({...this._def,shape:()=>n})}deepPartial(){return pl(this)}partial(t){const n={};for(const a of bt.objectKeys(this.shape)){const i=this.shape[a];t&&!t[a]?n[a]=i:n[a]=i.optional()}return new tn({...this._def,shape:()=>n})}required(t){const n={};for(const a of bt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let s=this.shape[a];for(;s instanceof _a;)s=s._def.innerType;n[a]=s}return new tn({...this._def,shape:()=>n})}keyof(){return KC(bt.objectKeys(this.shape))}}tn.create=(e,t)=>new tn({shape:()=>e,unknownKeys:"strip",catchall:Eo.create(),typeName:et.ZodObject,...st(t)});tn.strictCreate=(e,t)=>new tn({shape:()=>e,unknownKeys:"strict",catchall:Eo.create(),typeName:et.ZodObject,...st(t)});tn.lazycreate=(e,t)=>new tn({shape:e,unknownKeys:"strip",catchall:Eo.create(),typeName:et.ZodObject,...st(t)});class Jd extends vt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function i(s){for(const d of s)if(d.result.status==="valid")return d.result;for(const d of s)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=s.map(d=>new Ta(d.ctx.common.issues));return Re(n,{code:ge.invalid_union,unionErrors:u}),Xe}if(n.common.async)return Promise.all(a.map(async s=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(i);{let s;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!s&&(s={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const d=u.map(f=>new Ta(f));return Re(n,{code:ge.invalid_union,unionErrors:d}),Xe}}get options(){return this._def.options}}Jd.create=(e,t)=>new Jd({options:e,typeName:et.ZodUnion,...st(t)});const ba=e=>e instanceof Pg?ba(e.schema):e instanceof pi?ba(e.innerType()):e instanceof tf?[e.value]:e instanceof mi?e.options:e instanceof nf?bt.objectValues(e.enum):e instanceof af?ba(e._def.innerType):e instanceof jg?[void 0]:e instanceof kg?[null]:e instanceof _a?[void 0,...ba(e.unwrap())]:e instanceof gi?[null,...ba(e.unwrap())]:e instanceof QC||e instanceof lf?ba(e.unwrap()):e instanceof of?ba(e._def.innerType):[];class Gv extends vt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.object)return Re(n,{code:ge.invalid_type,expected:je.object,received:n.parsedType}),Xe;const a=this.discriminator,i=n.data[a],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Re(n,{code:ge.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const i=new Map;for(const s of n){const u=ba(s.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(i.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);i.set(d,s)}}return new Gv({typeName:et.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...st(a)})}}function Lg(e,t){const n=lo(e),a=lo(t);if(e===t)return{valid:!0,data:e};if(n===je.object&&a===je.object){const i=bt.objectKeys(t),s=bt.objectKeys(e).filter(d=>i.indexOf(d)!==-1),u={...e,...t};for(const d of s){const f=Lg(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===je.array&&a===je.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const u=e[s],d=t[s],f=Lg(u,d);if(!f.valid)return{valid:!1};i.push(f.data)}return{valid:!0,data:i}}else return n===je.date&&a===je.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ef extends vt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),i=(s,u)=>{if(Aw(s)||Aw(u))return Xe;const d=Lg(s.value,u.value);return d.valid?((Tw(s)||Tw(u))&&n.dirty(),{status:n.value,value:d.data}):(Re(a,{code:ge.invalid_intersection_types}),Xe)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([s,u])=>i(s,u)):i(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ef.create=(e,t,n)=>new ef({left:e,right:t,typeName:et.ZodIntersection,...st(n)});class hi extends vt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==je.array)return Re(a,{code:ge.invalid_type,expected:je.array,received:a.parsedType}),Xe;if(a.data.length<this._def.items.length)return Re(a,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Xe;!this._def.rest&&a.data.length>this._def.items.length&&(Re(a,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new wo(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(s).then(u=>Jn.mergeArray(n,u)):Jn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new hi({...this._def,rest:t})}}hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:et.ZodTuple,rest:null,...st(t)})};class Lw extends vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==je.map)return Re(a,{code:ge.invalid_type,expected:je.map,received:a.parsedType}),Xe;const i=this._def.keyType,s=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:i._parse(new wo(a,d,a.path,[h,"key"])),value:s._parse(new wo(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return Xe;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return Xe;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}Lw.create=(e,t,n)=>new Lw({valueType:t,keyType:e,typeName:et.ZodMap,...st(n)});class bu extends vt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==je.set)return Re(a,{code:ge.invalid_type,expected:je.set,received:a.parsedType}),Xe;const i=this._def;i.minSize!==null&&a.data.size<i.minSize.value&&(Re(a,{code:ge.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&a.data.size>i.maxSize.value&&(Re(a,{code:ge.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return Xe;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>s._parse(new wo(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new bu({...this._def,minSize:{value:t,message:ze.toString(n)}})}max(t,n){return new bu({...this._def,maxSize:{value:t,message:ze.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}bu.create=(e,t)=>new bu({valueType:e,minSize:null,maxSize:null,typeName:et.ZodSet,...st(t)});class Pg extends vt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Pg.create=(e,t)=>new Pg({getter:e,typeName:et.ZodLazy,...st(t)});class tf extends vt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Re(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}tf.create=(e,t)=>new tf({value:e,typeName:et.ZodLiteral,...st(t)});function KC(e,t){return new mi({values:e,typeName:et.ZodEnum,...st(t)})}class mi extends vt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return Re(n,{expected:bt.joinValues(a),received:n.parsedType,code:ge.invalid_type}),Xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return Re(n,{received:n.data,code:ge.invalid_enum_value,options:a}),Xe}return xr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}mi.create=KC;class nf extends vt{_parse(t){const n=bt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==je.string&&a.parsedType!==je.number){const i=bt.objectValues(n);return Re(a,{expected:bt.joinValues(i),received:a.parsedType,code:ge.invalid_type}),Xe}if(this._cache||(this._cache=new Set(bt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=bt.objectValues(n);return Re(a,{received:a.data,code:ge.invalid_enum_value,options:i}),Xe}return xr(t.data)}get enum(){return this._def.values}}nf.create=(e,t)=>new nf({values:e,typeName:et.ZodNativeEnum,...st(t)});class rf extends vt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.promise&&n.common.async===!1)return Re(n,{code:ge.invalid_type,expected:je.promise,received:n.parsedType}),Xe;const a=n.parsedType===je.promise?n.data:Promise.resolve(n.data);return xr(a.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rf.create=(e,t)=>new rf({type:e,typeName:et.ZodPromise,...st(t)});class pi extends vt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===et.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:u=>{Re(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const u=i.transform(a.data,s);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Xe;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?Xe:f.status==="dirty"||n.value==="dirty"?tu(f.value):f});{if(n.value==="aborted")return Xe;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Xe:d.status==="dirty"||n.value==="dirty"?tu(d.value):d}}if(i.type==="refinement"){const u=d=>{const f=i.refinement(d,s);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Xe:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Xe:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Rl(u))return Xe;const d=i.transform(u.value,s);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Rl(u)?Promise.resolve(i.transform(u.value,s)).then(d=>({status:n.value,value:d})):Xe);bt.assertNever(i)}}pi.create=(e,t,n)=>new pi({schema:e,typeName:et.ZodEffects,effect:t,...st(n)});pi.createWithPreprocess=(e,t,n)=>new pi({schema:t,effect:{type:"preprocess",transform:e},typeName:et.ZodEffects,...st(n)});class _a extends vt{_parse(t){return this._getType(t)===je.undefined?xr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_a.create=(e,t)=>new _a({innerType:e,typeName:et.ZodOptional,...st(t)});class gi extends vt{_parse(t){return this._getType(t)===je.null?xr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:et.ZodNullable,...st(t)});class af extends vt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===je.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}af.create=(e,t)=>new af({innerType:e,typeName:et.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...st(t)});class of extends vt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Xd(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ta(a.common.issues)},input:a.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ta(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}of.create=(e,t)=>new of({innerType:e,typeName:et.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...st(t)});class Pw extends vt{_parse(t){if(this._getType(t)!==je.nan){const a=this._getOrReturnCtx(t);return Re(a,{code:ge.invalid_type,expected:je.nan,received:a.parsedType}),Xe}return{status:"valid",value:t.data}}}Pw.create=e=>new Pw({typeName:et.ZodNaN,...st(e)});class QC extends vt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class qv extends vt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?Xe:s.status==="dirty"?(n.dirty(),tu(s.value)):this._def.out._parseAsync({data:s.value,path:a.path,parent:a})})();{const i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?Xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}static create(t,n){return new qv({in:t,out:n,typeName:et.ZodPipeline})}}class lf extends vt{_parse(t){const n=this._def.innerType._parse(t),a=i=>(Rl(i)&&(i.value=Object.freeze(i.value)),i);return Xd(n)?n.then(i=>a(i)):a(n)}unwrap(){return this._def.innerType}}lf.create=(e,t)=>new lf({innerType:e,typeName:et.ZodReadonly,...st(t)});var et;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(et||(et={}));const Fn=fo.create;Eo.create;Xr.create;const wn=tn.create;Jd.create;const T6=Gv.create;ef.create;hi.create;const Vl=tf.create;mi.create;const D6=nf.create;rf.create;_a.create;const M6=gi.create,hd=Xe,XC=e=>wn({fullyQualifiedName:Fn().min(1,"Fully qualified name is required").refine(t=>Xz(t,e),t=>({message:Jz(t,e)}))}),O6=e=>wn({pattern:Fn().min(1,"Table pattern is required").refine(t=>Wz(t,e),t=>({message:e6(t,e)}))});var N6="Label",WC=y.forwardRef((e,t)=>p.jsx(We.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));WC.displayName=N6;var j6=WC;function Ln({className:e,...t}){return p.jsx(j6,{"data-slot":"label",className:Se("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function k6(e){return e.map(t=>({id:t.id,title:t.title,status:FC.getInfo(t.status),storageType:t.storage.type,createdAt:new Date(t.createdAt),modifiedAt:new Date(t.modifiedAt)}))}function JC(){const{state:e,dispatch:t}=Lz(),n=y.useCallback(async()=>{t({type:"SET_LOADING"});try{const s=await Sa.getDataMarts(),u=k6(s);t({type:"SET_ITEMS",payload:u})}catch(s){t({type:"SET_ERROR",payload:s instanceof Error?s.message:"Failed to load data marts"})}},[t]),a=y.useCallback(async s=>{t({type:"SET_LOADING"});try{await Sa.deleteDataMart(s)}catch(u){throw t({type:"SET_ERROR",payload:u instanceof Error?u.message:"Failed to delete data mart"}),u}},[t]),i=y.useCallback(()=>n(),[n]);return{items:e.items,loading:e.loading,error:e.error,loadDataMarts:n,refreshList:i,deleteDataMart:a}}/**
290
- * table-core
291
- *
292
- * Copyright (c) TanStack
293
- *
294
- * This source code is licensed under the MIT license found in the
295
- * LICENSE.md file in the root directory of this source tree.
296
- *
297
- * @license MIT
298
- */function ho(e,t){return typeof e=="function"?e(t):e}function er(e,t){return n=>{t.setState(a=>({...a,[e]:ho(n,a[e])}))}}function Qf(e){return e instanceof Function}function L6(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function P6(e,t){const n=[],a=i=>{i.forEach(s=>{n.push(s);const u=t(s);u!=null&&u.length&&a(u)})};return a(e),n}function qe(e,t,n){let a=[],i;return s=>{let u;n.key&&n.debug&&(u=Date.now());const d=e(s);if(!(d.length!==a.length||d.some((g,b)=>a[b]!==g)))return i;a=d;let h;if(n.key&&n.debug&&(h=Date.now()),i=t(...d),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const g=Math.round((Date.now()-u)*100)/100,b=Math.round((Date.now()-h)*100)/100,x=b/16,S=(w,E)=>{for(w=String(w);w.length<E;)w=" "+w;return w};console.info(`%c⏱ ${S(b,5)} /${S(g,5)} ms`,`
299
- font-size: .6rem;
300
- font-weight: bold;
301
- color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Ze(e,t,n,a){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:a}}function z6(e,t,n,a){const i=()=>{var u;return(u=s.getValue())!=null?u:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(a),renderValue:i,getContext:qe(()=>[e,n,t,s],(u,d,f,h)=>({table:u,column:d,row:f,cell:h,getValue:h.getValue,renderValue:h.renderValue}),Ze(e.options,"debugCells"))};return e._features.forEach(u=>{u.createCell==null||u.createCell(s,n,t,e)},{}),s}function F6(e,t,n,a){var i,s;const d={...e._getDefaultColumnDef(),...t},f=d.accessorKey;let h=(i=(s=d.id)!=null?s:f?typeof String.prototype.replaceAll=="function"?f.replaceAll(".","_"):f.replace(/\./g,"_"):void 0)!=null?i:typeof d.header=="string"?d.header:void 0,g;if(d.accessorFn?g=d.accessorFn:f&&(f.includes(".")?g=x=>{let S=x;for(const E of f.split(".")){var w;S=(w=S)==null?void 0:w[E]}return S}:g=x=>x[d.accessorKey]),!h)throw new Error;let b={id:`${String(h)}`,accessorFn:g,parent:a,depth:n,columnDef:d,columns:[],getFlatColumns:qe(()=>[!0],()=>{var x;return[b,...(x=b.columns)==null?void 0:x.flatMap(S=>S.getFlatColumns())]},Ze(e.options,"debugColumns")),getLeafColumns:qe(()=>[e._getOrderColumnsFn()],x=>{var S;if((S=b.columns)!=null&&S.length){let w=b.columns.flatMap(E=>E.getLeafColumns());return x(w)}return[b]},Ze(e.options,"debugColumns"))};for(const x of e._features)x.createColumn==null||x.createColumn(b,e);return b}const bn="debugHeaders";function zw(e,t,n){var a;let s={id:(a=n.id)!=null?a:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const u=[],d=f=>{f.subHeaders&&f.subHeaders.length&&f.subHeaders.map(d),u.push(f)};return d(s),u},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(u=>{u.createHeader==null||u.createHeader(s,e)}),s}const U6={createTable:e=>{e.getHeaderGroups=qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,a,i)=>{var s,u;const d=(s=a==null?void 0:a.map(b=>n.find(x=>x.id===b)).filter(Boolean))!=null?s:[],f=(u=i==null?void 0:i.map(b=>n.find(x=>x.id===b)).filter(Boolean))!=null?u:[],h=n.filter(b=>!(a!=null&&a.includes(b.id))&&!(i!=null&&i.includes(b.id)));return md(t,[...d,...h,...f],e)},Ze(e.options,bn)),e.getCenterHeaderGroups=qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,a,i)=>(n=n.filter(s=>!(a!=null&&a.includes(s.id))&&!(i!=null&&i.includes(s.id))),md(t,n,e,"center")),Ze(e.options,bn)),e.getLeftHeaderGroups=qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,a)=>{var i;const s=(i=a==null?void 0:a.map(u=>n.find(d=>d.id===u)).filter(Boolean))!=null?i:[];return md(t,s,e,"left")},Ze(e.options,bn)),e.getRightHeaderGroups=qe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,a)=>{var i;const s=(i=a==null?void 0:a.map(u=>n.find(d=>d.id===u)).filter(Boolean))!=null?i:[];return md(t,s,e,"right")},Ze(e.options,bn)),e.getFooterGroups=qe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ze(e.options,bn)),e.getLeftFooterGroups=qe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ze(e.options,bn)),e.getCenterFooterGroups=qe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ze(e.options,bn)),e.getRightFooterGroups=qe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ze(e.options,bn)),e.getFlatHeaders=qe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,bn)),e.getLeftFlatHeaders=qe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,bn)),e.getCenterFlatHeaders=qe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,bn)),e.getRightFlatHeaders=qe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ze(e.options,bn)),e.getCenterLeafHeaders=qe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var a;return!((a=n.subHeaders)!=null&&a.length)}),Ze(e.options,bn)),e.getLeftLeafHeaders=qe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var a;return!((a=n.subHeaders)!=null&&a.length)}),Ze(e.options,bn)),e.getRightLeafHeaders=qe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var a;return!((a=n.subHeaders)!=null&&a.length)}),Ze(e.options,bn)),e.getLeafHeaders=qe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,a)=>{var i,s,u,d,f,h;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(u=(d=n[0])==null?void 0:d.headers)!=null?u:[],...(f=(h=a[0])==null?void 0:h.headers)!=null?f:[]].map(g=>g.getLeafHeaders()).flat()},Ze(e.options,bn))}};function md(e,t,n,a){var i,s;let u=0;const d=function(x,S){S===void 0&&(S=1),u=Math.max(u,S),x.filter(w=>w.getIsVisible()).forEach(w=>{var E;(E=w.columns)!=null&&E.length&&d(w.columns,S+1)},0)};d(e);let f=[];const h=(x,S)=>{const w={depth:S,id:[a,`${S}`].filter(Boolean).join("_"),headers:[]},E=[];x.forEach(C=>{const R=[...E].reverse()[0],T=C.column.depth===w.depth;let D,j=!1;if(T&&C.column.parent?D=C.column.parent:(D=C.column,j=!0),R&&(R==null?void 0:R.column)===D)R.subHeaders.push(C);else{const O=zw(n,D,{id:[a,S,D.id,C==null?void 0:C.id].filter(Boolean).join("_"),isPlaceholder:j,placeholderId:j?`${E.filter(M=>M.column===D).length}`:void 0,depth:S,index:E.length});O.subHeaders.push(C),E.push(O)}w.headers.push(C),C.headerGroup=w}),f.push(w),S>0&&h(E,S-1)},g=t.map((x,S)=>zw(n,x,{depth:u,index:S}));h(g,u-1),f.reverse();const b=x=>x.filter(w=>w.column.getIsVisible()).map(w=>{let E=0,C=0,R=[0];w.subHeaders&&w.subHeaders.length?(R=[],b(w.subHeaders).forEach(D=>{let{colSpan:j,rowSpan:O}=D;E+=j,R.push(O)})):E=1;const T=Math.min(...R);return C=C+T,w.colSpan=E,w.rowSpan=C,{colSpan:E,rowSpan:C}});return b((i=(s=f[0])==null?void 0:s.headers)!=null?i:[]),f}const Zv=(e,t,n,a,i,s,u)=>{let d={id:t,index:a,original:n,depth:i,parentId:u,_valuesCache:{},_uniqueValuesCache:{},getValue:f=>{if(d._valuesCache.hasOwnProperty(f))return d._valuesCache[f];const h=e.getColumn(f);if(h!=null&&h.accessorFn)return d._valuesCache[f]=h.accessorFn(d.original,a),d._valuesCache[f]},getUniqueValues:f=>{if(d._uniqueValuesCache.hasOwnProperty(f))return d._uniqueValuesCache[f];const h=e.getColumn(f);if(h!=null&&h.accessorFn)return h.columnDef.getUniqueValues?(d._uniqueValuesCache[f]=h.columnDef.getUniqueValues(d.original,a),d._uniqueValuesCache[f]):(d._uniqueValuesCache[f]=[d.getValue(f)],d._uniqueValuesCache[f])},renderValue:f=>{var h;return(h=d.getValue(f))!=null?h:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>P6(d.subRows,f=>f.subRows),getParentRow:()=>d.parentId?e.getRow(d.parentId,!0):void 0,getParentRows:()=>{let f=[],h=d;for(;;){const g=h.getParentRow();if(!g)break;f.push(g),h=g}return f.reverse()},getAllCells:qe(()=>[e.getAllLeafColumns()],f=>f.map(h=>z6(e,d,h,h.id)),Ze(e.options,"debugRows")),_getAllCellsByColumnId:qe(()=>[d.getAllCells()],f=>f.reduce((h,g)=>(h[g.column.id]=g,h),{}),Ze(e.options,"debugRows"))};for(let f=0;f<e._features.length;f++){const h=e._features[f];h==null||h.createRow==null||h.createRow(d,e)}return d},I6={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},eR=(e,t,n)=>{var a,i;const s=n==null||(a=n.toString())==null?void 0:a.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};eR.autoRemove=e=>Nr(e);const tR=(e,t,n)=>{var a;return!!(!((a=e.getValue(t))==null||(a=a.toString())==null)&&a.includes(n))};tR.autoRemove=e=>Nr(e);const nR=(e,t,n)=>{var a;return((a=e.getValue(t))==null||(a=a.toString())==null?void 0:a.toLowerCase())===(n==null?void 0:n.toLowerCase())};nR.autoRemove=e=>Nr(e);const rR=(e,t,n)=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(n)};rR.autoRemove=e=>Nr(e);const aR=(e,t,n)=>!n.some(a=>{var i;return!((i=e.getValue(t))!=null&&i.includes(a))});aR.autoRemove=e=>Nr(e)||!(e!=null&&e.length);const oR=(e,t,n)=>n.some(a=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(a)});oR.autoRemove=e=>Nr(e)||!(e!=null&&e.length);const iR=(e,t,n)=>e.getValue(t)===n;iR.autoRemove=e=>Nr(e);const lR=(e,t,n)=>e.getValue(t)==n;lR.autoRemove=e=>Nr(e);const Yv=(e,t,n)=>{let[a,i]=n;const s=e.getValue(t);return s>=a&&s<=i};Yv.resolveFilterValue=e=>{let[t,n]=e,a=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(a)?-1/0:a,u=n===null||Number.isNaN(i)?1/0:i;if(s>u){const d=s;s=u,u=d}return[s,u]};Yv.autoRemove=e=>Nr(e)||Nr(e[0])&&Nr(e[1]);const wa={includesString:eR,includesStringSensitive:tR,equalsString:nR,arrIncludes:rR,arrIncludesAll:aR,arrIncludesSome:oR,equals:iR,weakEquals:lR,inNumberRange:Yv};function Nr(e){return e==null||e===""}const V6={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:er("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],a=n==null?void 0:n.getValue(e.id);return typeof a=="string"?wa.includesString:typeof a=="number"?wa.inNumberRange:typeof a=="boolean"||a!==null&&typeof a=="object"?wa.equals:Array.isArray(a)?wa.arrIncludes:wa.weakEquals},e.getFilterFn=()=>{var n,a;return Qf(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(a=t.options.filterFns)==null?void 0:a[e.columnDef.filterFn])!=null?n:wa[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,a,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((a=t.options.enableColumnFilters)!=null?a:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(a=>a.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,a;return(n=(a=t.getState().columnFilters)==null?void 0:a.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(a=>{const i=e.getFilterFn(),s=a==null?void 0:a.find(g=>g.id===e.id),u=ho(n,s?s.value:void 0);if(Fw(i,u,e)){var d;return(d=a==null?void 0:a.filter(g=>g.id!==e.id))!=null?d:[]}const f={id:e.id,value:u};if(s){var h;return(h=a==null?void 0:a.map(g=>g.id===e.id?f:g))!=null?h:[]}return a!=null&&a.length?[...a,f]:[f]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),a=i=>{var s;return(s=ho(t,i))==null?void 0:s.filter(u=>{const d=n.find(f=>f.id===u.id);if(d){const f=d.getFilterFn();if(Fw(f,u.value,d))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(a)},e.resetColumnFilters=t=>{var n,a;e.setColumnFilters(t?[]:(n=(a=e.initialState)==null?void 0:a.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Fw(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const $6=(e,t,n)=>n.reduce((a,i)=>{const s=i.getValue(e);return a+(typeof s=="number"?s:0)},0),H6=(e,t,n)=>{let a;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(a>s||a===void 0&&s>=s)&&(a=s)}),a},B6=(e,t,n)=>{let a;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(a<s||a===void 0&&s>=s)&&(a=s)}),a},G6=(e,t,n)=>{let a,i;return n.forEach(s=>{const u=s.getValue(e);u!=null&&(a===void 0?u>=u&&(a=i=u):(a>u&&(a=u),i<u&&(i=u)))}),[a,i]},q6=(e,t)=>{let n=0,a=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,a+=s)}),n)return a/n},Z6=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!L6(n))return;if(n.length===1)return n[0];const a=Math.floor(n.length/2),i=n.sort((s,u)=>s-u);return n.length%2!==0?i[a]:(i[a-1]+i[a])/2},Y6=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),K6=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Q6=(e,t)=>t.length,Zp={sum:$6,min:H6,max:B6,extent:G6,mean:q6,median:Z6,unique:Y6,uniqueCount:K6,count:Q6},X6={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:er("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(a=>a!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,a;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((a=t.options.enableGrouping)!=null?a:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],a=n==null?void 0:n.getValue(e.id);if(typeof a=="number")return Zp.sum;if(Object.prototype.toString.call(a)==="[object Date]")return Zp.extent},e.getAggregationFn=()=>{var n,a;if(!e)throw new Error;return Qf(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(a=t.options.aggregationFns)==null?void 0:a[e.columnDef.aggregationFn])!=null?n:Zp[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,a;e.setGrouping(t?[]:(n=(a=e.initialState)==null?void 0:a.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const a=t.getColumn(n);return a!=null&&a.columnDef.getGroupingValue?(e._groupingValuesCache[n]=a.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,a)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function W6(e,t,n){if(!(t!=null&&t.length)||!n)return e;const a=e.filter(s=>!t.includes(s.id));return n==="remove"?a:[...t.map(s=>e.find(u=>u.id===s)).filter(Boolean),...a]}const J6={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:er("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=qe(n=>[au(t,n)],n=>n.findIndex(a=>a.id===e.id),Ze(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var a;return((a=au(t,n)[0])==null?void 0:a.id)===e.id},e.getIsLastColumn=n=>{var a;const i=au(t,n);return((a=i[i.length-1])==null?void 0:a.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=qe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,a)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const u=[...t],d=[...i];for(;d.length&&u.length;){const f=u.shift(),h=d.findIndex(g=>g.id===f);h>-1&&s.push(d.splice(h,1)[0])}s=[...s,...d]}return W6(s,n,a)},Ze(e.options,"debugTable"))}},Yp=()=>({left:[],right:[]}),e9={getInitialState:e=>({columnPinning:Yp(),...e}),getDefaultOptions:e=>({onColumnPinningChange:er("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const a=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,u;if(n==="right"){var d,f;return{left:((d=i==null?void 0:i.left)!=null?d:[]).filter(b=>!(a!=null&&a.includes(b))),right:[...((f=i==null?void 0:i.right)!=null?f:[]).filter(b=>!(a!=null&&a.includes(b))),...a]}}if(n==="left"){var h,g;return{left:[...((h=i==null?void 0:i.left)!=null?h:[]).filter(b=>!(a!=null&&a.includes(b))),...a],right:((g=i==null?void 0:i.right)!=null?g:[]).filter(b=>!(a!=null&&a.includes(b)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(b=>!(a!=null&&a.includes(b))),right:((u=i==null?void 0:i.right)!=null?u:[]).filter(b=>!(a!=null&&a.includes(b)))}})},e.getCanPin=()=>e.getLeafColumns().some(a=>{var i,s,u;return((i=a.columnDef.enablePinning)!=null?i:!0)&&((s=(u=t.options.enableColumnPinning)!=null?u:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(d=>d.id),{left:a,right:i}=t.getState().columnPinning,s=n.some(d=>a==null?void 0:a.includes(d)),u=n.some(d=>i==null?void 0:i.includes(d));return s?"left":u?"right":!1},e.getPinnedIndex=()=>{var n,a;const i=e.getIsPinned();return i?(n=(a=t.getState().columnPinning)==null||(a=a[i])==null?void 0:a.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,a,i)=>{const s=[...a??[],...i??[]];return n.filter(u=>!s.includes(u.column.id))},Ze(t.options,"debugRows")),e.getLeftVisibleCells=qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,a)=>(a??[]).map(s=>n.find(u=>u.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Ze(t.options,"debugRows")),e.getRightVisibleCells=qe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,a)=>(a??[]).map(s=>n.find(u=>u.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Ze(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,a;return e.setColumnPinning(t?Yp():(n=(a=e.initialState)==null?void 0:a.columnPinning)!=null?n:Yp())},e.getIsSomeColumnsPinned=t=>{var n;const a=e.getState().columnPinning;if(!t){var i,s;return!!((i=a.left)!=null&&i.length||(s=a.right)!=null&&s.length)}return!!((n=a[t])!=null&&n.length)},e.getLeftLeafColumns=qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(a=>t.find(i=>i.id===a)).filter(Boolean),Ze(e.options,"debugColumns")),e.getRightLeafColumns=qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(a=>t.find(i=>i.id===a)).filter(Boolean),Ze(e.options,"debugColumns")),e.getCenterLeafColumns=qe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,a)=>{const i=[...n??[],...a??[]];return t.filter(s=>!i.includes(s.id))},Ze(e.options,"debugColumns"))}};function t9(e){return e||(typeof document<"u"?document:null)}const pd={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Kp=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),n9={getDefaultColumnDef:()=>pd,getInitialState:e=>({columnSizing:{},columnSizingInfo:Kp(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:er("columnSizing",e),onColumnSizingInfoChange:er("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,a,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:pd.minSize,(a=s??e.columnDef.size)!=null?a:pd.size),(i=e.columnDef.maxSize)!=null?i:pd.maxSize)},e.getStart=qe(n=>[n,au(t,n),t.getState().columnSizing],(n,a)=>a.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),Ze(t.options,"debugColumns")),e.getAfter=qe(n=>[n,au(t,n),t.getState().columnSizing],(n,a)=>a.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),Ze(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:a,...i}=n;return i})},e.getCanResize=()=>{var n,a;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((a=t.options.enableColumnResizing)!=null?a:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const a=i=>{if(i.subHeaders.length)i.subHeaders.forEach(a);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return a(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const a=t.getColumn(e.column.id),i=a==null?void 0:a.getCanResize();return s=>{if(!a||!i||(s.persist==null||s.persist(),Qp(s)&&s.touches&&s.touches.length>1))return;const u=e.getSize(),d=e?e.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[a.id,a.getSize()]],f=Qp(s)?Math.round(s.touches[0].clientX):s.clientX,h={},g=(R,T)=>{typeof T=="number"&&(t.setColumnSizingInfo(D=>{var j,O;const M=t.options.columnResizeDirection==="rtl"?-1:1,I=(T-((j=D==null?void 0:D.startOffset)!=null?j:0))*M,Z=Math.max(I/((O=D==null?void 0:D.startSize)!=null?O:0),-.999999);return D.columnSizingStart.forEach(ee=>{let[se,ye]=ee;h[se]=Math.round(Math.max(ye+ye*Z,0)*100)/100}),{...D,deltaOffset:I,deltaPercentage:Z}}),(t.options.columnResizeMode==="onChange"||R==="end")&&t.setColumnSizing(D=>({...D,...h})))},b=R=>g("move",R),x=R=>{g("end",R),t.setColumnSizingInfo(T=>({...T,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},S=t9(n),w={moveHandler:R=>b(R.clientX),upHandler:R=>{S==null||S.removeEventListener("mousemove",w.moveHandler),S==null||S.removeEventListener("mouseup",w.upHandler),x(R.clientX)}},E={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),b(R.touches[0].clientX),!1),upHandler:R=>{var T;S==null||S.removeEventListener("touchmove",E.moveHandler),S==null||S.removeEventListener("touchend",E.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),x((T=R.touches[0])==null?void 0:T.clientX)}},C=r9()?{passive:!1}:!1;Qp(s)?(S==null||S.addEventListener("touchmove",E.moveHandler,C),S==null||S.addEventListener("touchend",E.upHandler,C)):(S==null||S.addEventListener("mousemove",w.moveHandler,C),S==null||S.addEventListener("mouseup",w.upHandler,C)),t.setColumnSizingInfo(R=>({...R,startOffset:f,startSize:u,deltaOffset:0,deltaPercentage:0,columnSizingStart:d,isResizingColumn:a.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Kp():(n=e.initialState.columnSizingInfo)!=null?n:Kp())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((a,i)=>a+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((a,i)=>a+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((a,i)=>a+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((a,i)=>a+i.getSize(),0))!=null?t:0}}};let gd=null;function r9(){if(typeof gd=="boolean")return gd;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return gd=e,gd}function Qp(e){return e.type==="touchstart"}const a9={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:er("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(a=>({...a,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,a;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(a=t.getState().columnVisibility)==null?void 0:a[e.id])!=null?n:!0},e.getCanHide=()=>{var n,a;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((a=t.options.enableHiding)!=null?a:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=qe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(a=>a.column.getIsVisible()),Ze(t.options,"debugRows")),e.getVisibleCells=qe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,a,i)=>[...n,...a,...i],Ze(t.options,"debugRows"))},createTable:e=>{const t=(n,a)=>qe(()=>[a(),a().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Ze(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var a;e.setColumnVisibility(n?{}:(a=e.initialState.columnVisibility)!=null?a:{})},e.toggleAllColumnsVisible=n=>{var a;n=(a=n)!=null?a:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var a;e.toggleAllColumnsVisible((a=n.target)==null?void 0:a.checked)}}};function au(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const o9={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},i9={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:er("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const a=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof a=="string"||typeof a=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,a,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((a=t.options.enableGlobalFilter)!=null?a:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>wa.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:a}=e.options;return Qf(a)?a:a==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[a])!=null?t:wa[a]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},l9={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:er("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var a,i;if(!t){e._queue(()=>{t=!0});return}if((a=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?a:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=a=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(a),e.toggleAllRowsExpanded=a=>{a??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=a=>{var i,s;e.setExpanded(a?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(a=>a.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>a=>{a.persist==null||a.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const a=e.getState().expanded;return a===!0||Object.values(a).some(Boolean)},e.getIsAllRowsExpanded=()=>{const a=e.getState().expanded;return typeof a=="boolean"?a===!0:!(!Object.keys(a).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let a=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const u=s.split(".");a=Math.max(a,u.length)}),a},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(a=>{var i;const s=a===!0?!0:!!(a!=null&&a[e.id]);let u={};if(a===!0?Object.keys(t.getRowModel().rowsById).forEach(d=>{u[d]=!0}):u=a,n=(i=n)!=null?i:!s,!s&&n)return{...u,[e.id]:!0};if(s&&!n){const{[e.id]:d,...f}=u;return f}return a})},e.getIsExpanded=()=>{var n;const a=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:a===!0||a!=null&&a[e.id])},e.getCanExpand=()=>{var n,a,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((a=t.options.enableExpanding)!=null?a:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,a=e;for(;n&&a.parentId;)a=t.getRow(a.parentId,!0),n=a.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},zg=0,Fg=10,Xp=()=>({pageIndex:zg,pageSize:Fg}),s9={getInitialState:e=>({...e,pagination:{...Xp(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:er("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var a,i;if(!t){e._queue(()=>{t=!0});return}if((a=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?a:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=a=>{const i=s=>ho(a,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=a=>{var i;e.setPagination(a?Xp():(i=e.initialState.pagination)!=null?i:Xp())},e.setPageIndex=a=>{e.setPagination(i=>{let s=ho(a,i.pageIndex);const u=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,u)),{...i,pageIndex:s}})},e.resetPageIndex=a=>{var i,s;e.setPageIndex(a?zg:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:zg)},e.resetPageSize=a=>{var i,s;e.setPageSize(a?Fg:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Fg)},e.setPageSize=a=>{e.setPagination(i=>{const s=Math.max(1,ho(a,i.pageSize)),u=i.pageSize*i.pageIndex,d=Math.floor(u/s);return{...i,pageIndex:d,pageSize:s}})},e.setPageCount=a=>e.setPagination(i=>{var s;let u=ho(a,(s=e.options.pageCount)!=null?s:-1);return typeof u=="number"&&(u=Math.max(-1,u)),{...i,pageCount:u}}),e.getPageOptions=qe(()=>[e.getPageCount()],a=>{let i=[];return a&&a>0&&(i=[...new Array(a)].fill(null).map((s,u)=>u)),i},Ze(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:a}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:a<i-1},e.previousPage=()=>e.setPageIndex(a=>a-1),e.nextPage=()=>e.setPageIndex(a=>a+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var a;return(a=e.options.pageCount)!=null?a:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var a;return(a=e.options.rowCount)!=null?a:e.getPrePaginationRowModel().rows.length}}},Wp=()=>({top:[],bottom:[]}),u9={getInitialState:e=>({rowPinning:Wp(),...e}),getDefaultOptions:e=>({onRowPinningChange:er("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,a,i)=>{const s=a?e.getLeafRows().map(f=>{let{id:h}=f;return h}):[],u=i?e.getParentRows().map(f=>{let{id:h}=f;return h}):[],d=new Set([...u,e.id,...s]);t.setRowPinning(f=>{var h,g;if(n==="bottom"){var b,x;return{top:((b=f==null?void 0:f.top)!=null?b:[]).filter(E=>!(d!=null&&d.has(E))),bottom:[...((x=f==null?void 0:f.bottom)!=null?x:[]).filter(E=>!(d!=null&&d.has(E))),...Array.from(d)]}}if(n==="top"){var S,w;return{top:[...((S=f==null?void 0:f.top)!=null?S:[]).filter(E=>!(d!=null&&d.has(E))),...Array.from(d)],bottom:((w=f==null?void 0:f.bottom)!=null?w:[]).filter(E=>!(d!=null&&d.has(E)))}}return{top:((h=f==null?void 0:f.top)!=null?h:[]).filter(E=>!(d!=null&&d.has(E))),bottom:((g=f==null?void 0:f.bottom)!=null?g:[]).filter(E=>!(d!=null&&d.has(E)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:a,enablePinning:i}=t.options;return typeof a=="function"?a(e):(n=a??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:a,bottom:i}=t.getState().rowPinning,s=n.some(d=>a==null?void 0:a.includes(d)),u=n.some(d=>i==null?void 0:i.includes(d));return s?"top":u?"bottom":!1},e.getPinnedIndex=()=>{var n,a;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(u=>{let{id:d}=u;return d});return(a=s==null?void 0:s.indexOf(e.id))!=null?a:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,a;return e.setRowPinning(t?Wp():(n=(a=e.initialState)==null?void 0:a.rowPinning)!=null?n:Wp())},e.getIsSomeRowsPinned=t=>{var n;const a=e.getState().rowPinning;if(!t){var i,s;return!!((i=a.top)!=null&&i.length||(s=a.bottom)!=null&&s.length)}return!!((n=a[t])!=null&&n.length)},e._getPinnedRows=(t,n,a)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(u=>{const d=e.getRow(u,!0);return d.getIsAllParentsExpanded()?d:null}):(n??[]).map(u=>t.find(d=>d.id===u))).filter(Boolean).map(u=>({...u,position:a}))},e.getTopRows=qe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ze(e.options,"debugRows")),e.getBottomRows=qe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ze(e.options,"debugRows")),e.getCenterRows=qe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,a)=>{const i=new Set([...n??[],...a??[]]);return t.filter(s=>!i.has(s.id))},Ze(e.options,"debugRows"))}},c9={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:er("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const a={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(a[s.id]=!0)}):i.forEach(s=>{delete a[s.id]}),a})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const a=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{Ug(i,s.id,a,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=qe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Jp(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable")),e.getFilteredSelectedRowModel=qe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Jp(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable")),e.getGroupedSelectedRowModel=qe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Jp(e,n):{rows:[],flatRows:[],rowsById:{}},Ze(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let a=!!(t.length&&Object.keys(n).length);return a&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(a=!1),a},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let a=!!t.length;return a&&t.some(i=>!n[i.id])&&(a=!1),a},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,a)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var u;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const d={...s};return Ug(d,e.id,n,(u=a==null?void 0:a.selectChildren)!=null?u:!0,t),d})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Kv(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ig(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ig(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return a=>{var i;n&&e.toggleSelected((i=a.target)==null?void 0:i.checked)}}}},Ug=(e,t,n,a,i)=>{var s;const u=i.getRow(t,!0);n?(u.getCanMultiSelect()||Object.keys(e).forEach(d=>delete e[d]),u.getCanSelect()&&(e[t]=!0)):delete e[t],a&&(s=u.subRows)!=null&&s.length&&u.getCanSelectSubRows()&&u.subRows.forEach(d=>Ug(e,d.id,n,a,i))};function Jp(e,t){const n=e.getState().rowSelection,a=[],i={},s=function(u,d){return u.map(f=>{var h;const g=Kv(f,n);if(g&&(a.push(f),i[f.id]=f),(h=f.subRows)!=null&&h.length&&(f={...f,subRows:s(f.subRows)}),g)return f}).filter(Boolean)};return{rows:s(t.rows),flatRows:a,rowsById:i}}function Kv(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ig(e,t,n){var a;if(!((a=e.subRows)!=null&&a.length))return!1;let i=!0,s=!1;return e.subRows.forEach(u=>{if(!(s&&!i)&&(u.getCanSelect()&&(Kv(u,t)?s=!0:i=!1),u.subRows&&u.subRows.length)){const d=Ig(u,t);d==="all"?s=!0:(d==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const Vg=/([0-9]+)/gm,d9=(e,t,n)=>sR(_o(e.getValue(n)).toLowerCase(),_o(t.getValue(n)).toLowerCase()),f9=(e,t,n)=>sR(_o(e.getValue(n)),_o(t.getValue(n))),h9=(e,t,n)=>Qv(_o(e.getValue(n)).toLowerCase(),_o(t.getValue(n)).toLowerCase()),m9=(e,t,n)=>Qv(_o(e.getValue(n)),_o(t.getValue(n))),p9=(e,t,n)=>{const a=e.getValue(n),i=t.getValue(n);return a>i?1:a<i?-1:0},g9=(e,t,n)=>Qv(e.getValue(n),t.getValue(n));function Qv(e,t){return e===t?0:e>t?1:-1}function _o(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function sR(e,t){const n=e.split(Vg).filter(Boolean),a=t.split(Vg).filter(Boolean);for(;n.length&&a.length;){const i=n.shift(),s=a.shift(),u=parseInt(i,10),d=parseInt(s,10),f=[u,d].sort();if(isNaN(f[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(f[1]))return isNaN(u)?-1:1;if(u>d)return 1;if(d>u)return-1}return n.length-a.length}const Zs={alphanumeric:d9,alphanumericCaseSensitive:f9,text:h9,textCaseSensitive:m9,datetime:p9,basic:g9},v9={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:er("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let a=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Zs.datetime;if(typeof s=="string"&&(a=!0,s.split(Vg).length>1))return Zs.alphanumeric}return a?Zs.text:Zs.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,a;if(!e)throw new Error;return Qf(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(a=t.options.sortingFns)==null?void 0:a[e.columnDef.sortingFn])!=null?n:Zs[e.columnDef.sortingFn]},e.toggleSorting=(n,a)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(u=>{const d=u==null?void 0:u.find(S=>S.id===e.id),f=u==null?void 0:u.findIndex(S=>S.id===e.id);let h=[],g,b=s?n:i==="desc";if(u!=null&&u.length&&e.getCanMultiSort()&&a?d?g="toggle":g="add":u!=null&&u.length&&f!==u.length-1?g="replace":d?g="toggle":g="replace",g==="toggle"&&(s||i||(g="remove")),g==="add"){var x;h=[...u,{id:e.id,desc:b}],h.splice(0,h.length-((x=t.options.maxMultiSortColCount)!=null?x:Number.MAX_SAFE_INTEGER))}else g==="toggle"?h=u.map(S=>S.id===e.id?{...S,desc:b}:S):g==="remove"?h=u.filter(S=>S.id!==e.id):h=[{id:e.id,desc:b}];return h})},e.getFirstSortDir=()=>{var n,a;return((n=(a=e.columnDef.sortDescFirst)!=null?a:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var a,i;const s=e.getFirstSortDir(),u=e.getIsSorted();return u?u!==s&&((a=t.options.enableSortingRemoval)==null||a)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:u==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,a;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((a=t.options.enableSorting)!=null?a:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,a;return(n=(a=e.columnDef.enableMultiSort)!=null?a:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const a=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return a?a.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,a;return(n=(a=t.getState().sorting)==null?void 0:a.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(a=>a.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return a=>{n&&(a.persist==null||a.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(a):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,a;e.setSorting(t?[]:(n=(a=e.initialState)==null?void 0:a.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},y9=[U6,a9,J6,e9,I6,V6,o9,i9,v9,X6,l9,s9,u9,c9,n9];function x9(e){var t,n;const a=[...y9,...(t=e._features)!=null?t:[]];let i={_features:a};const s=i._features.reduce((x,S)=>Object.assign(x,S.getDefaultOptions==null?void 0:S.getDefaultOptions(i)),{}),u=x=>i.options.mergeOptions?i.options.mergeOptions(s,x):{...s,...x};let f={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(x=>{var S;f=(S=x.getInitialState==null?void 0:x.getInitialState(f))!=null?S:f});const h=[];let g=!1;const b={_features:a,options:{...s,...e},initialState:f,_queue:x=>{h.push(x),g||(g=!0,Promise.resolve().then(()=>{for(;h.length;)h.shift()();g=!1}).catch(S=>setTimeout(()=>{throw S})))},reset:()=>{i.setState(i.initialState)},setOptions:x=>{const S=ho(x,i.options);i.options=u(S)},getState:()=>i.options.state,setState:x=>{i.options.onStateChange==null||i.options.onStateChange(x)},_getRowId:(x,S,w)=>{var E;return(E=i.options.getRowId==null?void 0:i.options.getRowId(x,S,w))!=null?E:`${w?[w.id,S].join("."):S}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(x,S)=>{let w=(S?i.getPrePaginationRowModel():i.getRowModel()).rowsById[x];if(!w&&(w=i.getCoreRowModel().rowsById[x],!w))throw new Error;return w},_getDefaultColumnDef:qe(()=>[i.options.defaultColumn],x=>{var S;return x=(S=x)!=null?S:{},{header:w=>{const E=w.header.column.columnDef;return E.accessorKey?E.accessorKey:E.accessorFn?E.id:null},cell:w=>{var E,C;return(E=(C=w.renderValue())==null||C.toString==null?void 0:C.toString())!=null?E:null},...i._features.reduce((w,E)=>Object.assign(w,E.getDefaultColumnDef==null?void 0:E.getDefaultColumnDef()),{}),...x}},Ze(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:qe(()=>[i._getColumnDefs()],x=>{const S=function(w,E,C){return C===void 0&&(C=0),w.map(R=>{const T=F6(i,R,C,E),D=R;return T.columns=D.columns?S(D.columns,T,C+1):[],T})};return S(x)},Ze(e,"debugColumns")),getAllFlatColumns:qe(()=>[i.getAllColumns()],x=>x.flatMap(S=>S.getFlatColumns()),Ze(e,"debugColumns")),_getAllFlatColumnsById:qe(()=>[i.getAllFlatColumns()],x=>x.reduce((S,w)=>(S[w.id]=w,S),{}),Ze(e,"debugColumns")),getAllLeafColumns:qe(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(x,S)=>{let w=x.flatMap(E=>E.getLeafColumns());return S(w)},Ze(e,"debugColumns")),getColumn:x=>i._getAllFlatColumnsById()[x]};Object.assign(i,b);for(let x=0;x<i._features.length;x++){const S=i._features[x];S==null||S.createTable==null||S.createTable(i)}return i}function uR(){return e=>qe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},a=function(i,s,u){s===void 0&&(s=0);const d=[];for(let h=0;h<i.length;h++){const g=Zv(e,e._getRowId(i[h],h,u),i[h],h,s,void 0,u==null?void 0:u.id);if(n.flatRows.push(g),n.rowsById[g.id]=g,d.push(g),e.options.getSubRows){var f;g.originalSubRows=e.options.getSubRows(i[h],h),(f=g.originalSubRows)!=null&&f.length&&(g.subRows=a(g.originalSubRows,s+1,g))}}return d};return n.rows=a(t),n},Ze(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function b9(e){const t=[],n=a=>{var i;t.push(a),(i=a.subRows)!=null&&i.length&&a.getIsExpanded()&&a.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function S9(e,t,n){return n.options.filterFromLeafRows?w9(e,t,n):E9(e,t,n)}function w9(e,t,n){var a;const i=[],s={},u=(a=n.options.maxLeafRowFilterDepth)!=null?a:100,d=function(f,h){h===void 0&&(h=0);const g=[];for(let x=0;x<f.length;x++){var b;let S=f[x];const w=Zv(n,S.id,S.original,S.index,S.depth,void 0,S.parentId);if(w.columnFilters=S.columnFilters,(b=S.subRows)!=null&&b.length&&h<u){if(w.subRows=d(S.subRows,h+1),S=w,t(S)&&!w.subRows.length){g.push(S),s[S.id]=S,i.push(S);continue}if(t(S)||w.subRows.length){g.push(S),s[S.id]=S,i.push(S);continue}}else S=w,t(S)&&(g.push(S),s[S.id]=S,i.push(S))}return g};return{rows:d(e),flatRows:i,rowsById:s}}function E9(e,t,n){var a;const i=[],s={},u=(a=n.options.maxLeafRowFilterDepth)!=null?a:100,d=function(f,h){h===void 0&&(h=0);const g=[];for(let x=0;x<f.length;x++){let S=f[x];if(t(S)){var b;if((b=S.subRows)!=null&&b.length&&h<u){const E=Zv(n,S.id,S.original,S.index,S.depth,void 0,S.parentId);E.subRows=d(S.subRows,h+1),S=E}g.push(S),i.push(S),s[S.id]=S}}return g};return{rows:d(e),flatRows:i,rowsById:s}}function cR(){return e=>qe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,a)=>{if(!t.rows.length||!(n!=null&&n.length)&&!a){for(let x=0;x<t.flatRows.length;x++)t.flatRows[x].columnFilters={},t.flatRows[x].columnFiltersMeta={};return t}const i=[],s=[];(n??[]).forEach(x=>{var S;const w=e.getColumn(x.id);if(!w)return;const E=w.getFilterFn();E&&i.push({id:x.id,filterFn:E,resolvedValue:(S=E.resolveFilterValue==null?void 0:E.resolveFilterValue(x.value))!=null?S:x.value})});const u=(n??[]).map(x=>x.id),d=e.getGlobalFilterFn(),f=e.getAllLeafColumns().filter(x=>x.getCanGlobalFilter());a&&d&&f.length&&(u.push("__global__"),f.forEach(x=>{var S;s.push({id:x.id,filterFn:d,resolvedValue:(S=d.resolveFilterValue==null?void 0:d.resolveFilterValue(a))!=null?S:a})}));let h,g;for(let x=0;x<t.flatRows.length;x++){const S=t.flatRows[x];if(S.columnFilters={},i.length)for(let w=0;w<i.length;w++){h=i[w];const E=h.id;S.columnFilters[E]=h.filterFn(S,E,h.resolvedValue,C=>{S.columnFiltersMeta[E]=C})}if(s.length){for(let w=0;w<s.length;w++){g=s[w];const E=g.id;if(g.filterFn(S,E,g.resolvedValue,C=>{S.columnFiltersMeta[E]=C})){S.columnFilters.__global__=!0;break}}S.columnFilters.__global__!==!0&&(S.columnFilters.__global__=!1)}}const b=x=>{for(let S=0;S<u.length;S++)if(x.columnFilters[u[S]]===!1)return!1;return!0};return S9(t.rows,b,e)},Ze(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function dR(e){return t=>qe(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,a)=>{if(!a.rows.length)return a;const{pageSize:i,pageIndex:s}=n;let{rows:u,flatRows:d,rowsById:f}=a;const h=i*s,g=h+i;u=u.slice(h,g);let b;t.options.paginateExpandedRows?b={rows:u,flatRows:d,rowsById:f}:b=b9({rows:u,flatRows:d,rowsById:f}),b.flatRows=[];const x=S=>{b.flatRows.push(S),S.subRows.length&&S.subRows.forEach(x)};return b.rows.forEach(x),b},Ze(t.options,"debugTable"))}function fR(){return e=>qe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const a=e.getState().sorting,i=[],s=a.filter(f=>{var h;return(h=e.getColumn(f.id))==null?void 0:h.getCanSort()}),u={};s.forEach(f=>{const h=e.getColumn(f.id);h&&(u[f.id]={sortUndefined:h.columnDef.sortUndefined,invertSorting:h.columnDef.invertSorting,sortingFn:h.getSortingFn()})});const d=f=>{const h=f.map(g=>({...g}));return h.sort((g,b)=>{for(let S=0;S<s.length;S+=1){var x;const w=s[S],E=u[w.id],C=E.sortUndefined,R=(x=w==null?void 0:w.desc)!=null?x:!1;let T=0;if(C){const D=g.getValue(w.id),j=b.getValue(w.id),O=D===void 0,M=j===void 0;if(O||M){if(C==="first")return O?-1:1;if(C==="last")return O?1:-1;T=O&&M?0:O?C:-C}}if(T===0&&(T=E.sortingFn(g,b,w.id)),T!==0)return R&&(T*=-1),E.invertSorting&&(T*=-1),T}return g.index-b.index}),h.forEach(g=>{var b;i.push(g),(b=g.subRows)!=null&&b.length&&(g.subRows=d(g.subRows))}),h};return{rows:d(n.rows),flatRows:i,rowsById:n.rowsById}},Ze(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
302
- * react-table
303
- *
304
- * Copyright (c) TanStack
305
- *
306
- * This source code is licensed under the MIT license found in the
307
- * LICENSE.md file in the root directory of this source tree.
308
- *
309
- * @license MIT
310
- */function sf(e,t){return e?_9(e)?y.createElement(e,t):e:null}function _9(e){return C9(e)||typeof e=="function"||R9(e)}function C9(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function R9(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function hR(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:x9(t)})),[a,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...a,...e.state},onStateChange:u=>{i(u),e.onStateChange==null||e.onStateChange(u)}})),n.current}function mR({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:Se("w-full caption-bottom text-sm",e),...t})})}function pR({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:Se("[&_tr]:border-b",e),...t})}function gR({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:Se("[&_tr:last-child]:border-0",e),...t})}function wl({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:Se("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function vR({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:Se("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function uf({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:Se("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}var yR="AlertDialog",[A9,B$]=ea(yR,[_1]),Ma=_1(),xR=e=>{const{__scopeAlertDialog:t,...n}=e,a=Ma(t);return p.jsx(Rf,{...a,...n,modal:!0})};xR.displayName=yR;var T9="AlertDialogTrigger",D9=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,i=Ma(n);return p.jsx(J3,{...i,...a,ref:t})});D9.displayName=T9;var M9="AlertDialogPortal",bR=e=>{const{__scopeAlertDialog:t,...n}=e,a=Ma(t);return p.jsx(Af,{...a,...n})};bR.displayName=M9;var O9="AlertDialogOverlay",SR=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,i=Ma(n);return p.jsx(Tf,{...i,...a,ref:t})});SR.displayName=O9;var El="AlertDialogContent",[N9,j9]=A9(El),k9=BE("AlertDialogContent"),wR=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...i}=e,s=Ma(n),u=y.useRef(null),d=St(t,u),f=y.useRef(null);return p.jsx(K3,{contentName:El,titleName:ER,docsSlug:"alert-dialog",children:p.jsx(N9,{scope:n,cancelRef:f,children:p.jsxs(Df,{role:"alertdialog",...s,...i,ref:d,onOpenAutoFocus:Te(i.onOpenAutoFocus,h=>{var g;h.preventDefault(),(g=f.current)==null||g.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[p.jsx(k9,{children:a}),p.jsx(P9,{contentRef:u})]})})})});wR.displayName=El;var ER="AlertDialogTitle",_R=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,i=Ma(n);return p.jsx(yv,{...i,...a,ref:t})});_R.displayName=ER;var CR="AlertDialogDescription",RR=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,i=Ma(n);return p.jsx(xv,{...i,...a,ref:t})});RR.displayName=CR;var L9="AlertDialogAction",AR=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,i=Ma(n);return p.jsx(Mf,{...i,...a,ref:t})});AR.displayName=L9;var TR="AlertDialogCancel",DR=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:i}=j9(TR,n),s=Ma(n),u=St(t,i);return p.jsx(Mf,{...s,...a,ref:u})});DR.displayName=TR;var P9=({contentRef:e})=>{const t=`\`${El}\` requires a description for the component to be accessible for screen reader users.
311
-
312
- You can add a description to the \`${El}\` by passing a \`${CR}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
313
-
314
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${El}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
315
-
316
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var a;document.getElementById((a=e.current)==null?void 0:a.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},z9=xR,F9=bR,U9=SR,I9=wR,V9=AR,$9=DR,H9=_R,B9=RR;function G9({...e}){return p.jsx(z9,{"data-slot":"alert-dialog",...e})}function q9({...e}){return p.jsx(F9,{"data-slot":"alert-dialog-portal",...e})}function Z9({className:e,...t}){return p.jsx(U9,{"data-slot":"alert-dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Y9({className:e,...t}){return p.jsxs(q9,{children:[p.jsx(Z9,{}),p.jsx(I9,{"data-slot":"alert-dialog-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function K9({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Q9({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-footer",className:Se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function X9({className:e,...t}){return p.jsx(H9,{"data-slot":"alert-dialog-title",className:Se("text-lg font-semibold",e),...t})}function W9({className:e,...t}){return p.jsx(B9,{"data-slot":"alert-dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}function J9({className:e,...t}){return p.jsx(V9,{className:Se(mv(),e),...t})}function eF({className:e,...t}){return p.jsx($9,{className:Se(mv({variant:"outline"}),e),...t})}let tF={data:""},nF=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||tF,rF=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,aF=/\/\*[^]*?\*\/| +/g,Uw=/\n+/g,uo=(e,t)=>{let n="",a="",i="";for(let s in e){let u=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+u+";":a+=s[1]=="f"?uo(u,s):s+"{"+uo(u,s[1]=="k"?"":t)+"}":typeof u=="object"?a+=uo(u,t?t.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,d):d?d+" "+f:f)):s):u!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=uo.p?uo.p(s,u):s+":"+u+";")}return n+(t&&i?t+"{"+i+"}":i)+a},ya={},MR=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+MR(e[n]);return t}return e},oF=(e,t,n,a,i)=>{let s=MR(e),u=ya[s]||(ya[s]=(f=>{let h=0,g=11;for(;h<f.length;)g=101*g+f.charCodeAt(h++)>>>0;return"go"+g})(s));if(!ya[u]){let f=s!==e?e:(h=>{let g,b,x=[{}];for(;g=rF.exec(h.replace(aF,""));)g[4]?x.shift():g[3]?(b=g[3].replace(Uw," ").trim(),x.unshift(x[0][b]=x[0][b]||{})):x[0][g[1]]=g[2].replace(Uw," ").trim();return x[0]})(e);ya[u]=uo(i?{["@keyframes "+u]:f}:f,n?"":"."+u)}let d=n&&ya.g?ya.g:null;return n&&(ya.g=ya[u]),((f,h,g,b)=>{b?h.data=h.data.replace(b,f):h.data.indexOf(f)===-1&&(h.data=g?f+h.data:h.data+f)})(ya[u],t,a,d),u},iF=(e,t,n)=>e.reduce((a,i,s)=>{let u=t[s];if(u&&u.call){let d=u(n),f=d&&d.props&&d.props.className||/^go/.test(d)&&d;u=f?"."+f:d&&typeof d=="object"?d.props?"":uo(d,""):d===!1?"":d}return a+i+(u??"")},"");function Xf(e){let t=this||{},n=e.call?e(t.p):e;return oF(n.unshift?n.raw?iF(n,[].slice.call(arguments,1),t.p):n.reduce((a,i)=>Object.assign(a,i&&i.call?i(t.p):i),{}):n,nF(t.target),t.g,t.o,t.k)}let OR,$g,Hg;Xf.bind({g:1});let Da=Xf.bind({k:1});function lF(e,t,n,a){uo.p=t,OR=e,$g=n,Hg=a}function Do(e,t){let n=this||{};return function(){let a=arguments;function i(s,u){let d=Object.assign({},s),f=d.className||i.className;n.p=Object.assign({theme:$g&&$g()},d),n.o=/ *go\d+/.test(f),d.className=Xf.apply(n,a)+(f?" "+f:"");let h=e;return e[0]&&(h=d.as||e,delete d.as),Hg&&h[0]&&Hg(d),OR(h,d)}return i}}var sF=e=>typeof e=="function",cf=(e,t)=>sF(e)?e(t):e,uF=(()=>{let e=0;return()=>(++e).toString()})(),NR=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),cF=20,jR=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,cF)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return jR(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(s=>s.id===a||a===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},Od=[],oi={toasts:[],pausedAt:void 0},Ci=e=>{oi=jR(oi,e),Od.forEach(t=>{t(oi)})},dF={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},fF=(e={})=>{let[t,n]=y.useState(oi),a=y.useRef(oi);y.useEffect(()=>(a.current!==oi&&n(oi),Od.push(n),()=>{let s=Od.indexOf(n);s>-1&&Od.splice(s,1)}),[]);let i=t.toasts.map(s=>{var u,d,f;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((u=e[s.type])==null?void 0:u.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((d=e[s.type])==null?void 0:d.duration)||(e==null?void 0:e.duration)||dF[s.type],style:{...e.style,...(f=e[s.type])==null?void 0:f.style,...s.style}}});return{...t,toasts:i}},hF=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||uF()}),Iu=e=>(t,n)=>{let a=hF(t,e,n);return Ci({type:2,toast:a}),a.id},dn=(e,t)=>Iu("blank")(e,t);dn.error=Iu("error");dn.success=Iu("success");dn.loading=Iu("loading");dn.custom=Iu("custom");dn.dismiss=e=>{Ci({type:3,toastId:e})};dn.remove=e=>Ci({type:4,toastId:e});dn.promise=(e,t,n)=>{let a=dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let s=t.success?cf(t.success,i):void 0;return s?dn.success(s,{id:a,...n,...n==null?void 0:n.success}):dn.dismiss(a),i}).catch(i=>{let s=t.error?cf(t.error,i):void 0;s?dn.error(s,{id:a,...n,...n==null?void 0:n.error}):dn.dismiss(a)}),e};var mF=(e,t)=>{Ci({type:1,toast:{id:e,height:t}})},pF=()=>{Ci({type:5,time:Date.now()})},ou=new Map,gF=1e3,vF=(e,t=gF)=>{if(ou.has(e))return;let n=setTimeout(()=>{ou.delete(e),Ci({type:4,toastId:e})},t);ou.set(e,n)},yF=e=>{let{toasts:t,pausedAt:n}=fF(e);y.useEffect(()=>{if(n)return;let s=Date.now(),u=t.map(d=>{if(d.duration===1/0)return;let f=(d.duration||0)+d.pauseDuration-(s-d.createdAt);if(f<0){d.visible&&dn.dismiss(d.id);return}return setTimeout(()=>dn.dismiss(d.id),f)});return()=>{u.forEach(d=>d&&clearTimeout(d))}},[t,n]);let a=y.useCallback(()=>{n&&Ci({type:6,time:Date.now()})},[n]),i=y.useCallback((s,u)=>{let{reverseOrder:d=!1,gutter:f=8,defaultPosition:h}=u||{},g=t.filter(S=>(S.position||h)===(s.position||h)&&S.height),b=g.findIndex(S=>S.id===s.id),x=g.filter((S,w)=>w<b&&S.visible).length;return g.filter(S=>S.visible).slice(...d?[x+1]:[0,x]).reduce((S,w)=>S+(w.height||0)+f,0)},[t]);return y.useEffect(()=>{t.forEach(s=>{if(s.dismissed)vF(s.id,s.removeDelay);else{let u=ou.get(s.id);u&&(clearTimeout(u),ou.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:mF,startPause:pF,endPause:a,calculateOffset:i}}},xF=Da`
317
- from {
318
- transform: scale(0) rotate(45deg);
319
- opacity: 0;
320
- }
321
- to {
322
- transform: scale(1) rotate(45deg);
323
- opacity: 1;
324
- }`,bF=Da`
325
- from {
326
- transform: scale(0);
327
- opacity: 0;
328
- }
329
- to {
330
- transform: scale(1);
331
- opacity: 1;
332
- }`,SF=Da`
333
- from {
334
- transform: scale(0) rotate(90deg);
335
- opacity: 0;
336
- }
337
- to {
338
- transform: scale(1) rotate(90deg);
339
- opacity: 1;
340
- }`,wF=Do("div")`
341
- width: 20px;
342
- opacity: 0;
343
- height: 20px;
344
- border-radius: 10px;
345
- background: ${e=>e.primary||"#ff4b4b"};
346
- position: relative;
347
- transform: rotate(45deg);
348
-
349
- animation: ${xF} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
350
- forwards;
351
- animation-delay: 100ms;
352
-
353
- &:after,
354
- &:before {
355
- content: '';
356
- animation: ${bF} 0.15s ease-out forwards;
357
- animation-delay: 150ms;
358
- position: absolute;
359
- border-radius: 3px;
360
- opacity: 0;
361
- background: ${e=>e.secondary||"#fff"};
362
- bottom: 9px;
363
- left: 4px;
364
- height: 2px;
365
- width: 12px;
366
- }
367
-
368
- &:before {
369
- animation: ${SF} 0.15s ease-out forwards;
370
- animation-delay: 180ms;
371
- transform: rotate(90deg);
372
- }
373
- `,EF=Da`
374
- from {
375
- transform: rotate(0deg);
376
- }
377
- to {
378
- transform: rotate(360deg);
379
- }
380
- `,_F=Do("div")`
381
- width: 12px;
382
- height: 12px;
383
- box-sizing: border-box;
384
- border: 2px solid;
385
- border-radius: 100%;
386
- border-color: ${e=>e.secondary||"#e0e0e0"};
387
- border-right-color: ${e=>e.primary||"#616161"};
388
- animation: ${EF} 1s linear infinite;
389
- `,CF=Da`
390
- from {
391
- transform: scale(0) rotate(45deg);
392
- opacity: 0;
393
- }
394
- to {
395
- transform: scale(1) rotate(45deg);
396
- opacity: 1;
397
- }`,RF=Da`
398
- 0% {
399
- height: 0;
400
- width: 0;
401
- opacity: 0;
402
- }
403
- 40% {
404
- height: 0;
405
- width: 6px;
406
- opacity: 1;
407
- }
408
- 100% {
409
- opacity: 1;
410
- height: 10px;
411
- }`,AF=Do("div")`
412
- width: 20px;
413
- opacity: 0;
414
- height: 20px;
415
- border-radius: 10px;
416
- background: ${e=>e.primary||"#61d345"};
417
- position: relative;
418
- transform: rotate(45deg);
419
-
420
- animation: ${CF} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
421
- forwards;
422
- animation-delay: 100ms;
423
- &:after {
424
- content: '';
425
- box-sizing: border-box;
426
- animation: ${RF} 0.2s ease-out forwards;
427
- opacity: 0;
428
- animation-delay: 200ms;
429
- position: absolute;
430
- border-right: 2px solid;
431
- border-bottom: 2px solid;
432
- border-color: ${e=>e.secondary||"#fff"};
433
- bottom: 6px;
434
- left: 6px;
435
- height: 10px;
436
- width: 6px;
437
- }
438
- `,TF=Do("div")`
439
- position: absolute;
440
- `,DF=Do("div")`
441
- position: relative;
442
- display: flex;
443
- justify-content: center;
444
- align-items: center;
445
- min-width: 20px;
446
- min-height: 20px;
447
- `,MF=Da`
448
- from {
449
- transform: scale(0.6);
450
- opacity: 0.4;
451
- }
452
- to {
453
- transform: scale(1);
454
- opacity: 1;
455
- }`,OF=Do("div")`
456
- position: relative;
457
- transform: scale(0.6);
458
- opacity: 0.4;
459
- min-width: 20px;
460
- animation: ${MF} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
461
- forwards;
462
- `,NF=({toast:e})=>{let{icon:t,type:n,iconTheme:a}=e;return t!==void 0?typeof t=="string"?y.createElement(OF,null,t):t:n==="blank"?null:y.createElement(DF,null,y.createElement(_F,{...a}),n!=="loading"&&y.createElement(TF,null,n==="error"?y.createElement(wF,{...a}):y.createElement(AF,{...a})))},jF=e=>`
463
- 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
464
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
465
- `,kF=e=>`
466
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
467
- 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
468
- `,LF="0%{opacity:0;} 100%{opacity:1;}",PF="0%{opacity:1;} 100%{opacity:0;}",zF=Do("div")`
469
- display: flex;
470
- align-items: center;
471
- background: #fff;
472
- color: #363636;
473
- line-height: 1.3;
474
- will-change: transform;
475
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
476
- max-width: 350px;
477
- pointer-events: auto;
478
- padding: 8px 10px;
479
- border-radius: 8px;
480
- `,FF=Do("div")`
481
- display: flex;
482
- justify-content: center;
483
- margin: 4px 10px;
484
- color: inherit;
485
- flex: 1 1 auto;
486
- white-space: pre-line;
487
- `,UF=(e,t)=>{let n=e.includes("top")?1:-1,[a,i]=NR()?[LF,PF]:[jF(n),kF(n)];return{animation:t?`${Da(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Da(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},IF=y.memo(({toast:e,position:t,style:n,children:a})=>{let i=e.height?UF(e.position||t||"top-center",e.visible):{opacity:0},s=y.createElement(NF,{toast:e}),u=y.createElement(FF,{...e.ariaProps},cf(e.message,e));return y.createElement(zF,{className:e.className,style:{...i,...n,...e.style}},typeof a=="function"?a({icon:s,message:u}):y.createElement(y.Fragment,null,s,u))});lF(y.createElement);var VF=({id:e,className:t,style:n,onHeightUpdate:a,children:i})=>{let s=y.useCallback(u=>{if(u){let d=()=>{let f=u.getBoundingClientRect().height;a(e,f)};d(),new MutationObserver(d).observe(u,{subtree:!0,childList:!0,characterData:!0})}},[e,a]);return y.createElement("div",{ref:s,className:t,style:n},i)},$F=(e,t)=>{let n=e.includes("top"),a=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:NR()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...a,...i}},HF=Xf`
488
- z-index: 9999;
489
- > * {
490
- pointer-events: auto;
491
- }
492
- `,vd=16,Xv=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:a,children:i,containerStyle:s,containerClassName:u})=>{let{toasts:d,handlers:f}=yF(n);return y.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:vd,left:vd,right:vd,bottom:vd,pointerEvents:"none",...s},className:u,onMouseEnter:f.startPause,onMouseLeave:f.endPause},d.map(h=>{let g=h.position||t,b=f.calculateOffset(h,{reverseOrder:e,gutter:a,defaultPosition:t}),x=$F(g,b);return y.createElement(VF,{id:h.id,key:h.id,onHeightUpdate:f.updateHeight,className:h.visible?HF:"",style:x},h.type==="custom"?cf(h.message,h):i?i(h):y.createElement(IF,{toast:h,position:g}))}))},Bg=dn;function BF({columns:e,data:t,deleteDataMart:n,refetchDataMarts:a}){var j;const i=Ru(),[s,u]=y.useState([{id:"title",desc:!1}]),[d,f]=y.useState([]),[h,g]=y.useState({}),[b,x]=y.useState({}),[S,w]=y.useState(!1),[E,C]=y.useState(!1),R=async()=>{try{C(!0);const M=D.getSelectedRowModel().rows.map(I=>I.original.id);for(const I of M)await n(I);dn.success(`Successfully deleted ${String(M.length)} data mart${M.length!==1?"s":""}`),x({}),await a()}catch(O){console.error("Error deleting data marts:",O),dn.error("Failed to delete some data marts. Please try again.")}finally{C(!1),w(!1)}},T=Object.keys(b).length>0,D=hR({data:t,columns:[{id:"select",header:({table:O})=>p.jsx("button",{type:"button",role:"checkbox","aria-checked":O.getIsAllRowsSelected(),"data-state":O.getIsAllRowsSelected()?"checked":"unchecked","aria-label":"Select all rows",className:"peer border-input dark:bg-input/30 data-[state=checked]:bg-brand-blue-500 data-[state=checked]:text-brand-blue-500-foreground dark:data-[state=checked]:bg-brand-blue-500 data-[state=checked]:border-brand-blue-500 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",onClick:O.getToggleAllRowsSelectedHandler(),children:O.getIsAllRowsSelected()&&p.jsx("span",{"data-state":"checked","data-slot":"checkbox-indicator",className:"pointer-events-none flex items-center justify-center text-current transition-none",children:p.jsx(Ud,{className:"size-3.5"})})}),cell:({row:O})=>p.jsx("button",{type:"button",role:"checkbox","aria-checked":O.getIsSelected(),"data-state":O.getIsSelected()?"checked":"unchecked","aria-label":"Select row",className:"peer border-input dark:bg-input/30 data-[state=checked]:bg-brand-blue-500 data-[state=checked]:text-brand-blue-500-foreground dark:data-[state=checked]:bg-brand-blue-500 data-[state=checked]:border-brand-blue-500 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",onClick:O.getToggleSelectedHandler(),children:O.getIsSelected()&&p.jsx("span",{"data-state":"checked","data-slot":"checkbox-indicator",className:"pointer-events-none flex items-center justify-center text-current transition-none",children:p.jsx(Ud,{className:"size-3.5"})})}),enableSorting:!1,enableHiding:!1},...e],getCoreRowModel:uR(),getPaginationRowModel:dR(),onSortingChange:u,getSortedRowModel:fR(),onColumnFiltersChange:f,getFilteredRowModel:cR(),onColumnVisibilityChange:g,onRowSelectionChange:x,state:{sorting:s,columnFilters:d,columnVisibility:h,rowSelection:b},enableRowSelection:!0});return p.jsxs("div",{children:[p.jsx(Xv,{}),p.jsxs("div",{className:"flex items-center pb-4",children:[p.jsxs("div",{className:"relative w-sm",children:[p.jsx(fv,{className:"text-muted-foreground absolute top-2.5 left-2 h-4 w-4"}),p.jsx(Xn,{placeholder:"Search by title",value:(j=D.getColumn("title"))==null?void 0:j.getFilterValue(),onChange:O=>{var M;return(M=D.getColumn("title"))==null?void 0:M.setFilterValue(O.target.value)},className:"pl-8"})]}),T&&p.jsxs(Ft,{variant:"destructive",size:"sm",className:"ml-2 flex items-center gap-1",onClick:()=>{w(!0)},disabled:E,children:[p.jsx(XE,{className:"h-4 w-4"}),"Delete"]}),p.jsxs(zl,{children:[p.jsx(Fl,{asChild:!0,children:p.jsxs(Ft,{variant:"outline",className:"ml-auto font-normal",children:["Show columns ",p.jsx(Ml,{className:"ml-2 h-4 w-4"})]})}),p.jsx(Ei,{align:"end",children:D.getAllColumns().filter(O=>O.getCanHide()).map(O=>p.jsx(Qr,{className:"capitalize",children:p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"checkbox",checked:O.getIsVisible(),onChange:M=>{O.toggleVisibility(M.target.checked)},className:"h-4 w-4"}),p.jsx("span",{children:O.id})]})},O.id))})]})]}),p.jsx("div",{className:"w-full rounded-md border",children:p.jsxs(mR,{children:[p.jsx(pR,{className:"bg-muted",children:D.getHeaderGroups().map(O=>p.jsx(wl,{children:O.headers.map(M=>p.jsx(vR,{className:"[&:has([role=checkbox])]:pl-5 [&>[role=checkbox]]:translate-y-[2px]",children:M.isPlaceholder?null:sf(M.column.columnDef.header,M.getContext())},M.id))},O.id))}),p.jsx(gR,{children:D.getRowModel().rows.length?D.getRowModel().rows.map(O=>p.jsx(wl,{"data-state":O.getIsSelected()&&"selected",className:"hover:bg-muted/50 cursor-pointer",onClick:M=>{if(M.target instanceof HTMLElement&&(M.target.closest('[role="checkbox"]')||M.target.closest(".actions-cell")||M.target.closest('[role="menuitem"]')||M.target.closest('[data-state="open"]')))return;const I=O.original.id;i(`/data-marts/${I}/overview`)},children:O.getVisibleCells().map(M=>p.jsx(uf,{className:`[&:has([role=checkbox])]pr-0 px-5 whitespace-normal [&>[role=checkbox]]:translate-y-[2px] ${M.column.id==="actions"?"actions-cell":""}`,children:sf(M.column.columnDef.cell,M.getContext())},M.id))},O.id)):p.jsx(wl,{children:p.jsx(uf,{colSpan:e.length+1,className:"h-24 text-center",children:"No results."})})})]})}),p.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[p.jsx(Ft,{variant:"outline",size:"sm",onClick:()=>{D.previousPage()},disabled:!D.getCanPreviousPage(),children:"Previous"}),p.jsx(Ft,{variant:"outline",size:"sm",onClick:()=>{D.nextPage()},disabled:!D.getCanNextPage(),children:"Next"})]}),p.jsx(G9,{open:S,onOpenChange:w,children:p.jsxs(Y9,{children:[p.jsxs(K9,{children:[p.jsx(X9,{children:"Are you sure?"}),p.jsxs(W9,{children:["This action will delete ",Object.keys(b).length," selected data mart",Object.keys(b).length!==1?"s":"",". This action cannot be undone."]})]}),p.jsxs(Q9,{children:[p.jsx(eF,{disabled:E,children:"Cancel"}),p.jsx(J9,{onClick:()=>{R()},disabled:E,className:"bg-destructive hover:bg-destructive/90",children:E?"Deleting...":"Delete"})]})]})})]})}function yd({column:e,children:t}){return p.jsxs(Ft,{variant:"ghost",onClick:()=>{e.toggleSorting(e.getIsSorted()==="asc")},className:"px-4 hover:bg-gray-200",children:[t,p.jsx(YE,{className:`ml-2 h-4 w-4 transition-opacity ${e.getIsSorted()?"opacity-100":"opacity-0 group-hover/header:opacity-70"}`})]})}function Wv({...e}){return p.jsx(Rf,{"data-slot":"dialog",...e})}function GF({...e}){return p.jsx(Af,{"data-slot":"dialog-portal",...e})}function qF({className:e,...t}){return p.jsx(Tf,{"data-slot":"dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Jv({className:e,children:t,showCloseButton:n=!0,...a}){return p.jsxs(GF,{"data-slot":"dialog-portal",children:[p.jsx(qF,{}),p.jsxs(Df,{"data-slot":"dialog-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...a,children:[t,n&&p.jsxs(Mf,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[p.jsx(WE,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ey({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ZF({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-footer",className:Se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Wf({className:e,...t}){return p.jsx(yv,{"data-slot":"dialog-title",className:Se("text-lg leading-none font-semibold",e),...t})}function Jf({className:e,...t}){return p.jsx(xv,{"data-slot":"dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}const ty=({open:e,onOpenChange:t,title:n,description:a,confirmLabel:i="Confirm",cancelLabel:s="Cancel",onConfirm:u,onCancel:d,variant:f="destructive",children:h})=>{const g=()=>{t(!1),d==null||d()};return p.jsx(Wv,{open:e,onOpenChange:t,children:p.jsxs(Jv,{children:[p.jsxs(ey,{children:[p.jsx(Wf,{children:n}),p.jsx(Jf,{children:a})]}),h,p.jsxs(ZF,{children:[p.jsx(Ft,{variant:"secondary",onClick:g,children:s}),p.jsx(Ft,{variant:f,onClick:u,children:i})]})]})})},YF=({row:e,onDeleteSuccess:t})=>{const[n,a]=y.useState(!1),{deleteDataMart:i,refreshList:s}=JC(),u=async()=>{try{await i(e.original.id),a(!1),await s(),t==null||t()}catch(d){console.error("Failed to delete data mart:",d)}};return p.jsxs("div",{className:"text-right",children:[p.jsxs(zl,{children:[p.jsx(Fl,{asChild:!0,children:p.jsxs(Ft,{variant:"ghost",className:"h-8 w-8 p-0",children:[p.jsx("span",{className:"sr-only",children:"Open menu"}),p.jsx(QE,{className:"h-4 w-4"})]})}),p.jsxs(Ei,{align:"end",children:[p.jsx(Qr,{children:p.jsx(Tu,{to:`/data-marts/${e.original.id}/overview`,className:"flex w-full items-center",children:"Open"})}),p.jsx($f,{}),p.jsx(Qr,{className:"text-red-600",onClick:()=>{a(!0)},children:"Delete"})]})]}),p.jsx(ty,{open:n,onOpenChange:a,title:"Delete Data Mart",description:"Are you sure you want to delete this data mart? This action cannot be undone.",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>void u(),variant:"destructive"})]})},KF=({onDeleteSuccess:e}={})=>[{accessorKey:"title",header:({column:t})=>p.jsx("div",{className:"group/header min-w-64",children:p.jsx(yd,{column:t,children:"Title"})}),cell:({row:t})=>p.jsx("div",{className:"overflow-hidden text-ellipsis",children:t.getValue("title")})},{accessorKey:"storageType",header:({column:t})=>p.jsx("div",{className:"group/header whitespace-nowrap",children:p.jsx(yd,{column:t,children:"Storage"})}),cell:({row:t})=>{const n=t.getValue("storageType"),{displayName:a,icon:i}=_i.getInfo(n);return p.jsx(Qd,{title:a,variant:"secondary",className:"flex items-center gap-2",children:p.jsx(i,{})})}},{accessorKey:"status",header:({column:t})=>p.jsx("div",{className:"group/header whitespace-nowrap",children:p.jsx(yd,{column:t,children:"Status"})}),cell:({row:t})=>{const n=t.getValue("status"),a=i=>{switch(i){case ai.DRAFT:return"outline";case ai.PUBLISHED:return"secondary";default:return"default"}};return p.jsx(Qd,{variant:a(n.code),children:n.displayName})}},{accessorKey:"createdAt",header:({column:t})=>p.jsx("div",{className:"group/header whitespace-nowrap",children:p.jsx(yd,{column:t,children:"Created at"})}),cell:({row:t})=>{const n=t.getValue("createdAt"),a=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(n);return p.jsx("div",{children:a})}},{id:"actions",cell:({row:t})=>p.jsx(YF,{row:t,onDeleteSuccess:e})}],QF=()=>{const{items:e,loadDataMarts:t,deleteDataMart:n,refreshList:a}=JC();return y.useEffect(()=>{t()},[t]),p.jsx(BF,{columns:KF(),data:e,deleteDataMart:n,refetchDataMarts:a})};function XF(){return p.jsxs("div",{children:[p.jsxs("header",{className:"flex items-center justify-between px-12 pt-6 pb-4",children:[p.jsx("h1",{className:"text-2xl font-medium",children:"Data Marts"}),p.jsx(Tu,{to:"/data-marts/create",children:p.jsxs(Ft,{variant:"secondary",size:"sm",children:[p.jsx(dv,{className:"mr-2 h-4 w-4"}),"New Data Mart"]})})]}),p.jsx("div",{className:"px-4 sm:px-12",children:p.jsx(kz,{children:p.jsx(QF,{})})})]})}const kR=y.createContext(void 0),LR={dataMart:null,isLoading:!1,error:null};function WF(e,t){switch(t.type){case"FETCH_DATA_MART_START":case"CREATE_DATA_MART_START":case"UPDATE_DATA_MART_START":case"UPDATE_DATA_MART_TITLE_START":case"UPDATE_DATA_MART_DESCRIPTION_START":case"UPDATE_DATA_MART_DEFINITION_START":case"DELETE_DATA_MART_START":return{...e,isLoading:!0,error:null};case"CREATE_DATA_MART_SUCCESS":return{...e,isLoading:!1,error:null};case"FETCH_DATA_MART_SUCCESS":case"UPDATE_DATA_MART_SUCCESS":return{...e,isLoading:!1,error:null,dataMart:t.payload};case"UPDATE_DATA_MART_TITLE_SUCCESS":return e.dataMart?{...e,isLoading:!1,error:null,dataMart:{...e.dataMart,title:t.payload,modifiedAt:new Date}}:e;case"UPDATE_DATA_MART_DESCRIPTION_SUCCESS":return e.dataMart?{...e,isLoading:!1,error:null,dataMart:{...e.dataMart,description:t.payload,modifiedAt:new Date}}:e;case"UPDATE_DATA_MART_STORAGE":return e.dataMart?{...e,dataMart:{...e.dataMart,storage:t.payload,modifiedAt:new Date}}:e;case"UPDATE_DATA_MART_DEFINITION_SUCCESS":return e.dataMart?{...e,isLoading:!1,error:null,dataMart:{...e.dataMart,definitionType:t.payload.definitionType,definition:t.payload.definition,modifiedAt:new Date}}:e;case"DELETE_DATA_MART_SUCCESS":return{...e,isLoading:!1,error:null,dataMart:null};case"FETCH_DATA_MART_ERROR":case"CREATE_DATA_MART_ERROR":case"UPDATE_DATA_MART_ERROR":case"UPDATE_DATA_MART_TITLE_ERROR":case"UPDATE_DATA_MART_DESCRIPTION_ERROR":case"UPDATE_DATA_MART_DEFINITION_ERROR":case"DELETE_DATA_MART_ERROR":return{...e,isLoading:!1,error:t.payload};case"RESET":return LR;default:return e}}function eh(){const e=y.useContext(kR);if(e===void 0)throw new Error("useDataMartContext must be used within a DataMartProvider");return e}class JF{mapFromDto(t){const n=t.config,a=t.credentials;let i="";return a&&Object.keys(a).length>0&&(i=JSON.stringify(a,null,2)),{id:t.id,title:t.title,type:at.GOOGLE_BIGQUERY,createdAt:new Date(t.createdAt),modifiedAt:new Date(t.modifiedAt),credentials:{serviceAccount:i},config:{projectId:(n==null?void 0:n.projectId)??"",location:(n==null?void 0:n.location)??""}}}mapToUpdateRequest(t){return{credentials:{...JSON.parse(t.credentials.serviceAccount)},config:{projectId:t.config.projectId,location:t.config.location}}}}class eU{mapFromDto(t){const n=t.config,a=t.credentials;return{id:t.id,title:t.title,type:at.AWS_ATHENA,createdAt:new Date(t.createdAt),modifiedAt:new Date(t.modifiedAt),credentials:{accessKeyId:(a==null?void 0:a.accessKeyId)??"",secretAccessKey:(a==null?void 0:a.secretAccessKey)??""},config:{databaseName:(n==null?void 0:n.databaseName)??"",region:(n==null?void 0:n.region)??"",outputBucket:(n==null?void 0:n.outputBucket)??""}}}mapToUpdateRequest(t){return{credentials:{accessKeyId:t.credentials.accessKeyId,secretAccessKey:t.credentials.secretAccessKey},config:{databaseName:t.config.databaseName,region:t.config.region,outputBucket:t.config.outputBucket}}}}const PR={getMapper(e){switch(e){case at.GOOGLE_BIGQUERY:return new JF;case at.AWS_ATHENA:return new eU;default:throw new Error(`Unknown data storage type: ${String(e)}`)}}};function Nd(e){return PR.getMapper(e.type).mapFromDto(e)}function tU(e){const t=PR.getMapper(e.type);return{title:e.title,...t.mapToUpdateRequest(e)}}function nU(e){return{id:e.id,type:e.type,title:e.title,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt)}}function rU(e){return{type:e}}function aU(e){return{sqlQuery:e.sqlQuery}}function oU(e){return{sqlQuery:e.sqlQuery}}function iU(e){return{fullyQualifiedName:e.fullyQualifiedName}}function lU(e){return{fullyQualifiedName:e.fullyQualifiedName}}function sU(e){return{fullyQualifiedName:e.fullyQualifiedName}}function uU(e){return{fullyQualifiedName:e.fullyQualifiedName}}function cU(e){return{pattern:e.pattern}}function dU(e){return{pattern:e.pattern}}function fU(e,t){if(!e||!t)return null;switch(e){case At.SQL:return oU(t);case At.TABLE:return lU(t);case At.VIEW:return uU(t);case At.TABLE_PATTERN:return dU(t);default:return console.warn(`Unknown definition type: ${String(e)}`),null}}function eg(e){return{id:e.id,title:e.title,description:e.description,status:FC.getInfo(e.status),storage:Nd(e.storage),definitionType:e.definitionType,definition:fU(e.definitionType,e.definition),createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt)}}function hU(e){return{id:e.id,title:e.title}}function zR({children:e}){const[t,n]=y.useReducer(WF,LR),a=y.useCallback(async S=>{try{n({type:"FETCH_DATA_MART_START"});const w=await Sa.getDataMartById(S),E=eg(w);n({type:"FETCH_DATA_MART_SUCCESS",payload:E})}catch(w){n({type:"FETCH_DATA_MART_ERROR",payload:w instanceof Error?w.message:"Failed to fetch data mart"})}},[]),i=async S=>{try{n({type:"CREATE_DATA_MART_START"});const w=await Sa.createDataMart(S),E=hU(w);return n({type:"CREATE_DATA_MART_SUCCESS",payload:E}),E}catch(w){throw n({type:"CREATE_DATA_MART_ERROR",payload:w instanceof Error?w.message:"Failed to create data mart"}),w}},s=async(S,w)=>{try{n({type:"UPDATE_DATA_MART_START"});const E=await Sa.updateDataMart(S,w),C=eg(E);n({type:"UPDATE_DATA_MART_SUCCESS",payload:C})}catch(E){n({type:"UPDATE_DATA_MART_ERROR",payload:E instanceof Error?E.message:"Failed to update data mart"})}},u=async S=>{try{n({type:"DELETE_DATA_MART_START"}),await Sa.deleteDataMart(S),n({type:"DELETE_DATA_MART_SUCCESS"})}catch(w){n({type:"DELETE_DATA_MART_ERROR",payload:w instanceof Error?w.message:"Failed to delete data mart"})}},d=async(S,w)=>{try{n({type:"UPDATE_DATA_MART_TITLE_START"}),await Sa.updateDataMartTitle(S,w),n({type:"UPDATE_DATA_MART_TITLE_SUCCESS",payload:w})}catch(E){n({type:"UPDATE_DATA_MART_TITLE_ERROR",payload:E instanceof Error?E.message:"Failed to update data mart title"})}},f=async(S,w)=>{try{n({type:"UPDATE_DATA_MART_DESCRIPTION_START"}),await Sa.updateDataMartDescription(S,w),n({type:"UPDATE_DATA_MART_DESCRIPTION_SUCCESS",payload:w??""})}catch(E){n({type:"UPDATE_DATA_MART_DESCRIPTION_ERROR",payload:E instanceof Error?E.message:"Failed to update data mart description"})}},h=y.useCallback(S=>{n({type:"UPDATE_DATA_MART_STORAGE",payload:S})},[]),g=async(S,w,E)=>{try{n({type:"UPDATE_DATA_MART_DEFINITION_START"});let C;switch(w){case At.SQL:C={definitionType:w,definition:aU(E)};break;case At.TABLE:C={definitionType:w,definition:iU(E)};break;case At.VIEW:C={definitionType:w,definition:sU(E)};break;case At.TABLE_PATTERN:C={definitionType:w,definition:cU(E)};break;default:throw new Error(`Unsupported definition type: ${String(w)}`)}const R=await Sa.updateDataMartDefinition(S,C),T=eg(R);n({type:"UPDATE_DATA_MART_DEFINITION_SUCCESS",payload:{definitionType:w,definition:E}}),n({type:"UPDATE_DATA_MART_SUCCESS",payload:T})}catch(C){n({type:"UPDATE_DATA_MART_DEFINITION_ERROR",payload:C instanceof Error?C.message:"Failed to update data mart definition"})}},b=y.useCallback(()=>{n({type:"RESET"})},[]),x={...t,getDataMart:a,createDataMart:i,updateDataMart:s,deleteDataMart:u,updateDataMartTitle:d,updateDataMartDescription:f,updateDataMartStorage:h,updateDataMartDefinition:g,reset:b};return p.jsx(kR.Provider,{value:x,children:e})}const mU=wn({title:Fn().min(1,"Title is required").max(100,"Title must be less than 100 characters"),storageId:Fn().min(1,"Data Storage is required")});function pU(){const{createDataMart:e,isLoading:t,error:n}=eh();return{handleCreate:y.useCallback(async i=>{try{return await e(i)}catch(s){return console.error(s),null}},[e]),isSubmitting:t,serverError:n}}function gU(e){const{getDataMart:t,deleteDataMart:n,updateDataMartTitle:a,updateDataMartDescription:i,updateDataMartDefinition:s,reset:u,dataMart:d,isLoading:f,error:h}=eh();return y.useEffect(()=>(e?t(e):u(),()=>{u()}),[e,t,u]),{dataMart:d,isLoading:f,error:h,deleteDataMart:n,updateDataMartTitle:a,updateDataMartDescription:i,updateDataMartDefinition:s}}var Vu=e=>e.type==="checkbox",ii=e=>e instanceof Date,Rn=e=>e==null;const FR=e=>typeof e=="object";var Xt=e=>!Rn(e)&&!Array.isArray(e)&&FR(e)&&!ii(e),UR=e=>Xt(e)&&e.target?Vu(e.target)?e.target.checked:e.target.value:e,vU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,IR=(e,t)=>e.has(vU(t)),yU=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},ny=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pn(e){let t;const n=Array.isArray(e),a=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ny&&(e instanceof Blob||a))&&(n||Xt(e)))if(t=n?[]:{},!n&&!yU(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=pn(e[i]));else return e;return t}var th=e=>/^\w*$/.test(e),Kt=e=>e===void 0,ry=e=>Array.isArray(e)?e.filter(Boolean):[],ay=e=>ry(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_e=(e,t,n)=>{if(!t||!Xt(e))return n;const a=(th(t)?[t]:ay(t)).reduce((i,s)=>Rn(i)?i:i[s],e);return Kt(a)||a===e?Kt(e[t])?n:e[t]:a},Yn=e=>typeof e=="boolean",Rt=(e,t,n)=>{let a=-1;const i=th(t)?[t]:ay(t),s=i.length,u=s-1;for(;++a<s;){const d=i[a];let f=n;if(a!==u){const h=e[d];f=Xt(h)||Array.isArray(h)?h:isNaN(+i[a+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const df={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Mr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},oy=tt.createContext(null);oy.displayName="HookFormContext";const $u=()=>tt.useContext(oy),xU=e=>{const{children:t,...n}=e;return tt.createElement(oy.Provider,{value:n},t)};var VR=(e,t,n,a=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const u=s;return t._proxyFormState[u]!==Mr.all&&(t._proxyFormState[u]=!a||Mr.all),n&&(n[u]=!0),e[u]}});return i};const iy=typeof window<"u"?y.useLayoutEffect:y.useEffect;function $R(e){const t=$u(),{control:n=t.control,disabled:a,name:i,exact:s}=e||{},[u,d]=tt.useState(n._formState),f=tt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return iy(()=>n._subscribe({name:i,formState:f.current,exact:s,callback:h=>{!a&&d({...n._formState,...h})}}),[i,a,s]),tt.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),tt.useMemo(()=>VR(u,n,f.current,!1),[u,n])}var Zr=e=>typeof e=="string",HR=(e,t,n,a,i)=>Zr(e)?(a&&t.watch.add(e),_e(n,e,i)):Array.isArray(e)?e.map(s=>(a&&t.watch.add(s),_e(n,s))):(a&&(t.watchAll=!0),n);function bU(e){const t=$u(),{control:n=t.control,name:a,defaultValue:i,disabled:s,exact:u}=e||{},d=tt.useRef(i),[f,h]=tt.useState(n._getWatch(a,d.current));return iy(()=>n._subscribe({name:a,formState:{values:!0},exact:u,callback:g=>!s&&h(HR(a,n._names,g.values||n._formValues,!1,d.current))}),[a,n,s,u]),tt.useEffect(()=>n._removeUnmounted()),f}function SU(e){const t=$u(),{name:n,disabled:a,control:i=t.control,shouldUnregister:s}=e,u=IR(i._names.array,n),d=bU({control:i,name:n,defaultValue:_e(i._formValues,n,_e(i._defaultValues,n,e.defaultValue)),exact:!0}),f=$R({control:i,name:n,exact:!0}),h=tt.useRef(e),g=tt.useRef(i.register(n,{...e.rules,value:d,...Yn(e.disabled)?{disabled:e.disabled}:{}})),b=tt.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_e(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!_e(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_e(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_e(f.validatingFields,n)},error:{enumerable:!0,get:()=>_e(f.errors,n)}}),[f,n]),x=tt.useCallback(C=>g.current.onChange({target:{value:UR(C),name:n},type:df.CHANGE}),[n]),S=tt.useCallback(()=>g.current.onBlur({target:{value:_e(i._formValues,n),name:n},type:df.BLUR}),[n,i._formValues]),w=tt.useCallback(C=>{const R=_e(i._fields,n);R&&C&&(R._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:T=>C.setCustomValidity(T),reportValidity:()=>C.reportValidity()})},[i._fields,n]),E=tt.useMemo(()=>({name:n,value:d,...Yn(a)||f.disabled?{disabled:f.disabled||a}:{},onChange:x,onBlur:S,ref:w}),[n,a,f.disabled,x,S,w,d]);return tt.useEffect(()=>{const C=i._options.shouldUnregister||s;i.register(n,{...h.current.rules,...Yn(h.current.disabled)?{disabled:h.current.disabled}:{}});const R=(T,D)=>{const j=_e(i._fields,T);j&&j._f&&(j._f.mount=D)};if(R(n,!0),C){const T=pn(_e(i._options.defaultValues,n));Rt(i._defaultValues,n,T),Kt(_e(i._formValues,n))&&Rt(i._formValues,n,T)}return!u&&i.register(n),()=>{(u?C&&!i._state.action:C)?i.unregister(n):R(n,!1)}},[n,i,u,s]),tt.useEffect(()=>{i._setDisabledField({disabled:a,name:n})},[a,n,i]),tt.useMemo(()=>({field:E,formState:f,fieldState:b}),[E,f,b])}const BR=e=>e.render(SU(e));var ly=(e,t,n,a,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:i||!0}}:{},iu=e=>Array.isArray(e)?e:[e],Iw=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},Gg=e=>Rn(e)||!FR(e);function co(e,t){if(Gg(e)||Gg(t))return e===t;if(ii(e)&&ii(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(const i of n){const s=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(ii(s)&&ii(u)||Xt(s)&&Xt(u)||Array.isArray(s)&&Array.isArray(u)?!co(s,u):s!==u)return!1}}return!0}var kn=e=>Xt(e)&&!Object.keys(e).length,sy=e=>e.type==="file",Or=e=>typeof e=="function",ff=e=>{if(!ny)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},GR=e=>e.type==="select-multiple",uy=e=>e.type==="radio",wU=e=>uy(e)||Vu(e),tg=e=>ff(e)&&e.isConnected;function EU(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;)e=Kt(e)?a++:e[t[a++]];return e}function _U(e){for(const t in e)if(e.hasOwnProperty(t)&&!Kt(e[t]))return!1;return!0}function ln(e,t){const n=Array.isArray(t)?t:th(t)?[t]:ay(t),a=n.length===1?e:EU(e,n),i=n.length-1,s=n[i];return a&&delete a[s],i!==0&&(Xt(a)&&kn(a)||Array.isArray(a)&&_U(a))&&ln(e,n.slice(0,-1)),e}var qR=e=>{for(const t in e)if(Or(e[t]))return!0;return!1};function hf(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const a in e)Array.isArray(e[a])||Xt(e[a])&&!qR(e[a])?(t[a]=Array.isArray(e[a])?[]:{},hf(e[a],t[a])):Rn(e[a])||(t[a]=!0);return t}function ZR(e,t,n){const a=Array.isArray(e);if(Xt(e)||a)for(const i in e)Array.isArray(e[i])||Xt(e[i])&&!qR(e[i])?Kt(t)||Gg(n[i])?n[i]=Array.isArray(e[i])?hf(e[i],[]):{...hf(e[i])}:ZR(e[i],Rn(t)?{}:t[i],n[i]):n[i]=!co(e[i],t[i]);return n}var Ys=(e,t)=>ZR(e,t,hf(t));const Vw={value:!1,isValid:!1},$w={value:!0,isValid:!0};var YR=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Kt(e[0].attributes.value)?Kt(e[0].value)||e[0].value===""?$w:{value:e[0].value,isValid:!0}:$w:Vw}return Vw},KR=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>Kt(e)?e:t?e===""?NaN:e&&+e:n&&Zr(e)?new Date(e):a?a(e):e;const Hw={isValid:!1,value:null};var QR=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Hw):Hw;function Bw(e){const t=e.ref;return sy(t)?t.files:uy(t)?QR(e.refs).value:GR(t)?[...t.selectedOptions].map(({value:n})=>n):Vu(t)?YR(e.refs).value:KR(Kt(t.value)?e.ref.value:t.value,e)}var CU=(e,t,n,a)=>{const i={};for(const s of e){const u=_e(t,s);u&&Rt(i,s,u._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:a}},mf=e=>e instanceof RegExp,Ks=e=>Kt(e)?e:mf(e)?e.source:Xt(e)?mf(e.value)?e.value.source:e.value:e,Gw=e=>({isOnSubmit:!e||e===Mr.onSubmit,isOnBlur:e===Mr.onBlur,isOnChange:e===Mr.onChange,isOnAll:e===Mr.all,isOnTouch:e===Mr.onTouched});const qw="AsyncFunction";var RU=e=>!!e&&!!e.validate&&!!(Or(e.validate)&&e.validate.constructor.name===qw||Xt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===qw)),AU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Zw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const lu=(e,t,n,a)=>{for(const i of n||Object.keys(e)){const s=_e(e,i);if(s){const{_f:u,...d}=s;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],i)&&!a)return!0;if(u.ref&&t(u.ref,u.name)&&!a)return!0;if(lu(d,t))break}else if(Xt(d)&&lu(d,t))break}}};function Yw(e,t,n){const a=_e(e,n);if(a||th(n))return{error:a,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),u=_e(t,s),d=_e(e,s);if(u&&!Array.isArray(u)&&n!==s)return{name:n};if(d&&d.type)return{name:s,error:d};if(d&&d.root&&d.root.type)return{name:`${s}.root`,error:d.root};i.pop()}return{name:n}}var TU=(e,t,n,a)=>{n(e);const{name:i,...s}=e;return kn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(u=>t[u]===(!a||Mr.all))},DU=(e,t,n)=>!e||!t||e===t||iu(e).some(a=>a&&(n?a===t:a.startsWith(t)||t.startsWith(a))),MU=(e,t,n,a,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?a.isOnBlur:i.isOnBlur)?!e:(n?a.isOnChange:i.isOnChange)?e:!0,OU=(e,t)=>!ry(_e(e,t)).length&&ln(e,t),NU=(e,t,n)=>{const a=iu(_e(e,n));return Rt(a,"root",t[n]),Rt(e,n,a),e},jd=e=>Zr(e);function Kw(e,t,n="validate"){if(jd(e)||Array.isArray(e)&&e.every(jd)||Yn(e)&&!e)return{type:n,message:jd(e)?e:"",ref:t}}var hl=e=>Xt(e)&&!mf(e)?e:{value:e,message:""},Qw=async(e,t,n,a,i,s)=>{const{ref:u,refs:d,required:f,maxLength:h,minLength:g,min:b,max:x,pattern:S,validate:w,name:E,valueAsNumber:C,mount:R}=e._f,T=_e(n,E);if(!R||t.has(E))return{};const D=d?d[0]:u,j=me=>{i&&D.reportValidity&&(D.setCustomValidity(Yn(me)?"":me||""),D.reportValidity())},O={},M=uy(u),I=Vu(u),Z=M||I,ee=(C||sy(u))&&Kt(u.value)&&Kt(T)||ff(u)&&u.value===""||T===""||Array.isArray(T)&&!T.length,se=ly.bind(null,E,a,O),ye=(me,ve,ce,te=xa.maxLength,k=xa.minLength)=>{const q=me?ve:ce;O[E]={type:me?te:k,message:q,ref:u,...se(me?te:k,q)}};if(s?!Array.isArray(T)||!T.length:f&&(!Z&&(ee||Rn(T))||Yn(T)&&!T||I&&!YR(d).isValid||M&&!QR(d).isValid)){const{value:me,message:ve}=jd(f)?{value:!!f,message:f}:hl(f);if(me&&(O[E]={type:xa.required,message:ve,ref:D,...se(xa.required,ve)},!a))return j(ve),O}if(!ee&&(!Rn(b)||!Rn(x))){let me,ve;const ce=hl(x),te=hl(b);if(!Rn(T)&&!isNaN(T)){const k=u.valueAsNumber||T&&+T;Rn(ce.value)||(me=k>ce.value),Rn(te.value)||(ve=k<te.value)}else{const k=u.valueAsDate||new Date(T),q=N=>new Date(new Date().toDateString()+" "+N),V=u.type=="time",re=u.type=="week";Zr(ce.value)&&T&&(me=V?q(T)>q(ce.value):re?T>ce.value:k>new Date(ce.value)),Zr(te.value)&&T&&(ve=V?q(T)<q(te.value):re?T<te.value:k<new Date(te.value))}if((me||ve)&&(ye(!!me,ce.message,te.message,xa.max,xa.min),!a))return j(O[E].message),O}if((h||g)&&!ee&&(Zr(T)||s&&Array.isArray(T))){const me=hl(h),ve=hl(g),ce=!Rn(me.value)&&T.length>+me.value,te=!Rn(ve.value)&&T.length<+ve.value;if((ce||te)&&(ye(ce,me.message,ve.message),!a))return j(O[E].message),O}if(S&&!ee&&Zr(T)){const{value:me,message:ve}=hl(S);if(mf(me)&&!T.match(me)&&(O[E]={type:xa.pattern,message:ve,ref:u,...se(xa.pattern,ve)},!a))return j(ve),O}if(w){if(Or(w)){const me=await w(T,n),ve=Kw(me,D);if(ve&&(O[E]={...ve,...se(xa.validate,ve.message)},!a))return j(ve.message),O}else if(Xt(w)){let me={};for(const ve in w){if(!kn(me)&&!a)break;const ce=Kw(await w[ve](T,n),D,ve);ce&&(me={...ce,...se(ve,ce.message)},j(ce.message),a&&(O[E]=me))}if(!kn(me)&&(O[E]={ref:D,...me},!a))return O}}return j(!0),O};const jU={mode:Mr.onSubmit,reValidateMode:Mr.onChange,shouldFocusError:!0};function kU(e={}){let t={...jU,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Or(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const a={};let i=Xt(t.defaultValues)||Xt(t.values)?pn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:pn(i),u={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let b={...g};const x={array:Iw(),state:Iw()},S=t.criteriaMode===Mr.all,w=z=>Q=>{clearTimeout(h),h=setTimeout(z,Q)},E=async z=>{if(!t.disabled&&(g.isValid||b.isValid||z)){const Q=t.resolver?kn((await I()).errors):await ee(a,!0);Q!==n.isValid&&x.state.next({isValid:Q})}},C=(z,Q)=>{!t.disabled&&(g.isValidating||g.validatingFields||b.isValidating||b.validatingFields)&&((z||Array.from(d.mount)).forEach(ae=>{ae&&(Q?Rt(n.validatingFields,ae,Q):ln(n.validatingFields,ae))}),x.state.next({validatingFields:n.validatingFields,isValidating:!kn(n.validatingFields)}))},R=(z,Q=[],ae,Ee,we=!0,xe=!0)=>{if(Ee&&ae&&!t.disabled){if(u.action=!0,xe&&Array.isArray(_e(a,z))){const Ae=ae(_e(a,z),Ee.argA,Ee.argB);we&&Rt(a,z,Ae)}if(xe&&Array.isArray(_e(n.errors,z))){const Ae=ae(_e(n.errors,z),Ee.argA,Ee.argB);we&&Rt(n.errors,z,Ae),OU(n.errors,z)}if((g.touchedFields||b.touchedFields)&&xe&&Array.isArray(_e(n.touchedFields,z))){const Ae=ae(_e(n.touchedFields,z),Ee.argA,Ee.argB);we&&Rt(n.touchedFields,z,Ae)}(g.dirtyFields||b.dirtyFields)&&(n.dirtyFields=Ys(i,s)),x.state.next({name:z,isDirty:ye(z,Q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Rt(s,z,Q)},T=(z,Q)=>{Rt(n.errors,z,Q),x.state.next({errors:n.errors})},D=z=>{n.errors=z,x.state.next({errors:n.errors,isValid:!1})},j=(z,Q,ae,Ee)=>{const we=_e(a,z);if(we){const xe=_e(s,z,Kt(ae)?_e(i,z):ae);Kt(xe)||Ee&&Ee.defaultChecked||Q?Rt(s,z,Q?xe:Bw(we._f)):ce(z,xe),u.mount&&E()}},O=(z,Q,ae,Ee,we)=>{let xe=!1,Ae=!1;const $e={name:z};if(!t.disabled){if(!ae||Ee){(g.isDirty||b.isDirty)&&(Ae=n.isDirty,n.isDirty=$e.isDirty=ye(),xe=Ae!==$e.isDirty);const ut=co(_e(i,z),Q);Ae=!!_e(n.dirtyFields,z),ut?ln(n.dirtyFields,z):Rt(n.dirtyFields,z,!0),$e.dirtyFields=n.dirtyFields,xe=xe||(g.dirtyFields||b.dirtyFields)&&Ae!==!ut}if(ae){const ut=_e(n.touchedFields,z);ut||(Rt(n.touchedFields,z,ae),$e.touchedFields=n.touchedFields,xe=xe||(g.touchedFields||b.touchedFields)&&ut!==ae)}xe&&we&&x.state.next($e)}return xe?$e:{}},M=(z,Q,ae,Ee)=>{const we=_e(n.errors,z),xe=(g.isValid||b.isValid)&&Yn(Q)&&n.isValid!==Q;if(t.delayError&&ae?(f=w(()=>T(z,ae)),f(t.delayError)):(clearTimeout(h),f=null,ae?Rt(n.errors,z,ae):ln(n.errors,z)),(ae?!co(we,ae):we)||!kn(Ee)||xe){const Ae={...Ee,...xe&&Yn(Q)?{isValid:Q}:{},errors:n.errors,name:z};n={...n,...Ae},x.state.next(Ae)}},I=async z=>{C(z,!0);const Q=await t.resolver(s,t.context,CU(z||d.mount,a,t.criteriaMode,t.shouldUseNativeValidation));return C(z),Q},Z=async z=>{const{errors:Q}=await I(z);if(z)for(const ae of z){const Ee=_e(Q,ae);Ee?Rt(n.errors,ae,Ee):ln(n.errors,ae)}else n.errors=Q;return Q},ee=async(z,Q,ae={valid:!0})=>{for(const Ee in z){const we=z[Ee];if(we){const{_f:xe,...Ae}=we;if(xe){const $e=d.array.has(xe.name),ut=we._f&&RU(we._f);ut&&g.validatingFields&&C([Ee],!0);const Ct=await Qw(we,d.disabled,s,S,t.shouldUseNativeValidation&&!Q,$e);if(ut&&g.validatingFields&&C([Ee]),Ct[xe.name]&&(ae.valid=!1,Q))break;!Q&&(_e(Ct,xe.name)?$e?NU(n.errors,Ct,xe.name):Rt(n.errors,xe.name,Ct[xe.name]):ln(n.errors,xe.name))}!kn(Ae)&&await ee(Ae,Q,ae)}}return ae.valid},se=()=>{for(const z of d.unMount){const Q=_e(a,z);Q&&(Q._f.refs?Q._f.refs.every(ae=>!tg(ae)):!tg(Q._f.ref))&&ue(z)}d.unMount=new Set},ye=(z,Q)=>!t.disabled&&(z&&Q&&Rt(s,z,Q),!co(N(),i)),me=(z,Q,ae)=>HR(z,d,{...u.mount?s:Kt(Q)?i:Zr(z)?{[z]:Q}:Q},ae,Q),ve=z=>ry(_e(u.mount?s:i,z,t.shouldUnregister?_e(i,z,[]):[])),ce=(z,Q,ae={})=>{const Ee=_e(a,z);let we=Q;if(Ee){const xe=Ee._f;xe&&(!xe.disabled&&Rt(s,z,KR(Q,xe)),we=ff(xe.ref)&&Rn(Q)?"":Q,GR(xe.ref)?[...xe.ref.options].forEach(Ae=>Ae.selected=we.includes(Ae.value)):xe.refs?Vu(xe.ref)?xe.refs.forEach(Ae=>{(!Ae.defaultChecked||!Ae.disabled)&&(Array.isArray(we)?Ae.checked=!!we.find($e=>$e===Ae.value):Ae.checked=we===Ae.value||!!we)}):xe.refs.forEach(Ae=>Ae.checked=Ae.value===we):sy(xe.ref)?xe.ref.value="":(xe.ref.value=we,xe.ref.type||x.state.next({name:z,values:pn(s)})))}(ae.shouldDirty||ae.shouldTouch)&&O(z,we,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&re(z)},te=(z,Q,ae)=>{for(const Ee in Q){if(!Q.hasOwnProperty(Ee))return;const we=Q[Ee],xe=z+"."+Ee,Ae=_e(a,xe);(d.array.has(z)||Xt(we)||Ae&&!Ae._f)&&!ii(we)?te(xe,we,ae):ce(xe,we,ae)}},k=(z,Q,ae={})=>{const Ee=_e(a,z),we=d.array.has(z),xe=pn(Q);Rt(s,z,xe),we?(x.array.next({name:z,values:pn(s)}),(g.isDirty||g.dirtyFields||b.isDirty||b.dirtyFields)&&ae.shouldDirty&&x.state.next({name:z,dirtyFields:Ys(i,s),isDirty:ye(z,xe)})):Ee&&!Ee._f&&!Rn(xe)?te(z,xe,ae):ce(z,xe,ae),Zw(z,d)&&x.state.next({...n}),x.state.next({name:u.mount?z:void 0,values:pn(s)})},q=async z=>{u.mount=!0;const Q=z.target;let ae=Q.name,Ee=!0;const we=_e(a,ae),xe=ut=>{Ee=Number.isNaN(ut)||ii(ut)&&isNaN(ut.getTime())||co(ut,_e(s,ae,ut))},Ae=Gw(t.mode),$e=Gw(t.reValidateMode);if(we){let ut,Ct;const Oa=Q.type?Bw(we._f):UR(z),nn=z.type===df.BLUR||z.type===df.FOCUS_OUT,Ai=!AU(we._f)&&!t.resolver&&!_e(n.errors,ae)&&!we._f.deps||MU(nn,_e(n.touchedFields,ae),n.isSubmitted,$e,Ae),Sr=Zw(ae,d,nn);Rt(s,ae,Oa),nn?(we._f.onBlur&&we._f.onBlur(z),f&&f(0)):we._f.onChange&&we._f.onChange(z);const wr=O(ae,Oa,nn),Er=!kn(wr)||Sr;if(!nn&&x.state.next({name:ae,type:z.type,values:pn(s)}),Ai)return(g.isValid||b.isValid)&&(t.mode==="onBlur"?nn&&E():nn||E()),Er&&x.state.next({name:ae,...Sr?{}:wr});if(!nn&&Sr&&x.state.next({...n}),t.resolver){const{errors:Fr}=await I([ae]);if(xe(Oa),Ee){const rr=Yw(n.errors,a,ae),jo=Yw(Fr,a,rr.name||ae);ut=jo.error,ae=jo.name,Ct=kn(Fr)}}else C([ae],!0),ut=(await Qw(we,d.disabled,s,S,t.shouldUseNativeValidation))[ae],C([ae]),xe(Oa),Ee&&(ut?Ct=!1:(g.isValid||b.isValid)&&(Ct=await ee(a,!0)));Ee&&(we._f.deps&&re(we._f.deps),M(ae,Ct,ut,wr))}},V=(z,Q)=>{if(_e(n.errors,Q)&&z.focus)return z.focus(),1},re=async(z,Q={})=>{let ae,Ee;const we=iu(z);if(t.resolver){const xe=await Z(Kt(z)?z:we);ae=kn(xe),Ee=z?!we.some(Ae=>_e(xe,Ae)):ae}else z?(Ee=(await Promise.all(we.map(async xe=>{const Ae=_e(a,xe);return await ee(Ae&&Ae._f?{[xe]:Ae}:Ae)}))).every(Boolean),!(!Ee&&!n.isValid)&&E()):Ee=ae=await ee(a);return x.state.next({...!Zr(z)||(g.isValid||b.isValid)&&ae!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:ae}:{},errors:n.errors}),Q.shouldFocus&&!Ee&&lu(a,V,z?we:d.mount),Ee},N=z=>{const Q={...u.mount?s:i};return Kt(z)?Q:Zr(z)?_e(Q,z):z.map(ae=>_e(Q,ae))},H=(z,Q)=>({invalid:!!_e((Q||n).errors,z),isDirty:!!_e((Q||n).dirtyFields,z),error:_e((Q||n).errors,z),isValidating:!!_e(n.validatingFields,z),isTouched:!!_e((Q||n).touchedFields,z)}),P=z=>{z&&iu(z).forEach(Q=>ln(n.errors,Q)),x.state.next({errors:z?n.errors:{}})},B=(z,Q,ae)=>{const Ee=(_e(a,z,{_f:{}})._f||{}).ref,we=_e(n.errors,z)||{},{ref:xe,message:Ae,type:$e,...ut}=we;Rt(n.errors,z,{...ut,...Q,ref:Ee}),x.state.next({name:z,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Ee&&Ee.focus&&Ee.focus()},oe=(z,Q)=>Or(z)?x.state.subscribe({next:ae=>z(me(void 0,Q),ae)}):me(z,Q,!0),de=z=>x.state.subscribe({next:Q=>{DU(z.name,Q.name,z.exact)&&TU(Q,z.formState||g,qt,z.reRenderRoot)&&z.callback({values:{...s},...n,...Q})}}).unsubscribe,pe=z=>(u.mount=!0,b={...b,...z.formState},de({...z,formState:b})),ue=(z,Q={})=>{for(const ae of z?iu(z):d.mount)d.mount.delete(ae),d.array.delete(ae),Q.keepValue||(ln(a,ae),ln(s,ae)),!Q.keepError&&ln(n.errors,ae),!Q.keepDirty&&ln(n.dirtyFields,ae),!Q.keepTouched&&ln(n.touchedFields,ae),!Q.keepIsValidating&&ln(n.validatingFields,ae),!t.shouldUnregister&&!Q.keepDefaultValue&&ln(i,ae);x.state.next({values:pn(s)}),x.state.next({...n,...Q.keepDirty?{isDirty:ye()}:{}}),!Q.keepIsValid&&E()},Ce=({disabled:z,name:Q})=>{(Yn(z)&&u.mount||z||d.disabled.has(Q))&&(z?d.disabled.add(Q):d.disabled.delete(Q))},Le=(z,Q={})=>{let ae=_e(a,z);const Ee=Yn(Q.disabled)||Yn(t.disabled);return Rt(a,z,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:z}},name:z,mount:!0,...Q}}),d.mount.add(z),ae?Ce({disabled:Yn(Q.disabled)?Q.disabled:t.disabled,name:z}):j(z,!0,Q.value),{...Ee?{disabled:Q.disabled||t.disabled}:{},...t.progressive?{required:!!Q.required,min:Ks(Q.min),max:Ks(Q.max),minLength:Ks(Q.minLength),maxLength:Ks(Q.maxLength),pattern:Ks(Q.pattern)}:{},name:z,onChange:q,onBlur:q,ref:we=>{if(we){Le(z,Q),ae=_e(a,z);const xe=Kt(we.value)&&we.querySelectorAll&&we.querySelectorAll("input,select,textarea")[0]||we,Ae=wU(xe),$e=ae._f.refs||[];if(Ae?$e.find(ut=>ut===xe):xe===ae._f.ref)return;Rt(a,z,{_f:{...ae._f,...Ae?{refs:[...$e.filter(tg),xe,...Array.isArray(_e(i,z))?[{}]:[]],ref:{type:xe.type,name:z}}:{ref:xe}}}),j(z,!1,void 0,xe)}else ae=_e(a,z,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||Q.shouldUnregister)&&!(IR(d.array,z)&&u.action)&&d.unMount.add(z)}}},ke=()=>t.shouldFocusError&&lu(a,V,d.mount),Je=z=>{Yn(z)&&(x.state.next({disabled:z}),lu(a,(Q,ae)=>{const Ee=_e(a,ae);Ee&&(Q.disabled=Ee._f.disabled||z,Array.isArray(Ee._f.refs)&&Ee._f.refs.forEach(we=>{we.disabled=Ee._f.disabled||z}))},0,!1))},nt=(z,Q)=>async ae=>{let Ee;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let we=pn(s);if(x.state.next({isSubmitting:!0}),t.resolver){const{errors:xe,values:Ae}=await I();n.errors=xe,we=Ae}else await ee(a);if(d.disabled.size)for(const xe of d.disabled)Rt(we,xe,void 0);if(ln(n.errors,"root"),kn(n.errors)){x.state.next({errors:{}});try{await z(we,ae)}catch(xe){Ee=xe}}else Q&&await Q({...n.errors},ae),ke(),setTimeout(ke);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kn(n.errors)&&!Ee,submitCount:n.submitCount+1,errors:n.errors}),Ee)throw Ee},Gt=(z,Q={})=>{_e(a,z)&&(Kt(Q.defaultValue)?k(z,pn(_e(i,z))):(k(z,Q.defaultValue),Rt(i,z,pn(Q.defaultValue))),Q.keepTouched||ln(n.touchedFields,z),Q.keepDirty||(ln(n.dirtyFields,z),n.isDirty=Q.defaultValue?ye(z,pn(_e(i,z))):ye()),Q.keepError||(ln(n.errors,z),g.isValid&&E()),x.state.next({...n}))},Pt=(z,Q={})=>{const ae=z?pn(z):i,Ee=pn(ae),we=kn(z),xe=we?i:Ee;if(Q.keepDefaultValues||(i=ae),!Q.keepValues){if(Q.keepDirtyValues){const Ae=new Set([...d.mount,...Object.keys(Ys(i,s))]);for(const $e of Array.from(Ae))_e(n.dirtyFields,$e)?Rt(xe,$e,_e(s,$e)):k($e,_e(xe,$e))}else{if(ny&&Kt(z))for(const Ae of d.mount){const $e=_e(a,Ae);if($e&&$e._f){const ut=Array.isArray($e._f.refs)?$e._f.refs[0]:$e._f.ref;if(ff(ut)){const Ct=ut.closest("form");if(Ct){Ct.reset();break}}}}for(const Ae of d.mount)k(Ae,_e(xe,Ae))}s=pn(xe),x.array.next({values:{...xe}}),x.state.next({values:{...xe}})}d={mount:Q.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!g.isValid||!!Q.keepIsValid||!!Q.keepDirtyValues,u.watch=!!t.shouldUnregister,x.state.next({submitCount:Q.keepSubmitCount?n.submitCount:0,isDirty:we?!1:Q.keepDirty?n.isDirty:!!(Q.keepDefaultValues&&!co(z,i)),isSubmitted:Q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:we?{}:Q.keepDirtyValues?Q.keepDefaultValues&&s?Ys(i,s):n.dirtyFields:Q.keepDefaultValues&&z?Ys(i,z):Q.keepDirty?n.dirtyFields:{},touchedFields:Q.keepTouched?n.touchedFields:{},errors:Q.keepErrors?n.errors:{},isSubmitSuccessful:Q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},tr=(z,Q)=>Pt(Or(z)?z(s):z,Q),br=(z,Q={})=>{const ae=_e(a,z),Ee=ae&&ae._f;if(Ee){const we=Ee.refs?Ee.refs[0]:Ee.ref;we.focus&&(we.focus(),Q.shouldSelect&&Or(we.select)&&we.select())}},qt=z=>{n={...n,...z}},nr={control:{register:Le,unregister:ue,getFieldState:H,handleSubmit:nt,setError:B,_subscribe:de,_runSchema:I,_focusError:ke,_getWatch:me,_getDirty:ye,_setValid:E,_setFieldArray:R,_setDisabledField:Ce,_setErrors:D,_getFieldArray:ve,_reset:Pt,_resetDefaultValues:()=>Or(t.defaultValues)&&t.defaultValues().then(z=>{tr(z,t.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:se,_disableForm:Je,_subjects:x,_proxyFormState:g,get _fields(){return a},get _formValues(){return s},get _state(){return u},set _state(z){u=z},get _defaultValues(){return i},get _names(){return d},set _names(z){d=z},get _formState(){return n},get _options(){return t},set _options(z){t={...t,...z}}},subscribe:pe,trigger:re,register:Le,handleSubmit:nt,watch:oe,setValue:k,getValues:N,reset:tr,resetField:Gt,clearErrors:P,unregister:ue,setError:B,setFocus:br,getFieldState:H};return{...nr,formControl:nr}}function cy(e={}){const t=tt.useRef(void 0),n=tt.useRef(void 0),[a,i]=tt.useState({isDirty:!1,isValidating:!1,isLoading:Or(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Or(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!Or(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...d}=kU(e);t.current={...d,formState:a}}const s=t.current.control;return s._options=e,iy(()=>{const u=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(d=>({...d,isReady:!0})),s._formState.isReady=!0,u},[s]),tt.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),tt.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),tt.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),tt.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),tt.useEffect(()=>{if(s._proxyFormState.isDirty){const u=s._getDirty();u!==a.isDirty&&s._subjects.state.next({isDirty:u})}},[s,a.isDirty]),tt.useEffect(()=>{e.values&&!co(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(u=>({...u}))):s._resetDefaultValues()},[s,e.values]),tt.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=VR(a,s),t.current}const Xw=(e,t,n)=>{if(e&&"reportValidity"in e){const a=_e(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},qg=(e,t)=>{for(const n in t.fields){const a=t.fields[n];a&&a.ref&&"reportValidity"in a.ref?Xw(a.ref,n,e):a&&a.refs&&a.refs.forEach(i=>Xw(i,n,e))}},Ww=(e,t)=>{t.shouldUseNativeValidation&&qg(e,t);const n={};for(const a in e){const i=_e(t.fields,a),s=Object.assign(e[a]||{},{ref:i&&i.ref});if(LU(t.names||Object.keys(e),a)){const u=Object.assign({},_e(n,a));Rt(u,"root",s),Rt(n,a,u)}else Rt(n,a,s)}return n},LU=(e,t)=>{const n=Jw(t);return e.some(a=>Jw(a).match(`^${n}\\.\\d+`))};function Jw(e){return e.replace(/\]|\[/g,"")}function XR(e,t,n){function a(d,f){var h;Object.defineProperty(d,"_zod",{value:d._zod??{},enumerable:!1}),(h=d._zod).traits??(h.traits=new Set),d._zod.traits.add(e),t(d,f);for(const g in u.prototype)g in d||Object.defineProperty(d,g,{value:u.prototype[g].bind(d)});d._zod.constr=u,d._zod.def=f}const i=(n==null?void 0:n.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function u(d){var f;const h=n!=null&&n.Parent?new s:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>{var f,h;return n!=null&&n.Parent&&d instanceof n.Parent?!0:(h=(f=d==null?void 0:d._zod)==null?void 0:f.traits)==null?void 0:h.has(e)}}),Object.defineProperty(u,"name",{value:e}),u}class PU extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const zU={};function WR(e){return zU}function FU(e,t){return typeof t=="bigint"?t.toString():t}const JR=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function xd(e){return typeof e=="string"?e:e==null?void 0:e.message}function eA(e,t,n){var i,s,u,d,f,h;const a={...e,path:e.path??[]};if(!e.message){const g=xd((u=(s=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:u.call(s,e))??xd((d=t==null?void 0:t.error)==null?void 0:d.call(t,e))??xd((f=n.customError)==null?void 0:f.call(n,e))??xd((h=n.localeError)==null?void 0:h.call(n,e))??"Invalid input";a.message=g}return delete a.inst,delete a.continue,t!=null&&t.reportInput||delete a.input,a}const tA=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,FU,2)},enumerable:!0})},UU=XR("$ZodError",tA),nA=XR("$ZodError",tA,{Parent:Error}),IU=e=>(t,n,a,i)=>{const s=a?Object.assign(a,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},s);if(u instanceof Promise)throw new PU;if(u.issues.length){const d=new((i==null?void 0:i.Err)??e)(u.issues.map(f=>eA(f,s,WR())));throw JR(d,i==null?void 0:i.callee),d}return u.value},VU=IU(nA),$U=e=>async(t,n,a,i)=>{const s=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new((i==null?void 0:i.Err)??e)(u.issues.map(f=>eA(f,s,WR())));throw JR(d,i==null?void 0:i.callee),d}return u.value},HU=$U(nA);function eE(e,t){try{var n=e()}catch(a){return t(a)}return n&&n.then?n.then(void 0,t):n}function BU(e,t){for(var n={};e.length;){var a=e[0],i=a.code,s=a.message,u=a.path.join(".");if(!n[u])if("unionErrors"in a){var d=a.unionErrors[0].errors[0];n[u]={message:d.message,type:d.code}}else n[u]={message:s,type:i};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(b){return e.push(b)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=ly(u,t,n,i,h?[].concat(h,a.message):a.message)}e.shift()}return n}function GU(e,t){for(var n={};e.length;){var a=e[0],i=a.code,s=a.message,u=a.path.join(".");if(!n[u])if(a.code==="invalid_union"){var d=a.errors[0][0];n[u]={message:d.message,type:d.code}}else n[u]={message:s,type:i};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(b){return e.push(b)})}),t){var f=n[u].types,h=f&&f[a.code];n[u]=ly(u,t,n,i,h?[].concat(h,a.message):a.message)}e.shift()}return n}function dy(e,t,n){if(n===void 0&&(n={}),function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def}(e))return function(a,i,s){try{return Promise.resolve(eE(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(u){return s.shouldUseNativeValidation&&qg({},s),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if(function(d){return Array.isArray(d==null?void 0:d.issues)}(u))return{values:{},errors:Ww(BU(u.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw u}))}catch(u){return Promise.reject(u)}};if(function(a){return"_zod"in a&&typeof a._zod=="object"}(e))return function(a,i,s){try{return Promise.resolve(eE(function(){return Promise.resolve((n.mode==="sync"?VU:HU)(e,a,t)).then(function(u){return s.shouldUseNativeValidation&&qg({},s),{errors:{},values:n.raw?Object.assign({},a):u}})},function(u){if(function(d){return d instanceof UU}(u))return{values:{},errors:Ww(GU(u.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}function tE(e,[t,n]){return Math.min(n,Math.max(t,e))}function qU(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ZU=[" ","Enter","ArrowUp","ArrowDown"],YU=[" ","Enter"],vi="Select",[nh,rh,KU]=Nv(vi),[$l,G$]=ea(vi,[KU,To]),ah=To(),[QU,Mo]=$l(vi),[XU,WU]=$l(vi),rA=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:i,onOpenChange:s,value:u,defaultValue:d,onValueChange:f,dir:h,name:g,autoComplete:b,disabled:x,required:S,form:w}=e,E=ah(t),[C,R]=y.useState(null),[T,D]=y.useState(null),[j,O]=y.useState(!1),M=jv(h),[I,Z]=ui({prop:a,defaultProp:i??!1,onChange:s,caller:vi}),[ee,se]=ui({prop:u,defaultProp:d,onChange:f,caller:vi}),ye=y.useRef(null),me=C?w||!!C.closest("form"):!0,[ve,ce]=y.useState(new Set),te=Array.from(ve).map(k=>k.props.value).join(";");return p.jsx(kf,{...E,children:p.jsxs(QU,{required:S,scope:t,trigger:C,onTriggerChange:R,valueNode:T,onValueNodeChange:D,valueNodeHasChildren:j,onValueNodeHasChildrenChange:O,contentId:gn(),value:ee,onValueChange:se,open:I,onOpenChange:Z,dir:M,triggerPointerDownPosRef:ye,disabled:x,children:[p.jsx(nh.Provider,{scope:t,children:p.jsx(XU,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(k=>{ce(q=>new Set(q).add(k))},[]),onNativeOptionRemove:y.useCallback(k=>{ce(q=>{const V=new Set(q);return V.delete(k),V})},[]),children:n})}),me?p.jsxs(RA,{"aria-hidden":!0,required:S,tabIndex:-1,name:g,autoComplete:b,value:ee,onChange:k=>se(k.target.value),disabled:x,form:w,children:[ee===void 0?p.jsx("option",{value:""}):null,Array.from(ve)]},te):null]})})};rA.displayName=vi;var aA="SelectTrigger",oA=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...i}=e,s=ah(n),u=Mo(aA,n),d=u.disabled||a,f=St(t,u.onTriggerChange),h=rh(n),g=y.useRef("touch"),[b,x,S]=TA(E=>{const C=h().filter(D=>!D.disabled),R=C.find(D=>D.value===u.value),T=DA(C,E,R);T!==void 0&&u.onValueChange(T.value)}),w=E=>{d||(u.onOpenChange(!0),S()),E&&(u.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return p.jsx(Nu,{asChild:!0,...s,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":AA(u.value)?"":void 0,...i,ref:f,onClick:Te(i.onClick,E=>{E.currentTarget.focus(),g.current!=="mouse"&&w(E)}),onPointerDown:Te(i.onPointerDown,E=>{g.current=E.pointerType;const C=E.target;C.hasPointerCapture(E.pointerId)&&C.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(w(E),E.preventDefault())}),onKeyDown:Te(i.onKeyDown,E=>{const C=b.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&x(E.key),!(C&&E.key===" ")&&ZU.includes(E.key)&&(w(),E.preventDefault())})})})});oA.displayName=aA;var iA="SelectValue",lA=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:i,children:s,placeholder:u="",...d}=e,f=Mo(iA,n),{onValueNodeHasChildrenChange:h}=f,g=s!==void 0,b=St(t,f.onValueNodeChange);return En(()=>{h(g)},[h,g]),p.jsx(We.span,{...d,ref:b,style:{pointerEvents:"none"},children:AA(f.value)?p.jsx(p.Fragment,{children:u}):s})});lA.displayName=iA;var JU="SelectIcon",sA=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:a||"▼"})});sA.displayName=JU;var eI="SelectPortal",uA=e=>p.jsx(kl,{asChild:!0,...e});uA.displayName=eI;var yi="SelectContent",cA=y.forwardRef((e,t)=>{const n=Mo(yi,e.__scopeSelect),[a,i]=y.useState();if(En(()=>{i(new DocumentFragment)},[]),!n.open){const s=a;return s?Dl.createPortal(p.jsx(dA,{scope:e.__scopeSelect,children:p.jsx(nh.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(fA,{...e,ref:t})});cA.displayName=yi;var Dr=10,[dA,Oo]=$l(yi),tI="SelectContentImpl",nI=xo("SelectContent.RemoveScroll"),fA=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:u,side:d,sideOffset:f,align:h,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:w,hideWhenDetached:E,avoidCollisions:C,...R}=e,T=Mo(yi,n),[D,j]=y.useState(null),[O,M]=y.useState(null),I=St(t,ue=>j(ue)),[Z,ee]=y.useState(null),[se,ye]=y.useState(null),me=rh(n),[ve,ce]=y.useState(!1),te=y.useRef(!1);y.useEffect(()=>{if(D)return _f(D)},[D]),wf();const k=y.useCallback(ue=>{const[Ce,...Le]=me().map(nt=>nt.ref.current),[ke]=Le.slice(-1),Je=document.activeElement;for(const nt of ue)if(nt===Je||(nt==null||nt.scrollIntoView({block:"nearest"}),nt===Ce&&O&&(O.scrollTop=0),nt===ke&&O&&(O.scrollTop=O.scrollHeight),nt==null||nt.focus(),document.activeElement!==Je))return},[me,O]),q=y.useCallback(()=>k([Z,D]),[k,Z,D]);y.useEffect(()=>{ve&&q()},[ve,q]);const{onOpenChange:V,triggerPointerDownPosRef:re}=T;y.useEffect(()=>{if(D){let ue={x:0,y:0};const Ce=ke=>{var Je,nt;ue={x:Math.abs(Math.round(ke.pageX)-(((Je=re.current)==null?void 0:Je.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((nt=re.current)==null?void 0:nt.y)??0))}},Le=ke=>{ue.x<=10&&ue.y<=10?ke.preventDefault():D.contains(ke.target)||V(!1),document.removeEventListener("pointermove",Ce),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",Ce),document.addEventListener("pointerup",Le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",Le,{capture:!0})}}},[D,V,re]),y.useEffect(()=>{const ue=()=>V(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[V]);const[N,H]=TA(ue=>{const Ce=me().filter(Je=>!Je.disabled),Le=Ce.find(Je=>Je.ref.current===document.activeElement),ke=DA(Ce,ue,Le);ke&&setTimeout(()=>ke.ref.current.focus())}),P=y.useCallback((ue,Ce,Le)=>{const ke=!te.current&&!Le;(T.value!==void 0&&T.value===Ce||ke)&&(ee(ue),ke&&(te.current=!0))},[T.value]),B=y.useCallback(()=>D==null?void 0:D.focus(),[D]),oe=y.useCallback((ue,Ce,Le)=>{const ke=!te.current&&!Le;(T.value!==void 0&&T.value===Ce||ke)&&ye(ue)},[T.value]),de=a==="popper"?Zg:hA,pe=de===Zg?{side:d,sideOffset:f,align:h,alignOffset:g,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:w,hideWhenDetached:E,avoidCollisions:C}:{};return p.jsx(dA,{scope:n,content:D,viewport:O,onViewportChange:M,itemRefCallback:P,selectedItem:Z,onItemLeave:B,itemTextRefCallback:oe,focusSelectedItem:q,selectedItemText:se,position:a,isPositioned:ve,searchRef:N,children:p.jsx(Mu,{as:nI,allowPinchZoom:!0,children:p.jsx(Du,{asChild:!0,trapped:T.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:Te(i,ue=>{var Ce;(Ce=T.trigger)==null||Ce.focus({preventScroll:!0}),ue.preventDefault()}),children:p.jsx(jl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:p.jsx(de,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ue=>ue.preventDefault(),...R,...pe,onPlaced:()=>ce(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Te(R.onKeyDown,ue=>{const Ce=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!Ce&&ue.key.length===1&&H(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let ke=me().filter(Je=>!Je.disabled).map(Je=>Je.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Je=ue.target,nt=ke.indexOf(Je);ke=ke.slice(nt+1)}setTimeout(()=>k(ke)),ue.preventDefault()}})})})})})})});fA.displayName=tI;var rI="SelectItemAlignedPosition",hA=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...i}=e,s=Mo(yi,n),u=Oo(yi,n),[d,f]=y.useState(null),[h,g]=y.useState(null),b=St(t,I=>g(I)),x=rh(n),S=y.useRef(!1),w=y.useRef(!0),{viewport:E,selectedItem:C,selectedItemText:R,focusSelectedItem:T}=u,D=y.useCallback(()=>{if(s.trigger&&s.valueNode&&d&&h&&E&&C&&R){const I=s.trigger.getBoundingClientRect(),Z=h.getBoundingClientRect(),ee=s.valueNode.getBoundingClientRect(),se=R.getBoundingClientRect();if(s.dir!=="rtl"){const Je=se.left-Z.left,nt=ee.left-Je,Gt=I.left-nt,Pt=I.width+Gt,tr=Math.max(Pt,Z.width),br=window.innerWidth-Dr,qt=tE(nt,[Dr,Math.max(Dr,br-tr)]);d.style.minWidth=Pt+"px",d.style.left=qt+"px"}else{const Je=Z.right-se.right,nt=window.innerWidth-ee.right-Je,Gt=window.innerWidth-I.right-nt,Pt=I.width+Gt,tr=Math.max(Pt,Z.width),br=window.innerWidth-Dr,qt=tE(nt,[Dr,Math.max(Dr,br-tr)]);d.style.minWidth=Pt+"px",d.style.right=qt+"px"}const ye=x(),me=window.innerHeight-Dr*2,ve=E.scrollHeight,ce=window.getComputedStyle(h),te=parseInt(ce.borderTopWidth,10),k=parseInt(ce.paddingTop,10),q=parseInt(ce.borderBottomWidth,10),V=parseInt(ce.paddingBottom,10),re=te+k+ve+V+q,N=Math.min(C.offsetHeight*5,re),H=window.getComputedStyle(E),P=parseInt(H.paddingTop,10),B=parseInt(H.paddingBottom,10),oe=I.top+I.height/2-Dr,de=me-oe,pe=C.offsetHeight/2,ue=C.offsetTop+pe,Ce=te+k+ue,Le=re-Ce;if(Ce<=oe){const Je=ye.length>0&&C===ye[ye.length-1].ref.current;d.style.bottom="0px";const nt=h.clientHeight-E.offsetTop-E.offsetHeight,Gt=Math.max(de,pe+(Je?B:0)+nt+q),Pt=Ce+Gt;d.style.height=Pt+"px"}else{const Je=ye.length>0&&C===ye[0].ref.current;d.style.top="0px";const Gt=Math.max(oe,te+E.offsetTop+(Je?P:0)+pe)+Le;d.style.height=Gt+"px",E.scrollTop=Ce-oe+E.offsetTop}d.style.margin=`${Dr}px 0`,d.style.minHeight=N+"px",d.style.maxHeight=me+"px",a==null||a(),requestAnimationFrame(()=>S.current=!0)}},[x,s.trigger,s.valueNode,d,h,E,C,R,s.dir,a]);En(()=>D(),[D]);const[j,O]=y.useState();En(()=>{h&&O(window.getComputedStyle(h).zIndex)},[h]);const M=y.useCallback(I=>{I&&w.current===!0&&(D(),T==null||T(),w.current=!1)},[D,T]);return p.jsx(oI,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:S,onScrollButtonChange:M,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:p.jsx(We.div,{...i,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});hA.displayName=rI;var aI="SelectPopperPosition",Zg=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:i=Dr,...s}=e,u=ah(n);return p.jsx(Lf,{...u,...s,ref:t,align:a,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Zg.displayName=aI;var[oI,fy]=$l(yi,{}),Yg="SelectViewport",mA=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...i}=e,s=Oo(Yg,n),u=fy(Yg,n),d=St(t,s.onViewportChange),f=y.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),p.jsx(nh.Slot,{scope:n,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Te(i.onScroll,h=>{const g=h.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:x}=u;if(x!=null&&x.current&&b){const S=Math.abs(f.current-g.scrollTop);if(S>0){const w=window.innerHeight-Dr*2,E=parseFloat(b.style.minHeight),C=parseFloat(b.style.height),R=Math.max(E,C);if(R<w){const T=R+S,D=Math.min(w,T),j=T-D;b.style.height=D+"px",b.style.bottom==="0px"&&(g.scrollTop=j>0?j:0,b.style.justifyContent="flex-end")}}}f.current=g.scrollTop})})})]})});mA.displayName=Yg;var pA="SelectGroup",[iI,lI]=$l(pA),gA=y.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,i=gn();return p.jsx(iI,{scope:n,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...a,ref:t})})});gA.displayName=pA;var vA="SelectLabel",sI=y.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,i=lI(vA,n);return p.jsx(We.div,{id:i.id,...a,ref:t})});sI.displayName=vA;var pf="SelectItem",[uI,yA]=$l(pf),xA=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:i=!1,textValue:s,...u}=e,d=Mo(pf,n),f=Oo(pf,n),h=d.value===a,[g,b]=y.useState(s??""),[x,S]=y.useState(!1),w=St(t,T=>{var D;return(D=f.itemRefCallback)==null?void 0:D.call(f,T,a,i)}),E=gn(),C=y.useRef("touch"),R=()=>{i||(d.onValueChange(a),d.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(uI,{scope:n,value:a,disabled:i,textId:E,isSelected:h,onItemTextChange:y.useCallback(T=>{b(D=>D||((T==null?void 0:T.textContent)??"").trim())},[]),children:p.jsx(nh.ItemSlot,{scope:n,value:a,disabled:i,textValue:g,children:p.jsx(We.div,{role:"option","aria-labelledby":E,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:w,onFocus:Te(u.onFocus,()=>S(!0)),onBlur:Te(u.onBlur,()=>S(!1)),onClick:Te(u.onClick,()=>{C.current!=="mouse"&&R()}),onPointerUp:Te(u.onPointerUp,()=>{C.current==="mouse"&&R()}),onPointerDown:Te(u.onPointerDown,T=>{C.current=T.pointerType}),onPointerMove:Te(u.onPointerMove,T=>{var D;C.current=T.pointerType,i?(D=f.onItemLeave)==null||D.call(f):C.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(u.onPointerLeave,T=>{var D;T.currentTarget===document.activeElement&&((D=f.onItemLeave)==null||D.call(f))}),onKeyDown:Te(u.onKeyDown,T=>{var j;((j=f.searchRef)==null?void 0:j.current)!==""&&T.key===" "||(YU.includes(T.key)&&R(),T.key===" "&&T.preventDefault())})})})})});xA.displayName=pf;var nu="SelectItemText",bA=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:i,...s}=e,u=Mo(nu,n),d=Oo(nu,n),f=yA(nu,n),h=WU(nu,n),[g,b]=y.useState(null),x=St(t,R=>b(R),f.onItemTextChange,R=>{var T;return(T=d.itemTextRefCallback)==null?void 0:T.call(d,R,f.value,f.disabled)}),S=g==null?void 0:g.textContent,w=y.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:S},f.value),[f.disabled,f.value,S]),{onNativeOptionAdd:E,onNativeOptionRemove:C}=h;return En(()=>(E(w),()=>C(w)),[E,C,w]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:f.textId,...s,ref:x}),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Dl.createPortal(s.children,u.valueNode):null]})});bA.displayName=nu;var SA="SelectItemIndicator",wA=y.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return yA(SA,n).isSelected?p.jsx(We.span,{"aria-hidden":!0,...a,ref:t}):null});wA.displayName=SA;var Kg="SelectScrollUpButton",EA=y.forwardRef((e,t)=>{const n=Oo(Kg,e.__scopeSelect),a=fy(Kg,e.__scopeSelect),[i,s]=y.useState(!1),u=St(t,a.onScrollButtonChange);return En(()=>{if(n.viewport&&n.isPositioned){let d=function(){const h=f.scrollTop>0;s(h)};const f=n.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),i?p.jsx(CA,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});EA.displayName=Kg;var Qg="SelectScrollDownButton",_A=y.forwardRef((e,t)=>{const n=Oo(Qg,e.__scopeSelect),a=fy(Qg,e.__scopeSelect),[i,s]=y.useState(!1),u=St(t,a.onScrollButtonChange);return En(()=>{if(n.viewport&&n.isPositioned){let d=function(){const h=f.scrollHeight-f.clientHeight,g=Math.ceil(f.scrollTop)<h;s(g)};const f=n.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),i?p.jsx(CA,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});_A.displayName=Qg;var CA=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...i}=e,s=Oo("SelectScrollButton",n),u=y.useRef(null),d=rh(n),f=y.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),En(()=>{var g;const h=d().find(b=>b.ref.current===document.activeElement);(g=h==null?void 0:h.ref.current)==null||g.scrollIntoView({block:"nearest"})},[d]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Te(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:Te(i.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:Te(i.onPointerLeave,()=>{f()})})}),cI="SelectSeparator",dI=y.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return p.jsx(We.div,{"aria-hidden":!0,...a,ref:t})});dI.displayName=cI;var Xg="SelectArrow",fI=y.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,i=ah(n),s=Mo(Xg,n),u=Oo(Xg,n);return s.open&&u.position==="popper"?p.jsx(Pf,{...i,...a,ref:t}):null});fI.displayName=Xg;var hI="SelectBubbleInput",RA=y.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const i=y.useRef(null),s=St(a,i),u=qU(t);return y.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(f,"value").set;if(u!==t&&g){const b=new Event("change",{bubbles:!0});g.call(d,t),d.dispatchEvent(b)}},[u,t]),p.jsx(We.select,{...n,style:{...u_,...n.style},ref:s,defaultValue:t})});RA.displayName=hI;function AA(e){return e===""||e===void 0}function TA(e){const t=Wr(e),n=y.useRef(""),a=y.useRef(0),i=y.useCallback(u=>{const d=n.current+u;t(d),function f(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>f(""),1e3))}(d)},[t]),s=y.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,i,s]}function DA(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=mI(e,Math.max(s,0));i.length===1&&(u=u.filter(h=>h!==n));const f=u.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function mI(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var pI=rA,gI=oA,vI=lA,yI=sA,xI=uA,bI=cA,SI=mA,wI=gA,EI=xA,_I=bA,CI=wA,RI=EA,AI=_A;function hy({...e}){return p.jsx(pI,{"data-slot":"select",...e})}function my({...e}){return p.jsx(wI,{"data-slot":"select-group",...e})}function py({...e}){return p.jsx(vI,{"data-slot":"select-value",...e})}function gy({className:e,size:t="default",children:n,...a}){return p.jsxs(gI,{"data-slot":"select-trigger","data-size":t,className:Se("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[n,p.jsx(yI,{asChild:!0,children:p.jsx(Ml,{className:"size-4 opacity-50"})})]})}function vy({className:e,children:t,position:n="popper",...a}){return p.jsx(xI,{children:p.jsxs(bI,{"data-slot":"select-content",className:Se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[p.jsx(TI,{}),p.jsx(SI,{className:Se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(DI,{})]})})}function su({className:e,children:t,...n}){return p.jsxs(EI,{"data-slot":"select-item",className:Se("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(CI,{children:p.jsx(Ud,{className:"size-4"})})}),p.jsx(_I,{children:t})]})}function TI({className:e,...t}){return p.jsx(RI,{"data-slot":"select-scroll-up-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(oN,{className:"size-4"})})}function DI({className:e,...t}){return p.jsx(AI,{"data-slot":"select-scroll-down-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Ml,{className:"size-4"})})}const MA=y.createContext(void 0);function MI(){const e=y.useContext(MA);if(e===void 0)throw new Error("useDataStorageContext must be used within a DataStorageProvider");return e}var xt=(e=>(e.FETCH_STORAGES_START="FETCH_STORAGES_START",e.FETCH_STORAGES_SUCCESS="FETCH_STORAGES_SUCCESS",e.FETCH_STORAGES_ERROR="FETCH_STORAGES_ERROR",e.FETCH_STORAGE_START="FETCH_STORAGE_START",e.FETCH_STORAGE_SUCCESS="FETCH_STORAGE_SUCCESS",e.FETCH_STORAGE_ERROR="FETCH_STORAGE_ERROR",e.CLEAR_CURRENT_STORAGE="CLEAR_CURRENT_STORAGE",e.CREATE_STORAGE_START="CREATE_STORAGE_START",e.CREATE_STORAGE_SUCCESS="CREATE_STORAGE_SUCCESS",e.CREATE_STORAGE_ERROR="CREATE_STORAGE_ERROR",e.UPDATE_STORAGE_START="UPDATE_STORAGE_START",e.UPDATE_STORAGE_SUCCESS="UPDATE_STORAGE_SUCCESS",e.UPDATE_STORAGE_ERROR="UPDATE_STORAGE_ERROR",e.DELETE_STORAGE_START="DELETE_STORAGE_START",e.DELETE_STORAGE_SUCCESS="DELETE_STORAGE_SUCCESS",e.DELETE_STORAGE_ERROR="DELETE_STORAGE_ERROR",e.CLEAR_ERROR="CLEAR_ERROR",e))(xt||{});const OI={dataStorages:[],currentDataStorage:null,loading:!1,error:null};function NI(e,t){switch(t.type){case xt.FETCH_STORAGES_START:case xt.FETCH_STORAGE_START:case xt.CREATE_STORAGE_START:case xt.UPDATE_STORAGE_START:case xt.DELETE_STORAGE_START:return{...e,loading:!0,error:null};case xt.FETCH_STORAGES_SUCCESS:return{...e,dataStorages:t.payload,loading:!1,error:null};case xt.FETCH_STORAGE_SUCCESS:return{...e,currentDataStorage:t.payload,loading:!1,error:null};case xt.CREATE_STORAGE_SUCCESS:return{...e,dataStorages:[...e.dataStorages,t.payload],loading:!1,error:null};case xt.UPDATE_STORAGE_SUCCESS:return{...e,currentDataStorage:t.payload,dataStorages:e.dataStorages.map(n=>n.id===t.payload.id?t.payload:n),loading:!1,error:null};case xt.DELETE_STORAGE_SUCCESS:return{...e,dataStorages:e.dataStorages.filter(n=>n.id!==t.payload),loading:!1,error:null};case xt.FETCH_STORAGES_ERROR:case xt.FETCH_STORAGE_ERROR:case xt.CREATE_STORAGE_ERROR:case xt.UPDATE_STORAGE_ERROR:case xt.DELETE_STORAGE_ERROR:return{...e,loading:!1,error:t.payload};case xt.CLEAR_CURRENT_STORAGE:return{...e,currentDataStorage:null};case xt.CLEAR_ERROR:return{...e,error:null};default:return e}}function yy({children:e}){const[t,n]=y.useReducer(NI,OI);return p.jsx(MA.Provider,{value:{state:t,dispatch:n},children:e})}class jI extends LC{constructor(){super("/data-storages")}async getDataStorages(){return this.get("/")}async getDataStorageById(t){return this.get(`/${t}`)}async createDataStorage(t){return this.post("",t)}async updateDataStorage(t,n){return this.put(`/${t}`,n)}async deleteDataStorage(t){return this.delete(`/${t}`)}}const Qs=new jI;function oh(){const{state:e,dispatch:t}=MI(),n=y.useCallback(async()=>{t({type:xt.FETCH_STORAGES_START});try{const f=await Qs.getDataStorages();t({type:xt.FETCH_STORAGES_SUCCESS,payload:f.map(nU)})}catch(f){t({type:xt.FETCH_STORAGES_ERROR,payload:f instanceof Error?f.message:"Failed to load data storages"})}},[t]),a=y.useCallback(async f=>{try{const h=await Qs.getDataStorageById(f),g=Nd(h);t({type:xt.FETCH_STORAGE_SUCCESS,payload:g})}catch(h){t({type:xt.FETCH_STORAGE_ERROR,payload:h instanceof Error?h.message:"Failed to load data storage"})}},[t]),i=y.useCallback(async f=>{t({type:xt.CREATE_STORAGE_START});try{const h=rU(f),g=await Qs.createDataStorage(h),b=Nd(g);return t({type:xt.CREATE_STORAGE_SUCCESS,payload:b}),b}catch(h){return t({type:xt.CREATE_STORAGE_ERROR,payload:h instanceof Error?h.message:"Failed to create data storage"}),null}},[t]),s=y.useCallback(async(f,h)=>{t({type:xt.UPDATE_STORAGE_START});try{const g=tU(h),b=await Qs.updateDataStorage(f,g),x=Nd(b);return t({type:xt.UPDATE_STORAGE_SUCCESS,payload:x}),x}catch(g){return t({type:xt.UPDATE_STORAGE_ERROR,payload:g instanceof Error?g.message:"Failed to update data storage"}),null}},[t]),u=y.useCallback(async f=>{t({type:xt.DELETE_STORAGE_START});try{await Qs.deleteDataStorage(f),t({type:xt.DELETE_STORAGE_SUCCESS,payload:f})}catch(h){t({type:xt.DELETE_STORAGE_ERROR,payload:h instanceof Error?h.message:"Failed to delete data storage"})}},[t]),d=y.useCallback(()=>{t({type:xt.CLEAR_CURRENT_STORAGE})},[t]);return{dataStorages:e.dataStorages,currentDataStorage:e.currentDataStorage,loading:e.loading,error:e.error,fetchDataStorages:n,getDataStorageById:a,createDataStorage:i,updateDataStorage:s,deleteDataStorage:u,clearCurrentDataStorage:d}}function kI({initialData:e,onSuccess:t}){const{handleCreate:n,isSubmitting:a,serverError:i}=pU(),{dataStorages:s,loading:u,fetchDataStorages:d}=oh();y.useEffect(()=>{d()},[d]);const f=cy({resolver:dy(mU),defaultValues:{title:(e==null?void 0:e.title)??"",storageId:""}}),{formState:h}=f,{errors:g}=h,b=async x=>{const S=await n(x);S&&t&&t(S)};return p.jsxs("form",{onSubmit:x=>{f.handleSubmit(b)(x)},className:"space-y-4",children:[i&&p.jsx("div",{className:"rounded bg-red-100 p-3 text-red-700",children:i}),p.jsxs("div",{children:[p.jsx(Ln,{htmlFor:"title",className:"mb-1 block text-sm font-medium",children:"Title"}),p.jsx(Xn,{id:"title",...f.register("title"),className:"w-full",disabled:a}),g.title&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:g.title.message})]}),p.jsxs("div",{children:[p.jsx(Ln,{htmlFor:"storageId",className:"mb-1 block text-sm font-medium",children:"Data Storage"}),p.jsxs(hy,{onValueChange:x=>{f.setValue("storageId",x,{shouldValidate:!0})},value:f.watch("storageId"),disabled:a||u,children:[p.jsx(gy,{className:"w-full",children:p.jsx(py,{placeholder:"Select a data storage"})}),p.jsx(vy,{children:p.jsxs(my,{children:[u&&p.jsx(su,{value:"loading",disabled:!0,children:"Loading..."}),!u&&s.length===0&&p.jsx(su,{value:"empty",disabled:!0,children:"No data storages available"}),!u&&s.map(x=>{const S=_i.getInfo(x.type).icon;return p.jsx(su,{value:x.id,children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(S,{className:"h-4 w-4"}),p.jsx("span",{children:x.title})]})},x.id)})]})})]}),g.storageId&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:g.storageId.message})]}),p.jsx("div",{className:"pt-2",children:p.jsx(Ft,{type:"submit",disabled:a,variant:"secondary",children:a?"Saving...":"Create"})})]})}function LI({title:e,onUpdate:t,className:n,errorMessage:a="Title cannot be empty",minWidth:i="200px"}){const[s,u]=y.useState(e),[d,f]=y.useState(!1),h=y.useRef(null);y.useEffect(()=>{u(e)},[e]),y.useEffect(()=>{h.current&&(h.current.style.height="auto",h.current.style.height=`${String(h.current.scrollHeight)}px`)},[s]);const g=async()=>{if(s.trim()===""){u(e);return}if(s.trim()!==e)try{f(!0),await t(s.trim())}catch(x){u(e),console.error(x)}finally{f(!1)}},b=x=>{if(x.key==="Enter"&&!x.shiftKey){if(x.preventDefault(),s.trim()===""){Bg.error(a),u(e);return}g()}else x.key==="Escape"&&u(e)};return p.jsx("h2",{className:Se("m-0 cursor-pointer p-0 hover:opacity-80",n),children:p.jsx(Bv,{ref:h,value:s,onChange:x=>{u(x.target.value);const S=x.target;S.style.height="auto",S.style.height=`${String(S.scrollHeight)}px`},onBlur:()=>void g(),onKeyDown:b,className:Se("m-0 w-full border-0 p-0 shadow-none","bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0",{"opacity-50":d}),style:{fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit",fontFamily:"inherit",color:"inherit",resize:"none",overflow:"hidden",minHeight:"inherit",height:"auto",minWidth:i},disabled:d})})}function OA(){return p.jsx(Xv,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#363636",color:"#fff"},success:{style:{color:"#16a34a",background:"#fff"}},error:{style:{color:"#dc2626",background:"#fff"},duration:4e3}}})}function PI({id:e}){const t=Ru(),{dataMart:n,deleteDataMart:a,updateDataMartTitle:i,updateDataMartDescription:s,updateDataMartDefinition:u,isLoading:d,error:f}=gU(e),[h,g]=y.useState(!1),b=[{name:"Overview",path:"overview"},{name:"Data Setup",path:"data-setup"},{name:"Destinations",path:"destinations"}],x=async S=>{n&&await i(n.id,S)};return f?p.jsxs("div",{className:"rounded bg-red-100 p-4 text-red-700",children:["Error: ",f]}):n?p.jsxs("div",{className:"px-12 py-8",children:[p.jsx(OA,{}),p.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>void t("/data-marts"),className:"rounded p-1 hover:bg-gray-100",title:"Back to Data Marts",children:p.jsx(QO,{className:"h-5 w-5 text-gray-400"})}),p.jsx(LI,{title:n.title,onUpdate:x,className:"text-xl font-medium"})]}),p.jsxs(zl,{children:[p.jsx(Fl,{asChild:!0,children:p.jsx("button",{className:"rounded p-1 hover:bg-gray-100",children:p.jsx(gN,{className:"h-5 w-5"})})}),p.jsx(Ei,{align:"end",children:p.jsxs(Qr,{className:"text-red-600",onClick:()=>{g(!0)},children:[p.jsx(XE,{className:"mr-2 h-4 w-4"}),"Delete"]})})]})]}),p.jsx("div",{children:p.jsx("nav",{className:"-mb-px flex space-x-4 border-b","aria-label":"Tabs",role:"tablist",children:b.map(S=>p.jsx(Fd,{to:S.path,className:({isActive:w})=>Se("border-b-2 px-4 py-2 text-sm font-medium whitespace-nowrap",w?"border-brand-blue-500 text-brand-blue-500":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),children:S.name},S.name))})}),p.jsx("div",{className:"pt-4",children:p.jsx(zE,{context:{dataMart:n,isLoading:d,updateDataMartDescription:s,updateDataMartDefinition:u}})}),p.jsx(ty,{open:h,onOpenChange:g,title:"Delete Data Mart",description:p.jsxs(p.Fragment,{children:["Are you sure you want to delete ",p.jsxs("strong",{children:['"',n.title,'"']}),"? This action cannot be undone."]}),confirmLabel:"Delete",cancelLabel:"Cancel",variant:"destructive",onConfirm:()=>{(async()=>{try{await a(n.id),g(!1),t("/data-marts")}catch(S){console.error("Failed to delete data mart:",S)}})()}})]}):p.jsx("div",{className:"p-4",children:"No data mart found"})}function zI({description:e,onUpdate:t,className:n,placeholder:a="Add description...",minWidth:i="100%",minHeight:s="100px"}){const[u,d]=y.useState(e??""),[f,h]=y.useState(!1),[g,b]=y.useState(!1),x=y.useRef(null);y.useEffect(()=>{d(e??"")},[e]),y.useEffect(()=>{if(x.current&&f){x.current.focus();const R=x.current.value.length;x.current.setSelectionRange(R,R),S(x.current)}},[f]);const S=R=>{R.style.height="auto",R.style.height=`${String(R.scrollHeight)}px`},w=R=>{d(R.target.value),S(R.target)},E=async()=>{const R=u.trim();if(R===(e??"")){h(!1);return}try{b(!0),await t(R===""?null:R),h(!1),Bg.success("Description updated")}catch(D){console.error("Failed to update description:",D),Bg.error("Failed to update description"),d(e??"")}finally{b(!1)}},C=R=>{R.key==="Enter"&&R.ctrlKey?(R.preventDefault(),E()):R.key==="Escape"&&(R.preventDefault(),d(e??""),h(!1))};return f?p.jsxs("div",{className:"w-full",children:[p.jsx(Bv,{ref:x,value:u,onChange:w,onBlur:()=>void E(),onKeyDown:C,placeholder:a,className:Se("m-0 w-full border-0 bg-white p-2 shadow-none dark:bg-white/4","focus-visible:ring-primary focus-visible:ring-0",{"opacity-50":g}),style:{fontSize:"inherit",lineHeight:"inherit",fontFamily:"inherit",resize:"vertical",minHeight:s,minWidth:i},disabled:g}),p.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[p.jsxs("span",{children:["Press"," ",p.jsx("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1 py-0.5 font-sans",children:"Ctrl+Enter"})," ","to save •"," "]}),p.jsxs("span",{children:[p.jsx("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1 py-0.5 font-sans",children:"Esc"})," ","to cancel •"," "]}),p.jsx("span",{children:"Changes are also saved when you click outside"})]})]}):p.jsx("div",{className:"flex w-full items-center gap-4 rounded-md border-b border-gray-200 bg-white transition-shadow duration-200 hover:shadow-sm dark:border-0 dark:bg-white/4",children:p.jsx("div",{onClick:()=>{h(!0)},className:Se("min-h-24 cursor-pointer rounded p-2 whitespace-pre-wrap","transition-colors duration-150",!e&&"text-gray-400 italic",n),style:{minWidth:i},children:e??a})})}function FI(){const{dataMart:e,updateDataMartDescription:t}=LE(),n=async a=>{await t(e.id,a)};return p.jsxs("div",{children:[p.jsx(OA,{}),p.jsx(zI,{description:e.description,onUpdate:n,placeholder:"Add a description for this Data Mart..."})]})}function UI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function rE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nE(Object(n),!0).forEach(function(a){UI(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nE(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function II(e,t){if(e==null)return{};var n={},a=Object.keys(e),i,s;for(s=0;s<a.length;s++)i=a[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function VI(e,t){if(e==null)return{};var n=II(e,t),a,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function $I(e,t){return HI(e)||BI(e,t)||GI(e,t)||qI()}function HI(e){if(Array.isArray(e))return e}function BI(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],a=!0,i=!1,s=void 0;try{for(var u=e[Symbol.iterator](),d;!(a=(d=u.next()).done)&&(n.push(d.value),!(t&&n.length===t));a=!0);}catch(f){i=!0,s=f}finally{try{!a&&u.return!=null&&u.return()}finally{if(i)throw s}}return n}}function GI(e,t){if(e){if(typeof e=="string")return aE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aE(e,t)}}function aE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function qI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
493
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function iE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oE(Object(n),!0).forEach(function(a){ZI(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function YI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){return t.reduceRight(function(i,s){return s(i)},a)}}function ru(e){return function t(){for(var n=this,a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];return t.apply(n,[].concat(i,d))}}}function gf(e){return{}.toString.call(e).includes("Object")}function KI(e){return!Object.keys(e).length}function Su(e){return typeof e=="function"}function QI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function XI(e,t){return gf(t)||vo("changeType"),Object.keys(t).some(function(n){return!QI(e,n)})&&vo("changeField"),t}function WI(e){Su(e)||vo("selectorType")}function JI(e){Su(e)||gf(e)||vo("handlerType"),gf(e)&&Object.values(e).some(function(t){return!Su(t)})&&vo("handlersType")}function eV(e){e||vo("initialIsRequired"),gf(e)||vo("initialType"),KI(e)&&vo("initialContent")}function tV(e,t){throw new Error(e[t]||e.default)}var nV={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},vo=ru(tV)(nV),bd={changes:XI,selector:WI,handler:JI,initial:eV};function rV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bd.initial(e),bd.handler(t);var n={current:e},a=ru(iV)(n,t),i=ru(oV)(n),s=ru(bd.changes)(e),u=ru(aV)(n);function d(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return bd.selector(h),h(n.current)}function f(h){YI(a,i,s,u)(h)}return[d,f]}function aV(e,t){return Su(t)?t(e.current):t}function oV(e,t){return e.current=iE(iE({},e.current),t),t}function iV(e,t,n){return Su(t)?t(e.current):Object.keys(n).forEach(function(a){var i;return(i=t[a])===null||i===void 0?void 0:i.call(t,e.current[a])}),n}var lV={create:rV},sV={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function uV(e){return function t(){for(var n=this,a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];return t.apply(n,[].concat(i,d))}}}function cV(e){return{}.toString.call(e).includes("Object")}function dV(e){return e||lE("configIsRequired"),cV(e)||lE("configType"),e.urls?(fV(),{paths:{vs:e.urls.monacoBase}}):e}function fV(){console.warn(NA.deprecation)}function hV(e,t){throw new Error(e[t]||e.default)}var NA={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
494
- You are using deprecated way of configuration.
495
-
496
- Instead of using
497
- monaco.config({ urls: { monacoBase: '...' } })
498
- use
499
- monaco.config({ paths: { vs: '...' } })
500
-
501
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
502
- `},lE=uV(hV)(NA),mV={config:dV},pV=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return function(i){return n.reduceRight(function(s,u){return u(s)},i)}};function jA(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],jA(e[n],t[n]))}),rE(rE({},e),t)}var gV={type:"cancelation",msg:"operation is manually canceled"};function ng(e){var t=!1,n=new Promise(function(a,i){e.then(function(s){return t?i(gV):a(s)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var vV=lV.create({config:sV,isInitialized:!1,resolve:null,reject:null,monaco:null}),kA=$I(vV,2),Hu=kA[0],ih=kA[1];function yV(e){var t=mV.config(e),n=t.monaco,a=VI(t,["monaco"]);ih(function(i){return{config:jA(i.config,a),monaco:n}})}function xV(){var e=Hu(function(t){var n=t.monaco,a=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:a,resolve:i}});if(!e.isInitialized){if(ih({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ng(rg);if(window.monaco&&window.monaco.editor)return LA(window.monaco),e.resolve(window.monaco),ng(rg);pV(bV,wV)(EV)}return ng(rg)}function bV(e){return document.body.appendChild(e)}function SV(e){var t=document.createElement("script");return e&&(t.src=e),t}function wV(e){var t=Hu(function(a){var i=a.config,s=a.reject;return{config:i,reject:s}}),n=SV("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function EV(){var e=Hu(function(n){var a=n.config,i=n.resolve,s=n.reject;return{config:a,resolve:i,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){LA(n),e.resolve(n)},function(n){e.reject(n)})}function LA(e){Hu().monaco||ih({monaco:e})}function _V(){return Hu(function(e){var t=e.monaco;return t})}var rg=new Promise(function(e,t){return ih({resolve:e,reject:t})}),PA={config:yV,init:xV,__getMonacoInstance:_V},CV={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ag=CV,RV={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},AV=RV;function TV({children:e}){return tt.createElement("div",{style:AV.container},e)}var DV=TV,MV=DV;function OV({width:e,height:t,isEditorReady:n,loading:a,_ref:i,className:s,wrapperProps:u}){return tt.createElement("section",{style:{...ag.wrapper,width:e,height:t},...u},!n&&tt.createElement(MV,null,a),tt.createElement("div",{ref:i,style:{...ag.fullWidth,...!n&&ag.hide},className:s}))}var NV=OV,zA=y.memo(NV);function jV(e){y.useEffect(e,[])}var FA=jV;function kV(e,t,n=!0){let a=y.useRef(!0);y.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Kn=kV;function uu(){}function yl(e,t,n,a){return LV(e,a)||PV(e,t,n,a)}function LV(e,t){return e.editor.getModel(UA(e,t))}function PV(e,t,n,a){return e.editor.createModel(t,n,a?UA(e,a):void 0)}function UA(e,t){return e.Uri.parse(t)}function zV({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:u,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:f=!1,theme:h="light",loading:g="Loading...",options:b={},height:x="100%",width:S="100%",className:w,wrapperProps:E={},beforeMount:C=uu,onMount:R=uu}){let[T,D]=y.useState(!1),[j,O]=y.useState(!0),M=y.useRef(null),I=y.useRef(null),Z=y.useRef(null),ee=y.useRef(R),se=y.useRef(C),ye=y.useRef(!1);FA(()=>{let te=PA.init();return te.then(k=>(I.current=k)&&O(!1)).catch(k=>(k==null?void 0:k.type)!=="cancelation"&&console.error("Monaco initialization: error:",k)),()=>M.current?ce():te.cancel()}),Kn(()=>{if(M.current&&I.current){let te=M.current.getOriginalEditor(),k=yl(I.current,e||"",a||n||"text",s||"");k!==te.getModel()&&te.setModel(k)}},[s],T),Kn(()=>{if(M.current&&I.current){let te=M.current.getModifiedEditor(),k=yl(I.current,t||"",i||n||"text",u||"");k!==te.getModel()&&te.setModel(k)}},[u],T),Kn(()=>{let te=M.current.getModifiedEditor();te.getOption(I.current.editor.EditorOption.readOnly)?te.setValue(t||""):t!==te.getValue()&&(te.executeEdits("",[{range:te.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),te.pushUndoStop())},[t],T),Kn(()=>{var te,k;(k=(te=M.current)==null?void 0:te.getModel())==null||k.original.setValue(e||"")},[e],T),Kn(()=>{let{original:te,modified:k}=M.current.getModel();I.current.editor.setModelLanguage(te,a||n||"text"),I.current.editor.setModelLanguage(k,i||n||"text")},[n,a,i],T),Kn(()=>{var te;(te=I.current)==null||te.editor.setTheme(h)},[h],T),Kn(()=>{var te;(te=M.current)==null||te.updateOptions(b)},[b],T);let me=y.useCallback(()=>{var q;if(!I.current)return;se.current(I.current);let te=yl(I.current,e||"",a||n||"text",s||""),k=yl(I.current,t||"",i||n||"text",u||"");(q=M.current)==null||q.setModel({original:te,modified:k})},[n,t,i,e,a,s,u]),ve=y.useCallback(()=>{var te;!ye.current&&Z.current&&(M.current=I.current.editor.createDiffEditor(Z.current,{automaticLayout:!0,...b}),me(),(te=I.current)==null||te.editor.setTheme(h),D(!0),ye.current=!0)},[b,h,me]);y.useEffect(()=>{T&&ee.current(M.current,I.current)},[T]),y.useEffect(()=>{!j&&!T&&ve()},[j,T,ve]);function ce(){var k,q,V,re;let te=(k=M.current)==null?void 0:k.getModel();d||((q=te==null?void 0:te.original)==null||q.dispose()),f||((V=te==null?void 0:te.modified)==null||V.dispose()),(re=M.current)==null||re.dispose()}return tt.createElement(zA,{width:S,height:x,isEditorReady:T,loading:g,_ref:Z,className:w,wrapperProps:E})}var FV=zV;y.memo(FV);function UV(e){let t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}var IV=UV,Sd=new Map;function VV({defaultValue:e,defaultLanguage:t,defaultPath:n,value:a,language:i,path:s,theme:u="light",line:d,loading:f="Loading...",options:h={},overrideServices:g={},saveViewState:b=!0,keepCurrentModel:x=!1,width:S="100%",height:w="100%",className:E,wrapperProps:C={},beforeMount:R=uu,onMount:T=uu,onChange:D,onValidate:j=uu}){let[O,M]=y.useState(!1),[I,Z]=y.useState(!0),ee=y.useRef(null),se=y.useRef(null),ye=y.useRef(null),me=y.useRef(T),ve=y.useRef(R),ce=y.useRef(),te=y.useRef(a),k=IV(s),q=y.useRef(!1),V=y.useRef(!1);FA(()=>{let H=PA.init();return H.then(P=>(ee.current=P)&&Z(!1)).catch(P=>(P==null?void 0:P.type)!=="cancelation"&&console.error("Monaco initialization: error:",P)),()=>se.current?N():H.cancel()}),Kn(()=>{var P,B,oe,de;let H=yl(ee.current,e||a||"",t||i||"",s||n||"");H!==((P=se.current)==null?void 0:P.getModel())&&(b&&Sd.set(k,(B=se.current)==null?void 0:B.saveViewState()),(oe=se.current)==null||oe.setModel(H),b&&((de=se.current)==null||de.restoreViewState(Sd.get(s))))},[s],O),Kn(()=>{var H;(H=se.current)==null||H.updateOptions(h)},[h],O),Kn(()=>{!se.current||a===void 0||(se.current.getOption(ee.current.editor.EditorOption.readOnly)?se.current.setValue(a):a!==se.current.getValue()&&(V.current=!0,se.current.executeEdits("",[{range:se.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),se.current.pushUndoStop(),V.current=!1))},[a],O),Kn(()=>{var P,B;let H=(P=se.current)==null?void 0:P.getModel();H&&i&&((B=ee.current)==null||B.editor.setModelLanguage(H,i))},[i],O),Kn(()=>{var H;d!==void 0&&((H=se.current)==null||H.revealLine(d))},[d],O),Kn(()=>{var H;(H=ee.current)==null||H.editor.setTheme(u)},[u],O);let re=y.useCallback(()=>{var H;if(!(!ye.current||!ee.current)&&!q.current){ve.current(ee.current);let P=s||n,B=yl(ee.current,a||e||"",t||i||"",P||"");se.current=(H=ee.current)==null?void 0:H.editor.create(ye.current,{model:B,automaticLayout:!0,...h},g),b&&se.current.restoreViewState(Sd.get(P)),ee.current.editor.setTheme(u),d!==void 0&&se.current.revealLine(d),M(!0),q.current=!0}},[e,t,n,a,i,s,h,g,b,u,d]);y.useEffect(()=>{O&&me.current(se.current,ee.current)},[O]),y.useEffect(()=>{!I&&!O&&re()},[I,O,re]),te.current=a,y.useEffect(()=>{var H,P;O&&D&&((H=ce.current)==null||H.dispose(),ce.current=(P=se.current)==null?void 0:P.onDidChangeModelContent(B=>{V.current||D(se.current.getValue(),B)}))},[O,D]),y.useEffect(()=>{if(O){let H=ee.current.editor.onDidChangeMarkers(P=>{var oe;let B=(oe=se.current.getModel())==null?void 0:oe.uri;if(B&&P.find(de=>de.path===B.path)){let de=ee.current.editor.getModelMarkers({resource:B});j==null||j(de)}});return()=>{H==null||H.dispose()}}return()=>{}},[O,j]);function N(){var H,P;(H=ce.current)==null||H.dispose(),x?b&&Sd.set(s,se.current.saveViewState()):(P=se.current.getModel())==null||P.dispose(),se.current.dispose()}return tt.createElement(zA,{width:S,height:w,isEditorReady:O,loading:f,_ref:ye,className:E,wrapperProps:C})}var $V=VV,HV=y.memo($V);function BV({initialValue:e,onChange:t}){const[n,a]=y.useState((e==null?void 0:e.sqlQuery)??""),{theme:i}=w_();y.useEffect(()=>{e!=null&&e.sqlQuery&&e.sqlQuery!==n&&a(e.sqlQuery)},[e,n]);function s(u){u!==void 0&&(a(u),t({sqlQuery:u}))}return p.jsx("div",{children:p.jsx(HV,{height:"30vh",language:"sql",value:n,onChange:s,theme:i==="dark"?"vs-dark":"light",options:{selectOnLineNumbers:!0,hideCursorInOverviewRuler:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,overviewRulerBorder:!1}})})}function GV({icon:e,title:t,subtitle:n,rightContent:a,onClick:i,className:s}){const u=e;return p.jsxs("div",{className:Se("group flex items-center gap-4 rounded-md border-b border-gray-200 bg-white transition-shadow duration-200 hover:shadow-sm dark:border-0 dark:bg-white/4",i&&"cursor-pointer dark:hover:bg-white/5",s),onClick:i,children:[p.jsxs("div",{className:"flex flex-grow items-start justify-center gap-3 px-6 py-5",children:[e&&p.jsx("div",{className:"flex items-center justify-center",children:p.jsx(u,{className:"h-6 w-6"})}),p.jsxs("div",{className:"flex flex-grow flex-col gap-1",children:[p.jsx("div",{className:"text-md font-medium",children:t}),n&&p.jsx("div",{className:"text-muted-foreground/60 text-sm",children:n})]})]}),p.jsxs("div",{className:"flex items-center justify-center gap-2 p-4",children:[a,p.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full transition-colors duration-200 group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/25",children:p.jsx(rN,{className:"text-muted-foreground/75 dark:text-muted-foreground/50 h-4 w-4"})})]})]})}var sE=1,qV=.9,ZV=.8,YV=.17,og=.1,ig=.999,KV=.9999,QV=.99,XV=/[\\\/_+.#"@\[\(\{&]/,WV=/[\\\/_+.#"@\[\(\{&]/g,JV=/[\s-]/,IA=/[\s-]/g;function Wg(e,t,n,a,i,s,u){if(s===t.length)return i===e.length?sE:QV;var d=`${i},${s}`;if(u[d]!==void 0)return u[d];for(var f=a.charAt(s),h=n.indexOf(f,i),g=0,b,x,S,w;h>=0;)b=Wg(e,t,n,a,h+1,s+1,u),b>g&&(h===i?b*=sE:XV.test(e.charAt(h-1))?(b*=ZV,S=e.slice(i,h-1).match(WV),S&&i>0&&(b*=Math.pow(ig,S.length))):JV.test(e.charAt(h-1))?(b*=qV,w=e.slice(i,h-1).match(IA),w&&i>0&&(b*=Math.pow(ig,w.length))):(b*=YV,i>0&&(b*=Math.pow(ig,h-i))),e.charAt(h)!==t.charAt(s)&&(b*=KV)),(b<og&&n.charAt(h-1)===a.charAt(s+1)||a.charAt(s+1)===a.charAt(s)&&n.charAt(h-1)!==a.charAt(s))&&(x=Wg(e,t,n,a,h+1,s+2,u),x*og>b&&(b=x*og)),b>g&&(g=b),h=n.indexOf(f,h+1);return u[d]=g,g}function uE(e){return e.toLowerCase().replace(IA," ")}function e8(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Wg(e,t,uE(e),uE(t),0,0,{})}var Xs='[cmdk-group=""]',lg='[cmdk-group-items=""]',t8='[cmdk-group-heading=""]',VA='[cmdk-item=""]',cE=`${VA}:not([aria-disabled="true"])`,Jg="cmdk-item-select",gl="data-value",n8=(e,t,n)=>e8(e,t,n),$A=y.createContext(void 0),Bu=()=>y.useContext($A),HA=y.createContext(void 0),xy=()=>y.useContext(HA),BA=y.createContext(void 0),GA=y.forwardRef((e,t)=>{let n=vl(()=>{var P,B;return{search:"",value:(B=(P=e.value)!=null?P:e.defaultValue)!=null?B:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=vl(()=>new Set),i=vl(()=>new Map),s=vl(()=>new Map),u=vl(()=>new Set),d=qA(e),{label:f,children:h,value:g,onValueChange:b,filter:x,shouldFilter:S,loop:w,disablePointerSelection:E=!1,vimBindings:C=!0,...R}=e,T=gn(),D=gn(),j=gn(),O=y.useRef(null),M=h8();xi(()=>{if(g!==void 0){let P=g.trim();n.current.value=P,I.emit()}},[g]),xi(()=>{M(6,ve)},[]);let I=y.useMemo(()=>({subscribe:P=>(u.current.add(P),()=>u.current.delete(P)),snapshot:()=>n.current,setState:(P,B,oe)=>{var de,pe,ue,Ce;if(!Object.is(n.current[P],B)){if(n.current[P]=B,P==="search")me(),se(),M(1,ye);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Le=document.getElementById(j);Le?Le.focus():(de=document.getElementById(T))==null||de.focus()}if(M(7,()=>{var Le;n.current.selectedItemId=(Le=ce())==null?void 0:Le.id,I.emit()}),oe||M(5,ve),((pe=d.current)==null?void 0:pe.value)!==void 0){let Le=B??"";(Ce=(ue=d.current).onValueChange)==null||Ce.call(ue,Le);return}}I.emit()}},emit:()=>{u.current.forEach(P=>P())}}),[]),Z=y.useMemo(()=>({value:(P,B,oe)=>{var de;B!==((de=s.current.get(P))==null?void 0:de.value)&&(s.current.set(P,{value:B,keywords:oe}),n.current.filtered.items.set(P,ee(B,oe)),M(2,()=>{se(),I.emit()}))},item:(P,B)=>(a.current.add(P),B&&(i.current.has(B)?i.current.get(B).add(P):i.current.set(B,new Set([P]))),M(3,()=>{me(),se(),n.current.value||ye(),I.emit()}),()=>{s.current.delete(P),a.current.delete(P),n.current.filtered.items.delete(P);let oe=ce();M(4,()=>{me(),(oe==null?void 0:oe.getAttribute("id"))===P&&ye(),I.emit()})}),group:P=>(i.current.has(P)||i.current.set(P,new Set),()=>{s.current.delete(P),i.current.delete(P)}),filter:()=>d.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:T,inputId:j,labelId:D,listInnerRef:O}),[]);function ee(P,B){var oe,de;let pe=(de=(oe=d.current)==null?void 0:oe.filter)!=null?de:n8;return P?pe(P,n.current.search,B):0}function se(){if(!n.current.search||d.current.shouldFilter===!1)return;let P=n.current.filtered.items,B=[];n.current.filtered.groups.forEach(de=>{let pe=i.current.get(de),ue=0;pe.forEach(Ce=>{let Le=P.get(Ce);ue=Math.max(Le,ue)}),B.push([de,ue])});let oe=O.current;te().sort((de,pe)=>{var ue,Ce;let Le=de.getAttribute("id"),ke=pe.getAttribute("id");return((ue=P.get(ke))!=null?ue:0)-((Ce=P.get(Le))!=null?Ce:0)}).forEach(de=>{let pe=de.closest(lg);pe?pe.appendChild(de.parentElement===pe?de:de.closest(`${lg} > *`)):oe.appendChild(de.parentElement===oe?de:de.closest(`${lg} > *`))}),B.sort((de,pe)=>pe[1]-de[1]).forEach(de=>{var pe;let ue=(pe=O.current)==null?void 0:pe.querySelector(`${Xs}[${gl}="${encodeURIComponent(de[0])}"]`);ue==null||ue.parentElement.appendChild(ue)})}function ye(){let P=te().find(oe=>oe.getAttribute("aria-disabled")!=="true"),B=P==null?void 0:P.getAttribute(gl);I.setState("value",B||void 0)}function me(){var P,B,oe,de;if(!n.current.search||d.current.shouldFilter===!1){n.current.filtered.count=a.current.size;return}n.current.filtered.groups=new Set;let pe=0;for(let ue of a.current){let Ce=(B=(P=s.current.get(ue))==null?void 0:P.value)!=null?B:"",Le=(de=(oe=s.current.get(ue))==null?void 0:oe.keywords)!=null?de:[],ke=ee(Ce,Le);n.current.filtered.items.set(ue,ke),ke>0&&pe++}for(let[ue,Ce]of i.current)for(let Le of Ce)if(n.current.filtered.items.get(Le)>0){n.current.filtered.groups.add(ue);break}n.current.filtered.count=pe}function ve(){var P,B,oe;let de=ce();de&&(((P=de.parentElement)==null?void 0:P.firstChild)===de&&((oe=(B=de.closest(Xs))==null?void 0:B.querySelector(t8))==null||oe.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function ce(){var P;return(P=O.current)==null?void 0:P.querySelector(`${VA}[aria-selected="true"]`)}function te(){var P;return Array.from(((P=O.current)==null?void 0:P.querySelectorAll(cE))||[])}function k(P){let B=te()[P];B&&I.setState("value",B.getAttribute(gl))}function q(P){var B;let oe=ce(),de=te(),pe=de.findIndex(Ce=>Ce===oe),ue=de[pe+P];(B=d.current)!=null&&B.loop&&(ue=pe+P<0?de[de.length-1]:pe+P===de.length?de[0]:de[pe+P]),ue&&I.setState("value",ue.getAttribute(gl))}function V(P){let B=ce(),oe=B==null?void 0:B.closest(Xs),de;for(;oe&&!de;)oe=P>0?d8(oe,Xs):f8(oe,Xs),de=oe==null?void 0:oe.querySelector(cE);de?I.setState("value",de.getAttribute(gl)):q(P)}let re=()=>k(te().length-1),N=P=>{P.preventDefault(),P.metaKey?re():P.altKey?V(1):q(1)},H=P=>{P.preventDefault(),P.metaKey?k(0):P.altKey?V(-1):q(-1)};return y.createElement(We.div,{ref:t,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:P=>{var B;(B=R.onKeyDown)==null||B.call(R,P);let oe=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||oe))switch(P.key){case"n":case"j":{C&&P.ctrlKey&&N(P);break}case"ArrowDown":{N(P);break}case"p":case"k":{C&&P.ctrlKey&&H(P);break}case"ArrowUp":{H(P);break}case"Home":{P.preventDefault(),k(0);break}case"End":{P.preventDefault(),re();break}case"Enter":{P.preventDefault();let de=ce();if(de){let pe=new Event(Jg);de.dispatchEvent(pe)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:Z.inputId,id:Z.labelId,style:p8},f),lh(e,P=>y.createElement(HA.Provider,{value:I},y.createElement($A.Provider,{value:Z},P))))}),r8=y.forwardRef((e,t)=>{var n,a;let i=gn(),s=y.useRef(null),u=y.useContext(BA),d=Bu(),f=qA(e),h=(a=(n=f.current)==null?void 0:n.forceMount)!=null?a:u==null?void 0:u.forceMount;xi(()=>{if(!h)return d.item(i,u==null?void 0:u.id)},[h]);let g=ZA(i,s,[e.value,e.children,s],e.keywords),b=xy(),x=Co(M=>M.value&&M.value===g.current),S=Co(M=>h||d.filter()===!1?!0:M.search?M.filtered.items.get(i)>0:!0);y.useEffect(()=>{let M=s.current;if(!(!M||e.disabled))return M.addEventListener(Jg,w),()=>M.removeEventListener(Jg,w)},[S,e.onSelect,e.disabled]);function w(){var M,I;E(),(I=(M=f.current).onSelect)==null||I.call(M,g.current)}function E(){b.setState("value",g.current,!0)}if(!S)return null;let{disabled:C,value:R,onSelect:T,forceMount:D,keywords:j,...O}=e;return y.createElement(We.div,{ref:Ca(s,t),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":!!C,"aria-selected":!!x,"data-disabled":!!C,"data-selected":!!x,onPointerMove:C||d.getDisablePointerSelection()?void 0:E,onClick:C?void 0:w},e.children)}),a8=y.forwardRef((e,t)=>{let{heading:n,children:a,forceMount:i,...s}=e,u=gn(),d=y.useRef(null),f=y.useRef(null),h=gn(),g=Bu(),b=Co(S=>i||g.filter()===!1?!0:S.search?S.filtered.groups.has(u):!0);xi(()=>g.group(u),[]),ZA(u,d,[e.value,e.heading,f]);let x=y.useMemo(()=>({id:u,forceMount:i}),[i]);return y.createElement(We.div,{ref:Ca(d,t),...s,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},n&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},n),lh(e,S=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?h:void 0},y.createElement(BA.Provider,{value:x},S))))}),o8=y.forwardRef((e,t)=>{let{alwaysRender:n,...a}=e,i=y.useRef(null),s=Co(u=>!u.search);return!n&&!s?null:y.createElement(We.div,{ref:Ca(i,t),...a,"cmdk-separator":"",role:"separator"})}),i8=y.forwardRef((e,t)=>{let{onValueChange:n,...a}=e,i=e.value!=null,s=xy(),u=Co(h=>h.search),d=Co(h=>h.selectedItemId),f=Bu();return y.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),y.createElement(We.input,{ref:t,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":d,id:f.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||s.setState("search",h.target.value),n==null||n(h.target.value)}})}),l8=y.forwardRef((e,t)=>{let{children:n,label:a="Suggestions",...i}=e,s=y.useRef(null),u=y.useRef(null),d=Co(h=>h.selectedItemId),f=Bu();return y.useEffect(()=>{if(u.current&&s.current){let h=u.current,g=s.current,b,x=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let S=h.offsetHeight;g.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(b),x.unobserve(h)}}},[]),y.createElement(We.div,{ref:Ca(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":a,id:f.listId},lh(e,h=>y.createElement("div",{ref:Ca(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),s8=y.forwardRef((e,t)=>{let{open:n,onOpenChange:a,overlayClassName:i,contentClassName:s,container:u,...d}=e;return y.createElement(Rf,{open:n,onOpenChange:a},y.createElement(Af,{container:u},y.createElement(Tf,{"cmdk-overlay":"",className:i}),y.createElement(Df,{"aria-label":e.label,"cmdk-dialog":"",className:s},y.createElement(GA,{ref:t,...d}))))}),u8=y.forwardRef((e,t)=>Co(n=>n.filtered.count===0)?y.createElement(We.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),c8=y.forwardRef((e,t)=>{let{progress:n,children:a,label:i="Loading...",...s}=e;return y.createElement(We.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},lh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Gu=Object.assign(GA,{List:l8,Item:r8,Input:i8,Group:a8,Separator:o8,Dialog:s8,Empty:u8,Loading:c8});function d8(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function f8(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function qA(e){let t=y.useRef(e);return xi(()=>{t.current=e}),t}var xi=typeof window>"u"?y.useEffect:y.useLayoutEffect;function vl(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Co(e){let t=xy(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function ZA(e,t,n,a=[]){let i=y.useRef(),s=Bu();return xi(()=>{var u;let d=(()=>{var h;for(let g of n){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(h=g.current.textContent)==null?void 0:h.trim():i.current}})(),f=a.map(h=>h.trim());s.value(e,d,f),(u=t.current)==null||u.setAttribute(gl,d),i.current=d}),i}var h8=()=>{let[e,t]=y.useState(),n=vl(()=>new Map);return xi(()=>{n.current.forEach(a=>a()),n.current=new Map},[e]),(a,i)=>{n.current.set(a,i),t({})}};function m8(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lh({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(m8(t),{ref:t.ref},n(t.props.children)):n(t)}var p8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function g8({className:e,...t}){return p.jsx(Gu,{"data-slot":"command",className:Se("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function v8({className:e,...t}){return p.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[p.jsx(fv,{className:"size-4 shrink-0 opacity-50"}),p.jsx(Gu.Input,{"data-slot":"command-input",className:Se("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function y8({...e}){return p.jsx(Gu.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function x8({className:e,...t}){return p.jsx(Gu.Group,{"data-slot":"command-group",className:Se("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function b8({className:e,...t}){return p.jsx(Gu.Item,{"data-slot":"command-item",className:Se("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var sh="Popover",[YA,q$]=ea(sh,[To]),qu=To(),[S8,No]=YA(sh),KA=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:i,onOpenChange:s,modal:u=!1}=e,d=qu(t),f=y.useRef(null),[h,g]=y.useState(!1),[b,x]=ui({prop:a,defaultProp:i??!1,onChange:s,caller:sh});return p.jsx(kf,{...d,children:p.jsx(S8,{scope:t,contentId:gn(),triggerRef:f,open:b,onOpenChange:x,onOpenToggle:y.useCallback(()=>x(S=>!S),[x]),hasCustomAnchor:h,onCustomAnchorAdd:y.useCallback(()=>g(!0),[]),onCustomAnchorRemove:y.useCallback(()=>g(!1),[]),modal:u,children:n})})};KA.displayName=sh;var QA="PopoverAnchor",w8=y.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=No(QA,n),s=qu(n),{onCustomAnchorAdd:u,onCustomAnchorRemove:d}=i;return y.useEffect(()=>(u(),()=>d()),[u,d]),p.jsx(Nu,{...s,...a,ref:t})});w8.displayName=QA;var XA="PopoverTrigger",WA=y.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=No(XA,n),s=qu(n),u=St(t,i.triggerRef),d=p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rT(i.open),...a,ref:u,onClick:Te(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?d:p.jsx(Nu,{asChild:!0,...s,children:d})});WA.displayName=XA;var by="PopoverPortal",[E8,_8]=YA(by,{forceMount:void 0}),JA=e=>{const{__scopePopover:t,forceMount:n,children:a,container:i}=e,s=No(by,t);return p.jsx(E8,{scope:t,forceMount:n,children:p.jsx(yr,{present:n||s.open,children:p.jsx(kl,{asChild:!0,container:i,children:a})})})};JA.displayName=by;var Al="PopoverContent",eT=y.forwardRef((e,t)=>{const n=_8(Al,e.__scopePopover),{forceMount:a=n.forceMount,...i}=e,s=No(Al,e.__scopePopover);return p.jsx(yr,{present:a||s.open,children:s.modal?p.jsx(R8,{...i,ref:t}):p.jsx(A8,{...i,ref:t})})});eT.displayName=Al;var C8=xo("PopoverContent.RemoveScroll"),R8=y.forwardRef((e,t)=>{const n=No(Al,e.__scopePopover),a=y.useRef(null),i=St(t,a),s=y.useRef(!1);return y.useEffect(()=>{const u=a.current;if(u)return _f(u)},[]),p.jsx(Mu,{as:C8,allowPinchZoom:!0,children:p.jsx(tT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,u=>{var d;u.preventDefault(),s.current||(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,h=d.button===2||f;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),A8=y.forwardRef((e,t)=>{const n=No(Al,e.__scopePopover),a=y.useRef(!1),i=y.useRef(!1);return p.jsx(tT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,d;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(a.current||(d=n.triggerRef.current)==null||d.focus(),s.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:s=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=s.target;((h=n.triggerRef.current)==null?void 0:h.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),tT=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:g,...b}=e,x=No(Al,n),S=qu(n);return wf(),p.jsx(Du,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(jl,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:g,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:p.jsx(Lf,{"data-state":rT(x.open),role:"dialog",id:x.contentId,...S,...b,ref:t,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),nT="PopoverClose",T8=y.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=No(nT,n);return p.jsx(We.button,{type:"button",...a,ref:t,onClick:Te(e.onClick,()=>i.onOpenChange(!1))})});T8.displayName=nT;var D8="PopoverArrow",M8=y.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=qu(n);return p.jsx(Pf,{...i,...a,ref:t})});M8.displayName=D8;function rT(e){return e?"open":"closed"}var O8=KA,N8=WA,j8=JA,k8=eT;function L8({...e}){return p.jsx(O8,{"data-slot":"popover",...e})}function P8({...e}){return p.jsx(N8,{"data-slot":"popover-trigger",...e})}function z8({className:e,align:t="center",sideOffset:n=4,...a}){return p.jsx(j8,{children:p.jsx(k8,{"data-slot":"popover-content",align:t,sideOffset:n,className:Se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}function F8({options:e,value:t,onValueChange:n,placeholder:a="Select an option",emptyMessage:i="No results found.",className:s,disabled:u=!1}){const[d,f]=y.useState(!1),[h,g]=y.useState(""),b=y.useMemo(()=>{const S={};return e.forEach(w=>{const E=w.group??"";Object.prototype.hasOwnProperty.call(S,E)||(S[E]=[]),S[E].push(w)}),S},[e]),x=e.find(S=>S.value===t);return p.jsxs(L8,{open:d,onOpenChange:f,modal:!0,children:[p.jsx(P8,{asChild:!0,children:p.jsxs(Ft,{variant:"outline",role:"combobox","aria-expanded":d,className:Se("w-full justify-between",!t&&"text-muted-foreground",s),disabled:u,children:[x?x.label:a,p.jsx(lN,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),p.jsx(z8,{className:"max-h-[300px] overflow-auto p-0",align:"start",sideOffset:5,children:p.jsxs(g8,{children:[p.jsx(v8,{placeholder:`Search ${a.toLowerCase()}...`,value:h,onValueChange:g}),p.jsx(y8,{children:i}),Object.entries(b).map(([S,w])=>{const E=h?w.filter(C=>C.label.toLowerCase().includes(h.toLowerCase())):w;return E.length===0?null:p.jsx(x8,{heading:S,children:E.map(C=>p.jsxs(b8,{value:C.value,onSelect:()=>{n(C.value),g(""),f(!1)},children:[p.jsx(Ud,{className:Se("mr-2 h-4 w-4",t===C.value?"opacity-100":"opacity-0")}),C.label]},C.value))},S||"default")})]})})]})}const U8=({form:e})=>{var a,i,s;const{register:t,formState:{errors:n}}=e;return e.watch("type")!==at.GOOGLE_BIGQUERY?null:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-lg font-medium",children:"Connection Settings"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"project-id",className:"block text-sm font-medium text-gray-700",children:["Project ID",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"project-id",type:"text",...t("config.projectId",{required:!0}),className:"mt-1 block w-full"}),n.config&&"projectId"in n.config&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(a=n.config.projectId)==null?void 0:a.message})]}),p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"location",className:"block text-sm font-medium text-gray-700",children:["Location",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(BR,{name:"config.location",control:e.control,defaultValue:"US",rules:{required:!0},render:({field:u})=>p.jsx(F8,{options:Hz,value:u.value,onValueChange:u.onChange,placeholder:"Select a location",emptyMessage:"No locations found",className:"w-full"})}),n.config&&"location"in n.config&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(i=n.config.location)==null?void 0:i.message})]})]})]}),p.jsx(d1,{}),p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),p.jsxs("div",{className:"space-y-1",children:[p.jsxs(Ln,{htmlFor:"service-account-key",className:"block text-sm font-medium text-gray-700",children:["Service Account JSON",p.jsx(li,{children:p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsx(DN,{className:"ml-1.5 inline-block h-4 w-4 cursor-help text-gray-500"})}),p.jsxs(go,{className:"max-w-sm text-sm",children:[p.jsx("p",{children:"A Service Account Key is a JSON credential file that provides authentication to Google BigQuery."}),p.jsx("p",{className:"mt-1",children:"To get one, go to the Google Cloud Console, navigate to IAM & Admin > Service Accounts, create or select a service account, and generate a new JSON key."})]})]})})]}),p.jsx(BC,{value:e.watch("credentials.serviceAccount"),onChange:u=>{e.setValue("credentials.serviceAccount",u)},keysToMask:HC}),n.credentials&&"serviceAccount"in n.credentials&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(s=n.credentials.serviceAccount)==null?void 0:s.message})]})]})]})},I8=({form:e})=>{var a,i,s,u,d;const{register:t,formState:{errors:n}}=e;return e.watch("type")!==at.AWS_ATHENA?null:p.jsx(p.Fragment,{children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-lg font-medium",children:"Connection Settings"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"region",className:"block text-sm font-medium text-gray-700",children:["Region",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"region",type:"text",...t("config.region"),className:"mt-1 block w-full"}),n.config&&"region"in n.config&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(a=n.config.region)==null?void 0:a.message})]}),p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"database-name",className:"block text-sm font-medium text-gray-700",children:["Database Name",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"database-name",type:"text",...t("config.databaseName"),className:"mt-1 block w-full"}),n.config&&"databaseName"in n.config&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(i=n.config.databaseName)==null?void 0:i.message})]}),p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"output-bucket",className:"block text-sm font-medium text-gray-700",children:["Output Bucket",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"output-bucket",type:"text",...t("config.outputBucket"),className:"block w-full"}),n.config&&"outputBucket"in n.config&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(s=n.config.outputBucket)==null?void 0:s.message})]})]})]}),p.jsx(d1,{}),p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"access-key-id",className:"block text-sm font-medium text-gray-700",children:["Access Key ID",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"access-key-id",type:"text",...t("credentials.accessKeyId"),className:"block w-full"}),n.credentials&&"accessKeyId"in n.credentials&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(u=n.credentials.accessKeyId)==null?void 0:u.message})]}),p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"secret-access-key",className:"block text-sm font-medium text-gray-700",children:["Secret Access Key",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"secret-access-key",type:"password",...t("credentials.secretAccessKey"),className:"block w-full"}),n.credentials&&"secretAccessKey"in n.credentials&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n.credentials.secretAccessKey)==null?void 0:d.message})]})]})]})]})})},V8=wn({serviceAccount:Fn().min(1,"Service Account Key is required").transform((e,t)=>{try{const n=JSON.parse(e);return typeof n!="object"?(t.addIssue({code:ge.custom,message:"Service Account must be a valid JSON object"}),hd):n.client_email?n.private_key?e:(t.addIssue({code:ge.custom,message:"Service Account must contain a private_key field"}),hd):(t.addIssue({code:ge.custom,message:"Service Account must contain a client_email field"}),hd)}catch(n){return console.error(n),t.addIssue({code:ge.custom,message:"Service Account must be a valid JSON string"}),hd}})}),$8=wn({accessKeyId:Fn().min(1,"Access Key ID is required"),secretAccessKey:Fn().min(1,"Secret Access Key is required")}),H8=wn({projectId:Fn().min(1,"Project ID is required"),location:Fn().min(1,"Location is required")}),B8=wn({region:Fn().min(1,"Region is required"),outputBucket:Fn().min(1,"Output Bucket is required"),databaseName:Fn().min(1,"Database Name is required")}),aT=wn({title:Fn().min(1,"Title is required").max(255,"Title must be 255 characters or less")}),G8=aT.extend({type:Vl(at.GOOGLE_BIGQUERY),credentials:V8,config:H8}),q8=aT.extend({type:Vl(at.AWS_ATHENA),credentials:$8,config:B8}),Z8=T6("type",[G8,q8]);function Y8({initialData:e,onSubmit:t,onCancel:n}){const a=cy({resolver:dy(Z8),defaultValues:e}),{watch:i,register:s,formState:{errors:u}}=a,d=i("type");return p.jsxs("form",{onSubmit:f=>{f.preventDefault(),a.handleSubmit(t)(f)},className:"space-y-6",children:[p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs(Ln,{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:["Title",p.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}),p.jsx(Xn,{id:"title",type:"text",...s("title"),className:"mt-1 block w-full","aria-required":"true","aria-invalid":!!u.title}),u.title&&p.jsx("p",{className:"mt-1 text-sm text-red-600",children:u.title.message})]}),p.jsxs("div",{children:[p.jsx(Ln,{className:"block text-sm font-medium text-gray-700",children:"Storage Provider"}),p.jsxs(hy,{defaultValue:e==null?void 0:e.type,onValueChange:f=>{a.setValue("type",f)},disabled:!!e,children:[p.jsx(gy,{className:"w-full",children:p.jsx(py,{placeholder:"Select a data storage type"})}),p.jsx(vy,{children:p.jsx(my,{children:_i.getAllTypes().map(({type:f,displayName:h,icon:g})=>p.jsx(su,{value:f,children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(g,{}),h]})},f))})})]})]}),d===at.GOOGLE_BIGQUERY&&p.jsx(U8,{form:a}),d===at.AWS_ATHENA&&p.jsx(I8,{form:a})]}),p.jsxs("div",{className:"flex justify-end space-x-4",children:[p.jsx(Ft,{variant:"ghost",type:"button",onClick:n,children:"Cancel"}),p.jsx(Ft,{variant:"secondary",type:"submit",children:"Save"})]})]})}function oT({isOpen:e,onClose:t,dataStorage:n,onSaveSuccess:a}){const{updateDataStorage:i}=oh(),s=async u=>{if(n){const d=await i(n.id,u);d&&a(d)}t()};return p.jsx(I1,{open:e,onOpenChange:t,children:p.jsxs(V1,{onOpenAutoFocus:u=>{u.preventDefault()},className:"flex h-full min-w-[480px] flex-col",children:[p.jsxs($1,{children:[p.jsx(Wf,{children:"Configure Data Storage Provider"}),p.jsx(Jf,{children:"Customize settings for your data storage provider"})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:p.jsx(Y8,{initialData:n??void 0,onSubmit:s,onCancel:t})})]})})}const K8=({dataStorage:e,onDataStorageChange:t})=>{const[n,a]=y.useState(!1),i=_i.getInfo(e.type),s=()=>{a(!0)},u=()=>{a(!1)},d=()=>{if(!(()=>{switch(e.type){case at.GOOGLE_BIGQUERY:return!!(e.config.projectId&&e.config.location);case at.AWS_ATHENA:return!!(e.config.region&&e.config.databaseName&&e.config.outputBucket);default:return!1}})())return"Data Storage configuration is incomplete";const h=(b,x)=>p.jsxs("span",{children:[p.jsxs("span",{className:"font-semibold",children:[b,":"]})," ",p.jsx("span",{className:"text-muted-foreground",children:x})]}),g=(b,x,S)=>p.jsxs("span",{children:[p.jsxs("span",{className:"font-semibold",children:[b,":"]})," ",p.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",onClick:w=>{w.stopPropagation()},children:[x,p.jsx(xN,{className:"ml-1 inline h-3 w-3","aria-hidden":"true"})]})]});switch(e.type){case at.GOOGLE_BIGQUERY:{const b=e.config.projectId,x=e.config.location,S=`https://console.cloud.google.com/bigquery?project=${b}`;return p.jsxs("div",{className:"flex flex-wrap gap-2",children:[g("Project ID",b,S),p.jsx("span",{className:"text-muted-foreground",children:"•"}),h("Location",x)]})}case at.AWS_ATHENA:{const b=e.config.region,x=e.config.databaseName,S=e.config.outputBucket,w=`https://console.aws.amazon.com/athena/home?region=${b}#/query-editor`,E=`https://s3.console.aws.amazon.com/s3/buckets/${S}?region=${b}`;return p.jsxs("div",{className:"flex flex-wrap gap-2",children:[h("Region",b),p.jsx("span",{className:"text-muted-foreground",children:"•"}),g("Database",x,w),p.jsx("span",{className:"text-muted-foreground",children:"•"}),g("Bucket",S,E)]})}default:return"Unknown storage type configuration"}};return p.jsxs(p.Fragment,{children:[p.jsx(Xv,{}),p.jsx(GV,{title:e.title,icon:i.icon,subtitle:d(),onClick:s}),p.jsx(yy,{children:p.jsx(oT,{isOpen:n,onClose:u,dataStorage:e,onSaveSuccess:f=>{t&&t(f),dn.success("Saved")}})})]})};function Q8({initialType:e,onTypeSelect:t}){var u;const[n,a]=y.useState(e??null),i=d=>{a(d),t(d)},s=[{type:At.SQL,label:"SQL",description:"SQL query"},{type:At.TABLE,label:"Table",description:"Existing table"},{type:At.VIEW,label:"View",description:"Existing view"},{type:At.TABLE_PATTERN,label:"Pattern",description:"Table pattern"}];return p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ln,{children:"Definition Type"}),p.jsxs(hy,{value:n??"",onValueChange:d=>{i(d)},children:[p.jsx(gy,{className:"w-full","aria-label":"Definition Type",children:p.jsx(py,{placeholder:"Select definition type",children:n&&((u=s.find(d=>d.type===n))==null?void 0:u.label)})}),p.jsx(vy,{children:p.jsx(my,{children:s.map(d=>p.jsxs(su,{value:d.type,children:[d.label,p.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",d.description,")"]})]},d.type))})})]})]})}const X8=wn({definitionType:Vl(At.SQL),definition:wn({sqlQuery:Fn().min(1,"SQL query is required")})}),W8=e=>{const t=XC(e);return wn({definitionType:Vl(At.TABLE),definition:t})},J8=e=>{const t=XC(e);return wn({definitionType:Vl(At.VIEW),definition:t})},e$=e=>{const t=O6(e);return wn({definitionType:Vl(At.TABLE_PATTERN),definition:t})},t$=(e,t)=>{if(!e)return wn({definitionType:M6(D6(At)),definition:wn({}).optional()});switch(e){case At.SQL:return X8;case At.TABLE:return W8(t);case At.VIEW:return J8(t);case At.TABLE_PATTERN:return e$(t);default:return wn({})}},iT=y.createContext({}),uh=({...e})=>p.jsx(iT.Provider,{value:{name:e.name},children:p.jsx(BR,{...e})}),ch=()=>{const e=y.useContext(iT),t=y.useContext(lT),{getFieldState:n}=$u(),a=$R({name:e.name}),i=n(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},lT=y.createContext({});function dh({className:e,...t}){const n=y.useId();return p.jsx(lT.Provider,{value:{id:n},children:p.jsx("div",{"data-slot":"form-item",className:Se("grid gap-2",e),...t})})}function fh({className:e,...t}){const{error:n,formItemId:a}=ch();return p.jsx(Ln,{"data-slot":"form-label","data-error":!!n,className:Se("data-[error=true]:text-destructive",e),htmlFor:a,...t})}function hh({...e}){const{error:t,formItemId:n,formDescriptionId:a,formMessageId:i}=ch();return p.jsx(Sf,{"data-slot":"form-control",id:n,"aria-describedby":t?`${a} ${i}`:`${a}`,"aria-invalid":!!t,...e})}function Sy({className:e,...t}){const{formDescriptionId:n}=ch();return p.jsx("p",{"data-slot":"form-description",id:n,className:Se("text-muted-foreground text-sm",e),...t})}function mh({className:e,...t}){const{error:n,formMessageId:a}=ch(),i=n?String((n==null?void 0:n.message)??""):t.children;return i?p.jsx("p",{"data-slot":"form-message",id:a,className:Se("text-destructive text-sm",e),...t,children:i}):null}function n$({control:e}){return p.jsx(uh,{control:e,name:"definition.sqlQuery",render:({field:t})=>p.jsxs(dh,{children:[p.jsx(fh,{children:"SQL Query"}),p.jsx(hh,{children:p.jsx(BV,{initialValue:{sqlQuery:t.value},onChange:n=>{t.onChange(n.sqlQuery)}})}),p.jsx(mh,{})]})})}function r$({control:e,storageType:t}){const n=GC(t),a=qC(t);return p.jsx(uh,{control:e,name:"definition.fullyQualifiedName",render:({field:i})=>p.jsxs(dh,{children:[p.jsx(fh,{children:"Fully Qualified Table Name"}),p.jsx(hh,{children:p.jsx(Xn,{placeholder:n,value:i.value||"",onChange:i.onChange})}),p.jsx(Sy,{children:a}),p.jsx(mh,{})]})})}function a$({control:e,storageType:t}){const n=GC(t),a=qC(t);return p.jsx(uh,{control:e,name:"definition.fullyQualifiedName",render:({field:i})=>p.jsxs(dh,{children:[p.jsx(fh,{children:"Fully Qualified View Name"}),p.jsx(hh,{children:p.jsx(Xn,{placeholder:n,value:i.value||"",onChange:i.onChange})}),p.jsx(Sy,{children:a}),p.jsx(mh,{})]})})}function o$({control:e,storageType:t}){const n=t6(t),a=n6(t);return p.jsx(uh,{control:e,name:"definition.pattern",render:({field:i})=>p.jsxs(dh,{children:[p.jsx(fh,{children:"Table Pattern"}),p.jsx(hh,{children:p.jsx(Xn,{placeholder:n,value:i.value||"",onChange:i.onChange})}),p.jsx(Sy,{children:a}),p.jsx(mh,{})]})})}function i$({definitionType:e,storageType:t}){const{control:n}=$u();return p.jsxs("div",{className:"space-y-6",children:[e===At.SQL&&p.jsx(n$,{control:n}),e===At.TABLE&&p.jsx(r$,{control:n,storageType:t}),e===At.VIEW&&p.jsx(a$,{control:n,storageType:t}),e===At.TABLE_PATTERN&&p.jsx(o$,{control:n,storageType:t})]})}const l$=e=>{switch(e){case At.SQL:return{sqlQuery:"-- Start writing your SQL query here..."};case At.TABLE:return{fullyQualifiedName:""};case At.VIEW:return{fullyQualifiedName:""};case At.TABLE_PATTERN:return{pattern:""};default:return{}}};function s$(){const{dataMart:e,updateDataMartDefinition:t}=LE();if(!e)throw new Error("Data mart not found");const{definitionType:n,definition:a,id:i,storage:{type:s}}=e,[u,d]=y.useState(n),f=y.useCallback(()=>{if(!u)return;const j={definitionType:u,definition:l$(u)};return a?{definitionType:u,definition:a}:j},[u,a]),g=cy({resolver:(()=>{if(!u)return;const j=t$(u,s);return dy(j)})(),defaultValues:f(),mode:"onChange"}),{handleSubmit:b,reset:x,formState:{isDirty:S,isValid:w}}=g;y.useEffect(()=>{u&&x(f())},[u,x,f]);const E=j=>{d(j)},C=async j=>{if(u&&i)try{await t(i,j.definitionType,j.definition),x(j)}catch(O){console.error("Failed to update data mart definition:",O)}},R=j=>{j.preventDefault(),b(C)(j)},T=()=>{x(f())},D=()=>u?p.jsxs("form",{onSubmit:R,className:"space-y-6",children:[p.jsx(i$,{definitionType:u,storageType:s}),p.jsxs("div",{className:"flex justify-start space-x-4",children:[p.jsx(Ft,{variant:"secondary",type:"submit",disabled:!S||!w,children:"Save"}),p.jsx(Ft,{type:"button",variant:"ghost",onClick:T,disabled:!S,children:"Discard"})]})]}):null;return p.jsx(xU,{...g,children:p.jsxs("div",{className:"space-y-6",children:[!n&&p.jsx(Q8,{initialType:u,onTypeSelect:E}),D()]})})}function u$(){const{id:e}=UM();return e?p.jsx("main",{className:"container mx-auto",children:p.jsx("div",{children:p.jsx(zR,{children:p.jsx(PI,{id:e})})})}):p.jsx("div",{children:"Data Mart ID is required"})}function sT({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Se("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function uT({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Se("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function cT({className:e,...t}){return p.jsx("div",{"data-slot":"card-title",className:Se("leading-none font-semibold",e),...t})}function dT({className:e,...t}){return p.jsx("div",{"data-slot":"card-description",className:Se("text-muted-foreground text-sm",e),...t})}function fT({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Se("px-6",e),...t})}function c$({className:e,...t}){return p.jsx("div",{"data-slot":"card-footer",className:Se("flex items-center px-6 [.border-t]:pt-6",e),...t})}const hT=y.createContext({isCollapsed:!1,collapsible:!1,handleCollapse:()=>{throw new Error("CollapsibleCardContext: handleCollapse not implemented")}});function wu({icon:e,title:t,subtitle:n,help:a,actions:i}){const{collapsible:s,isCollapsed:u,handleCollapse:d}=y.useContext(hT);return p.jsxs(uT,{className:Se("group flex items-start justify-between gap-4 px-4 py-4",s&&"cursor-pointer"),onClick:s?d:void 0,children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"text-foreground flex h-7 w-7 items-center justify-center rounded-sm bg-gray-200/50 transition-colors duration-200 group-hover:bg-gray-200/75 dark:bg-gray-700/50 dark:group-hover:bg-gray-700/75",children:p.jsx(e,{className:"h-4 w-4",strokeWidth:2.25})}),p.jsx(cT,{className:"text-md text-foreground leading-none font-medium",children:t})]}),n&&p.jsx(dT,{className:Se("text-md text-muted-foreground/50",!u&&"hidden"),children:n}),a&&p.jsx(li,{children:p.jsxs(mo,{children:[p.jsx(po,{asChild:!0,children:p.jsxs("div",{className:"pointer-events-none ml-2 flex items-center opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100",children:[p.jsx(dN,{className:"text-muted-foreground/50 h-4 w-4"}),p.jsx("span",{className:"sr-only",children:a})]})}),p.jsx(go,{children:p.jsx("p",{children:a})})]})})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[i,s&&p.jsx("div",{className:Se("flex h-7 w-7 items-center justify-center rounded-full transition-colors duration-200 group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/25"),children:p.jsx("div",{className:Se("transform transition-transform duration-200",u?"rotate-0":"rotate-180"),children:p.jsx(Ml,{className:"text-muted-foreground/75 dark:text-muted-foreground/50 h-4 w-4"})})})]})]})}wu.displayName="CollapsibleCardHeader";function Eu({children:e}){return p.jsx(fT,{className:"px-4 pt-1",children:e})}Eu.displayName="CollapsibleCardContent";function _u({left:e,right:t}){return p.jsxs(c$,{className:"flex items-center gap-2 px-4 py-4",children:[p.jsx("div",{className:"flex flex-grow items-center gap-2",children:e}),t&&p.jsx("div",{className:"flex items-center",children:t})]})}_u.displayName="CollapsibleCardFooter";function mT({children:e}){return p.jsx("div",{className:"flex gap-2",children:e})}mT.displayName="CollapsibleCardActions";const dE="collapsed-card-";function ev({children:e,className:t,variant:n="default",collapsible:a=!1,defaultCollapsed:i=!1,onCollapsedChange:s,name:u}){const d=u?Kd.get(`${dE}${u}`,"boolean")??i:i,[f,h]=y.useState(d);y.useEffect(()=>{u&&Kd.set(`${dE}${u}`,f)},[f,u]);const g=()=>{const C=!f;h(C),s==null||s(C)};let b,x,S,w;y.Children.forEach(e,C=>{if(y.isValidElement(C))switch(C.type){case wu:b=C;break;case Eu:x=C;break;case _u:S=C;break;case mT:w=C;break}});const E={default:"rounded-xl bg-muted/50 p-0 gap-0 border-0 border-b border-gray-200 dark:border-white/10 shadow-none",dense:"rounded-xl bg-muted/50 p-0 gap-0 border-0 border-b border-gray-200 dark:border-white/10 shadow-none text-sm",flat:"rounded-xl bg-muted/50 p-0 gap-0 border-0 border-b-0 shadow-none"};return p.jsx(hT.Provider,{value:{isCollapsed:f,collapsible:a,handleCollapse:g},children:p.jsxs(sT,{className:Se(E[n],t),children:[b,w,p.jsx("div",{className:Se("grid transition-all duration-200",f?"grid-rows-[0fr]":"grid-rows-[1fr]"),children:p.jsxs("div",{className:"overflow-hidden",children:[x,S]})})]})})}function d$(){const{dataMart:e,updateDataMartStorage:t}=eh();return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs(ev,{collapsible:!0,name:"data-storage",children:[p.jsx(wu,{icon:KE,title:"Data Storage",subtitle:"Configure where your data will be stored"}),p.jsx(Eu,{children:(e==null?void 0:e.storage)&&p.jsx(K8,{dataStorage:e.storage,onDataStorageChange:t})}),p.jsx(_u,{})]}),p.jsxs(ev,{collapsible:!0,name:"input-source",children:[p.jsx(wu,{icon:hN,title:"Input Source",subtitle:"Configure how to extract data from your data warehouse"}),p.jsx(Eu,{children:e&&p.jsx(s$,{})}),p.jsx(_u,{})]})]})}function f$(){const{dataMart:e}=eh();return p.jsxs(sT,{children:[p.jsxs(uT,{children:[p.jsx(cT,{children:"Destinations"}),p.jsx(dT,{children:e==null?void 0:e.title})]}),p.jsx(fT,{children:"👋 Available on the Enterprise plan"})]})}function fE(){return p.jsxs(ev,{children:[p.jsx(wu,{icon:JO,title:"Description"}),p.jsx(Eu,{children:p.jsx(FI,{})}),p.jsx(_u,{})]})}function h$(){const e=Ru(),t=n=>{e(`/data-marts/${n.id}/data-setup`)};return p.jsxs("main",{className:"container mx-auto px-4 py-8",children:[p.jsx("div",{className:"mb-6 flex items-center justify-between",children:p.jsx("h1",{className:"text-2xl font-bold",children:"Create Data Mart"})}),p.jsx("div",{className:"rounded-lg p-6 shadow",children:p.jsx(yy,{children:p.jsx(zR,{children:p.jsx(kI,{initialData:{title:"New Data Mart"},onSuccess:t})})})})]})}function pT({isOpen:e,onClose:t,id:n}){const{getDataStorageById:a,currentDataStorage:i,loading:s,clearCurrentDataStorage:u}=oh();y.useEffect(()=>(e&&n&&a(n),()=>{e||u()}),[e,n,a,u]);const d=()=>{u(),t()};return p.jsx(Wv,{open:e,onOpenChange:f=>{f||d()},children:p.jsxs(Jv,{children:[p.jsxs(ey,{children:[p.jsx(Wf,{children:"Data Storage Details"}),p.jsx(Jf,{children:"View detailed information about this data storage."})]}),p.jsx("div",{className:"py-4",children:p.jsx(Qz,{dataStorage:i,isLoading:s})})]})})}function sg({column:e,children:t}){return p.jsxs(Ft,{variant:"ghost",onClick:()=>{e.toggleSorting(e.getIsSorted()==="asc")},className:"px-4 hover:bg-gray-200",children:[t,p.jsx(YE,{"data-testid":"lucide-arrow-up-down",className:`ml-2 h-4 w-4 transition-opacity ${e.getIsSorted()?"opacity-100":"opacity-0 group-hover/header:opacity-70"}`})]})}const m$=({onViewDetails:e,onEdit:t,onDelete:n}={})=>[{accessorKey:"title",header:({column:a})=>p.jsx("div",{className:"group/header",children:p.jsx(sg,{column:a,children:"Title"})}),cell:({row:a})=>{const i=a.getValue("title");return p.jsx("div",{className:"overflow-hidden text-ellipsis",children:i})}},{accessorKey:"type",header:({column:a})=>p.jsx("div",{className:"group/header",children:p.jsx(sg,{column:a,children:"Type"})}),cell:({row:a})=>{const i=a.getValue("type"),{displayName:s,icon:u}=_i.getInfo(i);return p.jsxs(Qd,{variant:"secondary",className:"flex items-center gap-2",children:[p.jsx(u,{}),s]})}},{accessorKey:"createdAt",sortDescFirst:!0,header:({column:a})=>p.jsx("div",{className:"group/header",children:p.jsx(sg,{column:a,children:"Created at"})}),cell:({row:a})=>{const i=a.getValue("createdAt"),s=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(i);return p.jsx("div",{children:s})}},{id:"actions",cell:({row:a})=>{const i=a.original.id;return p.jsx("div",{className:"actions-cell text-right",children:p.jsxs(zl,{children:[p.jsx(Fl,{asChild:!0,children:p.jsxs(Ft,{variant:"ghost",className:"h-8 w-8 p-0",children:[p.jsx("span",{className:"sr-only",children:"Open menu"}),p.jsx(QE,{className:"h-4 w-4"})]})}),p.jsxs(Ei,{align:"end",children:[p.jsx(Qr,{onClick:()=>e==null?void 0:e(i),children:"View details"}),p.jsx(Qr,{onClick:()=>void(t==null?void 0:t(i)),children:"Edit"}),p.jsx($f,{}),p.jsx(Qr,{onClick:()=>n==null?void 0:n(i),className:"text-red-600",children:"Delete"})]})]})})}}];function p$({columns:e,data:t,onViewDetails:n}){var T;const[a,i]=y.useState([{id:"createdAt",desc:!1}]),[s,u]=y.useState([]),[d,f]=y.useState({}),[h,g]=y.useState({}),[b,x]=y.useState(!1),[S,w]=y.useState(null),E=hR({data:t,columns:[...e],getCoreRowModel:uR(),getPaginationRowModel:dR(),onSortingChange:i,getSortedRowModel:fR(),onColumnFiltersChange:u,getFilteredRowModel:cR(),onColumnVisibilityChange:f,onRowSelectionChange:g,state:{sorting:a,columnFilters:s,columnVisibility:d,rowSelection:h},enableRowSelection:!0}),C=D=>{const j=t.find(O=>O.id===D);w(j),x(!0),n==null||n(D)},R=(D,j)=>{j.target instanceof HTMLElement&&(j.target.closest('[role="checkbox"]')||j.target.closest(".actions-cell")||j.target.closest('[role="menuitem"]'))||C(D)};return p.jsxs("div",{children:[S&&p.jsx(pT,{isOpen:b,onClose:()=>{x(!1)},id:S.id}),p.jsxs("div",{className:"flex items-center pb-4",children:[p.jsxs("div",{className:"relative w-sm",children:[p.jsx(fv,{className:"text-muted-foreground absolute top-2.5 left-2 h-4 w-4"}),p.jsx(Xn,{placeholder:"Search by title",value:(T=E.getColumn("title"))==null?void 0:T.getFilterValue(),onChange:D=>{var j;return(j=E.getColumn("title"))==null?void 0:j.setFilterValue(D.target.value)},className:"pl-8"})]}),p.jsxs(zl,{children:[p.jsx(Fl,{asChild:!0,children:p.jsxs(Ft,{variant:"outline",className:"ml-auto font-normal",children:["Show columns ",p.jsx(Ml,{className:"ml-2 h-4 w-4"})]})}),p.jsx(Ei,{align:"end",children:E.getAllColumns().filter(D=>D.getCanHide()).map(D=>p.jsx(Qr,{className:"capitalize",children:p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"checkbox",checked:D.getIsVisible(),onChange:j=>{D.toggleVisibility(j.target.checked)},className:"h-4 w-4"}),p.jsx("span",{children:D.id})]})},D.id))})]})]}),p.jsx("div",{className:"w-full rounded-md border",children:p.jsxs(mR,{children:[p.jsx(pR,{className:"bg-muted",children:E.getHeaderGroups().map(D=>p.jsx(wl,{children:D.headers.map(j=>p.jsx(vR,{className:"[&:has([role=checkbox])]:pl-5 [&>[role=checkbox]]:translate-y-[2px]",children:j.isPlaceholder?null:sf(j.column.columnDef.header,j.getContext())},j.id))},D.id))}),p.jsx(gR,{children:E.getRowModel().rows.length?E.getRowModel().rows.map(D=>p.jsx(wl,{"data-state":D.getIsSelected()&&"selected",className:"hover:bg-muted/50 cursor-pointer",onClick:j=>{const O=D.original.id;R(O,j)},children:D.getVisibleCells().map(j=>p.jsx(uf,{className:`[&:has([role=checkbox])]pr-0 px-5 whitespace-normal [&>[role=checkbox]]:translate-y-[2px] ${j.column.id==="actions"?"actions-cell":""}`,children:sf(j.column.columnDef.cell,j.getContext())},j.id))},D.id)):p.jsx(wl,{children:p.jsx(uf,{colSpan:e.length+1,className:"h-24 text-center",children:"No results."})})})]})}),p.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[p.jsx(Ft,{variant:"outline",size:"sm",onClick:()=>{E.previousPage()},disabled:!E.getCanPreviousPage(),children:"Previous"}),p.jsx(Ft,{variant:"outline",size:"sm",onClick:()=>{E.nextPage()},disabled:!E.getCanNextPage(),children:"Next"})]})]})}const g$=({isOpen:e,onClose:t,onSelect:n})=>p.jsx(Wv,{open:e,onOpenChange:t,children:p.jsxs(Jv,{className:"sm:max-w-md",children:[p.jsxs(ey,{children:[p.jsx(Wf,{children:"New Data Storage"}),p.jsx(Jf,{children:"Choose the type of data storage you want to create"})]}),p.jsx("div",{className:"grid grid-cols-2 gap-4 py-4",children:_i.getAllTypes().map(a=>{const i=a.icon;return p.jsxs(Ft,{variant:"outline",className:"flex flex-row items-center justify-start gap-3 p-6",onClick:()=>void n(a.type),children:[p.jsx(i,{size:32}),p.jsx("span",{className:"font-medium",children:a.displayName})]},a.type)})})]})}),v$=({initialTypeDialogOpen:e=!1,onTypeDialogClose:t})=>{const[n,a]=y.useState(e),{dataStorages:i,currentDataStorage:s,clearCurrentDataStorage:u,loading:d,error:f,fetchDataStorages:h,getDataStorageById:g,deleteDataStorage:b,createDataStorage:x}=oh();y.useEffect(()=>{h()},[h]),y.useEffect(()=>{a(e)},[e]);const S=()=>{a(!1),t==null||t()},[w,E]=y.useState(!1),[C,R]=y.useState(!1),[T,D]=y.useState(null),[j,O]=y.useState(!1),[M,I]=y.useState(null),Z=async q=>{try{const V=await x(q);S(),V!=null&&V.id&&(await g(V.id),E(!0))}catch(V){console.error("Failed to create data storage:",V)}};if(y.useEffect(()=>{h()},[h]),d)return p.jsx("div",{className:"py-4",children:"Loading data storages..."});if(f)return p.jsxs("div",{className:"py-4 text-red-500",children:["Error: ",f]});const ee=q=>{I(q),O(!0)},se=()=>{O(!1),I(null)},ye=async q=>{await g(q),E(!0)},me=q=>{D(q),R(!0)},ve=async()=>{if(T)try{await b(T),await h()}catch(q){console.error("Failed to delete data storage:",q)}finally{R(!1),D(null)}},ce=()=>{E(!1),u()},te=i.map(q=>({id:q.id,title:q.title,type:q.type,createdAt:q.createdAt,modifiedAt:q.modifiedAt})),k=m$({onViewDetails:ee,onEdit:ye,onDelete:me});return p.jsxs("div",{children:[p.jsx(p$,{columns:k,data:te}),p.jsx(pT,{isOpen:j,onClose:se,id:M??""}),p.jsx(g$,{isOpen:n,onClose:S,onSelect:Z}),p.jsx(oT,{isOpen:w,onClose:ce,dataStorage:s,onSaveSuccess:()=>{}}),p.jsx(ty,{open:C,onOpenChange:R,title:"Delete Data Storage",description:"Are you sure you want to delete this data storage? This action cannot be undone.",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>{ve()},onCancel:()=>{D(null)},variant:"destructive"})]})},y$=()=>{const[e,t]=y.useState(!1);return p.jsxs("div",{children:[p.jsxs("header",{className:"flex items-center justify-between px-12 pt-6 pb-4",children:[p.jsx("h1",{className:"text-2xl font-medium",children:"Data Storages"}),p.jsxs(Ft,{variant:"secondary",size:"sm",onClick:()=>{t(!0)},children:[p.jsx(dv,{className:"mr-2 h-4 w-4"}),"New Data Storage"]})]}),p.jsx("div",{className:"px-4 sm:px-12",children:p.jsx(yy,{children:p.jsx(v$,{initialTypeDialogOpen:e,onTypeDialogClose:()=>{t(!1)}})})})]})},x$=[{path:"overview",element:p.jsx(fE,{})},{path:"data-setup",element:p.jsx(d$,{})},{path:"destinations",element:p.jsx(f$,{})},{index:!0,element:p.jsx(fE,{})}],b$=[{path:"/",element:p.jsx(Dz,{}),children:[{index:!0,element:p.jsx(aO,{to:"/data-marts",replace:!0})},{path:"about",element:p.jsx(Mz,{})},{path:"data-marts",element:p.jsx(XF,{})},{path:"data-marts/create",element:p.jsx(h$,{})},{path:"data-marts/:id",element:p.jsx(u$,{}),children:x$},{path:"data-storages",element:p.jsx(y$,{})},{path:"*",element:p.jsx(Oz,{})}]}];function S$(){const e=DO(b$);return p.jsx(VO,{router:e})}const gT=document.getElementById("root");if(!gT)throw new Error("Root element not found");jD.createRoot(gT).render(p.jsx(y.StrictMode,{children:p.jsx(S$,{})}));