@hot-updater/console 0.36.6 → 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +1 -0
  3. package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +42 -0
  4. package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +1 -0
  5. package/.output/public/assets/alert-C-1KvDW8.js +1 -0
  6. package/.output/public/assets/analytics-Bqz0c-BT.js +1 -0
  7. package/.output/public/assets/analytics-api-CJdrTLLO.js +1 -0
  8. package/.output/public/assets/api-B_Rh-uzC.js +1 -0
  9. package/.output/public/assets/api-keys-BurCFhzH.js +1 -0
  10. package/.output/public/assets/api-keys-api-BEDJdQg3.js +1 -0
  11. package/.output/public/assets/badge-Bf0fZ-Gx.js +1 -0
  12. package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
  13. package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
  14. package/.output/public/assets/dialog-BS60BRr2.js +1 -0
  15. package/.output/public/assets/dist-DspNKfMj.js +1 -0
  16. package/.output/public/assets/download-O-yNBc9H.js +1 -0
  17. package/.output/public/assets/field-Buq148-A.js +1 -0
  18. package/.output/public/assets/index-kFhd2S78.js +10 -0
  19. package/.output/public/assets/installations-BrQ-od41.js +2 -0
  20. package/.output/public/assets/installations-CGlZ3ROz.js +1 -0
  21. package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +1 -0
  22. package/.output/public/assets/loader-circle-DCYF-wJl.js +1 -0
  23. package/.output/public/assets/preload-helper-TKOBYGYD.js +1 -0
  24. package/.output/public/assets/refresh-cw-n8XYbPPj.js +1 -0
  25. package/.output/public/assets/routes-CrdokJ80.js +1 -0
  26. package/.output/public/assets/routes-DcQnVajO.js +2 -0
  27. package/.output/public/assets/search-DLhbWw3W.js +1 -0
  28. package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
  29. package/.output/public/assets/signing-HRexfjsH.js +1 -0
  30. package/.output/public/assets/styles-eB4EtvFS.css +2 -0
  31. package/.output/public/assets/table-D8CLieHX.js +1 -0
  32. package/.output/public/assets/textarea-YJLTVAoq.js +1 -0
  33. package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
  34. package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +1 -0
  35. package/.output/server/__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs +146 -0
  36. package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
  37. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  38. package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
  39. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
  40. package/.output/server/_libs/d3-array.mjs +231 -0
  41. package/.output/server/_libs/d3-color.mjs +330 -0
  42. package/.output/server/_libs/d3-format.mjs +252 -0
  43. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  44. package/.output/server/_libs/d3-path.mjs +77 -0
  45. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  46. package/.output/server/_libs/d3-shape.mjs +818 -0
  47. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  48. package/.output/server/_libs/es-toolkit.mjs +1134 -0
  49. package/.output/server/_libs/eventemitter3.mjs +236 -0
  50. package/.output/server/_libs/immer.mjs +532 -0
  51. package/.output/server/_libs/lucide-react.mjs +141 -13
  52. package/.output/server/_libs/next-themes.mjs +2 -2
  53. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  54. package/.output/server/_libs/recharts+[...].mjs +14117 -0
  55. package/.output/server/_libs/sonner.mjs +2 -2
  56. package/.output/server/_libs/tanstack__query-core.mjs +114 -1
  57. package/.output/server/_libs/tanstack__react-query.mjs +3 -4
  58. package/.output/server/_runtime.mjs +10 -1
  59. package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +15 -0
  60. package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +288 -0
  61. package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +13 -0
  62. package/.output/server/_ssr/alert-Dim3MGY5.mjs +86 -0
  63. package/.output/server/_ssr/analytics-DtMTn8fn.mjs +858 -0
  64. package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +71 -0
  65. package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +96 -0
  66. package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +155 -0
  67. package/.output/server/_ssr/api-BTSv1tZb.mjs +282 -0
  68. package/.output/server/_ssr/api-keys-BnM_o2nS.mjs +300 -0
  69. package/.output/server/_ssr/api-keys-api-CIywsSF5.mjs +60 -0
  70. package/.output/server/_ssr/api-keys-rpc-BSp1wkIV.mjs +136 -0
  71. package/.output/server/_ssr/api-rpc-cG5wd_tO.mjs +1468 -0
  72. package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
  73. package/.output/server/_ssr/auth-rpc-BrJ6obHJ.mjs +24 -0
  74. package/.output/server/_ssr/auth.server-DwKoZoQM.mjs +50 -0
  75. package/.output/server/_ssr/badge-DCxbEeof.mjs +26 -0
  76. package/.output/server/_ssr/bundle-signing-rpc-COoQhW8E.mjs +16 -0
  77. package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +51 -0
  78. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
  79. package/.output/server/_ssr/config.server-DEiLhKmy.mjs +361 -0
  80. package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
  81. package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
  82. package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-9P0S0lJ3.mjs} +68 -50
  83. package/.output/server/_ssr/databaseRows-CwbNwYSl.mjs +166 -0
  84. package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
  85. package/.output/server/_ssr/dialog-CQuRMNZ4.mjs +170 -0
  86. package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
  87. package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
  88. package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
  89. package/.output/server/_ssr/field-DRIXKjZG.mjs +74 -0
  90. package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
  91. package/.output/server/_ssr/installations-B-azgAvX.mjs +19 -0
  92. package/.output/server/_ssr/installations-Ctvzp2JH.mjs +535 -0
  93. package/.output/server/_ssr/router-C-KUBfOi.mjs +513 -0
  94. package/.output/server/_ssr/routes-BM4ht9jb.mjs +2286 -0
  95. package/.output/server/_ssr/routes-Z7TwC6nC.mjs +37 -0
  96. package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +527 -0
  97. package/.output/server/_ssr/server-BjzmvXnO.mjs +7468 -0
  98. package/.output/server/_ssr/signing-k8GxyBDF.mjs +202 -0
  99. package/.output/server/_ssr/ssr.mjs +4 -5740
  100. package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
  101. package/.output/server/_ssr/table-v1yCvYo7.mjs +53 -0
  102. package/.output/server/_ssr/textarea-DYHnskhb.mjs +14 -0
  103. package/.output/server/_ssr/uuidv7-BbJ-9D_I.mjs +31 -0
  104. package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +108 -0
  105. package/.output/server/index.mjs +249 -46
  106. package/README.md +29 -8
  107. package/lib/index.d.mts +36 -0
  108. package/lib/index.mjs +4 -0
  109. package/lib/vite-internal.mjs +127 -0
  110. package/lib/vite.d.mts +10 -0
  111. package/lib/vite.mjs +5 -0
  112. package/package.json +51 -29
  113. package/public/apple-touch-icon.png +0 -0
  114. package/public/favicon-16x16.png +0 -0
  115. package/public/favicon-32x32.png +0 -0
  116. package/public/favicon.ico +0 -0
  117. package/public/logo.svg +1 -0
  118. package/public/manifest.json +30 -0
  119. package/public/robots.txt +3 -0
  120. package/src/components/AppSidebar.tsx +159 -0
  121. package/src/components/BundleIdDisplay.tsx +18 -0
  122. package/src/components/ChannelBadge.tsx +31 -0
  123. package/src/components/ConsoleAccessPage.tsx +122 -0
  124. package/src/components/EnabledStatusIcon.tsx +54 -0
  125. package/src/components/HashValueDisplay.tsx +85 -0
  126. package/src/components/HotUpdaterLogo.tsx +30 -0
  127. package/src/components/NotFoundPage.tsx +33 -0
  128. package/src/components/PlatformIcon.tsx +39 -0
  129. package/src/components/RolloutPercentageBadge.tsx +28 -0
  130. package/src/components/ThemeProvider.tsx +116 -0
  131. package/src/components/TimestampDisplay.tsx +41 -0
  132. package/src/components/features/analytics/ActivityChart.tsx +150 -0
  133. package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +24 -0
  134. package/src/components/features/analytics/AnalyticsControls.tsx +115 -0
  135. package/src/components/features/analytics/AnalyticsErrorAlert.tsx +21 -0
  136. package/src/components/features/analytics/AnalyticsOverview.tsx +208 -0
  137. package/src/components/features/analytics/BundleDistribution.tsx +133 -0
  138. package/src/components/features/analytics/BundleSelector.tsx +114 -0
  139. package/src/components/features/analytics/InstallationHistoryCard.tsx +248 -0
  140. package/src/components/features/analytics/InstallationMatchesCard.tsx +132 -0
  141. package/src/components/features/analytics/InstallationPageHeader.tsx +138 -0
  142. package/src/components/features/analytics/InstallationPagination.tsx +48 -0
  143. package/src/components/features/analytics/InstallationSearch.tsx +230 -0
  144. package/src/components/features/analytics/UpdateOutcomes.tsx +147 -0
  145. package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
  146. package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
  147. package/src/components/features/bundles/BundleAnalyticsSummary.tsx +123 -0
  148. package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
  149. package/src/components/features/bundles/BundleMetadata.tsx +136 -0
  150. package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
  151. package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
  152. package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
  153. package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
  154. package/src/components/features/signing/BundleSigningPage.tsx +247 -0
  155. package/src/components/ui/alert-dialog.tsx +185 -0
  156. package/src/components/ui/alert.tsx +76 -0
  157. package/src/components/ui/badge.tsx +49 -0
  158. package/src/components/ui/button.tsx +58 -0
  159. package/src/components/ui/card.tsx +89 -0
  160. package/src/components/ui/chart.tsx +371 -0
  161. package/src/components/ui/combobox.tsx +303 -0
  162. package/src/components/ui/dialog.tsx +156 -0
  163. package/src/components/ui/dropdown-menu.tsx +270 -0
  164. package/src/components/ui/field.tsx +235 -0
  165. package/src/components/ui/input-group.tsx +147 -0
  166. package/src/components/ui/input.tsx +19 -0
  167. package/src/components/ui/label.tsx +25 -0
  168. package/src/components/ui/progress.tsx +84 -0
  169. package/src/components/ui/select.tsx +205 -0
  170. package/src/components/ui/separator.tsx +23 -0
  171. package/src/components/ui/sheet.tsx +132 -0
  172. package/src/components/ui/sidebar.tsx +779 -0
  173. package/src/components/ui/skeleton.tsx +13 -0
  174. package/src/components/ui/slider.tsx +56 -0
  175. package/src/components/ui/sonner.tsx +45 -0
  176. package/src/components/ui/switch.tsx +25 -0
  177. package/src/components/ui/table.tsx +114 -0
  178. package/src/components/ui/textarea.tsx +18 -0
  179. package/src/components/ui/toggle-group.tsx +89 -0
  180. package/src/components/ui/toggle.tsx +43 -0
  181. package/src/components/ui/tooltip.tsx +66 -0
  182. package/src/hooks/use-mobile.ts +30 -0
  183. package/src/index.ts +48 -0
  184. package/src/lib/analytics-api.ts +145 -0
  185. package/src/lib/analytics-error.ts +19 -0
  186. package/src/lib/analytics-input.ts +187 -0
  187. package/src/lib/analytics-overview.ts +170 -0
  188. package/src/lib/analytics-rpc.ts +218 -0
  189. package/src/lib/api-keys-api.ts +69 -0
  190. package/src/lib/api-keys-rpc.ts +87 -0
  191. package/src/lib/api-rpc.ts +478 -0
  192. package/src/lib/api.ts +444 -0
  193. package/src/lib/auth-rpc.ts +16 -0
  194. package/src/lib/bundle-signing-api.ts +14 -0
  195. package/src/lib/bundle-signing-rpc.ts +16 -0
  196. package/src/lib/constants.ts +1 -0
  197. package/src/lib/git.ts +51 -0
  198. package/src/lib/server/auth.server.ts +43 -0
  199. package/src/lib/server/bundle-signing.server.ts +100 -0
  200. package/src/lib/server/config.server.ts +109 -0
  201. package/src/lib/server/console-runtime.server.ts +70 -0
  202. package/src/lib/server/deleteBundle.ts +145 -0
  203. package/src/lib/server/downloadBundle.ts +46 -0
  204. package/src/lib/server/getBundleChildren.ts +130 -0
  205. package/src/lib/server/listReleases.ts +61 -0
  206. package/src/lib/server/releaseActivity.ts +27 -0
  207. package/src/lib/server/releaseReachability.ts +95 -0
  208. package/src/lib/server/runtime.server.ts +172 -0
  209. package/src/lib/utils.ts +9 -0
  210. package/src/logo.svg +1 -0
  211. package/src/routeTree.gen.ts +199 -0
  212. package/src/router.tsx +21 -0
  213. package/src/routes/-installations-search.ts +19 -0
  214. package/src/routes/-releases-search.ts +74 -0
  215. package/src/routes/__root.tsx +174 -0
  216. package/src/routes/analytics.tsx +139 -0
  217. package/src/routes/api/auth/$.ts +19 -0
  218. package/src/routes/api/bundles/$bundleId/download.ts +17 -0
  219. package/src/routes/api-keys.tsx +37 -0
  220. package/src/routes/index.tsx +982 -0
  221. package/src/routes/installations.tsx +194 -0
  222. package/src/routes/signing.tsx +37 -0
  223. package/src/styles.css +152 -0
  224. package/src/virtual-modules.d.ts +21 -0
  225. package/src/vite-env.d.ts +1 -0
  226. package/src/vite-internal.ts +195 -0
  227. package/src/vite.ts +12 -0
  228. package/.output/public/assets/dist-DJX53faP.js +0 -3
  229. package/.output/public/assets/index-Iylis5kY.js +0 -10
  230. package/.output/public/assets/routes-HT21hs0C.js +0 -54
  231. package/.output/public/assets/styles-C0Re4quB.css +0 -2
  232. package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
  233. package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
  234. package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
  235. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
  236. package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
  237. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
  238. package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
  239. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
  240. package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
  241. package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
  242. package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
  243. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  244. package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
  245. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  246. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
  247. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
  248. package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
  249. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
  250. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
  251. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
  252. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
  253. package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
  254. package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
  255. package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
  256. package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
  257. package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
  258. package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
  259. package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
  260. package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
  261. package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
  262. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  263. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  264. package/.output/server/node_modules/tslib/package.json +0 -47
  265. package/.output/server/node_modules/tslib/tslib.js +0 -484
  266. package/.output/server/package.json +0 -9
@@ -1,2138 +0,0 @@
1
- import { r as __toESM, t as __commonJSMin } from "../../_runtime.mjs";
2
- import { l as require_react_dom, u as require_react } from "../@floating-ui/react-dom+[...].mjs";
3
- import { t as composeEventHandlers } from "../radix-ui__primitive.mjs";
4
- import { __assign, __rest, __spreadArray } from "tslib";
5
- //#region ../../node_modules/.pnpm/react@19.2.6/node_modules/react/cjs/react-jsx-runtime.production.js
6
- /**
7
- * @license React
8
- * react-jsx-runtime.production.js
9
- *
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((exports) => {
16
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
17
- function jsxProd(type, config, maybeKey) {
18
- var key = null;
19
- void 0 !== maybeKey && (key = "" + maybeKey);
20
- void 0 !== config.key && (key = "" + config.key);
21
- if ("key" in config) {
22
- maybeKey = {};
23
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
24
- } else maybeKey = config;
25
- config = maybeKey.ref;
26
- return {
27
- $$typeof: REACT_ELEMENT_TYPE,
28
- type,
29
- key,
30
- ref: void 0 !== config ? config : null,
31
- props: maybeKey
32
- };
33
- }
34
- exports.Fragment = REACT_FRAGMENT_TYPE;
35
- exports.jsx = jsxProd;
36
- exports.jsxs = jsxProd;
37
- }));
38
- //#endregion
39
- //#region ../../node_modules/.pnpm/react@19.2.6/node_modules/react/jsx-runtime.js
40
- var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41
- module.exports = require_react_jsx_runtime_production();
42
- }));
43
- //#endregion
44
- //#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.3_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
45
- var import_jsx_runtime = require_jsx_runtime();
46
- var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
47
- function setRef$1(ref, value) {
48
- if (typeof ref === "function") return ref(value);
49
- else if (ref !== null && ref !== void 0) ref.current = value;
50
- }
51
- function composeRefs(...refs) {
52
- return (node) => {
53
- let hasCleanup = false;
54
- const cleanups = refs.map((ref) => {
55
- const cleanup = setRef$1(ref, node);
56
- if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
57
- return cleanup;
58
- });
59
- if (hasCleanup) return () => {
60
- for (let i = 0; i < cleanups.length; i++) {
61
- const cleanup = cleanups[i];
62
- if (typeof cleanup == "function") cleanup();
63
- else setRef$1(refs[i], null);
64
- }
65
- };
66
- };
67
- }
68
- function useComposedRefs(...refs) {
69
- return import_react.useCallback(composeRefs(...refs), refs);
70
- }
71
- //#endregion
72
- //#region ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.5_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs
73
- var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
74
- /* @__NO_SIDE_EFFECTS__ */
75
- function createSlot(ownerName) {
76
- const Slot2 = import_react.forwardRef((props, forwardedRef) => {
77
- let { children, ...slotProps } = props;
78
- let slottableElement = null;
79
- let hasSlottable = false;
80
- const newChildren = [];
81
- if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
82
- import_react.Children.forEach(children, (maybeSlottable) => {
83
- if (isSlottable(maybeSlottable)) {
84
- hasSlottable = true;
85
- const slottable = maybeSlottable;
86
- let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
87
- if (isLazyComponent(child) && typeof use === "function") child = use(child._payload);
88
- slottableElement = getSlottableElementFromSlottable(slottable, child);
89
- newChildren.push(slottableElement?.props?.children);
90
- } else newChildren.push(maybeSlottable);
91
- });
92
- if (slottableElement) slottableElement = import_react.cloneElement(slottableElement, void 0, newChildren);
93
- else if (!hasSlottable && import_react.Children.count(children) === 1 && import_react.isValidElement(children)) slottableElement = children;
94
- const slottableElementRef = slottableElement ? getElementRef$1(slottableElement) : void 0;
95
- const composedRef = useComposedRefs(forwardedRef, slottableElementRef);
96
- if (!slottableElement) {
97
- if (children || children === 0) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
98
- return children;
99
- }
100
- const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});
101
- if (slottableElement.type !== import_react.Fragment) mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
102
- return import_react.cloneElement(slottableElement, mergedProps);
103
- });
104
- Slot2.displayName = `${ownerName}.Slot`;
105
- return Slot2;
106
- }
107
- var Slot$1 = /* @__PURE__ */ createSlot("Slot");
108
- var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
109
- /* @__NO_SIDE_EFFECTS__ */
110
- function createSlottable(ownerName) {
111
- const Slottable2 = (props) => "child" in props ? props.children(props.child) : props.children;
112
- Slottable2.displayName = `${ownerName}.Slottable`;
113
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
114
- return Slottable2;
115
- }
116
- var getSlottableElementFromSlottable = (slottable, child) => {
117
- if ("child" in slottable.props) {
118
- const child2 = slottable.props.child;
119
- if (!import_react.isValidElement(child2)) return null;
120
- return import_react.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
121
- }
122
- return import_react.isValidElement(child) ? child : null;
123
- };
124
- function mergeProps(slotProps, childProps) {
125
- const overrideProps = { ...childProps };
126
- for (const propName in childProps) {
127
- const slotPropValue = slotProps[propName];
128
- const childPropValue = childProps[propName];
129
- if (/^on[A-Z]/.test(propName)) {
130
- if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
131
- const result = childPropValue(...args);
132
- slotPropValue(...args);
133
- return result;
134
- };
135
- else if (slotPropValue) overrideProps[propName] = slotPropValue;
136
- } else if (propName === "style") overrideProps[propName] = {
137
- ...slotPropValue,
138
- ...childPropValue
139
- };
140
- else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
141
- }
142
- return {
143
- ...slotProps,
144
- ...overrideProps
145
- };
146
- }
147
- function getElementRef$1(element) {
148
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
149
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
150
- if (mayWarn) return element.ref;
151
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
152
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
153
- if (mayWarn) return element.props.ref;
154
- return element.props.ref || element.ref;
155
- }
156
- function isSlottable(child) {
157
- return import_react.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
158
- }
159
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
160
- function isLazyComponent(element) {
161
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
162
- }
163
- function isPromiseLike(value) {
164
- return typeof value === "object" && value !== null && "then" in value;
165
- }
166
- var createSlotError = (ownerName) => {
167
- return `${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`;
168
- };
169
- var createSlottableError = (ownerName) => {
170
- return `${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`;
171
- };
172
- var use = import_react[" use ".trim().toString()];
173
- //#endregion
174
- //#region ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.5_@types+react-dom@19.2.3_@types+react@19.2.15__@types+re_859fe5701657306b7ae1c013ff1125f7/node_modules/@radix-ui/react-primitive/dist/index.mjs
175
- var Primitive = [
176
- "a",
177
- "button",
178
- "div",
179
- "form",
180
- "h2",
181
- "h3",
182
- "img",
183
- "input",
184
- "label",
185
- "li",
186
- "nav",
187
- "ol",
188
- "p",
189
- "select",
190
- "span",
191
- "svg",
192
- "ul"
193
- ].reduce((primitive, node) => {
194
- const Slot = /* @__PURE__ */ createSlot(`Primitive.${node}`);
195
- const Node = import_react.forwardRef((props, forwardedRef) => {
196
- const { asChild, ...primitiveProps } = props;
197
- const Comp = asChild ? Slot : node;
198
- if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
199
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
200
- ...primitiveProps,
201
- ref: forwardedRef
202
- });
203
- });
204
- Node.displayName = `Primitive.${node}`;
205
- return {
206
- ...primitive,
207
- [node]: Node
208
- };
209
- }, {});
210
- function dispatchDiscreteCustomEvent(target, event) {
211
- if (target) import_react_dom.flushSync(() => target.dispatchEvent(event));
212
- }
213
- //#endregion
214
- //#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.4_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-context/dist/index.mjs
215
- function createContext2(rootComponentName, defaultContext) {
216
- const Context = import_react.createContext(defaultContext);
217
- Context.displayName = rootComponentName + "Context";
218
- const Provider = (props) => {
219
- const { children, ...context } = props;
220
- const value = import_react.useMemo(() => context, Object.values(context));
221
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
222
- value,
223
- children
224
- });
225
- };
226
- Provider.displayName = rootComponentName + "Provider";
227
- function useContext2(consumerName) {
228
- const context = import_react.useContext(Context);
229
- if (context) return context;
230
- if (defaultContext !== void 0) return defaultContext;
231
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
232
- }
233
- return [Provider, useContext2];
234
- }
235
- function createContextScope(scopeName, createContextScopeDeps = []) {
236
- let defaultContexts = [];
237
- function createContext3(rootComponentName, defaultContext) {
238
- const BaseContext = import_react.createContext(defaultContext);
239
- BaseContext.displayName = rootComponentName + "Context";
240
- const index = defaultContexts.length;
241
- defaultContexts = [...defaultContexts, defaultContext];
242
- const Provider = (props) => {
243
- const { scope, children, ...context } = props;
244
- const Context = scope?.[scopeName]?.[index] || BaseContext;
245
- const value = import_react.useMemo(() => context, Object.values(context));
246
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, {
247
- value,
248
- children
249
- });
250
- };
251
- Provider.displayName = rootComponentName + "Provider";
252
- function useContext2(consumerName, scope) {
253
- const Context = scope?.[scopeName]?.[index] || BaseContext;
254
- const context = import_react.useContext(Context);
255
- if (context) return context;
256
- if (defaultContext !== void 0) return defaultContext;
257
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
258
- }
259
- return [Provider, useContext2];
260
- }
261
- const createScope = () => {
262
- const scopeContexts = defaultContexts.map((defaultContext) => {
263
- return import_react.createContext(defaultContext);
264
- });
265
- return function useScope(scope) {
266
- const contexts = scope?.[scopeName] || scopeContexts;
267
- return import_react.useMemo(() => ({ [`__scope${scopeName}`]: {
268
- ...scope,
269
- [scopeName]: contexts
270
- } }), [scope, contexts]);
271
- };
272
- };
273
- createScope.scopeName = scopeName;
274
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
275
- }
276
- function composeContextScopes(...scopes) {
277
- const baseScope = scopes[0];
278
- if (scopes.length === 1) return baseScope;
279
- const createScope = () => {
280
- const scopeHooks = scopes.map((createScope2) => ({
281
- useScope: createScope2(),
282
- scopeName: createScope2.scopeName
283
- }));
284
- return function useComposedScopes(overrideScopes) {
285
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
286
- const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
287
- return {
288
- ...nextScopes2,
289
- ...currentScope
290
- };
291
- }, {});
292
- return import_react.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
293
- };
294
- };
295
- createScope.scopeName = baseScope.scopeName;
296
- return createScope;
297
- }
298
- //#endregion
299
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.2_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
300
- var useLayoutEffect2 = globalThis?.document ? import_react.useLayoutEffect : () => {};
301
- //#endregion
302
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.3_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
303
- var useInsertionEffect = import_react[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
304
- function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
305
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
306
- defaultProp,
307
- onChange
308
- });
309
- const isControlled = prop !== void 0;
310
- const value = isControlled ? prop : uncontrolledProp;
311
- {
312
- const isControlledRef = import_react.useRef(prop !== void 0);
313
- import_react.useEffect(() => {
314
- const wasControlled = isControlledRef.current;
315
- if (wasControlled !== isControlled) console.warn(`${caller} is changing from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);
316
- isControlledRef.current = isControlled;
317
- }, [isControlled, caller]);
318
- }
319
- return [value, import_react.useCallback((nextValue) => {
320
- if (isControlled) {
321
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
322
- if (value2 !== prop) onChangeRef.current?.(value2);
323
- } else setUncontrolledProp(nextValue);
324
- }, [
325
- isControlled,
326
- prop,
327
- setUncontrolledProp,
328
- onChangeRef
329
- ])];
330
- }
331
- function useUncontrolledState({ defaultProp, onChange }) {
332
- const [value, setValue] = import_react.useState(defaultProp);
333
- const prevValueRef = import_react.useRef(value);
334
- const onChangeRef = import_react.useRef(onChange);
335
- useInsertionEffect(() => {
336
- onChangeRef.current = onChange;
337
- }, [onChange]);
338
- import_react.useEffect(() => {
339
- if (prevValueRef.current !== value) {
340
- onChangeRef.current?.(value);
341
- prevValueRef.current = value;
342
- }
343
- }, [value, prevValueRef]);
344
- return [
345
- value,
346
- setValue,
347
- onChangeRef
348
- ];
349
- }
350
- function isFunction(value) {
351
- return typeof value === "function";
352
- }
353
- //#endregion
354
- //#region ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.6_@types+react-dom@19.2.3_@types+react@19.2.15__@types+rea_40b556cd56efb44c5867d946559e1d0f/node_modules/@radix-ui/react-presence/dist/index.mjs
355
- function useStateMachine(initialState, machine) {
356
- return import_react.useReducer((state, event) => {
357
- return machine[state][event] ?? state;
358
- }, initialState);
359
- }
360
- var Presence = (props) => {
361
- const { present, children } = props;
362
- const presence = usePresence(present);
363
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : import_react.Children.only(children);
364
- const ref = useStableComposedRefs(presence.ref, getElementRef(child));
365
- return typeof children === "function" || presence.isPresent ? import_react.cloneElement(child, { ref }) : null;
366
- };
367
- Presence.displayName = "Presence";
368
- function usePresence(present) {
369
- const [node, setNode] = import_react.useState();
370
- const stylesRef = import_react.useRef(null);
371
- const prevPresentRef = import_react.useRef(present);
372
- const prevAnimationNameRef = import_react.useRef("none");
373
- const [state, send] = useStateMachine(present ? "mounted" : "unmounted", {
374
- mounted: {
375
- UNMOUNT: "unmounted",
376
- ANIMATION_OUT: "unmountSuspended"
377
- },
378
- unmountSuspended: {
379
- MOUNT: "mounted",
380
- ANIMATION_END: "unmounted"
381
- },
382
- unmounted: { MOUNT: "mounted" }
383
- });
384
- import_react.useEffect(() => {
385
- const currentAnimationName = getAnimationName(stylesRef.current);
386
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
387
- }, [state]);
388
- useLayoutEffect2(() => {
389
- const styles = stylesRef.current;
390
- const wasPresent = prevPresentRef.current;
391
- if (wasPresent !== present) {
392
- const prevAnimationName = prevAnimationNameRef.current;
393
- const currentAnimationName = getAnimationName(styles);
394
- if (present) send("MOUNT");
395
- else if (currentAnimationName === "none" || styles?.display === "none") send("UNMOUNT");
396
- else if (wasPresent && prevAnimationName !== currentAnimationName) send("ANIMATION_OUT");
397
- else send("UNMOUNT");
398
- prevPresentRef.current = present;
399
- }
400
- }, [present, send]);
401
- useLayoutEffect2(() => {
402
- if (node) {
403
- let timeoutId;
404
- const ownerWindow = node.ownerDocument.defaultView ?? window;
405
- const handleAnimationEnd = (event) => {
406
- const isCurrentAnimation = getAnimationName(stylesRef.current).includes(CSS.escape(event.animationName));
407
- if (event.target === node && isCurrentAnimation) {
408
- send("ANIMATION_END");
409
- if (!prevPresentRef.current) {
410
- const currentFillMode = node.style.animationFillMode;
411
- node.style.animationFillMode = "forwards";
412
- timeoutId = ownerWindow.setTimeout(() => {
413
- if (node.style.animationFillMode === "forwards") node.style.animationFillMode = currentFillMode;
414
- });
415
- }
416
- }
417
- };
418
- const handleAnimationStart = (event) => {
419
- if (event.target === node) prevAnimationNameRef.current = getAnimationName(stylesRef.current);
420
- };
421
- node.addEventListener("animationstart", handleAnimationStart);
422
- node.addEventListener("animationcancel", handleAnimationEnd);
423
- node.addEventListener("animationend", handleAnimationEnd);
424
- return () => {
425
- ownerWindow.clearTimeout(timeoutId);
426
- node.removeEventListener("animationstart", handleAnimationStart);
427
- node.removeEventListener("animationcancel", handleAnimationEnd);
428
- node.removeEventListener("animationend", handleAnimationEnd);
429
- };
430
- } else send("ANIMATION_END");
431
- }, [node, send]);
432
- return {
433
- isPresent: ["mounted", "unmountSuspended"].includes(state),
434
- ref: import_react.useCallback((node2) => {
435
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
436
- setNode(node2);
437
- }, [])
438
- };
439
- }
440
- function setRef(ref, value) {
441
- if (typeof ref === "function") return ref(value);
442
- else if (ref !== null && ref !== void 0) ref.current = value;
443
- }
444
- function useStableComposedRefs(...refs) {
445
- const refsRef = import_react.useRef(refs);
446
- refsRef.current = refs;
447
- return import_react.useCallback((node) => {
448
- const currentRefs = refsRef.current;
449
- let hasCleanup = false;
450
- const cleanups = currentRefs.map((ref) => {
451
- const cleanup = setRef(ref, node);
452
- if (!hasCleanup && typeof cleanup === "function") hasCleanup = true;
453
- return cleanup;
454
- });
455
- if (hasCleanup) return () => {
456
- for (let i = 0; i < cleanups.length; i++) {
457
- const cleanup = cleanups[i];
458
- if (typeof cleanup === "function") cleanup();
459
- else setRef(currentRefs[i], null);
460
- }
461
- };
462
- }, []);
463
- }
464
- function getAnimationName(styles) {
465
- return styles?.animationName || "none";
466
- }
467
- function getElementRef(element) {
468
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
469
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
470
- if (mayWarn) return element.ref;
471
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
472
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
473
- if (mayWarn) return element.props.ref;
474
- return element.props.ref || element.ref;
475
- }
476
- //#endregion
477
- //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.2_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-id/dist/index.mjs
478
- var useReactId = import_react[" useId ".trim().toString()] || (() => void 0);
479
- var count$1 = 0;
480
- function useId(deterministicId) {
481
- const [id, setId] = import_react.useState(useReactId());
482
- useLayoutEffect2(() => {
483
- if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
484
- }, [deterministicId]);
485
- return deterministicId || (id ? `radix-${id}` : "");
486
- }
487
- //#endregion
488
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.2_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
489
- function useCallbackRef$1(callback) {
490
- const callbackRef = import_react.useRef(callback);
491
- import_react.useEffect(() => {
492
- callbackRef.current = callback;
493
- });
494
- return import_react.useMemo(() => ((...args) => callbackRef.current?.(...args)), []);
495
- }
496
- //#endregion
497
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.2_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
498
- function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
499
- const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
500
- import_react.useEffect(() => {
501
- const handleKeyDown = (event) => {
502
- if (event.key === "Escape") onEscapeKeyDown(event);
503
- };
504
- ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
505
- return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
506
- }, [onEscapeKeyDown, ownerDocument]);
507
- }
508
- //#endregion
509
- //#region ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.12_@types+react-dom@19.2.3_@types+react@19.2.15___a1374686edc458660779cbe51e25b015/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
510
- var DISMISSABLE_LAYER_NAME = "DismissableLayer";
511
- var CONTEXT_UPDATE = "dismissableLayer.update";
512
- var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
513
- var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
514
- var originalBodyPointerEvents;
515
- var DismissableLayerContext = import_react.createContext({
516
- layers: /* @__PURE__ */ new Set(),
517
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
518
- branches: /* @__PURE__ */ new Set()
519
- });
520
- var DismissableLayer = import_react.forwardRef((props, forwardedRef) => {
521
- const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
522
- const context = import_react.useContext(DismissableLayerContext);
523
- const [node, setNode] = import_react.useState(null);
524
- const ownerDocument = node?.ownerDocument ?? globalThis?.document;
525
- const [, force] = import_react.useState({});
526
- const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
527
- const layers = Array.from(context.layers);
528
- const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
529
- const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
530
- const index = node ? layers.indexOf(node) : -1;
531
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
532
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
533
- const pointerDownOutside = usePointerDownOutside((event) => {
534
- const target = event.target;
535
- const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
536
- if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
537
- onPointerDownOutside?.(event);
538
- onInteractOutside?.(event);
539
- if (!event.defaultPrevented) onDismiss?.();
540
- }, ownerDocument);
541
- const focusOutside = useFocusOutside((event) => {
542
- const target = event.target;
543
- if ([...context.branches].some((branch) => branch.contains(target))) return;
544
- onFocusOutside?.(event);
545
- onInteractOutside?.(event);
546
- if (!event.defaultPrevented) onDismiss?.();
547
- }, ownerDocument);
548
- useEscapeKeydown((event) => {
549
- if (!(index === context.layers.size - 1)) return;
550
- onEscapeKeyDown?.(event);
551
- if (!event.defaultPrevented && onDismiss) {
552
- event.preventDefault();
553
- onDismiss();
554
- }
555
- }, ownerDocument);
556
- import_react.useEffect(() => {
557
- if (!node) return;
558
- if (disableOutsidePointerEvents) {
559
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
560
- originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
561
- ownerDocument.body.style.pointerEvents = "none";
562
- }
563
- context.layersWithOutsidePointerEventsDisabled.add(node);
564
- }
565
- context.layers.add(node);
566
- dispatchUpdate();
567
- return () => {
568
- if (disableOutsidePointerEvents) {
569
- context.layersWithOutsidePointerEventsDisabled.delete(node);
570
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
571
- }
572
- };
573
- }, [
574
- node,
575
- ownerDocument,
576
- disableOutsidePointerEvents,
577
- context
578
- ]);
579
- import_react.useEffect(() => {
580
- return () => {
581
- if (!node) return;
582
- context.layers.delete(node);
583
- context.layersWithOutsidePointerEventsDisabled.delete(node);
584
- dispatchUpdate();
585
- };
586
- }, [node, context]);
587
- import_react.useEffect(() => {
588
- const handleUpdate = () => force({});
589
- document.addEventListener(CONTEXT_UPDATE, handleUpdate);
590
- return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
591
- }, []);
592
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
593
- ...layerProps,
594
- ref: composedRefs,
595
- style: {
596
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
597
- ...props.style
598
- },
599
- onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
600
- onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
601
- onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
602
- });
603
- });
604
- DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
605
- var BRANCH_NAME = "DismissableLayerBranch";
606
- var DismissableLayerBranch = import_react.forwardRef((props, forwardedRef) => {
607
- const context = import_react.useContext(DismissableLayerContext);
608
- const ref = import_react.useRef(null);
609
- const composedRefs = useComposedRefs(forwardedRef, ref);
610
- import_react.useEffect(() => {
611
- const node = ref.current;
612
- if (node) {
613
- context.branches.add(node);
614
- return () => {
615
- context.branches.delete(node);
616
- };
617
- }
618
- }, [context.branches]);
619
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
620
- ...props,
621
- ref: composedRefs
622
- });
623
- });
624
- DismissableLayerBranch.displayName = BRANCH_NAME;
625
- function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
626
- const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
627
- const isPointerInsideReactTreeRef = import_react.useRef(false);
628
- const handleClickRef = import_react.useRef(() => {});
629
- import_react.useEffect(() => {
630
- const handlePointerDown = (event) => {
631
- if (event.target && !isPointerInsideReactTreeRef.current) {
632
- let handleAndDispatchPointerDownOutsideEvent2 = function() {
633
- handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, { discrete: true });
634
- };
635
- const eventDetail = { originalEvent: event };
636
- if (event.pointerType === "touch") {
637
- ownerDocument.removeEventListener("click", handleClickRef.current);
638
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
639
- ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
640
- } else handleAndDispatchPointerDownOutsideEvent2();
641
- } else ownerDocument.removeEventListener("click", handleClickRef.current);
642
- isPointerInsideReactTreeRef.current = false;
643
- };
644
- const timerId = window.setTimeout(() => {
645
- ownerDocument.addEventListener("pointerdown", handlePointerDown);
646
- }, 0);
647
- return () => {
648
- window.clearTimeout(timerId);
649
- ownerDocument.removeEventListener("pointerdown", handlePointerDown);
650
- ownerDocument.removeEventListener("click", handleClickRef.current);
651
- };
652
- }, [ownerDocument, handlePointerDownOutside]);
653
- return { onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true };
654
- }
655
- function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
656
- const handleFocusOutside = useCallbackRef$1(onFocusOutside);
657
- const isFocusInsideReactTreeRef = import_react.useRef(false);
658
- import_react.useEffect(() => {
659
- const handleFocus = (event) => {
660
- if (event.target && !isFocusInsideReactTreeRef.current) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, { originalEvent: event }, { discrete: false });
661
- };
662
- ownerDocument.addEventListener("focusin", handleFocus);
663
- return () => ownerDocument.removeEventListener("focusin", handleFocus);
664
- }, [ownerDocument, handleFocusOutside]);
665
- return {
666
- onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
667
- onBlurCapture: () => isFocusInsideReactTreeRef.current = false
668
- };
669
- }
670
- function dispatchUpdate() {
671
- const event = new CustomEvent(CONTEXT_UPDATE);
672
- document.dispatchEvent(event);
673
- }
674
- function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
675
- const target = detail.originalEvent.target;
676
- const event = new CustomEvent(name, {
677
- bubbles: false,
678
- cancelable: true,
679
- detail
680
- });
681
- if (handler) target.addEventListener(name, handler, { once: true });
682
- if (discrete) dispatchDiscreteCustomEvent(target, event);
683
- else target.dispatchEvent(event);
684
- }
685
- //#endregion
686
- //#region ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_fd8da5428a73e50a6ee6ad4818c5385e/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
687
- var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
688
- var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
689
- var EVENT_OPTIONS = {
690
- bubbles: false,
691
- cancelable: true
692
- };
693
- var FOCUS_SCOPE_NAME = "FocusScope";
694
- var FocusScope = import_react.forwardRef((props, forwardedRef) => {
695
- const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
696
- const [container, setContainer] = import_react.useState(null);
697
- const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
698
- const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
699
- const lastFocusedElementRef = import_react.useRef(null);
700
- const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
701
- const focusScope = import_react.useRef({
702
- paused: false,
703
- pause() {
704
- this.paused = true;
705
- },
706
- resume() {
707
- this.paused = false;
708
- }
709
- }).current;
710
- import_react.useEffect(() => {
711
- if (trapped) {
712
- let handleFocusIn2 = function(event) {
713
- if (focusScope.paused || !container) return;
714
- const target = event.target;
715
- if (container.contains(target)) lastFocusedElementRef.current = target;
716
- else focus(lastFocusedElementRef.current, { select: true });
717
- }, handleFocusOut2 = function(event) {
718
- if (focusScope.paused || !container) return;
719
- const relatedTarget = event.relatedTarget;
720
- if (relatedTarget === null) return;
721
- if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.current, { select: true });
722
- }, handleMutations2 = function(mutations) {
723
- if (document.activeElement !== document.body) return;
724
- for (const mutation of mutations) if (mutation.removedNodes.length > 0) focus(container);
725
- };
726
- document.addEventListener("focusin", handleFocusIn2);
727
- document.addEventListener("focusout", handleFocusOut2);
728
- const mutationObserver = new MutationObserver(handleMutations2);
729
- if (container) mutationObserver.observe(container, {
730
- childList: true,
731
- subtree: true
732
- });
733
- return () => {
734
- document.removeEventListener("focusin", handleFocusIn2);
735
- document.removeEventListener("focusout", handleFocusOut2);
736
- mutationObserver.disconnect();
737
- };
738
- }
739
- }, [
740
- trapped,
741
- container,
742
- focusScope.paused
743
- ]);
744
- import_react.useEffect(() => {
745
- if (container) {
746
- focusScopesStack.add(focusScope);
747
- const previouslyFocusedElement = document.activeElement;
748
- if (!container.contains(previouslyFocusedElement)) {
749
- const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
750
- container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
751
- container.dispatchEvent(mountEvent);
752
- if (!mountEvent.defaultPrevented) {
753
- focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
754
- if (document.activeElement === previouslyFocusedElement) focus(container);
755
- }
756
- }
757
- return () => {
758
- container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
759
- setTimeout(() => {
760
- const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
761
- container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
762
- container.dispatchEvent(unmountEvent);
763
- if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
764
- container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
765
- focusScopesStack.remove(focusScope);
766
- }, 0);
767
- };
768
- }
769
- }, [
770
- container,
771
- onMountAutoFocus,
772
- onUnmountAutoFocus,
773
- focusScope
774
- ]);
775
- const handleKeyDown = import_react.useCallback((event) => {
776
- if (!loop && !trapped) return;
777
- if (focusScope.paused) return;
778
- const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
779
- const focusedElement = document.activeElement;
780
- if (isTabKey && focusedElement) {
781
- const container2 = event.currentTarget;
782
- const [first, last] = getTabbableEdges(container2);
783
- if (!(first && last)) {
784
- if (focusedElement === container2) event.preventDefault();
785
- } else if (!event.shiftKey && focusedElement === last) {
786
- event.preventDefault();
787
- if (loop) focus(first, { select: true });
788
- } else if (event.shiftKey && focusedElement === first) {
789
- event.preventDefault();
790
- if (loop) focus(last, { select: true });
791
- }
792
- }
793
- }, [
794
- loop,
795
- trapped,
796
- focusScope.paused
797
- ]);
798
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
799
- tabIndex: -1,
800
- ...scopeProps,
801
- ref: composedRefs,
802
- onKeyDown: handleKeyDown
803
- });
804
- });
805
- FocusScope.displayName = FOCUS_SCOPE_NAME;
806
- function focusFirst(candidates, { select = false } = {}) {
807
- const previouslyFocusedElement = document.activeElement;
808
- for (const candidate of candidates) {
809
- focus(candidate, { select });
810
- if (document.activeElement !== previouslyFocusedElement) return;
811
- }
812
- }
813
- function getTabbableEdges(container) {
814
- const candidates = getTabbableCandidates(container);
815
- return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
816
- }
817
- function getTabbableCandidates(container) {
818
- const nodes = [];
819
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
820
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
821
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
822
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
823
- } });
824
- while (walker.nextNode()) nodes.push(walker.currentNode);
825
- return nodes;
826
- }
827
- function findVisible(elements, container) {
828
- for (const element of elements) if (!isHidden(element, { upTo: container })) return element;
829
- }
830
- function isHidden(node, { upTo }) {
831
- if (getComputedStyle(node).visibility === "hidden") return true;
832
- while (node) {
833
- if (upTo !== void 0 && node === upTo) return false;
834
- if (getComputedStyle(node).display === "none") return true;
835
- node = node.parentElement;
836
- }
837
- return false;
838
- }
839
- function isSelectableInput(element) {
840
- return element instanceof HTMLInputElement && "select" in element;
841
- }
842
- function focus(element, { select = false } = {}) {
843
- if (element && element.focus) {
844
- const previouslyFocusedElement = document.activeElement;
845
- element.focus({ preventScroll: true });
846
- if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
847
- }
848
- }
849
- var focusScopesStack = createFocusScopesStack();
850
- function createFocusScopesStack() {
851
- let stack = [];
852
- return {
853
- add(focusScope) {
854
- const activeFocusScope = stack[0];
855
- if (focusScope !== activeFocusScope) activeFocusScope?.pause();
856
- stack = arrayRemove(stack, focusScope);
857
- stack.unshift(focusScope);
858
- },
859
- remove(focusScope) {
860
- stack = arrayRemove(stack, focusScope);
861
- stack[0]?.resume();
862
- }
863
- };
864
- }
865
- function arrayRemove(array, item) {
866
- const updatedArray = [...array];
867
- const index = updatedArray.indexOf(item);
868
- if (index !== -1) updatedArray.splice(index, 1);
869
- return updatedArray;
870
- }
871
- function removeLinks(items) {
872
- return items.filter((item) => item.tagName !== "A");
873
- }
874
- //#endregion
875
- //#region ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.15__@types+reac_b16bb4fb4120c82d112504cf3656dd91/node_modules/@radix-ui/react-portal/dist/index.mjs
876
- var PORTAL_NAME$2 = "Portal";
877
- var Portal$1 = import_react.forwardRef((props, forwardedRef) => {
878
- const { container: containerProp, ...portalProps } = props;
879
- const [mounted, setMounted] = import_react.useState(false);
880
- useLayoutEffect2(() => setMounted(true), []);
881
- const container = containerProp || mounted && globalThis?.document?.body;
882
- return container ? import_react_dom.createPortal(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
883
- ...portalProps,
884
- ref: forwardedRef
885
- }), container) : null;
886
- });
887
- Portal$1.displayName = PORTAL_NAME$2;
888
- //#endregion
889
- //#region ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.4_@types+react@19.2.15_react@19.2.6/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
890
- var count = 0;
891
- var guards = null;
892
- function useFocusGuards() {
893
- import_react.useEffect(() => {
894
- if (!guards) guards = {
895
- start: createFocusGuard(),
896
- end: createFocusGuard()
897
- };
898
- const { start, end } = guards;
899
- if (document.body.firstElementChild !== start) document.body.insertAdjacentElement("afterbegin", start);
900
- if (document.body.lastElementChild !== end) document.body.insertAdjacentElement("beforeend", end);
901
- count++;
902
- return () => {
903
- if (count === 1) {
904
- guards?.start.remove();
905
- guards?.end.remove();
906
- guards = null;
907
- }
908
- count = Math.max(0, count - 1);
909
- };
910
- }, []);
911
- }
912
- function createFocusGuard() {
913
- const element = document.createElement("span");
914
- element.setAttribute("data-radix-focus-guard", "");
915
- element.tabIndex = 0;
916
- element.style.outline = "none";
917
- element.style.opacity = "0";
918
- element.style.position = "fixed";
919
- element.style.pointerEvents = "none";
920
- return element;
921
- }
922
- //#endregion
923
- //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
924
- var zeroRightClassName = "right-scroll-bar-position";
925
- var fullWidthClassName = "width-before-scroll-bar";
926
- var noScrollbarsClassName = "with-scroll-bars-hidden";
927
- /**
928
- * Name of a CSS variable containing the amount of "hidden" scrollbar
929
- * ! might be undefined ! use will fallback!
930
- */
931
- var removedBarSizeVariable = "--removed-body-scroll-bar-size";
932
- //#endregion
933
- //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.15_react@19.2.6/node_modules/use-callback-ref/dist/es2015/assignRef.js
934
- /**
935
- * Assigns a value for a given ref, no matter of the ref format
936
- * @param {RefObject} ref - a callback function or ref object
937
- * @param value - a new value
938
- *
939
- * @see https://github.com/theKashey/use-callback-ref#assignref
940
- * @example
941
- * const refObject = useRef();
942
- * const refFn = (ref) => {....}
943
- *
944
- * assignRef(refObject, "refValue");
945
- * assignRef(refFn, "refValue");
946
- */
947
- function assignRef(ref, value) {
948
- if (typeof ref === "function") ref(value);
949
- else if (ref) ref.current = value;
950
- return ref;
951
- }
952
- //#endregion
953
- //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.15_react@19.2.6/node_modules/use-callback-ref/dist/es2015/useRef.js
954
- /**
955
- * creates a MutableRef with ref change callback
956
- * @param initialValue - initial ref value
957
- * @param {Function} callback - a callback to run when value changes
958
- *
959
- * @example
960
- * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
961
- * ref.current = 1;
962
- * // prints 0 -> 1
963
- *
964
- * @see https://reactjs.org/docs/hooks-reference.html#useref
965
- * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
966
- * @returns {MutableRefObject}
967
- */
968
- function useCallbackRef(initialValue, callback) {
969
- var ref = (0, import_react.useState)(function() {
970
- return {
971
- value: initialValue,
972
- callback,
973
- facade: {
974
- get current() {
975
- return ref.value;
976
- },
977
- set current(value) {
978
- var last = ref.value;
979
- if (last !== value) {
980
- ref.value = value;
981
- ref.callback(value, last);
982
- }
983
- }
984
- }
985
- };
986
- })[0];
987
- ref.callback = callback;
988
- return ref.facade;
989
- }
990
- //#endregion
991
- //#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.15_react@19.2.6/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
992
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
993
- var currentValues = /* @__PURE__ */ new WeakMap();
994
- /**
995
- * Merges two or more refs together providing a single interface to set their value
996
- * @param {RefObject|Ref} refs
997
- * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
998
- *
999
- * @see {@link mergeRefs} a version without buit-in memoization
1000
- * @see https://github.com/theKashey/use-callback-ref#usemergerefs
1001
- * @example
1002
- * const Component = React.forwardRef((props, ref) => {
1003
- * const ownRef = useRef();
1004
- * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
1005
- * return <div ref={domRef}>...</div>
1006
- * }
1007
- */
1008
- function useMergeRefs(refs, defaultValue) {
1009
- var callbackRef = useCallbackRef(defaultValue || null, function(newValue) {
1010
- return refs.forEach(function(ref) {
1011
- return assignRef(ref, newValue);
1012
- });
1013
- });
1014
- useIsomorphicLayoutEffect(function() {
1015
- var oldValue = currentValues.get(callbackRef);
1016
- if (oldValue) {
1017
- var prevRefs_1 = new Set(oldValue);
1018
- var nextRefs_1 = new Set(refs);
1019
- var current_1 = callbackRef.current;
1020
- prevRefs_1.forEach(function(ref) {
1021
- if (!nextRefs_1.has(ref)) assignRef(ref, null);
1022
- });
1023
- nextRefs_1.forEach(function(ref) {
1024
- if (!prevRefs_1.has(ref)) assignRef(ref, current_1);
1025
- });
1026
- }
1027
- currentValues.set(callbackRef, refs);
1028
- }, [refs]);
1029
- return callbackRef;
1030
- }
1031
- //#endregion
1032
- //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.15_react@19.2.6/node_modules/use-sidecar/dist/es2015/medium.js
1033
- function ItoI(a) {
1034
- return a;
1035
- }
1036
- function innerCreateMedium(defaults, middleware) {
1037
- if (middleware === void 0) middleware = ItoI;
1038
- var buffer = [];
1039
- var assigned = false;
1040
- return {
1041
- read: function() {
1042
- if (assigned) throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1043
- if (buffer.length) return buffer[buffer.length - 1];
1044
- return defaults;
1045
- },
1046
- useMedium: function(data) {
1047
- var item = middleware(data, assigned);
1048
- buffer.push(item);
1049
- return function() {
1050
- buffer = buffer.filter(function(x) {
1051
- return x !== item;
1052
- });
1053
- };
1054
- },
1055
- assignSyncMedium: function(cb) {
1056
- assigned = true;
1057
- while (buffer.length) {
1058
- var cbs = buffer;
1059
- buffer = [];
1060
- cbs.forEach(cb);
1061
- }
1062
- buffer = {
1063
- push: function(x) {
1064
- return cb(x);
1065
- },
1066
- filter: function() {
1067
- return buffer;
1068
- }
1069
- };
1070
- },
1071
- assignMedium: function(cb) {
1072
- assigned = true;
1073
- var pendingQueue = [];
1074
- if (buffer.length) {
1075
- var cbs = buffer;
1076
- buffer = [];
1077
- cbs.forEach(cb);
1078
- pendingQueue = buffer;
1079
- }
1080
- var executeQueue = function() {
1081
- var cbs = pendingQueue;
1082
- pendingQueue = [];
1083
- cbs.forEach(cb);
1084
- };
1085
- var cycle = function() {
1086
- return Promise.resolve().then(executeQueue);
1087
- };
1088
- cycle();
1089
- buffer = {
1090
- push: function(x) {
1091
- pendingQueue.push(x);
1092
- cycle();
1093
- },
1094
- filter: function(filter) {
1095
- pendingQueue = pendingQueue.filter(filter);
1096
- return buffer;
1097
- }
1098
- };
1099
- }
1100
- };
1101
- }
1102
- function createSidecarMedium(options) {
1103
- if (options === void 0) options = {};
1104
- var medium = innerCreateMedium(null);
1105
- medium.options = __assign({
1106
- async: true,
1107
- ssr: false
1108
- }, options);
1109
- return medium;
1110
- }
1111
- //#endregion
1112
- //#region ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.15_react@19.2.6/node_modules/use-sidecar/dist/es2015/exports.js
1113
- var SideCar = function(_a) {
1114
- var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1115
- if (!sideCar) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1116
- var Target = sideCar.read();
1117
- if (!Target) throw new Error("Sidecar medium not found");
1118
- return import_react.createElement(Target, __assign({}, rest));
1119
- };
1120
- SideCar.isSideCarExport = true;
1121
- function exportSidecar(medium, exported) {
1122
- medium.useMedium(exported);
1123
- return SideCar;
1124
- }
1125
- //#endregion
1126
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/medium.js
1127
- var effectCar = createSidecarMedium();
1128
- //#endregion
1129
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/UI.js
1130
- var nothing = function() {};
1131
- /**
1132
- * Removes scrollbar from the page and contain the scroll within the Lock
1133
- */
1134
- var RemoveScroll = import_react.forwardRef(function(props, parentRef) {
1135
- var ref = import_react.useRef(null);
1136
- var _a = import_react.useState({
1137
- onScrollCapture: nothing,
1138
- onWheelCapture: nothing,
1139
- onTouchMoveCapture: nothing
1140
- }), callbacks = _a[0], setCallbacks = _a[1];
1141
- var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, [
1142
- "forwardProps",
1143
- "children",
1144
- "className",
1145
- "removeScrollBar",
1146
- "enabled",
1147
- "shards",
1148
- "sideCar",
1149
- "noRelative",
1150
- "noIsolation",
1151
- "inert",
1152
- "allowPinchZoom",
1153
- "as",
1154
- "gapMode"
1155
- ]);
1156
- var SideCar = sideCar;
1157
- var containerRef = useMergeRefs([ref, parentRef]);
1158
- var containerProps = __assign(__assign({}, rest), callbacks);
1159
- return import_react.createElement(import_react.Fragment, null, enabled && import_react.createElement(SideCar, {
1160
- sideCar: effectCar,
1161
- removeScrollBar,
1162
- shards,
1163
- noRelative,
1164
- noIsolation,
1165
- inert,
1166
- setCallbacks,
1167
- allowPinchZoom: !!allowPinchZoom,
1168
- lockRef: ref,
1169
- gapMode
1170
- }), forwardProps ? import_react.cloneElement(import_react.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : import_react.createElement(Container, __assign({}, containerProps, {
1171
- className,
1172
- ref: containerRef
1173
- }), children));
1174
- });
1175
- RemoveScroll.defaultProps = {
1176
- enabled: true,
1177
- removeScrollBar: true,
1178
- inert: false
1179
- };
1180
- RemoveScroll.classNames = {
1181
- fullWidth: fullWidthClassName,
1182
- zeroRight: zeroRightClassName
1183
- };
1184
- //#endregion
1185
- //#region ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
1186
- var currentNonce;
1187
- var getNonce = function() {
1188
- if (currentNonce) return currentNonce;
1189
- if (typeof __webpack_nonce__ !== "undefined") return __webpack_nonce__;
1190
- };
1191
- //#endregion
1192
- //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.15_react@19.2.6/node_modules/react-style-singleton/dist/es2015/singleton.js
1193
- function makeStyleTag() {
1194
- if (!document) return null;
1195
- var tag = document.createElement("style");
1196
- tag.type = "text/css";
1197
- var nonce = getNonce();
1198
- if (nonce) tag.setAttribute("nonce", nonce);
1199
- return tag;
1200
- }
1201
- function injectStyles(tag, css) {
1202
- if (tag.styleSheet) tag.styleSheet.cssText = css;
1203
- else tag.appendChild(document.createTextNode(css));
1204
- }
1205
- function insertStyleTag(tag) {
1206
- (document.head || document.getElementsByTagName("head")[0]).appendChild(tag);
1207
- }
1208
- var stylesheetSingleton = function() {
1209
- var counter = 0;
1210
- var stylesheet = null;
1211
- return {
1212
- add: function(style) {
1213
- if (counter == 0) {
1214
- if (stylesheet = makeStyleTag()) {
1215
- injectStyles(stylesheet, style);
1216
- insertStyleTag(stylesheet);
1217
- }
1218
- }
1219
- counter++;
1220
- },
1221
- remove: function() {
1222
- counter--;
1223
- if (!counter && stylesheet) {
1224
- stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1225
- stylesheet = null;
1226
- }
1227
- }
1228
- };
1229
- };
1230
- //#endregion
1231
- //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.15_react@19.2.6/node_modules/react-style-singleton/dist/es2015/hook.js
1232
- /**
1233
- * creates a hook to control style singleton
1234
- * @see {@link styleSingleton} for a safer component version
1235
- * @example
1236
- * ```tsx
1237
- * const useStyle = styleHookSingleton();
1238
- * ///
1239
- * useStyle('body { overflow: hidden}');
1240
- */
1241
- var styleHookSingleton = function() {
1242
- var sheet = stylesheetSingleton();
1243
- return function(styles, isDynamic) {
1244
- import_react.useEffect(function() {
1245
- sheet.add(styles);
1246
- return function() {
1247
- sheet.remove();
1248
- };
1249
- }, [styles && isDynamic]);
1250
- };
1251
- };
1252
- //#endregion
1253
- //#region ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.15_react@19.2.6/node_modules/react-style-singleton/dist/es2015/component.js
1254
- /**
1255
- * create a Component to add styles on demand
1256
- * - styles are added when first instance is mounted
1257
- * - styles are removed when the last instance is unmounted
1258
- * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
1259
- */
1260
- var styleSingleton = function() {
1261
- var useStyle = styleHookSingleton();
1262
- var Sheet = function(_a) {
1263
- var styles = _a.styles, dynamic = _a.dynamic;
1264
- useStyle(styles, dynamic);
1265
- return null;
1266
- };
1267
- return Sheet;
1268
- };
1269
- //#endregion
1270
- //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1271
- var zeroGap = {
1272
- left: 0,
1273
- top: 0,
1274
- right: 0,
1275
- gap: 0
1276
- };
1277
- var parse = function(x) {
1278
- return parseInt(x || "", 10) || 0;
1279
- };
1280
- var getOffset = function(gapMode) {
1281
- var cs = window.getComputedStyle(document.body);
1282
- var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1283
- var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1284
- var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1285
- return [
1286
- parse(left),
1287
- parse(top),
1288
- parse(right)
1289
- ];
1290
- };
1291
- var getGapWidth = function(gapMode) {
1292
- if (gapMode === void 0) gapMode = "margin";
1293
- if (typeof window === "undefined") return zeroGap;
1294
- var offsets = getOffset(gapMode);
1295
- var documentWidth = document.documentElement.clientWidth;
1296
- var windowWidth = window.innerWidth;
1297
- return {
1298
- left: offsets[0],
1299
- top: offsets[1],
1300
- right: offsets[2],
1301
- gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1302
- };
1303
- };
1304
- //#endregion
1305
- //#region ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es2015/component.js
1306
- var Style = styleSingleton();
1307
- var lockAttribute = "data-scroll-locked";
1308
- var getStyles = function(_a, allowRelative, gapMode, important) {
1309
- var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1310
- if (gapMode === void 0) gapMode = "margin";
1311
- return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1312
- allowRelative && "position: relative ".concat(important, ";"),
1313
- gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1314
- gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1315
- ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1316
- };
1317
- var getCurrentUseCounter = function() {
1318
- var counter = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
1319
- return isFinite(counter) ? counter : 0;
1320
- };
1321
- var useLockAttribute = function() {
1322
- import_react.useEffect(function() {
1323
- document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1324
- return function() {
1325
- var newCounter = getCurrentUseCounter() - 1;
1326
- if (newCounter <= 0) document.body.removeAttribute(lockAttribute);
1327
- else document.body.setAttribute(lockAttribute, newCounter.toString());
1328
- };
1329
- }, []);
1330
- };
1331
- /**
1332
- * Removes page scrollbar and blocks page scroll when mounted
1333
- */
1334
- var RemoveScrollBar = function(_a) {
1335
- var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1336
- useLockAttribute();
1337
- var gap = import_react.useMemo(function() {
1338
- return getGapWidth(gapMode);
1339
- }, [gapMode]);
1340
- return import_react.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1341
- };
1342
- //#endregion
1343
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1344
- var passiveSupported = false;
1345
- if (typeof window !== "undefined") try {
1346
- var options = Object.defineProperty({}, "passive", { get: function() {
1347
- passiveSupported = true;
1348
- return true;
1349
- } });
1350
- window.addEventListener("test", options, options);
1351
- window.removeEventListener("test", options, options);
1352
- } catch (err) {
1353
- passiveSupported = false;
1354
- }
1355
- var nonPassive = passiveSupported ? { passive: false } : false;
1356
- //#endregion
1357
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1358
- var alwaysContainsScroll = function(node) {
1359
- return node.tagName === "TEXTAREA";
1360
- };
1361
- var elementCanBeScrolled = function(node, overflow) {
1362
- if (!(node instanceof Element)) return false;
1363
- var styles = window.getComputedStyle(node);
1364
- return styles[overflow] !== "hidden" && !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible");
1365
- };
1366
- var elementCouldBeVScrolled = function(node) {
1367
- return elementCanBeScrolled(node, "overflowY");
1368
- };
1369
- var elementCouldBeHScrolled = function(node) {
1370
- return elementCanBeScrolled(node, "overflowX");
1371
- };
1372
- var locationCouldBeScrolled = function(axis, node) {
1373
- var ownerDocument = node.ownerDocument;
1374
- var current = node;
1375
- do {
1376
- if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) current = current.host;
1377
- if (elementCouldBeScrolled(axis, current)) {
1378
- var _a = getScrollVariables(axis, current);
1379
- if (_a[1] > _a[2]) return true;
1380
- }
1381
- current = current.parentNode;
1382
- } while (current && current !== ownerDocument.body);
1383
- return false;
1384
- };
1385
- var getVScrollVariables = function(_a) {
1386
- return [
1387
- _a.scrollTop,
1388
- _a.scrollHeight,
1389
- _a.clientHeight
1390
- ];
1391
- };
1392
- var getHScrollVariables = function(_a) {
1393
- return [
1394
- _a.scrollLeft,
1395
- _a.scrollWidth,
1396
- _a.clientWidth
1397
- ];
1398
- };
1399
- var elementCouldBeScrolled = function(axis, node) {
1400
- return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1401
- };
1402
- var getScrollVariables = function(axis, node) {
1403
- return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1404
- };
1405
- var getDirectionFactor = function(axis, direction) {
1406
- /**
1407
- * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
1408
- * and then increasingly negative as you scroll towards the end of the content.
1409
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
1410
- */
1411
- return axis === "h" && direction === "rtl" ? -1 : 1;
1412
- };
1413
- var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1414
- var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1415
- var delta = directionFactor * sourceDelta;
1416
- var target = event.target;
1417
- var targetInLock = endTarget.contains(target);
1418
- var shouldCancelScroll = false;
1419
- var isDeltaPositive = delta > 0;
1420
- var availableScroll = 0;
1421
- var availableScrollTop = 0;
1422
- do {
1423
- if (!target) break;
1424
- var _a = getScrollVariables(axis, target), position = _a[0];
1425
- var elementScroll = _a[1] - _a[2] - directionFactor * position;
1426
- if (position || elementScroll) {
1427
- if (elementCouldBeScrolled(axis, target)) {
1428
- availableScroll += elementScroll;
1429
- availableScrollTop += position;
1430
- }
1431
- }
1432
- var parent_1 = target.parentNode;
1433
- target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
1434
- } while (!targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
1435
- if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) shouldCancelScroll = true;
1436
- else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) shouldCancelScroll = true;
1437
- return shouldCancelScroll;
1438
- };
1439
- //#endregion
1440
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1441
- var getTouchXY = function(event) {
1442
- return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1443
- };
1444
- var getDeltaXY = function(event) {
1445
- return [event.deltaX, event.deltaY];
1446
- };
1447
- var extractRef = function(ref) {
1448
- return ref && "current" in ref ? ref.current : ref;
1449
- };
1450
- var deltaCompare = function(x, y) {
1451
- return x[0] === y[0] && x[1] === y[1];
1452
- };
1453
- var generateStyle = function(id) {
1454
- return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1455
- };
1456
- var idCounter = 0;
1457
- var lockStack = [];
1458
- function RemoveScrollSideCar(props) {
1459
- var shouldPreventQueue = import_react.useRef([]);
1460
- var touchStartRef = import_react.useRef([0, 0]);
1461
- var activeAxis = import_react.useRef();
1462
- var id = import_react.useState(idCounter++)[0];
1463
- var Style = import_react.useState(styleSingleton)[0];
1464
- var lastProps = import_react.useRef(props);
1465
- import_react.useEffect(function() {
1466
- lastProps.current = props;
1467
- }, [props]);
1468
- import_react.useEffect(function() {
1469
- if (props.inert) {
1470
- document.body.classList.add("block-interactivity-".concat(id));
1471
- var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1472
- allow_1.forEach(function(el) {
1473
- return el.classList.add("allow-interactivity-".concat(id));
1474
- });
1475
- return function() {
1476
- document.body.classList.remove("block-interactivity-".concat(id));
1477
- allow_1.forEach(function(el) {
1478
- return el.classList.remove("allow-interactivity-".concat(id));
1479
- });
1480
- };
1481
- }
1482
- }, [
1483
- props.inert,
1484
- props.lockRef.current,
1485
- props.shards
1486
- ]);
1487
- var shouldCancelEvent = import_react.useCallback(function(event, parent) {
1488
- if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
1489
- var touch = getTouchXY(event);
1490
- var touchStart = touchStartRef.current;
1491
- var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1492
- var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1493
- var currentAxis;
1494
- var target = event.target;
1495
- var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1496
- if ("touches" in event && moveDirection === "h" && target.type === "range") return false;
1497
- var selection = window.getSelection();
1498
- var anchorNode = selection && selection.anchorNode;
1499
- if (anchorNode ? anchorNode === target || anchorNode.contains(target) : false) return false;
1500
- var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1501
- if (!canBeScrolledInMainDirection) return true;
1502
- if (canBeScrolledInMainDirection) currentAxis = moveDirection;
1503
- else {
1504
- currentAxis = moveDirection === "v" ? "h" : "v";
1505
- canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1506
- }
1507
- if (!canBeScrolledInMainDirection) return false;
1508
- if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) activeAxis.current = currentAxis;
1509
- if (!currentAxis) return true;
1510
- var cancelingAxis = activeAxis.current || currentAxis;
1511
- return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1512
- }, []);
1513
- var shouldPrevent = import_react.useCallback(function(_event) {
1514
- var event = _event;
1515
- if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) return;
1516
- var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1517
- var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1518
- return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1519
- })[0];
1520
- if (sourceEvent && sourceEvent.should) {
1521
- if (event.cancelable) event.preventDefault();
1522
- return;
1523
- }
1524
- if (!sourceEvent) {
1525
- var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1526
- return node.contains(event.target);
1527
- });
1528
- if (shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation) {
1529
- if (event.cancelable) event.preventDefault();
1530
- }
1531
- }
1532
- }, []);
1533
- var shouldCancel = import_react.useCallback(function(name, delta, target, should) {
1534
- var event = {
1535
- name,
1536
- delta,
1537
- target,
1538
- should,
1539
- shadowParent: getOutermostShadowParent(target)
1540
- };
1541
- shouldPreventQueue.current.push(event);
1542
- setTimeout(function() {
1543
- shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1544
- return e !== event;
1545
- });
1546
- }, 1);
1547
- }, []);
1548
- var scrollTouchStart = import_react.useCallback(function(event) {
1549
- touchStartRef.current = getTouchXY(event);
1550
- activeAxis.current = void 0;
1551
- }, []);
1552
- var scrollWheel = import_react.useCallback(function(event) {
1553
- shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1554
- }, []);
1555
- var scrollTouchMove = import_react.useCallback(function(event) {
1556
- shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1557
- }, []);
1558
- import_react.useEffect(function() {
1559
- lockStack.push(Style);
1560
- props.setCallbacks({
1561
- onScrollCapture: scrollWheel,
1562
- onWheelCapture: scrollWheel,
1563
- onTouchMoveCapture: scrollTouchMove
1564
- });
1565
- document.addEventListener("wheel", shouldPrevent, nonPassive);
1566
- document.addEventListener("touchmove", shouldPrevent, nonPassive);
1567
- document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1568
- return function() {
1569
- lockStack = lockStack.filter(function(inst) {
1570
- return inst !== Style;
1571
- });
1572
- document.removeEventListener("wheel", shouldPrevent, nonPassive);
1573
- document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1574
- document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1575
- };
1576
- }, []);
1577
- var removeScrollBar = props.removeScrollBar, inert = props.inert;
1578
- return import_react.createElement(import_react.Fragment, null, inert ? import_react.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? import_react.createElement(RemoveScrollBar, {
1579
- noRelative: props.noRelative,
1580
- gapMode: props.gapMode
1581
- }) : null);
1582
- }
1583
- function getOutermostShadowParent(node) {
1584
- var shadowParent = null;
1585
- while (node !== null) {
1586
- if (node instanceof ShadowRoot) {
1587
- shadowParent = node.host;
1588
- node = node.host;
1589
- }
1590
- node = node.parentNode;
1591
- }
1592
- return shadowParent;
1593
- }
1594
- //#endregion
1595
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/sidecar.js
1596
- var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1597
- //#endregion
1598
- //#region ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.15_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/Combination.js
1599
- var ReactRemoveScroll = import_react.forwardRef(function(props, ref) {
1600
- return import_react.createElement(RemoveScroll, __assign({}, props, {
1601
- ref,
1602
- sideCar: sidecar_default
1603
- }));
1604
- });
1605
- ReactRemoveScroll.classNames = RemoveScroll.classNames;
1606
- //#endregion
1607
- //#region ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
1608
- var getDefaultParent = function(originalTarget) {
1609
- if (typeof document === "undefined") return null;
1610
- return (Array.isArray(originalTarget) ? originalTarget[0] : originalTarget).ownerDocument.body;
1611
- };
1612
- var counterMap = /* @__PURE__ */ new WeakMap();
1613
- var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1614
- var markerMap = {};
1615
- var lockCount = 0;
1616
- var unwrapHost = function(node) {
1617
- return node && (node.host || unwrapHost(node.parentNode));
1618
- };
1619
- var correctTargets = function(parent, targets) {
1620
- return targets.map(function(target) {
1621
- if (parent.contains(target)) return target;
1622
- var correctedTarget = unwrapHost(target);
1623
- if (correctedTarget && parent.contains(correctedTarget)) return correctedTarget;
1624
- console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1625
- return null;
1626
- }).filter(function(x) {
1627
- return Boolean(x);
1628
- });
1629
- };
1630
- /**
1631
- * Marks everything except given node(or nodes) as aria-hidden
1632
- * @param {Element | Element[]} originalTarget - elements to keep on the page
1633
- * @param [parentNode] - top element, defaults to document.body
1634
- * @param {String} [markerName] - a special attribute to mark every node
1635
- * @param {String} [controlAttribute] - html Attribute to control
1636
- * @return {Undo} undo command
1637
- */
1638
- var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1639
- var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1640
- if (!markerMap[markerName]) markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1641
- var markerCounter = markerMap[markerName];
1642
- var hiddenNodes = [];
1643
- var elementsToKeep = /* @__PURE__ */ new Set();
1644
- var elementsToStop = new Set(targets);
1645
- var keep = function(el) {
1646
- if (!el || elementsToKeep.has(el)) return;
1647
- elementsToKeep.add(el);
1648
- keep(el.parentNode);
1649
- };
1650
- targets.forEach(keep);
1651
- var deep = function(parent) {
1652
- if (!parent || elementsToStop.has(parent)) return;
1653
- Array.prototype.forEach.call(parent.children, function(node) {
1654
- if (elementsToKeep.has(node)) deep(node);
1655
- else try {
1656
- var attr = node.getAttribute(controlAttribute);
1657
- var alreadyHidden = attr !== null && attr !== "false";
1658
- var counterValue = (counterMap.get(node) || 0) + 1;
1659
- var markerValue = (markerCounter.get(node) || 0) + 1;
1660
- counterMap.set(node, counterValue);
1661
- markerCounter.set(node, markerValue);
1662
- hiddenNodes.push(node);
1663
- if (counterValue === 1 && alreadyHidden) uncontrolledNodes.set(node, true);
1664
- if (markerValue === 1) node.setAttribute(markerName, "true");
1665
- if (!alreadyHidden) node.setAttribute(controlAttribute, "true");
1666
- } catch (e) {
1667
- console.error("aria-hidden: cannot operate on ", node, e);
1668
- }
1669
- });
1670
- };
1671
- deep(parentNode);
1672
- elementsToKeep.clear();
1673
- lockCount++;
1674
- return function() {
1675
- hiddenNodes.forEach(function(node) {
1676
- var counterValue = counterMap.get(node) - 1;
1677
- var markerValue = markerCounter.get(node) - 1;
1678
- counterMap.set(node, counterValue);
1679
- markerCounter.set(node, markerValue);
1680
- if (!counterValue) {
1681
- if (!uncontrolledNodes.has(node)) node.removeAttribute(controlAttribute);
1682
- uncontrolledNodes.delete(node);
1683
- }
1684
- if (!markerValue) node.removeAttribute(markerName);
1685
- });
1686
- lockCount--;
1687
- if (!lockCount) {
1688
- counterMap = /* @__PURE__ */ new WeakMap();
1689
- counterMap = /* @__PURE__ */ new WeakMap();
1690
- uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1691
- markerMap = {};
1692
- }
1693
- };
1694
- };
1695
- /**
1696
- * Marks everything except given node(or nodes) as aria-hidden
1697
- * @param {Element | Element[]} originalTarget - elements to keep on the page
1698
- * @param [parentNode] - top element, defaults to document.body
1699
- * @param {String} [markerName] - a special attribute to mark every node
1700
- * @return {Undo} undo command
1701
- */
1702
- var hideOthers = function(originalTarget, parentNode, markerName) {
1703
- if (markerName === void 0) markerName = "data-aria-hidden";
1704
- var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1705
- var activeParentNode = parentNode || getDefaultParent(originalTarget);
1706
- if (!activeParentNode) return function() {
1707
- return null;
1708
- };
1709
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
1710
- return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1711
- };
1712
- //#endregion
1713
- //#region ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.16_@types+react-dom@19.2.3_@types+react@19.2.15__@types+reac_34fd6e824a6a32b078e40947d19e57a0/node_modules/@radix-ui/react-dialog/dist/index.mjs
1714
- var DIALOG_NAME = "Dialog";
1715
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
1716
- var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
1717
- var Dialog = (props) => {
1718
- const { __scopeDialog, children, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
1719
- const triggerRef = import_react.useRef(null);
1720
- const contentRef = import_react.useRef(null);
1721
- const [open, setOpen] = useControllableState({
1722
- prop: openProp,
1723
- defaultProp: defaultOpen ?? false,
1724
- onChange: onOpenChange,
1725
- caller: DIALOG_NAME
1726
- });
1727
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {
1728
- scope: __scopeDialog,
1729
- triggerRef,
1730
- contentRef,
1731
- contentId: useId(),
1732
- titleId: useId(),
1733
- descriptionId: useId(),
1734
- open,
1735
- onOpenChange: setOpen,
1736
- onOpenToggle: import_react.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1737
- modal,
1738
- children
1739
- });
1740
- };
1741
- Dialog.displayName = DIALOG_NAME;
1742
- var TRIGGER_NAME$1 = "DialogTrigger";
1743
- var DialogTrigger = import_react.forwardRef((props, forwardedRef) => {
1744
- const { __scopeDialog, ...triggerProps } = props;
1745
- const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
1746
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
1747
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.button, {
1748
- type: "button",
1749
- "aria-haspopup": "dialog",
1750
- "aria-expanded": context.open,
1751
- "aria-controls": context.open ? context.contentId : void 0,
1752
- "data-state": getState(context.open),
1753
- ...triggerProps,
1754
- ref: composedTriggerRef,
1755
- onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
1756
- });
1757
- });
1758
- DialogTrigger.displayName = TRIGGER_NAME$1;
1759
- var PORTAL_NAME$1 = "DialogPortal";
1760
- var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME$1, { forceMount: void 0 });
1761
- var DialogPortal = (props) => {
1762
- const { __scopeDialog, forceMount, children, container } = props;
1763
- const context = useDialogContext(PORTAL_NAME$1, __scopeDialog);
1764
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, {
1765
- scope: __scopeDialog,
1766
- forceMount,
1767
- children: import_react.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1768
- present: forceMount || context.open,
1769
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Portal$1, {
1770
- asChild: true,
1771
- container,
1772
- children: child
1773
- })
1774
- }))
1775
- });
1776
- };
1777
- DialogPortal.displayName = PORTAL_NAME$1;
1778
- var OVERLAY_NAME$1 = "DialogOverlay";
1779
- var DialogOverlay = import_react.forwardRef((props, forwardedRef) => {
1780
- const portalContext = usePortalContext(OVERLAY_NAME$1, props.__scopeDialog);
1781
- const { forceMount = portalContext.forceMount, ...overlayProps } = props;
1782
- const context = useDialogContext(OVERLAY_NAME$1, props.__scopeDialog);
1783
- return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1784
- present: forceMount || context.open,
1785
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayImpl, {
1786
- ...overlayProps,
1787
- ref: forwardedRef
1788
- })
1789
- }) : null;
1790
- });
1791
- DialogOverlay.displayName = OVERLAY_NAME$1;
1792
- var Slot = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll");
1793
- var DialogOverlayImpl = import_react.forwardRef((props, forwardedRef) => {
1794
- const { __scopeDialog, ...overlayProps } = props;
1795
- const context = useDialogContext(OVERLAY_NAME$1, __scopeDialog);
1796
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReactRemoveScroll, {
1797
- as: Slot,
1798
- allowPinchZoom: true,
1799
- shards: [context.contentRef],
1800
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
1801
- "data-state": getState(context.open),
1802
- ...overlayProps,
1803
- ref: forwardedRef,
1804
- style: {
1805
- pointerEvents: "auto",
1806
- ...overlayProps.style
1807
- }
1808
- })
1809
- });
1810
- });
1811
- var CONTENT_NAME$1 = "DialogContent";
1812
- var DialogContent = import_react.forwardRef((props, forwardedRef) => {
1813
- const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeDialog);
1814
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
1815
- const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1816
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Presence, {
1817
- present: forceMount || context.open,
1818
- children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {
1819
- ...contentProps,
1820
- ref: forwardedRef
1821
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {
1822
- ...contentProps,
1823
- ref: forwardedRef
1824
- })
1825
- });
1826
- });
1827
- DialogContent.displayName = CONTENT_NAME$1;
1828
- var DialogContentModal = import_react.forwardRef((props, forwardedRef) => {
1829
- const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1830
- const contentRef = import_react.useRef(null);
1831
- const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
1832
- import_react.useEffect(() => {
1833
- const content = contentRef.current;
1834
- if (content) return hideOthers(content);
1835
- }, []);
1836
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {
1837
- ...props,
1838
- ref: composedRefs,
1839
- trapFocus: context.open,
1840
- disableOutsidePointerEvents: context.open,
1841
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
1842
- event.preventDefault();
1843
- context.triggerRef.current?.focus();
1844
- }),
1845
- onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
1846
- const originalEvent = event.detail.originalEvent;
1847
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
1848
- if (originalEvent.button === 2 || ctrlLeftClick) event.preventDefault();
1849
- }),
1850
- onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault())
1851
- });
1852
- });
1853
- var DialogContentNonModal = import_react.forwardRef((props, forwardedRef) => {
1854
- const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
1855
- const hasInteractedOutsideRef = import_react.useRef(false);
1856
- const hasPointerDownOutsideRef = import_react.useRef(false);
1857
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {
1858
- ...props,
1859
- ref: forwardedRef,
1860
- trapFocus: false,
1861
- disableOutsidePointerEvents: false,
1862
- onCloseAutoFocus: (event) => {
1863
- props.onCloseAutoFocus?.(event);
1864
- if (!event.defaultPrevented) {
1865
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
1866
- event.preventDefault();
1867
- }
1868
- hasInteractedOutsideRef.current = false;
1869
- hasPointerDownOutsideRef.current = false;
1870
- },
1871
- onInteractOutside: (event) => {
1872
- props.onInteractOutside?.(event);
1873
- if (!event.defaultPrevented) {
1874
- hasInteractedOutsideRef.current = true;
1875
- if (event.detail.originalEvent.type === "pointerdown") hasPointerDownOutsideRef.current = true;
1876
- }
1877
- const target = event.target;
1878
- if (context.triggerRef.current?.contains(target)) event.preventDefault();
1879
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) event.preventDefault();
1880
- }
1881
- });
1882
- });
1883
- var DialogContentImpl = import_react.forwardRef((props, forwardedRef) => {
1884
- const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
1885
- const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
1886
- const contentRef = import_react.useRef(null);
1887
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
1888
- useFocusGuards();
1889
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusScope, {
1890
- asChild: true,
1891
- loop: true,
1892
- trapped: trapFocus,
1893
- onMountAutoFocus: onOpenAutoFocus,
1894
- onUnmountAutoFocus: onCloseAutoFocus,
1895
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DismissableLayer, {
1896
- role: "dialog",
1897
- id: context.contentId,
1898
- "aria-describedby": context.descriptionId,
1899
- "aria-labelledby": context.titleId,
1900
- "data-state": getState(context.open),
1901
- ...contentProps,
1902
- ref: composedRefs,
1903
- onDismiss: () => context.onOpenChange(false)
1904
- })
1905
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning$1, {
1906
- contentRef,
1907
- descriptionId: context.descriptionId
1908
- })] })] });
1909
- });
1910
- var TITLE_NAME$1 = "DialogTitle";
1911
- var DialogTitle = import_react.forwardRef((props, forwardedRef) => {
1912
- const { __scopeDialog, ...titleProps } = props;
1913
- const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
1914
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.h2, {
1915
- id: context.titleId,
1916
- ...titleProps,
1917
- ref: forwardedRef
1918
- });
1919
- });
1920
- DialogTitle.displayName = TITLE_NAME$1;
1921
- var DESCRIPTION_NAME$1 = "DialogDescription";
1922
- var DialogDescription = import_react.forwardRef((props, forwardedRef) => {
1923
- const { __scopeDialog, ...descriptionProps } = props;
1924
- const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
1925
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.p, {
1926
- id: context.descriptionId,
1927
- ...descriptionProps,
1928
- ref: forwardedRef
1929
- });
1930
- });
1931
- DialogDescription.displayName = DESCRIPTION_NAME$1;
1932
- var CLOSE_NAME = "DialogClose";
1933
- var DialogClose = import_react.forwardRef((props, forwardedRef) => {
1934
- const { __scopeDialog, ...closeProps } = props;
1935
- const context = useDialogContext(CLOSE_NAME, __scopeDialog);
1936
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.button, {
1937
- type: "button",
1938
- ...closeProps,
1939
- ref: forwardedRef,
1940
- onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
1941
- });
1942
- });
1943
- DialogClose.displayName = CLOSE_NAME;
1944
- function getState(open) {
1945
- return open ? "open" : "closed";
1946
- }
1947
- var TITLE_WARNING_NAME = "DialogTitleWarning";
1948
- var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
1949
- contentName: CONTENT_NAME$1,
1950
- titleName: TITLE_NAME$1,
1951
- docsSlug: "dialog"
1952
- });
1953
- var TitleWarning = ({ titleId }) => {
1954
- const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
1955
- const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
1956
-
1957
- If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
1958
-
1959
- For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
1960
- import_react.useEffect(() => {
1961
- if (titleId) {
1962
- if (!document.getElementById(titleId)) console.error(MESSAGE);
1963
- }
1964
- }, [MESSAGE, titleId]);
1965
- return null;
1966
- };
1967
- var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
1968
- var DescriptionWarning$1 = ({ contentRef, descriptionId }) => {
1969
- const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;
1970
- import_react.useEffect(() => {
1971
- const describedById = contentRef.current?.getAttribute("aria-describedby");
1972
- if (descriptionId && describedById) {
1973
- if (!document.getElementById(descriptionId)) console.warn(MESSAGE);
1974
- }
1975
- }, [
1976
- MESSAGE,
1977
- contentRef,
1978
- descriptionId
1979
- ]);
1980
- return null;
1981
- };
1982
- var Root = Dialog;
1983
- var Trigger = DialogTrigger;
1984
- var Portal = DialogPortal;
1985
- var Overlay = DialogOverlay;
1986
- var Content = DialogContent;
1987
- var Title = DialogTitle;
1988
- var Description = DialogDescription;
1989
- var Close = DialogClose;
1990
- //#endregion
1991
- //#region ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.16_@types+react-dom@19.2.3_@types+react@19.2.15__@type_3c0987f2098ed49eed4a224078e46a0e/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
1992
- var ROOT_NAME = "AlertDialog";
1993
- var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [createDialogScope]);
1994
- var useDialogScope = createDialogScope();
1995
- var AlertDialog = (props) => {
1996
- const { __scopeAlertDialog, ...alertDialogProps } = props;
1997
- const dialogScope = useDialogScope(__scopeAlertDialog);
1998
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Root, {
1999
- ...dialogScope,
2000
- ...alertDialogProps,
2001
- modal: true
2002
- });
2003
- };
2004
- AlertDialog.displayName = ROOT_NAME;
2005
- var TRIGGER_NAME = "AlertDialogTrigger";
2006
- var AlertDialogTrigger = import_react.forwardRef((props, forwardedRef) => {
2007
- const { __scopeAlertDialog, ...triggerProps } = props;
2008
- const dialogScope = useDialogScope(__scopeAlertDialog);
2009
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trigger, {
2010
- ...dialogScope,
2011
- ...triggerProps,
2012
- ref: forwardedRef
2013
- });
2014
- });
2015
- AlertDialogTrigger.displayName = TRIGGER_NAME;
2016
- var PORTAL_NAME = "AlertDialogPortal";
2017
- var AlertDialogPortal = (props) => {
2018
- const { __scopeAlertDialog, ...portalProps } = props;
2019
- const dialogScope = useDialogScope(__scopeAlertDialog);
2020
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Portal, {
2021
- ...dialogScope,
2022
- ...portalProps
2023
- });
2024
- };
2025
- AlertDialogPortal.displayName = PORTAL_NAME;
2026
- var OVERLAY_NAME = "AlertDialogOverlay";
2027
- var AlertDialogOverlay = import_react.forwardRef((props, forwardedRef) => {
2028
- const { __scopeAlertDialog, ...overlayProps } = props;
2029
- const dialogScope = useDialogScope(__scopeAlertDialog);
2030
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Overlay, {
2031
- ...dialogScope,
2032
- ...overlayProps,
2033
- ref: forwardedRef
2034
- });
2035
- });
2036
- AlertDialogOverlay.displayName = OVERLAY_NAME;
2037
- var CONTENT_NAME = "AlertDialogContent";
2038
- var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
2039
- var Slottable = /* @__PURE__ */ createSlottable("AlertDialogContent");
2040
- var AlertDialogContent = import_react.forwardRef((props, forwardedRef) => {
2041
- const { __scopeAlertDialog, children, ...contentProps } = props;
2042
- const dialogScope = useDialogScope(__scopeAlertDialog);
2043
- const contentRef = import_react.useRef(null);
2044
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
2045
- const cancelRef = import_react.useRef(null);
2046
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WarningProvider, {
2047
- contentName: CONTENT_NAME,
2048
- titleName: TITLE_NAME,
2049
- docsSlug: "alert-dialog",
2050
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentProvider, {
2051
- scope: __scopeAlertDialog,
2052
- cancelRef,
2053
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Content, {
2054
- role: "alertdialog",
2055
- ...dialogScope,
2056
- ...contentProps,
2057
- ref: composedRefs,
2058
- onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
2059
- event.preventDefault();
2060
- cancelRef.current?.focus({ preventScroll: true });
2061
- }),
2062
- onPointerDownOutside: (event) => event.preventDefault(),
2063
- onInteractOutside: (event) => event.preventDefault(),
2064
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slottable, { children }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })]
2065
- })
2066
- })
2067
- });
2068
- });
2069
- AlertDialogContent.displayName = CONTENT_NAME;
2070
- var TITLE_NAME = "AlertDialogTitle";
2071
- var AlertDialogTitle = import_react.forwardRef((props, forwardedRef) => {
2072
- const { __scopeAlertDialog, ...titleProps } = props;
2073
- const dialogScope = useDialogScope(__scopeAlertDialog);
2074
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, {
2075
- ...dialogScope,
2076
- ...titleProps,
2077
- ref: forwardedRef
2078
- });
2079
- });
2080
- AlertDialogTitle.displayName = TITLE_NAME;
2081
- var DESCRIPTION_NAME = "AlertDialogDescription";
2082
- var AlertDialogDescription = import_react.forwardRef((props, forwardedRef) => {
2083
- const { __scopeAlertDialog, ...descriptionProps } = props;
2084
- const dialogScope = useDialogScope(__scopeAlertDialog);
2085
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description, {
2086
- ...dialogScope,
2087
- ...descriptionProps,
2088
- ref: forwardedRef
2089
- });
2090
- });
2091
- AlertDialogDescription.displayName = DESCRIPTION_NAME;
2092
- var ACTION_NAME = "AlertDialogAction";
2093
- var AlertDialogAction = import_react.forwardRef((props, forwardedRef) => {
2094
- const { __scopeAlertDialog, ...actionProps } = props;
2095
- const dialogScope = useDialogScope(__scopeAlertDialog);
2096
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Close, {
2097
- ...dialogScope,
2098
- ...actionProps,
2099
- ref: forwardedRef
2100
- });
2101
- });
2102
- AlertDialogAction.displayName = ACTION_NAME;
2103
- var CANCEL_NAME = "AlertDialogCancel";
2104
- var AlertDialogCancel = import_react.forwardRef((props, forwardedRef) => {
2105
- const { __scopeAlertDialog, ...cancelProps } = props;
2106
- const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
2107
- const dialogScope = useDialogScope(__scopeAlertDialog);
2108
- const ref = useComposedRefs(forwardedRef, cancelRef);
2109
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Close, {
2110
- ...dialogScope,
2111
- ...cancelProps,
2112
- ref
2113
- });
2114
- });
2115
- AlertDialogCancel.displayName = CANCEL_NAME;
2116
- var DescriptionWarning = ({ contentRef }) => {
2117
- const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
2118
-
2119
- You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
2120
-
2121
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
2122
-
2123
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
2124
- import_react.useEffect(() => {
2125
- if (!document.getElementById(contentRef.current?.getAttribute("aria-describedby"))) console.warn(MESSAGE);
2126
- }, [MESSAGE, contentRef]);
2127
- return null;
2128
- };
2129
- var Root2 = AlertDialog;
2130
- var Portal2 = AlertDialogPortal;
2131
- var Overlay2 = AlertDialogOverlay;
2132
- var Content2 = AlertDialogContent;
2133
- var Action = AlertDialogAction;
2134
- var Cancel = AlertDialogCancel;
2135
- var Title2 = AlertDialogTitle;
2136
- var Description2 = AlertDialogDescription;
2137
- //#endregion
2138
- export { Slot$1 as A, useCallbackRef$1 as C, useLayoutEffect2 as D, useControllableState as E, createSlottable as M, useComposedRefs as N, createContextScope as O, require_jsx_runtime as P, DismissableLayer as S, Presence as T, hideOthers as _, Overlay2 as a, Portal$1 as b, Title2 as c, Description as d, Overlay as f, Trigger as g, Title as h, Description2 as i, createSlot as j, Primitive as k, Close as l, Root as m, Cancel as n, Portal2 as o, Portal as p, Content2 as r, Root2 as s, Action as t, Content as u, ReactRemoveScroll as v, useId as w, FocusScope as x, useFocusGuards as y };