@baseline-ui/core 3.2.0 → 3.3.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 (264) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.css +1 -1
  3. package/dist/ActionButton.mjs +1 -1
  4. package/dist/ActionGroup.mjs +1 -1
  5. package/dist/ActionIconButton.mjs +1 -1
  6. package/dist/Actionable.mjs +1 -1
  7. package/dist/AlertDialog.css +1 -1
  8. package/dist/AlertDialog.mjs +1 -1
  9. package/dist/AudioPlayer.css +1 -1
  10. package/dist/AudioPlayer.mjs +1 -1
  11. package/dist/Avatar.mjs +1 -1
  12. package/dist/ButtonSelect.css +1 -1
  13. package/dist/ButtonSelect.mjs +1 -1
  14. package/dist/Calendar.css +1 -1
  15. package/dist/Calendar.mjs +1 -1
  16. package/dist/Checkbox.mjs +1 -1
  17. package/dist/Code.mjs +1 -1
  18. package/dist/ColorInput.css +1 -1
  19. package/dist/ColorInput.mjs +1 -1
  20. package/dist/ColorSwatch.mjs +1 -1
  21. package/dist/ColorSwatchPicker.mjs +1 -1
  22. package/dist/ComboBox.css +1 -1
  23. package/dist/ComboBox.mjs +1 -1
  24. package/dist/DateField.css +1 -1
  25. package/dist/DateField.mjs +1 -1
  26. package/dist/Dialog.mjs +1 -1
  27. package/dist/Disclosure.mjs +1 -1
  28. package/dist/DomNodeRenderer.mjs +1 -1
  29. package/dist/Drawer.mjs +1 -1
  30. package/dist/Editor.css +1 -1
  31. package/dist/Editor.mjs +1 -1
  32. package/dist/FileInput.css +1 -1
  33. package/dist/FileInput.mjs +1 -1
  34. package/dist/FileList.mjs +1 -1
  35. package/dist/FileUploader.css +1 -1
  36. package/dist/FileUploader.mjs +1 -1
  37. package/dist/FrameProvider.mjs +1 -1
  38. package/dist/FreehandCanvas.css +1 -1
  39. package/dist/FreehandCanvas.mjs +1 -1
  40. package/dist/GridList.mjs +1 -1
  41. package/dist/Icon.mjs +1 -1
  42. package/dist/ImageDropZone.css +1 -1
  43. package/dist/ImageDropZone.mjs +1 -1
  44. package/dist/ImageGallery.css +1 -1
  45. package/dist/ImageGallery.mjs +1 -1
  46. package/dist/InlineAlert.css +1 -1
  47. package/dist/InlineAlert.mjs +1 -1
  48. package/dist/InlineToolbar.mjs +2 -2
  49. package/dist/Kbd.mjs +1 -1
  50. package/dist/Link.mjs +1 -1
  51. package/dist/ListBox.mjs +1 -1
  52. package/dist/Markdown.mjs +1 -1
  53. package/dist/Menu.css +1 -1
  54. package/dist/Menu.mjs +1 -1
  55. package/dist/Modal.mjs +1 -1
  56. package/dist/NumberInput.mjs +1 -1
  57. package/dist/Pagination.mjs +1 -1
  58. package/dist/PointPicker.mjs +1 -1
  59. package/dist/Popover.mjs +1 -1
  60. package/dist/Portal.mjs +1 -1
  61. package/dist/Preview.mjs +1 -1
  62. package/dist/ProgressBar.mjs +1 -1
  63. package/dist/RadioGroup.mjs +1 -1
  64. package/dist/Reaction.mjs +1 -1
  65. package/dist/ScrollControlButton.mjs +1 -1
  66. package/dist/SearchInput.mjs +1 -1
  67. package/dist/Select.css +1 -1
  68. package/dist/Select.mjs +1 -1
  69. package/dist/Separator.mjs +1 -1
  70. package/dist/Slider.css +1 -1
  71. package/dist/Slider.mjs +1 -1
  72. package/dist/StatusCard.mjs +1 -1
  73. package/dist/Stepper.mjs +1 -1
  74. package/dist/Switch.mjs +1 -1
  75. package/dist/Table.mjs +1 -1
  76. package/dist/Tabs.mjs +1 -1
  77. package/dist/Tag.mjs +1 -1
  78. package/dist/TagGroup.mjs +1 -1
  79. package/dist/TaggedPagination.mjs +1 -1
  80. package/dist/Text.mjs +1 -1
  81. package/dist/TextInput.mjs +1 -1
  82. package/dist/ThemeProvider.mjs +1 -1
  83. package/dist/TimeField.mjs +1 -1
  84. package/dist/Toast.css +1 -1
  85. package/dist/Toast.mjs +1 -1
  86. package/dist/ToggleButton.css +1 -1
  87. package/dist/ToggleButton.mjs +1 -1
  88. package/dist/ToggleIconButton.mjs +1 -1
  89. package/dist/Toolbar.css +1 -1
  90. package/dist/Toolbar.mjs +1 -1
  91. package/dist/Tooltip.mjs +1 -1
  92. package/dist/TreeView.mjs +1 -1
  93. package/dist/UNSAFE_ListBox.mjs +1 -1
  94. package/dist/Virtualizer.mjs +1 -1
  95. package/dist/{chunk-XJGQXVMR.mjs → chunk-2BXXD6SW.mjs} +2 -2
  96. package/dist/{chunk-NCADIC3I.mjs → chunk-2EMOQIU7.mjs} +2 -2
  97. package/dist/{chunk-4FTKS25Q.mjs → chunk-2TH2QRSV.mjs} +2 -2
  98. package/dist/{chunk-JB3O4ABN.mjs → chunk-2V323KAD.mjs} +1 -1
  99. package/dist/{chunk-42B24XCP.mjs → chunk-2YTKLY4F.mjs} +1 -1
  100. package/dist/{chunk-PJM4COF5.mjs → chunk-4C6AJ3TZ.mjs} +2 -2
  101. package/dist/{chunk-NPJX2CEI.mjs → chunk-5HK56IXH.mjs} +1 -1
  102. package/dist/chunk-5IXSPQRW.mjs +10 -0
  103. package/dist/{chunk-IDEAEEBP.mjs → chunk-5K46OAX5.mjs} +2 -2
  104. package/dist/chunk-5MUEJ5WI.mjs +10 -0
  105. package/dist/chunk-6EFNC443.mjs +10 -0
  106. package/dist/{chunk-F6JQN7YM.mjs → chunk-6JWACCHG.mjs} +2 -2
  107. package/dist/{chunk-XVBOKL6D.mjs → chunk-6NQPENP4.mjs} +1 -1
  108. package/dist/{chunk-YT36W3OS.mjs → chunk-6PXOVWVM.mjs} +2 -2
  109. package/dist/chunk-6V7BIFQD.mjs +10 -0
  110. package/dist/chunk-6VXBFM6Q.mjs +10 -0
  111. package/dist/{chunk-4BYKAG4W.mjs → chunk-7L5UOGZA.mjs} +1 -1
  112. package/dist/{chunk-DF3BVX5Z.mjs → chunk-7MQBBSZ2.mjs} +2 -2
  113. package/dist/{chunk-O66FNQSB.mjs → chunk-7P322KP4.mjs} +1 -1
  114. package/dist/{chunk-UCZZLAPB.mjs → chunk-AW5WDI2U.mjs} +1 -1
  115. package/dist/chunk-AYBACQ6U.mjs +10 -0
  116. package/dist/chunk-B237CJT4.mjs +10 -0
  117. package/dist/{chunk-PBFIKNYZ.mjs → chunk-B6U6JHD4.mjs} +1 -1
  118. package/dist/{chunk-VHDXSFQC.mjs → chunk-BBZ2I3RF.mjs} +2 -2
  119. package/dist/chunk-BCENUHNO.mjs +10 -0
  120. package/dist/{chunk-DXP33KAB.mjs → chunk-BGHBSM3K.mjs} +2 -2
  121. package/dist/chunk-BIDNNBRG.mjs +10 -0
  122. package/dist/chunk-BROSGYL3.mjs +10 -0
  123. package/dist/{chunk-BW4VAHXR.mjs → chunk-C7AUJO36.mjs} +2 -2
  124. package/dist/{chunk-THRAJMLX.mjs → chunk-CCA2ABXO.mjs} +2 -2
  125. package/dist/{chunk-N7MTFSWR.mjs → chunk-CUOTJ7AP.mjs} +2 -2
  126. package/dist/chunk-CYTHB4M4.mjs +10 -0
  127. package/dist/chunk-DDLZ6CKC.mjs +10 -0
  128. package/dist/chunk-DMJHCNBU.mjs +10 -0
  129. package/dist/{chunk-HFVJXZBG.mjs → chunk-E3DMXJIC.mjs} +2 -2
  130. package/dist/{chunk-KG5PDPBK.mjs → chunk-E3QDPL77.mjs} +2 -2
  131. package/dist/chunk-E5GYCA3P.mjs +10 -0
  132. package/dist/{chunk-LQMY6TXS.mjs → chunk-EGXILQNX.mjs} +1 -1
  133. package/dist/{chunk-75722G3R.mjs → chunk-EYKIXVM3.mjs} +2 -2
  134. package/dist/{chunk-XB657BXX.mjs → chunk-GI2O6H4I.mjs} +1 -1
  135. package/dist/chunk-GVI6EBGJ.mjs +10 -0
  136. package/dist/chunk-HK3CZVHY.mjs +10 -0
  137. package/dist/{chunk-WSCZ34XO.mjs → chunk-HVKYWSRF.mjs} +2 -2
  138. package/dist/chunk-ILAQFMYD.mjs +10 -0
  139. package/dist/chunk-ITWJSFYK.mjs +10 -0
  140. package/dist/{chunk-MFH2E2GU.mjs → chunk-IVC2BJRU.mjs} +1 -1
  141. package/dist/{chunk-TEQE6WCH.mjs → chunk-IXK6S6IH.mjs} +1 -1
  142. package/dist/{chunk-HXTAOYOD.mjs → chunk-IXRSSEHQ.mjs} +1 -1
  143. package/dist/{chunk-5ODZPQL2.mjs → chunk-JDIGAVFU.mjs} +2 -2
  144. package/dist/{chunk-C5P23FUW.mjs → chunk-K6HE4Z2Y.mjs} +1 -1
  145. package/dist/chunk-K73R5G6G.mjs +10 -0
  146. package/dist/chunk-KEAM6GSA.mjs +10 -0
  147. package/dist/{chunk-JBMVWRHN.mjs → chunk-KHOXLBPR.mjs} +2 -2
  148. package/dist/{chunk-5DOFIGHJ.mjs → chunk-KWHTLY23.mjs} +2 -2
  149. package/dist/{chunk-4NYPVKDO.mjs → chunk-L6S5GBKS.mjs} +2 -2
  150. package/dist/chunk-M7OLZJYB.mjs +10 -0
  151. package/dist/{chunk-VXB5SVQC.mjs → chunk-MAJ74VNE.mjs} +1 -1
  152. package/dist/{chunk-TDOAVBKD.mjs → chunk-MONDDKB4.mjs} +2 -2
  153. package/dist/chunk-N26C7NYZ.mjs +10 -0
  154. package/dist/{chunk-P5GO3XIS.mjs → chunk-N6VKP3UH.mjs} +1 -1
  155. package/dist/chunk-NADBGP35.mjs +10 -0
  156. package/dist/chunk-NMSOOQB2.mjs +10 -0
  157. package/dist/{chunk-ENDOKA57.mjs → chunk-NQO6OQT6.mjs} +1 -1
  158. package/dist/{chunk-246VHB32.mjs → chunk-NUYBQ7KP.mjs} +1 -1
  159. package/dist/{chunk-77BAFSDX.mjs → chunk-NZQVKNP4.mjs} +2 -2
  160. package/dist/{chunk-K3S22PMF.mjs → chunk-P37WUXAI.mjs} +2 -2
  161. package/dist/{chunk-T3AMYEKR.mjs → chunk-P5LSMA24.mjs} +3 -3
  162. package/dist/{chunk-CSPZMYVG.mjs → chunk-PA3THES4.mjs} +1 -1
  163. package/dist/chunk-PG3WDHSK.mjs +10 -0
  164. package/dist/{chunk-GZ5ZWXIC.mjs → chunk-PNBYTIUO.mjs} +1 -1
  165. package/dist/{chunk-7HZ5JFYX.mjs → chunk-QDQPVCXN.mjs} +2 -2
  166. package/dist/{chunk-MXKP7NQ4.mjs → chunk-QSSCSN5S.mjs} +1 -1
  167. package/dist/chunk-QXOG2ISL.mjs +10 -0
  168. package/dist/{chunk-EV24JU64.mjs → chunk-QYTY3KJR.mjs} +2 -2
  169. package/dist/{chunk-3CWP2VCB.mjs → chunk-R2OV7FJO.mjs} +2 -2
  170. package/dist/{chunk-HLDCVJXD.mjs → chunk-RILRXWGE.mjs} +1 -1
  171. package/dist/{chunk-WOVAT6U4.mjs → chunk-RJZZIVSY.mjs} +2 -2
  172. package/dist/chunk-RO5ZRU3Y.mjs +10 -0
  173. package/dist/chunk-RSTHM3ZF.mjs +10 -0
  174. package/dist/{chunk-FTYXFTJV.mjs → chunk-SBR5UAUY.mjs} +2 -2
  175. package/dist/chunk-SHJ2TJYG.mjs +10 -0
  176. package/dist/{chunk-DRIHXAP3.mjs → chunk-SYFSGF73.mjs} +2 -2
  177. package/dist/{chunk-J7EAQSKX.mjs → chunk-SZTFMBPY.mjs} +1 -1
  178. package/dist/chunk-T4R3EXGI.mjs +10 -0
  179. package/dist/{chunk-WXWGGDTG.mjs → chunk-TBCZKWGQ.mjs} +2 -2
  180. package/dist/{chunk-JJPCZOOI.mjs → chunk-TCCQDGMI.mjs} +1 -1
  181. package/dist/{chunk-IHLJTHGQ.mjs → chunk-TDYBXLYP.mjs} +1 -1
  182. package/dist/{chunk-MI7DCFP2.mjs → chunk-TTYRHIRQ.mjs} +1 -1
  183. package/dist/{chunk-OC42IZG2.mjs → chunk-UBFMOTBM.mjs} +2 -2
  184. package/dist/chunk-UCPPKNGF.mjs +10 -0
  185. package/dist/{chunk-EK3RIYMV.mjs → chunk-UEDBY5JI.mjs} +1 -1
  186. package/dist/{chunk-ECPG4S5O.mjs → chunk-UN7XC7QV.mjs} +2 -2
  187. package/dist/{chunk-JUXBZ2ZN.mjs → chunk-UT2I4K7L.mjs} +1 -1
  188. package/dist/{chunk-J7K7I5U2.mjs → chunk-V37GPPZD.mjs} +1 -1
  189. package/dist/chunk-VAFIUM63.mjs +29 -0
  190. package/dist/{chunk-KKJ6XIU3.mjs → chunk-VIVNQZYK.mjs} +2 -2
  191. package/dist/{chunk-2JANDORZ.mjs → chunk-VOSSQAHC.mjs} +1 -1
  192. package/dist/chunk-VZFS4QRW.mjs +10 -0
  193. package/dist/chunk-X5Z54UUE.mjs +10 -0
  194. package/dist/{chunk-RJWPSJX2.mjs → chunk-X6IJEPSH.mjs} +1 -1
  195. package/dist/{chunk-7GJMJTRL.mjs → chunk-XEGXSFIP.mjs} +1 -1
  196. package/dist/{chunk-JQ4ZGZPV.mjs → chunk-XF5UMU6D.mjs} +3 -3
  197. package/dist/{chunk-5YYWD7PK.mjs → chunk-XJ2DFV56.mjs} +1 -1
  198. package/dist/{chunk-NSC53QWT.mjs → chunk-XUJJMAKM.mjs} +1 -1
  199. package/dist/{chunk-U2ODAIZG.mjs → chunk-XZSDCUID.mjs} +1 -1
  200. package/dist/{chunk-RF4E6MLM.mjs → chunk-Y3YZMICA.mjs} +1 -1
  201. package/dist/{chunk-TO6OQF2Y.mjs → chunk-YKMSINHH.mjs} +2 -2
  202. package/dist/{chunk-X3NOIEDZ.mjs → chunk-YWCU4PP7.mjs} +2 -2
  203. package/dist/chunk-YWQXHVMW.mjs +10 -0
  204. package/dist/{chunk-FOEGHU3P.mjs → chunk-YX2ASVM3.mjs} +1 -1
  205. package/dist/{chunk-N4UAXVES.mjs → chunk-Z4HTFTPM.mjs} +2 -2
  206. package/dist/chunk-ZLZAFTSD.mjs +10 -0
  207. package/dist/hooks/useContainerScopedRef.mjs +1 -1
  208. package/dist/hooks/useDevice.mjs +1 -1
  209. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  210. package/dist/hooks/useLocalStorage.mjs +1 -1
  211. package/dist/hooks/useMutationObserver.mjs +1 -1
  212. package/dist/hooks/usePortalContainer.mjs +1 -1
  213. package/dist/hooks/usePreventFocus.mjs +1 -1
  214. package/dist/hooks/useResizeObserver.mjs +1 -1
  215. package/dist/hooks/useTextSelection.mjs +1 -1
  216. package/dist/hooks/useUndoRedo.mjs +1 -1
  217. package/dist/index.css +1 -1
  218. package/dist/index.d.ts +46 -31
  219. package/dist/index.js +19 -19
  220. package/dist/index.mjs +1 -1
  221. package/dist/utils/dom.mjs +1 -1
  222. package/dist/utils/isInShadowDOM.mjs +1 -1
  223. package/dist/utils/keyboards.mjs +1 -1
  224. package/package.json +6 -6
  225. package/sbom.json +27 -77
  226. package/dist/chunk-26T2EPFD.mjs +0 -29
  227. package/dist/chunk-2WAKHFPS.mjs +0 -10
  228. package/dist/chunk-3NQY5GPQ.mjs +0 -10
  229. package/dist/chunk-44OUOGJ4.mjs +0 -10
  230. package/dist/chunk-4N6CLPAY.mjs +0 -10
  231. package/dist/chunk-5PIO6M4F.mjs +0 -10
  232. package/dist/chunk-5ULL6IBX.mjs +0 -10
  233. package/dist/chunk-6IRWW75G.mjs +0 -10
  234. package/dist/chunk-6ZFBX7C7.mjs +0 -10
  235. package/dist/chunk-AMQX3KZR.mjs +0 -10
  236. package/dist/chunk-AZRPXTYJ.mjs +0 -10
  237. package/dist/chunk-BKDQLDOK.mjs +0 -10
  238. package/dist/chunk-BXSJTXXY.mjs +0 -10
  239. package/dist/chunk-CIIO5D3X.mjs +0 -10
  240. package/dist/chunk-E6VOSF6Z.mjs +0 -10
  241. package/dist/chunk-ELXWR5TS.mjs +0 -10
  242. package/dist/chunk-FJ2JRD3H.mjs +0 -10
  243. package/dist/chunk-HWUESZY2.mjs +0 -10
  244. package/dist/chunk-I4WMXV4T.mjs +0 -10
  245. package/dist/chunk-IW4GXU75.mjs +0 -10
  246. package/dist/chunk-J3MJZQUJ.mjs +0 -10
  247. package/dist/chunk-J6TYT6BF.mjs +0 -10
  248. package/dist/chunk-K4N7GVEI.mjs +0 -10
  249. package/dist/chunk-L452ID76.mjs +0 -10
  250. package/dist/chunk-LLAMYDGW.mjs +0 -10
  251. package/dist/chunk-LLVFPC5Q.mjs +0 -10
  252. package/dist/chunk-NHD7I3X2.mjs +0 -10
  253. package/dist/chunk-PF3OQKXP.mjs +0 -10
  254. package/dist/chunk-QY3O34WX.mjs +0 -10
  255. package/dist/chunk-ROHLZINC.mjs +0 -10
  256. package/dist/chunk-TIHKHXTS.mjs +0 -10
  257. package/dist/chunk-UVVONIZB.mjs +0 -10
  258. package/dist/chunk-WC2NUASA.mjs +0 -10
  259. package/dist/chunk-WDJ4GXWF.mjs +0 -10
  260. package/dist/chunk-Y45SV547.mjs +0 -10
  261. package/dist/chunk-YVYMYKYN.mjs +0 -10
  262. package/dist/chunk-ZREX7XOO.mjs +0 -10
  263. /package/dist/{chunk-EZXMEGV7.mjs → chunk-G6VX4SU6.mjs} +0 -0
  264. /package/dist/{chunk-FXCHST4Z.mjs → chunk-JQQGRJ5J.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {j,l,m,k,o,i,h}from'./chunk-EYKIXVM3.mjs';import {a as a$3}from'./chunk-UN7XC7QV.mjs';import {a as a$2}from'./chunk-KCHAWPUN.mjs';import {b}from'./chunk-AYBACQ6U.mjs';import {a}from'./chunk-F3HQNHR5.mjs';import {e}from'./chunk-B7PSE5KC.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import P,{useEffect,useContext}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var I="xyd2ss0 _1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z6sa _1yep5z6sb _1yep5z6sc _1yep5z6um _1yep5z6un _1yep5z6uo _1yep5z6vs _1yep5z6vt _1yep5z6vu _1yep5z6tg _1yep5z6th _1yep5z6ti _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618r _1yep5z618q _1yep5z614z _1yep5z618u _1yep5z612s";var z=e=>e!=null&&typeof e=="object"&&!(Symbol.iterator in e);function G(e,o,r){let i=z(o)||z(r),s=o!=null&&!z(o)||r!=null&&!z(r);return e&&s?"Menu: an object `selectionMode` expects `selectedKeys`/`defaultSelectedKeys` to be records keyed by section id.":!e&&i?"Menu: a per-section `selectedKeys`/`defaultSelectedKeys` record requires the object form of `selectionMode`.":null}var Q=P.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:r,isDisabled:i,contentClassName:s,placement:l$1="bottom start",isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z,triggerLabel:x,renderTrigger:b$1=({buttonProps:u,ref:y})=>jsx(b,{...u,variant:"popover",ref:y,"data-testid":"menu-trigger"}),portalContainer:$,selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disabledKeys:h,disallowEmptySelection:N,itemClassName:C,optionClassName:R,optionStyle:ee,renderOption:oe,...O},re)=>{let u=a($),y=m!=null&&typeof m=="object",A=P.useMemo(()=>h==null?void 0:new Set(h),[h]),te=P.useMemo(()=>C?(ne,ie)=>a$1(C,a$2(R,ne,ie)):R,[C,R]),B=G(y,v,S);if(B)throw new Error(B);return useEffect(()=>{!x&&!b$1&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[b$1,x]),jsxs(j,{defaultOpen:e,onOpenChange:o,isOpen:r,children:[jsx(W,{isDisabled:i,renderTrigger:b$1,triggerLabel:x}),jsx(X,{placement:l$1,isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z||2,className:"BaselineUI-Menu-Popover",portalContainer:u,children:jsx(l,{...O,disabledKeys:A,...y?{}:{selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N},className:a$1(I,s),ref:re,children:V(O.items,u,{onAction:O.onAction,disabledKeys:A,contentClassName:s,optionClassName:te,optionStyle:ee,renderOption:oe,selection:y?{modes:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N}:void 0})})})]})});function V(e,o$1,r){let{onAction:i,disabledKeys:s,contentClassName:l$1,selection:a,...c}=r;return e.map((t,M)=>{if("children"in t){let p=t,d=a?.modes[p.id];return jsx(m,{section:p,componentName:"Menu",isFirstCollectionItem:M===0,showSectionHeader:!!p.title,...c,...d?{selectionMode:d,selectedKeys:a?.selectedKeys?.[p.id],defaultSelectedKeys:a?.defaultSelectedKeys?.[p.id],disabledKeys:s,disallowEmptySelection:a?.disallowEmptySelection,onSelectionChange:_=>{a?.onSelectionChange?.(_,{sectionId:p.id});}}:{}},p.id)}return t.items?jsxs(k,{children:[jsx(o,{item:t,componentName:"Menu",...c}),jsx(X,{className:"BaselineUI-Menu-SubmenuPopover",portalContainer:o$1,children:jsx(l,{className:a$1(I,l$1),onAction:i,disabledKeys:s,children:V(t.items,o$1,r)})})]},t.id):jsx(o,{item:t,componentName:"Menu",...c},t.id)})}var W=P.forwardRef(({renderTrigger:e,triggerLabel:o,isDisabled:r,...i$1},s)=>{let l=useContext(i);return e?.({buttonProps:{...i$1,isDisabled:r,label:typeof o=="function"?o(l?.isOpen||false):o,isOpen:l?.isOpen||false,className:"BaselineUI-Menu-Trigger"},ref:s})});W.displayName="MyTrigger";var X=({children:e$1,...o})=>{let r=useContext(i),[i$1]=e(o,void 0,h);return r?.isOpen?jsx(a$3,{...i$1,state:r,children:e$1}):null};Q.displayName="Menu";export{Q as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$9}from'./chunk-TJEK54BW.mjs';import {c as c$1,d}from'./chunk-UBFMOTBM.mjs';import {a as a$8}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-2V323KAD.mjs';import {a as a$c}from'./chunk-34TYNTXM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$a}from'./chunk-D3IZ4HBL.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$1}from'./chunk-BGMVPFYK.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {q}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$b}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var I=new WeakMap;function h(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:s,shouldSelectOnPressUp:r}=a,{selectionManager:o,selectedKey:c$1}=e,l=i===c$1,n=s||e.isDisabled||e.selectionManager.isDisabled(i),p=e.collection.getItem(i),{itemProps:b,isPressed:m}=d({selectionManager:o,key:i,ref:t,isDisabled:n,shouldSelectOnPressUp:r??p?.props.href!=null,linkBehavior:"selection"}),d$2=h(e,i,"tab"),P=h(e,i,"tabpanel"),{tabIndex:L}=b,g=a$b(p?.props,{labelable:true});delete g.id;let x=q(p?.props),{focusableProps:v}=d$1({...p?.props,isDisabled:n},t);return {tabProps:c(g,v,x,b,{id:d$2,"aria-selected":l,"aria-disabled":n||void 0,"aria-controls":l?P:void 0,tabIndex:n?void 0:L,role:"tab"}),isSelected:l,isDisabled:n,isPressed:m}}function A(a,e,t){let i=a$c(t)?void 0:0,s=h(e,a.id??e?.selectedKey,"tabpanel"),r=a$a({...a,id:s,"aria-labelledby":h(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var z=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,s=new Set){this.collection=e,this.flipDirection=t==="rtl"&&i==="horizontal",this.disabledKeys=s,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:s="automatic"}=a,{collection:r,selectionManager:o,disabledKeys:c$3}=e,{direction:l}=b(),n=useMemo(()=>new z(r,l,i,c$3),[r,c$3,i,l]),{collectionProps:p}=c$1({ref:t,selectionManager:o,keyboardDelegate:n,selectOnFocus:s==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),b$1=c$2();I.set(e,b$1);let m=a$a({...a,id:b$1});return {tabListProps:{...c(p,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$9({...a,onSelectionChange:a.onSelectionChange?o=>{o!=null&&a.onSelectionChange?.(o);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:s}=e,r=useRef(s);return useEffect(()=>{let o=s;a.selectedKey==null&&(t.isEmpty||o==null||!i.getItem(o))&&(o=Z(i,e.disabledKeys),o!=null&&t.setSelectedKeys([o])),(o!=null&&t.focusedKey==null||!t.isFocused&&o!==r.current)&&t.setFocusedKey(o),r.current=o;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:s}=a,{focusProps:r,isFocusVisible:o}=a$5();if(!s?.value)return null;let{className:c$1,style:l,"data-block-id":n}=s.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:o},"Baseline-Tabs-TabPanel",c$1),"data-block-id":n,style:l,children:s?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:s="primary",actions:r,onRemove:o,"data-block-id":c,...l},n)=>{let p=N({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),b=R.useRef(null),{tabListProps:m}=O({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},p,b);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:n,"data-block-id":c,children:[jsxs("div",{className:a$3(se({variant:s}),i),style:t,children:[jsx("div",{...m,className:ae({variant:s}),ref:b,children:[...p.collection].map(d=>(a$1(d.value,"TabItem requires a value prop"),jsx(le,{item:d,state:p,onRemove:o,variant:s},d.key)))}),r?.map((d,P)=>jsx("div",{className:ee,children:jsx(a$2,{...d,variant:"secondary",size:"sm",className:a$3(ie,d.className)})},P))]}),jsx(oe,{state:p},p.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:s,value:r}=a,o=R.useRef(null),{tabProps:c$1,isSelected:l,isDisabled:n}=C({key:s},t,o),{hoverProps:p,isHovered:b}=a$4({});a$1(r,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:P,titleClassName:L}=r,{focusProps:g,isFocusVisible:x,isFocused:v}=a$5(),{keyboardProps:de}=a$6({onKeyDown:w=>{w.key==="Backspace"&&e?e(s):w.continuePropagation();}}),ce=a$7({"data-selected":l,"data-disabled":n,"data-focused":v,"data-hovered":b,"data-focus-visible":x});return jsxs("div",{...c(de,c$1,p,g,ce),className:a$3(te({isHovered:b,isSelected:l,isFocusVisible:x,isDisabled:n,variant:i}),"BaselineUI-Tabs-TabButton",L),style:P,ref:o,children:[d?jsx(d,{size:20,className:k({isHovered:b,isSelected:l,isDisabled:n,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(s);},excludeFromTabOrder:true,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:l||v||b?1:0},className:k({isHovered:b,isSelected:l,isDisabled:n,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let s=useMemo(()=>R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value}).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:s,children:r=>jsx(a$8,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-5ODZPQL2.mjs';import {a as a$1}from'./chunk-NSC53QWT.mjs';import {a as a$8}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-RXSYDMT6.mjs';import {a as a$9}from'./chunk-X3AXUU3H.mjs';import {a as a$6}from'./chunk-YS3Y5KGV.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1,a as a$b}from'./chunk-JDLUGVXG.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {b}from'./chunk-JDIGAVFU.mjs';import {a as a$1}from'./chunk-XUJJMAKM.mjs';import {a as a$8}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-RXSYDMT6.mjs';import {a as a$9}from'./chunk-X3AXUU3H.mjs';import {a as a$6}from'./chunk-YS3Y5KGV.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1,a as a$b}from'./chunk-JDLUGVXG.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {b}from'./chunk-5ODZPQL2.mjs';import {a as a$1}from'./chunk-NSC53QWT.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function _(n,r,t){let{isDisabled:s}=n,a=c$1(),o=c$1(),p=b$1(),i=useRef(null),f=useCallback(()=>{i.current=requestAnimationFrame(()=>{t.current&&t.current.setAttribute("hidden","until-found");}),flushSync(()=>{r.toggle();});},[t,r]);a$a(t,"beforematch",f);let l=useRef(null);return a$b(()=>{if(i.current&&cancelAnimationFrame(i.current),t.current&&!p){let e=t.current;l.current==null||typeof e.getAnimations!="function"?r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto")):(e.setAttribute("hidden","until-found"),e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px")):r.isExpanded!==l.current&&(r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>{e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto");}).catch(()=>{})):(e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),window.getComputedStyle(e).height,e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>e.setAttribute("hidden","until-found")).catch(()=>{}))),l.current=r.isExpanded;}},[s,t,r.isExpanded,p]),useEffect(()=>()=>{i.current&&cancelAnimationFrame(i.current);},[]),{buttonProps:{id:a,"aria-expanded":r.isExpanded,"aria-controls":o,onPress:e=>{!s&&e.pointerType!=="keyboard"&&r.toggle();},isDisabled:s,onPressStart(e){e.pointerType==="keyboard"&&!s&&r.toggle();}},panelProps:{id:o,role:"group","aria-labelledby":a,"aria-hidden":!r.isExpanded,hidden:p?!r.isExpanded:void 0}}}function g(n){let[r,t]=a$9(n.isExpanded,n.defaultExpanded||false,n.onExpandedChange),s=useCallback(()=>{t(true);},[t]),a=useCallback(()=>{t(false);},[t]),o=useCallback(()=>{t(!r);},[t,r]);return {isExpanded:r,setExpanded:t,expand:s,collapse:a,toggle:o}}var q=a({defaultClassName:"wf9zfn0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6m1 _1yep5z6lz",variantClassNames:{variant:{active:"_1yep5z6136 _1yep5z6124",warning:"_1yep5z6136 _1yep5z6124",error:"_1yep5z6136 _1yep5z6124",success:"_1yep5z6136 _1yep5z6124",denied:"_1yep5z6136 _1yep5z6124","warning-tinted":"_1yep5z612x _1yep5z611u","error-tinted":"_1yep5z612p _1yep5z611m","active-tinted":"_1yep5z6131 _1yep5z611y","success-tinted":"_1yep5z612t _1yep5z611q","denied-tinted":"_1yep5z6137 _1yep5z6127"}},defaultVariants:{},compoundVariants:[]}),M=a({defaultClassName:"wf9zfnb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ly _1yep5z6ln _1yep5z6la _1yep5z6lr _1yep5z6ls _1yep5z6lp",variantClassNames:{isFocusVisible:{true:"_1yep5z617w _1yep5z6140 _1yep5z617y"},isHovered:{true:"wf9zfnd"},variant:{active:"wf9zfne",warning:"wf9zfnf",error:"wf9zfng",success:"wf9zfnh",denied:"wf9zfni","warning-tinted":"wf9zfnj","error-tinted":"wf9zfnk","active-tinted":"wf9zfnl","success-tinted":"wf9zfnm","denied-tinted":"wf9zfnn"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocusVisible:false},"_1yep5z61ty _1yep5z61tx"],[{variant:"active",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"warning",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"error",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"success",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"denied",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"active-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61q1"],[{variant:"warning-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61px"],[{variant:"error-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61pp"],[{variant:"success-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61pt"],[{variant:"denied-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61q6"]]}),k="wf9zfno",L={active:"wf9zfnp",warning:"wf9zfnq",error:"wf9zfnr",success:"wf9zfns",denied:"wf9zfnt","active-tinted":"wf9zfnu","warning-tinted":"wf9zfnv","error-tinted":"wf9zfnw","success-tinted":"wf9zfnx","denied-tinted":"wf9zfny"},O=a({defaultClassName:"wf9zfnz _1yep5z6f5",variantClassNames:{isPopupOpen:{true:"wf9zfn10",false:"wf9zfn11"}},defaultVariants:{},compoundVariants:[]});var se={warning:WarningIcon,error:ErrorCircleIcon,info:CircleFilledIcon,success:CheckmarkIcon},G=W.forwardRef(({className:n,style:r,children:t,title:s,description:a,variant:o="active",icon:p=se[o],headerClassName:i,headerStyle:f,panelClassName:l,panelStyle:e,shouldTruncateTitle:d,...y},m)=>{let u=g(y),v=useRef(null),z=useRef(null),{buttonProps:K,panelProps:Q}=_(y,u,z);return jsxs("div",{className:a$2(q({variant:o}),"BaselineUI-Disclosure",n),style:r,ref:m,"data-expanded":u.isExpanded,children:[jsx(J,{ref:v,...K,variant:o,title:s,description:a,icon:p,className:i,style:f,isExpanded:u.isExpanded,shouldTruncateTitle:d}),jsxs("div",{ref:z,...Q,className:a$2(k,"BaselineUI-Disclosure-Panel",l),style:e,"data-expanded":u.isExpanded,children:[jsx(a$1,{className:L[o]}),t]})]})});G.displayName="Disclosure";var J=W.forwardRef(({className:n,style:r,variant:t="active",icon:s,title:a,description:o,shouldTruncateTitle:p,...i},f)=>{let{isFocusVisible:l,focusProps:e}=a$3(),{hoverProps:d,isHovered:y}=a$4({}),m=a$5(f),{buttonProps:u,isPressed:v}=a$6(i,m),z=a$7({"data-focus-visible":l,"data-hovered":y,"data-pressed":v});return jsx("button",{...c(u,e,d),ref:m,className:a$2(M({isFocusVisible:l,isHovered:y,variant:t}),"BaselineUI-Disclosure-Header",n),style:r,...z,children:jsx(b,{title:a,description:o,variant:t,icon:s,shouldTruncateTitle:p,renderTrailingElement:()=>jsx(a$8,{padding:"sm",display:"inline-flex",children:jsx(CaretUpIcon,{size:12,className:O({isPopupOpen:i.isExpanded})})}),style:{border:"none"}})})});J.displayName="DisclosureHeader";export{G as a};
10
+ function _(n,r,s){let{isDisabled:t}=n,a=c$1(),o=c$1(),p=b$1(),i=useRef(null),f=useCallback(()=>{i.current=requestAnimationFrame(()=>{s.current&&s.current.setAttribute("hidden","until-found");}),flushSync(()=>{r.toggle();});},[s,r]);a$a(s,"beforematch",f);let l=useRef(null);return a$b(()=>{if(i.current&&cancelAnimationFrame(i.current),s.current&&!p){let e=s.current;l.current==null||typeof e.getAnimations!="function"?r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto")):(e.setAttribute("hidden","until-found"),e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px")):r.isExpanded!==l.current&&(r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>{e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto");}).catch(()=>{})):(e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),window.getComputedStyle(e).height,e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>e.setAttribute("hidden","until-found")).catch(()=>{}))),l.current=r.isExpanded;}},[t,s,r.isExpanded,p]),useEffect(()=>()=>{i.current&&cancelAnimationFrame(i.current);},[]),{buttonProps:{id:a,"aria-expanded":r.isExpanded,"aria-controls":o,onPress:e=>{!t&&e.pointerType!=="keyboard"&&r.toggle();},isDisabled:t,onPressStart(e){e.pointerType==="keyboard"&&!t&&r.toggle();}},panelProps:{id:o,role:"group","aria-labelledby":a,"aria-hidden":!r.isExpanded,hidden:p?!r.isExpanded:void 0}}}function g(n){let[r,s]=a$9(n.isExpanded,n.defaultExpanded||false,n.onExpandedChange),t=useCallback(()=>{s(true);},[s]),a=useCallback(()=>{s(false);},[s]),o=useCallback(()=>{s(!r);},[s,r]);return {isExpanded:r,setExpanded:s,expand:t,collapse:a,toggle:o}}var M=a({defaultClassName:"wf9zfn0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6mh _1yep5z6mf",variantClassNames:{variant:{active:"_1yep5z613y _1yep5z612s",warning:"_1yep5z613y _1yep5z612s",error:"_1yep5z613y _1yep5z612s",success:"_1yep5z613y _1yep5z612s",denied:"_1yep5z613y _1yep5z612s","warning-tinted":"_1yep5z613n _1yep5z612g","error-tinted":"_1yep5z613d _1yep5z6126","active-tinted":"_1yep5z613s _1yep5z612l","success-tinted":"_1yep5z613i _1yep5z612b","denied-tinted":"_1yep5z613z _1yep5z612v"}},defaultVariants:{},compoundVariants:[]}),k=a({defaultClassName:"wf9zfnb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6me _1yep5z6m3 _1yep5z6lq _1yep5z6m7 _1yep5z6m8 _1yep5z6m5",variantClassNames:{isFocusVisible:{true:"_1yep5z618s _1yep5z614w _1yep5z618u"},isHovered:{true:"wf9zfnd"},variant:{active:"wf9zfne",warning:"wf9zfnf",error:"wf9zfng",success:"wf9zfnh",denied:"wf9zfni","warning-tinted":"wf9zfnj","error-tinted":"wf9zfnk","active-tinted":"wf9zfnl","success-tinted":"wf9zfnm","denied-tinted":"wf9zfnn"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocusVisible:false},"_1yep5z61va _1yep5z61v9"],[{variant:"active",isHovered:true,isFocusVisible:false},"_1yep5z61ri"],[{variant:"warning",isHovered:true,isFocusVisible:false},"_1yep5z61ri"],[{variant:"error",isHovered:true,isFocusVisible:false},"_1yep5z61ri"],[{variant:"success",isHovered:true,isFocusVisible:false},"_1yep5z61ri"],[{variant:"denied",isHovered:true,isFocusVisible:false},"_1yep5z61ri"],[{variant:"active-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61rc"],[{variant:"warning-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61r7"],[{variant:"error-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61qx"],[{variant:"success-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61r2"],[{variant:"denied-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61ri"]]}),L="wf9zfno",q={active:"wf9zfnp",warning:"wf9zfnq",error:"wf9zfnr",success:"wf9zfns",denied:"wf9zfnt","active-tinted":"wf9zfnu","warning-tinted":"wf9zfnv","error-tinted":"wf9zfnw","success-tinted":"wf9zfnx","denied-tinted":"wf9zfny"},O=a({defaultClassName:"wf9zfnz _1yep5z6f9",variantClassNames:{isPopupOpen:{true:"wf9zfn10",false:"wf9zfn11"}},defaultVariants:{},compoundVariants:[]});var te={warning:WarningIcon,error:ErrorCircleIcon,info:CircleFilledIcon,success:CheckmarkIcon},G=W.forwardRef(({className:n,style:r,children:s,title:t,description:a,variant:o="active",icon:p=te[o],headerClassName:i,headerStyle:f,panelClassName:l,panelStyle:e,shouldTruncateTitle:d,...y},m)=>{let u=g(y),v=useRef(null),b=useRef(null),{buttonProps:K,panelProps:Q}=_(y,u,b);return jsxs("div",{className:a$2(M({variant:o}),"BaselineUI-Disclosure",n),style:r,ref:m,"data-expanded":u.isExpanded,children:[jsx(J,{ref:v,...K,variant:o,title:t,description:a,icon:p,className:i,style:f,isExpanded:u.isExpanded,shouldTruncateTitle:d}),jsxs("div",{ref:b,...Q,className:a$2(L,"BaselineUI-Disclosure-Panel",l),style:e,"data-expanded":u.isExpanded,children:[jsx(a$1,{className:q[o]}),s]})]})});G.displayName="Disclosure";var J=W.forwardRef(({className:n,style:r,variant:s="active",icon:t,title:a,description:o,shouldTruncateTitle:p,...i},f)=>{let{isFocusVisible:l,focusProps:e}=a$3(),{hoverProps:d,isHovered:y}=a$4({}),m=a$5(f),{buttonProps:u,isPressed:v}=a$6(i,m),b$1=a$7({"data-focus-visible":l,"data-hovered":y,"data-pressed":v});return jsx("button",{...c(u,e,d),ref:m,className:a$2(k({isFocusVisible:l,isHovered:y,variant:s}),"BaselineUI-Disclosure-Header",n),style:r,...b$1,children:jsx(b,{title:a,description:o,variant:s,icon:t,shouldTruncateTitle:p,renderTrailingElement:()=>jsx(a$8,{padding:"sm",display:"inline-flex",children:jsx(CaretUpIcon,{size:12,className:O({isPopupOpen:i.isExpanded})})}),style:{border:"none"}})})});J.displayName="DisclosureHeader";export{G as a};
@@ -0,0 +1,10 @@
1
+ import {b,a as a$5}from'./chunk-Y3YZMICA.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$1,f as f$1}from'./chunk-VZFS4QRW.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-EYKIXVM3.mjs';import {a as a$9}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-UN7XC7QV.mjs';import {b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-AKES5B6C.mjs';import {a as a$b}from'./chunk-CGFLGZL4.mjs';import {b as b$4}from'./chunk-AYBACQ6U.mjs';import {a as a$e}from'./chunk-6JWACCHG.mjs';import {a as a$4}from'./chunk-TDXALNX3.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-K6X2BHPP.mjs';import {a as a$c}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-3FYY26ED.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c,b as b$3}from'./chunk-TZ4MVY4E.mjs';import {g,e}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import z,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var Le=a({defaultClassName:"_18v88n10 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m3",variantClassNames:{labelPosition:{top:"_1yep5z6163 _1yep5z6164 _1yep5z6165",start:"_1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z617i _1yep5z617j _1yep5z617k _1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),Ne=a({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ey _1yep5z6m3 _1yep5z6me _1yep5z6m6 _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z611l"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),we=a({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6m0",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610x",warning:"_1yep5z6117"},isReadOnly:{true:"_1yep5z611s"}},defaultVariants:{},compoundVariants:[]}),Ie=a({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z613e",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z6190 _1yep5z618y _1yep5z613w _1yep5z618r _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61vj _1yep5z61vh _1yep5z61qi"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_18v88n1n"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61qj"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61qj"],[{isReadOnly:true,variant:"primary",isFocused:false},"_18v88n1o"]]}),Ee=a({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),Ve=a({defaultClassName:"_18v88n19 _1yep5z6jb _1yep5z6jc _1yep5z6jd",variantClassNames:{labelPosition:{top:"_1yep5z6tp _1yep5z6tq _1yep5z6tr",start:"_1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6163 _1yep5z6164 _1yep5z6165"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61tv _1yep5z61tw _1yep5z61tx"]]}),je="_18v88n1y",Oe=a({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isHovered:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isOpen:{true:"_1yep5z615b _1yep5z618p"}},defaultVariants:{},compoundVariants:[]});function F(n,s,c,p){if(s!=="number"||n===void 0||n==="")return n;let u=Number.parseFloat(n);if(Number.isNaN(u))return n;let t=u;return c!==void 0&&(t=Math.max(t,c)),p!==void 0&&(t=Math.min(t,p)),t===u?n:String(t)}function Me(n,s){return n.selectedKey==null||s!==n.selectedItem?.textValue}function Te({allowsCustomValue:n,onValueChange:s,inputType:c,minValue:p,maxValue:u},t,x,f){let[D,m]=useState(null),r=useRef(false),C=useRef(null),R=!Me(t,t.inputValue),L=(o,a)=>{C.current=a==null?null:{key:a,value:o},s?.({value:o,key:a});},N=o=>{!r.current||!Me(t,o)||(L(o,null),r.current=false);};useEffect(()=>{if(!s)return;let o=x.current,a=b=>{m(g(b));};return o?.addEventListener("focusin",a),()=>{o?.removeEventListener("focusin",a);}},[s,x,t.selectedKey]),useGranularEffect(()=>{if(t.selectedKey==null||t.selectedItem==null){t.selectionManager.isEmpty&&(C.current=null);return}let o=t.selectedKey,a=t.selectedItem.textValue,b=C.current?.key!==o;!b&&(C.current?.value===a||r.current&&!R)||(L(a,o),b&&(r.current=false));},[t.selectedKey,t.selectedItem?.textValue,R],[s,t.selectedItem]);let B=()=>{D===f.current&&n&&r.current&&(r.current=false);};useEffect(()=>{if(!s)return;let o=f.current,a=()=>{r.current=true;};return o?.addEventListener("input",a),()=>{o?.removeEventListener("input",a);}},[f,s]);let{keyboardProps:h}=a$c({isDisabled:!s,onKeyDown:o=>{if(n&&o.key==="Enter"&&r.current){let a=F(f.current?.value,c,p,u);N(a??""),r.current=false;}else o.key==="Escape"&&(t.selectedKey!=null&&(r.current=false),t.close());o.continuePropagation();}});return {inputProps:h,commitCustomValue:N,disarmPendingEdit:B}}var He=z.forwardRef(({renderOption:n,optionStyle:s,optionClassName:c,...p},u)=>jsx(a$1,{items:p.items,listBoxProps:{renderOption:n,optionStyle:s,optionClassName:c},children:t=>jsx(Fe,{...p,collection:t,ref:u})}));He.displayName="ComboBox";var Fe=z.forwardRef(({className:n,style:s,inputStyle:c$1,inputClassName:p,"data-block-id":u,"data-block-class":t,label:x,items:f$2,isInvalid:D=false,labelPosition:m="top",validationState:r="valid",variant:C="primary",toggleLabel:R,showIcon:L=true,filter:N,minValue:B,maxValue:h,inputType:o="text",onInputSubmit:a,onValueChange:b$5,tooltip:Se,collection:Ke,onTriggerPress:S,...e$1},qe)=>{let k=a$2(qe),{contains:Ae}=a$3({sensitivity:"base"}),_=b({...e$1,defaultFilter:N||Ae,defaultItems:f$2,collection:Ke,children:void 0,validationState:D?"invalid":"valid"}),K=z.useRef(null),v=z.useRef(null),q$1=z.useRef(null),M=z.useRef(null),A=z.useRef(null),{inputProps:Ue,commitCustomValue:We,disarmPendingEdit:Ge}=Te({onValueChange:b$5,allowsCustomValue:e$1.allowsCustomValue,inputType:o,minValue:B,maxValue:h},_,k,v),U=i=>{let d=F(i,o,B,h)??"";return d!==i&&!a&&!b$5&&a$i("bui.comboBox.clampNoCallback","ComboBox: minValue/maxValue clamped a value but no onInputSubmit or onValueChange callback is provided. The constraint cannot be enforced without a callback to notify the consumer."),a?.(d),d},W=()=>{let i=v.current?.value??"";!e$1.allowsCustomValue||!i||We(U(i));};a$4({ref:v,onInteractOutside:i=>{let d=g(i);if(e(k.current,d)||e(M.current,d))return;let P=v.current;if(!P||f(P)!==P){Ge();return}_.isOpen&&(W(),_.close());}});let{buttonProps:w,inputProps:Je,listBoxProps:G,labelProps:Qe,errorMessageProps:Xe,descriptionProps:Ye,validationErrors:Ze}=a$5({...e$1,onBlur:a$6(e$1.onBlur,W),inputRef:v,defaultItems:f$2,buttonRef:K,listBoxRef:q$1,popoverRef:M,validationState:r==="error"?"invalid":"valid"},_),J=e$1.errorMessage||Ze.join(" "),I=b$1({...e$1,errorMessage:J,descriptionProps:Ye,errorMessageProps:Xe,labelPosition:m});J&&(r="error");let{hoverProps:$e,isHovered:Q}=a$7({isDisabled:e$1.isDisabled}),{isFocused:X,focusProps:et,isFocusVisible:Y}=a$8(),Z=a$9({isReadOnly:e$1.isReadOnly,validationState:r}),tt=a$a({"data-read-only":e$1.isReadOnly,"data-disabled":e$1.isDisabled,"data-validation-state":r,"data-focused":X,"data-focus-visible":Y}),{labelProps:ot,fieldProps:rt}=a$b({label:x,"aria-label":e$1["aria-label"],"aria-labelledby":e$1["aria-labelledby"],"aria-describedby":e$1["aria-describedby"],"aria-details":e$1["aria-details"]}),{keyboardProps:at}=a$c({onKeyDown:i=>{e$1.allowsCustomValue&&i.key==="Enter"&&U(v.current?.value??"");}}),{tooltipProps:$}=a$d({tooltip:Se,label:e$1["aria-label"]}),{pressProps:nt}=d({onPress:S}),ee=R?.trim()||void 0,te=i=>{let{triggerProps:d,triggerRef:P}=i??{};return jsxs("div",{className:a$h(Le({labelPosition:m}),n,"BaselineUI-ComboBox"),"data-block-id":u,"data-block-class":t,style:s,ref:k,children:[x||m==="start"&&I?jsxs("div",{className:Ve({labelPosition:m,hasMessage:!!I}),children:[jsx("label",{...c(Qe,ot),className:Ee({isDisabled:e$1.isDisabled}),children:x}),m==="start"&&I]}):null,jsxs("div",{...$e,className:Ie({validationState:r,isHovered:Q,isFocused:X,variant:C,isReadOnly:!!e$1.isReadOnly,isDisabled:!!e$1.isDisabled}),ref:A,children:[jsx("input",{...c(nt,d,Je,Ue,et,tt,rt,at,o==="number"?{type:"number",min:B,max:h,onKeyDown:g=>{(g.key==="ArrowUp"||g.key==="ArrowDown")&&g.preventDefault();}}:null),id:e$1.id,ref:b$3(P,v),className:a$h(Ne({isDisabled:e$1.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",p),style:c$1}),Z&&L?jsx(Z,{className:we({validationState:r,isReadOnly:e$1.isReadOnly}),size:16}):null,jsx(b$4,{...w,onPressStart:g=>{w.onPressStart?.(g),S?.(g);},ref:K,"data-testid":"combobox-toggle-button",variant:"popover",label:null,"aria-label":ee??w["aria-label"],"aria-labelledby":ee?void 0:w["aria-labelledby"],className:Oe({isFocusVisible:!e$1.isDisabled&&!e$1.isReadOnly&&Y,isHovered:!e$1.isDisabled&&!e$1.isReadOnly&&Q,isOpen:_.isOpen})})]}),m==="top"&&I]})};return jsxs(Fragment,{children:[$?jsx(a$e,{...$,children:te}):te(),jsx(a$f,{ref:M,triggerRef:A,state:_,isNonModal:true,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(b$2.Provider,{value:_,children:jsx(a$g.Provider,{value:useMemo(()=>({...G,ref:q$1}),[G]),children:jsx(q,{selectionMode:"single",className:a$h(f$1,je,"BaselineUI-ComboBox-ListBox")})})})})]})});Fe.displayName="ComboBoxInner";export{He as a};
@@ -0,0 +1,10 @@
1
+ import {g as g$1}from'./chunk-SHJ2TJYG.mjs';import {g}from'./chunk-MRJFGHFW.mjs';import {g as g$2,f,a}from'./chunk-AUOQSTS5.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import {useState,useEffect}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var e=typeof document<"u"&&window.visualViewport;function d(){let x=b(),[h,E]=useState(()=>x?{width:0,height:0}:u());return useEffect(()=>{let m=t=>{E(r=>t.width===r.width&&t.height===r.height?r:t);},n=()=>{e&&e.scale>1||m(u());},l,a$1=t=>{e&&e.scale>1||g$1(g$2(t))&&(l=requestAnimationFrame(()=>{let r=f(a(g$2(t)));(!r||!g$1(r))&&m({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});}));};return m(u()),g()&&window.addEventListener("blur",a$1,true),e?e.addEventListener("resize",n):window.addEventListener("resize",n),()=>{cancelAnimationFrame(l),g()&&window.removeEventListener("blur",a$1,true),e?e.removeEventListener("resize",n):window.removeEventListener("resize",n);}},[]),h}function u(){return {width:e?Math.min(e.width*e.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:e?e.height*e.scale:document.documentElement.clientHeight}}export{d as a};
@@ -1,4 +1,4 @@
1
- import {a,b}from'./chunk-JQ4ZGZPV.mjs';import {b as b$1,a as a$3}from'./chunk-F2X474RV.mjs';import {a as a$1}from'./chunk-THRAJMLX.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-JDLUGVXG.mjs';import {a as a$4}from'./chunk-AUOQSTS5.mjs';/**
1
+ import {a,b}from'./chunk-XF5UMU6D.mjs';import {b as b$1,a as a$3}from'./chunk-F2X474RV.mjs';import {a as a$1}from'./chunk-CCA2ABXO.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-JDLUGVXG.mjs';import {a as a$4}from'./chunk-AUOQSTS5.mjs';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-ENDOKA57.mjs';import {a as a$1}from'./chunk-EK3RIYMV.mjs';/**
1
+ import {a}from'./chunk-NQO6OQT6.mjs';import {a as a$1}from'./chunk-UEDBY5JI.mjs';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {AvatarIcon as AvatarIcon$1}from'@baseline-ui/icons/16';import {AvatarIcon}from'@baseline-ui/icons/24';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {AvatarIcon as AvatarIcon$1}from'@baseline-ui/icons/16';import {AvatarIcon}from'@baseline-ui/icons/24';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {XIcon,CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import {themeVars}from'@baseline-ui/tokens';import h from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {XIcon,CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import {themeVars}from'@baseline-ui/tokens';import h from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-FXCHST4Z.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var x="_1w6k5xli";var y=a({defaultClassName:"_1w6k5xl1 _1yep5z6m1 _1yep5z6lz _1yep5z6g1 _1yep5z6h3",variantClassNames:{variant:{active:"_1w6k5xl2",warning:"_1w6k5xl3",error:"_1w6k5xl4",denied:"_1w6k5xl5",success:"_1w6k5xl6","active-tinted":"_1yep5z6184 _1yep5z611y _1yep5z6131","warning-tinted":"_1yep5z6184 _1yep5z611u _1yep5z612x","error-tinted":"_1yep5z6184 _1yep5z611m _1yep5z612p","denied-tinted":"_1yep5z6184 _1yep5z6127 _1yep5z6137","success-tinted":"_1yep5z6184 _1yep5z611q _1yep5z612t"}},defaultVariants:{},compoundVariants:[]}),u=a({defaultClassName:"_1w6k5xlc",variantClassNames:{variant:{active:"_1yep5z610u",warning:"_1yep5z610q",error:"_1yep5z610i",denied:"_1yep5z610x",success:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[]}),o="_1w6k5xlk",_="_1w6k5xlj";var {support:l,icon:f}=themeVars.color,D={warning:jsx(WarningIcon,{size:16,color:l.warning.strong}),error:jsx(ErrorCircleIcon,{size:16,color:l.error.strong}),active:jsx(a$1,{padding:"xs",display:"flex",alignItems:"center",children:jsx(CircleFilledIcon,{size:16,color:f.interactive.enabled,className:x})}),success:jsx(CheckmarkIcon,{size:16,color:l.success.strong}),denied:jsx(XIcon,{size:16,color:f.primary})},C=h.forwardRef(({className:w,style:z,variant:s="active",icon:c,title:n,description:m,renderTrailingElement:g,shouldTruncateTitle:r},k)=>{let d=u({variant:s.split("-")[0]});return jsxs(a$1,{padding:"lg",display:"flex",flexDirection:"row",gap:"md",width:"full",alignItems:"center",borderRadius:"sm",className:a$2(y({variant:s}),"BaselineUI-StatusCard",w),style:z,ref:k,children:[jsxs(a$1,{display:"flex",alignItems:"center",flexDirection:"row",gap:"md",flex:1,className:r?o:void 0,children:[jsx(a$1,{display:"flex",padding:"xs",alignItems:"center",flexShrink:0,className:"BaselineUI-StatusCard-Icon",children:c?jsx(c,{className:d,size:16}):D[s.split("-")[0]]}),jsxs(a$1,{display:"flex",flexDirection:"column",gap:"sm",className:r?o:void 0,children:[jsx(a$1,{typography:"label.md.medium",elementType:"h4",color:"text.primary",className:a$2("BaselineUI-StatusCard-Title",r&&_),children:r?jsx("span",{title:n,children:n}):n}),m?jsx(a$1,{typography:"label.sm.regular",elementType:"span",className:a$2(d,"BaselineUI-StatusCard-Description"),children:m}):null]})]}),g?.()]})});C.displayName="StatusCard";export{D as a,C as b};
10
+ var x="_1w6k5xli";var y=a({defaultClassName:"_1w6k5xl1 _1yep5z6mh _1yep5z6mf _1yep5z6g9 _1yep5z6hf",variantClassNames:{variant:{active:"_1w6k5xl2",warning:"_1w6k5xl3",error:"_1w6k5xl4",denied:"_1w6k5xl5",success:"_1w6k5xl6","active-tinted":"_1yep5z6190 _1yep5z612l _1yep5z613s","warning-tinted":"_1yep5z6190 _1yep5z612g _1yep5z613n","error-tinted":"_1yep5z6190 _1yep5z6126 _1yep5z613d","denied-tinted":"_1yep5z6190 _1yep5z612v _1yep5z613z","success-tinted":"_1yep5z6190 _1yep5z612b _1yep5z613i"}},defaultVariants:{},compoundVariants:[]}),f=a({defaultClassName:"_1w6k5xlc",variantClassNames:{variant:{active:"_1yep5z611d",warning:"_1yep5z6118",error:"_1yep5z610y",denied:"_1yep5z611h",success:"_1yep5z6113"}},defaultVariants:{},compoundVariants:[]}),o="_1w6k5xlk",_="_1w6k5xlj";var {support:l,icon:u}=themeVars.color,D={warning:jsx(WarningIcon,{size:16,color:l.warning.strong}),error:jsx(ErrorCircleIcon,{size:16,color:l.error.strong}),active:jsx(a$1,{padding:"xs",display:"flex",alignItems:"center",children:jsx(CircleFilledIcon,{size:16,color:u.interactive.enabled,className:x})}),success:jsx(CheckmarkIcon,{size:16,color:l.success.strong}),denied:jsx(XIcon,{size:16,color:u.primary})},C=h.forwardRef(({className:w,style:z,variant:s="active",icon:c,title:n,description:m,renderTrailingElement:g,shouldTruncateTitle:r},k)=>{let d=f({variant:s.split("-")[0]});return jsxs(a$1,{padding:"lg",display:"flex",flexDirection:"row",gap:"md",width:"full",alignItems:"center",borderRadius:"sm",className:a$2(y({variant:s}),"BaselineUI-StatusCard",w),style:z,ref:k,children:[jsxs(a$1,{display:"flex",alignItems:"center",flexDirection:"row",gap:"md",flex:1,className:r?o:void 0,children:[jsx(a$1,{display:"flex",padding:"xs",alignItems:"center",flexShrink:0,className:"BaselineUI-StatusCard-Icon",children:c?jsx(c,{className:d,size:16}):D[s.split("-")[0]]}),jsxs(a$1,{display:"flex",flexDirection:"column",gap:"sm",className:r?o:void 0,children:[jsx(a$1,{typography:"label.md.medium",elementType:"h4",color:"text.primary",className:a$2("BaselineUI-StatusCard-Title",r&&_),children:r?jsx("span",{title:n,children:n}):n}),m?jsx(a$1,{typography:"label.sm.regular",elementType:"span",className:a$2(d,"BaselineUI-StatusCard-Description"),children:m}):null]})]}),g?.()]})});C.displayName="StatusCard";export{D as a,C as b};
@@ -1,4 +1,4 @@
1
- import {a as a$4}from'./chunk-IHLJTHGQ.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {d}from'./chunk-BGMVPFYK.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {d as d$1}from'./chunk-AQYBKDT2.mjs';import {n,q,r}from'./chunk-MRJFGHFW.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-KEVERVHK.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$4}from'./chunk-TDYBXLYP.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {d}from'./chunk-BGMVPFYK.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {d as d$1}from'./chunk-AQYBKDT2.mjs';import {n,q,r}from'./chunk-MRJFGHFW.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-KEVERVHK.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$6}from'./chunk-TBCZKWGQ.mjs';import {a as a$e}from'./chunk-E3DMXJIC.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-VZFS4QRW.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-EYKIXVM3.mjs';import {p}from'./chunk-SMAYNDQQ.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-VIVNQZYK.mjs';import {b as b$6}from'./chunk-NUYBQ7KP.mjs';import {b as b$7}from'./chunk-UBFMOTBM.mjs';import {b as b$8}from'./chunk-PAQQ7MQG.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-XJ2DFV56.mjs';import {a as a$d}from'./chunk-UN7XC7QV.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-XUJJMAKM.mjs';import {a as a$m}from'./chunk-SAZLJ66W.mjs';import {b,c as c$2}from'./chunk-GX2IOGYR.mjs';import {a as a$t}from'./chunk-M5M3EPG5.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-AYBACQ6U.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-6JWACCHG.mjs';import {a as a$a}from'./chunk-F3HQNHR5.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$r}from'./chunk-4ZJMZB5B.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$p}from'./chunk-4PYEGHW5.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$q}from'./chunk-X3AXUU3H.mjs';import {a as a$s}from'./chunk-545KDVGI.mjs';import {a}from'./chunk-YS3Y5KGV.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {d as d$2}from'./chunk-Y4DRSGEJ.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-TZ4MVY4E.mjs';import {a as a$n}from'./chunk-KEVERVHK.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {e as e$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import q,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var $=new WeakMap;function de(t,e,a){let{keyboardDelegate:n,isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:u,menuProps:r}=c$4({isDisabled:p,type:"listbox"},e,a),d=m=>{if(e.selectionManager.selectionMode!=="multiple")switch(m.key){case "ArrowLeft":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}case "ArrowRight":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}}},{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(m){e.setSelectedKey(m);}}),{isInvalid:g,validationErrors:b,validationDetails:C}=e.displayValidation,{labelProps:O,fieldProps:i,descriptionProps:M,errorMessageProps:f}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,u,i),R=c$3();return $.set(e,{isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:p,onKeyDown:a$o(P.onKeyDown,d,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[R,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(m){e.isFocused||(t.onFocus&&t.onFocus(m),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(m){e.isOpen||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:R},menuProps:{...r,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:m=>{e$2(m.currentTarget,m.relatedTarget)||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[i["aria-labelledby"],P["aria-label"]&&!i["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:f,isInvalid:g,validationErrors:b,validationDetails:C,hiddenSelectProps:{isDisabled:p,name:c,label:t.label,state:e,triggerRef:a,form:s}}}function bt(t,e,a){let n=$.get(e)||{},{autoComplete:p,name:S=n.name,form:c=n.form,isDisabled:s=n.isDisabled}=t,{validationBehavior:y,isRequired:x}=n,{visuallyHiddenProps:l}=a$r({style:{position:"fixed",top:0,left:0}});a$s(t.selectRef,e.defaultValue,e.setValue),a$t({validationBehavior:y,focus:()=>a.current?.focus()},e,t.selectRef);let u=e.setValue,r=useCallback(d=>{let o=g$2(d);o.multiple?u(Array.from(o.selectedOptions,g=>g.value)):u(d.currentTarget.value);},[u]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:p,disabled:s,multiple:e.selectionManager.selectionMode==="multiple",required:y==="native"&&x,name:S,form:c,value:e.value??"",onChange:r,onInput:r}}}function ue(t){let{state:e,triggerRef:a,label:n,name:p,form:S,isDisabled:c}=t,s=useRef(null),y=useRef(null),{containerProps:x,selectProps:l}=bt({...t,selectRef:e.collection.size<=300?s:y},e,a),u=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:s,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(r=>{let d=e.collection.getItem(r);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&p&&u.map((r,d)=>jsx("option",{value:r??""},d))]})]})});if(p){let r=$.get(e)||{},{validationBehavior:d}=r;u.length===0&&(u=[null]);let o=u.map((g,b)=>{let C={type:"hidden",autoComplete:l.autoComplete,name:p,form:S,disabled:c,value:g??""};return d==="native"?jsx("input",{...C,ref:b===0?y:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...C,ref:b===0?y:null},b)});return jsx(Fragment,{children:o})}return null}function pe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$p(t),[p,S]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),s=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[y,x]=a$q(s,c,t.onChange),l=e==="single"&&Array.isArray(y)?y[0]:y,u=i=>{if(e==="single"){let M=Array.isArray(i)?i[0]??null:i;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(i)?M=i:i!=null&&(M=[i]),x(M);}},r=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>Bt(l),[l]),onSelectionChange:i=>{if(i!=="all"){if(e==="single"){let M=i.values().next().value??null;u(M);}else u([...i]);a&&n.close(),g.commitValidation();}}}),d=r.selectionManager.firstSelectedKey,o=useMemo(()=>[...r.selectionManager.selectedKeys].map(i=>r.collection.getItem(i)).filter(i=>i!=null),[r.selectionManager.selectedKeys,r.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,C]=useState(false),[O]=useState(l);return {...g,...r,...n,value:l,defaultValue:c??O,setValue:u,selectedKey:d,setSelectedKey:u,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:p,open(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.open());},toggle(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.toggle());},isFocused:b,setFocused:C}}function Bt(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var U=q.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:p,style:S,value:c$2,"data-block-id":s,"data-block-class":y,fallbackValue:x,selectionMode:l="single",onRemove:u,maxCount:r=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),C=c$2?.[0]??null,O=C?.label??x,i$1=C?.icon??null,M=q.useRef(null),f=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:R,isHovered:m}=a$1({isDisabled:o.isDisabled}),{focusProps:T,isFocused:N,isFocusVisible:A}=a$2(),F=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let V=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":N,"data-focus-visible":A,"data-hovered":m,"data-pressed":P,"data-open":e,"data-block-id":s,"data-block-class":y}),w=o["aria-labelledby"],ae=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let j=c$2.slice(0,r),H=c$2.slice(r),W=[...j,...H.length>0?[{label:(typeof d$1=="function"?d$1({count:H.length}):d$1)??b$2(It.more,{count:H.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:W,onRemove:o.isReadOnly?void 0:X=>{X.has("remaining-value")?u?.(new Set(H.map(E=>E.id))):u?.(X);},"aria-labelledby":w,className:k,isDisabled:o.isDisabled})},[c$2,r,b$2,d$1,w,o.isDisabled,u,o.isReadOnly]),z=l==="multiple";return jsxs("div",{...c$1(z?Object.fromEntries(Object.entries(B).filter(([j])=>j.startsWith("on"))):c$1(B,T),R,V),ref:z?g$1:b$1(g$1,M),className:a$8(i({isFocused:A,isDisabled:!!o.isDisabled,isOpen:e,isHovered:m,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:f}),h({variant:t,isHovered:m,isFocused:A,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),p,"BaselineUI-Select-Button"),"data-testid":"select-button",style:S,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?ae():jsxs("span",{className:k,children:[i$1?jsx(i$1,{size:24}):null,jsx("span",{...n,children:O})]}),F?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j),children:jsx(F,{size:16})}):null]}),jsx("div",{...z?{...c$1(B,T),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});U.displayName="SelectButton";var It=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var xt=q.createContext({state:null,popoverAnchorRef:null}),Se=q.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":p$1,"data-block-class":S,onTriggerPress:c,placement:s="bottom start",triggerClassName:y,triggerStyle:x,state:l,optionStyle:u,optionClassName:r,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:C,selectAllLabel:O,moreLabel:i,renderTrigger:M=({buttonProps:P,selectedValue:R,valueProps:m,isOpen:T,ref:N,selectionMode:A,onRemove:F,maxCount:V})=>jsx(U,{...P,className:y,style:x,isOpen:T,isReadOnly:f$2.isReadOnly,ref:N,variant:n,validationState:f$2.validationState,valueProps:m,value:R,fallbackValue:f$2.placeholder,selectionMode:A,onRemove:F,maxCount:V,moreLabel:i}),...f$2},B)=>{let{popoverAnchorRef:P}=useContext(xt),R=q.useRef(null),{formatMessage:m}=b(),T=C??m(ye.search),N=useContext(a$9),{isVirtualized:A}=useContext(p),F=a$a(f$2.portalContainer),{labelProps:V,triggerProps:w,valueProps:ae,menuProps:z,descriptionProps:j,errorMessageProps:H}=de({...a$b(f$2),validationState:f$2.validationState==="error"?"invalid":"valid"},l,R),W=c$3(),X=a$c(f$2)==="warningMessage",E=b$2({...f$2,descriptionProps:j,errorMessageProps:H,warningMessageProps:{id:W},labelPosition:a}),Rt=l.selectedItems?.map(_=>_.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":p$1,"data-block-class":S,ref:B,children:[f$2.label||E?jsxs("div",{className:f({labelPosition:a,hasMessage:!!E}),children:[f$2.label?jsx("div",{...V,className:a$8(e,"BaselineUI-Select-Label"),children:f$2.label}):null,a==="start"&&E]}):null,jsx(ue,{state:l,triggerRef:R,isDisabled:f$2.isDisabled,label:f$2.label,name:f$2.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":V.id},w,X?{"aria-describedby":[w["aria-describedby"],W].filter(Boolean).join(" ")}:null),selectedValue:Rt,valueProps:ae,isOpen:l.isOpen,ref:R,selectionMode:f$2.selectionMode??"single",onRemove:_=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ne=>!_.has(ne))));},maxCount:f$2.maxCount??2}),a==="top"&&E]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:s,state:l,portalContainer:F,offset:2,triggerRef:P||R,style:e$2,className:"BaselineUI-Select-Popover",...f$2,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[N?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":T,placeholder:T,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:z,children:jsx(q$1,{label:f$2.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:A}),optionStyle:u,optionClassName:r,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??m(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ne=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ne));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??m(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Pt=q.forwardRef(({collection:t,...e},a)=>{let n=pe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Pt.displayName="SelectStandalone";var le=q.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},p)=>{let{state:S}=useContext(xt);useEffect(()=>{a$5(S||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,S]);let c=useMemo(()=>({renderOption:(s,y)=>jsx(n,{...y,item:s,selectionIcon:y.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return S?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:p,state:S}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:s=>jsx(Pt,{collection:s,...n$1,ref:p})})});le.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var Ct=q.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,icon:p,tooltip:S=true,iconTooltip:c=true,...s},y)=>{let x=q.useRef(null),{tooltipProps:l}=a$i({label:s["aria-label"],tooltip:S}),u=useCallback(({buttonProps:r,selectedValue:d,valueProps:o,isOpen:g,ref:b})=>jsx(a$j,{...l,children:jsx(U,{...r,isOpen:g,isReadOnly:s.isReadOnly,ref:b,variant:a,validationState:s.validationState,value:d,fallbackValue:s.placeholder,valueProps:o,moreLabel:s.moreLabel})}),[s,l,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,style:e,ref:b$1(y,x),children:[p?jsx(a$k,{icon:p,label:s["aria-label"],tooltip:c,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(le,{...s,renderTrigger:u})]})});Ct.displayName="IconSelect";export{pe as a,xt as b,le as c,Ct as d};
@@ -0,0 +1,10 @@
1
+ import {l,q,e,B,o,p,u,h,d as d$1,A,g,v,x,z,f,i,m,c as c$2,r,t,s,n,j,a as a$4,b as b$4,w}from'./chunk-OMT6ZWSV.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$2,b as b$3}from'./chunk-MVK5CB64.mjs';import {a as a$1}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {i as i$1,g as g$1,l as l$1,m as m$1}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a,c}from'./chunk-JDLUGVXG.mjs';import {a as a$3}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {flushSync}from'react-dom';import Je,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var Ze=Je.forwardRef(function(e,n){let t=e.children,[s,l]=useState(null),v=useRef(null),d=useRef(void 0);return useImperativeHandle(n,()=>(h,K)=>{let T=t(h),O,a,b;T&&typeof T=="object"&&"element"in T?(O=T.element,a=T.x,b=T.y):O=T,flushSync(()=>{l(O);}),K(v.current,a,b),d.current=requestAnimationFrame(()=>{l(null);});},[t]),useEffect(()=>()=>{d.current&&cancelAnimationFrame(d.current);},[]),s?jsx("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:v,children:s}):null});function Be(i,e,n,t,s=false,l=false){switch(t){case "left":return s?te(i,e,n,l,"left"):re(i,e,n,l,"left");case "right":return s?re(i,e,n,l,"right"):te(i,e,n,l,"right");case "up":return re(i,e,n,l);case "down":return te(i,e,n,l)}}function te(i,e,n,t=false,s=null){if(!n)return {type:"root"};if(n.type==="root"){let l=i.getFirstKey?.()??null;return l!=null?{type:"item",key:l,dropPosition:"before"}:null}if(n.type==="item"){let l=null;s?l=s==="right"?i.getKeyRightOf?.(n.key,{includeDisabled:true}):i.getKeyLeftOf?.(n.key,{includeDisabled:true}):l=i.getKeyBelow?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyAfter(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":return {type:"item",key:n.key,dropPosition:"on"};case "on":{let d=e.getItem(n.key),h=l!=null?e.getItem(l):null;return d&&h&&h.level>=d.level?{type:"item",key:h.key,dropPosition:"before"}:{type:"item",key:n.key,dropPosition:"after"}}case "after":{let d=e.getItem(n.key),h=d?.nextKey!=null?e.getItem(d.nextKey):null;for(;h!=null&&h.type!=="item";)h=h.nextKey!=null?e.getItem(h.nextKey):null;if(d&&h==null&&d.parentKey!=null){let K=e.getItem(d.parentKey),T=K?.nextKey!=null?e.getItem(K.nextKey):null;if(T?.type==="item")return {type:"item",key:T.key,dropPosition:"before"};if(K?.type==="item")return {type:"item",key:K.key,dropPosition:"after"}}if(h)return {type:"item",key:h.key,dropPosition:"on"}}}}return t?{type:"root"}:null}function re(i,e,n,t=false,s=null){if(!n||t&&n.type==="root"){let l=null,v=i.getLastKey?.();for(;v!=null;){let d=e.getItem(v);if(d?.type!=="item")break;l=v,v=d?.parentKey;}return l!=null?{type:"item",key:l,dropPosition:"after"}:null}if(n.type==="item"){let l=null;s?l=s==="left"?i.getKeyLeftOf?.(n.key,{includeDisabled:true}):i.getKeyRightOf?.(n.key,{includeDisabled:true}):l=i.getKeyAbove?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyBefore(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":{let d=e.getItem(n.key);if(d&&d.prevKey!=null){let h=Fe(e,d.prevKey);if(h)return h}return l!=null?{type:"item",key:l,dropPosition:"on"}:{type:"root"}}case "on":return {type:"item",key:n.key,dropPosition:"before"};case "after":{let d=Fe(e,n.key);return d||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function Fe(i,e){let n=i.getItem(e),t=oe(i,e,l=>i.getKeyAfter(l)),s=t!=null?i.getItem(t):null;if(n&&s&&s.level>n.level){let l=null;if("lastChildKey"in n)for(l=n.lastChildKey!=null?i.getItem(n.lastChildKey):null;l&&l.type!=="item"&&l.prevKey!=null;)l=i.getItem(l.prevKey);else l=Array.from(n.childNodes).findLast(v=>v.type==="item")||null;if(l)return {type:"item",key:l.key,dropPosition:"after"}}return null}function oe(i,e,n){let t=n(e),s=t!=null?i.getItem(t):null;for(;s&&s.type!=="item";)t=n(s.key),s=t!=null?i.getItem(t):null;return t}var $=20;function He(i){let e=useRef(null),n=useRef(true),t=useRef(true);useEffect(()=>{if(i.current){e.current=a$2(i.current)?i.current:b$3(i.current);let v=window.getComputedStyle(e.current);n.current=/(auto|scroll)/.test(v.overflowX),t.current=/(auto|scroll)/.test(v.overflowY);}},[i]);let s=useRef({timer:void 0,dx:0,dy:0}).current;useEffect(()=>()=>{s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);},[s]);let l=useCallback(()=>{n.current&&e.current&&(e.current.scrollLeft+=s.dx),t.current&&e.current&&(e.current.scrollTop+=s.dy),s.timer&&(s.timer=requestAnimationFrame(l));},[e,s]);return {move(v,d){if(!i$1()||g$1()||!e.current)return;let h=e.current.getBoundingClientRect(),K=$,T=$,O=h.height-$,a=h.width-$;v<K||v>a||d<T||d>O?(v<K?s.dx=v-K:v>a&&(s.dx=v-a),d<T?s.dy=d-T:d>O&&(s.dy=d-O),s.timer||(s.timer=requestAnimationFrame(l))):this.stop();},stop(){s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);}}}function tt(i,e$1,n){let t=useRef({props:i,state:e$1,nextTarget:null,dropOperation:null}).current;t.props=i,t.state=e$1;let s=useCallback(async a=>{let{onInsert:b,onRootDrop:g,onItemDrop:c,onReorder:p,onMove:m,acceptedDragTypes:u="all",shouldAcceptItemDrop:r}=t.props,{draggingKeys:f}=l,y=q(n),{target:o,dropOperation:D,items:P}=a,w=P;(u!=="all"||r)&&(w=P.filter(S=>{let E;return S.kind==="directory"?E=new Set([e]):E=S.kind==="file"?new Set([S.type]):S.types,u==="all"||u.some(x=>E.has(x))?o.type==="item"&&o.dropPosition==="on"&&r?r(o,E):true:false})),w.length>0&&(o.type==="root"&&g&&await g({items:w,dropOperation:D}),o.type==="item"&&(o.dropPosition==="on"&&c&&await c({items:w,dropOperation:D,isInternal:y,target:o}),m&&y&&await m({keys:f,dropOperation:D,target:o}),o.dropPosition!=="on"&&(!y&&b&&await b({items:w,dropOperation:D,target:o}),y&&p&&await p({keys:f,dropOperation:D,target:o}))));},[t,n]),l$1=He(n),{dropProps:v}=B({ref:n,onDropEnter(){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},onDropMove(a){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},getDropOperationForPoint(a,b,g,c){let{draggingKeys:p,dropCollectionRef:m}=l,u=q(n),r=y=>e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p})!=="cancel",f=i.dropTargetDelegate.getDropTargetFromPoint(g,c,r);if(!f)return t.dropOperation="cancel",t.nextTarget=null,"cancel";if(t.dropOperation=e$1.getDropOperation({target:f,types:a,allowedOperations:b,isInternal:u,draggingKeys:p}),t.dropOperation==="cancel"){let y={type:"root"},o=e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p});o!=="cancel"&&(f=y,t.dropOperation=o);}return f&&t.dropOperation!=="cancel"&&n?.current!==m?.current&&o(n),t.nextTarget=t.dropOperation==="cancel"?null:f,t.dropOperation},onDropExit(){o(void 0),e$1.setTarget(null),l$1.stop();},onDropActivate(a){e$1.target?.type==="item"&&typeof i.onDropActivate=="function"&&i.onDropActivate({type:"dropactivate",x:a.x,y:a.y,target:e$1.target});},onDrop(a){o(n),e$1.target&&K(a,e$1.target);let{draggingCollectionRef:b}=l;b==null&&p();}}),d$2=useRef(null),h$1=useCallback(()=>{let{state:a}=t;if(d$2.current){let{target:b,collection:g,selectedKeys:c,focusedKey:p,isInternal:m,draggingKeys:u}=d$2.current;if(a.collection.size>g.size&&a.selectionManager.isSelectionEqual(c)){let r=new Set,f=a.collection.getFirstKey();for(;f!=null;){let y=a.collection.getItem(f);y?.type==="item"&&!g.getItem(y.key)&&r.add(y.key),y?.hasChildNodes&&a.collection.getItem(y.lastChildKey)?.type==="item"?f=y.firstChildKey:f=a.collection.getKeyAfter(f);}if(a.selectionManager.setSelectedKeys(r),a.selectionManager.focusedKey===p){let y=r.keys().next().value;if(y!=null){let o=a.collection.getItem(y),D=d$2.current.target,P=a.collection.expandedKeys?a.collection.expandedKeys.has(o?.parentKey):false;o&&(o?.type==="cell"||D.type==="item"&&D.dropPosition==="on"&&!P)&&(y=o.parentKey),y!=null&&a.selectionManager.setFocusedKey(y),a.selectionManager.selectionMode==="none"&&d("keyboard");}}}else p!=null&&a.selectionManager.focusedKey===p&&m&&b.type==="item"&&b.dropPosition!=="on"&&u.has(a.collection.getItem(p)?.parentKey)?(a.selectionManager.setFocusedKey(a.collection.getItem(p)?.parentKey??null),d("keyboard")):a.selectionManager.focusedKey===p&&b.type==="item"&&b.dropPosition==="on"&&a.collection.getItem(b.key)!=null?(a.selectionManager.setFocusedKey(b.key),d("keyboard")):a.selectionManager.focusedKey!=null&&!a.selectionManager.isSelected(a.selectionManager.focusedKey)&&d("keyboard");a.selectionManager.setFocused(true);}},[t]),K=useCallback((a,b)=>{let{state:g}=t;d$2.current={timeout:void 0,focusedKey:g.selectionManager.focusedKey,collection:g.collection,selectedKeys:g.selectionManager.selectedKeys,draggingKeys:l.draggingKeys,isInternal:q(n),target:b},(t.props.onDrop||s)({type:"drop",x:a.x,y:a.y,target:b,items:a.items,dropOperation:a.dropOperation}),d$2.current.timeout=setTimeout(()=>{h$1(),d$2.current=null;},50);},[t,s,n,h$1]);useEffect(()=>()=>{d$2.current&&clearTimeout(d$2.current.timeout);},[]),a(()=>{d$2.current&&e$1.collection!==d$2.current.collection&&h$1();});let{direction:T}=b();useEffect(()=>{if(!n.current)return;let a=(c,p=true,m="down")=>Be(t.props.keyboardDelegate,t.state.collection,c,m,T==="rtl",p),b=(c,p=true)=>a(c,p,"up"),g=(c,p,m,u,r=true)=>{let f=0,y,{draggingKeys:o}=l,D=q(n);do{let P=u(c,r);if(!P)return null;c=P,y=t.state.getDropOperation({target:P,types:p,allowedOperations:m,isInternal:D,draggingKeys:o}),c.type==="root"&&f++;}while(y==="cancel"&&!t.state.isDropTarget(c)&&f<2);return y==="cancel"?null:c};return u({element:n.current,preventFocusOnDrop:true,getDropOperation(c,p){if(t.state.target){let{draggingKeys:u}=l,r=q(n);return t.state.getDropOperation({target:t.state.target,types:c,allowedOperations:p,isInternal:r,draggingKeys:u})}return g(null,c,p,a)?"move":"cancel"},onDropEnter(c,p){let m=h(p.items),u=t.state.selectionManager,r=null;o(n);let f=u.focusedKey,y="after",o$1=f!=null?t.state.collection.getItem(f):null;if(o$1?.type==="cell"&&(f=o$1.parentKey),f!=null&&u.isSelected(f)&&(u.selectedKeys.size>1&&u.firstSelectedKey===f?y="before":f=u.lastSelectedKey),f!=null){r={type:"item",key:f,dropPosition:y};let{draggingKeys:D}=l,P=q(n);t.state.getDropOperation({target:r,types:m,allowedOperations:p.allowedDropOperations,isInternal:P,draggingKeys:D})==="cancel"&&(r=g(r,m,p.allowedDropOperations,a,false)??g(r,m,p.allowedDropOperations,b,false));}r||(r=g(null,m,p.allowedDropOperations,a)),t.state.setTarget(r);},onDropExit(){o(void 0),t.state.setTarget(null);},onDropTargetEnter(c){t.state.setTarget(c);},onDropActivate(c,p){p?.type==="item"&&p?.dropPosition==="on"&&typeof t.props.onDropActivate=="function"&&t.props.onDropActivate({type:"dropactivate",x:c.x,y:c.y,target:p});},onDrop(c,p){o(n),t.state.target&&K(c,p||t.state.target);},onKeyDown(c,p){let{keyboardDelegate:m}=t.props,u=h(p.items);switch(c.key){case "ArrowDown":{if(m.getKeyBelow){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"down"));t.state.setTarget(r);}break}case "ArrowUp":{if(m.getKeyAbove){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"up"));t.state.setTarget(r);}break}case "ArrowLeft":{if(m.getKeyLeftOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"left"));t.state.setTarget(r);}break}case "ArrowRight":{if(m.getKeyRightOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"right"));t.state.setTarget(r);}break}case "Home":{if(m.getFirstKey){let r=g(null,u,p.allowedDropOperations,a);t.state.setTarget(r);}break}case "End":{if(m.getLastKey){let r=g(null,u,p.allowedDropOperations,b);t.state.setTarget(r);}break}case "PageDown":{if(m.getKeyPageBelow){let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,a);else {let f=m.getFirstKey?.();r.type==="item"&&(f=r.key);let y=null;f!=null&&(y=m.getKeyPageBelow(f));let o=r.type==="item"?r.dropPosition:"after";if((y==null||r.type==="item"&&r.key===m.getLastKey?.())&&(y=m.getLastKey?.()??null,o="after"),y==null)break;r={type:"item",key:y,dropPosition:o};let{draggingCollectionRef:D,draggingKeys:P}=l,w=D?.current===n?.current;t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:w,draggingKeys:P})==="cancel"&&(r=g(r,u,p.allowedDropOperations,a,false)??g(r,u,p.allowedDropOperations,b,false));}t.state.setTarget(r??t.state.target);}break}case "PageUp":{if(!m.getKeyPageAbove)break;let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,b);else if(r.type==="item"){if(r.key===m.getFirstKey?.())r={type:"root"};else {let D=m.getKeyPageAbove(r.key),P=r.dropPosition;if(D==null&&(D=m.getFirstKey?.(),P="before"),D==null)break;r={type:"item",key:D,dropPosition:P};}let{draggingKeys:f}=l,y=q(n);t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:y,draggingKeys:f})==="cancel"&&(r=g(r,u,p.allowedDropOperations,b,false)??g(r,u,p.allowedDropOperations,a,false));}t.state.setTarget(r??t.state.target);break}}t.props.onKeyDown?.(c);}})},[t,n,K,T]);let O=c();return d$1.set(e$1,{id:O,ref:n}),{collectionProps:c$1(v,{id:O,"aria-describedby":null})}}function ie(i,e,n){let{dropProps:t}=A(n),s=g(e);useEffect(()=>{if(n.current)return v({element:n.current,target:i.target,getDropOperation(T,O){let{draggingKeys:a}=l,b=q(s);return e.getDropOperation({target:i.target,types:T,allowedOperations:O,isInternal:b,draggingKeys:a})},activateButtonRef:i.activateButtonRef})},[n,i.target,e,s,i.activateButtonRef]);let l$1=x(),{draggingKeys:v$1}=l,d=q(s),h$1=l$1&&e.getDropOperation({target:i.target,types:h(l$1.dragTarget.items),allowedOperations:l$1.dragTarget.allowedDropOperations,isInternal:d,draggingKeys:v$1})!=="cancel",K=e.isDropTarget(i.target);return useEffect(()=>{l$1&&K&&n.current&&n.current.focus();},[K,l$1,n]),{dropProps:{...t,"aria-hidden":!l$1||h$1?void 0:"true"},isDropTarget:K}}function rt(i,e,n){let{target:t}=i,{collection:s}=e,l=b$1(z,"@react-aria/dnd"),v=x(),{dropProps:d}=ie(i,e,n),h=c(),K=g=>g==null?"":s.getTextValue?.(g)??s.getItem(g)?.textValue??"",T="",O;if(t.type==="root")T=l.format("dropOnRoot"),O=`${h} ${f(e)}`;else if(t.dropPosition==="on")T=l.format("dropOnItem",{itemText:K(t.key)});else {let g,c;if(t.dropPosition==="before"){let p=s.getItem(t.key)?.prevKey,m=p!=null?s.getItem(p):null;g=m?.type==="item"?m.key:null;}else g=t.key;if(t.dropPosition==="after"){let p=s.getItem(t.key)?.nextKey,m=p!=null?s.getItem(p):null;c=m?.type==="item"?m.key:null;}else c=t.key;g!=null&&c!=null?T=l.format("insertBetween",{beforeItemText:K(g),afterItemText:K(c)}):g!=null?T=l.format("insertAfter",{itemText:K(g)}):c!=null&&(T=l.format("insertBefore",{itemText:K(c)}));}let a=e.isDropTarget(t),b=v?d["aria-hidden"]:"true";return {dropIndicatorProps:{...d,id:h,"aria-roledescription":l.format("dropIndicator"),"aria-label":T,"aria-labelledby":O,"aria-hidden":b,tabIndex:-1},isDropTarget:a,isHidden:!a&&!!b}}var Ve={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function Ye(i$1){let{hasDragButton:e,isDisabled:n,elementRef:t$1}=i$1,s$1=b$1(z,"@react-aria/dnd"),l=useRef({options:i$1,x:0,y:0}).current;l.options=i$1;let v=useRef(null),[d,h]=useState(false),K=o=>{v.current=o,h(!!o);},{addGlobalListener:T,removeAllGlobalListeners:O}=a$3(),a=useRef(null),b=o=>{if(o.defaultPrevented)return;if(o.stopPropagation(),a.current==="virtual"){o.preventDefault(),m(g$2(o)),a.current=null;return}typeof i$1.onDragStart=="function"&&i$1.onDragStart({type:"dragstart",x:o.clientX,y:o.clientY});let D=i$1.getItems();o.dataTransfer.clearData?.(),j(o.dataTransfer,D);let P=7;if(typeof i$1.getAllowedDropOperations=="function"){let E=i$1.getAllowedDropOperations();P=0;for(let x of E)P|=a$4[x]||0;}t(P);let w=b$4[P]||"none";o.dataTransfer.effectAllowed=w==="cancel"?"none":w,typeof i$1.preview?.current=="function"&&i$1.preview.current(D,(E,x,N)=>{if(!E)return;let M=E.getBoundingClientRect(),ge=o.currentTarget.getBoundingClientRect(),Z=o.clientX-ge.x,Q=o.clientY-ge.y;(Z>M.width||Q>M.height)&&(Z=M.width/2,Q=M.height/2);let H=Z,j=Q;typeof x=="number"&&typeof N=="number"&&(H=x,j=N),H=Math.max(0,Math.min(H,M.width)),j=Math.max(0,Math.min(j,M.height));let _e=2*Math.round(M.height/2);E.style.height=`${_e}px`,o.dataTransfer.setDragImage(E,H,j);}),T(b$2(g$2(o)),"drop",E=>{E.preventDefault(),E.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");},{once:true}),l.x=o.clientX,l.y=o.clientY;let S=g$2(o);requestAnimationFrame(()=>{K(S);});},g=o=>{o.stopPropagation(),!(o.clientX===l.x&&o.clientY===l.y)&&(typeof i$1.onDragMove=="function"&&i$1.onDragMove({type:"dragmove",x:o.clientX,y:o.clientY}),l.x=o.clientX,l.y=o.clientY);},c=o=>{if(o.stopPropagation(),typeof i$1.onDragEnd=="function"){let D={type:"dragend",x:o.clientX,y:o.clientY,dropOperation:c$2[o.dataTransfer.dropEffect]};r&&(D.dropOperation=c$2[r]),i$1.onDragEnd(D);}K(null),O(),t(0),s(void 0);};useEffect(()=>()=>{if(v.current&&(!v.current.isConnected||parseInt(version,10)<17)){if(typeof l.options.onDragEnd=="function"){let o={type:"dragend",x:0,y:0,dropOperation:c$2[r||"none"]};l.options.onDragEnd(o);}K(null),t(0),s(void 0);}},[l]);let p=o=>{o.pointerType!=="keyboard"&&o.pointerType!=="virtual"||m(o.target);},m=o=>{if(typeof l.options.onDragStart=="function"){let D=o.getBoundingClientRect();l.options.onDragStart({type:"dragstart",x:D.x+D.width/2,y:D.y+D.height/2});}w({element:o,items:l.options.getItems(),allowedDropOperations:typeof l.options.getAllowedDropOperations=="function"?l.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(D){K(null),typeof l.options.onDragEnd=="function"&&l.options.onDragEnd(D);}},s$1),K(o);},u=i(),r$1=d?Ve[u].end:Ve[u].start,f=a$1(s$1.format(r$1),t$1),y={};return e||(y={...f,onPointerDown(o){if(a.current=m$1(o.nativeEvent)?"virtual":o.pointerType,o.width<1&&o.height<1)a.current="virtual";else {let D=o.currentTarget.getBoundingClientRect(),P=o.clientX-D.x,w=o.clientY-D.y,S=D.width/2,E=D.height/2;Math.abs(P-S)<=.5&&Math.abs(w-E)<=.5?a.current="virtual":a.current=o.pointerType;}},onKeyDownCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation());},onKeyUpCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));},onClick(o){(l$1(o.nativeEvent)||a.current==="virtual")&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:false}:{dragProps:{...y,draggable:"true",onDragStart:b,onDrag:g,onDragEnd:c},dragButtonProps:{...f,onPress:p},isDragging:d}}var it={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function at(i$1,e,n$1){let t=b$1(z,"@react-aria/dnd"),s=e.isDisabled||e.selectionManager.isDisabled(i$1.key),{dragProps:l,dragButtonProps:v}=Ye({elementRef:n$1,getItems(){return e.getItems(i$1.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:i$1.hasDragButton,onDragStart(g){e.startDrag(i$1.key,g),n(e.draggingKeys);},onDragMove(g){e.moveDrag(g);},onDragEnd(g){let{dropOperation:c}=g,p$1=c==="cancel"?false:q();e.endDrag({...g,keys:e.draggingKeys,isInternal:p$1}),p();}}),d=e.collection.getItem(i$1.key),h=e.getKeysForDrag(i$1.key).size,K=h>1&&e.selectionManager.isSelected(i$1.key),T,O,a=i();if(!i$1.hasDragButton&&e.selectionManager.selectionMode!=="none"){let g=it[a][K?"selected":"notSelected"];i$1.hasAction&&a==="keyboard"&&(g+="Alt"),K?O=t.format(g,{count:h}):O=t.format(g),delete l.onClick;}else if(K)T=t.format("dragSelectedItems",{count:h});else {let g=e.collection.getTextValue?.(i$1.key)??d?.textValue??"";T=t.format("dragItem",{itemText:g});}let b=a$1(O,n$1);if(O&&Object.assign(l,b),!i$1.hasDragButton&&i$1.hasAction){let{onKeyDownCapture:g,onKeyUpCapture:c}=l;a==="touch"&&delete l["aria-describedby"],l.onKeyDownCapture=p=>{p.altKey&&g?.(p);},l.onKeyUpCapture=p=>{p.altKey&&c?.(p);};}return {dragProps:s?{}:l,dragButtonProps:{...v,isDisabled:s,"aria-label":T}}}function pt(i,e,n){let{draggingCollectionRef:t}=l;e.draggingKeys.size>0&&t?.current!==n.current&&m(n);}function gt(i){let{getItems:e,isDisabled:n,collection:t,selectionManager:s,onDragStart:l,onDragMove:v,onDragEnd:d,preview:h,getAllowedDropOperations:K}=i,[,T]=useState(false),O=useRef(new Set),a=useRef(null),b=g=>{let c=new Set;if(s.isSelected(g))for(let p of s.selectedKeys){let m=t.getItem(p);if(m){let u=false,r=m.parentKey;for(;r!=null;){if(s.selectedKeys.has(r)){u=true;break}let f=t.getItem(r);r=f?f.parentKey:null;}u||c.add(p);}}else c.add(g);return c};return {collection:t,selectionManager:s,get draggedKey(){return a.current},get draggingKeys(){return O.current},isDragging(g){return O.current.has(g)},getKeysForDrag:b,getItems(g){let c=b(g),p=[];for(let m of c){let u=t.getItem(m)?.value;u!=null&&p.push(u);}return e(b(g),p)},isDisabled:n,preview:h,getAllowedDropOperations:K,startDrag(g,c){let p=b(g);O.current=p,a.current=g,s.setFocused(false),T(true),typeof l=="function"&&l({...c,keys:p});},moveDrag(g){typeof v=="function"&&v({...g,keys:O.current});},endDrag(g){let{isInternal:c}=g;typeof d=="function"&&d({...g,keys:O.current,isInternal:c}),O.current=new Set,a.current=null,T(false);}}}function ft(i){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:t,onRootDrop:s,onItemDrop:l,onReorder:v,onMove:d,shouldAcceptItemDrop:h,collection:K,selectionManager:T,onDropEnter:O,getDropOperation:a,onDrop:b}=i,[,g]=useState(null),c=useRef(null),p=u=>{if(u.dropPosition==="before"){let r=K.getItem(u.key);return r&&r.prevKey!=null?{type:"item",key:r.prevKey,dropPosition:"after"}:null}else if(u.dropPosition==="after"){let r=K.getItem(u.key);return r&&r.nextKey!=null?{type:"item",key:r.nextKey,dropPosition:"before"}:null}return null},m=useCallback(u=>{let{target:r,types:f,allowedOperations:y,isInternal:o,draggingKeys:D}=u;if(n||!r)return "cancel";if(e==="all"||e.some(P=>f.has(P))){let P=t&&r.type==="item"&&!o&&(r.dropPosition==="before"||r.dropPosition==="after"),w=v&&r.type==="item"&&o&&(r.dropPosition==="before"||r.dropPosition==="after")&&yt(K,r,D),S=r.type!=="item"||r.dropPosition!=="on"||!h||h(r,f),E=d&&r.type==="item"&&o&&S,x=s&&r.type==="root"&&!o,N=l&&r.type==="item"&&r.dropPosition==="on"&&!(o&&r.key!=null&&D.has(r.key))&&S;if(b||P||w||E||x||N)return a?a(r,f,y):y[0]}return "cancel"},[n,K,e,a,t,s,l,h,v,d,b]);return {collection:K,selectionManager:T,isDisabled:n,get target(){return c.current},setTarget(u){if(this.isDropTarget(u))return;let r=c.current;r&&typeof i.onDropExit=="function"&&i.onDropExit({type:"dropexit",x:0,y:0,target:r}),u&&typeof O=="function"&&O({type:"dropenter",x:0,y:0,target:u}),c.current=u??null,g(u??null);},isDropTarget(u){let r=c.current;return !r||!u?false:pe(u,r)?true:u?.type==="item"&&r?.type==="item"&&u.key!==r.key&&u.dropPosition!==r.dropPosition&&u.dropPosition!=="on"&&r.dropPosition!=="on"?pe(p(u),r)||pe(u,p(r)):false},getDropOperation(u){let{target:r,isInternal:f,draggingKeys:y}=u;if(f&&r.type==="item"&&y.size>0){if(y.has(r.key)&&r.dropPosition==="on")return "cancel";let o=r.key;for(;o!=null;){let P=K.getItem(o)?.parentKey;if(P!=null&&y.has(P))return "cancel";o=P??null;}}return m(u)}}}function pe(i,e){if(!i)return !e;switch(i.type){case "root":return e?.type==="root";case "item":return e?.type==="item"&&e?.key===i.key&&e?.dropPosition===i.dropPosition}}function yt(i,e,n){let t=i.getItem(e.key);for(let s of n)if(i.getItem(s)?.parentKey!==t?.parentKey)return false;return true}var se=class{collection;ref;layout;orientation;direction;constructor(e,n,t){this.collection=e,this.ref=n,this.layout=t?.layout||"stack",this.orientation=t?.orientation||"vertical",this.direction=t?.direction||"ltr";}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,n,t){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return {type:"root"};let s=this.ref.current.getBoundingClientRect(),l=this.orientation==="horizontal"?e:n,v=this.orientation==="horizontal"?n:e;l+=this.getPrimaryStart(s),v+=this.getSecondaryStart(s);let d=this.layout==="stack"?l:v,h=this.orientation==="horizontal"&&this.direction==="rtl",K=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",T=this.layout==="stack"?h:K,O=this.ref.current?.dataset.collection,a=this.ref.current.querySelectorAll(O?`[data-collection="${CSS.escape(O)}"]`:"[data-key]"),b=new Map,g=b$2(this.ref.current);for(let f of a)f instanceof g.HTMLElement&&f.dataset.key!=null&&b.set(f.dataset.key,f);let c=[...this.collection].filter(f=>f.type==="item");if(c.length<1)return {type:"root"};let p=0,m=c.length;for(;p<m;){let f=Math.floor((p+m)/2),y=c[f],o=b.get(String(y.key));if(!o)break;let D=o.getBoundingClientRect(),P=w=>{w?p=f+1:m=f;};if(l<this.getPrimaryStart(D))P(h);else if(l>this.getPrimaryEnd(D))P(!h);else if(v<this.getSecondaryStart(D))P(K);else if(v>this.getSecondaryEnd(D))P(!K);else {let w={type:"item",key:y.key,dropPosition:"on"};if(t(w))d<=this.getFlowStart(D)+5&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=this.getFlowEnd(D)-5&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");else {let S=this.getFlowStart(D)+this.getFlowSize(D)/2;d<=S&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=S&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");}return w}}let u=c[Math.min(p,c.length-1)];return s=b.get(String(u.key))?.getBoundingClientRect(),s&&(l<this.getPrimaryStart(s)||Math.abs(d-this.getFlowStart(s))<Math.abs(d-this.getFlowEnd(s)))?{type:"item",key:u.key,dropPosition:T?"after":"before"}:{type:"item",key:u.key,dropPosition:T?"before":"after"}}};export{tt as a,ie as b,rt as c,at as d,pt as e,Ze as f,gt as g,ft as h,se as i};
@@ -1,4 +1,4 @@
1
- import {a as a$8}from'./chunk-CIIO5D3X.mjs';import {a as a$4}from'./chunk-FOEGHU3P.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {c}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {a as a$7}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$9}from'./chunk-KEVERVHK.mjs';import {a as a$6,c as c$2,e}from'./chunk-JDLUGVXG.mjs';import {g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import z,{useRef,useCallback,useEffect,useMemo,useState}from'react';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$8}from'./chunk-RSTHM3ZF.mjs';import {a as a$4}from'./chunk-YX2ASVM3.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {c}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {a as a$7}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$9}from'./chunk-KEVERVHK.mjs';import {a as a$6,c as c$2,e}from'./chunk-JDLUGVXG.mjs';import {g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import z,{useRef,useCallback,useEffect,useMemo,useState}from'react';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$8}from'./chunk-CIIO5D3X.mjs';import {a as a$4}from'./chunk-FOEGHU
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function w(t){let e=useCallback(o=>t.subscribe(o),[t]),n=useCallback(()=>t.visibleToasts,[t]);return {visibleToasts:useSyncExternalStore(e,n,n),add:(o,i)=>t.add(o,i),close:o=>t.close(o),pauseAll:()=>t.pauseAll(),resumeAll:()=>t.resumeAll()}}var E=class{queue=[];subscriptions=new Set;maxVisibleToasts;wrapUpdate;visibleToasts=[];constructor(e){this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate;}runWithWrapUpdate(e,n){this.wrapUpdate?this.wrapUpdate(e,n):e();}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,n={}){let r="_"+Math.random().toString(36).slice(2),o={...n,content:e,key:r,timer:n.timeout?new R(()=>this.close(r),n.timeout):void 0};return this.queue.unshift(o),this.updateVisibleToasts("add"),r}close(e){let n=this.queue.findIndex(r=>r.key===e);n>=0&&(this.queue[n].onClose?.(),this.queue.splice(n,1)),this.updateVisibleToasts("remove");}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let n of this.subscriptions)n();},e);}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause();}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume();}clear(){this.queue=[],this.updateVisibleToasts("clear");}},R=class{timerId;startTime=null;remaining;callback;constructor(e,n){this.remaining=n,this.callback=e;}reset(e){this.remaining=e,this.resume();}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime);}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback();},this.remaining));}};var x={"ar-AE":{close:"\u0625\u063A\u0644\u0627\u0642",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631`,other:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631\u0627\u062A`})}.`},"bg-BG":{close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u0435`,other:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044F`})}.`},"cs-CZ":{close:"Zav\u0159\xEDt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1men\xED`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"da-DK":{close:"Luk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} besked`,other:()=>`${e.number(t.count)} beskeder`})}.`},"de-DE":{close:"Schlie\xDFen",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} Benachrichtigung`,other:()=>`${e.number(t.count)} Benachrichtigungen`})}.`},"el-GR":{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7`,other:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2`})}.`},"en-US":{close:"Close",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"es-ES":{close:"Cerrar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificaci\xF3n`,other:()=>`${e.number(t.count)} notificaciones`})}.`},"et-EE":{close:"Sule",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} teatis`,other:()=>`${e.number(t.count)} teatist`})}.`},"fi-FI":{close:"Sulje",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ilmoitus`,other:()=>`${e.number(t.count)} ilmoitusta`})}.`},"fr-FR":{close:"Fermer",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"he-IL":{close:"\u05E1\u05D2\u05D5\u05E8",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D4`,other:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D5\u05EA`})}.`},"hr-HR":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obavijest`,other:()=>`${e.number(t.count)} obavijesti`})}.`},"hu-HU":{close:"Bez\xE1r\xE1s",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`,other:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`})}.`},"it-IT":{close:"Chiudi",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica`,other:()=>`${e.number(t.count)} notifiche`})}.`},"ja-JP":{close:"\u9589\u3058\u308B",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`})}\u3002`},"ko-KR":{close:"\uB2EB\uAE30",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`,other:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`})}.`},"lt-LT":{close:"U\u017Edaryti",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} prane\u0161imas`,other:()=>`${e.number(t.count)} prane\u0161imai`})}.`},"lv-LV":{close:"Aizv\u0113rt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} pazi\u0146ojums`,other:()=>`${e.number(t.count)} pazi\u0146ojumi`})}.`},"nb-NO":{close:"Lukk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} varsling`,other:()=>`${e.number(t.count)} varsler`})}.`},"nl-NL":{close:"Sluiten",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} melding`,other:()=>`${e.number(t.count)} meldingen`})}.`},"pl-PL":{close:"Zamknij",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} powiadomienie`,few:()=>`${e.number(t.count)} powiadomienia`,many:()=>`${e.number(t.count)} powiadomie\u0144`,other:()=>`${e.number(t.count)} powiadomienia`})}.`},"pt-BR":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"pt-PT":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"ro-RO":{close:"\xCEnchide\u0163i",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificare`,other:()=>`${e.number(t.count)} notific\u0103ri`})}.`},"ru-RU":{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,other:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F`})}.`},"sk-SK":{close:"Zatvori\u0165",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1menie`,few:()=>`${e.number(t.count)} ozn\xE1menia`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"sl-SI":{close:"Zapri",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obvestilo`,two:()=>`${e.number(t.count)} obvestili`,few:()=>`${e.number(t.count)} obvestila`,other:()=>`${e.number(t.count)} obvestil`})}.`},"sr-SP":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obave\u0161tenje`,other:()=>`${e.number(t.count)} obave\u0161tenja`})}.`},"sv-SE":{close:"St\xE4ng",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} meddelande`,other:()=>`${e.number(t.count)} meddelanden`})}.`},"tr-TR":{close:"Kapat",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} bildirim`,other:()=>`${e.number(t.count)} bildirim`})}.`},"uk-UA":{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`,other:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`})}.`},"zh-CN":{close:"\u5173\u95ED",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`,other:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`})}\u3002`},"zh-TW":{close:"\u95DC\u9589",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u901A\u77E5`})}\u3002`}};function C(t,e$1,n){let{key:r,timer:o,timeout:i}=t.toast;useEffect(()=>{if(!(o==null||i==null))return o.reset(i),()=>{o.pause();}},[o,i]);let a=c$2(),s=e(),d=b(x,"@react-aria/toast"),[u,c]=useState(false);return a$6(()=>{c(true);},[]),{toastProps:{...a$9(t,{labelable:true}),role:"alertdialog","aria-modal":"false","aria-labelledby":t["aria-labelledby"]||a,"aria-describedby":t["aria-describedby"]||s,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":u?void 0:"true"},titleProps:{id:a},descriptionProps:{id:s},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>e$1.close(r)}}}var q=1,S=Symbol.for("react-aria-landmark-manager");function ce(t){return document.addEventListener("react-aria-landmark-manager-change",t),()=>document.removeEventListener("react-aria-landmark-manager-change",t)}function Z(){if(typeof document>"u")return null;let t=document[S];return t&&t.version>=q?t:(document[S]=new F,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[S])}function de(){return useSyncExternalStore(ce,Z,Z)}var F=class{landmarks=[];isListening=false;refCount=0;version=q;constructor(){this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this);}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:true}),document.addEventListener("focusin",this.focusinHandler,{capture:true}),document.addEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=true);}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:true}),document.removeEventListener("focusin",this.focusinHandler,{capture:true}),document.removeEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=false);}focusLandmark(e,n){this.landmarks.find(r=>r.ref.current===e)?.focus?.(n);}getLandmarksByRole(e){return new Set(this.landmarks.filter(n=>n.role===e))}getLandmarkByRole(e){return this.landmarks.find(n=>n.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(o=>o.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(o=>o.role==="main").length>1&&process.env.NODE_ENV!=="production"&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let o=Math.floor((n+r)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);!!(i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS)?n=o+1:r=o-1;}this.landmarks.splice(n,0,e),this.checkLabels(e.role);}updateLandmark(e){let n=this.landmarks.findIndex(r=>r.ref===e.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...e},this.checkLabels(this.landmarks[n].role));}removeLandmark(e){this.landmarks=this.landmarks.filter(n=>n.ref!==e),this.teardownIfNeeded();}checkLabels(e){let n=this.getLandmarksByRole(e);if(n.size>1){let r=[...n].filter(o=>!o.label);if(r.length>0&&process.env.NODE_ENV!=="production")console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(o=>o.ref.current));else if(process.env.NODE_ENV!=="production"){let o=[...n].map(a=>a.label);o.filter((a,s)=>o.indexOf(a)!==s).forEach(a=>{console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(s=>s.label===a).map(s=>s.ref.current));});}}}closestLandmark(e){let n=new Map(this.landmarks.map(o=>[o.ref.current,o])),r=e;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(e,{backward:n}){let r=this.closestLandmark(e),o=n?this.landmarks.length-1:0;r&&(o=this.landmarks.indexOf(r)+(n?-1:1));let i=()=>{if(o<0){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:true,cancelable:true})))return true;o=this.landmarks.length-1;}else if(o>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:true,cancelable:true})))return true;o=0;}return o<0||o>=this.landmarks.length};if(i())return;let a=o;for(;this.landmarks[o].ref.current?.closest("[aria-hidden=true]");){if(o+=n?-1:1,i())return;if(o===a)break}return this.landmarks[o]}f6Handler(e){e.key==="F6"&&(e.altKey?this.focusMain():this.navigate(g(e),e.shiftKey))&&(e.preventDefault(),e.stopPropagation());}focusMain(){let e=this.getLandmarkByRole("main");return e&&e.ref.current&&e.ref.current.isConnected?(this.focusLandmark(e.ref.current,"forward"),true):false}navigate(e,n){let r=this.getNextLandmark(e,{backward:n});if(!r)return false;if(r.lastFocused){let o=r.lastFocused;if(e$1(document.body,o))return o.focus(),true}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,n?"backward":"forward"),true):false}focusinHandler(e){let n=this.closestLandmark(g(e));n&&n.ref.current!==g(e)&&this.updateLandmark({ref:n.ref,lastFocused:g(e)});let r=e.relatedTarget;if(r){let o=this.closestLandmark(r);o&&o.ref.current===r&&o.blur();}}focusoutHandler(e){let n=g(e),r=e.relatedTarget;if(!r||r===document){let o=this.closestLandmark(n);o&&o.ref.current===n&&o.blur();}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(n,r){let o=r?.from||document.activeElement;return e.navigate(o,n==="backward")},focusNext(n){let r=n?.from||document.activeElement;return e.navigate(r,false)},focusPrevious(n){let r=n?.from||document.activeElement;return e.navigate(r,true)},focusMain(){return e.focusMain()},dispose(){e&&(e.refCount--,e.teardownIfNeeded(),e=null);}}}registerLandmark(e){return this.landmarks.find(n=>n.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}};function J(t,e){let{role:n,"aria-label":r,"aria-labelledby":o,focus:i}=t,a=de(),s=r||o,[d,u]=useState(false),c=useCallback(()=>{u(true);},[u]),f=useCallback(()=>{u(false);},[u]);return a$6(()=>{if(a)return a.registerLandmark({ref:e,label:s,role:n,focus:i||c,blur:f})},[a,s,e,n,i,c,f]),useEffect(()=>{d&&e.current?.focus();},[d,e]),{landmarkProps:{role:n,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":o}}}function _(t,e,n){let r=b(x,"@react-aria/toast"),{landmarkProps:o}=J({role:"region","aria-label":t["aria-label"]||r.format("notifications",{count:e.visibleToasts.length})},n),i=useRef(false),a=useRef(false),s=useCallback(()=>{i.current||a.current?e.pauseAll():e.resumeAll();},[e]),{hoverProps:d}=a$5({onHoverStart:()=>{i.current=true,s();},onHoverEnd:()=>{i.current=false,s();}}),u=useRef([]),c$2=useRef(e.visibleToasts),f=useRef(null);a$6(()=>{if(f.current===-1||e.visibleToasts.length===0||!n.current){u.current=[],c$2.current=e.visibleToasts;return}if(u.current=[...n.current.querySelectorAll('[role="alertdialog"]')],c$2.current.length===e.visibleToasts.length&&e.visibleToasts.every((l,p)=>l.key===c$2.current[p].key)){c$2.current=e.visibleToasts;return}let b=c$2.current.map((l,p)=>({...l,i:p,isRemoved:!e.visibleToasts.some(h=>l.key===h.key)})),y=b.findIndex(l=>l.i===f.current&&l.isRemoved);if(y>-1)if(c()==="pointer"&&m.current?.isConnected)a$7(m.current);else {let l=0,p,h;for(;l<=y;)b[l].isRemoved||(h=Math.max(0,l-1)),l++;for(;l<b.length;){if(!b[l].isRemoved){p=l-1;break}l++;}h===void 0&&p===void 0&&(h=0),h>=0&&h<u.current.length?a$7(u.current[h]):p>=0&&p<u.current.length&&a$7(u.current[p]);}c$2.current=e.visibleToasts;},[e.visibleToasts,n]);let m=useRef(null),{focusWithinProps:oe}=b$1({onFocusWithin:b=>{a.current=true,m.current=b.relatedTarget,s();},onBlurWithin:()=>{a.current=false,m.current=null,s();}});return useEffect(()=>{e.visibleToasts.length===0&&m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n,e.visibleToasts.length]),useEffect(()=>()=>{m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n]),{regionProps:c$1(o,d,oe,{tabIndex:-1,"data-react-aria-top-layer":true,onFocus:b=>{let y=g(b).closest('[role="alertdialog"]');f.current=u.current.findIndex(l=>l===y);},onBlur:()=>{f.current=-1;}})}}var Y=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6lz _1yep5z6m1",variantClassNames:{variant:{info:"_1yep5z6131",warning:"_1yep5z612x",error:"_1yep5z612p",success:"_1yep5z612t"}},defaultVariants:{},compoundVariants:[]}),ee="_1udvgpn5 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n";var fe=()=>{};function be({state:t,...e}){z.useRef(null);let {toastProps:r,contentProps:o,titleProps:i,descriptionProps:a,closeButtonProps:s}=C(e,t),d=useMemo(()=>({root:r,title:i,content:o,description:a,close:s}),[r,i,o,a,s]),{canClose:u=true,...c}=e.toast.content;return jsx(a$8,{elementProps:d,...c,className:a$2(Y({variant:c.variant||"info"}),c.className),onClose:u?fe:void 0})}var te=z.forwardRef(({state:t,style:e,className:n,...r},o)=>{let i=a$1(o),{regionProps:a}=_(r,t,i),s={zIndex:1,...e,...a.style};return jsx("div",{...a,ref:i,className:a$2(ee,n),style:s,children:t.visibleToasts.map(d=>jsx(be,{toast:d,state:t},d.key))})});te.displayName="ToastRegion";var ne=z.forwardRef(({toastQueue:t,portalContainer:e,...n},r)=>{let o=w(t),i=a$3(e);return o.visibleToasts.length>0?jsx(a$4,{portalContainer:i,ref:r,children:jsx(te,{state:o,...n})}):null});ne.displayName="GlobalToastRegion";export{E as a,ne as b};
10
+ function w(t){let e=useCallback(o=>t.subscribe(o),[t]),n=useCallback(()=>t.visibleToasts,[t]);return {visibleToasts:useSyncExternalStore(e,n,n),add:(o,i)=>t.add(o,i),close:o=>t.close(o),pauseAll:()=>t.pauseAll(),resumeAll:()=>t.resumeAll()}}var E=class{queue=[];subscriptions=new Set;maxVisibleToasts;wrapUpdate;visibleToasts=[];constructor(e){this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate;}runWithWrapUpdate(e,n){this.wrapUpdate?this.wrapUpdate(e,n):e();}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,n={}){let r="_"+Math.random().toString(36).slice(2),o={...n,content:e,key:r,timer:n.timeout?new R(()=>this.close(r),n.timeout):void 0};return this.queue.unshift(o),this.updateVisibleToasts("add"),r}close(e){let n=this.queue.findIndex(r=>r.key===e);n>=0&&(this.queue[n].onClose?.(),this.queue.splice(n,1)),this.updateVisibleToasts("remove");}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let n of this.subscriptions)n();},e);}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause();}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume();}clear(){this.queue=[],this.updateVisibleToasts("clear");}},R=class{timerId;startTime=null;remaining;callback;constructor(e,n){this.remaining=n,this.callback=e;}reset(e){this.remaining=e,this.resume();}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime);}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback();},this.remaining));}};var x={"ar-AE":{close:"\u0625\u063A\u0644\u0627\u0642",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631`,other:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631\u0627\u062A`})}.`},"bg-BG":{close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u0435`,other:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044F`})}.`},"cs-CZ":{close:"Zav\u0159\xEDt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1men\xED`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"da-DK":{close:"Luk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} besked`,other:()=>`${e.number(t.count)} beskeder`})}.`},"de-DE":{close:"Schlie\xDFen",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} Benachrichtigung`,other:()=>`${e.number(t.count)} Benachrichtigungen`})}.`},"el-GR":{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7`,other:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2`})}.`},"en-US":{close:"Close",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"es-ES":{close:"Cerrar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificaci\xF3n`,other:()=>`${e.number(t.count)} notificaciones`})}.`},"et-EE":{close:"Sule",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} teatis`,other:()=>`${e.number(t.count)} teatist`})}.`},"fi-FI":{close:"Sulje",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ilmoitus`,other:()=>`${e.number(t.count)} ilmoitusta`})}.`},"fr-FR":{close:"Fermer",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"he-IL":{close:"\u05E1\u05D2\u05D5\u05E8",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D4`,other:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D5\u05EA`})}.`},"hr-HR":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obavijest`,other:()=>`${e.number(t.count)} obavijesti`})}.`},"hu-HU":{close:"Bez\xE1r\xE1s",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`,other:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`})}.`},"it-IT":{close:"Chiudi",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica`,other:()=>`${e.number(t.count)} notifiche`})}.`},"ja-JP":{close:"\u9589\u3058\u308B",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`})}\u3002`},"ko-KR":{close:"\uB2EB\uAE30",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`,other:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`})}.`},"lt-LT":{close:"U\u017Edaryti",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} prane\u0161imas`,other:()=>`${e.number(t.count)} prane\u0161imai`})}.`},"lv-LV":{close:"Aizv\u0113rt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} pazi\u0146ojums`,other:()=>`${e.number(t.count)} pazi\u0146ojumi`})}.`},"nb-NO":{close:"Lukk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} varsling`,other:()=>`${e.number(t.count)} varsler`})}.`},"nl-NL":{close:"Sluiten",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} melding`,other:()=>`${e.number(t.count)} meldingen`})}.`},"pl-PL":{close:"Zamknij",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} powiadomienie`,few:()=>`${e.number(t.count)} powiadomienia`,many:()=>`${e.number(t.count)} powiadomie\u0144`,other:()=>`${e.number(t.count)} powiadomienia`})}.`},"pt-BR":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"pt-PT":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"ro-RO":{close:"\xCEnchide\u0163i",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificare`,other:()=>`${e.number(t.count)} notific\u0103ri`})}.`},"ru-RU":{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,other:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F`})}.`},"sk-SK":{close:"Zatvori\u0165",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1menie`,few:()=>`${e.number(t.count)} ozn\xE1menia`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"sl-SI":{close:"Zapri",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obvestilo`,two:()=>`${e.number(t.count)} obvestili`,few:()=>`${e.number(t.count)} obvestila`,other:()=>`${e.number(t.count)} obvestil`})}.`},"sr-SP":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obave\u0161tenje`,other:()=>`${e.number(t.count)} obave\u0161tenja`})}.`},"sv-SE":{close:"St\xE4ng",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} meddelande`,other:()=>`${e.number(t.count)} meddelanden`})}.`},"tr-TR":{close:"Kapat",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} bildirim`,other:()=>`${e.number(t.count)} bildirim`})}.`},"uk-UA":{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`,other:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`})}.`},"zh-CN":{close:"\u5173\u95ED",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`,other:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`})}\u3002`},"zh-TW":{close:"\u95DC\u9589",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u901A\u77E5`})}\u3002`}};function C(t,e$1,n){let{key:r,timer:o,timeout:i}=t.toast;useEffect(()=>{if(!(o==null||i==null))return o.reset(i),()=>{o.pause();}},[o,i]);let a=c$2(),s=e(),d=b(x,"@react-aria/toast"),[u,c]=useState(false);return a$6(()=>{c(true);},[]),{toastProps:{...a$9(t,{labelable:true}),role:"alertdialog","aria-modal":"false","aria-labelledby":t["aria-labelledby"]||a,"aria-describedby":t["aria-describedby"]||s,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":u?void 0:"true"},titleProps:{id:a},descriptionProps:{id:s},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>e$1.close(r)}}}var q=1,S=Symbol.for("react-aria-landmark-manager");function ce(t){return document.addEventListener("react-aria-landmark-manager-change",t),()=>document.removeEventListener("react-aria-landmark-manager-change",t)}function Z(){if(typeof document>"u")return null;let t=document[S];return t&&t.version>=q?t:(document[S]=new F,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[S])}function de(){return useSyncExternalStore(ce,Z,Z)}var F=class{landmarks=[];isListening=false;refCount=0;version=q;constructor(){this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this);}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:true}),document.addEventListener("focusin",this.focusinHandler,{capture:true}),document.addEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=true);}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:true}),document.removeEventListener("focusin",this.focusinHandler,{capture:true}),document.removeEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=false);}focusLandmark(e,n){this.landmarks.find(r=>r.ref.current===e)?.focus?.(n);}getLandmarksByRole(e){return new Set(this.landmarks.filter(n=>n.role===e))}getLandmarkByRole(e){return this.landmarks.find(n=>n.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(o=>o.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(o=>o.role==="main").length>1&&process.env.NODE_ENV!=="production"&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let o=Math.floor((n+r)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);!!(i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS)?n=o+1:r=o-1;}this.landmarks.splice(n,0,e),this.checkLabels(e.role);}updateLandmark(e){let n=this.landmarks.findIndex(r=>r.ref===e.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...e},this.checkLabels(this.landmarks[n].role));}removeLandmark(e){this.landmarks=this.landmarks.filter(n=>n.ref!==e),this.teardownIfNeeded();}checkLabels(e){let n=this.getLandmarksByRole(e);if(n.size>1){let r=[...n].filter(o=>!o.label);if(r.length>0&&process.env.NODE_ENV!=="production")console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(o=>o.ref.current));else if(process.env.NODE_ENV!=="production"){let o=[...n].map(a=>a.label);o.filter((a,s)=>o.indexOf(a)!==s).forEach(a=>{console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(s=>s.label===a).map(s=>s.ref.current));});}}}closestLandmark(e){let n=new Map(this.landmarks.map(o=>[o.ref.current,o])),r=e;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(e,{backward:n}){let r=this.closestLandmark(e),o=n?this.landmarks.length-1:0;r&&(o=this.landmarks.indexOf(r)+(n?-1:1));let i=()=>{if(o<0){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:true,cancelable:true})))return true;o=this.landmarks.length-1;}else if(o>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:true,cancelable:true})))return true;o=0;}return o<0||o>=this.landmarks.length};if(i())return;let a=o;for(;this.landmarks[o].ref.current?.closest("[aria-hidden=true]");){if(o+=n?-1:1,i())return;if(o===a)break}return this.landmarks[o]}f6Handler(e){e.key==="F6"&&(e.altKey?this.focusMain():this.navigate(g(e),e.shiftKey))&&(e.preventDefault(),e.stopPropagation());}focusMain(){let e=this.getLandmarkByRole("main");return e&&e.ref.current&&e.ref.current.isConnected?(this.focusLandmark(e.ref.current,"forward"),true):false}navigate(e,n){let r=this.getNextLandmark(e,{backward:n});if(!r)return false;if(r.lastFocused){let o=r.lastFocused;if(e$1(document.body,o))return o.focus(),true}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,n?"backward":"forward"),true):false}focusinHandler(e){let n=this.closestLandmark(g(e));n&&n.ref.current!==g(e)&&this.updateLandmark({ref:n.ref,lastFocused:g(e)});let r=e.relatedTarget;if(r){let o=this.closestLandmark(r);o&&o.ref.current===r&&o.blur();}}focusoutHandler(e){let n=g(e),r=e.relatedTarget;if(!r||r===document){let o=this.closestLandmark(n);o&&o.ref.current===n&&o.blur();}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(n,r){let o=r?.from||document.activeElement;return e.navigate(o,n==="backward")},focusNext(n){let r=n?.from||document.activeElement;return e.navigate(r,false)},focusPrevious(n){let r=n?.from||document.activeElement;return e.navigate(r,true)},focusMain(){return e.focusMain()},dispose(){e&&(e.refCount--,e.teardownIfNeeded(),e=null);}}}registerLandmark(e){return this.landmarks.find(n=>n.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}};function J(t,e){let{role:n,"aria-label":r,"aria-labelledby":o,focus:i}=t,a=de(),s=r||o,[d,u]=useState(false),c=useCallback(()=>{u(true);},[u]),f=useCallback(()=>{u(false);},[u]);return a$6(()=>{if(a)return a.registerLandmark({ref:e,label:s,role:n,focus:i||c,blur:f})},[a,s,e,n,i,c,f]),useEffect(()=>{d&&e.current?.focus();},[d,e]),{landmarkProps:{role:n,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":o}}}function _(t,e,n){let r=b(x,"@react-aria/toast"),{landmarkProps:o}=J({role:"region","aria-label":t["aria-label"]||r.format("notifications",{count:e.visibleToasts.length})},n),i=useRef(false),a=useRef(false),s=useCallback(()=>{i.current||a.current?e.pauseAll():e.resumeAll();},[e]),{hoverProps:d}=a$5({onHoverStart:()=>{i.current=true,s();},onHoverEnd:()=>{i.current=false,s();}}),u=useRef([]),c$2=useRef(e.visibleToasts),f=useRef(null);a$6(()=>{if(f.current===-1||e.visibleToasts.length===0||!n.current){u.current=[],c$2.current=e.visibleToasts;return}if(u.current=[...n.current.querySelectorAll('[role="alertdialog"]')],c$2.current.length===e.visibleToasts.length&&e.visibleToasts.every((l,p)=>l.key===c$2.current[p].key)){c$2.current=e.visibleToasts;return}let b=c$2.current.map((l,p)=>({...l,i:p,isRemoved:!e.visibleToasts.some(h=>l.key===h.key)})),y=b.findIndex(l=>l.i===f.current&&l.isRemoved);if(y>-1)if(c()==="pointer"&&m.current?.isConnected)a$7(m.current);else {let l=0,p,h;for(;l<=y;)b[l].isRemoved||(h=Math.max(0,l-1)),l++;for(;l<b.length;){if(!b[l].isRemoved){p=l-1;break}l++;}h===void 0&&p===void 0&&(h=0),h>=0&&h<u.current.length?a$7(u.current[h]):p>=0&&p<u.current.length&&a$7(u.current[p]);}c$2.current=e.visibleToasts;},[e.visibleToasts,n]);let m=useRef(null),{focusWithinProps:oe}=b$1({onFocusWithin:b=>{a.current=true,m.current=b.relatedTarget,s();},onBlurWithin:()=>{a.current=false,m.current=null,s();}});return useEffect(()=>{e.visibleToasts.length===0&&m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n,e.visibleToasts.length]),useEffect(()=>()=>{m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n]),{regionProps:c$1(o,d,oe,{tabIndex:-1,"data-react-aria-top-layer":true,onFocus:b=>{let y=g(b).closest('[role="alertdialog"]');f.current=u.current.findIndex(l=>l===y);},onBlur:()=>{f.current=-1;}})}}var Y=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6mf _1yep5z6mh",variantClassNames:{variant:{info:"_1yep5z613s",warning:"_1yep5z613n",error:"_1yep5z613d",success:"_1yep5z613i"}},defaultVariants:{},compoundVariants:[]}),ee="_1udvgpn5 _1yep5z6iz _1yep5z6j0 _1yep5z6j1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n";var fe=()=>{};function be({state:t,...e}){z.useRef(null);let {toastProps:r,contentProps:o,titleProps:i,descriptionProps:a,closeButtonProps:s}=C(e,t),d=useMemo(()=>({root:r,title:i,content:o,description:a,close:s}),[r,i,o,a,s]),{canClose:u=true,...c}=e.toast.content;return jsx(a$8,{elementProps:d,...c,className:a$2(Y({variant:c.variant||"info"}),c.className),onClose:u?fe:void 0})}var te=z.forwardRef(({state:t,style:e,className:n,...r},o)=>{let i=a$1(o),{regionProps:a}=_(r,t,i),s={zIndex:1,...e,...a.style};return jsx("div",{...a,ref:i,className:a$2(ee,n),style:s,children:t.visibleToasts.map(d=>jsx(be,{toast:d,state:t},d.key))})});te.displayName="ToastRegion";var ne=z.forwardRef(({toastQueue:t,portalContainer:e,...n},r)=>{let o=w(t),i=a$3(e);return o.visibleToasts.length>0?jsx(a$4,{portalContainer:i,ref:r,children:jsx(te,{state:o,...n})}):null});ne.displayName="GlobalToastRegion";export{E as a,ne as b};
@@ -1,4 +1,4 @@
1
- import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-JB3O4ABN.mjs';import {a as a$4}from'./chunk-F6JQN7YM.mjs';import {b as b$1}from'./chunk-WWSGOGLA.mjs';import {e}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {a as a$6}from'./chunk-JDLUGVXG.mjs';import {e as e$1,g}from'./chunk-AUOQSTS5.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import j,{useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-2V323KAD.mjs';import {a as a$4}from'./chunk-6JWACCHG.mjs';import {b as b$1}from'./chunk-WWSGOGLA.mjs';import {e}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {a as a$6}from'./chunk-JDLUGVXG.mjs';import {e as e$1,g}from'./chunk-AUOQSTS5.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import j,{useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var _={none:"toolbar",single:"radiogroup",multiple:"toolbar"};function P(e$2,o,r){let{isDisabled:i,orientation:n="horizontal"}=e$2,[c,p]=useState(false);a$6(()=>{p(!!(r.current&&r.current.parentElement?.closest('[role="toolbar"]')));},[r]),[...o.collection.getKeys()].some(t=>!o.disabledKeys.has(t))||(i=true);let{direction:a}=b$2(),s=e(r),l=a==="rtl"&&n==="horizontal",A=t=>{if(e$1(t.currentTarget,g(t)))switch(t.key){case "ArrowRight":case "ArrowDown":t.preventDefault(),t.stopPropagation(),t.key==="ArrowRight"&&l?s.focusPrevious({wrap:true}):s.focusNext({wrap:true});break;case "ArrowLeft":case "ArrowUp":t.preventDefault(),t.stopPropagation(),t.key==="ArrowLeft"&&l?s.focusNext({wrap:true}):s.focusPrevious({wrap:true});break}},u=_[o.selectionManager.selectionMode];return c&&u==="toolbar"&&(u="group"),{actionGroupProps:{...a$7(e$2,{labelable:true}),role:u,"aria-orientation":u==="toolbar"?n:void 0,"aria-disabled":i,onKeyDown:A}}}var z={none:void 0,single:"radio",multiple:"checkbox"};function x(e,o,r){let i=o.selectionManager.selectionMode,n={role:z[i]};if(i!=="none"){let m=o.selectionManager.isSelected(e.key);n["aria-checked"]=m;}let c=e.key===o.selectionManager.focusedKey,p=t(()=>{c&&o.selectionManager.setFocusedKey(null);});return useEffect(()=>()=>{p();},[]),{buttonProps:c$1(n,{tabIndex:c||o.selectionManager.focusedKey==null?0:-1,onFocus(){o.selectionManager.setFocusedKey(e.key);},onPress(){o.selectionManager.select(e.key);}})}}var F="_1yep5z6f5",N="_1dc3b8m0";var B=j.forwardRef(({className:e,selectionMode:o,style:r,"data-block-id":i,"data-block-class":n,tooltipProps:c$1,icon:p,renderActionItem:m,...a$4},s)=>{let l=a(s),A=c(),u=b({...a$4,selectionMode:o,suppressTextValueWarning:true,children:A}),{actionGroupProps:t}=P({...a$4,selectionMode:o,children:A},u,l),I=[...u.collection].map(g=>(a$1(g.value),jsx(V,{item:g,state:u,isDisabled:a$4.isDisabled,onAction:a$4.onAction,tooltipProps:c$1,renderActionItem:m},g.key)));return p?jsxs(a$2,{...t,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:[jsx(p,{"aria-hidden":"true",size:24,className:F}),jsx(a$2,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:I})]}):jsx(a$2,{...t,display:"flex",flexDirection:"row",gap:"xs",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:I})});B.displayName="ActionGroup";var V=({item:e,state:o,tooltipProps:r,renderActionItem:i,onAction:n,isDisabled:c})=>{let{buttonProps:p}=x({key:e.key},o),m=c||o.selectionManager.isDisabled(e.key),a=o.selectionManager.isSelected(e.key);a$1(e.value);let{icon:s}=e.value;a$1(s);let l=useMemo(()=>(a$1(e.value),typeof r=="function"?r(e.value):r),[r,e.value]);return jsx(b$1,{...c$1(p,{onPress:()=>{n?.(e.key);}}),children:jsx(a$4,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...l,children:i?.(e,{isSelected:a,isDisabled:m})||jsx(a$5,{variant:"tertiary",icon:s,"aria-label":e.textValue,size:"sm",isDisabled:m,className:a$3({[N]:a},"BaselineUI-ActionGroup-Item")})})})};export{B as a,V as b};
10
+ var _={none:"toolbar",single:"radiogroup",multiple:"toolbar"};function P(e$2,o,r){let{isDisabled:i,orientation:n="horizontal"}=e$2,[c,p]=useState(false);a$6(()=>{p(!!(r.current&&r.current.parentElement?.closest('[role="toolbar"]')));},[r]),[...o.collection.getKeys()].some(t=>!o.disabledKeys.has(t))||(i=true);let{direction:a}=b$2(),s=e(r),l=a==="rtl"&&n==="horizontal",A=t=>{if(e$1(t.currentTarget,g(t)))switch(t.key){case "ArrowRight":case "ArrowDown":t.preventDefault(),t.stopPropagation(),t.key==="ArrowRight"&&l?s.focusPrevious({wrap:true}):s.focusNext({wrap:true});break;case "ArrowLeft":case "ArrowUp":t.preventDefault(),t.stopPropagation(),t.key==="ArrowLeft"&&l?s.focusNext({wrap:true}):s.focusPrevious({wrap:true});break}},u=_[o.selectionManager.selectionMode];return c&&u==="toolbar"&&(u="group"),{actionGroupProps:{...a$7(e$2,{labelable:true}),role:u,"aria-orientation":u==="toolbar"?n:void 0,"aria-disabled":i,onKeyDown:A}}}var z={none:void 0,single:"radio",multiple:"checkbox"};function x(e,o,r){let i=o.selectionManager.selectionMode,n={role:z[i]};if(i!=="none"){let m=o.selectionManager.isSelected(e.key);n["aria-checked"]=m;}let c=e.key===o.selectionManager.focusedKey,p=t(()=>{c&&o.selectionManager.setFocusedKey(null);});return useEffect(()=>()=>{p();},[]),{buttonProps:c$1(n,{tabIndex:c||o.selectionManager.focusedKey==null?0:-1,onFocus(){o.selectionManager.setFocusedKey(e.key);},onPress(){o.selectionManager.select(e.key);}})}}var F="_1yep5z6f9",N="_1dc3b8m0";var B=j.forwardRef(({className:e,selectionMode:o,style:r,"data-block-id":i,"data-block-class":n,tooltipProps:c$1,icon:p,renderActionItem:m,...a$4},s)=>{let l=a(s),A=c(),u=b({...a$4,selectionMode:o,suppressTextValueWarning:true,children:A}),{actionGroupProps:t}=P({...a$4,selectionMode:o,children:A},u,l),I=[...u.collection].map(g=>(a$1(g.value),jsx(V,{item:g,state:u,isDisabled:a$4.isDisabled,onAction:a$4.onAction,tooltipProps:c$1,renderActionItem:m},g.key)));return p?jsxs(a$2,{...t,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:[jsx(p,{"aria-hidden":"true",size:24,className:F}),jsx(a$2,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:I})]}):jsx(a$2,{...t,display:"flex",flexDirection:"row",gap:"xs",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:I})});B.displayName="ActionGroup";var V=({item:e,state:o,tooltipProps:r,renderActionItem:i,onAction:n,isDisabled:c})=>{let{buttonProps:p}=x({key:e.key},o),m=c||o.selectionManager.isDisabled(e.key),a=o.selectionManager.isSelected(e.key);a$1(e.value);let{icon:s}=e.value;a$1(s);let l=useMemo(()=>(a$1(e.value),typeof r=="function"?r(e.value):r),[r,e.value]);return jsx(b$1,{...c$1(p,{onPress:()=>{n?.(e.key);}}),children:jsx(a$4,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...l,children:i?.(e,{isSelected:a,isDisabled:m})||jsx(a$5,{variant:"tertiary",icon:s,"aria-label":e.textValue,size:"sm",isDisabled:m,className:a$3({[N]:a},"BaselineUI-ActionGroup-Item")})})})};export{B as a,V as b};
@@ -1,4 +1,4 @@
1
- import {a as a$4}from'./chunk-ZLDT2KDZ.mjs';import {a as a$2}from'./chunk-UUBOEBYZ.mjs';import {a as a$1}from'./chunk-4PYEGHW5.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import d,{useMemo,useContext}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$4}from'./chunk-ZLDT2KDZ.mjs';import {a as a$2}from'./chunk-UUBOEBYZ.mjs';import {a as a$1}from'./chunk-4PYEGHW5.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import d,{useMemo,useContext}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$4}from'./chunk-ZLDT2KDZ.mjs';import {a as a$2}from'./chunk-UUBOEB
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var s=d.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),C=({children:e,...t})=>{let a=d.useRef(null),o=a$1(t),r=a$2(t,o),i=useMemo(()=>({state:o,overlayTriggerAria:r,triggerRef:a}),[o,r]);return jsx(s.Provider,{value:i,children:e})};var N=a({defaultClassName:"_1gzftth2",variantClassNames:{placement:{bottom:"_1gzftth3",top:"_1gzftth4",right:"_1gzftth5",left:"_1gzftth6"}},defaultVariants:{},compoundVariants:[]}),E=a({defaultClassName:"_1gzftth7",variantClassNames:{placement:{bottom:"_1gzftth8",top:"_1gzftth9",right:"_1gzfttha",left:"_1gzftthb"}},defaultVariants:{},compoundVariants:[]}),B="_1gzftth1 _1yep5z6is _1yep5z6it _1yep5z6iu",F="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6k4 _1yep5z6k5 _1yep5z6k6 _1yep5z6d7",c="_1gzftthd",L="_1gzftthc",I="var(--_1gzftth0)";var x=d.createContext({isSelected:false,ref:void 0}),G=({children:e,anchorRect:t})=>{let{state:a,overlayTriggerAria:o,triggerRef:r}=useContext(s);a$3(a,"PopoverTrigger must be used within a Popover");let{triggerProps:i}=o;a$3(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),a$3(!t||a$4(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height.");let y=useMemo(()=>({...i,isSelected:a.isOpen,ref:r}),[i,a.isOpen,r]);return t?jsx("div",{className:a$5(c,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:r,tabIndex:-1},JSON.stringify(t)):typeof e=="function"?e({isOpen:a.isOpen,triggerProps:i,triggerRef:r}):d.isValidElement(e)?jsx(x.Provider,{value:y,children:e}):null};export{s as a,C as b,N as c,E as d,B as e,F as f,L as g,I as h,x as i,G as j};
10
+ var s=d.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),C=({children:e,...t})=>{let a=d.useRef(null),o=a$1(t),r=a$2(t,o),i=useMemo(()=>({state:o,overlayTriggerAria:r,triggerRef:a}),[o,r]);return jsx(s.Provider,{value:i,children:e})};var N=a({defaultClassName:"_1gzftth2",variantClassNames:{placement:{bottom:"_1gzftth3",top:"_1gzftth4",right:"_1gzftth5",left:"_1gzftth6"}},defaultVariants:{},compoundVariants:[]}),E=a({defaultClassName:"_1gzftth7",variantClassNames:{placement:{bottom:"_1gzftth8",top:"_1gzftth9",right:"_1gzfttha",left:"_1gzftthb"}},defaultVariants:{},compoundVariants:[]}),B="_1gzftth1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",F="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z6d7",c="_1gzftthd",L="_1gzftthc",I="var(--_1gzftth0)";var x=d.createContext({isSelected:false,ref:void 0}),G=({children:e,anchorRect:t})=>{let{state:a,overlayTriggerAria:o,triggerRef:r}=useContext(s);a$3(a,"PopoverTrigger must be used within a Popover");let{triggerProps:i}=o;a$3(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),a$3(!t||a$4(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height.");let y=useMemo(()=>({...i,isSelected:a.isOpen,ref:r}),[i,a.isOpen,r]);return t?jsx("div",{className:a$5(c,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:r,tabIndex:-1},JSON.stringify(t)):typeof e=="function"?e({isOpen:a.isOpen,triggerProps:i,triggerRef:r}):d.isValidElement(e)?jsx(x.Provider,{value:y,children:e}):null};export{s as a,C as b,N as c,E as d,B as e,F as f,L as g,I as h,x as i,G as j};
@@ -0,0 +1,10 @@
1
+ import {a as a$3}from'./chunk-SYFSGF73.mjs';import {c}from'./chunk-7MQBBSZ2.mjs';import {a as a$2}from'./chunk-OAY74XPB.mjs';import {b}from'./chunk-QR2AF3KT.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {b as b$1,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {assignInlineVars}from'@vanilla-extract/dynamic';import d,{useContext,useMemo,useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var V="var(--cjv3et0)",H=a({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g9 _1yep5z6mf _1yep5z6mh",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z613z",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo _1yep5z618m"},isFocusVisible:{true:"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vd"}},defaultVariants:{},compoundVariants:[]});function k(e,o){let t=e["aria-label"],r=e["aria-labelledby"],[i,s]=useState(()=>t||"");return useEffect(()=>{if(t){s(t);return}if(!r){s("");return}let a=o?.current?.getRootNode()??a$5(null),p=r.replaceAll(":",String.raw`\:`),m=a.querySelector(`#${p}`);if(m?.textContent){s(m.textContent);return}let l=a$5(null),y=a===l?l.body:a,n=new MutationObserver(()=>{let c=a.querySelector(`#${p}`);c?.textContent&&(s(c.textContent),n.disconnect());});return n.observe(y,{childList:true,subtree:true}),()=>{n.disconnect();}},[t,r,o]),i}var z=d.createContext({titleProps:{}}),O=d.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:i="md",variant:s="primary","data-block-id":a,"data-block-class":p,drawerBackground:m,...l},y)=>{let n=d.useRef(null),c$2=d.useRef(null),{containerWidth:C,shouldContainOverlays:q}=useContext(b),{isDrawer:u,closeDrawer:U,dialogStyle:x,setDialogElement:R,isWithinModal:P}=useContext(c),$=k(l,c$2),{focusProps:A,isFocusVisible:T}=a$1(),{dialogProps:I,titleProps:w}=a$2(l,n),B=useMemo(()=>({titleProps:w}),[w]);return u&&r?jsx(a$3,{title:$,onCloseRequest:U,className:o,style:x,...l,"data-drawer":true,"data-block-id":a,"data-block-class":p,ref:b$1(y,c$2,g=>{R(g);}),background:m,children:e}):jsx(z.Provider,{value:B,children:jsx("section",{...c$1(I,A),"data-block-id":a,"data-block-class":p,"data-focus-visible":T,"data-overlay-type":P?"modal":"popover",ref:b$1(n,y,g=>{R(g);}),style:{...x,...t,...assignInlineVars({[V]:C&&q?`${C}px`:"100vw"})},className:a$4(H({size:u?"content":i,variant:s,isDrawer:u,isFocusVisible:T,overlayType:P?"modal":"popover"}),"BaselineUI-Dialog",o),children:e})})});O.displayName="Dialog";var W=d.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:i}=useContext(z);return d.isValidElement(e)?d.cloneElement(e,{...i,ref:r,className:a$4(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...i,ref:r,className:o,style:t,children:e})});W.displayName="DialogTitle";export{O as a,W as b};
@@ -7,4 +7,4 @@ import {a}from'./chunk-4QEH5CGK.mjs';import y from'markdown-it';import c,{useMem
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var o="_1t55bp71",r="_1yep5z6e3 _1yep5z6eu _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k",i="_1t55bp70";var u=y(),p=c.forwardRef(({className:n,style:l,children:t,"data-block-id":d,"data-block-class":b,showCaret:s},g)=>{let m=useMemo(()=>{let a=t;return (!t||Array.isArray(t)&&t.length===0)&&(a=""),u.render(a)},[t]);return jsx("div",{className:a(r,i,{[o]:s},"BaselineUI-Markdown",n),"data-block-id":d,"data-block-class":b,style:l,ref:g,dangerouslySetInnerHTML:{__html:m}})});p.displayName="Markdown";export{p as a};
10
+ var o="_1t55bp71",r="_1yep5z6e3 _1yep5z6ey _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69i _1yep5z69j _1yep5z69k",i="_1t55bp70";var u=y(),p=c.forwardRef(({className:n,style:l,children:t,"data-block-id":d,"data-block-class":b,showCaret:s},g)=>{let m=useMemo(()=>{let a=t;return (!t||Array.isArray(t)&&t.length===0)&&(a=""),u.render(a)},[t]);return jsx("div",{className:a(r,i,{[o]:s},"BaselineUI-Markdown",n),"data-block-id":d,"data-block-class":b,style:l,ref:g,dangerouslySetInnerHTML:{__html:m}})});p.displayName="Markdown";export{p as a};