@anoki/fse-ui 1.10.1-RC2.12 → 1.10.1-RC2.13

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 (369) hide show
  1. package/dist/index.cjs10.js +1 -1
  2. package/dist/index.cjs113.js +1 -1
  3. package/dist/index.cjs113.js.map +1 -1
  4. package/dist/index.cjs138.js +1 -1
  5. package/dist/index.cjs159.js +1 -1
  6. package/dist/index.cjs160.js +1 -1
  7. package/dist/index.cjs161.js +1 -1
  8. package/dist/index.cjs162.js +1 -1
  9. package/dist/index.cjs163.js +1 -1
  10. package/dist/index.cjs164.js +1 -1
  11. package/dist/index.cjs165.js +1 -1
  12. package/dist/index.cjs166.js +1 -1
  13. package/dist/index.cjs167.js +1 -1
  14. package/dist/index.cjs168.js +1 -1
  15. package/dist/index.cjs169.js +1 -1
  16. package/dist/index.cjs170.js +1 -1
  17. package/dist/index.cjs171.js +1 -1
  18. package/dist/index.cjs172.js +1 -1
  19. package/dist/index.cjs173.js +1 -1
  20. package/dist/index.cjs174.js +1 -1
  21. package/dist/index.cjs175.js +1 -1
  22. package/dist/index.cjs176.js +1 -1
  23. package/dist/index.cjs177.js +1 -1
  24. package/dist/index.cjs178.js +1 -1
  25. package/dist/index.cjs179.js +1 -1
  26. package/dist/index.cjs180.js +1 -1
  27. package/dist/index.cjs181.js +1 -1
  28. package/dist/index.cjs185.js +1 -1
  29. package/dist/index.cjs186.js +1 -1
  30. package/dist/index.cjs187.js +1 -1
  31. package/dist/index.cjs189.js +1 -1
  32. package/dist/index.cjs190.js +1 -1
  33. package/dist/index.cjs191.js +1 -1
  34. package/dist/index.cjs192.js +1 -1
  35. package/dist/index.cjs193.js +1 -1
  36. package/dist/index.cjs194.js +1 -1
  37. package/dist/index.cjs195.js +1 -1
  38. package/dist/index.cjs196.js +1 -1
  39. package/dist/index.cjs197.js +1 -1
  40. package/dist/index.cjs199.js +1 -1
  41. package/dist/index.cjs200.js +1 -1
  42. package/dist/index.cjs201.js +1 -1
  43. package/dist/index.cjs202.js +1 -1
  44. package/dist/index.cjs203.js +1 -1
  45. package/dist/index.cjs204.js +1 -1
  46. package/dist/index.cjs205.js +1 -1
  47. package/dist/index.cjs208.js +1 -1
  48. package/dist/index.cjs209.js +1 -1
  49. package/dist/index.cjs210.js +1 -1
  50. package/dist/index.cjs211.js +1 -1
  51. package/dist/index.cjs212.js +1 -1
  52. package/dist/index.cjs213.js +1 -1
  53. package/dist/index.cjs214.js +1 -1
  54. package/dist/index.cjs215.js +1 -1
  55. package/dist/index.cjs216.js +1 -1
  56. package/dist/index.cjs217.js +1 -1
  57. package/dist/index.cjs223.js +1 -1
  58. package/dist/index.cjs225.js +1 -1
  59. package/dist/index.cjs226.js +1 -1
  60. package/dist/index.cjs227.js +1 -1
  61. package/dist/index.cjs24.js +1 -1
  62. package/dist/index.cjs265.js +1 -1
  63. package/dist/index.cjs266.js +1 -1
  64. package/dist/index.cjs267.js +1 -1
  65. package/dist/index.cjs279.js +1 -1
  66. package/dist/index.cjs279.js.map +1 -1
  67. package/dist/index.cjs28.js +1 -1
  68. package/dist/index.cjs280.js +2 -0
  69. package/dist/index.cjs280.js.map +1 -0
  70. package/dist/index.cjs300.js +1 -1
  71. package/dist/index.cjs302.js +1 -1
  72. package/dist/index.cjs310.js +1 -1
  73. package/dist/index.cjs321.js +1 -1
  74. package/dist/index.cjs326.js +1 -1
  75. package/dist/index.cjs328.js +1 -1
  76. package/dist/index.cjs357.js +1 -1
  77. package/dist/index.cjs358.js +1 -1
  78. package/dist/index.cjs359.js +1 -1
  79. package/dist/index.cjs400.js +1 -1
  80. package/dist/index.cjs406.js +1 -1
  81. package/dist/index.cjs437.js +1 -1
  82. package/dist/index.cjs449.js +1 -1
  83. package/dist/index.cjs460.js +1 -1
  84. package/dist/index.cjs461.js +1 -1
  85. package/dist/index.cjs467.js +1 -1
  86. package/dist/index.cjs474.js +1 -1
  87. package/dist/index.cjs475.js +1 -1
  88. package/dist/index.cjs477.js +1 -1
  89. package/dist/index.cjs477.js.map +1 -1
  90. package/dist/index.cjs480.js +1 -1
  91. package/dist/index.cjs480.js.map +1 -1
  92. package/dist/index.cjs481.js +2 -0
  93. package/dist/index.cjs481.js.map +1 -0
  94. package/dist/{index.cjs478.js → index.cjs482.js} +1 -1
  95. package/dist/{index.cjs478.js.map → index.cjs482.js.map} +1 -1
  96. package/dist/{index.cjs479.js → index.cjs483.js} +1 -1
  97. package/dist/{index.cjs479.js.map → index.cjs483.js.map} +1 -1
  98. package/dist/index.cjs489.js +1 -1
  99. package/dist/index.cjs489.js.map +1 -1
  100. package/dist/index.cjs490.js +1 -1
  101. package/dist/index.cjs490.js.map +1 -1
  102. package/dist/index.cjs491.js +1 -1
  103. package/dist/index.cjs491.js.map +1 -1
  104. package/dist/index.cjs492.js +1 -1
  105. package/dist/index.cjs492.js.map +1 -1
  106. package/dist/index.cjs493.js +2 -0
  107. package/dist/index.cjs493.js.map +1 -0
  108. package/dist/index.cjs494.js +2 -0
  109. package/dist/index.cjs494.js.map +1 -0
  110. package/dist/index.cjs495.js +2 -0
  111. package/dist/index.cjs495.js.map +1 -0
  112. package/dist/{index.cjs509.js → index.cjs513.js} +2 -2
  113. package/dist/{index.cjs509.js.map → index.cjs513.js.map} +1 -1
  114. package/dist/{index.cjs510.js → index.cjs514.js} +1 -1
  115. package/dist/index.cjs514.js.map +1 -0
  116. package/dist/index.cjs518.js +2 -0
  117. package/dist/index.cjs518.js.map +1 -0
  118. package/dist/{index.cjs525.js → index.cjs519.js} +1 -1
  119. package/dist/index.cjs519.js.map +1 -0
  120. package/dist/index.cjs520.js +1 -1
  121. package/dist/index.cjs520.js.map +1 -1
  122. package/dist/index.cjs521.js +1 -1
  123. package/dist/index.cjs521.js.map +1 -1
  124. package/dist/index.cjs523.js +1 -1
  125. package/dist/index.cjs523.js.map +1 -1
  126. package/dist/index.cjs526.js +1 -1
  127. package/dist/index.cjs526.js.map +1 -1
  128. package/dist/index.cjs527.js +1 -1
  129. package/dist/index.cjs527.js.map +1 -1
  130. package/dist/index.cjs528.js +1 -1
  131. package/dist/index.cjs529.js +1 -1
  132. package/dist/index.cjs529.js.map +1 -1
  133. package/dist/index.cjs530.js +1 -1
  134. package/dist/index.cjs530.js.map +1 -1
  135. package/dist/index.cjs532.js +1 -1
  136. package/dist/index.cjs534.js +1 -1
  137. package/dist/index.cjs537.js +1 -1
  138. package/dist/index.cjs537.js.map +1 -1
  139. package/dist/index.cjs538.js +1 -1
  140. package/dist/index.cjs538.js.map +1 -1
  141. package/dist/index.cjs584.js +1 -1
  142. package/dist/index.cjs589.js +1 -1
  143. package/dist/index.cjs593.js +1 -1
  144. package/dist/index.cjs594.js +1 -1
  145. package/dist/index.cjs6.js +1 -1
  146. package/dist/index.cjs601.js +1 -1
  147. package/dist/index.cjs606.js +1 -1
  148. package/dist/index.cjs645.js +1 -1
  149. package/dist/index.cjs647.js +1 -1
  150. package/dist/index.cjs65.js +1 -1
  151. package/dist/index.cjs655.js +1 -1
  152. package/dist/index.cjs662.js +38 -1
  153. package/dist/index.cjs662.js.map +1 -1
  154. package/dist/index.cjs663.js +1 -38
  155. package/dist/index.cjs663.js.map +1 -1
  156. package/dist/index.cjs664.js +1 -1
  157. package/dist/index.cjs664.js.map +1 -1
  158. package/dist/index.cjs665.js +1 -1
  159. package/dist/index.cjs665.js.map +1 -1
  160. package/dist/index.cjs666.js +1 -1
  161. package/dist/index.cjs666.js.map +1 -1
  162. package/dist/index.cjs670.js +1 -1
  163. package/dist/index.cjs670.js.map +1 -1
  164. package/dist/index.cjs671.js +1 -1
  165. package/dist/index.cjs671.js.map +1 -1
  166. package/dist/index.cjs672.js +1 -1
  167. package/dist/index.cjs672.js.map +1 -1
  168. package/dist/index.cjs7.js +1 -1
  169. package/dist/index.cjs8.js +1 -1
  170. package/dist/index.cjs9.js +1 -1
  171. package/dist/index.es10.js +2 -2
  172. package/dist/index.es113.js +102 -78
  173. package/dist/index.es113.js.map +1 -1
  174. package/dist/index.es138.js +1 -1
  175. package/dist/index.es159.js +1 -1
  176. package/dist/index.es160.js +1 -1
  177. package/dist/index.es161.js +1 -1
  178. package/dist/index.es162.js +1 -1
  179. package/dist/index.es163.js +1 -1
  180. package/dist/index.es164.js +1 -1
  181. package/dist/index.es165.js +1 -1
  182. package/dist/index.es166.js +1 -1
  183. package/dist/index.es167.js +1 -1
  184. package/dist/index.es168.js +1 -1
  185. package/dist/index.es169.js +1 -1
  186. package/dist/index.es170.js +1 -1
  187. package/dist/index.es171.js +1 -1
  188. package/dist/index.es172.js +1 -1
  189. package/dist/index.es173.js +1 -1
  190. package/dist/index.es174.js +1 -1
  191. package/dist/index.es175.js +1 -1
  192. package/dist/index.es176.js +1 -1
  193. package/dist/index.es177.js +1 -1
  194. package/dist/index.es178.js +1 -1
  195. package/dist/index.es179.js +1 -1
  196. package/dist/index.es180.js +1 -1
  197. package/dist/index.es181.js +1 -1
  198. package/dist/index.es185.js +1 -1
  199. package/dist/index.es186.js +1 -1
  200. package/dist/index.es187.js +1 -1
  201. package/dist/index.es189.js +1 -1
  202. package/dist/index.es190.js +1 -1
  203. package/dist/index.es191.js +1 -1
  204. package/dist/index.es192.js +1 -1
  205. package/dist/index.es193.js +1 -1
  206. package/dist/index.es194.js +1 -1
  207. package/dist/index.es195.js +1 -1
  208. package/dist/index.es196.js +1 -1
  209. package/dist/index.es197.js +1 -1
  210. package/dist/index.es199.js +1 -1
  211. package/dist/index.es200.js +1 -1
  212. package/dist/index.es201.js +1 -1
  213. package/dist/index.es202.js +1 -1
  214. package/dist/index.es203.js +1 -1
  215. package/dist/index.es204.js +1 -1
  216. package/dist/index.es205.js +1 -1
  217. package/dist/index.es208.js +1 -1
  218. package/dist/index.es209.js +1 -1
  219. package/dist/index.es210.js +1 -1
  220. package/dist/index.es211.js +1 -1
  221. package/dist/index.es212.js +1 -1
  222. package/dist/index.es213.js +1 -1
  223. package/dist/index.es214.js +1 -1
  224. package/dist/index.es215.js +1 -1
  225. package/dist/index.es216.js +1 -1
  226. package/dist/index.es217.js +1 -1
  227. package/dist/index.es223.js +1 -1
  228. package/dist/index.es225.js +1 -1
  229. package/dist/index.es226.js +1 -1
  230. package/dist/index.es227.js +1 -1
  231. package/dist/index.es24.js +1 -1
  232. package/dist/index.es265.js +1 -1
  233. package/dist/index.es266.js +2 -2
  234. package/dist/index.es267.js +2 -2
  235. package/dist/index.es279.js +2 -27
  236. package/dist/index.es279.js.map +1 -1
  237. package/dist/index.es28.js +1 -1
  238. package/dist/index.es280.js +30 -0
  239. package/dist/index.es280.js.map +1 -0
  240. package/dist/index.es300.js +1 -1
  241. package/dist/index.es302.js +1 -1
  242. package/dist/index.es310.js +3 -3
  243. package/dist/index.es321.js +1 -1
  244. package/dist/index.es326.js +1 -1
  245. package/dist/index.es328.js +8 -8
  246. package/dist/index.es357.js +1 -1
  247. package/dist/index.es358.js +1 -1
  248. package/dist/index.es359.js +2 -2
  249. package/dist/index.es400.js +1 -1
  250. package/dist/index.es406.js +1 -1
  251. package/dist/index.es437.js +1 -1
  252. package/dist/index.es449.js +1 -1
  253. package/dist/index.es460.js +1 -1
  254. package/dist/index.es461.js +1 -1
  255. package/dist/index.es467.js +1 -1
  256. package/dist/index.es474.js +1 -1
  257. package/dist/index.es475.js +8 -8
  258. package/dist/index.es477.js +15 -6
  259. package/dist/index.es477.js.map +1 -1
  260. package/dist/index.es480.js +15 -15
  261. package/dist/index.es480.js.map +1 -1
  262. package/dist/index.es481.js +9 -0
  263. package/dist/index.es481.js.map +1 -0
  264. package/dist/{index.es478.js → index.es482.js} +1 -1
  265. package/dist/{index.es478.js.map → index.es482.js.map} +1 -1
  266. package/dist/{index.es479.js → index.es483.js} +1 -1
  267. package/dist/{index.es479.js.map → index.es483.js.map} +1 -1
  268. package/dist/index.es489.js +122 -12
  269. package/dist/index.es489.js.map +1 -1
  270. package/dist/index.es490.js +134 -8
  271. package/dist/index.es490.js.map +1 -1
  272. package/dist/index.es491.js +14 -50
  273. package/dist/index.es491.js.map +1 -1
  274. package/dist/index.es492.js +13 -54
  275. package/dist/index.es492.js.map +1 -1
  276. package/dist/index.es493.js +12 -0
  277. package/dist/index.es493.js.map +1 -0
  278. package/dist/index.es494.js +53 -0
  279. package/dist/index.es494.js.map +1 -0
  280. package/dist/index.es495.js +59 -0
  281. package/dist/index.es495.js.map +1 -0
  282. package/dist/{index.es509.js → index.es513.js} +2 -2
  283. package/dist/{index.es509.js.map → index.es513.js.map} +1 -1
  284. package/dist/{index.es510.js → index.es514.js} +1 -1
  285. package/dist/index.es514.js.map +1 -0
  286. package/dist/index.es518.js +24 -0
  287. package/dist/index.es518.js.map +1 -0
  288. package/dist/{index.es525.js → index.es519.js} +1 -1
  289. package/dist/index.es519.js.map +1 -0
  290. package/dist/index.es520.js +53 -4
  291. package/dist/index.es520.js.map +1 -1
  292. package/dist/index.es521.js +201 -19
  293. package/dist/index.es521.js.map +1 -1
  294. package/dist/index.es523.js +2 -54
  295. package/dist/index.es523.js.map +1 -1
  296. package/dist/index.es526.js +5 -2
  297. package/dist/index.es526.js.map +1 -1
  298. package/dist/index.es527.js +8 -131
  299. package/dist/index.es527.js.map +1 -1
  300. package/dist/index.es528.js +1 -1
  301. package/dist/index.es529.js +3 -9
  302. package/dist/index.es529.js.map +1 -1
  303. package/dist/index.es530.js +131 -2
  304. package/dist/index.es530.js.map +1 -1
  305. package/dist/index.es532.js +1 -1
  306. package/dist/index.es534.js +1 -1
  307. package/dist/index.es537.js +2 -14
  308. package/dist/index.es537.js.map +1 -1
  309. package/dist/index.es538.js +14 -2
  310. package/dist/index.es538.js.map +1 -1
  311. package/dist/index.es584.js +1 -1
  312. package/dist/index.es589.js +1 -1
  313. package/dist/index.es593.js +1 -1
  314. package/dist/index.es594.js +8 -8
  315. package/dist/index.es6.js +1 -1
  316. package/dist/index.es601.js +2 -2
  317. package/dist/index.es606.js +3 -3
  318. package/dist/index.es645.js +1 -1
  319. package/dist/index.es647.js +4 -4
  320. package/dist/index.es65.js +1 -1
  321. package/dist/index.es655.js +2 -2
  322. package/dist/index.es662.js +69 -65
  323. package/dist/index.es662.js.map +1 -1
  324. package/dist/index.es663.js +8 -68
  325. package/dist/index.es663.js.map +1 -1
  326. package/dist/index.es664.js +14 -9
  327. package/dist/index.es664.js.map +1 -1
  328. package/dist/index.es665.js +62 -14
  329. package/dist/index.es665.js.map +1 -1
  330. package/dist/index.es666.js +64 -61
  331. package/dist/index.es666.js.map +1 -1
  332. package/dist/index.es670.js +3 -4
  333. package/dist/index.es670.js.map +1 -1
  334. package/dist/index.es671.js +2 -3
  335. package/dist/index.es671.js.map +1 -1
  336. package/dist/index.es672.js +4 -2
  337. package/dist/index.es672.js.map +1 -1
  338. package/dist/index.es7.js +1 -1
  339. package/dist/index.es8.js +1 -1
  340. package/dist/index.es9.js +2 -2
  341. package/package.json +1 -1
  342. package/dist/index.cjs281.js +0 -2
  343. package/dist/index.cjs281.js.map +0 -1
  344. package/dist/index.cjs486.js +0 -2
  345. package/dist/index.cjs486.js.map +0 -1
  346. package/dist/index.cjs487.js +0 -2
  347. package/dist/index.cjs487.js.map +0 -1
  348. package/dist/index.cjs488.js +0 -2
  349. package/dist/index.cjs488.js.map +0 -1
  350. package/dist/index.cjs507.js +0 -2
  351. package/dist/index.cjs507.js.map +0 -1
  352. package/dist/index.cjs510.js.map +0 -1
  353. package/dist/index.cjs524.js +0 -2
  354. package/dist/index.cjs524.js.map +0 -1
  355. package/dist/index.cjs525.js.map +0 -1
  356. package/dist/index.es281.js +0 -5
  357. package/dist/index.es281.js.map +0 -1
  358. package/dist/index.es486.js +0 -128
  359. package/dist/index.es486.js.map +0 -1
  360. package/dist/index.es487.js +0 -138
  361. package/dist/index.es487.js.map +0 -1
  362. package/dist/index.es488.js +0 -17
  363. package/dist/index.es488.js.map +0 -1
  364. package/dist/index.es507.js +0 -18
  365. package/dist/index.es507.js.map +0 -1
  366. package/dist/index.es510.js.map +0 -1
  367. package/dist/index.es524.js +0 -206
  368. package/dist/index.es524.js.map +0 -1
  369. package/dist/index.es525.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.es489.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es489.js","sources":["../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","React","DismissableLayer","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","node","setNode","ownerDocument","force","composedRefs","useComposedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","event","target","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","useEscapeKeydown","dispatchUpdate","handleUpdate","jsx","Primitive","composeEventHandlers","BRANCH_NAME","DismissableLayerBranch","ref","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","name","handler","detail","discrete","dispatchDiscreteCustomEvent"],"mappings":";;;;;;;AAUA,IAAIA,IAAyB,oBACzBC,IAAiB,2BACjBC,IAAuB,uCACvBC,IAAgB,iCAChBC,GACAC,IAA0BC,EAAM,cAAc;AAAA,EAChD,QAAwB,oBAAI,IAAK;AAAA,EACjC,wCAAwD,oBAAI,IAAK;AAAA,EACjE,UAA0B,oBAAI,IAAG;AACnC,CAAC,GACGC,IAAmBD,EAAM;AAAA,EAC3B,CAACE,GAAOC,MAAiB;AACvB,UAAM;AAAA,MACJ,6BAAAC,IAA8B;AAAA,MAC9B,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,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YAAY,IAAM,QAAAE,GAAQ;AAChF,EAAID,KAAS3B,EAAO,iBAAiB0B,GAAMC,GAAS,EAAE,MAAM,IAAM,GAC9DE,IACFC,EAA4B9B,GAAQD,CAAK,IAEzCC,EAAO,cAAcD,CAAK;AAE9B;","x_google_ignoreList":[0]}
@@ -1,12 +1,138 @@
1
- import { __assign as m } from "./index.es579.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./index.es580.js";
4
- import t from "./index.es581.js";
5
- var s = r.forwardRef(function(a, o) {
6
- return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
1
+ import * as d from "react";
2
+ import { useComposedRefs as P } from "./index.es471.js";
3
+ import { Primitive as M } from "./index.es474.js";
4
+ import { useCallbackRef as y } from "./index.es531.js";
5
+ import { j as _ } from "./index.es247.js";
6
+ var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
7
+ const {
8
+ loop: t = !1,
9
+ trapped: u = !1,
10
+ onMountAutoFocus: p,
11
+ onUnmountAutoFocus: L,
12
+ ...g
13
+ } = e, [o, R] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), U = P(n, (s) => R(s)), a = d.useRef({
14
+ paused: !1,
15
+ pause() {
16
+ this.paused = !0;
17
+ },
18
+ resume() {
19
+ this.paused = !1;
20
+ }
21
+ }).current;
22
+ d.useEffect(() => {
23
+ if (u) {
24
+ let s = function(i) {
25
+ if (a.paused || !o) return;
26
+ const c = i.target;
27
+ o.contains(c) ? b.current = c : f(b.current, { select: !0 });
28
+ }, l = function(i) {
29
+ if (a.paused || !o) return;
30
+ const c = i.relatedTarget;
31
+ c !== null && (o.contains(c) || f(b.current, { select: !0 }));
32
+ }, r = function(i) {
33
+ if (document.activeElement === document.body)
34
+ for (const h of i)
35
+ h.removedNodes.length > 0 && f(o);
36
+ };
37
+ document.addEventListener("focusin", s), document.addEventListener("focusout", l);
38
+ const m = new MutationObserver(r);
39
+ return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
40
+ document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
41
+ };
42
+ }
43
+ }, [u, o, a.paused]), d.useEffect(() => {
44
+ if (o) {
45
+ S.add(a);
46
+ const s = document.activeElement;
47
+ if (!o.contains(s)) {
48
+ const r = new CustomEvent(F, N);
49
+ o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(V(I(o)), { select: !0 }), document.activeElement === s && f(o));
50
+ }
51
+ return () => {
52
+ o.removeEventListener(F, E), setTimeout(() => {
53
+ const r = new CustomEvent(T, N);
54
+ o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
55
+ }, 0);
56
+ };
57
+ }
58
+ }, [o, E, v, a]);
59
+ const A = d.useCallback(
60
+ (s) => {
61
+ if (!t && !u || a.paused) return;
62
+ const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
63
+ if (l && r) {
64
+ const m = s.currentTarget, [i, c] = x(m);
65
+ i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
66
+ }
67
+ },
68
+ [t, u, a.paused]
69
+ );
70
+ return /* @__PURE__ */ _.jsx(M.div, { tabIndex: -1, ...g, ref: U, onKeyDown: A });
7
71
  });
8
- s.classNames = e.classNames;
72
+ k.displayName = K;
73
+ function w(e, { select: n = !1 } = {}) {
74
+ const t = document.activeElement;
75
+ for (const u of e)
76
+ if (f(u, { select: n }), document.activeElement !== t) return;
77
+ }
78
+ function x(e) {
79
+ const n = I(e), t = O(n, e), u = O(n.reverse(), e);
80
+ return [t, u];
81
+ }
82
+ function I(e) {
83
+ const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
84
+ acceptNode: (u) => {
85
+ const p = u.tagName === "INPUT" && u.type === "hidden";
86
+ return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
87
+ }
88
+ });
89
+ for (; t.nextNode(); ) n.push(t.currentNode);
90
+ return n;
91
+ }
92
+ function O(e, n) {
93
+ for (const t of e)
94
+ if (!D(t, { upTo: n })) return t;
95
+ }
96
+ function D(e, { upTo: n }) {
97
+ if (getComputedStyle(e).visibility === "hidden") return !0;
98
+ for (; e; ) {
99
+ if (n !== void 0 && e === n) return !1;
100
+ if (getComputedStyle(e).display === "none") return !0;
101
+ e = e.parentElement;
102
+ }
103
+ return !1;
104
+ }
105
+ function H(e) {
106
+ return e instanceof HTMLInputElement && "select" in e;
107
+ }
108
+ function f(e, { select: n = !1 } = {}) {
109
+ if (e && e.focus) {
110
+ const t = document.activeElement;
111
+ e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
112
+ }
113
+ }
114
+ var S = j();
115
+ function j() {
116
+ let e = [];
117
+ return {
118
+ add(n) {
119
+ const t = e[0];
120
+ n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
121
+ },
122
+ remove(n) {
123
+ var t;
124
+ e = C(e, n), (t = e[0]) == null || t.resume();
125
+ }
126
+ };
127
+ }
128
+ function C(e, n) {
129
+ const t = [...e], u = t.indexOf(n);
130
+ return u !== -1 && t.splice(u, 1), t;
131
+ }
132
+ function V(e) {
133
+ return e.filter((n) => n.tagName !== "A");
134
+ }
9
135
  export {
10
- s as default
136
+ k as FocusScope
11
137
  };
12
138
  //# sourceMappingURL=index.es490.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es490.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es490.js","sources":["../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","_a","array","item","updatedArray","index","items"],"mappings":";;;;;AAQA,IAAIA,IAAqB,+BACrBC,IAAuB,iCACvBC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAM,GACpDC,IAAmB,cACnBC,IAAaC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACzD,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,SAAAC,IAAU;AAAA,IACV,kBAAkBC;AAAA,IAClB,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EACP,IAAMN,GACE,CAACO,GAAWC,CAAY,IAAIT,EAAM,SAAS,IAAI,GAC/CU,IAAmBC,EAAeN,CAAoB,GACtDO,IAAqBD,EAAeL,CAAsB,GAC1DO,IAAwBb,EAAM,OAAO,IAAI,GACzCc,IAAeC,EAAgBb,GAAc,CAACc,MAASP,EAAaO,CAAI,CAAC,GACzEC,IAAajB,EAAM,OAAO;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AACN,WAAK,SAAS;AAAA,IACf;AAAA,IACD,SAAS;AACP,WAAK,SAAS;AAAA,IACpB;AAAA,EACG,CAAA,EAAE;AACH,EAAAA,EAAM,UAAU,MAAM;AACpB,QAAII,GAAS;AACX,UAAIc,IAAiB,SAASC,GAAO;AACnC,YAAIF,EAAW,UAAU,CAACT,EAAW;AACrC,cAAMY,IAASD,EAAM;AACrB,QAAIX,EAAU,SAASY,CAAM,IAC3BP,EAAsB,UAAUO,IAEhCC,EAAMR,EAAsB,SAAS,EAAE,QAAQ,GAAI,CAAE;AAAA,MAE/D,GAASS,IAAkB,SAASH,GAAO;AACnC,YAAIF,EAAW,UAAU,CAACT,EAAW;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/C,MAAIO,KAAWA,EAAQ,OAAO;AAC5B,UAAMvB,IAA2B,SAAS;AAC1C,IAAAuB,EAAQ,MAAM,EAAE,eAAe,GAAI,CAAE,GACjCA,MAAYvB,KAA4B0B,EAAkBH,CAAO,KAAKP,KACxEO,EAAQ,OAAQ;AAAA,EACtB;AACA;AACA,IAAIxB,IAAmB4B,EAAwB;AAC/C,SAASA,IAAyB;AAChC,MAAIC,IAAQ,CAAE;AACd,SAAO;AAAA,IACL,IAAIxC,GAAY;AACd,YAAMyC,IAAmBD,EAAM,CAAC;AAChC,MAAIxC,MAAeyC,MACjBA,KAAA,QAAAA,EAAkB,UAEpBD,IAAQE,EAAYF,GAAOxC,CAAU,GACrCwC,EAAM,QAAQxC,CAAU;AAAA,IACzB;AAAA,IACD,OAAOA,GAAY;;AACjB,MAAAwC,IAAQE,EAAYF,GAAOxC,CAAU,IACrC2C,IAAAH,EAAM,CAAC,MAAP,QAAAG,EAAU;AAAA,IAChB;AAAA,EACG;AACH;AACA,SAASD,EAAYE,GAAOC,GAAM;AAChC,QAAMC,IAAe,CAAC,GAAGF,CAAK,GACxBG,IAAQD,EAAa,QAAQD,CAAI;AACvC,SAAIE,MAAU,MACZD,EAAa,OAAOC,GAAO,CAAC,GAEvBD;AACT;AACA,SAAS/B,EAAYiC,GAAO;AAC1B,SAAOA,EAAM,OAAO,CAACH,MAASA,EAAK,YAAY,GAAG;AACpD;","x_google_ignoreList":[0]}
@@ -1,53 +1,17 @@
1
- var S = function(r) {
2
- if (typeof document > "u")
3
- return null;
4
- var u = Array.isArray(r) ? r[0] : r;
5
- return u.ownerDocument.body;
6
- }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
- return r && (r.host || W(r.parentNode));
8
- }, D = function(r, u) {
9
- return u.map(function(e) {
10
- if (r.contains(e))
11
- return e;
12
- var n = W(e);
13
- return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
- }).filter(function(e) {
15
- return !!e;
16
- });
17
- }, E = function(r, u, e, n) {
18
- var i = D(u, Array.isArray(r) ? r : [r]);
19
- p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
- var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
- !t || s.has(t) || (s.add(t), y(t.parentNode));
22
- };
23
- i.forEach(y);
24
- var A = function(t) {
25
- !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
- if (s.has(a))
27
- A(a);
28
- else
29
- try {
30
- var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
- f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
- } catch (k) {
33
- console.error("aria-hidden: cannot operate on ", a, k);
34
- }
35
- });
36
- };
37
- return A(u), s.clear(), h++, function() {
38
- l.forEach(function(t) {
39
- var a = f.get(t) - 1, c = o.get(t) - 1;
40
- f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
- }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
- };
43
- }, C = function(r, u, e) {
44
- e === void 0 && (e = "data-aria-hidden");
45
- var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
- return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
- return null;
48
- };
49
- };
1
+ import * as r from "react";
2
+ import f from "react-dom";
3
+ import { Primitive as u } from "./index.es474.js";
4
+ import { useLayoutEffect as c } from "./index.es536.js";
5
+ import { j as l } from "./index.es247.js";
6
+ var p = "Portal", d = r.forwardRef((e, a) => {
7
+ var o;
8
+ const { container: s, ...i } = e, [m, n] = r.useState(!1);
9
+ c(() => n(!0), []);
10
+ const t = s || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
11
+ return t ? f.createPortal(/* @__PURE__ */ l.jsx(u.div, { ...i, ref: a }), t) : null;
12
+ });
13
+ d.displayName = p;
50
14
  export {
51
- C as hideOthers
15
+ d as Portal
52
16
  };
53
17
  //# sourceMappingURL=index.es491.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es491.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAA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AK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es491.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":";;;;;AAQA,IAAIA,IAAc,UACdC,IAASC,EAAM,WAAW,CAACC,GAAOC,MAAiB;;AACrD,QAAM,EAAE,WAAWC,GAAe,GAAGC,EAAa,IAAGH,GAC/C,CAACI,GAASC,CAAU,IAAIN,EAAM,SAAS,EAAK;AAClDO,EAAAA,EAAgB,MAAMD,EAAW,EAAI,GAAG,CAAA,CAAE;AAC1C,QAAME,IAAYL,KAAiBE,OAAWI,IAAA,yCAAY,aAAZ,gBAAAA,EAAsB;AACpE,SAAOD,IAAYE,EAAS,aAA6BC,gBAAAA,EAAG,IAACC,EAAU,KAAK,EAAE,GAAGR,GAAa,KAAKF,EAAc,CAAA,GAAGM,CAAS,IAAI;AACnI,CAAC;AACDT,EAAO,cAAcD;","x_google_ignoreList":[0]}
@@ -1,59 +1,18 @@
1
- import * as l from "react";
2
- import { composeRefs as y } from "./index.es471.js";
3
- import { j as f } from "./index.es247.js";
4
- // @__NO_SIDE_EFFECTS__
5
- function S(e) {
6
- const t = /* @__PURE__ */ g(e), o = l.forwardRef((n, r) => {
7
- const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(E);
8
- if (p) {
9
- const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
10
- return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
11
- }
12
- return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
13
- });
14
- return o.displayName = `${e}.Slot`, o;
1
+ import * as r from "react";
2
+ var t = 0;
3
+ function a() {
4
+ r.useEffect(() => {
5
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
6
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
7
+ t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
8
+ };
9
+ }, []);
15
10
  }
16
- var h = /* @__PURE__ */ S("Slot");
17
- // @__NO_SIDE_EFFECTS__
18
- function g(e) {
19
- const t = l.forwardRef((o, n) => {
20
- const { children: r, ...i } = o;
21
- if (l.isValidElement(r)) {
22
- const a = x(r), s = R(i, r.props);
23
- return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
24
- }
25
- return l.Children.count(r) > 1 ? l.Children.only(null) : null;
26
- });
27
- return t.displayName = `${e}.SlotClone`, t;
28
- }
29
- var d = Symbol("radix.slottable");
30
- // @__NO_SIDE_EFFECTS__
31
- function j(e) {
32
- const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
33
- return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
34
- }
35
- function E(e) {
36
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
37
- }
38
- function R(e, t) {
39
- const o = { ...t };
40
- for (const n in t) {
41
- const r = e[n], i = t[n];
42
- /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
43
- i(...s), r(...s);
44
- } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
45
- }
46
- return { ...e, ...o };
47
- }
48
- function x(e) {
49
- var n, r;
50
- let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
51
- return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
11
+ function n() {
12
+ const e = document.createElement("span");
13
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
52
14
  }
53
15
  export {
54
- h as Root,
55
- h as Slot,
56
- S as createSlot,
57
- j as createSlottable
16
+ a as useFocusGuards
58
17
  };
59
18
  //# sourceMappingURL=index.es492.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es492.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,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KAAUA,EAAO,gBACrDE,IACKH,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es492.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
@@ -0,0 +1,12 @@
1
+ import { __assign as m } from "./index.es579.js";
2
+ import * as r from "react";
3
+ import { RemoveScroll as e } from "./index.es580.js";
4
+ import t from "./index.es581.js";
5
+ var s = r.forwardRef(function(a, o) {
6
+ return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
7
+ });
8
+ s.classNames = e.classNames;
9
+ export {
10
+ s as default
11
+ };
12
+ //# sourceMappingURL=index.es493.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es493.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
@@ -0,0 +1,53 @@
1
+ var S = function(r) {
2
+ if (typeof document > "u")
3
+ return null;
4
+ var u = Array.isArray(r) ? r[0] : r;
5
+ return u.ownerDocument.body;
6
+ }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
+ return r && (r.host || W(r.parentNode));
8
+ }, D = function(r, u) {
9
+ return u.map(function(e) {
10
+ if (r.contains(e))
11
+ return e;
12
+ var n = W(e);
13
+ return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
+ }).filter(function(e) {
15
+ return !!e;
16
+ });
17
+ }, E = function(r, u, e, n) {
18
+ var i = D(u, Array.isArray(r) ? r : [r]);
19
+ p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
+ var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
+ !t || s.has(t) || (s.add(t), y(t.parentNode));
22
+ };
23
+ i.forEach(y);
24
+ var A = function(t) {
25
+ !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
+ if (s.has(a))
27
+ A(a);
28
+ else
29
+ try {
30
+ var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
+ f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
+ } catch (k) {
33
+ console.error("aria-hidden: cannot operate on ", a, k);
34
+ }
35
+ });
36
+ };
37
+ return A(u), s.clear(), h++, function() {
38
+ l.forEach(function(t) {
39
+ var a = f.get(t) - 1, c = o.get(t) - 1;
40
+ f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
+ }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
+ };
43
+ }, C = function(r, u, e) {
44
+ e === void 0 && (e = "data-aria-hidden");
45
+ var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
+ return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
+ return null;
48
+ };
49
+ };
50
+ export {
51
+ C as hideOthers
52
+ };
53
+ //# sourceMappingURL=index.es494.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es494.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBA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;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
@@ -0,0 +1,59 @@
1
+ import * as l from "react";
2
+ import { composeRefs as y } from "./index.es471.js";
3
+ import { j as f } from "./index.es247.js";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function S(e) {
6
+ const t = /* @__PURE__ */ g(e), o = l.forwardRef((n, r) => {
7
+ const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(E);
8
+ if (p) {
9
+ const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
10
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
11
+ }
12
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
13
+ });
14
+ return o.displayName = `${e}.Slot`, o;
15
+ }
16
+ var h = /* @__PURE__ */ S("Slot");
17
+ // @__NO_SIDE_EFFECTS__
18
+ function g(e) {
19
+ const t = l.forwardRef((o, n) => {
20
+ const { children: r, ...i } = o;
21
+ if (l.isValidElement(r)) {
22
+ const a = x(r), s = R(i, r.props);
23
+ return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
24
+ }
25
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
26
+ });
27
+ return t.displayName = `${e}.SlotClone`, t;
28
+ }
29
+ var d = Symbol("radix.slottable");
30
+ // @__NO_SIDE_EFFECTS__
31
+ function j(e) {
32
+ const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
33
+ return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
34
+ }
35
+ function E(e) {
36
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
37
+ }
38
+ function R(e, t) {
39
+ const o = { ...t };
40
+ for (const n in t) {
41
+ const r = e[n], i = t[n];
42
+ /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
43
+ i(...s), r(...s);
44
+ } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
45
+ }
46
+ return { ...e, ...o };
47
+ }
48
+ function x(e) {
49
+ var n, r;
50
+ let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
51
+ return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
52
+ }
53
+ export {
54
+ h as Root,
55
+ h as Slot,
56
+ S as createSlot,
57
+ j as createSlottable
58
+ };
59
+ //# sourceMappingURL=index.es495.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es495.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuBC,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF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