ocean-brain 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +113 -0
  2. package/dist/mcp.js +230 -291
  3. package/package.json +6 -5
  4. package/server/client/dist/assets/ArrowRight.es-g2YZTklZ.js +1 -0
  5. package/server/client/dist/assets/Calendar-BP6HTuSn.js +25 -0
  6. package/server/client/dist/assets/Callout-B_IPSF_5.js +1 -0
  7. package/server/client/dist/assets/Copy.es-CNxe4ujr.js +1 -0
  8. package/server/client/dist/assets/Graph-D9GeO71k.js +1 -0
  9. package/server/client/dist/assets/Graph-Xha3fwhp.js +46 -0
  10. package/server/client/dist/assets/Image-BLEjLUqd.js +1 -0
  11. package/server/client/dist/assets/Image.es-DnON8cv2.js +1 -0
  12. package/server/client/dist/assets/Note-DjrCYtat.js +24 -0
  13. package/server/client/dist/assets/NotePropertiesPanel-2DgXEM4B.js +2 -0
  14. package/server/client/dist/assets/Plus.es-CQ8wn2is.js +1 -0
  15. package/server/client/dist/assets/Reminders-B4l3KdlK.js +1 -0
  16. package/server/client/dist/assets/Search-BN5sf7bE.js +1 -0
  17. package/server/client/dist/assets/SurfaceCard-BZm73nyS.js +1 -0
  18. package/server/client/dist/assets/Tag-oSnmViVp.js +1 -0
  19. package/server/client/dist/assets/TagNotes-BDTCcJcL.js +1 -0
  20. package/server/client/dist/assets/Trash.es-0aPpA-3S.js +1 -0
  21. package/server/client/dist/assets/ViewNotes-CiZtGJNE.js +1 -0
  22. package/server/client/dist/assets/{ViewSectionDialog-CzskgmMF.js → ViewSectionDialog-Ctl_694Y.js} +17 -17
  23. package/server/client/dist/assets/Views-D-zlatYD.js +1 -0
  24. package/server/client/dist/assets/app-DmqIOMWF.css +1 -0
  25. package/server/client/dist/assets/app-cTRcKMGc.js +26 -0
  26. package/server/client/dist/assets/floating-ui.react-dom-wWLZ1CdM.js +1 -0
  27. package/server/client/dist/assets/{image.api-8dlMwzMd.js → image.api-CVuuvTBk.js} +1 -1
  28. package/server/client/dist/assets/index-DKJChPr4.js +1 -0
  29. package/server/client/dist/assets/manage-image-BZjaxp-f.js +1 -0
  30. package/server/client/dist/assets/manage-image-detail-DPv0FQ2m.js +1 -0
  31. package/server/client/dist/assets/{mcp-EDurbggR.js → mcp-CT_9IV2c.js} +2 -2
  32. package/server/client/dist/assets/mcp-admin-adapter-xAuyZc_M.js +1 -0
  33. package/server/client/dist/assets/note-core-Buwzyxi7.js +13 -0
  34. package/server/client/dist/assets/note-runtime-CPDVOFEo.js +168 -0
  35. package/server/client/dist/assets/note-ui-CHI-tzj-.js +2 -0
  36. package/server/client/dist/assets/{index-BEUqDuAZ.css → note-ui-DL8owV-U.css} +1 -1
  37. package/server/client/dist/assets/note.api-D_00ZzJC.js +356 -0
  38. package/server/client/dist/assets/{placeholder-DeKgSBnC.js → placeholder-DbdGiYGL.js} +4 -4
  39. package/server/client/dist/assets/preload-helper-BXl3LOEh.js +1 -0
  40. package/server/client/dist/assets/properties-D447wsWk.js +1 -0
  41. package/server/client/dist/assets/route-preload.js +2 -0
  42. package/server/client/dist/assets/{tag.api-Dl8DQd0m.js → tag.api-CX0SE06J.js} +1 -1
  43. package/server/client/dist/assets/time-B3pt8vt4.js +9 -0
  44. package/server/client/dist/assets/trash-8sH7EZgc.js +1 -0
  45. package/server/client/dist/assets/url-BSnWpmJx.js +1 -0
  46. package/server/client/dist/assets/{useReminderMutate-CoXXqJY2.js → useReminderMutate-CLK1tHvT.js} +4 -4
  47. package/server/client/dist/index.html +10 -5
  48. package/server/dist/app.js +1 -2
  49. package/server/dist/features/auth/http/api.js +0 -1
  50. package/server/dist/features/auth/http/login-page.js +272 -5
  51. package/server/dist/features/auth/http/pages.js +20 -3
  52. package/server/dist/features/auth/service.js +3 -2
  53. package/server/dist/features/cache/graphql/cache.field.resolver.js +0 -1
  54. package/server/dist/features/cache/graphql/cache.mutation.resolver.js +0 -1
  55. package/server/dist/features/cache/graphql/cache.query.resolver.js +0 -1
  56. package/server/dist/features/cache/graphql/cache.resolver.js +0 -1
  57. package/server/dist/features/cache/graphql/cache.type-defs.js +0 -1
  58. package/server/dist/features/cache/graphql/index.js +0 -1
  59. package/server/dist/features/image/graphql/image.field.resolver.js +0 -1
  60. package/server/dist/features/image/graphql/image.mutation.resolver.js +0 -1
  61. package/server/dist/features/image/graphql/image.query.resolver.js +0 -1
  62. package/server/dist/features/image/graphql/image.resolver.js +0 -1
  63. package/server/dist/features/image/graphql/image.type-defs.js +0 -1
  64. package/server/dist/features/image/graphql/index.js +0 -1
  65. package/server/dist/features/image/http/upload.js +0 -1
  66. package/server/dist/features/image/services/delete.js +0 -1
  67. package/server/dist/features/image/services/upload.js +0 -1
  68. package/server/dist/features/image/services/validation.js +0 -1
  69. package/server/dist/features/mcp-admin/http/handlers.js +0 -1
  70. package/server/dist/features/mcp-admin/service.js +0 -1
  71. package/server/dist/features/note/graphql/index.js +0 -1
  72. package/server/dist/features/note/graphql/note.field.resolver.js +0 -1
  73. package/server/dist/features/note/graphql/note.mutation.resolver.js +0 -1
  74. package/server/dist/features/note/graphql/note.query.resolver.js +0 -1
  75. package/server/dist/features/note/graphql/note.resolver.js +0 -1
  76. package/server/dist/features/note/graphql/note.type-defs.js +0 -1
  77. package/server/dist/features/note/http/mcp.js +0 -1
  78. package/server/dist/features/note/services/authoring.js +0 -1
  79. package/server/dist/features/note/services/cleanup.js +0 -1
  80. package/server/dist/features/note/services/content-blocks.js +0 -1
  81. package/server/dist/features/note/services/markdown-intent-write.js +0 -1
  82. package/server/dist/features/note/services/markdown-patch.js +0 -1
  83. package/server/dist/features/note/services/properties.js +0 -1
  84. package/server/dist/features/note/services/search-backfill.js +0 -1
  85. package/server/dist/features/note/services/search.js +0 -1
  86. package/server/dist/features/note/services/snapshot.js +0 -1
  87. package/server/dist/features/note/services/tag-filter.js +0 -1
  88. package/server/dist/features/note/services/trash.js +0 -1
  89. package/server/dist/features/note/services/write-conflict.js +0 -1
  90. package/server/dist/features/note/services/write.js +0 -1
  91. package/server/dist/features/placeholder/graphql/index.js +0 -1
  92. package/server/dist/features/placeholder/graphql/placeholder.field.resolver.js +0 -1
  93. package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js +0 -1
  94. package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js +0 -1
  95. package/server/dist/features/placeholder/graphql/placeholder.resolver.js +0 -1
  96. package/server/dist/features/placeholder/graphql/placeholder.type-defs.js +0 -1
  97. package/server/dist/features/reminder/graphql/index.js +0 -1
  98. package/server/dist/features/reminder/graphql/reminder.field.resolver.js +0 -1
  99. package/server/dist/features/reminder/graphql/reminder.mutation.resolver.js +0 -1
  100. package/server/dist/features/reminder/graphql/reminder.query.resolver.js +0 -1
  101. package/server/dist/features/reminder/graphql/reminder.resolver.js +0 -1
  102. package/server/dist/features/reminder/graphql/reminder.type-defs.js +0 -1
  103. package/server/dist/features/tag/graphql/index.js +0 -1
  104. package/server/dist/features/tag/graphql/tag.field.resolver.js +0 -1
  105. package/server/dist/features/tag/graphql/tag.mutation.resolver.js +0 -1
  106. package/server/dist/features/tag/graphql/tag.query.resolver.js +0 -1
  107. package/server/dist/features/tag/graphql/tag.resolver.js +0 -1
  108. package/server/dist/features/tag/graphql/tag.type-defs.js +0 -1
  109. package/server/dist/features/tag/http/mcp.js +0 -1
  110. package/server/dist/features/tag/services/organization.js +0 -1
  111. package/server/dist/features/view/graphql/index.js +0 -1
  112. package/server/dist/features/view/graphql/view.mutation.resolver.js +0 -1
  113. package/server/dist/features/view/graphql/view.query.resolver.js +0 -1
  114. package/server/dist/features/view/graphql/view.resolver.js +0 -1
  115. package/server/dist/features/view/graphql/view.type-defs.js +0 -1
  116. package/server/dist/features/view/services/workspace.js +0 -1
  117. package/server/dist/main.js +0 -1
  118. package/server/dist/models.js +0 -1
  119. package/server/dist/modules/app-version.js +0 -1
  120. package/server/dist/modules/auth-guard.js +0 -1
  121. package/server/dist/modules/auth-mode.js +0 -1
  122. package/server/dist/modules/auth-redirect.js +0 -1
  123. package/server/dist/modules/blocknote-markdown-editor.js +53 -0
  124. package/server/dist/modules/blocknote-tree.js +0 -1
  125. package/server/dist/modules/blocknote.js +272 -79
  126. package/server/dist/modules/data-maintenance.js +0 -1
  127. package/server/dist/modules/error-handler.js +8 -1
  128. package/server/dist/modules/graphql.js +0 -1
  129. package/server/dist/modules/logger.js +0 -1
  130. package/server/dist/modules/mcp-auth.js +0 -1
  131. package/server/dist/modules/mcp-token.js +0 -1
  132. package/server/dist/modules/prisma-runtime.js +0 -1
  133. package/server/dist/modules/rate-limit.js +0 -1
  134. package/server/dist/modules/recovery-retention.js +0 -1
  135. package/server/dist/modules/server-events-handler.js +0 -1
  136. package/server/dist/modules/server-events.js +0 -1
  137. package/server/dist/modules/session-store.js +0 -1
  138. package/server/dist/modules/use-async.js +0 -1
  139. package/server/dist/paths.js +0 -1
  140. package/server/dist/routes/api.js +0 -1
  141. package/server/dist/routes/auth-pages.js +0 -1
  142. package/server/dist/routes/client.js +0 -1
  143. package/server/dist/routes/graphql.js +0 -1
  144. package/server/dist/routes/index.js +0 -1
  145. package/server/dist/routes/mcp.js +0 -1
  146. package/server/dist/schema/index.js +0 -1
  147. package/server/dist/start.js +0 -1
  148. package/server/dist/types/index.js +0 -1
  149. package/server/dist/types/input.js +0 -1
  150. package/server/client/dist/assets/ArrowRight.es-C4zlc54Z.js +0 -1
  151. package/server/client/dist/assets/Calendar-COrN6Hjv.js +0 -25
  152. package/server/client/dist/assets/Callout-BK0K9E74.js +0 -1
  153. package/server/client/dist/assets/Copy.es-zm8f_XXX.js +0 -1
  154. package/server/client/dist/assets/Graph-BH1fzhue.js +0 -1
  155. package/server/client/dist/assets/Image-KXuHOG4b.js +0 -1
  156. package/server/client/dist/assets/Image.es-BKahRbIm.js +0 -1
  157. package/server/client/dist/assets/Note-C143cKKw.js +0 -12
  158. package/server/client/dist/assets/Plus.es-BqeC8T8h.js +0 -1
  159. package/server/client/dist/assets/Reminders-BYG5rz1M.js +0 -1
  160. package/server/client/dist/assets/Search-DBWsIMDP.js +0 -1
  161. package/server/client/dist/assets/SurfaceCard-CNSQfYfM.js +0 -1
  162. package/server/client/dist/assets/Tag-5aCfSO8Y.js +0 -1
  163. package/server/client/dist/assets/TagNotes-BPZjN-6l.js +0 -1
  164. package/server/client/dist/assets/Trash.es-CRQkTnXZ.js +0 -1
  165. package/server/client/dist/assets/ViewNotes-DGLNF96x.js +0 -1
  166. package/server/client/dist/assets/Views-DR5jT23G.js +0 -1
  167. package/server/client/dist/assets/graph-vendor-UTvF2NS_.js +0 -46
  168. package/server/client/dist/assets/index-DGIAh3ZY.js +0 -1
  169. package/server/client/dist/assets/index-VHp17GQX.js +0 -342
  170. package/server/client/dist/assets/manage-image-RqtWKas2.js +0 -1
  171. package/server/client/dist/assets/manage-image-detail-BTSIbLlQ.js +0 -1
  172. package/server/client/dist/assets/mcp-admin-adapter-DmGUo5G8.js +0 -1
  173. package/server/client/dist/assets/note-core-BklwyZHk.js +0 -180
  174. package/server/client/dist/assets/note-vendor-DkYKUmLo.js +0 -54
  175. package/server/client/dist/assets/properties-BjrZvOYn.js +0 -1
  176. package/server/client/dist/assets/trash-C5ntddLu.js +0 -1
  177. package/server/client/dist/fonts/Pretendard-Bold.woff +0 -0
  178. package/server/client/dist/fonts/Pretendard-Regular.woff +0 -0
  179. package/server/dist/app.js.map +0 -1
  180. package/server/dist/features/auth/http/api.js.map +0 -1
  181. package/server/dist/features/auth/http/login-page.js.map +0 -1
  182. package/server/dist/features/auth/http/pages.js.map +0 -1
  183. package/server/dist/features/auth/service.js.map +0 -1
  184. package/server/dist/features/cache/graphql/cache.field.resolver.js.map +0 -1
  185. package/server/dist/features/cache/graphql/cache.mutation.resolver.js.map +0 -1
  186. package/server/dist/features/cache/graphql/cache.query.resolver.js.map +0 -1
  187. package/server/dist/features/cache/graphql/cache.resolver.js.map +0 -1
  188. package/server/dist/features/cache/graphql/cache.type-defs.js.map +0 -1
  189. package/server/dist/features/cache/graphql/index.js.map +0 -1
  190. package/server/dist/features/image/graphql/image.field.resolver.js.map +0 -1
  191. package/server/dist/features/image/graphql/image.mutation.resolver.js.map +0 -1
  192. package/server/dist/features/image/graphql/image.query.resolver.js.map +0 -1
  193. package/server/dist/features/image/graphql/image.resolver.js.map +0 -1
  194. package/server/dist/features/image/graphql/image.type-defs.js.map +0 -1
  195. package/server/dist/features/image/graphql/index.js.map +0 -1
  196. package/server/dist/features/image/http/upload.js.map +0 -1
  197. package/server/dist/features/image/services/delete.js.map +0 -1
  198. package/server/dist/features/image/services/upload.js.map +0 -1
  199. package/server/dist/features/image/services/validation.js.map +0 -1
  200. package/server/dist/features/mcp-admin/http/handlers.js.map +0 -1
  201. package/server/dist/features/mcp-admin/service.js.map +0 -1
  202. package/server/dist/features/note/graphql/index.js.map +0 -1
  203. package/server/dist/features/note/graphql/note.field.resolver.js.map +0 -1
  204. package/server/dist/features/note/graphql/note.mutation.resolver.js.map +0 -1
  205. package/server/dist/features/note/graphql/note.query.resolver.js.map +0 -1
  206. package/server/dist/features/note/graphql/note.resolver.js.map +0 -1
  207. package/server/dist/features/note/graphql/note.type-defs.js.map +0 -1
  208. package/server/dist/features/note/http/mcp.js.map +0 -1
  209. package/server/dist/features/note/services/authoring.js.map +0 -1
  210. package/server/dist/features/note/services/cleanup.js.map +0 -1
  211. package/server/dist/features/note/services/content-blocks.js.map +0 -1
  212. package/server/dist/features/note/services/markdown-intent-write.js.map +0 -1
  213. package/server/dist/features/note/services/markdown-patch.js.map +0 -1
  214. package/server/dist/features/note/services/properties.js.map +0 -1
  215. package/server/dist/features/note/services/search-backfill.js.map +0 -1
  216. package/server/dist/features/note/services/search.js.map +0 -1
  217. package/server/dist/features/note/services/snapshot.js.map +0 -1
  218. package/server/dist/features/note/services/tag-filter.js.map +0 -1
  219. package/server/dist/features/note/services/trash.js.map +0 -1
  220. package/server/dist/features/note/services/write-conflict.js.map +0 -1
  221. package/server/dist/features/note/services/write.js.map +0 -1
  222. package/server/dist/features/placeholder/graphql/index.js.map +0 -1
  223. package/server/dist/features/placeholder/graphql/placeholder.field.resolver.js.map +0 -1
  224. package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js.map +0 -1
  225. package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js.map +0 -1
  226. package/server/dist/features/placeholder/graphql/placeholder.resolver.js.map +0 -1
  227. package/server/dist/features/placeholder/graphql/placeholder.type-defs.js.map +0 -1
  228. package/server/dist/features/reminder/graphql/index.js.map +0 -1
  229. package/server/dist/features/reminder/graphql/reminder.field.resolver.js.map +0 -1
  230. package/server/dist/features/reminder/graphql/reminder.mutation.resolver.js.map +0 -1
  231. package/server/dist/features/reminder/graphql/reminder.query.resolver.js.map +0 -1
  232. package/server/dist/features/reminder/graphql/reminder.resolver.js.map +0 -1
  233. package/server/dist/features/reminder/graphql/reminder.type-defs.js.map +0 -1
  234. package/server/dist/features/tag/graphql/index.js.map +0 -1
  235. package/server/dist/features/tag/graphql/tag.field.resolver.js.map +0 -1
  236. package/server/dist/features/tag/graphql/tag.mutation.resolver.js.map +0 -1
  237. package/server/dist/features/tag/graphql/tag.query.resolver.js.map +0 -1
  238. package/server/dist/features/tag/graphql/tag.resolver.js.map +0 -1
  239. package/server/dist/features/tag/graphql/tag.type-defs.js.map +0 -1
  240. package/server/dist/features/tag/http/mcp.js.map +0 -1
  241. package/server/dist/features/tag/services/organization.js.map +0 -1
  242. package/server/dist/features/view/graphql/index.js.map +0 -1
  243. package/server/dist/features/view/graphql/view.mutation.resolver.js.map +0 -1
  244. package/server/dist/features/view/graphql/view.query.resolver.js.map +0 -1
  245. package/server/dist/features/view/graphql/view.resolver.js.map +0 -1
  246. package/server/dist/features/view/graphql/view.type-defs.js.map +0 -1
  247. package/server/dist/features/view/services/workspace.js.map +0 -1
  248. package/server/dist/main.js.map +0 -1
  249. package/server/dist/models.js.map +0 -1
  250. package/server/dist/modules/app-version.js.map +0 -1
  251. package/server/dist/modules/auth-guard.js.map +0 -1
  252. package/server/dist/modules/auth-mode.js.map +0 -1
  253. package/server/dist/modules/auth-redirect.js.map +0 -1
  254. package/server/dist/modules/blocknote-tree.js.map +0 -1
  255. package/server/dist/modules/blocknote.js.map +0 -1
  256. package/server/dist/modules/data-maintenance.js.map +0 -1
  257. package/server/dist/modules/error-handler.js.map +0 -1
  258. package/server/dist/modules/graphql.js.map +0 -1
  259. package/server/dist/modules/logger.js.map +0 -1
  260. package/server/dist/modules/mcp-auth.js.map +0 -1
  261. package/server/dist/modules/mcp-token.js.map +0 -1
  262. package/server/dist/modules/prisma-runtime.js.map +0 -1
  263. package/server/dist/modules/rate-limit.js.map +0 -1
  264. package/server/dist/modules/recovery-retention.js.map +0 -1
  265. package/server/dist/modules/server-events-handler.js.map +0 -1
  266. package/server/dist/modules/server-events.js.map +0 -1
  267. package/server/dist/modules/session-store.js.map +0 -1
  268. package/server/dist/modules/use-async.js.map +0 -1
  269. package/server/dist/paths.js.map +0 -1
  270. package/server/dist/routes/api.js.map +0 -1
  271. package/server/dist/routes/auth-pages.js.map +0 -1
  272. package/server/dist/routes/client.js.map +0 -1
  273. package/server/dist/routes/graphql.js.map +0 -1
  274. package/server/dist/routes/index.js.map +0 -1
  275. package/server/dist/routes/mcp.js.map +0 -1
  276. package/server/dist/schema/index.js.map +0 -1
  277. package/server/dist/start.js.map +0 -1
  278. package/server/dist/types/index.js.map +0 -1
  279. package/server/dist/types/input.js.map +0 -1
@@ -0,0 +1,356 @@
1
+ import{r as l,R as lr,b as C,j as p,w as zd,a as ur,d as ci,g as yn,e as Gd,u as Kd,o as Zd,s as Qd,k as Yd,p as Xd,n as Jd,i as ef,h as tf,l as nf,q as rf}from"./floating-ui.react-dom-wWLZ1CdM.js";import{H as of}from"./url-BSnWpmJx.js";function co(e){return e[e.length-1]}function sf(e){return typeof e=="function"}function Us(e,t){return sf(e)?e(t):e}const af=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable;function li(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=Ws(e)&&Ws(r);if(!o&&!(Qn(e)&&Qn(r)))return r;const s=o?e:Vs(e);if(!s)return r;const i=o?r:Vs(r);if(!i)return r;const a=s.length,c=i.length,d=o?new Array(c):{};let f=0;for(let u=0;u<c;u++){const h=o?u:i[u],m=e[h],b=r[h];if(m===b){d[h]=m,(o?u<a:af.call(e,h))&&f++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){d[h]=b;continue}const g=li(m,b,n+1);d[h]=g,g===m&&f++}return a===c&&f===a?e:d}function Vs(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Hs.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!Hs.call(e,o))return!1;r.push(o)}return r}function Qn(e){if(!qs(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!qs(n)||!n.hasOwnProperty("isPrototypeOf"))}function qs(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ws(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!Vn(e[r],t[r],n))return!1;return!0}if(Qn(e)&&Qn(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const i in t)if((!r||t[i]!==void 0)&&!Vn(e[i],t[i],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&o++;let s=0;for(const i in t)if((!r||t[i]!==void 0)&&(s++,s>o||!Vn(e[i],t[i],n)))return!1;return o===s}return!1}function A1(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function O1(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function N1(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function cf(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function zs(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return cf(t)}const _1=["http:","https:","mailto:","tel:"];function Gs(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function I1(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=zs(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+zs(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function M1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var lf="Invariant failed";function Bo(e,t){if(!e)throw new Error(lf)}function lo(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const i=t.get(s);if(i)return o(i),i.value},set(s,i){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const a=t.get(s);if(a)a.value=i,o(a);else{const c={key:s,value:i,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(s,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const Wt=0,xt=1,wt=2,un=3,ht=4,ui=5;function uf(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Uo(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=Wt,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const a=e.length;return n[0]=wt,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(s.charCodeAt(0)===36)return n[0]=xt,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const i=uf(s);if(i){const[a,c]=i,d=s.charCodeAt(a+1);if(d===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const f=a+3,u=c;if(f<u)return n[0]=un,n[1]=t+a,n[2]=t+f,n[3]=t+u,n[4]=t+c+1,n[5]=o,n}}else if(d===36){const f=a+1,u=a+2;return u===c?(n[0]=wt,n[1]=t+a,n[2]=t+f,n[3]=t+u,n[4]=t+c+1,n[5]=e.length,n):(n[0]=xt,n[1]=t+a,n[2]=t+u,n[3]=t+c,n[4]=t+c+1,n[5]=o,n)}}return n[0]=Wt,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function dr(e,t,n,r,o,s,i){i?.(n);let a=r;{const c=n.fullPath??n.from,d=c.length,f=n.options?.caseSensitive??e,u=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;a<d;){const m=Uo(c,a,t);let b;const g=a,y=m[5];switch(a=y+1,s++,m[0]){case Wt:{const x=c.substring(m[2],m[3]);if(f){const E=o.static?.get(x);if(E)b=E;else{o.static??=new Map;const S=mt(n.fullPath??n.from);S.parent=o,S.depth=s,b=S,o.static.set(x,S)}}else{const E=x.toLowerCase(),S=o.staticInsensitive?.get(E);if(S)b=S;else{o.staticInsensitive??=new Map;const T=mt(n.fullPath??n.from);T.parent=o,T.depth=s,b=T,o.staticInsensitive.set(E,T)}}break}case xt:{const x=c.substring(g,m[1]),E=c.substring(m[4],y),S=f&&!!(x||E),T=x?S?x:x.toLowerCase():void 0,P=E?S?E:E.toLowerCase():void 0,R=!u&&o.dynamic?.find(A=>!A.skipOnParamError&&A.caseSensitive===S&&A.prefix===T&&A.suffix===P);if(R)b=R;else{const A=Dr(xt,n.fullPath??n.from,S,T,P);b=A,A.depth=s,A.parent=o,o.dynamic??=[],o.dynamic.push(A)}break}case un:{const x=c.substring(g,m[1]),E=c.substring(m[4],y),S=f&&!!(x||E),T=x?S?x:x.toLowerCase():void 0,P=E?S?E:E.toLowerCase():void 0,R=!u&&o.optional?.find(A=>!A.skipOnParamError&&A.caseSensitive===S&&A.prefix===T&&A.suffix===P);if(R)b=R;else{const A=Dr(un,n.fullPath??n.from,S,T,P);b=A,A.parent=o,A.depth=s,o.optional??=[],o.optional.push(A)}break}case wt:{const x=c.substring(g,m[1]),E=c.substring(m[4],y),S=f&&!!(x||E),T=x?S?x:x.toLowerCase():void 0,P=E?S?E:E.toLowerCase():void 0,R=Dr(wt,n.fullPath??n.from,S,T,P);b=R,R.parent=o,R.depth=s,o.wildcard??=[],o.wildcard.push(R)}}o=b}if(u&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const m=mt(n.fullPath??n.from);m.kind=ui,m.parent=o,s++,m.depth=s,o.pathless??=[],o.pathless.push(m),o=m}const h=(n.path||!n.children)&&!n.isRoot;if(h&&c.endsWith("/")){const m=mt(n.fullPath??n.from);m.kind=ht,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=n.options?.params?.parse??null,o.skipOnParamError=u,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,h&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)dr(e,t,c,a,o,s,i)}function Mr(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function at(e){if(e.pathless)for(const t of e.pathless)at(t);if(e.static)for(const t of e.static.values())at(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())at(t);if(e.dynamic?.length){e.dynamic.sort(Mr);for(const t of e.dynamic)at(t)}if(e.optional?.length){e.optional.sort(Mr);for(const t of e.optional)at(t)}if(e.wildcard?.length){e.wildcard.sort(Mr);for(const t of e.wildcard)at(t)}}function mt(e){return{kind:Wt,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Dr(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:o}}function D1(e,t){const n=mt("/"),r=new Uint16Array(6);for(const o of e)dr(!1,r,o,1,n,0);at(n),t.masksTree=n,t.flatCache=lo(1e3)}function j1(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Ho(e,t.masksTree);return t.flatCache.set(e,r),r}function L1(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let i=o.singleCache.get(s);if(!i){i=mt("/");const a=new Uint16Array(6);dr(t,a,{from:e},1,i,0),o.singleCache.set(s,i)}return Ho(r,i,n)}function k1(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=Ho(e,t.segmentTree,n)}catch(i){if(i instanceof URIError)s=null;else throw i}return s&&(s.branch=ff(s.route)),t.matchCache.set(r,s),s}function df(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function F1(e,t=!1,n){const r=mt(e.fullPath),o=new Uint16Array(6),s={},i={};let a=0;return dr(t,o,e,1,r,0,d=>{if(n?.(d,a),Bo(!(d.id in s),`Duplicate routes found with id: ${String(d.id)}`),s[d.id]=d,a!==0&&d.path){const f=df(d.fullPath);(!i[f]||d.fullPath.endsWith("/"))&&(i[f]=d)}a++}),at(r),{processedTree:{segmentTree:r,singleCache:lo(1e3),matchCache:lo(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:i}}function Ho(e,t,n=!1){const r=e.split("/"),o=hf(e,r,t,n);if(!o)return null;const[s]=di(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function di(e,t,n){const r=pf(n.node);let o=null;const s={};let i=n.extract?.part??0,a=n.extract?.node??0,c=n.extract?.path??0,d=n.extract?.segment??0;for(;a<r.length;i++,a++,c++,d++){const f=r[a];if(f.kind===ht)break;if(f.kind===ui){d--,i--,c--;continue}const u=t[i],h=c;if(u&&(c+=u.length),f.kind===xt){o??=n.node.fullPath.split("/");const m=o[d],b=f.prefix?.length??0;if(m.charCodeAt(b)===123){const y=f.suffix?.length??0,v=m.substring(b+2,m.length-y-1),x=u.substring(b,u.length-y);s[v]=decodeURIComponent(x)}else{const y=m.substring(1);s[y]=decodeURIComponent(u)}}else if(f.kind===un){if(n.skipped&1<<a){i--,c=h-1;continue}o??=n.node.fullPath.split("/");const m=o[d],b=f.prefix?.length??0,g=f.suffix?.length??0,y=m.substring(b+3,m.length-g-1),v=f.suffix||f.prefix?u.substring(b,u.length-g):u;v&&(s[y]=decodeURIComponent(v))}else if(f.kind===wt){const m=f,b=e.substring(h+(m.prefix?.length??0),e.length-(m.suffix?.length??0)),g=decodeURIComponent(b);s["*"]=g,s._splat=g;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:i,node:a,path:c,segment:d}]}function ff(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function pf(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function hf(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!co(t),s=o&&e!=="/",i=t.length-(o?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,d=null,f=null;for(;a.length;){const u=a.pop(),{node:h,index:m,skipped:b,depth:g,statics:y,dynamics:v,optionals:x}=u;let{extract:E,rawParams:S,parsedParams:T}=u;if(h.skipOnParamError){if(!jr(e,t,u))continue;S=u.rawParams,E=u.extract,T=u.parsedParams}r&&h.route&&h.kind!==ht&&nn(d,u)&&(d=u);const P=m===i;if(P&&(h.route&&!s&&nn(f,u)&&(f=u),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const R=P?void 0:t[m];let A;if(P&&h.index){const _={node:h.index,index:m,skipped:b,depth:g+1,statics:y,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T};let D=!0;if(h.index.skipOnParamError&&(jr(e,t,_)||(D=!1)),D){if(y===i&&!v&&!x&&!b)return _;nn(f,_)&&(f=_)}}if(h.wildcard&&nn(c,u))for(const _ of h.wildcard){const{prefix:D,suffix:k}=_;if(D&&(P||!(_.caseSensitive?R:A??=R.toLowerCase()).startsWith(D)))continue;if(k){if(P)continue;const H=t.slice(m).join("/").slice(-k.length);if((_.caseSensitive?H:H.toLowerCase())!==k)continue}const U={node:_,index:i,skipped:b,depth:g,statics:y,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T};if(!(_.skipOnParamError&&!jr(e,t,U))){c=U;break}}if(h.optional){const _=b|1<<g,D=g+1;for(let k=h.optional.length-1;k>=0;k--){const U=h.optional[k];a.push({node:U,index:m,skipped:_,depth:D,statics:y,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T})}if(!P)for(let k=h.optional.length-1;k>=0;k--){const U=h.optional[k],{prefix:H,suffix:Q}=U;if(H||Q){const ne=U.caseSensitive?R:A??=R.toLowerCase();if(H&&!ne.startsWith(H)||Q&&!ne.endsWith(Q))continue}a.push({node:U,index:m+1,skipped:b,depth:D,statics:y,dynamics:v,optionals:x+1,extract:E,rawParams:S,parsedParams:T})}}if(!P&&h.dynamic&&R)for(let _=h.dynamic.length-1;_>=0;_--){const D=h.dynamic[_],{prefix:k,suffix:U}=D;if(k||U){const H=D.caseSensitive?R:A??=R.toLowerCase();if(k&&!H.startsWith(k)||U&&!H.endsWith(U))continue}a.push({node:D,index:m+1,skipped:b,depth:g+1,statics:y,dynamics:v+1,optionals:x,extract:E,rawParams:S,parsedParams:T})}if(!P&&h.staticInsensitive){const _=h.staticInsensitive.get(A??=R.toLowerCase());_&&a.push({node:_,index:m+1,skipped:b,depth:g+1,statics:y+1,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T})}if(!P&&h.static){const _=h.static.get(R);_&&a.push({node:_,index:m+1,skipped:b,depth:g+1,statics:y+1,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T})}if(h.pathless){const _=g+1;for(let D=h.pathless.length-1;D>=0;D--){const k=h.pathless[D];a.push({node:k,index:m,skipped:b,depth:_,statics:y,dynamics:v,optionals:x,extract:E,rawParams:S,parsedParams:T})}}}if(f&&c)return nn(c,f)?f:c;if(f)return f;if(c)return c;if(r&&d){let u=d.index;for(let m=0;m<d.index;m++)u+=t[m].length;const h=u===e.length?"/":e.slice(u);return d.rawParams??={},d.rawParams["**"]=decodeURIComponent(h),d}return null}function jr(e,t,n){try{const[r,o]=di(e,t,n);n.rawParams=r,n.extract=o;const s=n.node.parse(r);return n.parsedParams=Object.assign({},n.parsedParams,s),!0}catch{return null}}function nn(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ht)>(e.node.kind===ht)||t.node.kind===ht==(e.node.kind===ht)&&t.depth>e.depth))):!0}function Lr(e){return fi(e.filter(t=>t!==void 0).join("/"))}function fi(e){return e.replace(/\/{2,}/g,"/")}function pi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function hi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function $1(e){return hi(pi(e))}function Yn(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function mf(e,t,n){return Yn(e,n)===Yn(t,n)}function B1({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let i;if(r){i=o?t:s?e:e+"\0"+t;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else if(o)a=t.split("/");else{for(a=e.split("/");a.length>1&&co(a)==="";)a.pop();const u=t.split("/");for(let h=0,m=u.length;h<m;h++){const b=u[h];b===""?h?h===m-1&&a.push(b):a=[b]:b===".."?a.pop():b==="."||a.push(b)}}a.length>1&&(co(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let c,d="";for(let u=0;u<a.length;u++){u>0&&(d+="/");const h=a[u];if(!h)continue;c=Uo(h,0,c);const m=c[0];if(m===Wt){d+=h;continue}const b=c[5],g=h.substring(0,c[1]),y=h.substring(c[4],b),v=h.substring(c[2],c[3]);m===xt?d+=g||y?`${g}{$${v}}${y}`:`$${v}`:m===wt?d+=g||y?`${g}{$}${y}`:"$":d+=`${g}{-$${v}}${y}`}d=fi(d);const f=d||"/";return i&&r&&r.set(i,f),f}function U1(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function kr(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>Ks(o,n)).join("/"):Ks(r,n)}function H1({path:e,params:t,decoder:n,...r}){let o=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const i=e.length;let a=0,c,d="";for(;a<i;){const u=a;c=Uo(e,u,c);const h=c[5];if(a=h+1,u===h)continue;const m=c[0];if(m===Wt){d+="/"+e.substring(u,h);continue}if(m===wt){const b=t._splat;s._splat=b,s["*"]=b;const g=e.substring(u,c[1]),y=e.substring(c[4],h);if(!b){o=!0,(g||y)&&(d+="/"+g+y);continue}const v=kr("_splat",t,n);d+="/"+g+v+y;continue}if(m===xt){const b=e.substring(c[2],c[3]);!o&&!(b in t)&&(o=!0),s[b]=t[b];const g=e.substring(u,c[1]),y=e.substring(c[4],h),v=kr(b,t,n)??"undefined";d+="/"+g+v+y;continue}if(m===un){const b=e.substring(c[2],c[3]),g=t[b];if(g==null)continue;s[b]=g;const y=e.substring(u,c[1]),v=e.substring(c[4],h),x=kr(b,t,n)??"";d+="/"+y+x+v;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:o}}function Ks(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function mi(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function V1(e){return!!e?.isNotFound}const pt="__root__";function gi(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function q1(e){return e instanceof Response&&!!e.options}const gf="Error preloading route! ☝️";class vi{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,o=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=pt:this.parentRoute||Bo(!1);let s=o?pt:r?.path;s&&s!=="/"&&(s=pi(s));const i=r?.id||s;let a=o?pt:Lr([this.parentRoute.id===pt?"":this.parentRoute.id,i]);s===pt&&(s="/"),a!==pt&&(a=Lr(["/",a]));const c=a===pt?"/":Lr([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=c,this._to=hi(c)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>gi({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class vf{constructor({id:t}){this.notFound=n=>mi({routeId:this.id,...n}),this.redirect=n=>gi({from:this.id,...n}),this.id=t}}class yf extends vi{constructor(t){super(t)}}const bf="use",W1=lr[bf],z1=typeof window<"u"?l.useLayoutEffect:l.useEffect;function G1(e){const t=l.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function xf(e,t,n={},r={}){l.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function wf(e){const t=l.useRef(null);return l.useImperativeHandle(e,()=>t.current,[]),t}function K1({children:e,fallback:t=null}){return yi()?p.jsx(C.Fragment,{children:e}):p.jsx(C.Fragment,{children:t})}function yi(){return C.useSyncExternalStore(Ef,()=>!0,()=>!1)}function Ef(){return()=>{}}function Sf(e,t){return e===t}function Cf(e,t,n=Sf){const r=l.useCallback(i=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(i);return a},[e]),o=l.useCallback(()=>e?.get(),[e]);return zd.useSyncExternalStoreWithSelector(r,o,o,t,n)}const Tf=l.createContext(null);function zt(e){const t=l.useContext(Tf);return e?.warn,t}function uo(e){const t=zt({warn:e?.router===void 0}),n=e?.router||t,r=l.useRef(void 0);return Cf(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=li(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const Rf=l.createContext(void 0),Pf=l.createContext(void 0);function Qe(e){const t=l.useContext(e.from?Pf:Rf);return uo({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Bo(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Vo(e){return Qe({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function qo(e){const{select:t,...n}=e;return Qe({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Wo(e){return Qe({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function zo(e){return Qe({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fr(e){const t=zt();return l.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Af(e,t){const n=zt(),r=wf(t),{activeProps:o,inactiveProps:s,activeOptions:i,to:a,preload:c,preloadDelay:d,hashScrollIntoView:f,replace:u,startTransition:h,resetScroll:m,viewTransition:b,children:g,target:y,disabled:v,style:x,className:E,onClick:S,onBlur:T,onFocus:P,onMouseEnter:R,onMouseLeave:A,onTouchStart:_,ignoreBlocker:D,params:k,search:U,hash:H,state:Q,mask:ne,reloadDocument:L,unsafeRelative:Z,from:te,_fromLocation:I,...J}=e,W=yi(),ae=uo({select:se=>{const ge=se.matches[se.matches.length-1];return{search:ge?.search,hash:se.location.hash,path:ge?.pathname}},structuralSharing:!0}),$=e.from,q=l.useMemo(()=>({...e,from:$}),[n,ae,$,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),V=l.useMemo(()=>n.buildLocation({...q}),[n,q]),F=V.maskedLocation?V.maskedLocation.publicHref:V.publicHref,O=V.maskedLocation?V.maskedLocation.external:V.external,j=l.useMemo(()=>Df(F,O,n.history,v),[v,O,F,n.history]),oe=l.useMemo(()=>{if(j?.external)return Gs(j.href,n.protocolAllowlist)?void 0:j.href;if(!jf(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Gs(a,n.protocolAllowlist)?void 0:a}catch{}},[a,j,n.protocolAllowlist]),ee=uo({select:se=>{if(oe)return!1;if(i?.exact){if(!mf(se.location.pathname,V.pathname,n.basepath))return!1}else{const ge=Yn(se.location.pathname,n.basepath),Ne=Yn(V.pathname,n.basepath);if(!(ge.startsWith(Ne)&&(ge.length===Ne.length||ge[Ne.length]==="/")))return!1}return(i?.includeSearch??!0)&&!Vn(se.location.search,V.search,{partial:!i?.exact,ignoreUndefined:!i?.explicitUndefined})?!1:i?.includeHash?W&&se.location.hash===V.hash:!0}}),X=ee?Us(o,{})??Of:Fr,G=ee?Fr:Us(s,{})??Fr,me=[E,X.className,G.className].filter(Boolean).join(" "),ve=(x||X.style||G.style)&&{...x,...X.style,...G.style},[xe,B]=l.useState(!1),ie=l.useRef(!1),ye=e.reloadDocument||oe?!1:c??n.options.defaultPreload,pe=d??n.options.defaultPreloadDelay??0,Le=l.useCallback(()=>{n.preloadRoute({...q,_builtLocation:V}).catch(se=>{console.warn(se),console.warn(gf)})},[n,q,V]),tn=l.useCallback(se=>{se?.isIntersecting&&Le()},[Le]);xf(r,tn,Mf,{disabled:!!v||ye!=="viewport"}),l.useEffect(()=>{ie.current||!v&&ye==="render"&&(Le(),ie.current=!0)},[v,Le,ye]);const he=se=>{const ge=se.currentTarget.getAttribute("target"),Ne=y!==void 0?y:ge;if(!v&&!Lf(se)&&!se.defaultPrevented&&(!Ne||Ne==="_self")&&se.button===0){se.preventDefault(),ur.flushSync(()=>{B(!0)});const _t=n.subscribe("onResolved",()=>{_t(),B(!1)});n.navigate({...q,replace:u,resetScroll:m,hashScrollIntoView:f,startTransition:h,viewTransition:b,ignoreBlocker:D})}};if(oe)return{...J,ref:r,href:oe,...g&&{children:g},...y&&{target:y},...v&&{disabled:v},...x&&{style:x},...E&&{className:E},...S&&{onClick:S},...T&&{onBlur:T},...P&&{onFocus:P},...R&&{onMouseEnter:R},...A&&{onMouseLeave:A},..._&&{onTouchStart:_}};const et=se=>{if(v||ye!=="intent")return;if(!pe){Le();return}const ge=se.currentTarget;if(rn.has(ge))return;const Ne=setTimeout(()=>{rn.delete(ge),Le()},pe);rn.set(ge,Ne)},_r=se=>{v||ye!=="intent"||Le()},In=se=>{if(v||!ye||!pe)return;const ge=se.currentTarget,Ne=rn.get(ge);Ne&&(clearTimeout(Ne),rn.delete(ge))};return{...J,...X,...G,href:j?.href,ref:r,onClick:Dt([S,he]),onBlur:Dt([T,In]),onFocus:Dt([P,et]),onMouseEnter:Dt([R,et]),onMouseLeave:Dt([A,In]),onTouchStart:Dt([_,_r]),disabled:!!v,target:y,...ve&&{style:ve},...me&&{className:me},...v&&Nf,...ee&&_f,...W&&xe&&If}}const Fr={},Of={className:"active"},Nf={role:"link","aria-disabled":!0},_f={"data-status":"active","aria-current":"page"},If={"data-transitioning":"transitioning"},rn=new WeakMap,Mf={rootMargin:"100px"},Dt=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Df(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function jf(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Go=l.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Af(r,t),i=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...c}=s;return l.createElement("a",c,i)}return l.createElement(n,s,i)});function Lf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Z1(e){return new kf({id:e})}class kf extends vf{constructor({id:t}){super({id:t}),this.useMatch=n=>Qe({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qe({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>zo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Wo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>qo({...n,from:this.id,strict:!1}),this.useLoaderData=n=>Vo({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=zt();return fr({from:n.routesById[this.id].fullPath})},this.notFound=n=>mi({routeId:this.id,...n}),this.Link=C.forwardRef((n,r)=>{const s=zt().routesById[this.id].fullPath;return p.jsx(Go,{ref:r,from:s,...n})})}}class Ff extends vi{constructor(t){super(t),this.useMatch=n=>Qe({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qe({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>zo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Wo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>qo({...n,from:this.id}),this.useLoaderData=n=>Vo({...n,from:this.id}),this.useNavigate=()=>fr({from:this.fullPath}),this.Link=C.forwardRef((n,r)=>p.jsx(Go,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Q1(e){return new Ff(e)}class $f extends yf{constructor(t){super(t),this.useMatch=n=>Qe({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qe({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>zo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Wo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>qo({...n,from:this.id}),this.useLoaderData=n=>Vo({...n,from:this.id}),this.useNavigate=()=>fr({from:this.fullPath}),this.Link=C.forwardRef((n,r)=>p.jsx(Go,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Y1(e){return new $f(e)}var bn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Uf=class{#e=Bf;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},gt=new Uf;function Hf(e){setTimeout(e,0)}var Et=typeof window>"u"||"Deno"in globalThis;function Me(){}function Vf(e,t){return typeof e=="function"?e(t):e}function fo(e){return typeof e=="number"&&e>=0&&e!==1/0}function bi(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ct(e,t){return typeof e=="function"?e(t):e}function Fe(e,t){return typeof e=="function"?e(t):e}function Zs(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Ko(i,t.options))return!1}else if(!fn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Qs(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(dn(t.options.mutationKey)!==dn(s))return!1}else if(!fn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ko(e,t){return(t?.queryKeyHashFn||dn)(e)}function dn(e){return JSON.stringify(e,(t,n)=>ho(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function fn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>fn(e[n],t[n])):!1}var qf=Object.prototype.hasOwnProperty;function xi(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Ys(e)&&Ys(t);if(!r&&!(ho(e)&&ho(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let d=0;for(let f=0;f<a;f++){const u=r?f:i[f],h=e[u],m=t[u];if(h===m){c[u]=h,(r?f<s:qf.call(e,u))&&d++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){c[u]=m;continue}const b=xi(h,m,n+1);c[u]=b,b===h&&d++}return s===a&&d===s?e:c}function po(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ys(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ho(e){if(!Xs(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Xs(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Xs(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wf(e){return new Promise(t=>{gt.setTimeout(t,e)})}function mo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xi(e,t):t}function zf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Gf(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zo=Symbol();function wi(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Zo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ei(e,t){return typeof e=="function"?e(...t):!!e}function Kf(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Zf=class extends bn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Et&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Qo=new Zf;function go(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var Qf=Hf;function Yf(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=Qf;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ee=Yf(),Xf=class extends bn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Et&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Xn=new Xf;function Jf(e){return Math.min(1e3*2**e,3e4)}function Si(e){return(e??"online")==="online"?Xn.isOnline():!0}var vo=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ci(e){let t=!1,n=0,r;const o=go(),s=()=>o.status!=="pending",i=g=>{if(!s()){const y=new vo(g);h(y),e.onCancel?.(y)}},a=()=>{t=!0},c=()=>{t=!1},d=()=>Qo.isFocused()&&(e.networkMode==="always"||Xn.isOnline())&&e.canRun(),f=()=>Si(e.networkMode)&&e.canRun(),u=g=>{s()||(r?.(),o.resolve(g))},h=g=>{s()||(r?.(),o.reject(g))},m=()=>new Promise(g=>{r=y=>{(s()||d())&&g(y)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),b=()=>{if(s())return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(u).catch(v=>{if(s())return;const x=e.retry??(Et?0:3),E=e.retryDelay??Jf,S=typeof E=="function"?E(n,v):E,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,v);if(t||!T){h(v);return}n++,e.onFail?.(n,v),Wf(S).then(()=>d()?void 0:m()).then(()=>{t?h(v):b()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r?.(),o),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?b():m().then(b),o)}}var Ti=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fo(this.gcTime)&&(this.#e=gt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Et?1/0:300*1e3))}clearGcTimeout(){this.#e&&(gt.clearTimeout(this.#e),this.#e=void 0)}},ep=class extends Ti{#e;#t;#n;#o;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ea(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ea(this.options);t.data!==void 0&&(this.setState(Js(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=mo(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Me).catch(Me):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Fe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ct(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!bi(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const a=wi(this.options,t),d=(()=>{const f={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#a=!1,this.options.persister?this.options.persister(a,d,this):a(d)},i=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(a),a})();this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#s({type:"fetch",meta:i.fetchOptions?.meta}),this.#r=Ci({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:a=>{a instanceof vo&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,c)=>{this.#s({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof vo){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#s({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ri(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Js(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ee.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Ri(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Si(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Js(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ea(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var tp=class extends bn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=go(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#m;#f;#p;#l;#u;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ta(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yo(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yo(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fe(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!po(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&na(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(t.enabled,this.#t)||ct(this.options.staleTime,this.#t)!==ct(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return rp(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Me)),t}#g(){this.#x();const e=ct(this.options.staleTime,this.#t);if(Et||this.#o.isStale||!fo(e))return;const n=bi(this.#o.dataUpdatedAt,e)+1;this.#l=gt.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(Et||Fe(this.options.enabled,this.#t)===!1||!fo(this.#c)||this.#c===0)&&(this.#u=gt.setInterval(()=>{(this.options.refetchIntervalInBackground||Qo.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#l&&(gt.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(gt.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,s=this.#r,i=this.#i,c=e!==n?e.state:this.#n,{state:d}=e;let f={...d},u=!1,h;if(t._optimisticResults){const A=this.hasListeners(),_=!A&&ta(e,t),D=A&&na(e,n,t,r);(_||D)&&(f={...f,...Ri(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:m,errorUpdatedAt:b,status:g}=f;h=f.data;let y=!1;if(t.placeholderData!==void 0&&h===void 0&&g==="pending"){let A;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(A=o.data,y=!0):A=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,A!==void 0&&(g="success",h=mo(o?.data,A,t),u=!0)}if(t.select&&h!==void 0&&!y)if(o&&h===s?.data&&t.select===this.#m)h=this.#f;else try{this.#m=t.select,h=t.select(h),h=mo(o?.data,h,t),this.#f=h,this.#s=null}catch(A){this.#s=A}this.#s&&(m=this.#s,h=this.#f,b=Date.now(),g="error");const v=f.fetchStatus==="fetching",x=g==="pending",E=g==="error",S=x&&v,T=h!==void 0,R={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:E,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:f.dataUpdatedAt,error:m,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:E&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:E&&T,isStale:Yo(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Fe(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=R.data!==void 0,_=R.status==="error"&&!A,D=H=>{_?H.reject(R.error):A&&H.resolve(R.data)},k=()=>{const H=this.#a=R.promise=go();D(H)},U=this.#a;switch(U.status){case"pending":e.queryHash===n.queryHash&&D(U);break;case"fulfilled":(_||R.data!==U.value)&&k();break;case"rejected":(!_||R.error!==U.reason)&&k();break}}return R}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),po(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#h.size)return!0;const s=new Set(o??this.#h);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(i=>{const a=i;return this.#o[a]!==e[a]&&s.has(a)})};this.#S({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ee.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function np(e,t){return Fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ta(e,t){return np(e,t)||e.state.data!==void 0&&yo(e,t,t.refetchOnMount)}function yo(e,t,n){if(Fe(t.enabled,e)!==!1&&ct(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Yo(e,t)}return!1}function na(e,t,n,r){return(e!==t||Fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Yo(e,n)}function Yo(e,t){return Fe(t.enabled,e)!==!1&&e.isStaleByTime(ct(t.staleTime,e))}function rp(e,t){return!po(e.getCurrentResult(),t)}function ra(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const d=async()=>{let f=!1;const u=b=>{Kf(b,()=>t.signal,()=>f=!0)},h=wi(t.options,t.fetchOptions),m=async(b,g,y)=>{if(f)return Promise.reject();if(g==null&&b.pages.length)return Promise.resolve(b);const x=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};return u(P),P})(),E=await h(x),{maxPages:S}=t.options,T=y?Gf:zf;return{pages:T(b.pages,E,S),pageParams:T(b.pageParams,g,S)}};if(o&&s.length){const b=o==="backward",g=b?op:oa,y={pages:s,pageParams:i},v=g(r,y);a=await m(y,v,b)}else{const b=e??s.length;do{const g=c===0?i[0]??r.initialPageParam:oa(r,a);if(c>0&&g==null)break;a=await m(a,g),c++}while(c<b)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function oa(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function op(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var sp=class extends Ti{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ap(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Ci({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,i)=>{this.#r({type:"failed",failureCount:s,error:i})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const i=await this.options.onMutate?.(e,n);i!==this.state.context&&this.#r({type:"pending",context:i,variables:e,isPaused:o})}const s=await this.#o.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(i){Promise.reject(i)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(i){Promise.reject(i)}throw this.#r({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ee.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function ap(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ip=class extends bn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new sp({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=jn(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=jn(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=jn(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=jn(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ee.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Qs(t,n))}findAll(e={}){return this.getAll().filter(t=>Qs(e,t))}notify(e){Ee.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ee.batch(()=>Promise.all(e.map(t=>t.continue().catch(Me))))}};function jn(e){return e.options.scope?.id}var cp=class extends bn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Ko(r,t);let s=this.get(o);return s||(s=new ep({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ee.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Zs(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Zs(e,n)):t}notify(e){Ee.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},lp=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(e={}){this.#e=e.queryCache||new cp,this.#t=e.mutationCache||new ip,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Qo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Xn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ct(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,i=Vf(t,s);if(i!==void 0)return this.#e.build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ee.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ee.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ee.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ee.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Me).catch(Me)}invalidateQueries(e,t={}){return Ee.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ee.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Me)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Me)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ct(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Me).catch(Me)}fetchInfiniteQuery(e){return e.behavior=ra(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Me).catch(Me)}ensureInfiniteQueryData(e){return e.behavior=ra(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(dn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{fn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(dn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{fn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ko(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Zo&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Pi=l.createContext(void 0),up=e=>{const t=l.useContext(Pi);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},X1=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Pi.Provider,{value:e,children:t})),Ai=l.createContext(!1),dp=()=>l.useContext(Ai);Ai.Provider;function Oi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ni=l.createContext(Oi()),fp=()=>l.useContext(Ni),pp=({children:e})=>{const[t]=l.useState(()=>Oi());return p.jsx(Ni.Provider,{value:t,children:typeof e=="function"?e(t):e})},hp=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Ei(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},mp=e=>{l.useEffect(()=>{e.clearReset()},[e])},gp=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ei(n,[e.error,r])),vp=(e,t)=>t.state.data===void 0,yp=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},bp=(e,t)=>e.isLoading&&e.isFetching&&!t,xp=(e,t)=>e?.suspense&&t.isPending,sa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wp(e,t,n){const r=dp(),o=fp(),s=up(),i=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(i);const a=s.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",yp(i),hp(i,o,a),mp(o);const c=!s.getQueryCache().get(i.queryHash),[d]=l.useState(()=>new t(s,i)),f=d.getOptimisticResult(i),u=!r&&e.subscribed!==!1;if(l.useSyncExternalStore(l.useCallback(h=>{const m=u?d.subscribe(Ee.batchCalls(h)):Me;return d.updateResult(),m},[d,u]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setOptions(i)},[i,d]),xp(i,f))throw sa(i,d,o);if(gp({result:f,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw f.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(i,f),i.experimental_prefetchInRender&&!Et&&bp(f,r)&&(c?sa(i,d,o):a?.promise)?.catch(Me).finally(()=>{d.updateResult()}),i.notifyOnChangeProps?f:d.trackResult(f)}function J1(e,t){return wp({...e,enabled:!0,suspense:!0,throwOnError:vp,placeholderData:void 0},tp)}var $r={confirmLabel:"OK",dismissible:!0},aa={confirmLabel:"Continue",cancelLabel:"Cancel",tone:"default",dismissible:!0},Ep=e=>typeof e=="string"?{title:e,...$r}:{...$r,...e,dismissible:e.dismissible??$r.dismissible},Sp=e=>typeof e=="string"?{title:e,...aa}:{...aa,...e,dismissible:e.dismissible??e.tone!=="danger"},Cp=()=>{let e={current:null};const t=new Set,n=()=>{t.forEach(c=>c())},r=c=>{e=c,n()},o=()=>e,s=()=>{const c=e.current;!c||c.kind!=="alert"||(r({current:null}),c.resolver())},i=c=>{const d=e.current;!d||d.kind!=="confirm"||(r({current:null}),d.resolver(c))},a=()=>{const c=e.current;if(c){if(c.kind==="confirm"){i(!1);return}s()}};return{subscribe:c=>(t.add(c),()=>{t.delete(c)}),getSnapshot:o,alert:c=>{const d=Ep(c);return a(),new Promise(f=>{r({current:{kind:"alert",options:d,resolver:f}})})},confirm:c=>{const d=Sp(c);return a(),new Promise(f=>{r({current:{kind:"confirm",options:d,resolver:f}})})},resolveAlert:s,resolveConfirm:i,dismiss:a,reset:()=>{a()}}},_i=l.createContext(null),Tp=()=>{const e=l.useRef();return e.current||(e.current=Cp()),e.current},Rp=({children:e,components:t})=>{const n=Tp(),r=l.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);l.useEffect(()=>()=>{n.reset()},[n]);const o=n,s=r.current;return p.jsxs(_i.Provider,{value:o,children:[e,s?.kind==="alert"&&p.jsx(t.Alert,{open:!0,options:s.options,onClose:n.resolveAlert}),s?.kind==="confirm"&&p.jsx(t.Confirm,{open:!0,options:s.options,onCancel:()=>n.resolveConfirm(!1),onConfirm:()=>n.resolveConfirm(!0)})]})},eE=()=>{const e=l.useContext(_i);if(!e)throw new Error("useModal must be used within ModalProvider");return e};function Pp(e,t){const n=l.createContext(t),r=s=>{const{children:i,...a}=s,c=l.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Xe(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i),c=n.length;n=[...n,i];const d=u=>{const{scope:h,children:m,...b}=u,g=h?.[e]?.[c]||a,y=l.useMemo(()=>b,Object.values(b));return p.jsx(g.Provider,{value:y,children:m})};d.displayName=s+"Provider";function f(u,h){const m=h?.[e]?.[c]||a,b=l.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[d,f]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(a){const c=a?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Ap(o,...t)]}function Ap(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:d})=>{const u=c(s)[`__scope${d}`];return{...a,...u}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ia(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ia(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ia(e[o],null)}}}}function re(...e){return l.useCallback(xn(...e),e)}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Pe=globalThis?.document?l.useLayoutEffect:()=>{},Op=lr[" useId ".trim().toString()]||(()=>{}),Np=0;function Ze(e){const[t,n]=l.useState(Op());return Pe(()=>{n(r=>r??String(Np++))},[e]),t?`radix-${t}`:""}var _p=lr[" useInsertionEffect ".trim().toString()]||Pe;function nt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Ip({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const u=f.current;u!==a&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${a?"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.`),f.current=a},[a,r])}const d=l.useCallback(f=>{if(a){const u=Mp(f)?f(e):f;u!==e&&i.current?.(u)}else s(f)},[a,e,s,i]);return[c,d]}function Ip({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return _p(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Mp(e){return typeof e=="function"}function Gt(e){const t=Dp(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,a=l.Children.toArray(s),c=a.find(jp);if(c){const d=c.props.children,f=a.map(u=>u===c?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:u);return p.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Dp(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=kp(o),a=Lp(s,o.props);return o.type!==l.Fragment&&(a.ref=r?xn(r,i):i),l.cloneElement(o,a)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ii=Symbol("radix.slottable");function Mi(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ii,t}function jp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ii}function Lp(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function kp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=Fp.reduce((e,t)=>{const n=Gt(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Di(e,t){e&&ur.flushSync(()=>e.dispatchEvent(t))}function Ye(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function $p(e,t=globalThis?.document){const n=Ye(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Bp="DismissableLayer",bo="dismissableLayer.update",Up="dismissableLayer.pointerDownOutside",Hp="dismissableLayer.focusOutside",ca,ji=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,d=l.useContext(ji),[f,u]=l.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=l.useState({}),b=re(t,R=>u(R)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),x=f?g.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,T=Wp(R=>{const A=R.target,_=[...d.branches].some(D=>D.contains(A));!S||_||(o?.(R),i?.(R),R.defaultPrevented||a?.())},h),P=zp(R=>{const A=R.target;[...d.branches].some(D=>D.contains(A))||(s?.(R),i?.(R),R.defaultPrevented||a?.())},h);return $p(R=>{x===d.layers.size-1&&(r?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ca=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),la(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ca)}},[f,h,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),la())},[f,d]),l.useEffect(()=>{const R=()=>m({});return document.addEventListener(bo,R),()=>document.removeEventListener(bo,R)},[]),p.jsx(Y.div,{...c,ref:b,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,P.onFocusCapture),onBlurCapture:M(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,T.onPointerDownCapture)})});wn.displayName=Bp;var Vp="DismissableLayerBranch",qp=l.forwardRef((e,t)=>{const n=l.useContext(ji),r=l.useRef(null),o=re(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(Y.div,{...e,ref:o})});qp.displayName=Vp;function Wp(e,t=globalThis?.document){const n=Ye(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Li(Up,n,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zp(e,t=globalThis?.document){const n=Ye(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Li(Hp,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function la(){const e=new CustomEvent(bo);document.dispatchEvent(e)}function Li(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Di(o,s):o.dispatchEvent(s)}var Br="focusScope.autoFocusOnMount",Ur="focusScope.autoFocusOnUnmount",ua={bubbles:!1,cancelable:!0},Gp="FocusScope",pr=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=l.useState(null),d=Ye(o),f=Ye(s),u=l.useRef(null),h=re(t,g=>c(g)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(E){if(m.paused||!a)return;const S=E.target;a.contains(S)?u.current=S:st(u.current,{select:!0})},y=function(E){if(m.paused||!a)return;const S=E.relatedTarget;S!==null&&(a.contains(S)||st(u.current,{select:!0}))},v=function(E){if(document.activeElement===document.body)for(const T of E)T.removedNodes.length>0&&st(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const x=new MutationObserver(v);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),x.disconnect()}}},[r,a,m.paused]),l.useEffect(()=>{if(a){fa.add(m);const g=document.activeElement;if(!a.contains(g)){const v=new CustomEvent(Br,ua);a.addEventListener(Br,d),a.dispatchEvent(v),v.defaultPrevented||(Kp(Jp(ki(a)),{select:!0}),document.activeElement===g&&st(a))}return()=>{a.removeEventListener(Br,d),setTimeout(()=>{const v=new CustomEvent(Ur,ua);a.addEventListener(Ur,f),a.dispatchEvent(v),v.defaultPrevented||st(g??document.body,{select:!0}),a.removeEventListener(Ur,f),fa.remove(m)},0)}}},[a,d,f,m]);const b=l.useCallback(g=>{if(!n&&!r||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(y&&v){const x=g.currentTarget,[E,S]=Zp(x);E&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&st(E,{select:!0})):g.shiftKey&&v===E&&(g.preventDefault(),n&&st(S,{select:!0})):v===x&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(Y.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});pr.displayName=Gp;function Kp(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(st(r,{select:t}),document.activeElement!==n)return}function Zp(e){const t=ki(e),n=da(t,e),r=da(t.reverse(),e);return[n,r]}function ki(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function da(e,t){for(const n of e)if(!Qp(n,{upTo:t}))return n}function Qp(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 Yp(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Yp(e)&&t&&e.select()}}var fa=Xp();function Xp(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pa(e,t),e.unshift(t)},remove(t){e=pa(e,t),e[0]?.resume()}}}function pa(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jp(e){return e.filter(t=>t.tagName!=="A")}var eh="Portal",En=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);Pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?ci.createPortal(p.jsx(Y.div,{...r,ref:t}),i):null});En.displayName=eh;function th(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=nh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=re(r.ref,rh(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function nh(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[a,c]=th(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=Ln(r.current);s.current=a==="mounted"?d:"none"},[a]),Pe(()=>{const d=r.current,f=o.current;if(f!==e){const h=s.current,m=Ln(d);e?c("MOUNT"):m==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,u=m=>{const g=Ln(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(s.current=Ln(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Ln(e){return e?.animationName||"none"}function rh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Hr=0;function Xo(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ha()),document.body.insertAdjacentElement("beforeend",e[1]??ha()),Hr++,()=>{Hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hr--}},[])}function ha(){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 Ke=function(){return Ke=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ke.apply(this,arguments)};function Fi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function oh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var qn="right-scroll-bar-position",Wn="width-before-scroll-bar",sh="with-scroll-bars-hidden",ah="--removed-body-scroll-bar-size";function Vr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ih(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ch=typeof window<"u"?l.useLayoutEffect:l.useEffect,ma=new WeakMap;function lh(e,t){var n=ih(null,function(r){return e.forEach(function(o){return Vr(o,r)})});return ch(function(){var r=ma.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Vr(a,null)}),s.forEach(function(a){o.has(a)||Vr(a,i)})}ma.set(n,e)},[e]),n}function uh(e){return e}function dh(e,t){t===void 0&&(t=uh);var n=[],r=!1,o={read:function(){if(r)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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return o}function fh(e){e===void 0&&(e={});var t=dh(null);return t.options=Ke({async:!0,ssr:!1},e),t}var $i=function(e){var t=e.sideCar,n=Fi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ke({},n))};$i.isSideCarExport=!0;function ph(e,t){return e.useMedium(t),$i}var Bi=fh(),qr=function(){},hr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:qr,onWheelCapture:qr,onTouchMoveCapture:qr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,u=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,y=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,E=e.gapMode,S=Fi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,P=lh([n,t]),R=Ke(Ke({},S),o);return l.createElement(l.Fragment,null,f&&l.createElement(T,{sideCar:Bi,removeScrollBar:d,shards:u,noRelative:m,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:E}),i?l.cloneElement(l.Children.only(a),Ke(Ke({},R),{ref:P})):l.createElement(x,Ke({},R,{className:c,ref:P}),a))});hr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hr.classNames={fullWidth:Wn,zeroRight:qn};var hh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hh();return t&&e.setAttribute("nonce",t),e}function gh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mh())&&(gh(t,n),vh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bh=function(){var e=yh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ui=function(){var e=bh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},xh={left:0,top:0,right:0,gap:0},Wr=function(e){return parseInt(e||"",10)||0},wh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Wr(n),Wr(r),Wr(o)]},Eh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xh;var t=wh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Sh=Ui(),Ht="data-scroll-locked",Ch=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(sh,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(a,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(Ht,`] {
7
+ overflow: hidden `).concat(r,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(s,`px;
12
+ padding-right: `).concat(i,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(a,"px ").concat(r,`;
16
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(qn,` {
20
+ right: `).concat(a,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(Wn,` {
24
+ margin-right: `).concat(a,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(qn," .").concat(qn,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(Wn," .").concat(Wn,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(Ht,`] {
36
+ `).concat(ah,": ").concat(a,`px;
37
+ }
38
+ `)},ga=function(){var e=parseInt(document.body.getAttribute(Ht)||"0",10);return isFinite(e)?e:0},Th=function(){l.useEffect(function(){return document.body.setAttribute(Ht,(ga()+1).toString()),function(){var e=ga()-1;e<=0?document.body.removeAttribute(Ht):document.body.setAttribute(Ht,e.toString())}},[])},Rh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Th();var s=l.useMemo(function(){return Eh(o)},[o]);return l.createElement(Sh,{styles:Ch(s,!t,o,n?"":"!important")})},xo=!1;if(typeof window<"u")try{var kn=Object.defineProperty({},"passive",{get:function(){return xo=!0,!0}});window.addEventListener("test",kn,kn),window.removeEventListener("test",kn,kn)}catch{xo=!1}var jt=xo?{passive:!1}:!1,Ph=function(e){return e.tagName==="TEXTAREA"},Hi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ph(e)&&n[t]==="visible")},Ah=function(e){return Hi(e,"overflowY")},Oh=function(e){return Hi(e,"overflowX")},va=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Vi(e,r);if(o){var s=qi(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_h=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vi=function(e,t){return e==="v"?Ah(t):Oh(t)},qi=function(e,t){return e==="v"?Nh(t):_h(t)},Ih=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mh=function(e,t,n,r,o){var s=Ih(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),d=!1,f=i>0,u=0,h=0;do{if(!a)break;var m=qi(e,a),b=m[0],g=m[1],y=m[2],v=g-y-s*b;(b||v)&&Vi(e,a)&&(u+=v,h+=b);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ya=function(e){return[e.deltaX,e.deltaY]},ba=function(e){return e&&"current"in e?e.current:e},Dh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jh=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},Lh=0,Lt=[];function kh(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Lh++)[0],s=l.useState(Ui)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=oh([e.lockRef.current],(e.shards||[]).map(ba),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=Fn(g),x=n.current,E="deltaX"in g?g.deltaX:x[0]-v[0],S="deltaY"in g?g.deltaY:x[1]-v[1],T,P=g.target,R=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in g&&R==="h"&&P.type==="range")return!1;var A=window.getSelection(),_=A&&A.anchorNode,D=_?_===P||_.contains(P):!1;if(D)return!1;var k=va(R,P);if(!k)return!0;if(k?T=R:(T=R==="v"?"h":"v",k=va(R,P)),!k)return!1;if(!r.current&&"changedTouches"in g&&(E||S)&&(r.current=T),!T)return!0;var U=r.current||T;return Mh(U,y,g,U==="h"?E:S)},[]),c=l.useCallback(function(g){var y=g;if(!(!Lt.length||Lt[Lt.length-1]!==s)){var v="deltaY"in y?ya(y):Fn(y),x=t.current.filter(function(T){return T.name===y.type&&(T.target===y.target||y.target===T.shadowParent)&&Dh(T.delta,v)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var E=(i.current.shards||[]).map(ba).filter(Boolean).filter(function(T){return T.contains(y.target)}),S=E.length>0?a(y,E[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),d=l.useCallback(function(g,y,v,x){var E={name:g,delta:y,target:v,should:x,shadowParent:Fh(v)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(S){return S!==E})},1)},[]),f=l.useCallback(function(g){n.current=Fn(g),r.current=void 0},[]),u=l.useCallback(function(g){d(g.type,ya(g),g.target,a(g,e.lockRef.current))},[]),h=l.useCallback(function(g){d(g.type,Fn(g),g.target,a(g,e.lockRef.current))},[]);l.useEffect(function(){return Lt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",f,jt),function(){Lt=Lt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",f,jt)}},[]);var m=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(s,{styles:jh(o)}):null,m?l.createElement(Rh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $h=ph(Bi,kh);var mr=l.forwardRef(function(e,t){return l.createElement(hr,Ke({},e,{ref:t,sideCar:$h}))});mr.classNames=hr.classNames;var Bh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kt=new WeakMap,$n=new WeakMap,Bn={},zr=0,Wi=function(e){return e&&(e.host||Wi(e.parentNode))},Uh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wi(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Hh=function(e,t,n,r){var o=Uh(t,Array.isArray(e)?e:[e]);Bn[n]||(Bn[n]=new WeakMap);var s=Bn[n],i=[],a=new Set,c=new Set(o),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};o.forEach(d);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(r),b=m!==null&&m!=="false",g=(kt.get(h)||0)+1,y=(s.get(h)||0)+1;kt.set(h,g),s.set(h,y),i.push(h),g===1&&b&&$n.set(h,!0),y===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return f(t),a.clear(),zr++,function(){i.forEach(function(u){var h=kt.get(u)-1,m=s.get(u)-1;kt.set(u,h),s.set(u,m),h||($n.has(u)||u.removeAttribute(r),$n.delete(u)),m||u.removeAttribute(n)}),zr--,zr||(kt=new WeakMap,kt=new WeakMap,$n=new WeakMap,Bn={})}},Jo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Hh(r,o,n,"aria-hidden")):function(){return null}},gr="Dialog",[zi,Gi]=Xe(gr),[Vh,We]=zi(gr),Ki=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=l.useRef(null),c=l.useRef(null),[d,f]=nt({prop:r,defaultProp:o??!1,onChange:s,caller:gr});return p.jsx(Vh,{scope:t,triggerRef:a,contentRef:c,contentId:Ze(),titleId:Ze(),descriptionId:Ze(),open:d,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(u=>!u),[f]),modal:i,children:n})};Ki.displayName=gr;var Zi="DialogTrigger",Qi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(Zi,n),s=re(t,o.triggerRef);return p.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ns(o.open),...r,ref:s,onClick:M(e.onClick,o.onOpenToggle)})});Qi.displayName=Zi;var es="DialogPortal",[qh,Yi]=zi(es,{forceMount:void 0}),Xi=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=We(es,t);return p.jsx(qh,{scope:t,forceMount:n,children:l.Children.map(r,i=>p.jsx(Je,{present:n||s.open,children:p.jsx(En,{asChild:!0,container:o,children:i})}))})};Xi.displayName=es;var Jn="DialogOverlay",Ji=l.forwardRef((e,t)=>{const n=Yi(Jn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=We(Jn,e.__scopeDialog);return s.modal?p.jsx(Je,{present:r||s.open,children:p.jsx(zh,{...o,ref:t})}):null});Ji.displayName=Jn;var Wh=Gt("DialogOverlay.RemoveScroll"),zh=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(Jn,n);return p.jsx(mr,{as:Wh,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(Y.div,{"data-state":ns(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),St="DialogContent",ec=l.forwardRef((e,t)=>{const n=Yi(St,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=We(St,e.__scopeDialog);return p.jsx(Je,{present:r||s.open,children:s.modal?p.jsx(Gh,{...o,ref:t}):p.jsx(Kh,{...o,ref:t})})});ec.displayName=St;var Gh=l.forwardRef((e,t)=>{const n=We(St,e.__scopeDialog),r=l.useRef(null),o=re(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Jo(s)},[]),p.jsx(tc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:M(e.onFocusOutside,s=>s.preventDefault())})}),Kh=l.forwardRef((e,t)=>{const n=We(St,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return p.jsx(tc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),tc=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=We(St,n),c=l.useRef(null),d=re(t,c);return Xo(),p.jsxs(p.Fragment,{children:[p.jsx(pr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(wn,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ns(a.open),...i,ref:d,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Qh,{titleId:a.titleId}),p.jsx(Xh,{contentRef:c,descriptionId:a.descriptionId})]})]})}),ts="DialogTitle",nc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(ts,n);return p.jsx(Y.h2,{id:o.titleId,...r,ref:t})});nc.displayName=ts;var rc="DialogDescription",oc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(rc,n);return p.jsx(Y.p,{id:o.descriptionId,...r,ref:t})});oc.displayName=rc;var sc="DialogClose",ac=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(sc,n);return p.jsx(Y.button,{type:"button",...r,ref:t,onClick:M(e.onClick,()=>o.onOpenChange(!1))})});ac.displayName=sc;function ns(e){return e?"open":"closed"}var ic="DialogTitleWarning",[Zh,cc]=Pp(ic,{contentName:St,titleName:ts,docsSlug:"dialog"}),Qh=({titleId:e})=>{const t=cc(ic),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Yh="DialogDescriptionWarning",Xh=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cc(Yh).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},lc=Ki,Jh=Qi,uc=Xi,dc=Ji,fc=ec,pc=nc,hc=oc,rs=ac,mc="AlertDialog",[em]=Xe(mc,[Gi]),rt=Gi(),gc=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(lc,{...r,...n,modal:!0})};gc.displayName=mc;var tm="AlertDialogTrigger",nm=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(Jh,{...o,...r,ref:t})});nm.displayName=tm;var rm="AlertDialogPortal",vc=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(uc,{...r,...n})};vc.displayName=rm;var om="AlertDialogOverlay",yc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(dc,{...o,...r,ref:t})});yc.displayName=om;var Vt="AlertDialogContent",[sm,am]=em(Vt),im=Mi("AlertDialogContent"),bc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=rt(n),i=l.useRef(null),a=re(t,i),c=l.useRef(null);return p.jsx(Zh,{contentName:Vt,titleName:xc,docsSlug:"alert-dialog",children:p.jsx(sm,{scope:n,cancelRef:c,children:p.jsxs(fc,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:M(o.onOpenAutoFocus,d=>{d.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[p.jsx(im,{children:r}),p.jsx(lm,{contentRef:i})]})})})});bc.displayName=Vt;var xc="AlertDialogTitle",wc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(pc,{...o,...r,ref:t})});wc.displayName=xc;var Ec="AlertDialogDescription",Sc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(hc,{...o,...r,ref:t})});Sc.displayName=Ec;var cm="AlertDialogAction",Cc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(rs,{...o,...r,ref:t})});Cc.displayName=cm;var Tc="AlertDialogCancel",Rc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=am(Tc,n),s=rt(n),i=re(t,o);return p.jsx(rs,{...s,...r,ref:i})});Rc.displayName=Tc;var lm=({contentRef:e})=>{const t=`\`${Vt}\` requires a description for the component to be accessible for screen reader users.
46
+
47
+ You can add a description to the \`${Vt}\` by passing a \`${Ec}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
+
49
+ 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 \`${Vt}\`. 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.
50
+
51
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},um=gc,dm=vc,fm=yc,pm=bc,hm=Cc,mm=Rc,gm=wc,vm=Sc,Pc=um,Ac=dm,Oc=fm,Nc=pm,ym=mm,_c=hm,Ic=gm,Mc=vm,Gr={exports:{}};var xa;function bm(){return xa||(xa=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=o(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=o(i,a));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Gr)),Gr.exports}var xm=bm();const fe=yn(xm);var wm=Symbol.for("react.lazy"),er=lr[" use ".trim().toString()];function Em(e){return typeof e=="object"&&e!==null&&"then"in e}function Dc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wm&&"_payload"in e&&Em(e._payload)}function Sm(e){const t=Tm(e),n=l.forwardRef((r,o)=>{let{children:s,...i}=r;Dc(s)&&typeof er=="function"&&(s=er(s._payload));const a=l.Children.toArray(s),c=a.find(Pm);if(c){const d=c.props.children,f=a.map(u=>u===c?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:u);return p.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Cm=Sm("Slot");function Tm(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n;if(Dc(o)&&typeof er=="function"&&(o=er(o._payload)),l.isValidElement(o)){const i=Om(o),a=Am(s,o.props);return o.type!==l.Fragment&&(a.ref=r?xn(r,i):i),l.cloneElement(o,a)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rm=Symbol("radix.slottable");function Pm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rm}function Am(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Om(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Nm=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),l.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),_m=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),l.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),Im=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),l.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),Mm=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Dm=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),jm=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Lm=l.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),At=l.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:i,children:a,weights:c,...d}=e,{color:f="currentColor",size:u,weight:h="regular",mirrored:m=!1,...b}=l.useContext(Lm);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??u,height:o??u,fill:r??f,viewBox:"0 0 256 256",transform:i||m?"scale(-1, 1)":void 0,...b,...d},!!n&&l.createElement("title",null,n),a,c.get(s??h))});At.displayName="IconBase";const jc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Nm}));jc.displayName="CaretDownIcon";const km=jc,Lc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:_m}));Lc.displayName="CaretLeftIcon";const Kr=Lc,kc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Im}));kc.displayName="CaretRightIcon";const Zr=kc,Fc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Mm}));Fc.displayName="CheckIcon";const Fm=Fc,$c=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Dm}));$c.displayName="SpinnerIcon";const $m=$c,Bc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:jm}));Bc.displayName="XIcon";const Bm=Bc,wa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ea=Gd,Ae=(e,t)=>n=>{var r;if(t?.variants==null)return Ea(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const f=n?.[d],u=s?.[d];if(f===null)return null;const h=wa(f)||wa(u);return o[d][h]}),a=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(b=>{let[g,y]=b;return Array.isArray(y)?y.includes({...s,...a}[g]):{...s,...a}[g]===y})?[...d,u,h]:d},[]);return Ea(e,i,c,n?.class,n?.className)},Um=Ae(["inline-flex","items-center","justify-center","gap-2","whitespace-nowrap","select-none","font-medium","transition-colors","duration-200","border","focus-ring-soft","outline-none","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{primary:["bg-cta","border-transparent","text-fg-on-filled","hover:bg-cta-hover","active:bg-cta-hover"],signature:["bg-accent-secondary","border-transparent","text-fg-on-filled","hover:bg-accent-secondary-hover","active:bg-accent-secondary-hover"],subtle:["bg-transparent","border-border","text-fg-default","hover:bg-hover-subtle","hover:border-border-secondary","active:bg-hover"],ghost:["border-transparent","bg-transparent","text-fg-secondary","hover:bg-hover-subtle","hover:border-border-subtle","hover:text-fg-default","active:bg-hover"],danger:["bg-accent-danger","border-transparent","text-fg-on-filled","hover:bg-accent-danger-hover","active:bg-accent-danger-hover"],"soft-success":["bg-accent-soft-success","border-transparent","text-accent-success","hover:bg-accent-soft-success-hover","active:bg-accent-soft-success-hover"],"soft-danger":["bg-accent-soft-danger","border-transparent","text-fg-error","hover:bg-accent-soft-danger-hover","active:bg-accent-soft-danger-hover"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-4 text-sm rounded-[14px]",lg:"h-11 px-5 text-body rounded-[16px]",icon:"h-9 w-9 rounded-[14px]","icon-sm":"h-8 w-8 rounded-[12px]"}},defaultVariants:{variant:"primary",size:"md"}}),it=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:i,...a},c)=>{const d=r?Cm:"button";return p.jsx(d,{ref:c,className:Um({variant:t,size:n,className:e}),disabled:i||o,...a,children:o?p.jsxs(p.Fragment,{children:[p.jsx($m,{className:"animate-spin h-4 w-4"}),s]}):s})});it.displayName="Button";const os=Ae(["relative","pointer-events-auto","w-full","max-h-[calc(100dvh-2rem)]","overflow-y-auto","border","border-border-subtle","overscroll-contain","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"],{variants:{variant:{default:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-32px_rgba(15,18,24,0.36)]",compact:"max-w-[480px] rounded-[18px] bg-surface shadow-[0_18px_44px_-28px_rgba(15,18,24,0.28)]",form:"max-w-[560px] rounded-[20px] bg-elevated shadow-[0_22px_56px_-30px_rgba(15,18,24,0.32)]",inspect:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-30px_rgba(15,18,24,0.34)]",confirm:"max-w-[336px] rounded-[18px] bg-surface shadow-[0_16px_36px_-24px_rgba(15,18,24,0.24)]"}},defaultVariants:{variant:"default"}}),Hm=Ae(["flex","items-center","justify-between"],{variants:{variant:{default:"border-b border-border-subtle/70 px-4 py-3.5",compact:"border-b border-border-subtle/60 px-4 py-3",form:"border-b border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-b border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"px-4 pb-1 pt-4"}},defaultVariants:{variant:"default"}}),ss=Ae("",{variants:{variant:{default:"px-4 py-5 sm:px-5",compact:"px-4 py-4",form:"px-4 py-4 sm:px-5 sm:py-5",inspect:"px-4 py-4 sm:px-5 sm:py-5",confirm:"space-y-1 px-5 pb-4 pt-5"}},defaultVariants:{variant:"default"}}),as=Ae(["flex","items-center","justify-end"],{variants:{variant:{default:"border-t border-border-subtle/70 px-4 py-3.5",compact:"px-4 pb-4 pt-0",form:"border-t border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-t border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"justify-end gap-2 px-5 pb-5 pt-0"}},defaultVariants:{variant:"default"}}),Vm=Ae(["flex","items-center","justify-center","text-fg-secondary","transition-colors","hover:bg-hover-subtle","hover:text-fg-default","focus-ring-soft"],{variants:{variant:{default:"h-10 w-10 rounded-[14px]",compact:"h-9 w-9 rounded-[12px]",form:"h-9 w-9 rounded-[12px]",inspect:"h-10 w-10 rounded-[14px]",confirm:"h-9 w-9 rounded-[12px]"}},defaultVariants:{variant:"default"}}),is=Ae("text-fg-default font-semibold",{variants:{variant:{default:"text-heading tracking-[-0.02em]",compact:"text-subheading tracking-[-0.01em]",form:"text-heading tracking-[-0.02em]",inspect:"text-heading tracking-[-0.02em]",confirm:"text-subheading tracking-[-0.01em]"}},defaultVariants:{variant:"default"}}),cs=Ae("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),qm=Ae("",{variants:{variant:{display:"text-display",heading:"text-heading",subheading:"text-subheading",body:"text-body",meta:"text-meta",label:"text-label",micro:"text-micro"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},tone:{default:"text-fg-default",secondary:"text-fg-secondary",tertiary:"text-fg-tertiary",muted:"text-fg-muted",placeholder:"text-fg-placeholder",error:"text-fg-error",onFilled:"text-fg-on-filled"},tracking:{normal:"",tight:"tracking-[-0.01em]",tighter:"tracking-[-0.02em]",wide:"tracking-[0.08em]",wider:"tracking-[0.12em]",widest:"tracking-[0.16em]"},transform:{none:"",uppercase:"uppercase"},truncate:{true:"truncate",false:""}},defaultVariants:{variant:"body",weight:"regular",tone:"default",tracking:"normal",transform:"none",truncate:!1}});function $e({as:e="span",className:t,variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,children:c,...d}){const f=e;return p.jsx(f,{className:qm({variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,className:t}),...d,children:c})}const Uc=fe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0"),Wm=({open:e,options:t,onClose:n})=>p.jsx(Pc,{open:e,onOpenChange:r=>{!r&&t.dismissible&&n()},children:p.jsxs(Ac,{children:[p.jsx(Oc,{className:Uc}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:p.jsxs(Nc,{className:os({variant:"confirm"}),children:[p.jsxs("div",{className:ss({variant:"confirm"}),children:[p.jsx(Ic,{className:is({variant:"confirm"}),children:t.title}),t.description?p.jsx(Mc,{className:cs({variant:"confirm"}),children:t.description}):null]}),p.jsx("div",{className:as({variant:"confirm"}),children:p.jsx(_c,{asChild:!0,children:p.jsx(it,{size:"sm",onClick:n,children:t.confirmLabel})})})]})})]})}),zm=({open:e,options:t,onCancel:n,onConfirm:r})=>p.jsx(Pc,{open:e,onOpenChange:o=>{!o&&t.dismissible&&n()},children:p.jsxs(Ac,{children:[p.jsx(Oc,{className:Uc}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:p.jsxs(Nc,{className:os({variant:"confirm"}),children:[p.jsxs("div",{className:ss({variant:"confirm"}),children:[p.jsx(Ic,{className:is({variant:"confirm"}),children:t.title}),t.description?p.jsx(Mc,{className:cs({variant:"confirm"}),children:p.jsx($e,{as:"span",variant:"meta",tone:"secondary",children:t.description})}):null]}),p.jsxs("div",{className:as({variant:"confirm"}),children:[p.jsx(ym,{asChild:!0,children:p.jsx(it,{variant:"ghost",size:"sm",onClick:n,children:t.cancelLabel})}),p.jsx(_c,{asChild:!0,children:p.jsx(it,{variant:t.tone==="danger"?"danger":"primary",size:"sm",onClick:r,children:t.confirmLabel})})]})]})})]})});function tE({children:e}){return p.jsx(Rp,{components:{Alert:Wm,Confirm:zm},children:e})}function Gm(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Km=e=>{switch(e){case"success":return Ym;case"info":return Jm;case"warning":return Xm;case"error":return eg;default:return null}},Zm=Array(12).fill(0),Qm=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},Zm.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ym=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Xm=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jm=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),eg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),tg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ng=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let wo=1;class rg{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:wo++,i=this.toasts.find(c=>c.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:a,title:r}):c):this.addToast({title:r,...o,dismissible:a,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async d=>{if(i=["resolve",d],C.isValidElement(d))s=!1,this.create({id:r,type:"default",message:d});else if(sg(d)&&!d.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,b=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...b})}else if(d instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...b})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:h,...b})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,m=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,f)=>a.then(()=>i[0]==="reject"?f(i[1]):d(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||wo++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ie=new rg,og=(e,t)=>{const n=t?.id||wo++;return Ie.addToast({title:e,...t,id:n}),n},sg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ag=og,ig=()=>Ie.toasts,cg=()=>Ie.getActiveToasts(),lg=Object.assign(ag,{success:Ie.success,info:Ie.info,warning:Ie.warning,error:Ie.error,custom:Ie.custom,message:Ie.message,promise:Ie.promise,dismiss:Ie.dismiss,loading:Ie.loading},{getHistory:ig,getToasts:cg});Gm("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Un(e){return e.label!==void 0}const ug=3,dg="24px",fg="16px",Sa=4e3,pg=356,hg=14,mg=45,gg=200;function Ge(...e){return e.filter(Boolean).join(" ")}function vg(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const yg=e=>{var t,n,r,o,s,i,a,c,d;const{invert:f,toast:u,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:y,index:v,toasts:x,expanded:E,removeToast:S,defaultRichColors:T,closeButton:P,style:R,cancelButtonStyle:A,actionButtonStyle:_,className:D="",descriptionClassName:k="",duration:U,position:H,gap:Q,expandByDefault:ne,classNames:L,icons:Z,closeButtonAriaLabel:te="Close toast"}=e,[I,J]=C.useState(null),[W,ae]=C.useState(null),[$,q]=C.useState(!1),[V,F]=C.useState(!1),[O,j]=C.useState(!1),[oe,ee]=C.useState(!1),[X,G]=C.useState(!1),[me,ve]=C.useState(0),[xe,B]=C.useState(0),ie=C.useRef(u.duration||U||Sa),ye=C.useRef(null),pe=C.useRef(null),Le=v===0,tn=v+1<=g,he=u.type,et=u.dismissible!==!1,_r=u.className||"",In=u.descriptionClassName||"",se=C.useMemo(()=>y.findIndex(K=>K.toastId===u.id)||0,[y,u.id]),ge=C.useMemo(()=>{var K;return(K=u.closeButton)!=null?K:P},[u.closeButton,P]),Ne=C.useMemo(()=>u.duration||U||Sa,[u.duration,U]),_t=C.useRef(0),It=C.useRef(0),js=C.useRef(0),Mt=C.useRef(null),[Ud,Hd]=H.split("-"),Ls=C.useMemo(()=>y.reduce((K,be,Ce)=>Ce>=se?K:K+be.height,0),[y,se]),ks=ng(),Vd=u.invert||f,Ir=he==="loading";It.current=C.useMemo(()=>se*Q+Ls,[se,Ls]),C.useEffect(()=>{ie.current=Ne},[Ne]),C.useEffect(()=>{q(!0)},[]),C.useEffect(()=>{const K=pe.current;if(K){const be=K.getBoundingClientRect().height;return B(be),b(Ce=>[{toastId:u.id,height:be,position:u.position},...Ce]),()=>b(Ce=>Ce.filter(je=>je.toastId!==u.id))}},[b,u.id]),C.useLayoutEffect(()=>{if(!$)return;const K=pe.current,be=K.style.height;K.style.height="auto";const Ce=K.getBoundingClientRect().height;K.style.height=be,B(Ce),b(je=>je.find(we=>we.toastId===u.id)?je.map(we=>we.toastId===u.id?{...we,height:Ce}:we):[{toastId:u.id,height:Ce,position:u.position},...je])},[$,u.title,u.description,b,u.id,u.jsx,u.action,u.cancel]);const ot=C.useCallback(()=>{F(!0),ve(It.current),b(K=>K.filter(be=>be.toastId!==u.id)),setTimeout(()=>{S(u)},gg)},[u,S,b,It]);C.useEffect(()=>{if(u.promise&&he==="loading"||u.duration===1/0||u.type==="loading")return;let K;return E||m||ks?(()=>{if(js.current<_t.current){const je=new Date().getTime()-_t.current;ie.current=ie.current-je}js.current=new Date().getTime()})():ie.current!==1/0&&(_t.current=new Date().getTime(),K=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),ot()},ie.current)),()=>clearTimeout(K)},[E,m,u,he,ks,ot]),C.useEffect(()=>{u.delete&&(ot(),u.onDismiss==null||u.onDismiss.call(u,u))},[ot,u.delete]);function qd(){var K;if(Z?.loading){var be;return C.createElement("div",{className:Ge(L?.loader,u==null||(be=u.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":he==="loading"},Z.loading)}return C.createElement(Qm,{className:Ge(L?.loader,u==null||(K=u.classNames)==null?void 0:K.loader),visible:he==="loading"})}const Wd=u.icon||Z?.[he]||Km(he);var Fs,$s;return C.createElement("li",{tabIndex:0,ref:pe,className:Ge(D,_r,L?.toast,u==null||(t=u.classNames)==null?void 0:t.toast,L?.default,L?.[he],u==null||(n=u.classNames)==null?void 0:n[he]),"data-sonner-toast":"","data-rich-colors":(Fs=u.richColors)!=null?Fs:T,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":$,"data-promise":!!u.promise,"data-swiped":X,"data-removed":V,"data-visible":tn,"data-y-position":Ud,"data-x-position":Hd,"data-index":v,"data-front":Le,"data-swiping":O,"data-dismissible":et,"data-type":he,"data-invert":Vd,"data-swipe-out":oe,"data-swipe-direction":W,"data-expanded":!!(E||ne&&$),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${V?me:It.current}px`,"--initial-height":ne?"auto":`${xe}px`,...R,...u.style},onDragEnd:()=>{j(!1),J(null),Mt.current=null},onPointerDown:K=>{K.button!==2&&(Ir||!et||(ye.current=new Date,ve(It.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(j(!0),Mt.current={x:K.clientX,y:K.clientY})))},onPointerUp:()=>{var K,be,Ce;if(oe||!et)return;Mt.current=null;const je=Number(((K=pe.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((Ce=ye.current)==null?void 0:Ce.getTime()),ke=I==="x"?je:Mn,Dn=Math.abs(ke)/we;if(Math.abs(ke)>=mg||Dn>.11){ve(It.current),u.onDismiss==null||u.onDismiss.call(u,u),ae(I==="x"?je>0?"right":"left":Mn>0?"down":"up"),ot(),ee(!0);return}else{var Ue,He;(Ue=pe.current)==null||Ue.style.setProperty("--swipe-amount-x","0px"),(He=pe.current)==null||He.style.setProperty("--swipe-amount-y","0px")}G(!1),j(!1),J(null)},onPointerMove:K=>{var be,Ce,je;if(!Mt.current||!et||((be=window.getSelection())==null?void 0:be.toString().length)>0)return;const we=K.clientY-Mt.current.y,ke=K.clientX-Mt.current.x;var Dn;const Ue=(Dn=e.swipeDirections)!=null?Dn:vg(H);!I&&(Math.abs(ke)>1||Math.abs(we)>1)&&J(Math.abs(ke)>Math.abs(we)?"x":"y");let He={x:0,y:0};const Bs=ft=>1/(1.5+Math.abs(ft)/20);if(I==="y"){if(Ue.includes("top")||Ue.includes("bottom"))if(Ue.includes("top")&&we<0||Ue.includes("bottom")&&we>0)He.y=we;else{const ft=we*Bs(we);He.y=Math.abs(ft)<Math.abs(we)?ft:we}}else if(I==="x"&&(Ue.includes("left")||Ue.includes("right")))if(Ue.includes("left")&&ke<0||Ue.includes("right")&&ke>0)He.x=ke;else{const ft=ke*Bs(ke);He.x=Math.abs(ft)<Math.abs(ke)?ft:ke}(Math.abs(He.x)>0||Math.abs(He.y)>0)&&G(!0),(Ce=pe.current)==null||Ce.style.setProperty("--swipe-amount-x",`${He.x}px`),(je=pe.current)==null||je.style.setProperty("--swipe-amount-y",`${He.y}px`)}},ge&&!u.jsx&&he!=="loading"?C.createElement("button",{"aria-label":te,"data-disabled":Ir,"data-close-button":!0,onClick:Ir||!et?()=>{}:()=>{ot(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ge(L?.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},($s=Z?.close)!=null?$s:tg):null,(he||u.icon||u.promise)&&u.icon!==null&&(Z?.[he]!==null||u.icon)?C.createElement("div",{"data-icon":"",className:Ge(L?.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||qd():null,u.type!=="loading"?Wd:null):null,C.createElement("div",{"data-content":"",className:Ge(L?.content,u==null||(s=u.classNames)==null?void 0:s.content)},C.createElement("div",{"data-title":"",className:Ge(L?.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?C.createElement("div",{"data-description":"",className:Ge(k,In,L?.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),C.isValidElement(u.cancel)?u.cancel:u.cancel&&Un(u.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||A,onClick:K=>{Un(u.cancel)&&et&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,K),ot())},className:Ge(L?.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,C.isValidElement(u.action)?u.action:u.action&&Un(u.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||_,onClick:K=>{Un(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,K),!K.defaultPrevented&&ot())},className:Ge(L?.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Ca(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function bg(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?fg:dg;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=a:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(a)}),n}const xg=C.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:d,offset:f,mobileOffset:u,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:y=ug,toastOptions:v,dir:x=Ca(),gap:E=hg,icons:S,containerAriaLabel:T="Notifications"}=t,[P,R]=C.useState([]),A=C.useMemo(()=>r?P.filter($=>$.toasterId===r):P.filter($=>!$.toasterId),[P,r]),_=C.useMemo(()=>Array.from(new Set([s].concat(A.filter($=>$.position).map($=>$.position)))),[A,s]),[D,k]=C.useState([]),[U,H]=C.useState(!1),[Q,ne]=C.useState(!1),[L,Z]=C.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=C.useRef(null),I=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=C.useRef(null),W=C.useRef(!1),ae=C.useCallback($=>{R(q=>{var V;return(V=q.find(F=>F.id===$.id))!=null&&V.delete||Ie.dismiss($.id),q.filter(({id:F})=>F!==$.id)})},[]);return C.useEffect(()=>Ie.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{R(q=>q.map(V=>V.id===$.id?{...V,delete:!0}:V))});return}setTimeout(()=>{ci.flushSync(()=>{R(q=>{const V=q.findIndex(F=>F.id===$.id);return V!==-1?[...q.slice(0,V),{...q[V],...$},...q.slice(V+1)]:[$,...q]})})})}),[P]),C.useEffect(()=>{if(h!=="system"){Z(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:q})=>{Z(q?"dark":"light")})}catch{$.addListener(({matches:V})=>{try{Z(V?"dark":"light")}catch(F){console.error(F)}})}},[h]),C.useEffect(()=>{P.length<=1&&H(!1)},[P]),C.useEffect(()=>{const $=q=>{var V;if(i.every(j=>q[j]||q.code===j)){var O;H(!0),(O=te.current)==null||O.focus()}q.code==="Escape"&&(document.activeElement===te.current||(V=te.current)!=null&&V.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[i]),C.useEffect(()=>{if(te.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,W.current=!1)}},[te.current]),C.createElement("section",{ref:n,"aria-label":`${T} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map(($,q)=>{var V;const[F,O]=$.split("-");return A.length?C.createElement("ol",{key:$,dir:x==="auto"?Ca():x,tabIndex:-1,ref:te,className:d,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":F,"data-x-position":O,style:{"--front-toast-height":`${((V=D[0])==null?void 0:V.height)||0}px`,"--width":`${pg}px`,"--gap":`${E}px`,...g,...bg(f,u)},onBlur:j=>{W.current&&!j.currentTarget.contains(j.relatedTarget)&&(W.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||W.current||(W.current=!0,J.current=j.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},A.filter(j=>!j.position&&q===0||j.position===$).map((j,oe)=>{var ee,X;return C.createElement(yg,{key:j.id,icons:S,index:oe,toast:j,defaultRichColors:m,duration:(ee=v?.duration)!=null?ee:b,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:o,visibleToasts:y,closeButton:(X=v?.closeButton)!=null?X:c,interacting:Q,position:$,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:ae,toasts:A.filter(G=>G.position==j.position),heights:D.filter(G=>G.position==j.position),setHeights:k,expandByDefault:a,gap:E,expanded:U,swipeDirections:t.swipeDirections})})):null}))});var Ft=(e,t)=>({...e,...t}),wg=(e,t)=>Object.assign((n,r)=>e(n,Ft(t,r)),{success:(n,r)=>e.success(n,Ft(t,r)),error:(n,r)=>e.error(n,Ft(t,r)),info:(n,r)=>e.info(n,Ft(t,r)),warning:(n,r)=>e.warning(n,Ft(t,r)),loading:(n,r)=>e.loading(n,Ft(t,r)),dismiss:n=>e.dismiss(n)}),Hc=(e={})=>wg(lg,e);Hc();var Eg=e=>p.jsx(xg,{...e});const Sg=Hc({duration:3e3});function nE({children:e}){return p.jsxs(p.Fragment,{children:[e,p.jsx(Eg,{position:"bottom-center",expand:!1,visibleToasts:3,toastOptions:{duration:3e3,classNames:{toast:"surface-floating max-w-[min(420px,calc(100vw-32px))] whitespace-normal break-words px-5 py-3 text-sm font-medium text-fg-secondary shadow-sm",title:"text-sm font-medium text-fg-secondary"}}})]})}function rE(){return Sg}const oE=new lp({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function Vc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Cg}=Object.prototype,{getPrototypeOf:Kt}=Object,{iterator:Sn,toStringTag:qc}=Symbol,tr=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),pn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),tr(n,t))return!0;n=Kt(n)}return!1},Tg=(e,t)=>e!=null&&pn(e,t)?e[t]:void 0,ls=(e=>t=>{const n=Cg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ze=e=>(e=e.toLowerCase(),t=>ls(t)===e),vr=e=>t=>typeof t===e,{isArray:Ct}=Array,Zt=vr("undefined");function Yt(e){return e!==null&&!Zt(e)&&e.constructor!==null&&!Zt(e.constructor)&&De(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wc=ze("ArrayBuffer");function Rg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wc(e.buffer),t}const Pg=vr("string"),De=vr("function"),zc=vr("number"),Xt=e=>e!==null&&typeof e=="object",Ag=e=>e===!0||e===!1,zn=e=>{if(!Xt(e))return!1;const t=Kt(e);return(t===null||t===Object.prototype||Kt(t)===null)&&!pn(e,qc)&&!pn(e,Sn)},Og=e=>{if(!Xt(e)||Yt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ng=ze("Date"),_g=ze("File"),Ig=e=>!!(e&&typeof e.uri<"u"),Mg=e=>e&&typeof e.getParts<"u",Dg=ze("Blob"),jg=ze("FileList"),Lg=e=>Xt(e)&&De(e.pipe);function kg(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ta=kg(),Ra=typeof Ta.FormData<"u"?Ta.FormData:void 0,Fg=e=>{if(!e)return!1;if(Ra&&e instanceof Ra)return!0;const t=Kt(e);if(!t||t===Object.prototype||!De(e.append))return!1;const n=ls(e);return n==="formdata"||n==="object"&&De(e.toString)&&e.toString()==="[object FormData]"},$g=ze("URLSearchParams"),[Bg,Ug,Hg,Vg]=["ReadableStream","Request","Response","Headers"].map(ze),qg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ct(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Yt(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function Gc(e,t){if(Yt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kc=e=>!Zt(e)&&e!==vt;function Eo(...e){const{caseless:t,skipUndefined:n}=Kc(this)&&this||{},r={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&typeof i=="string"&&Gc(r,i)||i,c=tr(r,a)?r[a]:void 0;zn(c)&&zn(s)?r[a]=Eo(c,s):zn(s)?r[a]=Eo({},s):Ct(s)?r[a]=s.slice():(!n||!Zt(s))&&(r[a]=s)};for(let s=0,i=e.length;s<i;s++){const a=e[s];if(!a||Yt(a)||(Cn(a,o),typeof a!="object"||Ct(a)))continue;const c=Object.getOwnPropertySymbols(a);for(let d=0;d<c.length;d++){const f=c[d];nv.call(a,f)&&o(a[f],f)}}return r}const Wg=(e,t,n,{allOwnKeys:r}={})=>(Cn(t,(o,s)=>{n&&De(o)?Object.defineProperty(e,s,{__proto__:null,value:Vc(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),zg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kg=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Kt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Zg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Qg=e=>{if(!e)return null;if(Ct(e))return e;let t=e.length;if(!zc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kt(Uint8Array)),Xg=(e,t)=>{const r=(e&&e[Sn]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Jg=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ev=ze("HTMLFormElement"),tv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:nv}=Object.prototype,rv=ze("RegExp"),Zc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Cn(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},ov=e=>{Zc(e,(t,n)=>{if(De(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(De(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},sv=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Ct(e)?r(e):r(String(e).split(t)),n},av=()=>{},iv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function cv(e){return!!(e&&De(e.append)&&e[qc]==="FormData"&&e[Sn])}const lv=e=>{const t=new WeakSet,n=r=>{if(Xt(r)){if(t.has(r))return;if(Yt(r))return r;if(!("toJSON"in r)){t.add(r);const o=Ct(r)?[]:{};return Cn(r,(s,i)=>{const a=n(s);!Zt(a)&&(o[i]=a)}),t.delete(r),o}}return r};return n(e)},uv=ze("AsyncFunction"),dv=e=>e&&(Xt(e)||De(e))&&De(e.then)&&De(e.catch),Qc=((e,t)=>e?setImmediate:t?((n,r)=>(vt.addEventListener("message",({source:o,data:s})=>{o===vt&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",De(vt.postMessage)),fv=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||Qc,Yc=e=>e!=null&&De(e[Sn]),pv=e=>e!=null&&pn(e,Sn)&&Yc(e),w={isArray:Ct,isArrayBuffer:Wc,isBuffer:Yt,isFormData:Fg,isArrayBufferView:Rg,isString:Pg,isNumber:zc,isBoolean:Ag,isObject:Xt,isPlainObject:zn,isEmptyObject:Og,isReadableStream:Bg,isRequest:Ug,isResponse:Hg,isHeaders:Vg,isUndefined:Zt,isDate:Ng,isFile:_g,isReactNativeBlob:Ig,isReactNative:Mg,isBlob:Dg,isRegExp:rv,isFunction:De,isStream:Lg,isURLSearchParams:$g,isTypedArray:Yg,isFileList:jg,forEach:Cn,merge:Eo,extend:Wg,trim:qg,stripBOM:zg,inherits:Gg,toFlatObject:Kg,kindOf:ls,kindOfTest:ze,endsWith:Zg,toArray:Qg,forEachEntry:Xg,matchAll:Jg,isHTMLForm:ev,hasOwnProperty:tr,hasOwnProp:tr,hasOwnInPrototypeChain:pn,getSafeProp:Tg,reduceDescriptors:Zc,freezeMethods:ov,toObjectSet:sv,toCamelCase:tv,noop:av,toFiniteNumber:iv,findKey:Gc,global:vt,isContextDefined:Kc,isSpecCompliantForm:cv,toJSONObject:lv,isAsyncFn:uv,isThenable:dv,setImmediate:Qc,asap:fv,isIterable:Yc,isSafeIterable:pv},hv=w.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"]),mv=e=>{const t={};let n,r,o;return e&&e.split(`
52
+ `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&hv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function gv(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const vv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),yv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function us(e,t){return w.isArray(e)?e.map(n=>us(n,t)):gv(String(e).replace(t,""))}const bv=e=>us(e,vv),xv=e=>us(e,yv);function Xc(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=xv(n)}),t}const Pa=Symbol("internals");function on(e){return e&&String(e).trim().toLowerCase()}function Gn(e){return e===!1||e==null?e:w.isArray(e)?e.map(Gn):bv(String(e))}function wv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ev=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qr(e,t,n,r,o){if(w.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function Sv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Cv(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let Re=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,c,d){const f=on(c);if(!f)return;const u=w.findKey(o,f);(!u||o[u]===void 0||d===!0||d===void 0&&o[u]!==!1)&&(o[u||c]=Gn(a))}const i=(a,c)=>w.forEach(a,(d,f)=>s(d,f,c));if(w.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(w.isString(t)&&(t=t.trim())&&!Ev(t))i(mv(t),n);else if(w.isObject(t)&&w.isSafeIterable(t)){let a=Object.create(null),c,d;for(const f of t){if(!w.isArray(f))throw new TypeError("Object iterator must return a key-value pair");d=f[0],w.hasOwnProp(a,d)?(c=a[d],a[d]=w.isArray(c)?[...c,f[1]]:[c,f[1]]):a[d]=f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=on(t),t){const r=w.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return wv(o);if(w.isFunction(n))return n.call(this,o,r);if(w.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=on(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Qr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=on(i),i){const a=w.findKey(r,i);a&&(!n||Qr(r,r[a],a,n))&&(delete r[a],o=!0)}}return w.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Qr(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return w.forEach(this,(o,s)=>{const i=w.findKey(r,s);if(i){n[i]=Gn(o),delete n[s];return}const a=t?Sv(s):String(s).trim();a!==s&&delete n[s],n[a]=Gn(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
53
+ `)}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 r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Pa]=this[Pa]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=on(i);r[a]||(Cv(o,i),r[a]=!0)}return w.isArray(t)?t.forEach(s):s(t),this}};Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w.reduceDescriptors(Re.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});w.freezeMethods(Re);const Tv="[REDACTED ****]";function Rv(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Pv(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],o=s=>{if(s===null||typeof s!="object"||w.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof Re&&(s=s.toJSON()),r.push(s);let i;if(w.isArray(s))i=[],s.forEach((a,c)=>{const d=o(a);w.isUndefined(d)||(i[c]=d)});else{if(!w.isPlainObject(s)&&Rv(s))return r.pop(),s;i=Object.create(null);for(const[a,c]of Object.entries(s)){const d=n.has(a.toLowerCase())?Tv:o(c);w.isUndefined(d)||(i[a]=d)}}return r.pop(),i};return o(e)}let N=class Jc extends Error{static from(t,n,r,o,s,i){const a=new Jc(t.message,n||t.code,r,o,s);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),i&&Object.assign(a,i),a}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,n=t&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?Pv(t,n):w.toJSONObject(t);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:r,code:this.code,status:this.status}}};N.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";N.ERR_BAD_OPTION="ERR_BAD_OPTION";N.ECONNABORTED="ECONNABORTED";N.ETIMEDOUT="ETIMEDOUT";N.ECONNREFUSED="ECONNREFUSED";N.ERR_NETWORK="ERR_NETWORK";N.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";N.ERR_DEPRECATED="ERR_DEPRECATED";N.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";N.ERR_BAD_REQUEST="ERR_BAD_REQUEST";N.ERR_CANCELED="ERR_CANCELED";N.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";N.ERR_INVALID_URL="ERR_INVALID_URL";N.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Av=null,el=100;function So(e){return w.isPlainObject(e)||w.isArray(e)}function tl(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Yr(e,t,n){return e?e.concat(t).map(function(o,s){return o=tl(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ov(e){return w.isArray(e)&&!e.some(So)}const Nv=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function yr(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!w.isUndefined(E[x])});const r=n.metaTokens,o=n.visitor||b,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?el:n.maxDepth,d=a&&w.isSpecCompliantForm(t),f=[];if(!w.isFunction(o))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(w.isDate(v))return v.toISOString();if(w.isBoolean(v))return v.toString();if(!d&&w.isBlob(v))throw new N("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(v)||w.isTypedArray(v)?d&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function h(v){if(v>c)throw new N("Object is too deeply nested ("+v+" levels). Max depth: "+c,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(v,x){if(c===1/0)return JSON.stringify(v);const E=[];return JSON.stringify(v,function(T,P){if(!w.isObject(P))return P;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(P),h(x+E.length-1),P})}function b(v,x,E){let S=v;if(w.isReactNative(t)&&w.isReactNativeBlob(v))return t.append(Yr(E,x,s),u(v)),!1;if(v&&!E&&typeof v=="object"){if(w.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=m(v,1);else if(w.isArray(v)&&Ov(v)||(w.isFileList(v)||w.endsWith(x,"[]"))&&(S=w.toArray(v)))return x=tl(x),S.forEach(function(P,R){!(w.isUndefined(P)||P===null)&&t.append(i===!0?Yr([x],R,s):i===null?x:x+"[]",u(P))}),!1}return So(v)?!0:(t.append(Yr(E,x,s),u(v)),!1)}const g=Object.assign(Nv,{defaultVisitor:b,convertValue:u,isVisitable:So});function y(v,x,E=0){if(!w.isUndefined(v)){if(h(E),f.indexOf(v)!==-1)throw new Error("Circular reference detected in "+x.join("."));f.push(v),w.forEach(v,function(T,P){(!(w.isUndefined(T)||T===null)&&o.call(t,T,w.isString(P)?P.trim():P,x,g))===!0&&y(T,x?x.concat(P):[P],E+1)}),f.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Aa(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ds(e,t){this._pairs=[],e&&yr(e,this,t)}const nl=ds.prototype;nl.append=function(t,n){this._pairs.push([t,n])};nl.toString=function(t){const n=t?function(r){return t.call(this,r,Aa)}:Aa;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function _v(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rl(e,t,n){if(!t)return e;const r=w.isFunction(n)?{serialize:n}:n,o=w.getSafeProp(r,"encode")||_v,s=w.getSafeProp(r,"serialize");let i;if(s?i=s(t,r):i=w.isURLSearchParams(t)?t.toString():new ds(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Oa{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Iv=typeof URLSearchParams<"u"?URLSearchParams:ds,Mv=typeof FormData<"u"?FormData:null,Dv=typeof Blob<"u"?Blob:null,jv={isBrowser:!0,classes:{URLSearchParams:Iv,FormData:Mv,Blob:Dv},protocols:["http","https","file","blob","url","data"]},ps=typeof window<"u"&&typeof document<"u",Co=typeof navigator=="object"&&navigator||void 0,Lv=ps&&(!Co||["ReactNative","NativeScript","NS"].indexOf(Co.product)<0),kv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fv=ps&&window.location.href||"http://localhost",$v=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ps,hasStandardBrowserEnv:Lv,hasStandardBrowserWebWorkerEnv:kv,navigator:Co,origin:Fv},Symbol.toStringTag,{value:"Module"})),Se={...$v,...jv};function Bv(e,t){return yr(e,new Se.classes.URLSearchParams,{visitor:function(n,r,o,s){return Se.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Na=el;function ol(e){if(e>Na)throw new N("FormData field is too deeply nested ("+e+" levels). Max depth: "+Na,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Uv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)ol(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Hv(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function sl(e){function t(n,r,o,s){ol(s);let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=n.length;return i=!i&&w.isArray(o)?o.length:i,c?(w.hasOwnProp(o,i)?o[i]=w.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!w.hasOwnProp(o,i)||!w.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&w.isArray(o[i])&&(o[i]=Hv(o[i])),!a)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,o)=>{t(Uv(r),o,n,0)}),n}return null}const $t=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function Vv(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Tn={transitional:fs,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=w.isObject(t);if(s&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return o?JSON.stringify(sl(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const c=$t(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bv(t,c).toString();if((a=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=$t(this,"env"),f=d&&d.FormData;return yr(a?{"files[]":t}:t,f&&new f,c)}}return s||o?(n.setContentType("application/json",!1),Vv(t)):t}],transformResponse:[function(t){const n=$t(this,"transitional")||Tn.transitional,r=n&&n.forcedJSONParsing,o=$t(this,"responseType"),s=o==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,$t(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?N.from(c,N.ERR_BAD_RESPONSE,this,null,$t(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{Tn.headers[e]={}});function Xr(e,t){const n=this||Tn,r=t||n,o=Re.from(r.headers);let s=r.data;return w.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function al(e){return!!(e&&e.__CANCEL__)}let Rn=class extends N{constructor(t,n,r){super(t??"canceled",N.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function il(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new N("Request failed with status code "+n.status,n.status>=400&&n.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,n.config,n.request,n))}function qv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Wv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=r[s];i||(i=d),n[o]=c,r[o]=d;let u=s,h=0;for(;u!==o;)h+=n[u++],u=u%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const m=f&&d-f;return m?Math.round(h*1e3/m):void 0}}function zv(e,t){let n=0,r=1e3/t,o,s;const i=(d,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const f=Date.now(),u=f-n;u>=r?i(d,f):(o=d,s||(s=setTimeout(()=>{s=null,i(o)},r-u)))},()=>o&&i(o)]}const nr=(e,t,n=3)=>{let r=0;const o=Wv(50,250);return zv(s=>{if(!s||typeof s.loaded!="number")return;const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=a!=null?Math.min(i,a):i,d=Math.max(0,c-r),f=o(d);r=Math.max(r,c);const u={loaded:c,total:a,progress:a?c/a:void 0,bytes:d,rate:f||void 0,estimated:f&&a?(a-c)/f:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(u)},n)},_a=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ia=e=>(...t)=>w.asap(()=>e(...t)),Gv=Se.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Se.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Kv=Se.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&a.push(`path=${r}`),w.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),w.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Zv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Yv=/^https?:(?!\/\/)/i,Xv=/[\t\n\r]/g;function Jv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function ey(e){return Jv(e).replace(Xv,"")}function Ma(e,t){if(typeof e=="string"&&Yv.test(ey(e)))throw new N('Invalid URL: missing "//" after protocol',N.ERR_INVALID_URL,t)}function cl(e,t,n,r){Ma(t,r);let o=!Zv(t);return e&&(o||n===!1)?(Ma(e,r),Qv(e,t)):t}const Da=e=>e instanceof Re?{...e}:e;function Tt(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,u,h,m){return w.isPlainObject(f)&&w.isPlainObject(u)?w.merge.call({caseless:m},f,u):w.isPlainObject(u)?w.merge({},u):w.isArray(u)?u.slice():u}function o(f,u,h,m){if(w.isUndefined(u)){if(!w.isUndefined(f))return r(void 0,f,h,m)}else return r(f,u,h,m)}function s(f,u){if(!w.isUndefined(u))return r(void 0,u)}function i(f,u){if(w.isUndefined(u)){if(!w.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function a(f){const u=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(u))if(w.isPlainObject(u)){if(w.hasOwnProp(u,f))return u[f]}else return;const h=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(h)&&w.hasOwnProp(h,f))return h[f]}function c(f,u,h){if(w.hasOwnProp(t,h))return r(f,u);if(w.hasOwnProp(e,h))return r(void 0,f)}const d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(f,u,h)=>o(Da(f),Da(u),h,!0)};return w.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=w.hasOwnProp(d,u)?d[u]:o,m=w.hasOwnProp(e,u)?e[u]:void 0,b=w.hasOwnProp(t,u)?t[u]:void 0,g=h(m,b,u);w.isUndefined(g)&&h!==c||(n[u]=g)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const ty=["content-type","content-length"];function ny(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{ty.includes(r.toLowerCase())&&e.set(r,o)})}const ry=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function ll(e){const t=Tt({},e),n=h=>w.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const c=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),u=n("url");if(t.headers=a=Re.from(a),t.url=rl(cl(d,u,f,t),n("params"),n("paramsSerializer")),c){const h=w.getSafeProp(c,"username")||"",m=w.getSafeProp(c,"password")||"";a.set("Authorization","Basic "+btoa(h+":"+(m?ry(m):"")))}if(w.isFormData(r)&&(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?a.setContentType(void 0):w.isFunction(r.getHeaders)&&ny(a,r.getHeaders(),n("formDataHeaderPolicy"))),Se.hasStandardBrowserEnv&&(w.isFunction(o)&&(o=o(t)),o===!0||o==null&&Gv(t.url))){const m=s&&i&&Kv.read(i);m&&a.set(s,m)}return t}const oy=typeof XMLHttpRequest<"u",sy=oy&&function(e){return new Promise(function(n,r){const o=ll(e);let s=o.data;const i=Re.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:d}=o,f,u,h,m,b;function g(){m&&m(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function v(){if(!y)return;const E=Re.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:E,config:e,request:y};il(function(R){n(R),g()},function(R){r(R),g()},T),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(v)},y.onabort=function(){y&&(r(new N("Request aborted",N.ECONNABORTED,e,y)),g(),y=null)},y.onerror=function(S){const T=S&&S.message?S.message:"Network Error",P=new N(T,N.ERR_NETWORK,e,y);P.event=S||null,r(P),g(),y=null},y.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||fs;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new N(S,T.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,y)),g(),y=null},s===void 0&&i.setContentType(null),"setRequestHeader"in y&&w.forEach(Xc(i),function(S,T){y.setRequestHeader(T,S)}),w.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),a&&a!=="json"&&(y.responseType=o.responseType),d&&([h,b]=nr(d,!0),y.addEventListener("progress",h)),c&&y.upload&&([u,m]=nr(c),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=E=>{y&&(r(!E||E.type?new Rn(null,e,y):E),y.abort(),g(),y=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=qv(o.url);if(x&&!Se.protocols.includes(x)){r(new N("Unsupported protocol "+x+":",N.ERR_BAD_REQUEST,e));return}y.send(s||null)})},ay=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(c){if(!r){r=!0,i();const d=c instanceof Error?c:this.reason;n.abort(d instanceof N?d:new Rn(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new N(`timeout of ${t}ms exceeded`,N.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>w.asap(i),a},iy=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},cy=async function*(e,t){for await(const n of ly(e))yield*iy(n,t)},ly=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ja=(e,t,n,r)=>{const o=cy(e,t);let s=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await o.next();if(d){a(),c.close();return}let u=f.byteLength;if(n){let h=s+=u;n(h)}c.enqueue(new Uint8Array(f))}catch(d){throw a(d),d}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},rr=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,uy=(e,t,n)=>t+2<n&&rr(e.charCodeAt(t+1))&&rr(e.charCodeAt(t+2));function dy(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let i=r.length;const a=r.length;for(let m=0;m<a;m++)if(r.charCodeAt(m)===37&&m+2<a){const b=r.charCodeAt(m+1),g=r.charCodeAt(m+2);rr(b)&&rr(g)&&(i-=2,m+=2)}let c=0,d=a-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);d>=0&&(r.charCodeAt(d)===61?(c++,d--):f(d)&&(c++,d-=3)),c===1&&d>=0&&(r.charCodeAt(d)===61||f(d))&&c++;const h=Math.floor(i/4)*3-(c||0);return h>0?h:0}let s=0;for(let i=0,a=r.length;i<a;i++){const c=r.charCodeAt(i);if(c===37&&uy(r,i,a))s+=1,i+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&i+1<a){const d=r.charCodeAt(i+1);d>=56320&&d<=57343?(s+=4,i++):s+=3}else s+=3}return s}const hs="1.18.0",La=64*1024,{isFunction:Hn}=w,fy=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ka=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Fa=(e,...t)=>{try{return!!e(...t)}catch{return!1}},py=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},hy=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?Hn(o):typeof fetch=="function",c=Hn(s),d=Hn(i);if(!a)return!1;const f=a&&Hn(n),u=a&&(typeof r=="function"?(v=>x=>v.encode(x))(new r):async v=>new Uint8Array(await new s(v).arrayBuffer())),h=c&&f&&Fa(()=>{let v=!1;const x=new s(Se.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),E=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),v&&!E}),m=d&&f&&Fa(()=>w.isReadableStream(new i("").body)),b={stream:m&&(v=>v.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!b[v]&&(b[v]=(x,E)=>{let S=x&&x[v];if(S)return S.call(x);throw new N(`Response type '${v}' is not supported`,N.ERR_NOT_SUPPORT,E)})});const g=async v=>{if(v==null)return 0;if(w.isBlob(v))return v.size;if(w.isSpecCompliantForm(v))return(await new s(Se.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(w.isArrayBufferView(v)||w.isArrayBuffer(v))return v.byteLength;if(w.isURLSearchParams(v)&&(v=v+""),w.isString(v))return(await u(v)).byteLength},y=async(v,x)=>{const E=w.toFiniteNumber(v.getContentLength());return E??g(x)};return async v=>{let{url:x,method:E,data:S,signal:T,cancelToken:P,timeout:R,onDownloadProgress:A,onUploadProgress:_,responseType:D,headers:k,withCredentials:U="same-origin",fetchOptions:H,maxContentLength:Q,maxBodyLength:ne}=ll(v);const L=w.isNumber(Q)&&Q>-1,Z=w.isNumber(ne)&&ne>-1,te=F=>w.hasOwnProp(v,F)?v[F]:void 0;let I=o||fetch;D=D?(D+"").toLowerCase():"text";let J=ay([T,P&&P.toAbortSignal()],R),W=null;const ae=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let $,q=null;const V=()=>new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,v,W);try{let F;const O=te("auth");if(O){const B=w.getSafeProp(O,"username")||"",ie=w.getSafeProp(O,"password")||"";F={username:B,password:ie}}if(py(x)){const B=new URL(x,Se.origin);if(!F&&(B.username||B.password)){const ie=ka(B.username),ye=ka(B.password);F={username:ie,password:ye}}(B.username||B.password)&&(B.username="",B.password="",x=B.href)}if(F&&(k.delete("authorization"),k.set("Authorization","Basic "+btoa(fy((F.username||"")+":"+(F.password||""))))),L&&typeof x=="string"&&x.startsWith("data:")&&dy(x)>Q)throw new N("maxContentLength size of "+Q+" exceeded",N.ERR_BAD_RESPONSE,v,W);if(Z&&E!=="get"&&E!=="head"){const B=await g(S);if(typeof B=="number"&&isFinite(B)&&($=B,B>ne))throw V()}const j=Z&&(w.isReadableStream(S)||w.isStream(S)),oe=(B,ie,ye)=>ja(B,La,pe=>{if(Z&&pe>ne)throw q=V();ie&&ie(pe)},ye);if(h&&E!=="get"&&E!=="head"&&(_||j)){if($=$??await y(k,S),$!==0||j){let B=new s(x,{method:"POST",body:S,duplex:"half"}),ie;if(w.isFormData(S)&&(ie=B.headers.get("content-type"))&&k.setContentType(ie),B.body){const[ye,pe]=_&&_a($,nr(Ia(_)))||[];S=oe(B.body,ye,pe)}}}else if(j&&!c&&f&&E!=="get"&&E!=="head")S=oe(S);else if(j&&c&&!h&&E!=="get"&&E!=="head")throw new N("Stream request bodies are not supported by the current fetch implementation",N.ERR_NOT_SUPPORT,v,W);w.isString(U)||(U=U?"include":"omit");const ee=c&&"credentials"in s.prototype;if(w.isFormData(S)){const B=k.getContentType();B&&/^multipart\/form-data/i.test(B)&&!/boundary=/i.test(B)&&k.delete("content-type")}k.set("User-Agent","axios/"+hs,!1);const X={...H,signal:J,method:E.toUpperCase(),headers:Xc(k.normalize()),body:S,duplex:"half",credentials:ee?U:void 0};W=c&&new s(x,X);let G=await(c?I(W,H):I(x,X));const me=Re.from(G.headers);if(L){const B=w.toFiniteNumber(me.getContentLength());if(B!=null&&B>Q)throw new N("maxContentLength size of "+Q+" exceeded",N.ERR_BAD_RESPONSE,v,W)}const ve=m&&(D==="stream"||D==="response");if(m&&G.body&&(A||L||ve&&ae)){const B={};["status","statusText","headers"].forEach(he=>{B[he]=G[he]});const ie=w.toFiniteNumber(me.getContentLength()),[ye,pe]=A&&_a(ie,nr(Ia(A),!0))||[];let Le=0;const tn=he=>{if(L&&(Le=he,Le>Q))throw new N("maxContentLength size of "+Q+" exceeded",N.ERR_BAD_RESPONSE,v,W);ye&&ye(he)};G=new i(ja(G.body,La,tn,()=>{pe&&pe(),ae&&ae()}),B)}D=D||"text";let xe=await b[w.findKey(b,D)||"text"](G,v);if(L&&!m&&!ve){let B;if(xe!=null&&(typeof xe.byteLength=="number"?B=xe.byteLength:typeof xe.size=="number"?B=xe.size:typeof xe=="string"&&(B=typeof r=="function"?new r().encode(xe).byteLength:xe.length)),typeof B=="number"&&B>Q)throw new N("maxContentLength size of "+Q+" exceeded",N.ERR_BAD_RESPONSE,v,W)}return!ve&&ae&&ae(),await new Promise((B,ie)=>{il(B,ie,{data:xe,headers:Re.from(G.headers),status:G.status,statusText:G.statusText,config:v,request:W})})}catch(F){if(ae&&ae(),J&&J.aborted&&J.reason instanceof N){const O=J.reason;throw O.config=v,W&&(O.request=W),F!==O&&(O.cause=F),O}throw q?(W&&!q.request&&(q.request=W),q):F instanceof N?(W&&!F.request&&(F.request=W),F):F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,v,W,F&&F.response),{cause:F.cause||F}):N.from(F,F&&F.code,v,W,F&&F.response)}}},my=new Map,ul=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,c,d,f=my;for(;a--;)c=s[a],d=f.get(c),d===void 0&&f.set(c,d=a?new Map:hy(t)),f=d;return d};ul();const ms={http:Av,xhr:sy,fetch:{get:ul}};w.forEach(ms,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const $a=e=>`- ${e}`,gy=e=>w.isFunction(e)||e===null||e===!1;function vy(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){r=e[i];let a;if(o=r,!gy(r)&&(o=ms[(a=String(r)).toLowerCase()],o===void 0))throw new N(`Unknown adapter '${a}'`);if(o&&(w.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
54
+ `+i.map($a).join(`
55
+ `):" "+$a(i[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const dl={getAdapter:vy,adapters:ms};function Jr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Rn(null,e)}function Ba(e){return Jr(e),e.headers=Re.from(e.headers),e.data=Xr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dl.getAdapter(e.adapter||Tn.adapter,e)(e).then(function(r){Jr(e),e.response=r;try{r.data=Xr.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Re.from(r.headers),r},function(r){if(!al(r)&&(Jr(e),r&&r.response)){e.response=r.response;try{r.response.data=Xr.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Re.from(r.response.headers)}return Promise.reject(r)})}const br={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{br[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ua={};br.transitional=function(t,n,r){function o(s,i){return"[Axios v"+hs+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new N(o(i," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!Ua[i]&&(Ua[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};br.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function yy(e,t,n){if(typeof e!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new N("option "+s+" must be "+c,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+s,N.ERR_BAD_OPTION)}}const Kn={assertOptions:yy,validators:br},Te=Kn.validators;let yt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Oa,response:new Oa}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
56
+ `);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
57
+ `),a=i===-1?-1:s.indexOf(`
58
+ `,i+1),c=a===-1?"":s.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
59
+ `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Tt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Kn.assertOptions(r,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean),legacyInterceptorReqResOrdering:Te.transitional(Te.boolean),advertiseZstdAcceptEncoding:Te.transitional(Te.boolean),validateStatusUndefinedResolves:Te.transitional(Te.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:Kn.assertOptions(o,{encode:Te.function,serialize:Te.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Kn.assertOptions(n,{baseUrl:Te.spelling("baseURL"),withXsrfToken:Te.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&w.merge(s.common,s[n.method]);s&&w.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete s[b]}),n.headers=Re.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;c=c&&g.synchronous;const y=n.transitional||fs;y&&y.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let f,u=0,h;if(!c){const b=[Ba.bind(this),void 0];for(b.unshift(...a),b.push(...d),h=b.length,f=Promise.resolve(n);u<h;)f=f.then(b[u++],b[u++]);return f}h=a.length;let m=n;for(;u<h;){const b=a[u++],g=a[u++];try{m=b(m)}catch(y){g.call(this,y);break}}try{f=Ba.call(this,m)}catch(b){return Promise.reject(b)}for(u=0,h=d.length;u<h;)f=f.then(d[u++],d[u++]);return f}getUri(t){t=Tt(this.defaults,t);const n=cl(t.baseURL,t.url,t.allowAbsoluteUrls,t);return rl(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){yt.prototype[t]=function(n,r){return this.request(Tt(r||{},{method:t,url:n,data:r&&w.hasOwnProp(r,"data")?r.data:void 0}))}});w.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,i,a){return this.request(Tt(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}yt.prototype[t]=n(),t!=="query"&&(yt.prototype[t+"Form"]=n(!0))});let by=class fl{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 r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new Rn(s,i,a),n(r.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=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fl(function(o){t=o}),cancel:t}}};function xy(e){return function(n){return e.apply(null,n)}}function wy(e){return w.isObject(e)&&e.isAxiosError===!0}const To={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(To).forEach(([e,t])=>{To[t]=e});function pl(e){const t=new yt(e),n=Vc(yt.prototype.request,t);return w.extend(n,yt.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return pl(Tt(e,o))},n}const ue=pl(Tn);ue.Axios=yt;ue.CanceledError=Rn;ue.CancelToken=by;ue.isCancel=al;ue.VERSION=hs;ue.toFormData=yr;ue.AxiosError=N;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=xy;ue.isAxiosError=wy;ue.mergeConfig=Tt;ue.AxiosHeaders=Re;ue.formToJSON=e=>sl(w.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=dl.getAdapter;ue.HttpStatusCode=To;ue.default=ue;const{Axios:cE,AxiosError:lE,CanceledError:uE,isCancel:dE,CancelToken:fE,VERSION:pE,all:hE,Cancel:mE,isAxiosError:gE,spread:vE,toFormData:yE,AxiosHeaders:bE,HttpStatusCode:xE,formToJSON:wE,getAdapter:EE,mergeConfig:SE,create:CE}=ue,Ey=e=>!e||e.length===0?null:[...new Set(e)].sort(),Sy=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),Cy=e=>!e||e.length===0?null:[...new Set(e)].sort(),TE={notes:{all:()=>["notes"],listAll:()=>["notes","list"],list:(e={})=>["notes","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??null,sortOrder:e.sortOrder??null,pinnedFirst:e.pinnedFirst??null,fields:Ey(e.fields)}],tagListAll:()=>["notes","tag-list"],tagList:(e={})=>["notes","tag-list",{limit:e.limit??25,offset:e.offset??0,query:e.query??""}],tagNameListAll:()=>["notes","tag-name-list"],tagNameList:e=>["notes","tag-name-list",{limit:e.limit??25,offset:e.offset??0,mode:e.mode??"and",tagNames:Sy(e.tagNames)}],detail:e=>["notes","detail",{id:e}],snapshots:(e,t=10)=>["notes","snapshots",{id:e,limit:t}],snapshotDetail:e=>["notes","snapshot-detail",{id:e}],trashAll:()=>["notes","trash"],trash:(e={})=>["notes","trash",{limit:e.limit??25,offset:e.offset??0}],trashDetail:e=>["notes","trash","detail",{id:e}],pinned:()=>["notes","pinned"],backReferencesAll:()=>["notes","back-references"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"],propertyKeysAll:()=>["notes","property-keys"],propertyKeys:(e={})=>["notes","property-keys",{query:e.query??"",limit:e.limit??50,offset:e.offset??0}]},tags:{all:()=>["tags"],list:(e={})=>["tags","list",{limit:e.limit??50,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??"referenceCount",sortOrder:e.sortOrder??"desc"}]},images:{all:()=>["images"],listAll:()=>["images","list"],list:(e={})=>["images","list",{limit:e.limit??50,offset:e.offset??0}],detail:e=>["images","detail",{id:e}],notes:e=>["images","notes",{id:e}]},reminders:{all:()=>["reminders"],note:(e,t={})=>["reminders","note",e,{limit:t.limit??10,offset:t.offset??0}],noteAllPages:e=>["reminders","note",e],upcoming:(e={})=>["reminders","upcoming",{limit:e.limit??10,offset:e.offset??0}],upcomingAllPages:()=>["reminders","upcoming"],inDateRangeAll:()=>["reminders","in-date-range"],inDateRange:(e,t)=>["reminders","in-date-range",{year:e,month:t}]},placeholders:{all:()=>["placeholders"],listAll:()=>["placeholders","list"],list:(e={})=>["placeholders","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",fields:Cy(e.fields)}]},calendar:{all:()=>["calendar"],notesInDateRange:(e,t)=>["calendar","notes-in-date-range",{year:e,month:t}]},views:{all:()=>["views"],workspace:()=>["views","workspace"],section:e=>["views","section",{id:e}],sectionNotesAll:()=>["views","section-notes"],sectionNotes:(e,t={})=>["views","section-notes",{id:e,limit:t.limit??25,offset:t.offset??0}]},ui:{heroBanner:()=>["ui","hero-banner"]}},Ty={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Ha={sm:10,md:12,lg:14},Ry=l.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>p.jsxs("label",{className:fe("relative inline-flex items-center justify-center cursor-pointer",r&&"cursor-not-allowed opacity-50",e),children:[p.jsx("input",{ref:s,type:"checkbox",checked:n,disabled:r,className:"sr-only peer",...o}),p.jsx("span",{className:fe(Ty[t],"flex items-center justify-center","border border-border-secondary","rounded-[6px]","bg-surface","transition-all duration-200","peer-checked:bg-cta","peer-checked:border-cta","focus-ring-soft","peer-focus-visible:border-border-focus","peer-focus-visible:shadow-[0_0_0_4px_color-mix(in_srgb,var(--accent-soft-primary)_90%,transparent)]"),children:n&&p.jsx(Fm,{width:Ha[t],height:Ha[t],className:"text-fg-on-filled",weight:"bold"})})]}));Ry.displayName="Checkbox";var Py=lc,Ay=uc,hl=dc,ml=fc,Oy=rs,gl=pc,vl=hc;const Ny=Py,_y=Ay,Iy=Oy,yl=l.createContext("default"),Pn=()=>l.useContext(yl),bl=l.forwardRef(({className:e,...t},n)=>p.jsx(hl,{ref:n,className:fe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e),...t}));bl.displayName=hl.displayName;const xl=l.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>p.jsxs(_y,{children:[p.jsx(bl,{}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:p.jsx(ml,{ref:o,"data-dialog-variant":n,className:os({variant:n,className:e}),...r,children:p.jsx(yl.Provider,{value:n,children:t})})})]}));xl.displayName=ml.displayName;const wl=({title:e,onClose:t,className:n})=>{const r=Pn();return p.jsxs("div",{className:Hm({variant:r,className:n}),children:[p.jsx(Cl,{children:e}),t&&p.jsx(Iy,{asChild:!0,children:p.jsx("button",{type:"button","aria-label":"Close dialog",className:Vm({variant:r}),onClick:t,children:p.jsx(Bm,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};wl.displayName="DialogHeader";const El=l.forwardRef(({className:e,...t},n)=>{const r=Pn();return p.jsx("div",{ref:n,className:ss({variant:r,className:e}),...t})});El.displayName="DialogBody";const Sl=l.forwardRef(({className:e,...t},n)=>{const r=Pn();return p.jsx("div",{ref:n,className:as({variant:r,className:e}),...t})});Sl.displayName="DialogFooter";const Cl=l.forwardRef(({className:e,...t},n)=>{const r=Pn();return p.jsx(gl,{ref:n,className:fe(is({variant:r}),e),...t})});Cl.displayName=gl.displayName;const Tl=l.forwardRef(({className:e,...t},n)=>{const r=Pn();return p.jsx(vl,{ref:n,className:fe(cs({variant:r}),e),...t})});Tl.displayName=vl.displayName;const xr=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>p.jsx(Ny,{open:e,onOpenChange:s=>!s&&t(),children:p.jsx(xl,{variant:o,className:r,children:n})});xr.Header=wl;xr.Body=El;xr.Footer=Sl;xr.Description=Tl;function gs(e){const t=e+"CollectionProvider",[n,r]=Xe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:y,children:v}=g,x=C.useRef(null),E=C.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:E,collectionRef:x,children:v})};i.displayName=t;const a=e+"CollectionSlot",c=Gt(a),d=C.forwardRef((g,y)=>{const{scope:v,children:x}=g,E=s(a,v),S=re(y,E.collectionRef);return p.jsx(c,{ref:S,children:x})});d.displayName=a;const f=e+"CollectionItemSlot",u="data-radix-collection-item",h=Gt(f),m=C.forwardRef((g,y)=>{const{scope:v,children:x,...E}=g,S=C.useRef(null),T=re(y,S),P=s(f,v);return C.useEffect(()=>(P.itemMap.set(S,{ref:S,...E}),()=>{P.itemMap.delete(S)})),p.jsx(h,{[u]:"",ref:T,children:x})});m.displayName=f;function b(g){const y=s(e+"CollectionConsumer",g);return C.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const E=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((P,R)=>E.indexOf(P.ref.current)-E.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},b,r]}var My=l.createContext(void 0);function wr(e){const t=l.useContext(My);return e||t||"ltr"}var Dy="Arrow",Rl=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(Y.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rl.displayName=Dy;var jy=Rl;function Ly(e){const[t,n]=l.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,a=d.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vs="Popper",[Pl,Jt]=Xe(vs),[ky,Al]=Pl(vs),Ol=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return p.jsx(ky,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ol.displayName=vs;var Nl="PopperAnchor",_l=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Al(Nl,n),i=l.useRef(null),a=re(t,i),c=l.useRef(null);return l.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&s.onAnchorChange(c.current)}),r?null:p.jsx(Y.div,{...o,ref:a})});_l.displayName=Nl;var ys="PopperContent",[Fy,$y]=Pl(ys),Il=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,y=Al(ys,n),[v,x]=l.useState(null),E=re(t,O=>x(O)),[S,T]=l.useState(null),P=Ly(S),R=P?.width??0,A=P?.height??0,_=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(d)?d:[d],U=k.length>0,H={padding:D,boundary:k.filter(Uy),altBoundary:U},{refs:Q,floatingStyles:ne,placement:L,isPositioned:Z,middlewareData:te}=Kd({strategy:"fixed",placement:_,whileElementsMounted:(...O)=>tf(...O,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Zd({mainAxis:o+A,alignmentAxis:i}),c&&Qd({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?nf():void 0,...H}),c&&Yd({...H}),Xd({...H,apply:({elements:O,rects:j,availableWidth:oe,availableHeight:ee})=>{const{width:X,height:G}=j.reference,me=O.floating.style;me.setProperty("--radix-popper-available-width",`${oe}px`),me.setProperty("--radix-popper-available-height",`${ee}px`),me.setProperty("--radix-popper-anchor-width",`${X}px`),me.setProperty("--radix-popper-anchor-height",`${G}px`)}}),S&&Jd({element:S,padding:a}),Hy({arrowWidth:R,arrowHeight:A}),h&&ef({strategy:"referenceHidden",...H})]}),[I,J]=jl(L),W=Ye(b);Pe(()=>{Z&&W?.()},[Z,W]);const ae=te.arrow?.x,$=te.arrow?.y,q=te.arrow?.centerOffset!==0,[V,F]=l.useState();return Pe(()=>{v&&F(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Z?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Fy,{scope:n,placedSide:I,onArrowChange:T,arrowX:ae,arrowY:$,shouldHideArrow:q,children:p.jsx(Y.div,{"data-side":I,"data-align":J,...g,ref:E,style:{...g.style,animation:Z?void 0:"none"}})})})});Il.displayName=ys;var Ml="PopperArrow",By={top:"bottom",right:"left",bottom:"top",left:"right"},Dl=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=$y(Ml,r),i=By[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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(jy,{...o,ref:n,style:{...o.style,display:"block"}})})});Dl.displayName=Ml;function Uy(e){return e!==null}var Hy=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,f]=jl(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+c/2;let b="",g="";return d==="bottom"?(b=i?u:`${h}px`,g=`${-c}px`):d==="top"?(b=i?u:`${h}px`,g=`${r.floating.height+c}px`):d==="right"?(b=`${-c}px`,g=i?u:`${m}px`):d==="left"&&(b=`${r.floating.width+c}px`,g=i?u:`${m}px`),{data:{x:b,y:g}}}});function jl(e){const[t,n="center"]=e.split("-");return[t,n]}var bs=Ol,xs=_l,ws=Il,Es=Dl,eo="rovingFocusGroup.onEntryFocus",Vy={bubbles:!1,cancelable:!0},An="RovingFocusGroup",[Ro,Ll,qy]=gs(An),[Wy,Er]=Xe(An,[qy]),[zy,Gy]=Wy(An),kl=l.forwardRef((e,t)=>p.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ky,{...e,ref:t})})}));kl.displayName=An;var Ky=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...u}=e,h=l.useRef(null),m=re(t,h),b=wr(s),[g,y]=nt({prop:i,defaultProp:a??null,onChange:c,caller:An}),[v,x]=l.useState(!1),E=Ye(d),S=Ll(n),T=l.useRef(!1),[P,R]=l.useState(0);return l.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(eo,E),()=>A.removeEventListener(eo,E)},[E]),p.jsx(zy,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>R(A=>A-1),[]),children:p.jsx(Y.div,{tabIndex:v||P===0?-1:0,"data-orientation":r,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{T.current=!0}),onFocus:M(e.onFocus,A=>{const _=!T.current;if(A.target===A.currentTarget&&_&&!v){const D=new CustomEvent(eo,Vy);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const k=S().filter(L=>L.focusable),U=k.find(L=>L.active),H=k.find(L=>L.id===g),ne=[U,H,...k].filter(Boolean).map(L=>L.ref.current);Bl(ne,f)}}T.current=!1}),onBlur:M(e.onBlur,()=>x(!1))})})}),Fl="RovingFocusGroupItem",$l=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=Ze(),d=s||c,f=Gy(Fl,n),u=f.currentTabStopId===d,h=Ll(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),p.jsx(Ro.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:p.jsx(Y.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:M(e.onMouseDown,y=>{r?f.onItemFocus(d):y.preventDefault()}),onFocus:M(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:M(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=Yy(y,f.orientation,f.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let E=h().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")E.reverse();else if(v==="prev"||v==="next"){v==="prev"&&E.reverse();const S=E.indexOf(y.currentTarget);E=f.loop?Xy(E,S+1):E.slice(S+1)}setTimeout(()=>Bl(E))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:g!=null}):i})})});$l.displayName=Fl;var Zy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yy(e,t,n){const r=Qy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Zy[r]}function Bl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Xy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ul=kl,Hl=$l,Po=["Enter"," "],Jy=["ArrowDown","PageUp","Home"],Vl=["ArrowUp","PageDown","End"],e0=[...Jy,...Vl],t0={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},n0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},On="Menu",[hn,r0,o0]=gs(On),[Ot,ql]=Xe(On,[o0,Jt,Er]),Sr=Jt(),Wl=Er(),[s0,Nt]=Ot(On),[a0,Nn]=Ot(On),zl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Sr(t),[c,d]=l.useState(null),f=l.useRef(!1),u=Ye(s),h=wr(o);return l.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),p.jsx(bs,{...a,children:p.jsx(s0,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:d,children:p.jsx(a0,{scope:t,onClose:l.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:h,modal:i,children:r})})})};zl.displayName=On;var i0="MenuAnchor",Ss=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Sr(n);return p.jsx(xs,{...o,...r,ref:t})});Ss.displayName=i0;var Cs="MenuPortal",[c0,Gl]=Ot(Cs,{forceMount:void 0}),Kl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Nt(Cs,t);return p.jsx(c0,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(En,{asChild:!0,container:o,children:r})})})};Kl.displayName=Cs;var Be="MenuContent",[l0,Ts]=Ot(Be),Zl=l.forwardRef((e,t)=>{const n=Gl(Be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Nt(Be,e.__scopeMenu),i=Nn(Be,e.__scopeMenu);return p.jsx(hn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(hn.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(u0,{...o,ref:t}):p.jsx(d0,{...o,ref:t})})})})}),u0=l.forwardRef((e,t)=>{const n=Nt(Be,e.__scopeMenu),r=l.useRef(null),o=re(t,r);return l.useEffect(()=>{const s=r.current;if(s)return Jo(s)},[]),p.jsx(Rs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),d0=l.forwardRef((e,t)=>{const n=Nt(Be,e.__scopeMenu);return p.jsx(Rs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),f0=Gt("MenuContent.ScrollLock"),Rs=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:m,disableOutsideScroll:b,...g}=e,y=Nt(Be,n),v=Nn(Be,n),x=Sr(n),E=Wl(n),S=r0(n),[T,P]=l.useState(null),R=l.useRef(null),A=re(t,R,y.onContentChange),_=l.useRef(0),D=l.useRef(""),k=l.useRef(0),U=l.useRef(null),H=l.useRef("right"),Q=l.useRef(0),ne=b?mr:l.Fragment,L=b?{as:f0,allowPinchZoom:!0}:void 0,Z=I=>{const J=D.current+I,W=S().filter(O=>!O.disabled),ae=document.activeElement,$=W.find(O=>O.ref.current===ae)?.textValue,q=W.map(O=>O.textValue),V=C0(q,J,$),F=W.find(O=>O.textValue===V)?.ref.current;(function O(j){D.current=j,window.clearTimeout(_.current),j!==""&&(_.current=window.setTimeout(()=>O(""),1e3))})(J),F&&setTimeout(()=>F.focus())};l.useEffect(()=>()=>window.clearTimeout(_.current),[]),Xo();const te=l.useCallback(I=>H.current===U.current?.side&&R0(I,U.current?.area),[]);return p.jsx(l0,{scope:n,searchRef:D,onItemEnter:l.useCallback(I=>{te(I)&&I.preventDefault()},[te]),onItemLeave:l.useCallback(I=>{te(I)||(R.current?.focus(),P(null))},[te]),onTriggerLeave:l.useCallback(I=>{te(I)&&I.preventDefault()},[te]),pointerGraceTimerRef:k,onPointerGraceIntentChange:l.useCallback(I=>{U.current=I},[]),children:p.jsx(ne,{...L,children:p.jsx(pr,{asChild:!0,trapped:o,onMountAutoFocus:M(s,I=>{I.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(wn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:m,children:p.jsx(Ul,{asChild:!0,...E,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:P,onEntryFocus:M(c,I=>{v.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(ws,{role:"menu","aria-orientation":"vertical","data-state":du(y.open),"data-radix-menu-content":"",dir:v.dir,...x,...g,ref:A,style:{outline:"none",...g.style},onKeyDown:M(g.onKeyDown,I=>{const W=I.target.closest("[data-radix-menu-content]")===I.currentTarget,ae=I.ctrlKey||I.altKey||I.metaKey,$=I.key.length===1;W&&(I.key==="Tab"&&I.preventDefault(),!ae&&$&&Z(I.key));const q=R.current;if(I.target!==q||!e0.includes(I.key))return;I.preventDefault();const F=S().filter(O=>!O.disabled).map(O=>O.ref.current);Vl.includes(I.key)&&F.reverse(),E0(F)}),onBlur:M(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(_.current),D.current="")}),onPointerMove:M(e.onPointerMove,mn(I=>{const J=I.target,W=Q.current!==I.clientX;if(I.currentTarget.contains(J)&&W){const ae=I.clientX>Q.current?"right":"left";H.current=ae,Q.current=I.clientX}}))})})})})})})});Zl.displayName=Be;var p0="MenuGroup",Ps=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Y.div,{role:"group",...r,ref:t})});Ps.displayName=p0;var h0="MenuLabel",Ql=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Y.div,{...r,ref:t})});Ql.displayName=h0;var or="MenuItem",Va="menu.itemSelect",Cr=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),i=Nn(or,e.__scopeMenu),a=Ts(or,e.__scopeMenu),c=re(t,s),d=l.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const h=new CustomEvent(Va,{bubbles:!0,cancelable:!0});u.addEventListener(Va,m=>r?.(m),{once:!0}),Di(u,h),h.defaultPrevented?d.current=!1:i.onClose()}};return p.jsx(Yl,{...o,ref:c,disabled:n,onClick:M(e.onClick,f),onPointerDown:u=>{e.onPointerDown?.(u),d.current=!0},onPointerUp:M(e.onPointerUp,u=>{d.current||u.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,u=>{const h=a.searchRef.current!=="";n||h&&u.key===" "||Po.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Cr.displayName=or;var Yl=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ts(or,n),a=Wl(n),c=l.useRef(null),d=re(t,c),[f,u]=l.useState(!1),[h,m]=l.useState("");return l.useEffect(()=>{const b=c.current;b&&m((b.textContent??"").trim())},[s.children]),p.jsx(hn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(Hl,{asChild:!0,...a,focusable:!r,children:p.jsx(Y.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:M(e.onPointerMove,mn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,mn(b=>i.onItemLeave(b))),onFocus:M(e.onFocus,()=>u(!0)),onBlur:M(e.onBlur,()=>u(!1))})})})}),m0="MenuCheckboxItem",Xl=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(ru,{scope:e.__scopeMenu,checked:n,children:p.jsx(Cr,{role:"menuitemcheckbox","aria-checked":sr(n)?"mixed":n,...o,ref:t,"data-state":Os(n),onSelect:M(o.onSelect,()=>r?.(sr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xl.displayName=m0;var Jl="MenuRadioGroup",[g0,v0]=Ot(Jl,{value:void 0,onValueChange:()=>{}}),eu=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ye(r);return p.jsx(g0,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Ps,{...o,ref:t})})});eu.displayName=Jl;var tu="MenuRadioItem",nu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=v0(tu,e.__scopeMenu),s=n===o.value;return p.jsx(ru,{scope:e.__scopeMenu,checked:s,children:p.jsx(Cr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Os(s),onSelect:M(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});nu.displayName=tu;var As="MenuItemIndicator",[ru,y0]=Ot(As,{checked:!1}),ou=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=y0(As,n);return p.jsx(Je,{present:r||sr(s.checked)||s.checked===!0,children:p.jsx(Y.span,{...o,ref:t,"data-state":Os(s.checked)})})});ou.displayName=As;var b0="MenuSeparator",su=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Y.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});su.displayName=b0;var x0="MenuArrow",au=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Sr(n);return p.jsx(Es,{...o,...r,ref:t})});au.displayName=x0;var w0="MenuSub",[RE,iu]=Ot(w0),cn="MenuSubTrigger",cu=l.forwardRef((e,t)=>{const n=Nt(cn,e.__scopeMenu),r=Nn(cn,e.__scopeMenu),o=iu(cn,e.__scopeMenu),s=Ts(cn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),p.jsx(Ss,{asChild:!0,...d,children:p.jsx(Yl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":du(n.open),...e,ref:xn(t,o.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,mn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,mn(u=>{f();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,b=m==="right",g=b?-5:5,y=h[b?"left":"right"],v=h[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:y,y:h.top},{x:v,y:h.top},{x:v,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,u=>{const h=s.searchRef.current!=="";e.disabled||h&&u.key===" "||t0[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});cu.displayName=cn;var lu="MenuSubContent",uu=l.forwardRef((e,t)=>{const n=Gl(Be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Nt(Be,e.__scopeMenu),i=Nn(Be,e.__scopeMenu),a=iu(lu,e.__scopeMenu),c=l.useRef(null),d=re(t,c);return p.jsx(hn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(hn.Slot,{scope:e.__scopeMenu,children:p.jsx(Rs,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{const u=f.currentTarget.contains(f.target),h=n0[i.dir].includes(f.key);u&&h&&(s.onOpenChange(!1),a.trigger?.focus(),f.preventDefault())})})})})})});uu.displayName=lu;function du(e){return e?"open":"closed"}function sr(e){return e==="indeterminate"}function Os(e){return sr(e)?"indeterminate":e?"checked":"unchecked"}function E0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function S0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function C0(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=S0(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function T0(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],d=a.x,f=a.y,u=c.x,h=c.y;f>r!=h>r&&n<(u-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function R0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return T0(n,t)}function mn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var P0=zl,A0=Ss,O0=Kl,N0=Zl,_0=Ps,I0=Ql,M0=Cr,D0=Xl,j0=eu,L0=nu,k0=ou,F0=su,$0=au,B0=cu,U0=uu,Tr="DropdownMenu",[H0]=Xe(Tr,[ql]),Oe=ql(),[V0,fu]=H0(Tr),pu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Oe(t),d=l.useRef(null),[f,u]=nt({prop:o,defaultProp:s??!1,onChange:i,caller:Tr});return p.jsx(V0,{scope:t,triggerId:Ze(),triggerRef:d,contentId:Ze(),open:f,onOpenChange:u,onOpenToggle:l.useCallback(()=>u(h=>!h),[u]),modal:a,children:p.jsx(P0,{...c,open:f,onOpenChange:u,dir:r,modal:a,children:n})})};pu.displayName=Tr;var hu="DropdownMenuTrigger",mu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=fu(hu,n),i=Oe(n);return p.jsx(A0,{asChild:!0,...i,children:p.jsx(Y.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":r?"":void 0,disabled:r,...o,ref:xn(t,s.triggerRef),onPointerDown:M(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:M(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});mu.displayName=hu;var q0="DropdownMenuPortal",gu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Oe(t);return p.jsx(O0,{...r,...n})};gu.displayName=q0;var vu="DropdownMenuContent",yu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=fu(vu,n),s=Oe(n),i=l.useRef(!1);return p.jsx(N0,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:M(e.onInteractOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!o.modal||f)&&(i.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)"}})});yu.displayName=vu;var W0="DropdownMenuGroup",z0=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(_0,{...o,...r,ref:t})});z0.displayName=W0;var G0="DropdownMenuLabel",bu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(I0,{...o,...r,ref:t})});bu.displayName=G0;var K0="DropdownMenuItem",xu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(M0,{...o,...r,ref:t})});xu.displayName=K0;var Z0="DropdownMenuCheckboxItem",wu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(D0,{...o,...r,ref:t})});wu.displayName=Z0;var Q0="DropdownMenuRadioGroup",Y0=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(j0,{...o,...r,ref:t})});Y0.displayName=Q0;var X0="DropdownMenuRadioItem",Eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(L0,{...o,...r,ref:t})});Eu.displayName=X0;var J0="DropdownMenuItemIndicator",Su=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(k0,{...o,...r,ref:t})});Su.displayName=J0;var eb="DropdownMenuSeparator",Cu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(F0,{...o,...r,ref:t})});Cu.displayName=eb;var tb="DropdownMenuArrow",nb=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx($0,{...o,...r,ref:t})});nb.displayName=tb;var rb="DropdownMenuSubTrigger",Tu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(B0,{...o,...r,ref:t})});Tu.displayName=rb;var ob="DropdownMenuSubContent",Ru=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(U0,{...o,...r,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)"}})});Ru.displayName=ob;var sb=pu,ab=mu,ib=gu,cb=yu,lb=bu,ub=xu,db=wu,fb=Eu,pb=Su,hb=Cu,mb=Tu,gb=Ru,vb=sb,yb=ab,bb=ib,Pu=cb,Au=ub,Ou=db,Nu=fb,_u=pb,Iu=lb,Mu=hb,Du=mb,ju=gb;const xb=vb,wb=yb,Eb=l.forwardRef(({className:e,inset:t,children:n,...r},o)=>p.jsx(Du,{ref:o,className:fe("flex","cursor-default","select-none","items-center","rounded-[10px]","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","focus:bg-hover-subtle","focus:text-fg-default","data-[state=open]:bg-hover-subtle","data-[state=open]:text-fg-default",t&&"pl-8",e),...r,children:n}));Eb.displayName=Du.displayName;const Sb=l.forwardRef(({className:e,...t},n)=>p.jsx(ju,{ref:n,className:fe("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));Sb.displayName=ju.displayName;const Lu=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(bb,{children:p.jsx(Pu,{ref:r,sideOffset:t,className:fe("z-[1100]","min-w-[10rem]","overflow-hidden","surface-floating","p-1","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n})}));Lu.displayName=Pu.displayName;const ku=l.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Au,{ref:r,className:fe("relative","flex","cursor-pointer","select-none","items-center","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ku.displayName=Au.displayName;const Cb=l.forwardRef(({className:e,children:t,checked:n,...r},o)=>p.jsxs(Ou,{ref:o,className:fe("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(_u,{children:"✓"})}),t]}));Cb.displayName=Ou.displayName;const Tb=l.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Nu,{ref:r,className:fe("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(_u,{children:"●"})}),t]}));Tb.displayName=Nu.displayName;const Rb=l.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Iu,{ref:r,className:fe("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));Rb.displayName=Iu.displayName;const Fu=l.forwardRef(({className:e,...t},n)=>p.jsx(Mu,{ref:n,className:fe("-mx-1","my-1","h-px","bg-divider",e),...t}));Fu.displayName=Mu.displayName;const PE=({button:e,items:t})=>p.jsxs(xb,{children:[p.jsx(wb,{asChild:!0,children:e}),p.jsx(Lu,{align:"end",children:t.map((n,r)=>n.type==="separator"?p.jsx(Fu,{},n.key??`separator-${r}`):p.jsx(ku,{onClick:n.onClick,children:n.name},n.name))})]}),Pb=l.forwardRef(({title:e,description:t,className:n="",...r},o)=>p.jsxs("div",{ref:o,className:fe("flex flex-col items-center justify-center text-center","h-[400px]","bg-muted/30","border-2 border-dashed","border-border-secondary","rounded-[20px]","p-8",n),...r,children:[e&&p.jsx($e,{as:"h3",variant:"heading",weight:"bold",tone:"muted",className:"mb-2",children:e}),t&&p.jsx($e,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"max-w-[400px]",children:t})]}));Pb.displayName="Empty";const Ab=Ae(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),Ob=l.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>p.jsx("input",{ref:s,type:r,className:Ab({variant:t,size:n,className:e}),...o}));Ob.displayName="Input";const Nb=Ae(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),_b=l.forwardRef(({className:e,size:t,...n},r)=>p.jsx("label",{ref:r,className:Nb({size:t,className:e}),...n}));_b.displayName="Label";const Ib=l.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const i=Number(e),a=Number(t),c=[];for(let u=1;u<a+1;u++)(i===u||i===1&&u<i+5||i===2&&u<i+4||u>i-3&&u<i+3||i===a-1&&u>i-4||i===a&&u>i-5)&&c.push(u);const d=i===1,f=i===a;return p.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[p.jsxs(Ut,{disabled:d,onClick:()=>!d&&n(1),"aria-label":"First page",isSkip:!0,children:[p.jsx(Kr,{width:16}),p.jsx(Kr,{width:16})]}),p.jsx(Ut,{disabled:d,onClick:()=>!d&&n(i-1),"aria-label":"Previous page",children:p.jsx(Kr,{width:20})}),c.map(u=>p.jsx(Ut,{active:i===u,onClick:()=>n(u),"aria-label":`Page ${u}`,"aria-current":i===u?"page":void 0,children:u},u)),p.jsx(Ut,{disabled:f,onClick:()=>!f&&n(i+1),"aria-label":"Next page",children:p.jsx(Zr,{width:20})}),p.jsxs(Ut,{disabled:f,onClick:()=>!f&&n(a),"aria-label":"Last page",isSkip:!0,children:[p.jsx(Zr,{width:16}),p.jsx(Zr,{width:16})]})]})});Ib.displayName="Pagination";const Ut=l.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},i)=>{const a=`
60
+ flex justify-center items-center
61
+ leading-normal text-base font-medium
62
+ w-9 h-9 md:w-10 md:h-10
63
+ border border-transparent
64
+ rounded-[10px]
65
+ transition-all duration-200
66
+ `,c=e?"cursor-default bg-cta border-cta text-fg-on-filled":t?"cursor-default text-fg-disabled border-transparent":"cursor-pointer text-fg-default hover:bg-hover hover:border-border-subtle",d=n?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return p.jsx("button",{ref:i,type:"button",disabled:t,className:`${a} ${c} ${d} ${o}`,...s,children:r})});Ut.displayName="PaginationItem";const Mb=Ae(["h-full","transition-all","duration-300","ease-out"],{variants:{color:{primary:"bg-pastel-blue-200",success:"bg-pastel-green-200",danger:"bg-pastel-pink-200",warning:"bg-pastel-orange-200"}},defaultVariants:{color:"primary"}}),Db=l.forwardRef(({value:e,max:t,color:n,className:r="",...o},s)=>{const i=Math.min(100,Math.max(0,e/t*100));return p.jsx("div",{ref:s,className:fe("w-full h-3","bg-surface","border-2 border-border","rounded-[6px]","overflow-hidden",r),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,...o,children:p.jsx("div",{className:`progress-fill ${Mb({color:n})}`,style:{"--progress-width":`${i}%`}})})});Db.displayName="Progress";function qa(e,[t,n]){return Math.min(n,Math.max(t,e))}function jb(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $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"}),Lb="VisuallyHidden",Bu=l.forwardRef((e,t)=>p.jsx(Y.span,{...e,ref:t,style:{...$u,...e.style}}));Bu.displayName=Lb;var kb=Bu,Fb=[" ","Enter","ArrowUp","ArrowDown"],$b=[" ","Enter"],Rt="Select",[Rr,Pr,Bb]=gs(Rt),[en]=Xe(Rt,[Bb,Jt]),Ar=Jt(),[Ub,lt]=en(Rt),[Hb,Vb]=en(Rt),Uu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:d,name:f,autoComplete:u,disabled:h,required:m,form:b}=e,g=Ar(t),[y,v]=l.useState(null),[x,E]=l.useState(null),[S,T]=l.useState(!1),P=wr(d),[R,A]=nt({prop:r,defaultProp:o??!1,onChange:s,caller:Rt}),[_,D]=nt({prop:i,defaultProp:a,onChange:c,caller:Rt}),k=l.useRef(null),U=y?b||!!y.closest("form"):!0,[H,Q]=l.useState(new Set),ne=Array.from(H).map(L=>L.props.value).join(";");return p.jsx(bs,{...g,children:p.jsxs(Ub,{required:m,scope:t,trigger:y,onTriggerChange:v,valueNode:x,onValueNodeChange:E,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:Ze(),value:_,onValueChange:D,open:R,onOpenChange:A,dir:P,triggerPointerDownPosRef:k,disabled:h,children:[p.jsx(Rr.Provider,{scope:t,children:p.jsx(Hb,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(L=>{Q(Z=>new Set(Z).add(L))},[]),onNativeOptionRemove:l.useCallback(L=>{Q(Z=>{const te=new Set(Z);return te.delete(L),te})},[]),children:n})}),U?p.jsxs(ad,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:u,value:_,onChange:L=>D(L.target.value),disabled:h,form:b,children:[_===void 0?p.jsx("option",{value:""}):null,Array.from(H)]},ne):null]})})};Uu.displayName=Rt;var Hu="SelectTrigger",Vu=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ar(n),i=lt(Hu,n),a=i.disabled||r,c=re(t,i.onTriggerChange),d=Pr(n),f=l.useRef("touch"),[u,h,m]=cd(g=>{const y=d().filter(E=>!E.disabled),v=y.find(E=>E.value===i.value),x=ld(y,g,v);x!==void 0&&i.onValueChange(x.value)}),b=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(xs,{asChild:!0,...s,children:p.jsx(Y.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":id(i.value)?"":void 0,...o,ref:c,onClick:M(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:M(o.onPointerDown,g=>{f.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:M(o.onKeyDown,g=>{const y=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(y&&g.key===" ")&&Fb.includes(g.key)&&(b(),g.preventDefault())})})})});Vu.displayName=Hu;var qu="SelectValue",Wu=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=lt(qu,n),{onValueNodeHasChildrenChange:d}=c,f=s!==void 0,u=re(t,c.onValueNodeChange);return Pe(()=>{d(f)},[d,f]),p.jsx(Y.span,{...a,ref:u,style:{pointerEvents:"none"},children:id(c.value)?p.jsx(p.Fragment,{children:i}):s})});Wu.displayName=qu;var qb="SelectIcon",zu=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(Y.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});zu.displayName=qb;var Wb="SelectPortal",Gu=e=>p.jsx(En,{asChild:!0,...e});Gu.displayName=Wb;var Pt="SelectContent",Ku=l.forwardRef((e,t)=>{const n=lt(Pt,e.__scopeSelect),[r,o]=l.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ur.createPortal(p.jsx(Zu,{scope:e.__scopeSelect,children:p.jsx(Rr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Qu,{...e,ref:t})});Ku.displayName=Pt;var Ve=10,[Zu,ut]=en(Pt),zb="SelectContentImpl",Gb=Gt("SelectContent.RemoveScroll"),Qu=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:d,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y,...v}=e,x=lt(Pt,n),[E,S]=l.useState(null),[T,P]=l.useState(null),R=re(t,O=>S(O)),[A,_]=l.useState(null),[D,k]=l.useState(null),U=Pr(n),[H,Q]=l.useState(!1),ne=l.useRef(!1);l.useEffect(()=>{if(E)return Jo(E)},[E]),Xo();const L=l.useCallback(O=>{const[j,...oe]=U().map(G=>G.ref.current),[ee]=oe.slice(-1),X=document.activeElement;for(const G of O)if(G===X||(G?.scrollIntoView({block:"nearest"}),G===j&&T&&(T.scrollTop=0),G===ee&&T&&(T.scrollTop=T.scrollHeight),G?.focus(),document.activeElement!==X))return},[U,T]),Z=l.useCallback(()=>L([A,E]),[L,A,E]);l.useEffect(()=>{H&&Z()},[H,Z]);const{onOpenChange:te,triggerPointerDownPosRef:I}=x;l.useEffect(()=>{if(E){let O={x:0,y:0};const j=ee=>{O={x:Math.abs(Math.round(ee.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(ee.pageY)-(I.current?.y??0))}},oe=ee=>{O.x<=10&&O.y<=10?ee.preventDefault():E.contains(ee.target)||te(!1),document.removeEventListener("pointermove",j),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",oe,{capture:!0})}}},[E,te,I]),l.useEffect(()=>{const O=()=>te(!1);return window.addEventListener("blur",O),window.addEventListener("resize",O),()=>{window.removeEventListener("blur",O),window.removeEventListener("resize",O)}},[te]);const[J,W]=cd(O=>{const j=U().filter(X=>!X.disabled),oe=j.find(X=>X.ref.current===document.activeElement),ee=ld(j,O,oe);ee&&setTimeout(()=>ee.ref.current.focus())}),ae=l.useCallback((O,j,oe)=>{const ee=!ne.current&&!oe;(x.value!==void 0&&x.value===j||ee)&&(_(O),ee&&(ne.current=!0))},[x.value]),$=l.useCallback(()=>E?.focus(),[E]),q=l.useCallback((O,j,oe)=>{const ee=!ne.current&&!oe;(x.value!==void 0&&x.value===j||ee)&&k(O)},[x.value]),V=r==="popper"?Ao:Yu,F=V===Ao?{side:a,sideOffset:c,align:d,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y}:{};return p.jsx(Zu,{scope:n,content:E,viewport:T,onViewportChange:P,itemRefCallback:ae,selectedItem:A,onItemLeave:$,itemTextRefCallback:q,focusSelectedItem:Z,selectedItemText:D,position:r,isPositioned:H,searchRef:J,children:p.jsx(mr,{as:Gb,allowPinchZoom:!0,children:p.jsx(pr,{asChild:!0,trapped:x.open,onMountAutoFocus:O=>{O.preventDefault()},onUnmountAutoFocus:M(o,O=>{x.trigger?.focus({preventScroll:!0}),O.preventDefault()}),children:p.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:O=>O.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(V,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:O=>O.preventDefault(),...v,...F,onPlaced:()=>Q(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:M(v.onKeyDown,O=>{const j=O.ctrlKey||O.altKey||O.metaKey;if(O.key==="Tab"&&O.preventDefault(),!j&&O.key.length===1&&W(O.key),["ArrowUp","ArrowDown","Home","End"].includes(O.key)){let ee=U().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(O.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(O.key)){const X=O.target,G=ee.indexOf(X);ee=ee.slice(G+1)}setTimeout(()=>L(ee)),O.preventDefault()}})})})})})})});Qu.displayName=zb;var Kb="SelectItemAlignedPosition",Yu=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=lt(Pt,n),i=ut(Pt,n),[a,c]=l.useState(null),[d,f]=l.useState(null),u=re(t,R=>f(R)),h=Pr(n),m=l.useRef(!1),b=l.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:x}=i,E=l.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&d&&g&&y&&v){const R=s.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),D=v.getBoundingClientRect();if(s.dir!=="rtl"){const X=D.left-A.left,G=_.left-X,me=R.left-G,ve=R.width+me,xe=Math.max(ve,A.width),B=window.innerWidth-Ve,ie=qa(G,[Ve,Math.max(Ve,B-xe)]);a.style.minWidth=ve+"px",a.style.left=ie+"px"}else{const X=A.right-D.right,G=window.innerWidth-_.right-X,me=window.innerWidth-R.right-G,ve=R.width+me,xe=Math.max(ve,A.width),B=window.innerWidth-Ve,ie=qa(G,[Ve,Math.max(Ve,B-xe)]);a.style.minWidth=ve+"px",a.style.right=ie+"px"}const k=h(),U=window.innerHeight-Ve*2,H=g.scrollHeight,Q=window.getComputedStyle(d),ne=parseInt(Q.borderTopWidth,10),L=parseInt(Q.paddingTop,10),Z=parseInt(Q.borderBottomWidth,10),te=parseInt(Q.paddingBottom,10),I=ne+L+H+te+Z,J=Math.min(y.offsetHeight*5,I),W=window.getComputedStyle(g),ae=parseInt(W.paddingTop,10),$=parseInt(W.paddingBottom,10),q=R.top+R.height/2-Ve,V=U-q,F=y.offsetHeight/2,O=y.offsetTop+F,j=ne+L+O,oe=I-j;if(j<=q){const X=k.length>0&&y===k[k.length-1].ref.current;a.style.bottom="0px";const G=d.clientHeight-g.offsetTop-g.offsetHeight,me=Math.max(V,F+(X?$:0)+G+Z),ve=j+me;a.style.height=ve+"px"}else{const X=k.length>0&&y===k[0].ref.current;a.style.top="0px";const me=Math.max(q,ne+g.offsetTop+(X?ae:0)+F)+oe;a.style.height=me+"px",g.scrollTop=j-q+g.offsetTop}a.style.margin=`${Ve}px 0`,a.style.minHeight=J+"px",a.style.maxHeight=U+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,d,g,y,v,s.dir,r]);Pe(()=>E(),[E]);const[S,T]=l.useState();Pe(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);const P=l.useCallback(R=>{R&&b.current===!0&&(E(),x?.(),b.current=!1)},[E,x]);return p.jsx(Qb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(Y.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Yu.displayName=Kb;var Zb="SelectPopperPosition",Ao=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ve,...s}=e,i=Ar(n);return p.jsx(ws,{...i,...s,ref:t,align:r,collisionPadding:o,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)"}})});Ao.displayName=Zb;var[Qb,Ns]=en(Pt,{}),Oo="SelectViewport",Xu=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ut(Oo,n),i=Ns(Oo,n),a=re(t,s.onViewportChange),c=l.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:r}),p.jsx(Rr.Slot,{scope:n,children:p.jsx(Y.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:M(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=i;if(h?.current&&u){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-Ve*2,g=parseFloat(u.style.minHeight),y=parseFloat(u.style.height),v=Math.max(g,y);if(v<b){const x=v+m,E=Math.min(b,x),S=x-E;u.style.height=E+"px",u.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,u.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Xu.displayName=Oo;var Ju="SelectGroup",[Yb,Xb]=en(Ju),Jb=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ze();return p.jsx(Yb,{scope:n,id:o,children:p.jsx(Y.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Jb.displayName=Ju;var ed="SelectLabel",ex=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Xb(ed,n);return p.jsx(Y.div,{id:o.id,...r,ref:t})});ex.displayName=ed;var ar="SelectItem",[tx,td]=en(ar),nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=lt(ar,n),c=ut(ar,n),d=a.value===r,[f,u]=l.useState(s??""),[h,m]=l.useState(!1),b=re(t,x=>c.itemRefCallback?.(x,r,o)),g=Ze(),y=l.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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(tx,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:l.useCallback(x=>{u(E=>E||(x?.textContent??"").trim())},[]),children:p.jsx(Rr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:p.jsx(Y.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:M(i.onFocus,()=>m(!0)),onBlur:M(i.onBlur,()=>m(!1)),onClick:M(i.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:M(i.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:M(i.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:M(i.onPointerMove,x=>{y.current=x.pointerType,o?c.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:M(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:M(i.onKeyDown,x=>{c.searchRef?.current!==""&&x.key===" "||($b.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});nd.displayName=ar;var ln="SelectItemText",rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=lt(ln,n),a=ut(ln,n),c=td(ln,n),d=Vb(ln,n),[f,u]=l.useState(null),h=re(t,v=>u(v),c.onItemTextChange,v=>a.itemTextRefCallback?.(v,c.value,c.disabled)),m=f?.textContent,b=l.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return Pe(()=>(g(b),()=>y(b)),[g,y,b]),p.jsxs(p.Fragment,{children:[p.jsx(Y.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ur.createPortal(s.children,i.valueNode):null]})});rd.displayName=ln;var od="SelectItemIndicator",nx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return td(od,n).isSelected?p.jsx(Y.span,{"aria-hidden":!0,...r,ref:t}):null});nx.displayName=od;var No="SelectScrollUpButton",rx=l.forwardRef((e,t)=>{const n=ut(No,e.__scopeSelect),r=Ns(No,e.__scopeSelect),[o,s]=l.useState(!1),i=re(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});rx.displayName=No;var _o="SelectScrollDownButton",ox=l.forwardRef((e,t)=>{const n=ut(_o,e.__scopeSelect),r=Ns(_o,e.__scopeSelect),[o,s]=l.useState(!1),i=re(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});ox.displayName=_o;var sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ut("SelectScrollButton",n),i=l.useRef(null),a=Pr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Pe(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(Y.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:M(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:M(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:M(o.onPointerLeave,()=>{c()})})}),sx="SelectSeparator",ax=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(Y.div,{"aria-hidden":!0,...r,ref:t})});ax.displayName=sx;var Io="SelectArrow",ix=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ar(n),s=lt(Io,n),i=ut(Io,n);return s.open&&i.position==="popper"?p.jsx(Es,{...o,...r,ref:t}):null});ix.displayName=Io;var cx="SelectBubbleInput",ad=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=re(r,o),i=jb(t);return l.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const u=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(u)}},[i,t]),p.jsx(Y.select,{...n,style:{...$u,...n.style},ref:s,defaultValue:t})});ad.displayName=cx;function id(e){return e===""||e===void 0}function cd(e){const t=Ye(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const a=n.current+i;t(a),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ld(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=lx(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function lx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ux=Uu,dx=Vu,fx=Wu,px=zu,hx=Gu,mx=Ku,gx=Xu,vx=nd,yx=rd,bx=ux,xx=fx,wx=dx,Ex=px,Sx=hx,Cx=mx,Tx=gx,Rx=vx,Px=yx;const Ax=Ae(["inline-flex","items-center","justify-between","gap-2","border","border-border-subtle","bg-elevated","text-fg-default","font-medium","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border-subtle"],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),Ox=({id:e,value:t,defaultValue:n,onValueChange:r,placeholder:o,ariaLabel:s,"aria-labelledby":i,"aria-describedby":a,variant:c,size:d,className:f,children:u,disabled:h})=>p.jsxs(bx,{value:t,defaultValue:n,onValueChange:r,disabled:h,children:[p.jsxs(wx,{id:e,"aria-label":s,"aria-labelledby":i,"aria-describedby":a,className:Ax({variant:c,size:d,className:f}),children:[p.jsx(xx,{className:"min-w-0 truncate",placeholder:o}),p.jsx(Ex,{children:p.jsx(km,{className:"w-3.5 h-3.5 opacity-60"})})]}),p.jsx(Sx,{children:p.jsx(ud,{children:p.jsx(Tx,{className:"p-1",children:u})})})]}),ud=l.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Cx,{ref:r,position:"popper",sideOffset:4,className:fe("z-[1100]","min-w-[var(--radix-select-trigger-width)]","overflow-hidden","surface-floating","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n,children:t}));ud.displayName="SelectContent";const Nx=l.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Rx,{ref:r,className:fe("relative","flex","items-center","cursor-pointer","select-none","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","data-[highlighted]:bg-hover-subtle","data-[highlighted]:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:p.jsx(Px,{children:t})}));Nx.displayName="SelectItem";Ox.displayName="Select";const Wa=e=>typeof e=="number"?`${e}px`:e,Zn=l.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},i)=>p.jsx("div",{ref:i,className:fe("rounded-[14px]","skeleton-sized","bg-[length:200%_100%]","bg-gradient-to-r","from-pastel-lavender-200/30","via-pastel-yellow-200/20","to-pastel-lavender-200/30","animate-shimmer","animate-fade-in",r),style:{"--skeleton-width":Wa(e),"--skeleton-height":Wa(t),"--skeleton-opacity":n,...o},...s}));Zn.displayName="Skeleton";const _x=l.forwardRef(({checked:e,onCheckedChange:t,onClick:n,className:r,disabled:o,...s},i)=>p.jsx("button",{ref:i,type:"button",role:"switch","aria-checked":e,disabled:o,className:fe("focus-ring-soft relative inline-flex h-7 w-12 items-center rounded-full border p-1 transition-colors duration-200 outline-none",e?"border-transparent bg-cta hover:bg-cta-hover active:bg-cta-hover":"border-border bg-subtle hover:bg-hover active:bg-active",o&&"cursor-not-allowed opacity-80",r),onClick:a=>{n?.(a),!(a.defaultPrevented||o)&&t?.(!e)},...s,children:p.jsx("span",{"aria-hidden":"true",className:fe("pointer-events-none inline-block h-5 w-5 rounded-full shadow-sm transition-transform duration-200",e?"translate-x-5 bg-white":"translate-x-0 bg-fg-secondary")})}));_x.displayName="Switch";const Ix=Ae(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","resize-none"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"min-h-[60px] p-3 text-sm rounded-[12px]",md:"min-h-[80px] p-3 text-sm rounded-[14px]",lg:"min-h-[100px] p-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),Mx=l.forwardRef(({className:e,variant:t,size:n,...r},o)=>p.jsx("textarea",{ref:o,className:Ix({variant:t,size:n,className:e}),...r}));Mx.displayName="Textarea";var dd="Toggle",fd=l.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[i,a]=nt({prop:n,onChange:o,defaultProp:r??!1,caller:dd});return p.jsx(Y.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:M(e.onClick,()=>{e.disabled||a(!i)})})});fd.displayName=dd;var dt="ToggleGroup",[pd]=Xe(dt,[Er]),hd=Er(),_s=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return p.jsx(Dx,{...o,ref:t})}if(n==="multiple"){const o=r;return p.jsx(jx,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${dt}\``)});_s.displayName=dt;var[md,gd]=pd(dt),Dx=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=nt({prop:n,defaultProp:r??"",onChange:o,caller:dt});return p.jsx(md,{scope:e.__scopeToggleGroup,type:"single",value:C.useMemo(()=>i?[i]:[],[i]),onItemActivate:a,onItemDeactivate:C.useCallback(()=>a(""),[a]),children:p.jsx(vd,{...s,ref:t})})}),jx=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=nt({prop:n,defaultProp:r??[],onChange:o,caller:dt}),c=C.useCallback(f=>a((u=[])=>[...u,f]),[a]),d=C.useCallback(f=>a((u=[])=>u.filter(h=>h!==f)),[a]);return p.jsx(md,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:p.jsx(vd,{...s,ref:t})})});_s.displayName=dt;var[Lx,kx]=pd(dt),vd=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:i,loop:a=!0,...c}=e,d=hd(n),f=wr(i),u={role:"group",dir:f,...c};return p.jsx(Lx,{scope:n,rovingFocus:o,disabled:r,children:o?p.jsx(Ul,{asChild:!0,...d,orientation:s,dir:f,loop:a,children:p.jsx(Y.div,{...u,ref:t})}):p.jsx(Y.div,{...u,ref:t})})}),ir="ToggleGroupItem",yd=C.forwardRef((e,t)=>{const n=gd(ir,e.__scopeToggleGroup),r=kx(ir,e.__scopeToggleGroup),o=hd(e.__scopeToggleGroup),s=n.value.includes(e.value),i=r.disabled||e.disabled,a={...e,pressed:s,disabled:i},c=C.useRef(null);return r.rovingFocus?p.jsx(Hl,{asChild:!0,...o,focusable:!i,active:s,ref:c,children:p.jsx(za,{...a,ref:t})}):p.jsx(za,{...a,ref:t})});yd.displayName=ir;var za=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=gd(ir,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=s.type==="single"?i:void 0;return p.jsx(fd,{...a,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),Fx=_s,$x=yd,Bx=Fx,Ux=$x;const Hx=Ae(["inline-flex","gap-0.5","overflow-hidden"],{variants:{variant:{default:["border-2","border-border","rounded-[10px]","bg-surface"],outline:["border-2","border-border","rounded-[10px]","bg-transparent"],pills:["surface-base","p-1"],quiet:["rounded-[12px]","border","border-border-subtle/80","bg-hover-subtle/55","p-0.5"]}},defaultVariants:{variant:"default"}}),Vx=Ae(["flex","items-center","justify-center","font-bold","border","border-transparent","transition-colors","duration-200","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{default:["text-fg-muted","hover:bg-hover","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],outline:["text-fg-muted","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],pills:["text-fg-secondary","rounded-[10px]","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled","data-[state=on]:border-border-secondary"],quiet:["rounded-[10px]","font-medium","text-fg-secondary","hover:bg-hover-subtle/80","data-[state=on]:border-border-secondary/70","data-[state=on]:bg-elevated","data-[state=on]:text-fg-default","data-[state=on]:shadow-[0_8px_18px_-16px_rgba(15,18,24,0.28)]"]},size:{sm:"px-2 py-1.5 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),bd=l.createContext({}),qx=l.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>p.jsx(bd.Provider,{value:{variant:t??"default",size:n??"md"},children:p.jsx(Bx,{ref:s,className:Hx({variant:t,className:e}),...o,children:r})}));qx.displayName="ToggleGroup";const Wx=l.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=l.useContext(bd);return p.jsx(Ux,{ref:o,className:Vx({variant:s.variant,size:s.size,className:fe(e,t)}),...r,children:n})});Wx.displayName="ToggleGroupItem";var[Or]=Xe("Tooltip",[Jt]),Nr=Jt(),xd="TooltipProvider",zx=700,Mo="tooltip.open",[Gx,Is]=Or(xd),wd=e=>{const{__scopeTooltip:t,delayDuration:n=zx,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=l.useRef(!0),a=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),p.jsx(Gx,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:l.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:s})};wd.displayName=xd;var gn="Tooltip",[Kx,_n]=Or(gn),Ed=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Is(gn,e.__scopeTooltip),d=Nr(t),[f,u]=l.useState(null),h=Ze(),m=l.useRef(0),b=i??c.disableHoverableContent,g=a??c.delayDuration,y=l.useRef(!1),[v,x]=nt({prop:r,defaultProp:o??!1,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(Mo))):c.onClose(),s?.(R)},caller:gn}),E=l.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),T=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),P=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},g)},[g,x]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(bs,{...d,children:p.jsx(Kx,{scope:t,contentId:h,open:v,stateAttribute:E,trigger:f,onTriggerChange:u,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?P():S()},[c.isOpenDelayedRef,P,S]),onTriggerLeave:l.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:S,onClose:T,disableHoverableContent:b,children:n})})};Ed.displayName=gn;var Do="TooltipTrigger",Sd=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_n(Do,n),s=Is(Do,n),i=Nr(n),a=l.useRef(null),c=re(t,a,o.onTriggerChange),d=l.useRef(!1),f=l.useRef(!1),u=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(xs,{asChild:!0,...i,children:p.jsx(Y.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:M(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:M(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:M(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:M(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:M(e.onBlur,o.onClose),onClick:M(e.onClick,o.onClose)})})});Sd.displayName=Do;var Ms="TooltipPortal",[Zx,Qx]=Or(Ms,{forceMount:void 0}),Cd=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=_n(Ms,t);return p.jsx(Zx,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(En,{asChild:!0,container:o,children:r})})})};Cd.displayName=Ms;var Qt="TooltipContent",Td=l.forwardRef((e,t)=>{const n=Qx(Qt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=_n(Qt,e.__scopeTooltip);return p.jsx(Je,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Rd,{side:o,...s,ref:t}):p.jsx(Yx,{side:o,...s,ref:t})})}),Yx=l.forwardRef((e,t)=>{const n=_n(Qt,e.__scopeTooltip),r=Is(Qt,e.__scopeTooltip),o=l.useRef(null),s=re(t,o),[i,a]=l.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:u}=r,h=l.useCallback(()=>{a(null),u(!1)},[u]),m=l.useCallback((b,g)=>{const y=b.currentTarget,v={x:b.clientX,y:b.clientY},x=nw(v,y.getBoundingClientRect()),E=rw(v,x),S=ow(g.getBoundingClientRect()),T=aw([...E,...S]);a(T),u(!0)},[u]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const b=y=>m(y,f),g=y=>m(y,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[c,f,m,h]),l.useEffect(()=>{if(i){const b=g=>{const y=g.target,v={x:g.clientX,y:g.clientY},x=c?.contains(y)||f?.contains(y),E=!sw(v,i);x?h():E&&(h(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,d,h]),p.jsx(Rd,{...e,ref:s})}),[Xx,Jx]=Or(gn,{isInside:!1}),ew=Mi("TooltipContent"),Rd=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=_n(Qt,n),d=Nr(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Mo,f),()=>document.removeEventListener(Mo,f)),[f]),l.useEffect(()=>{if(c.trigger){const u=h=>{h.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,f]),p.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:f,children:p.jsxs(ws,{"data-state":c.stateAttribute,...d,...a,ref:t,style:{...a.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(ew,{children:r}),p.jsx(Xx,{scope:n,isInside:!0,children:p.jsx(kb,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Td.displayName=Qt;var Pd="TooltipArrow",tw=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Nr(n);return Jx(Pd,n).isInside?null:p.jsx(Es,{...o,...r,ref:t})});tw.displayName=Pd;function nw(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rw(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ow(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sw(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],d=a.x,f=a.y,u=c.x,h=c.y;f>r!=h>r&&n<(u-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function aw(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),iw(t)}function iw(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}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 cw=wd,lw=Ed,uw=Sd,dw=Cd,fw=Td,pw=cw,hw=lw,mw=uw,gw=dw,Ad=fw;const vw=pw,yw=hw,bw=mw,Od=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Ad,{ref:r,sideOffset:t,className:fe("z-[1200]","overflow-hidden","px-3","py-1.5","text-xs","font-bold","bg-elevated","text-fg-secondary","border","border-border-subtle","shadow-sm","rounded-[8px]","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",e),...n}));Od.displayName=Ad.displayName;const AE=({content:e,children:t,side:n="top",delayDuration:r=200})=>p.jsx(vw,{children:p.jsxs(yw,{delayDuration:r,children:[p.jsx(bw,{asChild:!0,children:t}),p.jsx(gw,{children:p.jsx(Od,{side:n,children:e})})]})}),Nd=28,xw=[Nd,50,100];function OE(e){return xw.includes(e)}var to={exports:{}},no,Ga;function ww(){if(Ga)return no;Ga=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return no=e,no}var ro,Ka;function Ew(){if(Ka)return ro;Ka=1;var e=ww();function t(){}function n(){}return n.resetWarningCache=t,ro=function(){function r(i,a,c,d,f,u){if(u!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ro}var Za;function Sw(){return Za||(Za=1,to.exports=Ew()()),to.exports}var Cw=Sw();const ce=yn(Cw);var oo,Qa;function Tw(){if(Qa)return oo;Qa=1;function e(a){return a&&typeof a=="object"&&"default"in a?a.default:a}var t=rf(),n=e(t);function r(a,c,d){return c in a?Object.defineProperty(a,c,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[c]=d,a}function o(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c}var s=!!(typeof window<"u"&&window.document&&window.document.createElement);function i(a,c,d){if(typeof a!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof c!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof d<"u"&&typeof d!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function f(u){return u.displayName||u.name||"Component"}return function(h){if(typeof h!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],b;function g(){b=a(m.map(function(v){return v.props})),y.canUseDOM?c(b):d&&(b=d(b))}var y=(function(v){o(x,v);function x(){return v.apply(this,arguments)||this}x.peek=function(){return b},x.rewind=function(){if(x.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var T=b;return b=void 0,m=[],T};var E=x.prototype;return E.UNSAFE_componentWillMount=function(){m.push(this),g()},E.componentDidUpdate=function(){g()},E.componentWillUnmount=function(){var T=m.indexOf(this);m.splice(T,1),g()},E.render=function(){return n.createElement(h,this.props)},x})(t.PureComponent);return r(y,"displayName","SideEffect("+f(h)+")"),r(y,"canUseDOM",s),y}}return oo=i,oo}var Rw=Tw();const Pw=yn(Rw);var so,Ya;function Aw(){if(Ya)return so;Ya=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,i){if(s===i)return!0;if(s&&i&&typeof s=="object"&&typeof i=="object"){if(s.constructor!==i.constructor)return!1;var a,c,d;if(Array.isArray(s)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(!o(s[c],i[c]))return!1;return!0}var f;if(t&&s instanceof Map&&i instanceof Map){if(s.size!==i.size)return!1;for(f=s.entries();!(c=f.next()).done;)if(!i.has(c.value[0]))return!1;for(f=s.entries();!(c=f.next()).done;)if(!o(c.value[1],i.get(c.value[0])))return!1;return!0}if(n&&s instanceof Set&&i instanceof Set){if(s.size!==i.size)return!1;for(f=s.entries();!(c=f.next()).done;)if(!i.has(c.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(i)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(s[c]!==i[c])return!1;return!0}if(s.constructor===RegExp)return s.source===i.source&&s.flags===i.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof i.valueOf=="function")return s.valueOf()===i.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof i.toString=="function")return s.toString()===i.toString();if(d=Object.keys(s),a=d.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,d[c]))return!1;if(e&&s instanceof Element)return!1;for(c=a;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&s.$$typeof)&&!o(s[d[c]],i[d[c]]))return!1;return!0}return s!==s&&i!==i}return so=function(i,a){try{return o(i,a)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},so}var Ow=Aw();const Nw=yn(Ow);var ao,Xa;function _w(){if(Xa)return ao;Xa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ao=o()?Object.assign:function(s,i){for(var a,c=r(s),d,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){d=e(a);for(var h=0;h<d.length;h++)n.call(a,d[h])&&(c[d[h]]=a[d[h]])}}return c},ao}var Iw=_w();const Mw=yn(Iw);var bt={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},z={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(z).map(function(e){return z[e]});var le={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},cr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},vn={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},Dw=Object.keys(cr).reduce(function(e,t){return e[cr[t]]=t,e},{}),jw=[z.NOSCRIPT,z.SCRIPT,z.STYLE],qe="data-react-helmet",Lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kw=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Fw=(function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})(),_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$w=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Ja=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Bw=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},jo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Uw=function(t){var n=qt(t,z.TITLE),r=qt(t,vn.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=qt(t,vn.DEFAULT_TITLE);return n||o||void 0},Hw=function(t){return qt(t,vn.ON_CHANGE_CLIENT_STATE)||function(){}},io=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return _e({},r,o)},{})},Vw=function(t,n){return n.filter(function(r){return typeof r[z.BASE]<"u"}).map(function(r){return r[z.BASE]}).reverse().reduce(function(r,o){if(!r.length)for(var s=Object.keys(o),i=0;i<s.length;i++){var a=s[i],c=a.toLowerCase();if(t.indexOf(c)!==-1&&o[c])return r.concat(o)}return r},[])},sn=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&Gw("Helmet: "+t+' should be of type "Array". Instead found type "'+Lw(s[t])+'"'),!1)}).map(function(s){return s[t]}).reverse().reduce(function(s,i){var a={};i.filter(function(h){for(var m=void 0,b=Object.keys(h),g=0;g<b.length;g++){var y=b[g],v=y.toLowerCase();n.indexOf(v)!==-1&&!(m===le.REL&&h[m].toLowerCase()==="canonical")&&!(v===le.REL&&h[v].toLowerCase()==="stylesheet")&&(m=v),n.indexOf(y)!==-1&&(y===le.INNER_HTML||y===le.CSS_TEXT||y===le.ITEM_PROP)&&(m=y)}if(!m||!h[m])return!1;var x=h[m].toLowerCase();return o[m]||(o[m]={}),a[m]||(a[m]={}),o[m][x]?!1:(a[m][x]=!0,!0)}).reverse().forEach(function(h){return s.push(h)});for(var c=Object.keys(a),d=0;d<c.length;d++){var f=c[d],u=Mw({},o[f],a[f]);o[f]=u}return s},[]).reverse()},qt=function(t,n){for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.hasOwnProperty(n))return o[n]}return null},qw=function(t){return{baseTag:Vw([le.HREF,le.TARGET],t),bodyAttributes:io(bt.BODY,t),defer:qt(t,vn.DEFER),encode:qt(t,vn.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:io(bt.HTML,t),linkTags:sn(z.LINK,[le.REL,le.HREF],t),metaTags:sn(z.META,[le.NAME,le.CHARSET,le.HTTPEQUIV,le.PROPERTY,le.ITEM_PROP],t),noscriptTags:sn(z.NOSCRIPT,[le.INNER_HTML],t),onChangeClientState:Hw(t),scriptTags:sn(z.SCRIPT,[le.SRC,le.INNER_HTML],t),styleTags:sn(z.STYLE,[le.CSS_TEXT],t),title:Uw(t),titleAttributes:io(bt.TITLE,t)}},Lo=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){Lo(t)},0)}})(),ei=function(t){return clearTimeout(t)},Ww=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Lo:global.requestAnimationFrame||Lo,zw=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||ei:global.cancelAnimationFrame||ei,Gw=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},an=null,Kw=function(t){an&&zw(an),t.defer?an=Ww(function(){ti(t,function(){an=null})}):(ti(t),an=null)},ti=function(t,n){var r=t.baseTag,o=t.bodyAttributes,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,d=t.onChangeClientState,f=t.scriptTags,u=t.styleTags,h=t.title,m=t.titleAttributes;ko(z.BODY,o),ko(z.HTML,s),Zw(h,m);var b={baseTag:Bt(z.BASE,r),linkTags:Bt(z.LINK,i),metaTags:Bt(z.META,a),noscriptTags:Bt(z.NOSCRIPT,c),scriptTags:Bt(z.SCRIPT,f),styleTags:Bt(z.STYLE,u)},g={},y={};Object.keys(b).forEach(function(v){var x=b[v],E=x.newTags,S=x.oldTags;E.length&&(g[v]=E),S.length&&(y[v]=b[v].oldTags)}),n&&n(),d(t,g,y)},_d=function(t){return Array.isArray(t)?t.join(""):t},Zw=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=_d(t)),ko(z.TITLE,n)},ko=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(qe),s=o?o.split(","):[],i=[].concat(s),a=Object.keys(n),c=0;c<a.length;c++){var d=a[c],f=n[d]||"";r.getAttribute(d)!==f&&r.setAttribute(d,f),s.indexOf(d)===-1&&s.push(d);var u=i.indexOf(d);u!==-1&&i.splice(u,1)}for(var h=i.length-1;h>=0;h--)r.removeAttribute(i[h]);s.length===i.length?r.removeAttribute(qe):r.getAttribute(qe)!==a.join(",")&&r.setAttribute(qe,a.join(","))}},Bt=function(t,n){var r=document.head||document.querySelector(z.HEAD),o=r.querySelectorAll(t+"["+qe+"]"),s=Array.prototype.slice.call(o),i=[],a=void 0;return n&&n.length&&n.forEach(function(c){var d=document.createElement(t);for(var f in c)if(c.hasOwnProperty(f))if(f===le.INNER_HTML)d.innerHTML=c.innerHTML;else if(f===le.CSS_TEXT)d.styleSheet?d.styleSheet.cssText=c.cssText:d.appendChild(document.createTextNode(c.cssText));else{var u=typeof c[f]>"u"?"":c[f];d.setAttribute(f,u)}d.setAttribute(qe,"true"),s.some(function(h,m){return a=m,d.isEqualNode(h)})?s.splice(a,1):i.push(d)}),s.forEach(function(c){return c.parentNode.removeChild(c)}),i.forEach(function(c){return r.appendChild(c)}),{oldTags:s,newTags:i}},Id=function(t){return Object.keys(t).reduce(function(n,r){var o=typeof t[r]<"u"?r+'="'+t[r]+'"':""+r;return n?n+" "+o:o},"")},Qw=function(t,n,r,o){var s=Id(r),i=_d(n);return s?"<"+t+" "+qe+'="true" '+s+">"+jo(i,o)+"</"+t+">":"<"+t+" "+qe+'="true">'+jo(i,o)+"</"+t+">"},Yw=function(t,n,r){return n.reduce(function(o,s){var i=Object.keys(s).filter(function(d){return!(d===le.INNER_HTML||d===le.CSS_TEXT)}).reduce(function(d,f){var u=typeof s[f]>"u"?f:f+'="'+jo(s[f],r)+'"';return d?d+" "+u:u},""),a=s.innerHTML||s.cssText||"",c=jw.indexOf(t)===-1;return o+"<"+t+" "+qe+'="true" '+i+(c?"/>":">"+a+"</"+t+">")},"")},Md=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[cr[o]||o]=t[o],r},n)},Xw=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Dw[o]||o]=t[o],r},n)},Jw=function(t,n,r){var o,s=(o={key:n},o[qe]=!0,o),i=Md(r,s);return[C.createElement(z.TITLE,i,n)]},e1=function(t,n){return n.map(function(r,o){var s,i=(s={key:o},s[qe]=!0,s);return Object.keys(r).forEach(function(a){var c=cr[a]||a;if(c===le.INNER_HTML||c===le.CSS_TEXT){var d=r.innerHTML||r.cssText;i.dangerouslySetInnerHTML={__html:d}}else i[c]=r[a]}),C.createElement(t,i)})},tt=function(t,n,r){switch(t){case z.TITLE:return{toComponent:function(){return Jw(t,n.title,n.titleAttributes)},toString:function(){return Qw(t,n.title,n.titleAttributes,r)}};case bt.BODY:case bt.HTML:return{toComponent:function(){return Md(n)},toString:function(){return Id(n)}};default:return{toComponent:function(){return e1(t,n)},toString:function(){return Yw(t,n,r)}}}},Dd=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,d=t.scriptTags,f=t.styleTags,u=t.title,h=u===void 0?"":u,m=t.titleAttributes;return{base:tt(z.BASE,n,o),bodyAttributes:tt(bt.BODY,r,o),htmlAttributes:tt(bt.HTML,s,o),link:tt(z.LINK,i,o),meta:tt(z.META,a,o),noscript:tt(z.NOSCRIPT,c,o),script:tt(z.SCRIPT,d,o),style:tt(z.STYLE,f,o),title:tt(z.TITLE,{title:h,titleAttributes:m},o)}},t1=function(t){var n,r;return r=n=(function(o){$w(s,o);function s(){return kw(this,s),Bw(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(a){return!Nw(this.props,a)},s.prototype.mapNestedChildrenToProps=function(a,c){if(!c)return null;switch(a.type){case z.SCRIPT:case z.NOSCRIPT:return{innerHTML:c};case z.STYLE:return{cssText:c}}throw new Error("<"+a.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},s.prototype.flattenArrayTypeChildren=function(a){var c,d=a.child,f=a.arrayTypeChildren,u=a.newChildProps,h=a.nestedChildren;return _e({},f,(c={},c[d.type]=[].concat(f[d.type]||[],[_e({},u,this.mapNestedChildrenToProps(d,h))]),c))},s.prototype.mapObjectTypeChildren=function(a){var c,d,f=a.child,u=a.newProps,h=a.newChildProps,m=a.nestedChildren;switch(f.type){case z.TITLE:return _e({},u,(c={},c[f.type]=m,c.titleAttributes=_e({},h),c));case z.BODY:return _e({},u,{bodyAttributes:_e({},h)});case z.HTML:return _e({},u,{htmlAttributes:_e({},h)})}return _e({},u,(d={},d[f.type]=_e({},h),d))},s.prototype.mapArrayTypeChildrenToProps=function(a,c){var d=_e({},c);return Object.keys(a).forEach(function(f){var u;d=_e({},d,(u={},u[f]=a[f],u))}),d},s.prototype.warnOnInvalidChildren=function(a,c){return!0},s.prototype.mapChildrenToProps=function(a,c){var d=this,f={};return C.Children.forEach(a,function(u){if(!(!u||!u.props)){var h=u.props,m=h.children,b=Ja(h,["children"]),g=Xw(b);switch(d.warnOnInvalidChildren(u,m),u.type){case z.LINK:case z.META:case z.NOSCRIPT:case z.SCRIPT:case z.STYLE:f=d.flattenArrayTypeChildren({child:u,arrayTypeChildren:f,newChildProps:g,nestedChildren:m});break;default:c=d.mapObjectTypeChildren({child:u,newProps:c,newChildProps:g,nestedChildren:m});break}}}),c=this.mapArrayTypeChildrenToProps(f,c),c},s.prototype.render=function(){var a=this.props,c=a.children,d=Ja(a,["children"]),f=_e({},d);return c&&(f=this.mapChildrenToProps(c,f)),C.createElement(t,f)},Fw(s,null,[{key:"canUseDOM",set:function(a){t.canUseDOM=a}}]),s})(C.Component),n.propTypes={base:ce.object,bodyAttributes:ce.object,children:ce.oneOfType([ce.arrayOf(ce.node),ce.node]),defaultTitle:ce.string,defer:ce.bool,encodeSpecialCharacters:ce.bool,htmlAttributes:ce.object,link:ce.arrayOf(ce.object),meta:ce.arrayOf(ce.object),noscript:ce.arrayOf(ce.object),onChangeClientState:ce.func,script:ce.arrayOf(ce.object),style:ce.arrayOf(ce.object),title:ce.string,titleAttributes:ce.object,titleTemplate:ce.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=Dd({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},n1=function(){return null},r1=Pw(qw,Kw,Dd)(n1),Fo=t1(r1);Fo.renderStatic=Fo.rewind;function ni(e,t){return t==null?p.jsx($e,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:e}):typeof t=="string"||typeof t=="number"?p.jsx($e,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:t}):p.jsx("div",{role:"heading","aria-level":1,children:t})}function ri(e){return e==null?null:typeof e=="string"||typeof e=="number"?p.jsx($e,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"mt-1",children:e}):p.jsx("div",{className:"mt-1",children:e})}function Ds({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return p.jsxs(p.Fragment,{children:[p.jsx(Fo,{children:p.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&p.jsx("div",{className:"mb-5 border-b border-border-subtle/80 pb-4",children:p.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[p.jsxs("div",{children:[ni(e,t),ri(r)]}),o]})}),n==="subtle"&&p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[p.jsxs("div",{children:[ni(e,t),ri(r)]}),o]})}),s]})}const $o="An unexpected routing error occurred.",jd=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),o1=e=>e instanceof Error?e.message:jd(e)?e.errors?.[0]?.message??$o:$o,s1=e=>{if(jd(e))return e.errors?.[0]?.code};function Ld({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const i=fr(),a=zt(),[c,d]=l.useState("idle"),f=o1(t),u=s1(t),h=async()=>{try{const m=[u,f].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(m||$o),d("copied")}catch{d("failed")}};return p.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[p.jsx($e,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:e}),n&&p.jsx($e,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:n}),p.jsxs($e,{as:"div",variant:"body",tone:"secondary",className:"mt-4 rounded-[14px] border border-border-subtle bg-subtle px-3 py-2",children:[f,u&&p.jsxs($e,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",u,"]"]})]}),p.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&p.jsx(it,{size:"sm",onClick:r,children:"Try again"}),o&&p.jsx(it,{size:"sm",variant:"ghost",onClick:()=>a.history.back(),children:"Go back"}),s&&p.jsx(it,{size:"sm",variant:"ghost",onClick:()=>i({to:of,search:{page:1,limit:Nd,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),p.jsx(it,{size:"sm",variant:"ghost",onClick:h,children:c==="copied"?"Copied details":c==="failed"?"Copy failed":"Copy details"})]})]})}function NE({title:e="Loading page",description:t="Preparing route resources."}){return p.jsx(Ds,{title:e,description:t,variant:"none",children:p.jsxs("div",{role:"status","aria-label":e,className:"flex flex-col gap-4",children:[p.jsx(Zn,{height:"56px"}),p.jsx(Zn,{height:"220px"}),p.jsx(Zn,{height:"160px"})]})})}function _E({error:e,reset:t}){return p.jsx(Ds,{title:"Something went wrong",variant:"none",children:p.jsx(Ld,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function IE(){return p.jsx(Ds,{title:"Not found",variant:"none",children:p.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[p.jsx($e,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:"This page does not exist."}),p.jsx($e,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:"Check the URL or navigate from the sidebar."})]})})}const a1=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class i1 extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&a1(t.resetKeys,this.props.resetKeys)&&this.resetErrorBoundary()}resetErrorBoundary=()=>{this.props.onReset?.(),this.setState({error:null})};render(){return this.state.error!==null?this.props.fallbackRender({error:this.state.error,resetErrorBoundary:this.resetErrorBoundary}):this.props.children}}function ME({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return p.jsx(pp,{children:({reset:i})=>p.jsx(i1,{onReset:i,resetKeys:o,fallbackRender:({error:a,resetErrorBoundary:c})=>s?s({error:a,retry:c}):p.jsx(Ld,{title:n,description:r,error:a,onRetry:c}),children:p.jsx(l.Suspense,{fallback:t,children:e})})})}const oi=e=>{let t;const n=new Set,r=(d,f)=>{const u=typeof d=="function"?d(t):d;if(!Object.is(u,t)){const h=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(m=>m(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d))},c=t=e(r,o,a);return a},c1=(e=>e?oi(e):oi),l1=e=>e;function u1(e,t=l1){const n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),C.useCallback(()=>t(e.getInitialState()),[e,t]));return C.useDebugValue(n),n}const si=e=>{const t=c1(e),n=r=>u1(t,r);return Object.assign(n,t),n},d1=(e=>e?si(e):si),kd="theme",ai="(prefers-color-scheme: dark)";function f1(e){return e==="light"||e==="dark"}function p1(){return typeof document>"u"?null:document.documentElement}function Fd(){return typeof window>"u"?null:window.localStorage}function $d(e){const t=p1();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function Bd(){const e=Fd()?.getItem(kd)??null;return f1(e)?e:null}function h1({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function m1(e,t={}){$d(e),t.persist!==!1&&Fd()?.setItem(kd,e)}function DE(e={}){const t=e.matchMedia?e.matchMedia(ai).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(ai).matches:!1,n=h1({storedTheme:Bd(),systemPrefersDark:t});return $d(n),n}const ii=Bd(),g1=d1(e=>({explicitTheme:ii,theme:ii??"light",setTheme:t=>{e({explicitTheme:t,theme:t})},setSystemTheme:t=>{e(n=>n.explicitTheme?n:{theme:t})},toggleTheme:()=>{e(t=>{const n=t.theme==="light"?"dark":"light";return{explicitTheme:n,theme:n}})}}));g1.subscribe(e=>{m1(e.theme,{persist:e.explicitTheme===e.theme})});const v1=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),y1=e=>{const t=ue.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=ue.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=ue.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}},b1={async execute(e){try{const{data:t}=await ue.post("/graphql",e);return t.errors&&t.errors.length>0?v1(t.errors):t.data?{type:"success",...t.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:t}]}}catch(t){return y1(t)}}},x1={server:b1},w1=()=>x1.server;async function de(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;return w1().execute(r)}const E1=new Set(["content","order","layout","properties"]),S1=`query FetchNotes(
67
+ $searchFilter: SearchFilterInput,
68
+ $pagination: PaginationInput
69
+ ) {
70
+ allNotes(
71
+ searchFilter: $searchFilter,
72
+ pagination: $pagination
73
+ ) {
74
+ totalCount
75
+ notes {
76
+ __NOTE_ADDITIONAL_FIELDS__ id
77
+ title
78
+ pinned
79
+ createdAt
80
+ updatedAt
81
+ tags {
82
+ id
83
+ name
84
+ }
85
+ }
86
+ }
87
+ }`,C1=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>E1.has(n))));return t.length===0?"":t.map(n=>n==="properties"?` properties {
88
+ key
89
+ name
90
+ value
91
+ valueType
92
+ option { id label value color order }
93
+ createdAt
94
+ updatedAt
95
+ }`:" "+n).join(`
96
+ `)+`
97
+ `};function jE({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:i}={}){const a=C1(i),c=S1.replace("__NOTE_ADDITIONAL_FIELDS__",a);return de(c,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function LE({query:e="",limit:t=25,offset:n=0}={}){return de(`query FetchTagNotes(
98
+ $searchFilter: SearchFilterInput,
99
+ $pagination: PaginationInput
100
+ ) {
101
+ tagNotes(
102
+ searchFilter: $searchFilter,
103
+ pagination: $pagination
104
+ ) {
105
+ totalCount
106
+ notes {
107
+ id
108
+ title
109
+ pinned
110
+ tags {
111
+ id
112
+ name
113
+ }
114
+ createdAt
115
+ updatedAt
116
+ }
117
+ }
118
+ }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function kE(e){return de(`query FetchNote($id: ID!) {
119
+ note(id: $id) {
120
+ title
121
+ pinned
122
+ layout
123
+ content
124
+ createdAt
125
+ updatedAt
126
+ properties {
127
+ key
128
+ name
129
+ value
130
+ valueType
131
+ option { id label value color order }
132
+ createdAt
133
+ updatedAt
134
+ }
135
+ }
136
+ }`,{id:e})}function FE(e){return de(`query FetchBackReferences($id: ID!) {
137
+ backReferences(id: $id) {
138
+ id
139
+ title
140
+ }
141
+ }`,{id:e})}function $E(e){return de(`query FetchImageNotes($src: String!) {
142
+ imageNotes(src: $src) {
143
+ id
144
+ title
145
+ createdAt
146
+ updatedAt
147
+ }
148
+ }`,{src:e})}function BE({query:e="",limit:t=50,offset:n=0}={}){return de(`query FetchNotePropertyKeys($query: String, $pagination: PaginationInput) {
149
+ notePropertyKeys(query: $query, pagination: $pagination) {
150
+ totalCount
151
+ keys {
152
+ key
153
+ name
154
+ valueType
155
+ noteCount
156
+ options { id label value color order }
157
+ updatedAt
158
+ }
159
+ }
160
+ }`,{...e?{query:e}:{},pagination:{limit:t,offset:n}})}function UE(e){return de(`mutation CreateNotePropertyKey($input: NotePropertyDefinitionInput!) {
161
+ createNotePropertyKey(input: $input) {
162
+ key
163
+ name
164
+ valueType
165
+ noteCount
166
+ options { id label value color order }
167
+ updatedAt
168
+ }
169
+ }`,{input:e})}function HE({key:e,...t}){return de(`mutation UpdateNotePropertyKey($key: String!, $input: NotePropertyDefinitionUpdateInput!) {
170
+ updateNotePropertyKey(key: $key, input: $input) {
171
+ key
172
+ name
173
+ valueType
174
+ noteCount
175
+ options { id label value color order }
176
+ updatedAt
177
+ }
178
+ }`,{key:e,input:t})}function VE({key:e,confirmImpact:t}){return de(`mutation DeleteNotePropertyKey($key: String!, $confirmImpact: Boolean) {
179
+ deleteNotePropertyKey(key: $key, confirmImpact: $confirmImpact) {
180
+ key
181
+ name
182
+ valueType
183
+ affectedNoteCount
184
+ deleted
185
+ }
186
+ }`,{key:e,...t?{confirmImpact:!0}:{}})}function qE(e){return de(`mutation CreateNote($note: NoteInput!) {
187
+ createNote(note: $note) {
188
+ id
189
+ }
190
+ }`,{note:e})}function WE({id:e,set:t=[],deleteKeys:n=[],editSessionId:r,expectedUpdatedAt:o,force:s}){return de(`mutation UpdateNoteProperties(
191
+ $id: ID!,
192
+ $patch: NotePropertiesPatchInput!,
193
+ $editSessionId: String,
194
+ $expectedUpdatedAt: String!,
195
+ $force: Boolean
196
+ ) {
197
+ updateNoteProperties(
198
+ id: $id,
199
+ patch: $patch,
200
+ editSessionId: $editSessionId,
201
+ expectedUpdatedAt: $expectedUpdatedAt,
202
+ force: $force
203
+ ) {
204
+ id
205
+ updatedAt
206
+ properties {
207
+ key
208
+ name
209
+ value
210
+ valueType
211
+ option { id label value color order }
212
+ createdAt
213
+ updatedAt
214
+ }
215
+ }
216
+ }`,{id:e,patch:{...t.length>0?{set:t}:{},...n.length>0?{deleteKeys:n}:{}},...r?{editSessionId:r}:{},expectedUpdatedAt:o,...s?{force:!0}:{}})}const zE=({id:e,editSessionId:t,expectedUpdatedAt:n,force:r,...o})=>de(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String, $expectedUpdatedAt: String, $force: Boolean) {
217
+ updateNote(id: $id, note: $note, editSessionId: $editSessionId, expectedUpdatedAt: $expectedUpdatedAt, force: $force) {
218
+ id
219
+ title
220
+ updatedAt
221
+ }
222
+ }`,{id:e,note:o,...t?{editSessionId:t}:{},...n?{expectedUpdatedAt:n}:{},...r?{force:!0}:{}});function GE(e,t=10){return de(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
223
+ noteSnapshots(id: $id, limit: $limit) {
224
+ id
225
+ title
226
+ contentPreview
227
+ createdAt
228
+ meta {
229
+ entrypoint
230
+ label
231
+ }
232
+ }
233
+ }`,{id:e,limit:t})}function KE(e){return de(`query FetchNoteSnapshot($id: ID!) {
234
+ noteSnapshot(id: $id) {
235
+ id
236
+ title
237
+ contentPreview
238
+ contentAsMarkdown
239
+ createdAt
240
+ meta {
241
+ entrypoint
242
+ label
243
+ }
244
+ }
245
+ }`,{id:e})}function ZE(e,t="current"){return de(`query FetchNoteSnapshotDiff($id: ID!, $target: NoteSnapshotDiffTarget, $contextLines: Int) {
246
+ noteSnapshotDiff(id: $id, target: $target, contextLines: $contextLines) {
247
+ noteId
248
+ mode
249
+ before {
250
+ kind
251
+ id
252
+ title
253
+ createdAt
254
+ updatedAt
255
+ meta {
256
+ entrypoint
257
+ label
258
+ }
259
+ }
260
+ after {
261
+ kind
262
+ id
263
+ title
264
+ createdAt
265
+ updatedAt
266
+ meta {
267
+ entrypoint
268
+ label
269
+ }
270
+ }
271
+ diff {
272
+ markdown
273
+ changedLineCount
274
+ changedCharCount
275
+ beforeMarkdownSha256
276
+ afterMarkdownSha256
277
+ }
278
+ }
279
+ }`,{id:e,target:t.toUpperCase(),contextLines:3})}function QE(e){return de(`mutation RestoreNoteSnapshot($id: ID!) {
280
+ restoreNoteSnapshot(id: $id) {
281
+ id
282
+ title
283
+ pinned
284
+ layout
285
+ content
286
+ updatedAt
287
+ }
288
+ }`,{id:e})}function YE({limit:e=25,offset:t=0}={}){return de(`query FetchTrashedNotes($pagination: PaginationInput) {
289
+ trashedNotes(pagination: $pagination) {
290
+ totalCount
291
+ notes {
292
+ id
293
+ title
294
+ createdAt
295
+ updatedAt
296
+ deletedAt
297
+ contentPreview
298
+ pinned
299
+ order
300
+ layout
301
+ tagNames
302
+ }
303
+ }
304
+ }`,{pagination:{limit:e,offset:t}})}function XE(e){return de(`query FetchTrashedNote($id: ID!) {
305
+ trashedNote(id: $id) {
306
+ id
307
+ title
308
+ createdAt
309
+ updatedAt
310
+ deletedAt
311
+ contentPreview
312
+ contentAsMarkdown
313
+ pinned
314
+ order
315
+ layout
316
+ tagNames
317
+ }
318
+ }`,{id:e})}function JE(e){return de(`mutation RestoreTrashedNote($id: ID!) {
319
+ restoreTrashedNote(id: $id) {
320
+ id
321
+ title
322
+ pinned
323
+ layout
324
+ content
325
+ updatedAt
326
+ }
327
+ }`,{id:e})}function eS(e){return de(`mutation PurgeTrashedNote($id: ID!) {
328
+ purgeTrashedNote(id: $id)
329
+ }`,{id:e})}function tS(e,t){return de(`mutation PinNote($id: ID!, $pinned: Boolean!) {
330
+ pinNote(id: $id, pinned: $pinned) {
331
+ id
332
+ title
333
+ pinned
334
+ createdAt
335
+ updatedAt
336
+ }
337
+ }`,{id:e,pinned:t})}function nS(e){return de(`mutation DeleteNote($id: ID!) {
338
+ deleteNote(id: $id)
339
+ }`,{id:e})}function rS(e){return de(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
340
+ reorderNotes(notes: $notes) {
341
+ id
342
+ order
343
+ }
344
+ }`,{notes:e})}function oS(){return de(`query FetchNoteGraph {
345
+ noteGraph {
346
+ nodes {
347
+ id
348
+ title
349
+ connections
350
+ }
351
+ links {
352
+ source
353
+ target
354
+ }
355
+ }
356
+ }`)}export{xw as $,Q1 as A,Qe as B,zo as C,_1 as D,Wo as E,qo as F,Vo as G,zt as H,fr as I,O1 as J,W1 as K,uo as L,G1 as M,z1 as N,Rf as O,K1 as P,Tf as Q,At as R,ue as S,TE as T,up as U,X1 as V,oE as W,tE as X,nE as Y,$e as Z,Ox as _,q1 as a,LE as a$,Nx as a0,Nd as a1,OE as a2,_b as a3,Ry as a4,fe as a5,de as a6,Bm as a7,rE as a8,J1 as a9,FE as aA,AE as aB,QE as aC,GE as aD,ZE as aE,KE as aF,Mx as aG,qx as aH,Wx as aI,km as aJ,zE as aK,kE as aL,WE as aM,tS as aN,qE as aO,bn as aP,po as aQ,dn as aR,ap as aS,Ee as aT,wp as aU,tp as aV,Me as aW,Ei as aX,eE as aY,Ae as aZ,nS as a_,ME as aa,Ld as ab,Zn as ac,Go as ad,rS as ae,Zr as af,jE as ag,PE as ah,Z1 as ai,Ds as aj,Ib as ak,Pb as al,Y1 as am,IE as an,_E as ao,NE as ap,g1 as aq,Bd as ar,DE as as,xr as at,it as au,Kr as av,Ob as aw,BE as ax,ce as ay,oS as az,V1 as b,_x as b0,YE as b1,JE as b2,eS as b3,XE as b4,Fo as b5,$E as b6,xb as b7,wb as b8,Lu as b9,Rb as ba,Fu as bb,ku as bc,UE as bd,HE as be,VE as bf,Bo as c,A1 as d,U1 as e,Us as f,lo as g,D1 as h,N1 as i,Lr as j,fi as k,hi as l,Gs as m,L1 as n,Vn as o,F1 as p,H1 as q,B1 as r,li as s,$1 as t,co as u,I1 as v,j1 as w,k1 as x,pt as y,M1 as z};