@onequery/cli 0.1.33-win32-x64 → 0.1.34-darwin-arm64

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 (140) hide show
  1. package/package.json +3 -3
  2. package/vendor/{x86_64-pc-windows-msvc/onequery/onequery.exe → aarch64-apple-darwin/onequery/onequery} +0 -0
  3. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/DialogTitle-C3t5rzfv.js → aarch64-apple-darwin/runtime/web/assets/DialogTitle-C7S-GNch.js} +1 -1
  4. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/_authenticated-B_5gYcSE.js → aarch64-apple-darwin/runtime/web/assets/_authenticated-DZPwfG3P.js} +1 -1
  5. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/_org_slug-ZRAZX4yf.js → aarch64-apple-darwin/runtime/web/assets/_org_slug-ZU7MFtro.js} +1 -1
  6. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/audit-0ySkceEm.js → aarch64-apple-darwin/runtime/web/assets/audit-WhwKqWGH.js} +1 -1
  7. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/budget-M88BhFjM.js → aarch64-apple-darwin/runtime/web/assets/budget-C3tdfVeU.js} +1 -1
  8. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/callback-oibt7Zzh.js → aarch64-apple-darwin/runtime/web/assets/callback-B2lVZz5B.js} +1 -1
  9. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/connect-database-C2ki17Gk.js → aarch64-apple-darwin/runtime/web/assets/connect-database-BqVJwGWx.js} +1 -1
  10. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/create-org-gZvjpMQY.js → aarch64-apple-darwin/runtime/web/assets/create-org-Dk-TmEGt.js} +1 -1
  11. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/data-source-connection-form-DwwJ0tPU.js → aarch64-apple-darwin/runtime/web/assets/data-source-connection-form-BKMHkF5S.js} +4 -4
  12. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/device-CmX_h31L.js → aarch64-apple-darwin/runtime/web/assets/device-Q4ZN6Fdq.js} +1 -1
  13. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/dropdown-menu-BIqdY_8v.js → aarch64-apple-darwin/runtime/web/assets/dropdown-menu-BhdkLmzJ.js} +1 -1
  14. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/home-c0b9mo1B.js → aarch64-apple-darwin/runtime/web/assets/home-CcG2qLve.js} +1 -1
  15. package/vendor/aarch64-apple-darwin/runtime/web/assets/index-DGnxvx_K.css +2 -0
  16. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/index-CbFJKkNs.js → aarch64-apple-darwin/runtime/web/assets/index-DthpwdlN.js} +2 -2
  17. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/integrations-Dt8NPrZT.js → aarch64-apple-darwin/runtime/web/assets/integrations-CqOQH6vO.js} +1 -1
  18. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/invite._invitationId-DQAVR32l.js → aarch64-apple-darwin/runtime/web/assets/invite._invitationId-CJlS2Hoi.js} +1 -1
  19. package/vendor/aarch64-apple-darwin/runtime/web/assets/routes-BBWQP8ei.js +1 -0
  20. package/vendor/aarch64-apple-darwin/runtime/web/assets/signin-D87M0GJg.js +1 -0
  21. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/team-C8CHyB14.js → aarch64-apple-darwin/runtime/web/assets/team-DOt1TVvS.js} +1 -1
  22. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/theme-toggle-XEe6wWso.js → aarch64-apple-darwin/runtime/web/assets/theme-toggle-D-rc6UzS.js} +1 -1
  23. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/use-optimistic-mutation-Uf_9TxpA.js → aarch64-apple-darwin/runtime/web/assets/use-optimistic-mutation-B6q6iB7T.js} +1 -1
  24. package/vendor/{x86_64-pc-windows-msvc/runtime/web/assets/useBaseQuery-C6Svq4OV.js → aarch64-apple-darwin/runtime/web/assets/useBaseQuery-Bwqdm4hJ.js} +1 -1
  25. package/vendor/aarch64-apple-darwin/runtime/web/assets/useQuery-BCl2C7k4.js +1 -0
  26. package/vendor/aarch64-apple-darwin/runtime/web/assets/useSuspenseQuery-BoUwwhvS.js +1 -0
  27. package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/index.html +2 -2
  28. package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/server/onequery-server.mjs +6622 -6446
  29. package/vendor/x86_64-pc-windows-msvc/runtime/web/assets/index-CqvU4VXr.css +0 -2
  30. package/vendor/x86_64-pc-windows-msvc/runtime/web/assets/routes-C1hIhGRp.js +0 -1
  31. package/vendor/x86_64-pc-windows-msvc/runtime/web/assets/signin-GSh_tL5l.js +0 -1
  32. package/vendor/x86_64-pc-windows-msvc/runtime/web/assets/useQuery-DcPzWABw.js +0 -1
  33. package/vendor/x86_64-pc-windows-msvc/runtime/web/assets/useSuspenseQuery-BanVmJgY.js +0 -1
  34. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/20260327065242_curious_nightmare.sql +0 -0
  35. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/20260403103652_slippery_hellfire_club.sql +0 -0
  36. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/20260403112219_gigantic_namora.sql +0 -0
  37. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/meta/20260327065242_snapshot.json +0 -0
  38. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/meta/20260403103652_snapshot.json +0 -0
  39. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/meta/20260403112219_snapshot.json +0 -0
  40. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/migrations/meta/_journal.json +0 -0
  41. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/pglite/initdb.wasm +0 -0
  42. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/pglite/pglite.data +0 -0
  43. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/pglite/pglite.wasm +0 -0
  44. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/sql-parser/sql_parser_wasm_bg.wasm +0 -0
  45. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/CompositeItem-D3nXGtvr.js +0 -0
  46. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/CompositeList-CX7HHxYw.js +0 -0
  47. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconArrowRight-DsOD7mDl.js +0 -0
  48. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconCheck-Gc24xPT2.js +0 -0
  49. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconChevronDown-B-39MA7-.js +0 -0
  50. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconCoins-C7Nn0L6R.js +0 -0
  51. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconHistory-BqAd-xl2.js +0 -0
  52. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconLoader2-B3B6M8nQ.js +0 -0
  53. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconPlus-C3-kRhGX.js +0 -0
  54. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/IconX-BQkA009b.js +0 -0
  55. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/Separator-vw4jPN_6.js +0 -0
  56. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/api-base-url-DIb6qukm.js +0 -0
  57. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/api-client-w1GRwBWy.js +0 -0
  58. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/api-paths-ClEWWGwS.js +0 -0
  59. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/app-routes-CnJncMlZ.js +0 -0
  60. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/auth-bootstrap-query-CrWpT3WV.js +0 -0
  61. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/auth-client-BlMeXgb4.js +0 -0
  62. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/avatar-B8g7WJsq.js +0 -0
  63. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/badge-C1_ZMBRy.js +0 -0
  64. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/card-Bsy6azfK.js +0 -0
  65. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/checkbox-CJcCVDm9.js +0 -0
  66. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/compiler-runtime-DCc3R3Xn.js +0 -0
  67. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/createReactComponent-_L2mp4Ui.js +0 -0
  68. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/empty-COnWCwda.js +0 -0
  69. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/format-date-Ctrh7my1.js +0 -0
  70. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/getDisabledMountTransitionStyles-BYKRz4ha.js +0 -0
  71. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/getPseudoElementBounds-InhM-dWf.js +0 -0
  72. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/input-CG_cIxvO.js +0 -0
  73. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  74. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  75. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  76. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  77. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  78. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  79. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  80. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/jsx-runtime-DG_AJzB_.js +0 -0
  81. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/label-CWOhoN_L.js +0 -0
  82. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/link-Cgvqhh5w.js +0 -0
  83. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/matchContext-CDajBC0L.js +0 -0
  84. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/organization-permissions-BQQ5PJbI.js +0 -0
  85. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/organization-query-keys-DwLucsD_.js +0 -0
  86. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/query-timing-LGzitMXx.js +0 -0
  87. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/queryOptions-BHw87wTZ.js +0 -0
  88. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/removable-BfDesq3B.js +0 -0
  89. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/schemas-MsKXD_XQ.js +0 -0
  90. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/select-D6km4Obp.js +0 -0
  91. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/separator-CWltZvB_.js +0 -0
  92. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/settings-5_Ep5M2N.js +0 -0
  93. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/src-DCIPwIx0.js +0 -0
  94. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/table-DCvfJyLS.js +0 -0
  95. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/textarea-DiU04l_U.js +0 -0
  96. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useBaseUiId-BLFGpnYJ.js +0 -0
  97. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useCompositeItem-BsMHgRi0.js +0 -0
  98. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useControlled-B8q0aJoo.js +0 -0
  99. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useRender-B2c9_UYd.js +0 -0
  100. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useRouterState-DpT8luFk.js +0 -0
  101. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/useValueChanged-CqxkrqWn.js +0 -0
  102. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/utils-C8DGLIgm.js +0 -0
  103. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/xstate-react.esm-BlF76DuP.js +0 -0
  104. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/assets/zod-C2fx2RN8.js +0 -0
  105. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/favicon.ico +0 -0
  106. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/amplitude/step1_settings_sidebar.png +0 -0
  107. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/amplitude/step2_projects.png +0 -0
  108. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/amplitude/step3_project_keys.png +0 -0
  109. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/amplitude/step4_api_keys.png +0 -0
  110. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/bigquery/step1_service_accounts.png +0 -0
  111. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/bigquery/step2_bigquery_roles.png +0 -0
  112. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/bigquery/step3_add_key_menu.png +0 -0
  113. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/bigquery/step4_create_json_key.png +0 -0
  114. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/ga4/step1_service_accounts.png +0 -0
  115. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/ga4/step2_create_json_key.png +0 -0
  116. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/ga4/step3_add_user_viewer.png +0 -0
  117. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/ga4/step4_property_details.png +0 -0
  118. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/github-token-guide/step1_signin.png +0 -0
  119. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
  120. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
  121. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/github-token-guide/step4_token_created_sanitized.png +0 -0
  122. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/mixpanel/step1_service_accounts.png +0 -0
  123. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/mixpanel/step2_create_service_account.png +0 -0
  124. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/mixpanel/step3_credentials.png +0 -0
  125. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/mixpanel/step4_project_settings.png +0 -0
  126. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/postgresql/step1_create_user.png +0 -0
  127. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/postgresql/step2_connection.png +0 -0
  128. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/posthog/step1_project_settings.png +0 -0
  129. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/posthog/step2_personal_api_keys.png +0 -0
  130. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/posthog/step3_create_key_modal.png +0 -0
  131. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/rds/step1_connect.png +0 -0
  132. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/rds/step2_create_user.png +0 -0
  133. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/rds/step3_grant.png +0 -0
  134. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/rds/step4_info.png +0 -0
  135. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/sentry/step1_personal_tokens.png +0 -0
  136. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/sentry/step2_create_token_permissions.png +0 -0
  137. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/sentry/step3_organization_slug.png +0 -0
  138. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/images/sentry/step4_project_slug.png +0 -0
  139. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/linear.svg +0 -0
  140. /package/vendor/{x86_64-pc-windows-msvc → aarch64-apple-darwin}/runtime/web/onequery.svg +0 -0
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{t as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{a,o}from"./api-base-url-DIb6qukm.js";import{n as s,r as c,t as l}from"./createReactComponent-_L2mp4Ui.js";import{t as u}from"./utils-C8DGLIgm.js";import{t as d}from"./IconCheck-Gc24xPT2.js";import{t as f}from"./theme-toggle-XEe6wWso.js";import{t as p}from"./IconX-BQkA009b.js";import{c as m,d as h,n as g,o as _,r as v}from"./app-routes-CnJncMlZ.js";import{t as y}from"./api-client-w1GRwBWy.js";import{t as b}from"./input-CG_cIxvO.js";import{t as x}from"./label-CWOhoN_L.js";import{a as S,n as C,o as w,r as T,t as E}from"./card-Bsy6azfK.js";import{a as D,i as O,o as k,r as A,s as j,t as ee}from"./xstate-react.esm-BlF76DuP.js";var M=l(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),N=l(`outline`,`login-2`,`Login2`,[[`path`,{d:`M9 8v-2a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-2`,key:`svg-0`}],[`path`,{d:`M3 12h13l-3 -3`,key:`svg-1`}],[`path`,{d:`M13 15l3 -3`,key:`svg-2`}]]),P=l(`outline`,`shield-check`,`ShieldCheck`,[[`path`,{d:`M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06`,key:`svg-0`}],[`path`,{d:`M15 19l2 2l4 -4`,key:`svg-1`}]]),F=l(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),I=l(`outline`,`terminal-2`,`Terminal2`,[[`path`,{d:`M8 9l3 3l-3 3`,key:`svg-0`}],[`path`,{d:`M13 15l3 0`,key:`svg-1`}],[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12`,key:`svg-2`}]]),L=i(),R=e(t(),1),z=y(),B=`The device code could not be verified. Try again.`,V=`The device request could not be completed. Try again.`;function H(){return{activeUserCode:null,decisionAction:null,error:null,inputCode:``,navigation:null,nextNavigationId:1,result:null,session:{kind:`pending`}}}function U(e){return{...H(),nextNavigationId:e.nextNavigationId}}function W(e,t,n){return{navigation:{id:e.nextNavigationId,phase:`pending`,replace:n,userCode:t},nextNavigationId:e.nextNavigationId+1}}var G=j(async({input:e})=>{if(!e.userCode)return{kind:`error`,message:`Enter the code shown in your terminal to continue.`};try{let t=await z.api.device.verify.$get({query:{user_code:e.userCode}});if(!t.ok)return{kind:`error`,message:q(await t.json().catch(()=>null),B)};let n=await t.json();return{kind:`verified`,status:n.status,userCode:n.userCode}}catch(e){return console.error(`[device-auth] failed to verify device code`,{errorName:Y(e)}),{kind:`error`,message:B}}}),te=j(async({input:e})=>{if(!e.userCode)return{kind:`error`,message:`The device request could not be completed. Try again.`};try{let t=await(e.action===`approve`?z.api.device.approve.$post:z.api.device.deny.$post)({form:{user_code:e.userCode}});if(!t.ok)return{kind:`error`,message:q(await t.json().catch(()=>null),V)};let n=await t.json();return{kind:`success`,message:n.message,title:n.title,tone:e.action===`approve`?`success`:`error`}}catch(t){return console.error(`[device-auth] failed to submit device decision`,{action:e.action,errorName:Y(t)}),{kind:`error`,message:V}}}),ne=D({actions:{resetToEntry:k(({context:e})=>U(e)),syncRouteToVerification:k(({event:e})=>(O(e,`deviceAuth/routeSynced`),e.userCode===null?{}:{inputCode:e.userCode,activeUserCode:e.userCode,error:null,result:null,decisionAction:null,navigation:null})),setInputCode:k(({event:e})=>(O(e,`deviceAuth/inputChanged`),{inputCode:e.value,error:null})),stageVerificationFromInput:k(({context:e})=>{let t=K(e.inputCode);return t===null?{}:{inputCode:t,activeUserCode:t,error:null,result:null,decisionAction:null,...W(e,t,!1)}}),setMissingCodeError:k({error:()=>`Enter the code shown in your terminal to continue.`}),syncSession:k(({event:e})=>(O(e,`deviceAuth/sessionSynced`),{session:e.session,error:null})),queueClearCodeNavigation:k(({context:e})=>{let t=U(e);return{...t,...W(t,null,!1)}}),stageApproveDecision:k({decisionAction:()=>`approve`,error:()=>null}),stageDenyDecision:k({decisionAction:()=>`deny`,error:()=>null}),markNavigationRunning:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationStarted`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:{...e.navigation,phase:`running`}})),completeNavigation:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationCompleted`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:null})),failNavigation:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationFailed`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:null,error:t.message}))},actors:{verifyCode:G,submitDecision:te},guards:{routeCleared:({event:e})=>e.type===`deviceAuth/routeSynced`&&e.userCode===null,routeChanged:({context:e,event:t})=>t.type===`deviceAuth/routeSynced`&&t.userCode!==null&&t.userCode!==e.activeUserCode,hasNormalizedInputCode:({context:e})=>K(e.inputCode)!==null,sessionSignedIn:({event:e})=>e.type===`deviceAuth/sessionSynced`&&e.session.kind===`signedIn`,sessionSignedOut:({event:e})=>e.type===`deviceAuth/sessionSynced`&&e.session.kind===`signedOut`},types:{}}).createMachine({context:H(),id:`deviceAuth`,initial:`entry`,on:{"deviceAuth/routeSynced":[{guard:`routeCleared`,target:`.entry`,actions:`resetToEntry`},{guard:`routeChanged`,target:`.verifying`,actions:`syncRouteToVerification`}],"deviceAuth/navigationStarted":{actions:`markNavigationRunning`},"deviceAuth/navigationCompleted":{actions:`completeNavigation`},"deviceAuth/navigationFailed":{actions:`failNavigation`}},states:{entry:{on:{"deviceAuth/inputChanged":{actions:`setInputCode`},"deviceAuth/submit":[{guard:`hasNormalizedInputCode`,target:`verifying`,actions:`stageVerificationFromInput`},{actions:`setMissingCodeError`}]}},verifying:{invoke:{src:`verifyCode`,input:({context:e})=>({userCode:e.activeUserCode}),onDone:[{guard:({event:e})=>ce(e.output),target:`entry`,actions:k(({context:e,event:t})=>({inputCode:e.activeUserCode??e.inputCode,error:de(t.output),result:null,decisionAction:null}))},{guard:({event:e})=>le(e.output),target:`pending`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:null}))},{guard:({event:e})=>ue(e.output),target:`result`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:{title:`Device Approved`,message:`Return to your terminal to continue. You can close this tab.`,tone:`success`}}))},{target:`result`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:{title:`Device Denied`,message:`This device code has already been denied. Start onequery auth login again if you need a new code.`,tone:`error`}}))}]}},pending:{initial:`sessionCheck`,on:{"deviceAuth/sessionSynced":[{guard:`sessionSignedIn`,target:`.review`,actions:`syncSession`},{guard:`sessionSignedOut`,target:`.signInRequired`,actions:`syncSession`},{target:`.sessionCheck`,actions:`syncSession`}],"deviceAuth/useDifferentCode":{target:`#deviceAuth.entry`,actions:`queueClearCodeNavigation`}},states:{sessionCheck:{},signInRequired:{},review:{on:{"deviceAuth/approve":{target:`submittingDecision`,actions:`stageApproveDecision`},"deviceAuth/deny":{target:`submittingDecision`,actions:`stageDenyDecision`}}},submittingDecision:{invoke:{src:`submitDecision`,input:({context:e})=>({action:se(e),userCode:e.activeUserCode}),onDone:[{guard:({event:e})=>me(e.output),target:`#deviceAuth.entry`,actions:k(({context:e,event:t})=>({inputCode:e.activeUserCode??``,error:he(t.output),result:null,decisionAction:null}))},{target:`#deviceAuth.result`,actions:k(({event:e})=>({error:null,result:ge(e.output),decisionAction:null}))}]}}}},result:{on:{"deviceAuth/useDifferentCode":{target:`entry`,actions:`queueClearCodeNavigation`}}}}});function re(e){return e.matches(`entry`)?`entry`:e.matches(`verifying`)?`verifying`:e.matches({pending:`sessionCheck`})?`sessionCheck`:e.matches({pending:`signInRequired`})?`signInRequired`:e.matches({pending:`review`})||e.matches({pending:`submittingDecision`})?`review`:`result`}function ie(e){return e.context.session.kind===`signedIn`?e.context.session.email:null}function K(e){return h(e)??null}function ae(e){return e.isSessionPending?{kind:`pending`}:e.email?{email:e.email,kind:`signedIn`}:{kind:`signedOut`}}function oe(e){return`Couldn't update the device URL. Try the same action again.`}function q(e,t){return e&&`error`in e,t}function se(e){if(e.decisionAction===null)throw Error(`Decision action is required before submitting.`);return e.decisionAction}function J(e){let t=fe(e.output,e.context.activeUserCode);return{activeUserCode:t,decisionAction:null,error:null,inputCode:t??e.context.inputCode,result:e.result,...pe(e.context.activeUserCode,e.output)&&t!==null?W(e.context,t,!0):{navigation:null,nextNavigationId:e.context.nextNavigationId}}}function ce(e){return e.kind===`error`}function le(e){return e.kind===`verified`&&e.status===`pending`}function ue(e){return e.kind===`verified`&&e.status===`approved`}function de(e){return e.kind===`error`?e.message:`The device code could not be verified. Try again.`}function fe(e,t){return e.kind===`verified`?e.userCode:t}function pe(e,t){return t.kind===`verified`&&t.userCode!==e}function me(e){return e.kind===`error`}function he(e){return e.kind===`error`?e.message:`The device request could not be completed. Try again.`}function ge(e){return e.kind===`success`?{message:e.message,title:e.title,tone:e.tone}:{message:e.message,title:`Device Request Failed`,tone:`error`}}function Y(e){return e instanceof Error?e.name:`unknown`}var X=n();function _e(e){return e.panelView===`entry`?{badge:`Enter code`,description:`Paste the code from your terminal to verify the device login request before approving access.`,icon:I,title:`Authorize OneQuery CLI`,tone:`primary`}:e.panelView===`verifying`?{badge:`Checking request`,description:`We’re validating the code from your terminal and loading the next step in the authorization flow.`,icon:M,title:`Checking device code`,tone:`neutral`}:e.panelView===`sessionCheck`?{badge:`Checking session`,description:`We’re checking whether you already have an active OneQuery session for this device request.`,icon:N,title:`Confirming your browser session`,tone:`neutral`}:e.panelView===`signInRequired`?{badge:`Sign in required`,description:`Sign in with the account that should own this CLI session.`,icon:N,title:`Sign in to approve this device`,tone:`primary`}:e.panelView===`review`?{badge:`Review request`,description:`Review the request and decide whether to authorize this CLI sign-in.`,icon:P,title:`Approve device login`,tone:`primary`}:e.result?.tone===`success`?{badge:`Approved`,description:e.result.message,icon:d,title:e.result.title,tone:`success`}:{badge:`Denied`,description:e.result?.message??`This device request has been denied or could not be completed.`,icon:p,title:e.result?.title??`Device Denied`,tone:`error`}}function ve(e){switch(e){case`primary`:return`border-primary/15 bg-primary/5 text-primary`;case`success`:return`border-primary/15 bg-primary/5 text-primary`;case`error`:return`border-destructive/15 bg-destructive/5 text-destructive`;case`neutral`:return`border-border bg-muted/40 text-foreground`}}function ye(e){switch(e){case`primary`:return`bg-primary/10 text-primary`;case`success`:return`bg-primary/10 text-primary`;case`error`:return`bg-destructive/10 text-destructive`;case`neutral`:return`bg-background text-foreground`}}function Z(e){let t=(0,L.c)(10),{label:n,value:r,emphasis:i}=e,a=i===`error`?`border-destructive/15 bg-destructive/5`:`border-primary/15 bg-primary/5`,o;t[0]===a?o=t[1]:(o=u(`rounded-2xl border p-4`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,X.jsx)(`p`,{className:`mt-2 font-mono text-xl font-semibold tracking-[0.32em] text-foreground sm:text-2xl`,children:r}),t[4]=r,t[5]=c);let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,X.jsxs)(`div`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function be(e){let t=(0,L.c)(10),{label:n,value:r,tone:i}=e,a=i===`error`?`border-destructive/15 bg-destructive/5`:`border-border bg-muted/30`,o;t[0]===a?o=t[1]:(o=u(`rounded-2xl border p-4`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,X.jsx)(`p`,{className:`mt-2 font-medium text-foreground`,children:r}),t[4]=r,t[5]=c);let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,X.jsxs)(`div`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}var Q=a(v);function xe(){let e=(0,L.c)(49),t=o(),{orgId:n,user_code:r}=Q.useSearch(),{auth:i}=Q.useRouteContext(),a=n??null,s;e[0]===r?s=e[1]:(s=h(r??null)??null,e[0]=r,e[1]=s);let c=s,l=ee(ne),u=A(l,re),d=A(l,Oe),f=A(l,De),p=A(l,Ee),g=A(l,Te),_=A(l,ie),y=A(l,$),b=A(l,we),x=A(l,Ce),S=A(l,Se),C=f??c,w;e[2]!==C||e[3]!==a?(w=m(C,a),e[2]=C,e[3]=a,e[4]=w):w=e[4];let T=w,E;e[5]!==u||e[6]!==g?(E=_e({panelView:u,result:g}),e[5]=u,e[6]=g,e[7]=E):E=e[7];let D=E,O,k;e[8]!==l||e[9]!==c?(O=()=>{l.send({type:`deviceAuth/routeSynced`,userCode:c})},k=[l,c],e[8]=l,e[9]=c,e[10]=O,e[11]=k):(O=e[10],k=e[11]),(0,R.useEffect)(O,k);let j;e[12]!==l||e[13]!==i.session?.user.email||e[14]!==x?(j=()=>{x&&l.send({session:ae({isSessionPending:!1,email:i.session?.user.email??null}),type:`deviceAuth/sessionSynced`})},e[12]=l,e[13]=i.session?.user.email,e[14]=x,e[15]=j):j=e[15];let M=i.session?.user.email,N;e[16]!==l||e[17]!==x||e[18]!==M?(N=[l,M,x],e[16]=l,e[17]=x,e[18]=M,e[19]=N):N=e[19],(0,R.useEffect)(j,N);let P,F;e[20]!==l||e[21]!==t||e[22]!==y||e[23]!==a?(P=()=>{y===null||y.phase!==`pending`||(l.send({id:y.id,type:`deviceAuth/navigationStarted`}),t({replace:y.replace,search:y.userCode===null?{}:{user_code:y.userCode,...a?{orgId:a}:{}},to:v}).then(()=>{l.send({id:y.id,type:`deviceAuth/navigationCompleted`})}).catch(e=>{console.error(`[device-auth] failed to sync device route`,{errorName:ke(e),navigationId:y.id,replace:y.replace}),l.send({id:y.id,message:oe(e),type:`deviceAuth/navigationFailed`})}))},F=[l,t,y,a],e[20]=l,e[21]=t,e[22]=y,e[23]=a,e[24]=P,e[25]=F):(P=e[24],F=e[25]),(0,R.useEffect)(P,F);let I=S&&b===`approve`,z=S&&b===`deny`,B,V,H,U,W;e[26]===l?(B=e[27],V=e[28],H=e[29],U=e[30],W=e[31]):(B=()=>{l.send({type:`deviceAuth/approve`})},V=()=>{l.send({type:`deviceAuth/deny`})},H=e=>{l.send({type:`deviceAuth/inputChanged`,value:e.toUpperCase()})},U=()=>{l.send({type:`deviceAuth/submit`})},W=()=>{l.send({type:`deviceAuth/useDifferentCode`})},e[26]=l,e[27]=B,e[28]=V,e[29]=H,e[30]=U,e[31]=W);let G;return e[32]!==f||e[33]!==p||e[34]!==d||e[35]!==a||e[36]!==D||e[37]!==u||e[38]!==g||e[39]!==T||e[40]!==_||e[41]!==I||e[42]!==z||e[43]!==B||e[44]!==V||e[45]!==H||e[46]!==U||e[47]!==W?(G={activeUserCode:f,errorMessage:p,inputCode:d,isSubmittingApprove:I,isSubmittingDeny:z,onboardingOrganizationId:a,onApprove:B,onDeny:V,onInputChange:H,onSubmit:U,onUseDifferentCode:W,panelMeta:D,panelView:u,result:g,resumePath:T,sessionEmail:_},e[32]=f,e[33]=p,e[34]=d,e[35]=a,e[36]=D,e[37]=u,e[38]=g,e[39]=T,e[40]=_,e[41]=I,e[42]=z,e[43]=B,e[44]=V,e[45]=H,e[46]=U,e[47]=W,e[48]=G):G=e[48],G}function Se(e){return e.matches({pending:`submittingDecision`})}function Ce(e){return e.matches(`pending`)}function we(e){return e.context.decisionAction}function $(e){return e.context.navigation}function Te(e){return e.context.result}function Ee(e){return e.context.error}function De(e){return e.context.activeUserCode}function Oe(e){return e.context.inputCode}function ke(e){return e instanceof Error?e.name:`unknown`}function Ae(e){let t=(0,L.c)(33),{controller:n}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,children:[(0,X.jsx)(`div`,{className:`absolute left-[-7rem] top-[-8rem] h-64 w-64 rounded-full bg-primary/10 blur-3xl`}),(0,X.jsx)(`div`,{className:`absolute right-[-8rem] top-20 h-80 w-80 rounded-full bg-muted blur-3xl`}),(0,X.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_right,rgba(127,127,127,0.06)_1px,transparent_1px),linear-gradient(to_bottom,rgba(127,127,127,0.06)_1px,transparent_1px)] bg-[size:4.5rem_4.5rem] [mask-image:linear-gradient(to_bottom,white,rgba(255,255,255,0.3))]`})]}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`header`,{className:`relative z-10 border-b border-border/60 bg-background/80 backdrop-blur`,children:(0,X.jsxs)(`div`,{className:`mx-auto flex h-16 w-full max-w-6xl items-center justify-between px-6`,children:[(0,X.jsxs)(r,{to:`/`,className:`flex items-center gap-3`,children:[(0,X.jsx)(`img`,{src:`/onequery.svg`,alt:`OneQuery`,className:`h-9 w-9 rounded-lg`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-semibold text-lg leading-none`,children:`OneQuery`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Device authorization`})]})]}),(0,X.jsx)(f,{})]})}),t[1]=a):a=t[1];let o;t[2]===n.panelMeta.tone?o=t[3]:(o=u(`inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs font-medium uppercase tracking-[0.18em]`,ve(n.panelMeta.tone)),t[2]=n.panelMeta.tone,t[3]=o);let s;t[4]===n.panelMeta.tone?s=t[5]:(s=u(`flex h-6 w-6 items-center justify-center rounded-full`,ye(n.panelMeta.tone)),t[4]=n.panelMeta.tone,t[5]=s);let c;t[6]===n.panelMeta.icon?c=t[7]:(c=(0,X.jsx)(n.panelMeta.icon,{size:14,stroke:1.9}),t[6]=n.panelMeta.icon,t[7]=c);let l;t[8]!==s||t[9]!==c?(l=(0,X.jsx)(`div`,{className:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let d;t[11]!==n.panelMeta.badge||t[12]!==o||t[13]!==l?(d=(0,X.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:(0,X.jsxs)(`div`,{className:o,children:[l,n.panelMeta.badge]})}),t[11]=n.panelMeta.badge,t[12]=o,t[13]=l,t[14]=d):d=t[14];let p;t[15]===n.panelMeta.title?p=t[16]:(p=(0,X.jsx)(w,{className:`mt-4 text-2xl`,children:n.panelMeta.title}),t[15]=n.panelMeta.title,t[16]=p);let m;t[17]===n.panelMeta.description?m=t[18]:(m=(0,X.jsx)(T,{className:`max-w-2xl text-base leading-7`,children:n.panelMeta.description}),t[17]=n.panelMeta.description,t[18]=m);let h;t[19]!==d||t[20]!==p||t[21]!==m?(h=(0,X.jsxs)(S,{className:`border-b border-border/60 pb-5`,children:[d,p,m]}),t[19]=d,t[20]=p,t[21]=m,t[22]=h):h=t[22];let g;t[23]===n.errorMessage?g=t[24]:(g=n.errorMessage?(0,X.jsx)(`div`,{className:`rounded-xl border border-destructive/20 bg-destructive/5 px-3 py-2 text-sm text-destructive`,children:n.errorMessage}):null,t[23]=n.errorMessage,t[24]=g);let _;t[25]===n?_=t[26]:(_=je(n),t[25]=n,t[26]=_);let v;t[27]!==g||t[28]!==_?(v=(0,X.jsxs)(C,{className:`space-y-5 pt-6`,children:[g,_]}),t[27]=g,t[28]=_,t[29]=v):v=t[29];let y;return t[30]!==h||t[31]!==v?(y=(0,X.jsxs)(`div`,{className:`relative min-h-screen overflow-hidden bg-background`,children:[i,a,(0,X.jsx)(`main`,{className:`relative z-10 flex flex-1 items-center justify-center px-6 py-10 lg:min-h-[calc(100vh-4rem)] lg:py-14`,children:(0,X.jsx)(`section`,{className:`w-full max-w-3xl`,children:(0,X.jsx)(`div`,{className:`rounded-[2rem] border border-border/70 bg-background/75 p-2 shadow-2xl shadow-foreground/5 backdrop-blur`,children:(0,X.jsxs)(E,{className:`w-full border-0 bg-card/95 shadow-none ring-0`,children:[h,v]})})})})]}),t[30]=h,t[31]=v,t[32]=y):y=t[32],y}function je(e){switch(e.panelView){case`entry`:return(0,X.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),e.onSubmit()},className:`space-y-5`,children:[(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(x,{htmlFor:`user-code`,children:`Device code`}),(0,X.jsx)(b,{id:`user-code`,value:e.inputCode,onChange:t=>e.onInputChange(t.target.value),placeholder:`ABCD1234`,autoCapitalize:`characters`,autoComplete:`one-time-code`,required:!0,className:`h-11 font-mono text-base tracking-[0.25em] uppercase`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Enter the 8-character code shown in your terminal.`})]}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(s,{type:`submit`,className:`h-11 w-full`,children:`Continue`}),(0,X.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`You’ll review the request before any access is granted.`})]})]});case`verifying`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Verifying code`,value:e.activeUserCode??e.inputCode,emphasis:`primary`}),(0,X.jsx)(`div`,{className:`rounded-2xl border bg-muted/40 p-4`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,X.jsx)(F,{size:18,stroke:1.75})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`Checking request details`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`We’re validating that this device code is still active and can be approved.`})]})]})})]});case`sessionCheck`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Ready to approve`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(`div`,{className:`rounded-2xl border bg-muted/40 p-4`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-muted`,children:(0,X.jsx)(N,{size:18,stroke:1.75})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`Checking your browser session`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Once we know who you are, you’ll be able to approve or deny this request.`})]})]})})]});case`signInRequired`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Device code`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(r,{to:_,search:{redirect:e.resumePath},className:c({variant:`default`,size:`lg`,className:`h-11 w-full`}),children:`Sign in`}),(0,X.jsx)(s,{type:`button`,variant:`ghost`,size:`sm`,className:`mx-auto flex h-9 px-3 text-muted-foreground`,onClick:e.onUseDifferentCode,children:`Use a different code`})]});case`review`:return e.sessionEmail?(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Device code`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(be,{label:`Signed in as`,value:e.sessionEmail,tone:`neutral`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:[(0,X.jsx)(s,{type:`button`,variant:`outline`,size:`lg`,className:`h-11 flex-1`,onClick:e.onDeny,disabled:e.isSubmittingApprove||e.isSubmittingDeny,children:e.isSubmittingDeny?`Denying...`:`Deny`}),(0,X.jsx)(s,{type:`button`,size:`lg`,className:`h-11 flex-1`,onClick:e.onApprove,disabled:e.isSubmittingApprove||e.isSubmittingDeny,children:e.isSubmittingApprove?`Approving...`:`Approve`})]})]}):null;case`result`:return e.result?(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:e.result.tone===`success`?`Approved code`:`Resolved code`,value:e.activeUserCode??``,emphasis:e.result.tone}),e.result.tone===`success`&&e.onboardingOrganizationId?(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Your CLI session is ready. Connect a data source now, or come back later from the dashboard.`}),(0,X.jsx)(r,{to:g,search:{orgId:e.onboardingOrganizationId},className:c({variant:`default`,size:`lg`,className:`h-11 w-full`}),children:`Continue setup`})]}):null]}):null}}function Me(){let e=(0,L.c)(2),t=xe(),n;return e[0]===t?n=e[1]:(n=(0,X.jsx)(Ae,{controller:t}),e[0]=t,e[1]=n),n}function Ne(){let e=(0,L.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(Me,{}),e[0]=t):t=e[0],t}var Pe=Ne;export{Pe as component};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{t as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{a,o}from"./api-base-url-DIb6qukm.js";import{n as s,r as c,t as l}from"./createReactComponent-_L2mp4Ui.js";import{t as u}from"./utils-C8DGLIgm.js";import{t as d}from"./IconCheck-Gc24xPT2.js";import{t as f}from"./theme-toggle-D-rc6UzS.js";import{t as p}from"./IconX-BQkA009b.js";import{c as m,d as h,n as g,o as _,r as v}from"./app-routes-CnJncMlZ.js";import{t as y}from"./api-client-w1GRwBWy.js";import{t as b}from"./input-CG_cIxvO.js";import{t as x}from"./label-CWOhoN_L.js";import{a as S,n as C,o as w,r as T,t as E}from"./card-Bsy6azfK.js";import{a as D,i as O,o as k,r as A,s as j,t as ee}from"./xstate-react.esm-BlF76DuP.js";var M=l(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),N=l(`outline`,`login-2`,`Login2`,[[`path`,{d:`M9 8v-2a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-2`,key:`svg-0`}],[`path`,{d:`M3 12h13l-3 -3`,key:`svg-1`}],[`path`,{d:`M13 15l3 -3`,key:`svg-2`}]]),P=l(`outline`,`shield-check`,`ShieldCheck`,[[`path`,{d:`M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06`,key:`svg-0`}],[`path`,{d:`M15 19l2 2l4 -4`,key:`svg-1`}]]),F=l(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),I=l(`outline`,`terminal-2`,`Terminal2`,[[`path`,{d:`M8 9l3 3l-3 3`,key:`svg-0`}],[`path`,{d:`M13 15l3 0`,key:`svg-1`}],[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12`,key:`svg-2`}]]),L=i(),R=e(t(),1),z=y(),B=`The device code could not be verified. Try again.`,V=`The device request could not be completed. Try again.`;function H(){return{activeUserCode:null,decisionAction:null,error:null,inputCode:``,navigation:null,nextNavigationId:1,result:null,session:{kind:`pending`}}}function U(e){return{...H(),nextNavigationId:e.nextNavigationId}}function W(e,t,n){return{navigation:{id:e.nextNavigationId,phase:`pending`,replace:n,userCode:t},nextNavigationId:e.nextNavigationId+1}}var G=j(async({input:e})=>{if(!e.userCode)return{kind:`error`,message:`Enter the code shown in your terminal to continue.`};try{let t=await z.api.device.verify.$get({query:{user_code:e.userCode}});if(!t.ok)return{kind:`error`,message:q(await t.json().catch(()=>null),B)};let n=await t.json();return{kind:`verified`,status:n.status,userCode:n.userCode}}catch(e){return console.error(`[device-auth] failed to verify device code`,{errorName:Y(e)}),{kind:`error`,message:B}}}),te=j(async({input:e})=>{if(!e.userCode)return{kind:`error`,message:`The device request could not be completed. Try again.`};try{let t=await(e.action===`approve`?z.api.device.approve.$post:z.api.device.deny.$post)({form:{user_code:e.userCode}});if(!t.ok)return{kind:`error`,message:q(await t.json().catch(()=>null),V)};let n=await t.json();return{kind:`success`,message:n.message,title:n.title,tone:e.action===`approve`?`success`:`error`}}catch(t){return console.error(`[device-auth] failed to submit device decision`,{action:e.action,errorName:Y(t)}),{kind:`error`,message:V}}}),ne=D({actions:{resetToEntry:k(({context:e})=>U(e)),syncRouteToVerification:k(({event:e})=>(O(e,`deviceAuth/routeSynced`),e.userCode===null?{}:{inputCode:e.userCode,activeUserCode:e.userCode,error:null,result:null,decisionAction:null,navigation:null})),setInputCode:k(({event:e})=>(O(e,`deviceAuth/inputChanged`),{inputCode:e.value,error:null})),stageVerificationFromInput:k(({context:e})=>{let t=K(e.inputCode);return t===null?{}:{inputCode:t,activeUserCode:t,error:null,result:null,decisionAction:null,...W(e,t,!1)}}),setMissingCodeError:k({error:()=>`Enter the code shown in your terminal to continue.`}),syncSession:k(({event:e})=>(O(e,`deviceAuth/sessionSynced`),{session:e.session,error:null})),queueClearCodeNavigation:k(({context:e})=>{let t=U(e);return{...t,...W(t,null,!1)}}),stageApproveDecision:k({decisionAction:()=>`approve`,error:()=>null}),stageDenyDecision:k({decisionAction:()=>`deny`,error:()=>null}),markNavigationRunning:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationStarted`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:{...e.navigation,phase:`running`}})),completeNavigation:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationCompleted`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:null})),failNavigation:k(({context:e,event:t})=>(O(t,`deviceAuth/navigationFailed`),e.navigation===null||e.navigation.id!==t.id?{}:{navigation:null,error:t.message}))},actors:{verifyCode:G,submitDecision:te},guards:{routeCleared:({event:e})=>e.type===`deviceAuth/routeSynced`&&e.userCode===null,routeChanged:({context:e,event:t})=>t.type===`deviceAuth/routeSynced`&&t.userCode!==null&&t.userCode!==e.activeUserCode,hasNormalizedInputCode:({context:e})=>K(e.inputCode)!==null,sessionSignedIn:({event:e})=>e.type===`deviceAuth/sessionSynced`&&e.session.kind===`signedIn`,sessionSignedOut:({event:e})=>e.type===`deviceAuth/sessionSynced`&&e.session.kind===`signedOut`},types:{}}).createMachine({context:H(),id:`deviceAuth`,initial:`entry`,on:{"deviceAuth/routeSynced":[{guard:`routeCleared`,target:`.entry`,actions:`resetToEntry`},{guard:`routeChanged`,target:`.verifying`,actions:`syncRouteToVerification`}],"deviceAuth/navigationStarted":{actions:`markNavigationRunning`},"deviceAuth/navigationCompleted":{actions:`completeNavigation`},"deviceAuth/navigationFailed":{actions:`failNavigation`}},states:{entry:{on:{"deviceAuth/inputChanged":{actions:`setInputCode`},"deviceAuth/submit":[{guard:`hasNormalizedInputCode`,target:`verifying`,actions:`stageVerificationFromInput`},{actions:`setMissingCodeError`}]}},verifying:{invoke:{src:`verifyCode`,input:({context:e})=>({userCode:e.activeUserCode}),onDone:[{guard:({event:e})=>ce(e.output),target:`entry`,actions:k(({context:e,event:t})=>({inputCode:e.activeUserCode??e.inputCode,error:de(t.output),result:null,decisionAction:null}))},{guard:({event:e})=>le(e.output),target:`pending`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:null}))},{guard:({event:e})=>ue(e.output),target:`result`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:{title:`Device Approved`,message:`Return to your terminal to continue. You can close this tab.`,tone:`success`}}))},{target:`result`,actions:k(({context:e,event:t})=>J({context:e,output:t.output,result:{title:`Device Denied`,message:`This device code has already been denied. Start onequery auth login again if you need a new code.`,tone:`error`}}))}]}},pending:{initial:`sessionCheck`,on:{"deviceAuth/sessionSynced":[{guard:`sessionSignedIn`,target:`.review`,actions:`syncSession`},{guard:`sessionSignedOut`,target:`.signInRequired`,actions:`syncSession`},{target:`.sessionCheck`,actions:`syncSession`}],"deviceAuth/useDifferentCode":{target:`#deviceAuth.entry`,actions:`queueClearCodeNavigation`}},states:{sessionCheck:{},signInRequired:{},review:{on:{"deviceAuth/approve":{target:`submittingDecision`,actions:`stageApproveDecision`},"deviceAuth/deny":{target:`submittingDecision`,actions:`stageDenyDecision`}}},submittingDecision:{invoke:{src:`submitDecision`,input:({context:e})=>({action:se(e),userCode:e.activeUserCode}),onDone:[{guard:({event:e})=>me(e.output),target:`#deviceAuth.entry`,actions:k(({context:e,event:t})=>({inputCode:e.activeUserCode??``,error:he(t.output),result:null,decisionAction:null}))},{target:`#deviceAuth.result`,actions:k(({event:e})=>({error:null,result:ge(e.output),decisionAction:null}))}]}}}},result:{on:{"deviceAuth/useDifferentCode":{target:`entry`,actions:`queueClearCodeNavigation`}}}}});function re(e){return e.matches(`entry`)?`entry`:e.matches(`verifying`)?`verifying`:e.matches({pending:`sessionCheck`})?`sessionCheck`:e.matches({pending:`signInRequired`})?`signInRequired`:e.matches({pending:`review`})||e.matches({pending:`submittingDecision`})?`review`:`result`}function ie(e){return e.context.session.kind===`signedIn`?e.context.session.email:null}function K(e){return h(e)??null}function ae(e){return e.isSessionPending?{kind:`pending`}:e.email?{email:e.email,kind:`signedIn`}:{kind:`signedOut`}}function oe(e){return`Couldn't update the device URL. Try the same action again.`}function q(e,t){return e&&`error`in e,t}function se(e){if(e.decisionAction===null)throw Error(`Decision action is required before submitting.`);return e.decisionAction}function J(e){let t=fe(e.output,e.context.activeUserCode);return{activeUserCode:t,decisionAction:null,error:null,inputCode:t??e.context.inputCode,result:e.result,...pe(e.context.activeUserCode,e.output)&&t!==null?W(e.context,t,!0):{navigation:null,nextNavigationId:e.context.nextNavigationId}}}function ce(e){return e.kind===`error`}function le(e){return e.kind===`verified`&&e.status===`pending`}function ue(e){return e.kind===`verified`&&e.status===`approved`}function de(e){return e.kind===`error`?e.message:`The device code could not be verified. Try again.`}function fe(e,t){return e.kind===`verified`?e.userCode:t}function pe(e,t){return t.kind===`verified`&&t.userCode!==e}function me(e){return e.kind===`error`}function he(e){return e.kind===`error`?e.message:`The device request could not be completed. Try again.`}function ge(e){return e.kind===`success`?{message:e.message,title:e.title,tone:e.tone}:{message:e.message,title:`Device Request Failed`,tone:`error`}}function Y(e){return e instanceof Error?e.name:`unknown`}var X=n();function _e(e){return e.panelView===`entry`?{badge:`Enter code`,description:`Paste the code from your terminal to verify the device login request before approving access.`,icon:I,title:`Authorize OneQuery CLI`,tone:`primary`}:e.panelView===`verifying`?{badge:`Checking request`,description:`We’re validating the code from your terminal and loading the next step in the authorization flow.`,icon:M,title:`Checking device code`,tone:`neutral`}:e.panelView===`sessionCheck`?{badge:`Checking session`,description:`We’re checking whether you already have an active OneQuery session for this device request.`,icon:N,title:`Confirming your browser session`,tone:`neutral`}:e.panelView===`signInRequired`?{badge:`Sign in required`,description:`Sign in with the account that should own this CLI session.`,icon:N,title:`Sign in to approve this device`,tone:`primary`}:e.panelView===`review`?{badge:`Review request`,description:`Review the request and decide whether to authorize this CLI sign-in.`,icon:P,title:`Approve device login`,tone:`primary`}:e.result?.tone===`success`?{badge:`Approved`,description:e.result.message,icon:d,title:e.result.title,tone:`success`}:{badge:`Denied`,description:e.result?.message??`This device request has been denied or could not be completed.`,icon:p,title:e.result?.title??`Device Denied`,tone:`error`}}function ve(e){switch(e){case`primary`:return`border-primary/15 bg-primary/5 text-primary`;case`success`:return`border-primary/15 bg-primary/5 text-primary`;case`error`:return`border-destructive/15 bg-destructive/5 text-destructive`;case`neutral`:return`border-border bg-muted/40 text-foreground`}}function ye(e){switch(e){case`primary`:return`bg-primary/10 text-primary`;case`success`:return`bg-primary/10 text-primary`;case`error`:return`bg-destructive/10 text-destructive`;case`neutral`:return`bg-background text-foreground`}}function Z(e){let t=(0,L.c)(10),{label:n,value:r,emphasis:i}=e,a=i===`error`?`border-destructive/15 bg-destructive/5`:`border-primary/15 bg-primary/5`,o;t[0]===a?o=t[1]:(o=u(`rounded-2xl border p-4`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,X.jsx)(`p`,{className:`mt-2 font-mono text-xl font-semibold tracking-[0.32em] text-foreground sm:text-2xl`,children:r}),t[4]=r,t[5]=c);let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,X.jsxs)(`div`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function be(e){let t=(0,L.c)(10),{label:n,value:r,tone:i}=e,a=i===`error`?`border-destructive/15 bg-destructive/5`:`border-border bg-muted/30`,o;t[0]===a?o=t[1]:(o=u(`rounded-2xl border p-4`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,X.jsx)(`p`,{className:`mt-2 font-medium text-foreground`,children:r}),t[4]=r,t[5]=c);let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,X.jsxs)(`div`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}var Q=a(v);function xe(){let e=(0,L.c)(49),t=o(),{orgId:n,user_code:r}=Q.useSearch(),{auth:i}=Q.useRouteContext(),a=n??null,s;e[0]===r?s=e[1]:(s=h(r??null)??null,e[0]=r,e[1]=s);let c=s,l=ee(ne),u=A(l,re),d=A(l,Oe),f=A(l,De),p=A(l,Ee),g=A(l,Te),_=A(l,ie),y=A(l,$),b=A(l,we),x=A(l,Ce),S=A(l,Se),C=f??c,w;e[2]!==C||e[3]!==a?(w=m(C,a),e[2]=C,e[3]=a,e[4]=w):w=e[4];let T=w,E;e[5]!==u||e[6]!==g?(E=_e({panelView:u,result:g}),e[5]=u,e[6]=g,e[7]=E):E=e[7];let D=E,O,k;e[8]!==l||e[9]!==c?(O=()=>{l.send({type:`deviceAuth/routeSynced`,userCode:c})},k=[l,c],e[8]=l,e[9]=c,e[10]=O,e[11]=k):(O=e[10],k=e[11]),(0,R.useEffect)(O,k);let j;e[12]!==l||e[13]!==i.session?.user.email||e[14]!==x?(j=()=>{x&&l.send({session:ae({isSessionPending:!1,email:i.session?.user.email??null}),type:`deviceAuth/sessionSynced`})},e[12]=l,e[13]=i.session?.user.email,e[14]=x,e[15]=j):j=e[15];let M=i.session?.user.email,N;e[16]!==l||e[17]!==x||e[18]!==M?(N=[l,M,x],e[16]=l,e[17]=x,e[18]=M,e[19]=N):N=e[19],(0,R.useEffect)(j,N);let P,F;e[20]!==l||e[21]!==t||e[22]!==y||e[23]!==a?(P=()=>{y===null||y.phase!==`pending`||(l.send({id:y.id,type:`deviceAuth/navigationStarted`}),t({replace:y.replace,search:y.userCode===null?{}:{user_code:y.userCode,...a?{orgId:a}:{}},to:v}).then(()=>{l.send({id:y.id,type:`deviceAuth/navigationCompleted`})}).catch(e=>{console.error(`[device-auth] failed to sync device route`,{errorName:ke(e),navigationId:y.id,replace:y.replace}),l.send({id:y.id,message:oe(e),type:`deviceAuth/navigationFailed`})}))},F=[l,t,y,a],e[20]=l,e[21]=t,e[22]=y,e[23]=a,e[24]=P,e[25]=F):(P=e[24],F=e[25]),(0,R.useEffect)(P,F);let I=S&&b===`approve`,z=S&&b===`deny`,B,V,H,U,W;e[26]===l?(B=e[27],V=e[28],H=e[29],U=e[30],W=e[31]):(B=()=>{l.send({type:`deviceAuth/approve`})},V=()=>{l.send({type:`deviceAuth/deny`})},H=e=>{l.send({type:`deviceAuth/inputChanged`,value:e.toUpperCase()})},U=()=>{l.send({type:`deviceAuth/submit`})},W=()=>{l.send({type:`deviceAuth/useDifferentCode`})},e[26]=l,e[27]=B,e[28]=V,e[29]=H,e[30]=U,e[31]=W);let G;return e[32]!==f||e[33]!==p||e[34]!==d||e[35]!==a||e[36]!==D||e[37]!==u||e[38]!==g||e[39]!==T||e[40]!==_||e[41]!==I||e[42]!==z||e[43]!==B||e[44]!==V||e[45]!==H||e[46]!==U||e[47]!==W?(G={activeUserCode:f,errorMessage:p,inputCode:d,isSubmittingApprove:I,isSubmittingDeny:z,onboardingOrganizationId:a,onApprove:B,onDeny:V,onInputChange:H,onSubmit:U,onUseDifferentCode:W,panelMeta:D,panelView:u,result:g,resumePath:T,sessionEmail:_},e[32]=f,e[33]=p,e[34]=d,e[35]=a,e[36]=D,e[37]=u,e[38]=g,e[39]=T,e[40]=_,e[41]=I,e[42]=z,e[43]=B,e[44]=V,e[45]=H,e[46]=U,e[47]=W,e[48]=G):G=e[48],G}function Se(e){return e.matches({pending:`submittingDecision`})}function Ce(e){return e.matches(`pending`)}function we(e){return e.context.decisionAction}function $(e){return e.context.navigation}function Te(e){return e.context.result}function Ee(e){return e.context.error}function De(e){return e.context.activeUserCode}function Oe(e){return e.context.inputCode}function ke(e){return e instanceof Error?e.name:`unknown`}function Ae(e){let t=(0,L.c)(33),{controller:n}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,children:[(0,X.jsx)(`div`,{className:`absolute left-[-7rem] top-[-8rem] h-64 w-64 rounded-full bg-primary/10 blur-3xl`}),(0,X.jsx)(`div`,{className:`absolute right-[-8rem] top-20 h-80 w-80 rounded-full bg-muted blur-3xl`}),(0,X.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_right,rgba(127,127,127,0.06)_1px,transparent_1px),linear-gradient(to_bottom,rgba(127,127,127,0.06)_1px,transparent_1px)] bg-[size:4.5rem_4.5rem] [mask-image:linear-gradient(to_bottom,white,rgba(255,255,255,0.3))]`})]}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`header`,{className:`relative z-10 border-b border-border/60 bg-background/80 backdrop-blur`,children:(0,X.jsxs)(`div`,{className:`mx-auto flex h-16 w-full max-w-6xl items-center justify-between px-6`,children:[(0,X.jsxs)(r,{to:`/`,className:`flex items-center gap-3`,children:[(0,X.jsx)(`img`,{src:`/onequery.svg`,alt:`OneQuery`,className:`h-9 w-9 rounded-lg`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-semibold text-lg leading-none`,children:`OneQuery`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Device authorization`})]})]}),(0,X.jsx)(f,{})]})}),t[1]=a):a=t[1];let o;t[2]===n.panelMeta.tone?o=t[3]:(o=u(`inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs font-medium uppercase tracking-[0.18em]`,ve(n.panelMeta.tone)),t[2]=n.panelMeta.tone,t[3]=o);let s;t[4]===n.panelMeta.tone?s=t[5]:(s=u(`flex h-6 w-6 items-center justify-center rounded-full`,ye(n.panelMeta.tone)),t[4]=n.panelMeta.tone,t[5]=s);let c;t[6]===n.panelMeta.icon?c=t[7]:(c=(0,X.jsx)(n.panelMeta.icon,{size:14,stroke:1.9}),t[6]=n.panelMeta.icon,t[7]=c);let l;t[8]!==s||t[9]!==c?(l=(0,X.jsx)(`div`,{className:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let d;t[11]!==n.panelMeta.badge||t[12]!==o||t[13]!==l?(d=(0,X.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:(0,X.jsxs)(`div`,{className:o,children:[l,n.panelMeta.badge]})}),t[11]=n.panelMeta.badge,t[12]=o,t[13]=l,t[14]=d):d=t[14];let p;t[15]===n.panelMeta.title?p=t[16]:(p=(0,X.jsx)(w,{className:`mt-4 text-2xl`,children:n.panelMeta.title}),t[15]=n.panelMeta.title,t[16]=p);let m;t[17]===n.panelMeta.description?m=t[18]:(m=(0,X.jsx)(T,{className:`max-w-2xl text-base leading-7`,children:n.panelMeta.description}),t[17]=n.panelMeta.description,t[18]=m);let h;t[19]!==d||t[20]!==p||t[21]!==m?(h=(0,X.jsxs)(S,{className:`border-b border-border/60 pb-5`,children:[d,p,m]}),t[19]=d,t[20]=p,t[21]=m,t[22]=h):h=t[22];let g;t[23]===n.errorMessage?g=t[24]:(g=n.errorMessage?(0,X.jsx)(`div`,{className:`rounded-xl border border-destructive/20 bg-destructive/5 px-3 py-2 text-sm text-destructive`,children:n.errorMessage}):null,t[23]=n.errorMessage,t[24]=g);let _;t[25]===n?_=t[26]:(_=je(n),t[25]=n,t[26]=_);let v;t[27]!==g||t[28]!==_?(v=(0,X.jsxs)(C,{className:`space-y-5 pt-6`,children:[g,_]}),t[27]=g,t[28]=_,t[29]=v):v=t[29];let y;return t[30]!==h||t[31]!==v?(y=(0,X.jsxs)(`div`,{className:`relative min-h-screen overflow-hidden bg-background`,children:[i,a,(0,X.jsx)(`main`,{className:`relative z-10 flex flex-1 items-center justify-center px-6 py-10 lg:min-h-[calc(100vh-4rem)] lg:py-14`,children:(0,X.jsx)(`section`,{className:`w-full max-w-3xl`,children:(0,X.jsx)(`div`,{className:`rounded-[2rem] border border-border/70 bg-background/75 p-2 shadow-2xl shadow-foreground/5 backdrop-blur`,children:(0,X.jsxs)(E,{className:`w-full border-0 bg-card/95 shadow-none ring-0`,children:[h,v]})})})})]}),t[30]=h,t[31]=v,t[32]=y):y=t[32],y}function je(e){switch(e.panelView){case`entry`:return(0,X.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),e.onSubmit()},className:`space-y-5`,children:[(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(x,{htmlFor:`user-code`,children:`Device code`}),(0,X.jsx)(b,{id:`user-code`,value:e.inputCode,onChange:t=>e.onInputChange(t.target.value),placeholder:`ABCD1234`,autoCapitalize:`characters`,autoComplete:`one-time-code`,required:!0,className:`h-11 font-mono text-base tracking-[0.25em] uppercase`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Enter the 8-character code shown in your terminal.`})]}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(s,{type:`submit`,className:`h-11 w-full`,children:`Continue`}),(0,X.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`You’ll review the request before any access is granted.`})]})]});case`verifying`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Verifying code`,value:e.activeUserCode??e.inputCode,emphasis:`primary`}),(0,X.jsx)(`div`,{className:`rounded-2xl border bg-muted/40 p-4`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,X.jsx)(F,{size:18,stroke:1.75})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`Checking request details`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`We’re validating that this device code is still active and can be approved.`})]})]})})]});case`sessionCheck`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Ready to approve`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(`div`,{className:`rounded-2xl border bg-muted/40 p-4`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-full bg-muted`,children:(0,X.jsx)(N,{size:18,stroke:1.75})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`Checking your browser session`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Once we know who you are, you’ll be able to approve or deny this request.`})]})]})})]});case`signInRequired`:return(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Device code`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(r,{to:_,search:{redirect:e.resumePath},className:c({variant:`default`,size:`lg`,className:`h-11 w-full`}),children:`Sign in`}),(0,X.jsx)(s,{type:`button`,variant:`ghost`,size:`sm`,className:`mx-auto flex h-9 px-3 text-muted-foreground`,onClick:e.onUseDifferentCode,children:`Use a different code`})]});case`review`:return e.sessionEmail?(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:`Device code`,value:e.activeUserCode??``,emphasis:`primary`}),(0,X.jsx)(be,{label:`Signed in as`,value:e.sessionEmail,tone:`neutral`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:[(0,X.jsx)(s,{type:`button`,variant:`outline`,size:`lg`,className:`h-11 flex-1`,onClick:e.onDeny,disabled:e.isSubmittingApprove||e.isSubmittingDeny,children:e.isSubmittingDeny?`Denying...`:`Deny`}),(0,X.jsx)(s,{type:`button`,size:`lg`,className:`h-11 flex-1`,onClick:e.onApprove,disabled:e.isSubmittingApprove||e.isSubmittingDeny,children:e.isSubmittingApprove?`Approving...`:`Approve`})]})]}):null;case`result`:return e.result?(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(Z,{label:e.result.tone===`success`?`Approved code`:`Resolved code`,value:e.activeUserCode??``,emphasis:e.result.tone}),e.result.tone===`success`&&e.onboardingOrganizationId?(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Your CLI session is ready. Connect a data source now, or come back later from the dashboard.`}),(0,X.jsx)(r,{to:g,search:{orgId:e.onboardingOrganizationId},className:c({variant:`default`,size:`lg`,className:`h-11 w-full`}),children:`Continue setup`})]}):null]}):null}}function Me(){let e=(0,L.c)(2),t=xe(),n;return e[0]===t?n=e[1]:(n=(0,X.jsx)(Ae,{controller:t}),e[0]=t,e[1]=n),n}function Ne(){let e=(0,L.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(Me,{}),e[0]=t):t=e[0],t}var Pe=Ne;export{Pe as component};
@@ -1 +1 @@
1
- import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{a as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{C as a,F as o,I as s,S as c,a as l,b as u,c as d,d as f,f as p,g as m,h,j as g,l as _,t as v,v as y,x as b,y as x}from"./createReactComponent-_L2mp4Ui.js";import{t as S}from"./utils-C8DGLIgm.js";import{t as C}from"./IconCheck-Gc24xPT2.js";import{B as w,E as T,F as E,I as D,L as O,M as k,N as A,O as j,P as M,R as N,S as P,T as F,U as ee,V as te,b as I,bt as ne,c as L,d as re,f as R,g as z,i as ie,l as ae,m as B,n as oe,nt as V,o as se,p as H,s as ce,t as U,y as W}from"./getDisabledMountTransitionStyles-BYKRz4ha.js";import{d as le,i as G,n as ue,t as de}from"./CompositeList-CX7HHxYw.js";import{c as fe,l as pe,n as K,p as q,r as me,s as he,t as J,v as ge}from"./useBaseUiId-BLFGpnYJ.js";import{a as Y,c as _e,i as ve,l as ye,n as be,o as xe,r as Se,s as Ce,t as we}from"./getPseudoElementBounds-InhM-dWf.js";import{n as Te,t as Ee}from"./Separator-vw4jPN_6.js";import{A as De,B as Oe,F as ke,I as Ae,L as je,M as Me,N as Ne,P as Pe,R as Fe,j as Ie,z as Le}from"./index-CbFJKkNs.js";import{t as Re}from"./useControlled-B8q0aJoo.js";import{t as ze}from"./CompositeItem-D3nXGtvr.js";var Be=v(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),X=e(t()),Ve=X.createContext(void 0);function He(e){let t=X.useContext(Ve);if(t===void 0&&!e)throw Error(x(33));return t}var Ue=X.createContext(void 0);function Z(e){let t=X.useContext(Ue);if(t===void 0&&!e)throw Error(x(36));return t}var We=X.createContext(void 0);function Ge(e=!0){let t=X.useContext(We);if(t===void 0&&!e)throw Error(x(25));return t}var Ke={type:`regular-item`};function qe(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,nativeButton:o,itemMetadata:s,nodeId:c}=e,l=X.useRef(null),d=Ge(!0),f=d!==void 0,{events:p}=a.useState(`floatingTreeRoot`),{getButtonProps:g,buttonRef:_}=m({disabled:n,focusableWhenDisabled:!0,native:o}),v=X.useCallback(e=>u({id:i,role:`menuitem`,tabIndex:r?0:-1,onMouseMove(e){c&&p.emit(`itemhover`,{nodeId:c,target:e.currentTarget})},onMouseEnter(){s.type===`submenu-trigger`&&s.setActive()},onKeyUp(e){e.key===` `&&a.context.typingRef.current&&e.preventBaseUIHandler()},onClick(e){t&&p.emit(`close`,{domEvent:e,reason:pe})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return}l.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&s.type===`regular-item`&&l.current.click()}},e,g),[i,r,g,t,p,a,f,d,s,c]),y=h(l,_);return X.useMemo(()=>({getItemProps:v,itemRef:y}),[v,y])}var Je=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e}({}),Ye={checked(e){return e?{[Je.checked]:``}:{[Je.unchecked]:``}},...H},Xe=X.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,...u}=e,d=G({label:a}),f=He(!0),p=J(i),{store:m}=Z(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=qe({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.nodeId,itemMetadata:Ke});return l(`div`,e,{state:X.useMemo(()=>({disabled:s,highlighted:h}),[s,h]),props:[g,u,_],ref:[v,t,d.ref]})}),Q=n(),Ze={...se,...H},Qe=X.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o}=Z(),{side:s,align:c}=He(),u=ue(!0)!=null,d=o.useState(`open`),f=o.useState(`transitionStatus`),p=o.useState(`popupProps`),m=o.useState(`mounted`),h=o.useState(`instantType`),g=o.useState(`activeTriggerElement`),_=o.useState(`parent`),v=o.useState(`lastOpenChangeReason`),y=o.useState(`rootId`),b=o.useState(`floatingRootContext`),x=o.useState(`floatingTreeRoot`),S=o.useState(`closeDelay`),C=o.useState(`activeTriggerElement`),w=_.type===`context-menu`;R({open:d,ref:o.context.popupRef,onComplete(){d&&o.context.onOpenChangeComplete?.(!0)}}),X.useEffect(()=>{function e(e){o.setOpen(!1,K(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,o]);let T=o.useState(`hoverEnabled`),E=o.useState(`disabled`);Me(b,{enabled:T&&!E&&!w&&_.type!==`menubar`,closeDelay:S});let D=l(`div`,e,{state:X.useMemo(()=>({transitionStatus:f,side:s,align:c,open:d,nested:_.type===`menu`,instant:h}),[f,s,c,d,_.type,h]),ref:[t,o.context.popupRef],stateAttributesMapping:Ze,props:[p,{onKeyDown(e){u&&le.has(e.key)&&e.stopPropagation()}},U(f),a,{"data-rootownerid":y}]}),O=_.type===void 0||w;return(g||_.type===`menubar`&&v!==`outside-press`)&&(O=!0),(0,Q.jsx)(ye,{context:b,modal:w,disabled:!m,returnFocus:i===void 0?O:i,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?o.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?o.context.beforeContentFocusGuardRef:void 0,children:D})}),$e=X.createContext(void 0);function et(){let e=X.useContext($e);if(e===void 0)throw Error(x(32));return e}var tt=X.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Z();return i.useState(`mounted`)||n?(0,Q.jsx)($e.Provider,{value:n,children:(0,Q.jsx)(P,{ref:t,...r})}):null}),nt=X.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:u=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:v=d,...y}=e,{store:b}=Z(),x=et(),S=Ge(!0),C=b.useState(`parent`),w=b.useState(`floatingRootContext`),T=b.useState(`floatingTreeRoot`),E=b.useState(`mounted`),D=b.useState(`open`),O=b.useState(`modal`),A=b.useState(`activeTriggerElement`),j=b.useState(`lastOpenChangeReason`),M=b.useState(`floatingNodeId`),N=b.useState(`floatingParentNodeId`),P=n,F=c,ee=u,te=s,I=v;C.type===`context-menu`&&(P=n??C.context?.anchor,te??=`start`,!o&&te!==`center`&&(ee=e.alignOffset??2,F=e.sideOffset??-5));let ne=o,L=te;C.type===`menu`?(ne??=`inline-end`,L??=`start`,I=e.collisionAvoidance??_):C.type===`menubar`&&(ne??=`bottom`,L??=`start`);let re=C.type===`context-menu`,R=oe({anchor:P,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:ne,sideOffset:F,align:L,alignOffset:ee,arrowPadding:re?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:M,keepMounted:x,disableAnchorTracking:g,collisionAvoidance:I,shiftCrossAxis:re,externalTree:T}),z=X.useMemo(()=>{let e={};return D||(e.pointerEvents=`none`),{role:`presentation`,hidden:!E,style:{...R.positionerStyles,...e}}},[D,E,R.positionerStyles]);X.useEffect(()=>{function e(e){e.open?(e.parentNodeId===M&&b.set(`hoverEnabled`,!1),e.nodeId!==M&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,K(q))):e.parentNodeId===M&&e.reason!==`sibling-open`&&b.set(`hoverEnabled`,!0)}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[b,T.events,M]),X.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,K(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,b]),X.useEffect(()=>{function e(e){!D||e.nodeId!==b.select(`floatingParentNodeId`)||e.target&&A&&A!==e.target&&b.setOpen(!1,K(q))}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,b]),X.useEffect(()=>{let e={open:D,nodeId:M,parentNodeId:N,reason:b.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,b,M,N]);let ie=X.useMemo(()=>({open:D,side:R.side,align:R.align,anchorHidden:R.anchorHidden,nested:C.type===`menu`}),[D,R.side,R.align,R.anchorHidden,C.type]),ae=X.useMemo(()=>({side:R.side,align:R.align,arrowRef:R.arrowRef,arrowUncentered:R.arrowUncentered,arrowStyles:R.arrowStyles,nodeId:R.context.nodeId}),[R.side,R.align,R.arrowRef,R.arrowUncentered,R.arrowStyles,R.context.nodeId]),B=l(`div`,e,{state:ie,stateAttributesMapping:se,ref:[t,b.useStateSetter(`positionerElement`)],props:[z,y]}),V=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&j!==`trigger-hover`||C.type===`menubar`&&C.context.modal),H=null;return C.type===`menubar`?H=C.context.contentElement:C.type===void 0&&(H=A),(0,Q.jsxs)(Ve.Provider,{value:ae,children:[V&&(0,Q.jsx)(ve,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Y(!D),cutout:H}),(0,Q.jsx)(k,{id:M,children:(0,Q.jsx)(de,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:B})})]})}),rt=X.createContext(void 0);function it(){let e=X.useContext(rt);if(e===void 0)throw Error(x(34));return e}var at=X.memo(X.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,...u}=e,[d,f]=Re({controlled:i,default:a,name:`MenuRadioGroup`}),p=c(o),m=c((e,t)=>{p?.(e,t),!t.isCanceled&&f(e)}),h=l(`div`,e,{state:X.useMemo(()=>({disabled:s}),[s]),ref:t,props:{role:`group`,"aria-disabled":s||void 0,...u}}),g=X.useMemo(()=>({value:d,setValue:m,disabled:s}),[d,m,s]);return(0,Q.jsx)(rt.Provider,{value:g,children:h})})),ot=X.createContext(void 0);function st(){let e=X.useContext(ot);if(e===void 0)throw Error(x(35));return e}var ct=X.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:u=!1,value:d,...f}=e,p=G({label:a}),m=He(!0),h=J(i),{store:g}=Z(),_=g.useState(`isActive`,p.index),v=g.useState(`itemProps`),{value:y,setValue:b,disabled:x}=it(),S=x||s,C=y===d,{getItemProps:w,itemRef:T}=qe({closeOnClick:u,disabled:S,highlighted:_,id:h,store:g,nativeButton:o,nodeId:m?.nodeId,itemMetadata:Ke}),E=X.useMemo(()=>({disabled:S,highlighted:_,checked:C}),[S,_,C]),D=c(e=>{b(d,{...K(pe,e.nativeEvent),preventUnmountOnClose:()=>{}})}),O=l(`div`,e,{state:E,stateAttributesMapping:Ye,props:[v,{role:`menuitemradio`,"aria-checked":C,onClick:D},f,w],ref:[T,t,p.ref]});return(0,Q.jsx)(ot.Provider,{value:E,children:O})}),lt=X.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=st(),s=X.useRef(null),{transitionStatus:c,setMounted:u}=B(o.checked);return R({open:o.checked,ref:s,onComplete(){o.checked||u(!1)}}),l(`span`,e,{state:X.useMemo(()=>({checked:o.checked,disabled:o.disabled,highlighted:o.highlighted,transitionStatus:c}),[o.checked,o.disabled,o.highlighted,c]),stateAttributesMapping:Ye,ref:[t,s],props:{"aria-hidden":!0,...a},enabled:i||o.checked})}),ut=X.createContext(null);function dt(e){let t=X.useContext(ut);if(t===null&&!e)throw Error(x(5));return t}var ft={...Ae,disabled:W(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:W(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),allowMouseEnter:W(e=>e.parent.type===`menu`?e.parent.store.select(`allowMouseEnter`):e.allowMouseEnter),stickIfOpen:W(e=>e.stickIfOpen),parent:W(e=>e.parent),rootId:W(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:W(e=>e.activeIndex),isActive:W((e,t)=>e.activeIndex===t),hoverEnabled:W(e=>e.hoverEnabled),instantType:W(e=>e.instantType),lastOpenChangeReason:W(e=>e.openChangeReason),floatingTreeRoot:W(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:W(e=>e.floatingNodeId),floatingParentNodeId:W(e=>e.floatingParentNodeId),itemProps:W(e=>e.itemProps),closeDelay:W(e=>e.closeDelay),keyboardEventRelay:W(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},pt=class e extends z{constructor(e){super({...mt(),...e},{positionerRef:X.createRef(),popupRef:X.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:X.createRef(),beforeContentFocusGuardRef:X.createRef(),onOpenChangeComplete:void 0,triggerElements:new re},ft),this.observe(W(e=>e.allowMouseEnter),(e,t)=>{this.state.parent.type===`menu`&&e!==t&&this.state.parent.store.set(`allowMouseEnter`,e)}),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){this.unsubscribeParentListener=e.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=a(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function mt(){return{...ke(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new O,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:p,keyboardEventRelay:void 0,closeDelay:0}}var ht=X.createContext(void 0);function gt(){return X.useContext(ht)}var _t=e(r());function vt(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:l=!0,orientation:d=`vertical`,actionsRef:p,closeParentOnEsc:m=!1,handle:h,triggerId:g,defaultTriggerId:_=null,highlightItemOnHover:v=!0}=e,y=Ge(!0),x=Z(!0),S=dt(!0),C=gt(),w=X.useMemo(()=>C&&x?{type:`menu`,store:x.store}:S?{type:`menubar`,context:S}:y&&!x?{type:`context-menu`,context:y}:{type:void 0},[y,x,S,C]),T=pt.useStore(h?.store,{parent:w}),D=T.useState(`floatingTreeRoot`),O=M(D),k=E();b(()=>{y&&!x?T.update({parent:{type:`context-menu`,context:y},floatingNodeId:O,floatingParentNodeId:k}):x&&T.update({floatingNodeId:O,floatingParentNodeId:k})},[y,x,O,k,T]),T.useControlledProp(`open`,n,a),T.useControlledProp(`activeTriggerId`,g,_),T.useContextCallback(`onOpenChangeComplete`,i);let N=T.useState(`open`),P=T.useState(`activeTriggerElement`),F=T.useState(`positionerElement`),ee=T.useState(`hoverEnabled`),te=T.useState(`modal`),L=T.useState(`disabled`),re=T.useState(`lastOpenChangeReason`),R=T.useState(`parent`),z=T.useState(`activeIndex`),B=T.useState(`payload`),oe=T.useState(`floatingParentNodeId`),V=X.useRef(null),se=oe!=null,H;T.useSyncedValues({disabled:o,modal:R.type===void 0?s:void 0,rootId:ge()});let{openMethod:ce,triggerProps:U,reset:W}=be(N);je(T);let{forceUnmount:le}=Fe(N,T,()=>{T.update({allowMouseEnter:!1,stickIfOpen:!0}),W()}),G=X.useRef(R.type!==`context-menu`),ue=ne();X.useEffect(()=>{if(N||(V.current=null),R.type===`context-menu`){if(!N){ue.clear(),G.current=!1;return}ue.start(500,()=>{G.current=!0})}},[ue,N,R.type]),Se(N&&te&&re!==`trigger-hover`&&ce!==`touch`,F),b(()=>{!N&&!ee&&T.set(`hoverEnabled`,!0)},[N,ee,T]);let de=X.useRef(!0),pe=ne(),q=c((e,t)=>{let n=t.reason;if(N===e&&t.trigger===P&&re===n||(t.preventUnmountOnClose=()=>{T.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=P??void 0),r?.(e,t),t.isCanceled))return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:se};H?.emit(`openchange`,i);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!de.current)return;if(!e&&z!==null){let e=T.context.itemDomElements.current[z];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(de.current=!1,pe.start(300,()=>{de.current=!0})):(de.current=!0,pe.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0&&a?.isTrusted,s=!e&&(n===`escape-key`||n==null);function c(){let r={open:e,openChangeReason:n};V.current=t.event??null;let i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),T.update(r)}n===`trigger-hover`?_t.flushSync(c):c(),R.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?T.set(`instantType`,`group`):o||s?T.set(`instantType`,o?`click`:`dismiss`):T.set(`instantType`,void 0)}),me=X.useCallback(e=>{let t=K(e);return t.preventUnmountOnClose=()=>{T.set(`preventUnmountingOnClose`,!0)},t},[T]),he=X.useCallback(()=>{T.setOpen(!1,me(fe))},[T,me]);X.useImperativeHandle(p,()=>({unmount:le,close:he}),[le,he]);let J;R.type===`context-menu`&&(J=R.context),X.useImperativeHandle(J?.positionerRef,()=>F,[F]),X.useImperativeHandle(J?.actionsRef,()=>({setOpen:q}),[q]);let Y=Pe({popupStore:T,onOpenChange:q});H=Y.context.events,X.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return H.on(`setOpen`,e),()=>{H?.off(`setOpen`,e)}},[H,q]);let _e=I(Y,{enabled:!L,bubbles:{escapeKey:m&&R.type===`menu`},outsidePress(){return R.type!==`context-menu`||V.current?.type===`contextmenu`?!0:G.current},externalTree:se?D:void 0}),ve=Te(Y,{role:`menu`}),ye=ie(),we=X.useCallback(e=>{T.select(`activeIndex`)!==e&&T.set(`activeIndex`,e)},[T]),Ee=Ce(Y,{enabled:!L,listRef:T.context.itemDomElements,activeIndex:z,nested:R.type!==void 0,loopFocus:l,orientation:d,parentOrientation:R.type===`menubar`?R.context.orientation:void 0,rtl:ye===`rtl`,disabledIndices:f,onNavigate:we,openOnArrowKeyDown:R.type!==`context-menu`,externalTree:se?D:void 0,focusItemOnHover:v}),De=X.useCallback(e=>{T.context.typingRef.current=e},[T]),{getReferenceProps:Oe,getFloatingProps:ke,getItemProps:Ae,getTriggerProps:Me}=ae([_e,ve,Ee,xe(Y,{listRef:T.context.itemLabels,activeIndex:z,resetMs:500,onMatch:e=>{N&&e!==z&&T.set(`activeIndex`,e)},onTypingChange:De})]),Ne=X.useMemo(()=>{let e=u(Oe(),{onMouseEnter(){T.set(`hoverEnabled`,!0)},onMouseMove(){T.set(`allowMouseEnter`,!0)}},U);return delete e.role,e},[Oe,T,U]),Ie=X.useMemo(()=>{let e=Me();if(!e)return e;let t=u(e,U);return delete t.role,delete t[`aria-controls`],t},[Me,U]),Le=j(),Re=X.useMemo(()=>ke({onMouseEnter(){R.type===`menu`&&Le.request(()=>T.set(`hoverEnabled`,!1))},onMouseMove(){T.set(`allowMouseEnter`,!0)},onClick(){T.select(`hoverEnabled`)&&T.set(`hoverEnabled`,!1)},onKeyDown(e){let t=T.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[ke,R.type,Le,T]),ze=X.useMemo(()=>Ae(),[Ae]);T.useSyncedValues({floatingRootContext:Y,activeTriggerProps:Ne,inactiveTriggerProps:Ie,popupProps:Re,itemProps:ze});let Be=X.useMemo(()=>({store:T,parent:w}),[T,w]),Ve=(0,Q.jsx)(Ue.Provider,{value:Be,children:typeof t==`function`?t({payload:B}):t});return R.type===void 0||R.type===`context-menu`?(0,Q.jsx)(A,{externalTree:D,children:Ve}):Ve}function yt(e){let t=Z().store,n=X.useMemo(()=>({parentMenu:t}),[t]);return(0,Q.jsx)(ht.Provider,{value:n,children:(0,Q.jsx)(vt,{...e})})}function bt(e){if(o(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!s(e))return bt(g(e))}function xt(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=X.useRef(!1);return X.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,T(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:p,[t,n,r])}var St=2,Ct=X.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,openOnHover:s,delay:u=100,closeDelay:d=0,handle:f,payload:h,...g}=e,_=Z(!0),v=f?.store??_?.store;if(!v)throw Error(x(85));let b=J(o),S=v.useState(`isTriggerActive`,b),C=v.useState(`floatingRootContext`),k=v.useState(`isOpenedByTrigger`,b),A=X.useRef(null),j=Tt(),P=y(!0),I=D(),L=X.useMemo(()=>I??new O,[I]),{registerTrigger:re,isMountedByThisTrigger:R}=Le(b,A,v,{payload:h,closeDelay:d,parent:j,floatingTreeRoot:L,floatingNodeId:M(L),floatingParentNodeId:E(),keyboardEventRelay:P?.relayKeyboardEvent}),z=j.type===`menubar`,ie=v.useState(`disabled`),B=i||ie||z&&j.context.disabled,{getButtonProps:oe,buttonRef:se}=m({disabled:B,native:a});X.useEffect(()=>{!k&&j.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,k,j.type]);let H=X.useRef(null),U=ne(),W=c(e=>{if(!H.current)return;U.clear(),v.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(V(H.current,t)||V(v.select(`positionerElement`),t)||t===H.current||t!=null&&bt(t)===v.select(`rootId`))return;let n=we(H.current);e.clientX>=n.left-St&&e.clientX<=n.right+St&&e.clientY>=n.top-St&&e.clientY<=n.bottom+St||L.events.emit(`close`,{domEvent:e,reason:me})});X.useEffect(()=>{k&&v.select(`lastOpenChangeReason`)===`trigger-hover`&&T(H.current).addEventListener(`mouseup`,W,{once:!0})},[k,W,v]);let le=z&&j.context.hasSubmenuOpen,G=Ie(C,{enabled:(s??le)&&!B&&j.type!==`context-menu`&&(!z||le&&!R),handleClose:De({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:j.type===void 0?u:void 0,delay:{close:d},triggerElementRef:A,externalTree:L,isActiveTrigger:S}),ue=wt(k,v.select(`lastOpenChangeReason`)),de=_e(C,{enabled:!B&&j.type!==`context-menu`,event:k&&z?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:j.type===void 0?ue:!1}),fe=Ne(C,{enabled:!B&&le}),pe=xt({open:k,enabled:z,mouseDownAction:`open`}),q=ae([de,fe]),ge=X.useMemo(()=>({disabled:B,open:k}),[B,k]),Y=v.useState(`triggerProps`,R),ve=[H,t,se,re,A],ye=[q.getReferenceProps(),G??p,Y,{"aria-haspopup":`menu`,id:b,onMouseDown:e=>{v.select(`open`)||(U.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),T(e.currentTarget).addEventListener(`mouseup`,W,{once:!0}))}},z?{role:`menuitem`}:{},pe,g,oe],be=X.useRef(null),xe=c(e=>{_t.flushSync(()=>{v.setOpen(!1,K(he,e.nativeEvent,e.currentTarget))}),te(be.current)?.focus()}),Se=c(e=>{let t=v.select(`positionerElement`);if(t&&ee(e,t))v.context.beforeContentFocusGuardRef.current?.focus();else{_t.flushSync(()=>{v.setOpen(!1,K(he,e.nativeEvent,e.currentTarget))});let n=w(v.context.triggerFocusTargetRef.current||A.current);for(;n!==null&&V(t,n);){let e=n;if(n=N(n),n===e)break}n?.focus()}}),Ce=l(`button`,e,{enabled:!z,stateAttributesMapping:ce,state:ge,ref:ve,props:ye});return z?(0,Q.jsx)(ze,{tag:`button`,render:n,className:r,state:ge,refs:ve,props:ye,stateAttributesMapping:ce}):k?(0,Q.jsxs)(X.Fragment,{children:[(0,Q.jsx)(F,{ref:be,onFocus:xe},`${b}-pre-focus-guard`),(0,Q.jsx)(X.Fragment,{children:Ce},b),(0,Q.jsx)(F,{ref:v.context.triggerFocusTargetRef,onFocus:Se},`${b}-post-focus-guard`)]}):(0,Q.jsx)(X.Fragment,{children:Ce},b)});function wt(e,t){let n=ne(),[r,i]=X.useState(!1);return b(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Tt(){let e=Ge(!0),t=Z(!0),n=dt(!0);return X.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Et=X.forwardRef(function(e,t){let{render:n,className:r,label:i,id:a,nativeButton:o=!1,openOnHover:s=!0,delay:c=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=G(),m=He(),{store:h}=Z(),g=J(a),_=h.useState(`open`),v=h.useState(`floatingRootContext`),y=h.useState(`floatingTreeRoot`),b=Oe(g,h),S=X.useCallback(e=>{let t=b(e);return e!==null&&h.select(`open`)&&h.select(`activeTriggerId`)==null&&h.update({activeTriggerId:g,activeTriggerElement:e,closeDelay:u}),t},[b,u,h,g]),C=X.useRef(null),w=X.useCallback(e=>{C.current=e,h.set(`activeTriggerElement`,e)},[h]),T=gt();if(!T?.parentMenu)throw Error(x(37));h.useSyncedValue(`closeDelay`,u);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,p.index),k=X.useMemo(()=>({type:`submenu-trigger`,setActive:()=>E.set(`activeIndex`,p.index)}),[E,p.index]),A=h.useState(`disabled`),j=d||A,{getItemProps:M,itemRef:N}=qe({closeOnClick:!1,disabled:j,highlighted:O,id:g,store:h,nativeButton:o,itemMetadata:k,nodeId:m?.nodeId}),P=h.useState(`hoverEnabled`),F=h.useState(`allowMouseEnter`),ee=Ie(v,{enabled:P&&s&&!j&&F,handleClose:De({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:c,delay:{open:c,close:u},triggerElementRef:C,externalTree:y}),te=ae([_e(v,{enabled:!j,event:`mousedown`,toggle:!s,ignoreMouse:s,stickIfOpen:!1})]),I=h.useState(`triggerProps`,!0);return delete I.id,l(`div`,e,{state:X.useMemo(()=>({disabled:j,highlighted:O,open:_}),[j,O,_]),stateAttributesMapping:L,props:[te.getReferenceProps(),ee,I,D,{tabIndex:_||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},f,M],ref:[t,p.ref,N,S,w]})}),$=i();function Dt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(vt,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Ot(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ct,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function kt(e){let t=(0,$.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=S(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,Q.jsx)(Qe,{"data-slot":`dropdown-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,Q.jsx)(tt,{children:(0,Q.jsx)(nt,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function At(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=S(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Q.jsx)(Xe,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function jt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(yt,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Mt(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=S(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(Be,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(Et,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Nt(e){let t=(0,$.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?-3:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=S(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 w-auto`,n),t[7]=n,t[8]=f);let p;return t[9]!==c||t[10]!==l||t[11]!==r||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,Q.jsx)(kt,{"data-slot":`dropdown-menu-sub-content`,className:f,align:c,alignOffset:l,side:u,sideOffset:d,...r}),t[9]=c,t[10]=l,t[11]=r,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Pt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(at,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function Ft(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=S(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,Q.jsx)(lt,{children:(0,Q.jsx)(C,{})})}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,Q.jsxs)(ct,{"data-slot":`dropdown-menu-radio-item`,className:a,...i,children:[o,n]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function It(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=S(`bg-border -mx-1 my-1 h-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Ee,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Lt(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=S(`text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ft as a,jt as c,Ot as d,Pt as i,Nt as l,kt as n,It as o,At as r,Lt as s,Dt as t,Mt as u};
1
+ import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{a as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{C as a,F as o,I as s,S as c,a as l,b as u,c as d,d as f,f as p,g as m,h,j as g,l as _,t as v,v as y,x as b,y as x}from"./createReactComponent-_L2mp4Ui.js";import{t as S}from"./utils-C8DGLIgm.js";import{t as C}from"./IconCheck-Gc24xPT2.js";import{B as w,E as T,F as E,I as D,L as O,M as k,N as A,O as j,P as M,R as N,S as P,T as F,U as ee,V as te,b as I,bt as ne,c as L,d as re,f as R,g as z,i as ie,l as ae,m as B,n as oe,nt as V,o as se,p as H,s as ce,t as U,y as W}from"./getDisabledMountTransitionStyles-BYKRz4ha.js";import{d as le,i as G,n as ue,t as de}from"./CompositeList-CX7HHxYw.js";import{c as fe,l as pe,n as K,p as q,r as me,s as he,t as J,v as ge}from"./useBaseUiId-BLFGpnYJ.js";import{a as Y,c as _e,i as ve,l as ye,n as be,o as xe,r as Se,s as Ce,t as we}from"./getPseudoElementBounds-InhM-dWf.js";import{n as Te,t as Ee}from"./Separator-vw4jPN_6.js";import{A as De,B as Oe,F as ke,I as Ae,L as je,M as Me,N as Ne,P as Pe,R as Fe,j as Ie,z as Le}from"./index-DthpwdlN.js";import{t as Re}from"./useControlled-B8q0aJoo.js";import{t as ze}from"./CompositeItem-D3nXGtvr.js";var Be=v(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),X=e(t()),Ve=X.createContext(void 0);function He(e){let t=X.useContext(Ve);if(t===void 0&&!e)throw Error(x(33));return t}var Ue=X.createContext(void 0);function Z(e){let t=X.useContext(Ue);if(t===void 0&&!e)throw Error(x(36));return t}var We=X.createContext(void 0);function Ge(e=!0){let t=X.useContext(We);if(t===void 0&&!e)throw Error(x(25));return t}var Ke={type:`regular-item`};function qe(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,nativeButton:o,itemMetadata:s,nodeId:c}=e,l=X.useRef(null),d=Ge(!0),f=d!==void 0,{events:p}=a.useState(`floatingTreeRoot`),{getButtonProps:g,buttonRef:_}=m({disabled:n,focusableWhenDisabled:!0,native:o}),v=X.useCallback(e=>u({id:i,role:`menuitem`,tabIndex:r?0:-1,onMouseMove(e){c&&p.emit(`itemhover`,{nodeId:c,target:e.currentTarget})},onMouseEnter(){s.type===`submenu-trigger`&&s.setActive()},onKeyUp(e){e.key===` `&&a.context.typingRef.current&&e.preventBaseUIHandler()},onClick(e){t&&p.emit(`close`,{domEvent:e,reason:pe})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return}l.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&s.type===`regular-item`&&l.current.click()}},e,g),[i,r,g,t,p,a,f,d,s,c]),y=h(l,_);return X.useMemo(()=>({getItemProps:v,itemRef:y}),[v,y])}var Je=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e}({}),Ye={checked(e){return e?{[Je.checked]:``}:{[Je.unchecked]:``}},...H},Xe=X.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,...u}=e,d=G({label:a}),f=He(!0),p=J(i),{store:m}=Z(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=qe({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.nodeId,itemMetadata:Ke});return l(`div`,e,{state:X.useMemo(()=>({disabled:s,highlighted:h}),[s,h]),props:[g,u,_],ref:[v,t,d.ref]})}),Q=n(),Ze={...se,...H},Qe=X.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o}=Z(),{side:s,align:c}=He(),u=ue(!0)!=null,d=o.useState(`open`),f=o.useState(`transitionStatus`),p=o.useState(`popupProps`),m=o.useState(`mounted`),h=o.useState(`instantType`),g=o.useState(`activeTriggerElement`),_=o.useState(`parent`),v=o.useState(`lastOpenChangeReason`),y=o.useState(`rootId`),b=o.useState(`floatingRootContext`),x=o.useState(`floatingTreeRoot`),S=o.useState(`closeDelay`),C=o.useState(`activeTriggerElement`),w=_.type===`context-menu`;R({open:d,ref:o.context.popupRef,onComplete(){d&&o.context.onOpenChangeComplete?.(!0)}}),X.useEffect(()=>{function e(e){o.setOpen(!1,K(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,o]);let T=o.useState(`hoverEnabled`),E=o.useState(`disabled`);Me(b,{enabled:T&&!E&&!w&&_.type!==`menubar`,closeDelay:S});let D=l(`div`,e,{state:X.useMemo(()=>({transitionStatus:f,side:s,align:c,open:d,nested:_.type===`menu`,instant:h}),[f,s,c,d,_.type,h]),ref:[t,o.context.popupRef],stateAttributesMapping:Ze,props:[p,{onKeyDown(e){u&&le.has(e.key)&&e.stopPropagation()}},U(f),a,{"data-rootownerid":y}]}),O=_.type===void 0||w;return(g||_.type===`menubar`&&v!==`outside-press`)&&(O=!0),(0,Q.jsx)(ye,{context:b,modal:w,disabled:!m,returnFocus:i===void 0?O:i,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?o.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?o.context.beforeContentFocusGuardRef:void 0,children:D})}),$e=X.createContext(void 0);function et(){let e=X.useContext($e);if(e===void 0)throw Error(x(32));return e}var tt=X.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Z();return i.useState(`mounted`)||n?(0,Q.jsx)($e.Provider,{value:n,children:(0,Q.jsx)(P,{ref:t,...r})}):null}),nt=X.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:u=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:v=d,...y}=e,{store:b}=Z(),x=et(),S=Ge(!0),C=b.useState(`parent`),w=b.useState(`floatingRootContext`),T=b.useState(`floatingTreeRoot`),E=b.useState(`mounted`),D=b.useState(`open`),O=b.useState(`modal`),A=b.useState(`activeTriggerElement`),j=b.useState(`lastOpenChangeReason`),M=b.useState(`floatingNodeId`),N=b.useState(`floatingParentNodeId`),P=n,F=c,ee=u,te=s,I=v;C.type===`context-menu`&&(P=n??C.context?.anchor,te??=`start`,!o&&te!==`center`&&(ee=e.alignOffset??2,F=e.sideOffset??-5));let ne=o,L=te;C.type===`menu`?(ne??=`inline-end`,L??=`start`,I=e.collisionAvoidance??_):C.type===`menubar`&&(ne??=`bottom`,L??=`start`);let re=C.type===`context-menu`,R=oe({anchor:P,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:ne,sideOffset:F,align:L,alignOffset:ee,arrowPadding:re?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:M,keepMounted:x,disableAnchorTracking:g,collisionAvoidance:I,shiftCrossAxis:re,externalTree:T}),z=X.useMemo(()=>{let e={};return D||(e.pointerEvents=`none`),{role:`presentation`,hidden:!E,style:{...R.positionerStyles,...e}}},[D,E,R.positionerStyles]);X.useEffect(()=>{function e(e){e.open?(e.parentNodeId===M&&b.set(`hoverEnabled`,!1),e.nodeId!==M&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,K(q))):e.parentNodeId===M&&e.reason!==`sibling-open`&&b.set(`hoverEnabled`,!0)}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[b,T.events,M]),X.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,K(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,b]),X.useEffect(()=>{function e(e){!D||e.nodeId!==b.select(`floatingParentNodeId`)||e.target&&A&&A!==e.target&&b.setOpen(!1,K(q))}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,b]),X.useEffect(()=>{let e={open:D,nodeId:M,parentNodeId:N,reason:b.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,b,M,N]);let ie=X.useMemo(()=>({open:D,side:R.side,align:R.align,anchorHidden:R.anchorHidden,nested:C.type===`menu`}),[D,R.side,R.align,R.anchorHidden,C.type]),ae=X.useMemo(()=>({side:R.side,align:R.align,arrowRef:R.arrowRef,arrowUncentered:R.arrowUncentered,arrowStyles:R.arrowStyles,nodeId:R.context.nodeId}),[R.side,R.align,R.arrowRef,R.arrowUncentered,R.arrowStyles,R.context.nodeId]),B=l(`div`,e,{state:ie,stateAttributesMapping:se,ref:[t,b.useStateSetter(`positionerElement`)],props:[z,y]}),V=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&j!==`trigger-hover`||C.type===`menubar`&&C.context.modal),H=null;return C.type===`menubar`?H=C.context.contentElement:C.type===void 0&&(H=A),(0,Q.jsxs)(Ve.Provider,{value:ae,children:[V&&(0,Q.jsx)(ve,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Y(!D),cutout:H}),(0,Q.jsx)(k,{id:M,children:(0,Q.jsx)(de,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:B})})]})}),rt=X.createContext(void 0);function it(){let e=X.useContext(rt);if(e===void 0)throw Error(x(34));return e}var at=X.memo(X.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,...u}=e,[d,f]=Re({controlled:i,default:a,name:`MenuRadioGroup`}),p=c(o),m=c((e,t)=>{p?.(e,t),!t.isCanceled&&f(e)}),h=l(`div`,e,{state:X.useMemo(()=>({disabled:s}),[s]),ref:t,props:{role:`group`,"aria-disabled":s||void 0,...u}}),g=X.useMemo(()=>({value:d,setValue:m,disabled:s}),[d,m,s]);return(0,Q.jsx)(rt.Provider,{value:g,children:h})})),ot=X.createContext(void 0);function st(){let e=X.useContext(ot);if(e===void 0)throw Error(x(35));return e}var ct=X.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:u=!1,value:d,...f}=e,p=G({label:a}),m=He(!0),h=J(i),{store:g}=Z(),_=g.useState(`isActive`,p.index),v=g.useState(`itemProps`),{value:y,setValue:b,disabled:x}=it(),S=x||s,C=y===d,{getItemProps:w,itemRef:T}=qe({closeOnClick:u,disabled:S,highlighted:_,id:h,store:g,nativeButton:o,nodeId:m?.nodeId,itemMetadata:Ke}),E=X.useMemo(()=>({disabled:S,highlighted:_,checked:C}),[S,_,C]),D=c(e=>{b(d,{...K(pe,e.nativeEvent),preventUnmountOnClose:()=>{}})}),O=l(`div`,e,{state:E,stateAttributesMapping:Ye,props:[v,{role:`menuitemradio`,"aria-checked":C,onClick:D},f,w],ref:[T,t,p.ref]});return(0,Q.jsx)(ot.Provider,{value:E,children:O})}),lt=X.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=st(),s=X.useRef(null),{transitionStatus:c,setMounted:u}=B(o.checked);return R({open:o.checked,ref:s,onComplete(){o.checked||u(!1)}}),l(`span`,e,{state:X.useMemo(()=>({checked:o.checked,disabled:o.disabled,highlighted:o.highlighted,transitionStatus:c}),[o.checked,o.disabled,o.highlighted,c]),stateAttributesMapping:Ye,ref:[t,s],props:{"aria-hidden":!0,...a},enabled:i||o.checked})}),ut=X.createContext(null);function dt(e){let t=X.useContext(ut);if(t===null&&!e)throw Error(x(5));return t}var ft={...Ae,disabled:W(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:W(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),allowMouseEnter:W(e=>e.parent.type===`menu`?e.parent.store.select(`allowMouseEnter`):e.allowMouseEnter),stickIfOpen:W(e=>e.stickIfOpen),parent:W(e=>e.parent),rootId:W(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:W(e=>e.activeIndex),isActive:W((e,t)=>e.activeIndex===t),hoverEnabled:W(e=>e.hoverEnabled),instantType:W(e=>e.instantType),lastOpenChangeReason:W(e=>e.openChangeReason),floatingTreeRoot:W(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:W(e=>e.floatingNodeId),floatingParentNodeId:W(e=>e.floatingParentNodeId),itemProps:W(e=>e.itemProps),closeDelay:W(e=>e.closeDelay),keyboardEventRelay:W(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},pt=class e extends z{constructor(e){super({...mt(),...e},{positionerRef:X.createRef(),popupRef:X.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:X.createRef(),beforeContentFocusGuardRef:X.createRef(),onOpenChangeComplete:void 0,triggerElements:new re},ft),this.observe(W(e=>e.allowMouseEnter),(e,t)=>{this.state.parent.type===`menu`&&e!==t&&this.state.parent.store.set(`allowMouseEnter`,e)}),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){this.unsubscribeParentListener=e.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=a(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function mt(){return{...ke(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new O,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:p,keyboardEventRelay:void 0,closeDelay:0}}var ht=X.createContext(void 0);function gt(){return X.useContext(ht)}var _t=e(r());function vt(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:l=!0,orientation:d=`vertical`,actionsRef:p,closeParentOnEsc:m=!1,handle:h,triggerId:g,defaultTriggerId:_=null,highlightItemOnHover:v=!0}=e,y=Ge(!0),x=Z(!0),S=dt(!0),C=gt(),w=X.useMemo(()=>C&&x?{type:`menu`,store:x.store}:S?{type:`menubar`,context:S}:y&&!x?{type:`context-menu`,context:y}:{type:void 0},[y,x,S,C]),T=pt.useStore(h?.store,{parent:w}),D=T.useState(`floatingTreeRoot`),O=M(D),k=E();b(()=>{y&&!x?T.update({parent:{type:`context-menu`,context:y},floatingNodeId:O,floatingParentNodeId:k}):x&&T.update({floatingNodeId:O,floatingParentNodeId:k})},[y,x,O,k,T]),T.useControlledProp(`open`,n,a),T.useControlledProp(`activeTriggerId`,g,_),T.useContextCallback(`onOpenChangeComplete`,i);let N=T.useState(`open`),P=T.useState(`activeTriggerElement`),F=T.useState(`positionerElement`),ee=T.useState(`hoverEnabled`),te=T.useState(`modal`),L=T.useState(`disabled`),re=T.useState(`lastOpenChangeReason`),R=T.useState(`parent`),z=T.useState(`activeIndex`),B=T.useState(`payload`),oe=T.useState(`floatingParentNodeId`),V=X.useRef(null),se=oe!=null,H;T.useSyncedValues({disabled:o,modal:R.type===void 0?s:void 0,rootId:ge()});let{openMethod:ce,triggerProps:U,reset:W}=be(N);je(T);let{forceUnmount:le}=Fe(N,T,()=>{T.update({allowMouseEnter:!1,stickIfOpen:!0}),W()}),G=X.useRef(R.type!==`context-menu`),ue=ne();X.useEffect(()=>{if(N||(V.current=null),R.type===`context-menu`){if(!N){ue.clear(),G.current=!1;return}ue.start(500,()=>{G.current=!0})}},[ue,N,R.type]),Se(N&&te&&re!==`trigger-hover`&&ce!==`touch`,F),b(()=>{!N&&!ee&&T.set(`hoverEnabled`,!0)},[N,ee,T]);let de=X.useRef(!0),pe=ne(),q=c((e,t)=>{let n=t.reason;if(N===e&&t.trigger===P&&re===n||(t.preventUnmountOnClose=()=>{T.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=P??void 0),r?.(e,t),t.isCanceled))return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:se};H?.emit(`openchange`,i);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!de.current)return;if(!e&&z!==null){let e=T.context.itemDomElements.current[z];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(de.current=!1,pe.start(300,()=>{de.current=!0})):(de.current=!0,pe.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0&&a?.isTrusted,s=!e&&(n===`escape-key`||n==null);function c(){let r={open:e,openChangeReason:n};V.current=t.event??null;let i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),T.update(r)}n===`trigger-hover`?_t.flushSync(c):c(),R.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?T.set(`instantType`,`group`):o||s?T.set(`instantType`,o?`click`:`dismiss`):T.set(`instantType`,void 0)}),me=X.useCallback(e=>{let t=K(e);return t.preventUnmountOnClose=()=>{T.set(`preventUnmountingOnClose`,!0)},t},[T]),he=X.useCallback(()=>{T.setOpen(!1,me(fe))},[T,me]);X.useImperativeHandle(p,()=>({unmount:le,close:he}),[le,he]);let J;R.type===`context-menu`&&(J=R.context),X.useImperativeHandle(J?.positionerRef,()=>F,[F]),X.useImperativeHandle(J?.actionsRef,()=>({setOpen:q}),[q]);let Y=Pe({popupStore:T,onOpenChange:q});H=Y.context.events,X.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return H.on(`setOpen`,e),()=>{H?.off(`setOpen`,e)}},[H,q]);let _e=I(Y,{enabled:!L,bubbles:{escapeKey:m&&R.type===`menu`},outsidePress(){return R.type!==`context-menu`||V.current?.type===`contextmenu`?!0:G.current},externalTree:se?D:void 0}),ve=Te(Y,{role:`menu`}),ye=ie(),we=X.useCallback(e=>{T.select(`activeIndex`)!==e&&T.set(`activeIndex`,e)},[T]),Ee=Ce(Y,{enabled:!L,listRef:T.context.itemDomElements,activeIndex:z,nested:R.type!==void 0,loopFocus:l,orientation:d,parentOrientation:R.type===`menubar`?R.context.orientation:void 0,rtl:ye===`rtl`,disabledIndices:f,onNavigate:we,openOnArrowKeyDown:R.type!==`context-menu`,externalTree:se?D:void 0,focusItemOnHover:v}),De=X.useCallback(e=>{T.context.typingRef.current=e},[T]),{getReferenceProps:Oe,getFloatingProps:ke,getItemProps:Ae,getTriggerProps:Me}=ae([_e,ve,Ee,xe(Y,{listRef:T.context.itemLabels,activeIndex:z,resetMs:500,onMatch:e=>{N&&e!==z&&T.set(`activeIndex`,e)},onTypingChange:De})]),Ne=X.useMemo(()=>{let e=u(Oe(),{onMouseEnter(){T.set(`hoverEnabled`,!0)},onMouseMove(){T.set(`allowMouseEnter`,!0)}},U);return delete e.role,e},[Oe,T,U]),Ie=X.useMemo(()=>{let e=Me();if(!e)return e;let t=u(e,U);return delete t.role,delete t[`aria-controls`],t},[Me,U]),Le=j(),Re=X.useMemo(()=>ke({onMouseEnter(){R.type===`menu`&&Le.request(()=>T.set(`hoverEnabled`,!1))},onMouseMove(){T.set(`allowMouseEnter`,!0)},onClick(){T.select(`hoverEnabled`)&&T.set(`hoverEnabled`,!1)},onKeyDown(e){let t=T.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[ke,R.type,Le,T]),ze=X.useMemo(()=>Ae(),[Ae]);T.useSyncedValues({floatingRootContext:Y,activeTriggerProps:Ne,inactiveTriggerProps:Ie,popupProps:Re,itemProps:ze});let Be=X.useMemo(()=>({store:T,parent:w}),[T,w]),Ve=(0,Q.jsx)(Ue.Provider,{value:Be,children:typeof t==`function`?t({payload:B}):t});return R.type===void 0||R.type===`context-menu`?(0,Q.jsx)(A,{externalTree:D,children:Ve}):Ve}function yt(e){let t=Z().store,n=X.useMemo(()=>({parentMenu:t}),[t]);return(0,Q.jsx)(ht.Provider,{value:n,children:(0,Q.jsx)(vt,{...e})})}function bt(e){if(o(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!s(e))return bt(g(e))}function xt(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=X.useRef(!1);return X.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,T(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:p,[t,n,r])}var St=2,Ct=X.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,openOnHover:s,delay:u=100,closeDelay:d=0,handle:f,payload:h,...g}=e,_=Z(!0),v=f?.store??_?.store;if(!v)throw Error(x(85));let b=J(o),S=v.useState(`isTriggerActive`,b),C=v.useState(`floatingRootContext`),k=v.useState(`isOpenedByTrigger`,b),A=X.useRef(null),j=Tt(),P=y(!0),I=D(),L=X.useMemo(()=>I??new O,[I]),{registerTrigger:re,isMountedByThisTrigger:R}=Le(b,A,v,{payload:h,closeDelay:d,parent:j,floatingTreeRoot:L,floatingNodeId:M(L),floatingParentNodeId:E(),keyboardEventRelay:P?.relayKeyboardEvent}),z=j.type===`menubar`,ie=v.useState(`disabled`),B=i||ie||z&&j.context.disabled,{getButtonProps:oe,buttonRef:se}=m({disabled:B,native:a});X.useEffect(()=>{!k&&j.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,k,j.type]);let H=X.useRef(null),U=ne(),W=c(e=>{if(!H.current)return;U.clear(),v.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(V(H.current,t)||V(v.select(`positionerElement`),t)||t===H.current||t!=null&&bt(t)===v.select(`rootId`))return;let n=we(H.current);e.clientX>=n.left-St&&e.clientX<=n.right+St&&e.clientY>=n.top-St&&e.clientY<=n.bottom+St||L.events.emit(`close`,{domEvent:e,reason:me})});X.useEffect(()=>{k&&v.select(`lastOpenChangeReason`)===`trigger-hover`&&T(H.current).addEventListener(`mouseup`,W,{once:!0})},[k,W,v]);let le=z&&j.context.hasSubmenuOpen,G=Ie(C,{enabled:(s??le)&&!B&&j.type!==`context-menu`&&(!z||le&&!R),handleClose:De({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:j.type===void 0?u:void 0,delay:{close:d},triggerElementRef:A,externalTree:L,isActiveTrigger:S}),ue=wt(k,v.select(`lastOpenChangeReason`)),de=_e(C,{enabled:!B&&j.type!==`context-menu`,event:k&&z?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:j.type===void 0?ue:!1}),fe=Ne(C,{enabled:!B&&le}),pe=xt({open:k,enabled:z,mouseDownAction:`open`}),q=ae([de,fe]),ge=X.useMemo(()=>({disabled:B,open:k}),[B,k]),Y=v.useState(`triggerProps`,R),ve=[H,t,se,re,A],ye=[q.getReferenceProps(),G??p,Y,{"aria-haspopup":`menu`,id:b,onMouseDown:e=>{v.select(`open`)||(U.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),T(e.currentTarget).addEventListener(`mouseup`,W,{once:!0}))}},z?{role:`menuitem`}:{},pe,g,oe],be=X.useRef(null),xe=c(e=>{_t.flushSync(()=>{v.setOpen(!1,K(he,e.nativeEvent,e.currentTarget))}),te(be.current)?.focus()}),Se=c(e=>{let t=v.select(`positionerElement`);if(t&&ee(e,t))v.context.beforeContentFocusGuardRef.current?.focus();else{_t.flushSync(()=>{v.setOpen(!1,K(he,e.nativeEvent,e.currentTarget))});let n=w(v.context.triggerFocusTargetRef.current||A.current);for(;n!==null&&V(t,n);){let e=n;if(n=N(n),n===e)break}n?.focus()}}),Ce=l(`button`,e,{enabled:!z,stateAttributesMapping:ce,state:ge,ref:ve,props:ye});return z?(0,Q.jsx)(ze,{tag:`button`,render:n,className:r,state:ge,refs:ve,props:ye,stateAttributesMapping:ce}):k?(0,Q.jsxs)(X.Fragment,{children:[(0,Q.jsx)(F,{ref:be,onFocus:xe},`${b}-pre-focus-guard`),(0,Q.jsx)(X.Fragment,{children:Ce},b),(0,Q.jsx)(F,{ref:v.context.triggerFocusTargetRef,onFocus:Se},`${b}-post-focus-guard`)]}):(0,Q.jsx)(X.Fragment,{children:Ce},b)});function wt(e,t){let n=ne(),[r,i]=X.useState(!1);return b(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Tt(){let e=Ge(!0),t=Z(!0),n=dt(!0);return X.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Et=X.forwardRef(function(e,t){let{render:n,className:r,label:i,id:a,nativeButton:o=!1,openOnHover:s=!0,delay:c=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=G(),m=He(),{store:h}=Z(),g=J(a),_=h.useState(`open`),v=h.useState(`floatingRootContext`),y=h.useState(`floatingTreeRoot`),b=Oe(g,h),S=X.useCallback(e=>{let t=b(e);return e!==null&&h.select(`open`)&&h.select(`activeTriggerId`)==null&&h.update({activeTriggerId:g,activeTriggerElement:e,closeDelay:u}),t},[b,u,h,g]),C=X.useRef(null),w=X.useCallback(e=>{C.current=e,h.set(`activeTriggerElement`,e)},[h]),T=gt();if(!T?.parentMenu)throw Error(x(37));h.useSyncedValue(`closeDelay`,u);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,p.index),k=X.useMemo(()=>({type:`submenu-trigger`,setActive:()=>E.set(`activeIndex`,p.index)}),[E,p.index]),A=h.useState(`disabled`),j=d||A,{getItemProps:M,itemRef:N}=qe({closeOnClick:!1,disabled:j,highlighted:O,id:g,store:h,nativeButton:o,itemMetadata:k,nodeId:m?.nodeId}),P=h.useState(`hoverEnabled`),F=h.useState(`allowMouseEnter`),ee=Ie(v,{enabled:P&&s&&!j&&F,handleClose:De({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:c,delay:{open:c,close:u},triggerElementRef:C,externalTree:y}),te=ae([_e(v,{enabled:!j,event:`mousedown`,toggle:!s,ignoreMouse:s,stickIfOpen:!1})]),I=h.useState(`triggerProps`,!0);return delete I.id,l(`div`,e,{state:X.useMemo(()=>({disabled:j,highlighted:O,open:_}),[j,O,_]),stateAttributesMapping:L,props:[te.getReferenceProps(),ee,I,D,{tabIndex:_||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},f,M],ref:[t,p.ref,N,S,w]})}),$=i();function Dt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(vt,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Ot(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ct,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function kt(e){let t=(0,$.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=S(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,Q.jsx)(Qe,{"data-slot":`dropdown-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,Q.jsx)(tt,{children:(0,Q.jsx)(nt,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function At(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=S(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Q.jsx)(Xe,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function jt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(yt,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Mt(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=S(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(Be,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(Et,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Nt(e){let t=(0,$.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?-3:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=S(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 w-auto`,n),t[7]=n,t[8]=f);let p;return t[9]!==c||t[10]!==l||t[11]!==r||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,Q.jsx)(kt,{"data-slot":`dropdown-menu-sub-content`,className:f,align:c,alignOffset:l,side:u,sideOffset:d,...r}),t[9]=c,t[10]=l,t[11]=r,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Pt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(at,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function Ft(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=S(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,Q.jsx)(lt,{children:(0,Q.jsx)(C,{})})}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,Q.jsxs)(ct,{"data-slot":`dropdown-menu-radio-item`,className:a,...i,children:[o,n]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function It(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=S(`bg-border -mx-1 my-1 h-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Ee,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Lt(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=S(`text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ft as a,jt as c,Ot as d,Pt as i,Nt as l,kt as n,It as o,At as r,Lt as s,Dt as t,Mt as u};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-DG_AJzB_.js";import{t}from"./compiler-runtime-DCc3R3Xn.js";import{a as n}from"./api-base-url-DIb6qukm.js";import{t as r}from"./useSuspenseQuery-BanVmJgY.js";import{f as i}from"./index-CbFJKkNs.js";import{a,n as o,o as s,r as c,t as l}from"./card-Bsy6azfK.js";var u=t(),d=e(),f=n(`/_authenticated/$org_slug/home`);function p(){let e=(0,u.c)(9),{organizationId:t}=f.useRouteContext(),n;e[0]===t?n=e[1]:(n=i(t),e[0]=t,e[1]=n);let{data:p}=r(n),m;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,d.jsxs)(`div`,{className:`mb-8`,children:[(0,d.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Welcome to OneQuery`}),(0,d.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`Your workspace is ready to connect data sources and explore usage.`})]}),e[2]=m):m=e[2];let h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsxs)(a,{children:[(0,d.jsx)(s,{children:`Data Sources`}),(0,d.jsx)(c,{children:`Manage the systems OneQuery can query on your behalf`})]}),e[3]=h):h=e[3];let g;e[4]===p.dataSourcesCount?g=e[5]:(g=(0,d.jsx)(`p`,{className:`text-2xl font-bold`,children:p.dataSourcesCount}),e[4]=p.dataSourcesCount,e[5]=g);let _;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Active data sources`}),e[6]=_):_=e[6];let v;return e[7]===g?v=e[8]:(v=(0,d.jsxs)(`div`,{className:`p-8`,children:[m,(0,d.jsx)(`div`,{className:`grid gap-4 md:grid-cols-1`,children:(0,d.jsxs)(l,{children:[h,(0,d.jsxs)(o,{children:[g,_]})]})})]}),e[7]=g,e[8]=v),v}var m=p;export{m as component};
1
+ import{t as e}from"./jsx-runtime-DG_AJzB_.js";import{t}from"./compiler-runtime-DCc3R3Xn.js";import{a as n}from"./api-base-url-DIb6qukm.js";import{t as r}from"./useSuspenseQuery-BoUwwhvS.js";import{f as i}from"./index-DthpwdlN.js";import{a,n as o,o as s,r as c,t as l}from"./card-Bsy6azfK.js";var u=t(),d=e(),f=n(`/_authenticated/$org_slug/home`);function p(){let e=(0,u.c)(9),{organizationId:t}=f.useRouteContext(),n;e[0]===t?n=e[1]:(n=i(t),e[0]=t,e[1]=n);let{data:p}=r(n),m;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,d.jsxs)(`div`,{className:`mb-8`,children:[(0,d.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Welcome to OneQuery`}),(0,d.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`Your workspace is ready to connect data sources and explore usage.`})]}),e[2]=m):m=e[2];let h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsxs)(a,{children:[(0,d.jsx)(s,{children:`Data Sources`}),(0,d.jsx)(c,{children:`Manage the systems OneQuery can query on your behalf`})]}),e[3]=h):h=e[3];let g;e[4]===p.dataSourcesCount?g=e[5]:(g=(0,d.jsx)(`p`,{className:`text-2xl font-bold`,children:p.dataSourcesCount}),e[4]=p.dataSourcesCount,e[5]=g);let _;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Active data sources`}),e[6]=_):_=e[6];let v;return e[7]===g?v=e[8]:(v=(0,d.jsxs)(`div`,{className:`p-8`,children:[m,(0,d.jsx)(`div`,{className:`grid gap-4 md:grid-cols-1`,children:(0,d.jsxs)(l,{children:[h,(0,d.jsxs)(o,{children:[g,_]})]})})]}),e[7]=g,e[8]=v),v}var m=p;export{m as component};