@baseline-ui/core 3.3.0 → 3.4.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 (434) hide show
  1. package/dist/Accordion.css +1 -1
  2. package/dist/Accordion.mjs +1 -1
  3. package/dist/ActionButton.css +1 -1
  4. package/dist/ActionButton.mjs +1 -1
  5. package/dist/ActionGroup.css +1 -1
  6. package/dist/ActionGroup.mjs +1 -1
  7. package/dist/ActionIconButton.css +1 -1
  8. package/dist/ActionIconButton.mjs +1 -1
  9. package/dist/Actionable.mjs +1 -1
  10. package/dist/AlertDialog.css +1 -1
  11. package/dist/AlertDialog.mjs +1 -1
  12. package/dist/AudioPlayer.css +1 -1
  13. package/dist/AudioPlayer.mjs +1 -1
  14. package/dist/ButtonSelect.css +1 -1
  15. package/dist/ButtonSelect.mjs +1 -1
  16. package/dist/Calendar.css +1 -1
  17. package/dist/Calendar.mjs +1 -1
  18. package/dist/Checkbox.mjs +1 -1
  19. package/dist/ColorInput.css +1 -1
  20. package/dist/ColorInput.mjs +1 -1
  21. package/dist/ColorSwatch.mjs +1 -1
  22. package/dist/ColorSwatchPicker.mjs +1 -1
  23. package/dist/ComboBox.css +1 -1
  24. package/dist/ComboBox.mjs +1 -1
  25. package/dist/DateField.css +1 -1
  26. package/dist/DateField.mjs +1 -1
  27. package/dist/DateFormat.mjs +1 -1
  28. package/dist/Dialog.css +1 -1
  29. package/dist/Dialog.mjs +1 -1
  30. package/dist/Disclosure.mjs +1 -1
  31. package/dist/DomNodeRenderer.mjs +1 -1
  32. package/dist/Drawer.css +1 -1
  33. package/dist/Drawer.mjs +1 -1
  34. package/dist/Editor.css +1 -1
  35. package/dist/Editor.mjs +1 -1
  36. package/dist/FileInput.css +1 -1
  37. package/dist/FileInput.mjs +1 -1
  38. package/dist/FileList.css +1 -1
  39. package/dist/FileList.mjs +1 -1
  40. package/dist/FileUploader.css +1 -1
  41. package/dist/FileUploader.mjs +1 -1
  42. package/dist/FrameProvider.mjs +1 -1
  43. package/dist/FreehandCanvas.css +1 -1
  44. package/dist/FreehandCanvas.mjs +1 -1
  45. package/dist/GridList.mjs +1 -1
  46. package/dist/Group.mjs +1 -1
  47. package/dist/I18nProvider.mjs +1 -1
  48. package/dist/Icon.mjs +1 -1
  49. package/dist/ImageDropZone.css +1 -1
  50. package/dist/ImageDropZone.mjs +1 -1
  51. package/dist/ImageGallery.css +1 -1
  52. package/dist/ImageGallery.mjs +1 -1
  53. package/dist/InlineAlert.css +1 -1
  54. package/dist/InlineAlert.mjs +1 -1
  55. package/dist/InlineToolbar.mjs +2 -2
  56. package/dist/Kbd.mjs +1 -1
  57. package/dist/Link.mjs +1 -1
  58. package/dist/ListBox.mjs +1 -1
  59. package/dist/Menu.css +1 -1
  60. package/dist/Menu.mjs +1 -1
  61. package/dist/MessageFormat.mjs +1 -1
  62. package/dist/Modal.mjs +1 -1
  63. package/dist/NumberFormat.mjs +1 -1
  64. package/dist/NumberInput.css +1 -1
  65. package/dist/NumberInput.mjs +1 -1
  66. package/dist/Pagination.css +1 -1
  67. package/dist/Pagination.mjs +1 -1
  68. package/dist/Panel.mjs +1 -1
  69. package/dist/PointPicker.mjs +1 -1
  70. package/dist/Popover.mjs +1 -1
  71. package/dist/Portal.mjs +1 -1
  72. package/dist/Preview.css +1 -1
  73. package/dist/Preview.mjs +1 -1
  74. package/dist/ProgressBar.mjs +1 -1
  75. package/dist/ProgressSpinner.mjs +1 -1
  76. package/dist/RadioGroup.mjs +1 -1
  77. package/dist/Reaction.mjs +1 -1
  78. package/dist/ScrollControlButton.mjs +1 -1
  79. package/dist/SearchInput.css +1 -1
  80. package/dist/SearchInput.mjs +1 -1
  81. package/dist/Select.css +1 -1
  82. package/dist/Select.mjs +1 -1
  83. package/dist/Separator.mjs +1 -1
  84. package/dist/Slider.css +1 -1
  85. package/dist/Slider.mjs +1 -1
  86. package/dist/Stepper.mjs +1 -1
  87. package/dist/Switch.mjs +1 -1
  88. package/dist/Table.mjs +1 -1
  89. package/dist/Tabs.css +1 -1
  90. package/dist/Tabs.mjs +1 -1
  91. package/dist/Tag.mjs +1 -1
  92. package/dist/TagGroup.mjs +1 -1
  93. package/dist/TaggedPagination.css +1 -1
  94. package/dist/TaggedPagination.mjs +1 -1
  95. package/dist/Text.mjs +1 -1
  96. package/dist/TextInput.mjs +1 -1
  97. package/dist/ThemeProvider.mjs +1 -1
  98. package/dist/TimeField.mjs +1 -1
  99. package/dist/Toast.css +1 -1
  100. package/dist/Toast.mjs +1 -1
  101. package/dist/ToggleButton.css +1 -1
  102. package/dist/ToggleButton.mjs +1 -1
  103. package/dist/ToggleIconButton.mjs +1 -1
  104. package/dist/Toolbar.css +1 -1
  105. package/dist/Toolbar.mjs +1 -1
  106. package/dist/Tooltip.mjs +1 -1
  107. package/dist/TreeView.css +1 -1
  108. package/dist/TreeView.mjs +1 -1
  109. package/dist/UNSAFE_ListBox.mjs +1 -1
  110. package/dist/Virtualizer.mjs +1 -1
  111. package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
  112. package/dist/{chunk-4PYEGHW5.mjs → chunk-22VRCVTH.mjs} +2 -2
  113. package/dist/chunk-235S3EB7.mjs +10 -0
  114. package/dist/chunk-24R46WQW.mjs +10 -0
  115. package/dist/{chunk-5IXSPQRW.mjs → chunk-2F3CFR22.mjs} +2 -2
  116. package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
  117. package/dist/{chunk-KHOXLBPR.mjs → chunk-2LFMBQKQ.mjs} +2 -2
  118. package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
  119. package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
  120. package/dist/{chunk-QXOG2ISL.mjs → chunk-36ZMHBG5.mjs} +2 -2
  121. package/dist/chunk-3BEG3MEX.mjs +10 -0
  122. package/dist/chunk-3BG6K2G2.mjs +10 -0
  123. package/dist/{chunk-E5GYCA3P.mjs → chunk-3DWFAHR2.mjs} +1 -1
  124. package/dist/{chunk-YX2ASVM3.mjs → chunk-3KCSUNRV.mjs} +1 -1
  125. package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
  126. package/dist/chunk-4AG2RUAZ.mjs +10 -0
  127. package/dist/{chunk-RSTHM3ZF.mjs → chunk-4EANTENO.mjs} +1 -1
  128. package/dist/{chunk-TCCQDGMI.mjs → chunk-4EAXDHSV.mjs} +1 -1
  129. package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
  130. package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
  131. package/dist/chunk-4MHBLLHV.mjs +11 -0
  132. package/dist/chunk-4P247R4V.mjs +10 -0
  133. package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
  134. package/dist/chunk-4RSUKS23.mjs +10 -0
  135. package/dist/chunk-4S4GGUSH.mjs +10 -0
  136. package/dist/chunk-4W5VP4NV.mjs +10 -0
  137. package/dist/chunk-5BKC373Y.mjs +10 -0
  138. package/dist/chunk-5FK5AJ7A.mjs +10 -0
  139. package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
  140. package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
  141. package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
  142. package/dist/{chunk-UCPPKNGF.mjs → chunk-5VNC6UYE.mjs} +2 -2
  143. package/dist/chunk-5ZC64ZG7.mjs +10 -0
  144. package/dist/{chunk-NUYBQ7KP.mjs → chunk-6G7EUNZW.mjs} +1 -1
  145. package/dist/chunk-6QQEK5I6.mjs +10 -0
  146. package/dist/{chunk-B237CJT4.mjs → chunk-76DKF2SK.mjs} +1 -1
  147. package/dist/chunk-7MMO7S3R.mjs +10 -0
  148. package/dist/{chunk-6NQPENP4.mjs → chunk-7P7VZMTO.mjs} +1 -1
  149. package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
  150. package/dist/chunk-7SQRBY7N.mjs +10 -0
  151. package/dist/chunk-7TE4MFKC.mjs +10 -0
  152. package/dist/chunk-7XGNJE7J.mjs +10 -0
  153. package/dist/{chunk-VZFS4QRW.mjs → chunk-AD3MLX6G.mjs} +1 -1
  154. package/dist/chunk-AELTF2DE.mjs +10 -0
  155. package/dist/chunk-AI6WQPRX.mjs +10 -0
  156. package/dist/chunk-AK7XHUQW.mjs +10 -0
  157. package/dist/chunk-AM5FU4Y7.mjs +10 -0
  158. package/dist/chunk-AYQN3OH2.mjs +10 -0
  159. package/dist/chunk-B3EZOXNU.mjs +10 -0
  160. package/dist/chunk-BBYODNBO.mjs +10 -0
  161. package/dist/chunk-BGQRLALS.mjs +10 -0
  162. package/dist/chunk-BGRGRUG4.mjs +10 -0
  163. package/dist/chunk-BHJCYKFJ.mjs +11 -0
  164. package/dist/chunk-BTPAZDGG.mjs +10 -0
  165. package/dist/{chunk-HVKYWSRF.mjs → chunk-BXNNVZOQ.mjs} +1 -1
  166. package/dist/chunk-BYDJXA5A.mjs +10 -0
  167. package/dist/{chunk-ZLZAFTSD.mjs → chunk-C2VP5IEB.mjs} +1 -1
  168. package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
  169. package/dist/chunk-CIPPPD6E.mjs +10 -0
  170. package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
  171. package/dist/{chunk-QSSCSN5S.mjs → chunk-COHK4QQW.mjs} +2 -2
  172. package/dist/chunk-CTSDHAAV.mjs +10 -0
  173. package/dist/chunk-CU6D2EA6.mjs +10 -0
  174. package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
  175. package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
  176. package/dist/chunk-DAN62T2M.mjs +10 -0
  177. package/dist/{chunk-SYFSGF73.mjs → chunk-DAS5QGJX.mjs} +1 -1
  178. package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
  179. package/dist/{chunk-RJZZIVSY.mjs → chunk-DSV6CCI6.mjs} +1 -1
  180. package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
  181. package/dist/{chunk-NADBGP35.mjs → chunk-E22TWF63.mjs} +2 -2
  182. package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
  183. package/dist/chunk-ETM4MNG4.mjs +10 -0
  184. package/dist/chunk-EUVUJQ2Z.mjs +10 -0
  185. package/dist/chunk-F7WPMQ3P.mjs +16 -0
  186. package/dist/chunk-FOKMDEP7.mjs +10 -0
  187. package/dist/chunk-FPFGTGUC.mjs +10 -0
  188. package/dist/chunk-FPM5UJRF.mjs +10 -0
  189. package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
  190. package/dist/{chunk-N26C7NYZ.mjs → chunk-GCBMNOA6.mjs} +1 -1
  191. package/dist/chunk-GFKZXGWJ.mjs +10 -0
  192. package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
  193. package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
  194. package/dist/chunk-GMALMQWI.mjs +10 -0
  195. package/dist/chunk-GQIS4QBN.mjs +10 -0
  196. package/dist/chunk-GUPSQSPC.mjs +0 -0
  197. package/dist/chunk-HH4VLTF3.mjs +10 -0
  198. package/dist/chunk-I7LPPUZS.mjs +10 -0
  199. package/dist/chunk-IEOHIOGL.mjs +10 -0
  200. package/dist/chunk-IHES52NR.mjs +10 -0
  201. package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
  202. package/dist/chunk-IUXXTORQ.mjs +10 -0
  203. package/dist/{chunk-5K46OAX5.mjs → chunk-IVGNOQSQ.mjs} +1 -1
  204. package/dist/chunk-IWZXZ5LU.mjs +10 -0
  205. package/dist/chunk-J4OPD7OL.mjs +10 -0
  206. package/dist/{chunk-XUJJMAKM.mjs → chunk-JZXLV6JU.mjs} +1 -1
  207. package/dist/chunk-K4TTZX4T.mjs +10 -0
  208. package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
  209. package/dist/chunk-K7VOXFSK.mjs +10 -0
  210. package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
  211. package/dist/chunk-KGS3UWPG.mjs +10 -0
  212. package/dist/{chunk-6EFNC443.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
  213. package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
  214. package/dist/chunk-KUDCYGII.mjs +10 -0
  215. package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
  216. package/dist/chunk-KX7WG3L4.mjs +10 -0
  217. package/dist/chunk-LJZ7ZS4C.mjs +10 -0
  218. package/dist/{chunk-PNBYTIUO.mjs → chunk-LPI2NIDI.mjs} +1 -1
  219. package/dist/{chunk-L6S5GBKS.mjs → chunk-MBRNO6IW.mjs} +1 -1
  220. package/dist/chunk-MDE2FQHX.mjs +10 -0
  221. package/dist/chunk-MFB3SWO7.mjs +29 -0
  222. package/dist/{chunk-V37GPPZD.mjs → chunk-MIF6BAPG.mjs} +1 -1
  223. package/dist/chunk-MYJ733MN.mjs +10 -0
  224. package/dist/chunk-MZIQ27JP.mjs +10 -0
  225. package/dist/chunk-NJKSUI2F.mjs +10 -0
  226. package/dist/chunk-NKC4MIX3.mjs +10 -0
  227. package/dist/{chunk-GI2O6H4I.mjs → chunk-NMGKHMH3.mjs} +1 -1
  228. package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
  229. package/dist/chunk-NRQSR3G7.mjs +10 -0
  230. package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
  231. package/dist/chunk-NYCG264A.mjs +10 -0
  232. package/dist/chunk-NZNOHFLD.mjs +10 -0
  233. package/dist/chunk-O4DA3TPW.mjs +11 -0
  234. package/dist/{chunk-3UH5CQQF.mjs → chunk-O7IU5NHN.mjs} +2 -2
  235. package/dist/chunk-ONEE6UCM.mjs +10 -0
  236. package/dist/chunk-OQPYPKZV.mjs +10 -0
  237. package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
  238. package/dist/chunk-OZMADP4Z.mjs +10 -0
  239. package/dist/chunk-P7BN7QDF.mjs +10 -0
  240. package/dist/chunk-PD5ZXNGT.mjs +10 -0
  241. package/dist/chunk-PMDRFB75.mjs +10 -0
  242. package/dist/chunk-PPHSLODC.mjs +10 -0
  243. package/dist/chunk-PYV5J322.mjs +11 -0
  244. package/dist/{chunk-6V7BIFQD.mjs → chunk-Q4SEEMIX.mjs} +1 -1
  245. package/dist/{chunk-2EMOQIU7.mjs → chunk-Q6PGYMYI.mjs} +2 -2
  246. package/dist/chunk-QAAOC64D.mjs +10 -0
  247. package/dist/chunk-QJYPCVSD.mjs +10 -0
  248. package/dist/chunk-QU34XSML.mjs +10 -0
  249. package/dist/chunk-QUQ4VYCN.mjs +10 -0
  250. package/dist/chunk-R3HHMCE5.mjs +10 -0
  251. package/dist/chunk-R4MOUAJW.mjs +10 -0
  252. package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
  253. package/dist/{chunk-XEGXSFIP.mjs → chunk-R7R7JDA3.mjs} +2 -2
  254. package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
  255. package/dist/chunk-RXSX2RKA.mjs +10 -0
  256. package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
  257. package/dist/chunk-S4HLMIFK.mjs +10 -0
  258. package/dist/chunk-SD43KVTU.mjs +10 -0
  259. package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
  260. package/dist/chunk-SLFKSR3T.mjs +10 -0
  261. package/dist/chunk-SLSJEMQ4.mjs +10 -0
  262. package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
  263. package/dist/chunk-SVIYLH7R.mjs +10 -0
  264. package/dist/chunk-SVTTHYTR.mjs +10 -0
  265. package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
  266. package/dist/chunk-SZCVQU55.mjs +10 -0
  267. package/dist/{chunk-DMJHCNBU.mjs → chunk-SZN2J2ER.mjs} +1 -1
  268. package/dist/chunk-TAT552A5.mjs +10 -0
  269. package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
  270. package/dist/{chunk-NQO6OQT6.mjs → chunk-TH4XPZEO.mjs} +1 -1
  271. package/dist/chunk-TSHZ7JSR.mjs +10 -0
  272. package/dist/{chunk-AYBACQ6U.mjs → chunk-TUJLNJPJ.mjs} +2 -2
  273. package/dist/chunk-TUY23KMK.mjs +10 -0
  274. package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
  275. package/dist/chunk-UDMNDUBO.mjs +10 -0
  276. package/dist/chunk-UFN2OAM2.mjs +10 -0
  277. package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
  278. package/dist/chunk-UNGYVWKZ.mjs +10 -0
  279. package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
  280. package/dist/chunk-UUTMZQQA.mjs +15 -0
  281. package/dist/chunk-UZ672WDX.mjs +10 -0
  282. package/dist/chunk-VETO7WNN.mjs +10 -0
  283. package/dist/chunk-VGFPT43C.mjs +10 -0
  284. package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
  285. package/dist/{chunk-2TH2QRSV.mjs → chunk-W7OTSFZS.mjs} +1 -1
  286. package/dist/chunk-WHN2SEWO.mjs +10 -0
  287. package/dist/{chunk-UN7XC7QV.mjs → chunk-WTAJLO6E.mjs} +1 -1
  288. package/dist/chunk-XD43CVDT.mjs +10 -0
  289. package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
  290. package/dist/chunk-XMGPNXZH.mjs +10 -0
  291. package/dist/chunk-XWJJ4V3O.mjs +10 -0
  292. package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
  293. package/dist/chunk-YF63IQQR.mjs +10 -0
  294. package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
  295. package/dist/chunk-YMYMFVW4.mjs +10 -0
  296. package/dist/chunk-YPEAGD2G.mjs +10 -0
  297. package/dist/chunk-YQHHE5AT.mjs +10 -0
  298. package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
  299. package/dist/{chunk-Z4HTFTPM.mjs → chunk-YU5NRJT6.mjs} +2 -2
  300. package/dist/{chunk-IXK6S6IH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
  301. package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
  302. package/dist/{chunk-XJ2DFV56.mjs → chunk-ZZIQF6XD.mjs} +1 -1
  303. package/dist/hooks/useDevice.mjs +1 -1
  304. package/dist/hooks/useI18n.mjs +1 -1
  305. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  306. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  307. package/dist/hooks/useMedia.mjs +1 -1
  308. package/dist/hooks/useMutationObserver.mjs +1 -1
  309. package/dist/hooks/usePortalContainer.mjs +1 -1
  310. package/dist/hooks/usePreventFocus.mjs +1 -1
  311. package/dist/hooks/useResizeObserver.mjs +1 -1
  312. package/dist/hooks/useTextSelection.mjs +1 -1
  313. package/dist/hooks/useUndoRedo.mjs +1 -1
  314. package/dist/index.css +1 -1
  315. package/dist/index.d.ts +375 -166
  316. package/dist/index.js +21 -20
  317. package/dist/index.mjs +1 -1
  318. package/dist/react-aria.mjs +1 -1
  319. package/dist/react-stately.mjs +1 -1
  320. package/dist/utils/colors.mjs +1 -1
  321. package/dist/utils/dom.mjs +1 -1
  322. package/dist/utils/isInShadowDOM.mjs +1 -1
  323. package/dist/utils/keyboards.mjs +1 -1
  324. package/messages.json +1 -1
  325. package/package.json +4 -4
  326. package/sbom.json +6 -6
  327. package/dist/chunk-2BXXD6SW.mjs +0 -10
  328. package/dist/chunk-2V323KAD.mjs +0 -10
  329. package/dist/chunk-2YTKLY4F.mjs +0 -10
  330. package/dist/chunk-3FYY26ED.mjs +0 -10
  331. package/dist/chunk-3W6RWDIE.mjs +0 -10
  332. package/dist/chunk-4C6AJ3TZ.mjs +0 -10
  333. package/dist/chunk-5HK56IXH.mjs +0 -10
  334. package/dist/chunk-63KRQW56.mjs +0 -10
  335. package/dist/chunk-66NJ7EYY.mjs +0 -10
  336. package/dist/chunk-6JWACCHG.mjs +0 -10
  337. package/dist/chunk-6PXOVWVM.mjs +0 -10
  338. package/dist/chunk-6VXBFM6Q.mjs +0 -10
  339. package/dist/chunk-7MQBBSZ2.mjs +0 -10
  340. package/dist/chunk-7P322KP4.mjs +0 -10
  341. package/dist/chunk-7PRJIPFA.mjs +0 -10
  342. package/dist/chunk-A24DWFQ2.mjs +0 -10
  343. package/dist/chunk-AC7OXVHA.mjs +0 -10
  344. package/dist/chunk-AKES5B6C.mjs +0 -10
  345. package/dist/chunk-AQYBKDT2.mjs +0 -16
  346. package/dist/chunk-AUOQSTS5.mjs +0 -10
  347. package/dist/chunk-AW5WDI2U.mjs +0 -10
  348. package/dist/chunk-B6U6JHD4.mjs +0 -10
  349. package/dist/chunk-B7PSE5KC.mjs +0 -10
  350. package/dist/chunk-BBZ2I3RF.mjs +0 -10
  351. package/dist/chunk-BCENUHNO.mjs +0 -10
  352. package/dist/chunk-BGHBSM3K.mjs +0 -10
  353. package/dist/chunk-BGMVPFYK.mjs +0 -10
  354. package/dist/chunk-BJVFZYUV.mjs +0 -10
  355. package/dist/chunk-BU5H25MV.mjs +0 -10
  356. package/dist/chunk-C7AUJO36.mjs +0 -10
  357. package/dist/chunk-CAWUDHAE.mjs +0 -10
  358. package/dist/chunk-CCA2ABXO.mjs +0 -10
  359. package/dist/chunk-CUOTJ7AP.mjs +0 -10
  360. package/dist/chunk-CYTHB4M4.mjs +0 -10
  361. package/dist/chunk-D5EEZT5J.mjs +0 -10
  362. package/dist/chunk-DDLZ6CKC.mjs +0 -10
  363. package/dist/chunk-E3DMXJIC.mjs +0 -10
  364. package/dist/chunk-E3QDPL77.mjs +0 -10
  365. package/dist/chunk-EA6GA4WC.mjs +0 -10
  366. package/dist/chunk-EGXILQNX.mjs +0 -10
  367. package/dist/chunk-EX2LI2CV.mjs +0 -10
  368. package/dist/chunk-EYKIXVM3.mjs +0 -10
  369. package/dist/chunk-F2X474RV.mjs +0 -10
  370. package/dist/chunk-GVI6EBGJ.mjs +0 -10
  371. package/dist/chunk-HK3CZVHY.mjs +0 -10
  372. package/dist/chunk-HONWMHMX.mjs +0 -10
  373. package/dist/chunk-HZHAKW6I.mjs +0 -10
  374. package/dist/chunk-ILAQFMYD.mjs +0 -10
  375. package/dist/chunk-INDVRI57.mjs +0 -10
  376. package/dist/chunk-ITWJSFYK.mjs +0 -10
  377. package/dist/chunk-IVC2BJRU.mjs +0 -10
  378. package/dist/chunk-JDLUGVXG.mjs +0 -10
  379. package/dist/chunk-K6HE4Z2Y.mjs +0 -10
  380. package/dist/chunk-K73R5G6G.mjs +0 -10
  381. package/dist/chunk-KEAM6GSA.mjs +0 -10
  382. package/dist/chunk-KEVERVHK.mjs +0 -10
  383. package/dist/chunk-KPEONVLU.mjs +0 -10
  384. package/dist/chunk-KUEDQO7P.mjs +0 -10
  385. package/dist/chunk-KWHTLY23.mjs +0 -10
  386. package/dist/chunk-KY3JKXSX.mjs +0 -10
  387. package/dist/chunk-LZFTBNPW.mjs +0 -10
  388. package/dist/chunk-M5M3EPG5.mjs +0 -10
  389. package/dist/chunk-M7OLZJYB.mjs +0 -10
  390. package/dist/chunk-MHUFXHRU.mjs +0 -10
  391. package/dist/chunk-MONDDKB4.mjs +0 -10
  392. package/dist/chunk-MRJFGHFW.mjs +0 -10
  393. package/dist/chunk-MVK5CB64.mjs +0 -10
  394. package/dist/chunk-N6VKP3UH.mjs +0 -10
  395. package/dist/chunk-NZQVKNP4.mjs +0 -10
  396. package/dist/chunk-OAY74XPB.mjs +0 -10
  397. package/dist/chunk-OMT6ZWSV.mjs +0 -11
  398. package/dist/chunk-P37WUXAI.mjs +0 -10
  399. package/dist/chunk-P5LSMA24.mjs +0 -11
  400. package/dist/chunk-PA3THES4.mjs +0 -10
  401. package/dist/chunk-QDQPVCXN.mjs +0 -10
  402. package/dist/chunk-QYTY3KJR.mjs +0 -10
  403. package/dist/chunk-R2OV7FJO.mjs +0 -10
  404. package/dist/chunk-RCBUNCHV.mjs +0 -10
  405. package/dist/chunk-RFTDIXEG.mjs +0 -10
  406. package/dist/chunk-SHJ2TJYG.mjs +0 -10
  407. package/dist/chunk-SMAYNDQQ.mjs +0 -10
  408. package/dist/chunk-T4R3EXGI.mjs +0 -10
  409. package/dist/chunk-TBCZKWGQ.mjs +0 -10
  410. package/dist/chunk-TDXALNX3.mjs +0 -10
  411. package/dist/chunk-TKQOQVZD.mjs +0 -10
  412. package/dist/chunk-TTYRHIRQ.mjs +0 -10
  413. package/dist/chunk-UBFMOTBM.mjs +0 -10
  414. package/dist/chunk-UEDBY5JI.mjs +0 -10
  415. package/dist/chunk-UT2I4K7L.mjs +0 -10
  416. package/dist/chunk-V3L4SVVF.mjs +0 -10
  417. package/dist/chunk-VAFIUM63.mjs +0 -29
  418. package/dist/chunk-VIVNQZYK.mjs +0 -10
  419. package/dist/chunk-VOSSQAHC.mjs +0 -11
  420. package/dist/chunk-WWSGOGLA.mjs +0 -10
  421. package/dist/chunk-X3AXUU3H.mjs +0 -10
  422. package/dist/chunk-X6IJEPSH.mjs +0 -10
  423. package/dist/chunk-XF5UMU6D.mjs +0 -15
  424. package/dist/chunk-XTH6B5FE.mjs +0 -10
  425. package/dist/chunk-XWLESSHN.mjs +0 -10
  426. package/dist/chunk-Y3YZMICA.mjs +0 -10
  427. package/dist/chunk-Y4DRSGEJ.mjs +0 -10
  428. package/dist/chunk-YB3KW7JC.mjs +0 -10
  429. package/dist/chunk-YIGT3OP2.mjs +0 -10
  430. package/dist/chunk-YKMSINHH.mjs +0 -10
  431. package/dist/chunk-YWCU4PP7.mjs +0 -10
  432. package/dist/chunk-YWQXHVMW.mjs +0 -10
  433. package/dist/chunk-ZGRRD3TU.mjs +0 -10
  434. /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-JBXZ6ZHP.mjs';import {a as a$1}from'./chunk-BGRGRUG4.mjs';import {a as a$3}from'./chunk-PG3WDHSK.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w from'react';import {jsx,jsxs}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 f="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",u="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1",h=a({defaultClassName:"_12vfhl44",variantClassNames:{variant:{success:"_1yep5z612d",error:"_1yep5z6128",active:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[]}),B="_1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ez _1yep5z6dy",j="_12vfhl43 _1yep5z6gd _1yep5z6m3",b="_12vfhl42 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",C="_1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k",x=a({defaultClassName:"_12vfhl40 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dy _1yep5z6ey",variantClassNames:{hasLabel:{false:"_1yep5z6py _1yep5z6pz _1yep5z6q0"}},defaultVariants:{},compoundVariants:[]});var N=w.forwardRef(({className:k,style:P,variant:p="active",showValue:y,description:V,errorMessage:T,"data-block-id":H,"data-block-class":L,...s},W)=>{let t=c(),o=p==="error"?T:V,{labelProps:I,progressBarProps:_}=a$1({...s,"aria-describedby":[o?t:void 0,s["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{minValue:i=0,maxValue:R=100,value:E=0,label:r}=s,z=R-i,M=z>0?a$2((E-i)/z,0,1):0,q=`${Math.round(M*100)}%`,n=jsx("output",{className:x({hasLabel:!!r}),children:_["aria-valuetext"]});return jsxs("div",{..._,style:P,className:a$4(f,"BaselineUI-ProgressBar",k),"data-block-id":H,"data-block-class":L,ref:W,children:[r?jsxs("div",{className:u,children:[jsx("label",{...I,className:B,children:r}),y?n:null]}):null,jsxs("div",{className:C,children:[jsxs("div",{className:b,children:[jsx("div",{className:j,children:jsx("div",{style:{width:q},className:h({variant:p})})}),!r&&y?n:null]}),o?jsx("div",{className:a$3({hasError:p==="error"}),id:t,children:o}):null]})]})});N.displayName="ProgressBar";export{N as a};
@@ -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-JQQGRJ5J.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-2JGVUCP5.mjs';import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.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
@@ -1,4 +1,4 @@
1
- import {c}from'./chunk-AUOQSTS5.mjs';/**
1
+ import {createContext}from'react';import'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-AUOQSTS5.mjs';/**
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function r(o){return o?c(o.getRootNode()):false}export{r as a};
10
+ var i=createContext({});export{i as a};
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-CU6D2EA6.mjs';import {e}from'./chunk-J4OPD7OL.mjs';import {a as a$2}from'./chunk-2VY4FAOY.mjs';import {j}from'./chunk-PPHSLODC.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {a,i,b as b$1,h,e as e$1,l}from'./chunk-SD43KVTU.mjs';import {useState,useRef,useEffect,useCallback}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 $=1e7;function xt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var B={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Mt={top:"left",left:"top"},it={top:"height",left:"width"},Rt={width:"totalWidth",height:"totalHeight"},J={};function It(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i=0,c=0,u=0,r={},m=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i=h.clientHeight,o=e?.width??s,n=e?.height??i,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=Math.max(0,e.pageTop-(r.top??0)),u=Math.max(0,e.pageLeft-(r.left??0)));}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i=n;return j()&&(t.tagName==="BODY"||t.tagName==="HTML")&&m&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i,scroll:r,top:c,left:u}}function vt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[B[t]]+s,m=i[t]+o.scroll[B[t]]+u-s,h=e-c+o.scroll[B[t]]+i[t]-o[B[t]],d=e-c+l+o.scroll[B[t]]+i[t]-o[B[t]];return h<r?r-h:d>m?Math.max(m-d,r-h):0}function St(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=B[e]||"right",n=Mt[o];B[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,m){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:L,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,C=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,C),h===y){let D=c?m[L]:m[Rt[L]];b[G[y]]=Math.floor(D-t[y]+n);}else b[y]=Math.floor(t[y]+t[L]+n);return b}function zt(t,e,l,o,n,s,i,c,u,r,m){let h=(t.top!=null?t.top:u[Rt.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(m?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(m?.offsetTop??0)+(m?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function wt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:m}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[m]+t[r]+(c?e[r]:0)-l[r]-l[m]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function Ft(t,e,l,o,n,s,i,c,u,r,m,h,d,y,f,L,w,b,E,C,D,_){let a=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=a,P=tt(e,c,l,a,m,h,r,d,f,L,u),S=m,k=E?$:wt(c,r,e,n,s+m,a,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,m,h,r,d,f,L,u);wt(c,r,e,n,s+m,j,u,w)>k&&(a=j,P=X,S=m);}if(_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=a.crossPlacement==="center"?j>0?"left":"right":G[a.crossPlacement];if(X){let lt=rt(`${a.placement} ${X}`),pt=tt(e,c,l,lt,m,h,r,d,f,L,u),Ot=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Ot)<Math.abs(j)&&(a=lt,P=pt);}}}let I="bottom";a.axis==="top"?a.placement==="top"?I="top":a.placement==="bottom"&&(I="bottom"):a.crossAxis==="top"&&(a.crossPlacement==="top"?I="bottom":a.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")&&a.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!D?void 0:zt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,a,S,h,r,d,f,L,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[B[p]],H=g+.5*e[R],F=f/2+L,W=B[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-W-f/2-L,ot=e[p]+f/2-(P[p]+n[B[p]]),Ht=e[p]+e[R]-f/2-(P[p]+n[B[p]]),Lt=a$2(H,ot,Ht);v[p]=a$2(Lt,F,N),{placement:M,crossPlacement:T}=a,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let mt=M==="left"||M==="top"?l[A]:0,Ct={x:M==="top"||M==="bottom"?g:mt,y:M==="left"||M==="right"?g:mt};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ct}}function Tt(t){let{placement:e,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:m,crossOffset:h$1,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:L}=t,w=a(o),b=b$1(o),E=It(o),C=o instanceof b.HTMLElement?Bt(o):w.documentElement,D=C===w.documentElement,_=b.getComputedStyle(C).position,a$1=!!_&&_!=="static",A=D?Z(l,false,L):Et(l,C,false,L);if(!D){let{marginTop:F,marginLeft:W}=b.getComputedStyle(l);A.top+=parseInt(F,10)||0,A.left+=parseInt(W,10)||0;}let p=Z(o,true),R=St(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=vt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:xt("left",w,E),z=k?I:xt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(C,E);a$1&&!D&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:Et(P,C,false),H=!T&&h(P,C)&&C!==P;return Ft(e,A,p,M,R,s,i,x,v,g,m,h$1,a$1,d,y,f,H,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:m,clientLeft:h}=o.documentElement;return {top:n+u-m,left:s+r-h,width:i,height:c}}function Et(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function Bt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!At(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!At(o);)o=o.parentElement;return o||e.documentElement}function At(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function at(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function oe(t){let{direction:e$2}=b(),{arrowSize:l$1,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i$1=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:m,boundaryAxis:h$1="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f=0,shouldUpdatePosition:L=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:C,arrowBoundaryOffset:D=0,getTargetRect:_}=t,a$2=m??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[L,c,n.current,o.current,s?.current,i$1.current,u,r,a$2,h$1,d,y,f,b$3,e$2,C,D,l$1],M=useRef(at(n.current)?.scale);useEffect(()=>{b$3&&(M.current=at(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(L===false||!b$3||!n.current||!o.current||a$2===void 0||at(n.current)?.scale!==M.current)return;let z=a(n.current),x=i(z),v=b$1(z.body),g=null;if(i$1.current&&h(i$1.current,x)){let W=x?.getBoundingClientRect(),N=i$1.current.getBoundingClientRect();g={type:"top",offset:(W?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(W?.bottom??0)-N.bottom);}let H=n.current;!C&&n.current&&(H.style.top="0px",H.style.bottom="",H.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let F=Tt({placement:Vt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i$1.current||n.current,padding:u,shouldFlip:r,boundaryElement:a$2,boundaryAxis:h$1,horizontalBoundaryBehavior:d,offset:y,crossOffset:f,maxHeight:C,arrowSize:l$1??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:D,targetRect:_?.(o.current)});if(F.position){if(H.style.top="",H.style.bottom="",H.style.left="",H.style.right="",Object.keys(F.position).forEach(W=>H.style[W]=F.position[W]+"px"),H.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",g&&x&&i$1.current){let W=x.getBoundingClientRect(),N=i$1.current.getBoundingClientRect(),ot=W[g.type]-N[g.type];i$1.current.scrollTop+=ot-g.offset;}p(F);}},R);a$1(T,R);let P=a$2?b$1(a$2):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Dt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e({ref:n,onResize:k}),e({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,H=()=>{I.current&&x();};g?.addEventListener("resize",x),g?.addEventListener("scroll",H);let F=e$1(l(window),"scroll",H);return ()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",H),F();}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Dt(t,e=window){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Vt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{oe as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-RXSYDMT6.mjs';import {useCallback}from'react';/**
1
+ import {a}from'./chunk-AI6WQPRX.mjs';import {useCallback}from'react';/**
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}from'./chunk-RXSYDMT6.mjs';import {useCallback}from'react';/**
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function d(s,t){let{onScroll:o,isDisabled:a$1}=s,i=useCallback(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),o&&o({deltaX:e.deltaX,deltaY:e.deltaY}));},[o]);a(t,"wheel",a$1?void 0:i);}export{d as a};
10
+ function y(t,s){let{onScroll:o,isDisabled:a$1}=t,i=useCallback(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),o&&o({deltaX:e.deltaX,deltaY:e.deltaY}));},[o]);a(s,"wheel",a$1?void 0:i);}export{y as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$4,d as d$1,c as c$3,b as b$4}from'./chunk-C4WHTPLY.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {d,g,b}from'./chunk-AYQN3OH2.mjs';import {b as b$2,a as a$7,h as h$1}from'./chunk-J4OPD7OL.mjs';import {a as a$6}from'./chunk-Y2MIU76N.mjs';import {a as a$5}from'./chunk-AI6WQPRX.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {c as c$2,e}from'./chunk-KUDCYGII.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {h,l,u}from'./chunk-PPHSLODC.mjs';import {c,b as b$1}from'./chunk-3WKDIXCM.mjs';import {c as c$1,a as a$2}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1,j,k}from'./chunk-SD43KVTU.mjs';import {createContext,useRef,useState,useEffect,useCallback,useMemo}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 ie={"ar-AE":{collectionLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A"},"bg-BG":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"cs-CZ":{collectionLabel:"N\xE1vrhy"},"da-DK":{collectionLabel:"Forslag"},"de-DE":{collectionLabel:"Empfehlungen"},"el-GR":{collectionLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2"},"en-US":{collectionLabel:"Suggestions"},"es-ES":{collectionLabel:"Sugerencias"},"et-EE":{collectionLabel:"Soovitused"},"fi-FI":{collectionLabel:"Ehdotukset"},"fr-FR":{collectionLabel:"Suggestions"},"he-IL":{collectionLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA"},"hr-HR":{collectionLabel:"Prijedlozi"},"hu-HU":{collectionLabel:"Javaslatok"},"it-IT":{collectionLabel:"Suggerimenti"},"ja-JP":{collectionLabel:"\u5019\u88DC"},"ko-KR":{collectionLabel:"\uC81C\uC548"},"lt-LT":{collectionLabel:"Pasi\u016Blymai"},"lv-LV":{collectionLabel:"Ieteikumi"},"nb-NO":{collectionLabel:"Forslag"},"nl-NL":{collectionLabel:"Suggesties"},"pl-PL":{collectionLabel:"Sugestie"},"pt-BR":{collectionLabel:"Sugest\xF5es"},"pt-PT":{collectionLabel:"Sugest\xF5es"},"ro-RO":{collectionLabel:"Sugestii"},"ru-RU":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"sk-SK":{collectionLabel:"N\xE1vrhy"},"sl-SI":{collectionLabel:"Predlogi"},"sr-SP":{collectionLabel:"Predlozi"},"sv-SE":{collectionLabel:"F\xF6rslag"},"tr-TR":{collectionLabel:"\xD6neriler"},"uk-UA":{collectionLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457"},"zh-CN":{collectionLabel:"\u5EFA\u8BAE"},"zh-TW":{collectionLabel:"\u5EFA\u8B70"}};function O(i$1,n){let{inputRef:l$1,collectionRef:o,filter:c$4,disableAutoFocusFirst:m=false,disableVirtualFocus:E=false}=i$1,b=c$1(),a=useRef(void 0),s=useRef(false),r=useRef(null),se=c$2()==="virtual"&&(h()||l()),[P,pe]=useState(!se&&!E),[D,K]=useState(false),[de,M]=useState(false);useEffect(()=>()=>clearTimeout(a.current),[]);let H=u(e$1=>{!e$1.isTrusted&&P&&l$1.current&&i(a$1(l$1.current))!==l$1.current&&e()!=="touch"&&l$1.current.focus();let t=j(e$1);e$1.isTrusted||!t||r.current===t.id||(clearTimeout(a.current),t!==o.current?s.current?(r.current=t.id,a.current=setTimeout(()=>{n.setFocusedNodeId(t.id);},500)):(r.current=t.id,n.setFocusedNodeId(t.id)):r.current&&!k(r.current,a$1(o.current))&&(r.current=null,n.setFocusedNodeId(null)),s.current=false);}),[F,fe]=useState(null),U=useCallback(e=>{fe(e),e!=null?(e.getAttribute("tabindex")!=null&&pe(false),K(true)):K(false);},[]);a$2(()=>(F?.addEventListener("focusin",H),()=>{F?.removeEventListener("focusin",H);}),[F]);let me=a$3(useMemo(()=>b$1(o,U),[o,U])),be=useCallback(()=>{if(!o.current){M(true);return}s.current=true,o.current?.dispatchEvent(new CustomEvent(b$2,{cancelable:true,bubbles:true,detail:{focusStrategy:"first"}}));},[o]),x=useCallback(e=>{M(false),a$4(i(a$1(l$1.current))),r.current=null,n.setFocusedNodeId(null);let t=new CustomEvent(a$7,{cancelable:true,bubbles:true,detail:{clearFocusKey:e}});clearTimeout(a.current),s.current=false,o.current?.dispatchEvent(t);},[o,n]),p=useRef("");a$5(l$1,"beforeinput",e=>{let{inputType:t}=e;p.current=t;});let ve=e=>{(p.current==="insertText"||p.current==="insertCompositionText"||p.current==="insertFromComposition")&&!m?be():p.current&&(p.current.includes("insert")||p.current.includes("delete")||p.current.includes("history"))&&(x(true),d$1(a$1(l$1.current))===l$1.current&&c$3(l$1.current,null)),n.setInputValue(e);},B=useRef(null),Ee=e=>{if(B.current=j(e.nativeEvent),e.nativeEvent.isComposing)return;let t=r.current;switch(t!==null&&a$1(l$1.current).getElementById(t)==null&&(r.current=null,t=null),e.key){case "a":if(h$1(e))return;break;case "Escape":if(e.isDefaultPrevented())return;break;case " ":return;case "Tab":"continuePropagation"in e&&e.continuePropagation();return;case "Home":case "End":case "PageDown":case "PageUp":case "ArrowUp":case "ArrowDown":case "ArrowRight":case "ArrowLeft":{if((e.key==="Home"||e.key==="End")&&t==null&&e.shiftKey)return;if(e.key==="ArrowRight"||e.key==="ArrowLeft"){if(t==null){e.isPropagationStopped()||e.stopPropagation();return}break}e.preventDefault();let A=new CustomEvent(b$2,{cancelable:true,bubbles:true});o.current?.dispatchEvent(A);break}}e.isPropagationStopped()||e.stopPropagation();let d=true;if(o.current!==null)if(t==null)d=o.current?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false;else {let A=k(t,a$1(o.current));A&&(d=A?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false);}if(d)switch(e.key){case "ArrowLeft":case "ArrowRight":{x();break}case "Enter":t!=null&&k(t,a$1(l$1.current))?.dispatchEvent(new PointerEvent("click",e.nativeEvent));break}else e.preventDefault();},S=u(e=>{if(j(e)===B.current){e.stopImmediatePropagation();let t=r.current;t==null?o.current?.dispatchEvent(new KeyboardEvent(e.type,e)):k(t,a$1(o.current))?.dispatchEvent(new KeyboardEvent(e.type,e));}});useEffect(()=>{let e=a$1(l$1.current);return e.addEventListener("keyup",S,true),()=>{e.removeEventListener("keyup",S,true);}},[S]);let Ae=b$3(ie,"@react-aria/autocomplete"),ge=a$6({id:b,"aria-label":Ae.format("collectionLabel")}),Pe=useCallback((e,t)=>c$4?c$4(e,n.inputValue,t):true,[n.inputValue,c$4]),Fe=e=>{if(!e.isTrusted)return;let t=r.current?k(r.current,a$1(l$1.current)):null;t&&b$4(t,e.relatedTarget);},Te=e=>{if(!e.isTrusted)return;if(r.current?k(r.current,a$1(l$1.current)):null){let d=j(e.nativeEvent);queueMicrotask(()=>{b$4(d,o.current),c$3(o.current,d);});}},Le=e=>{e.button!==0||e.pointerType==="touch"||r.current==null||l$1.current==null||j(e)===l$1.current&&x();},h$2={value:n.inputValue,onChange:ve},ye={onKeyDown:Ee,"aria-activedescendant":n.focusedNodeId??void 0,onBlur:Fe,onFocus:Te,onPointerDown:Le};return h$2={...h$2,...P&&D&&ye,enterKeyHint:"go","aria-controls":D?b:void 0,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"},{inputProps:h$2,collectionProps:c(ge,{shouldUseVirtualFocus:P,disallowTypeAhead:P,autoFocus:de?"first":false}),collectionRef:me,filter:c$4!=null?Pe:void 0}}function w(i){let{onInputChange:n,inputValue:l,defaultInputValue:o=""}=i,c=s=>{n&&n(s);},[m,E]=useState(null),[b,a$1]=a(l,o,c);return {inputValue:b,setInputValue:a$1,focusedNodeId:m,setFocusedNodeId:E}}var Se=createContext(null),he=createContext(null),Ie=createContext(null),Ve=createContext(null);function Ft(i){let n=d(Se,i.slot);i=c(n,i);let{filter:l,disableAutoFocusFirst:o}=i,c$1=w(i),m=useRef(null),E=useRef(null),{inputProps:b$1,collectionProps:a,collectionRef:s,filter:r}=O({...g(i),filter:l,disableAutoFocusFirst:o,inputRef:m,collectionRef:E},c$1);return jsx(b,{values:[[he,c$1],[Ve,{...b$1,ref:m}],[Ie,{...a,filter:r,ref:s}]],children:i.children})}export{he as a,Ie as b,Ve as c,Ft as d};
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-5IC46G5J.mjs';import {a as a$1}from'./chunk-CV6JQGJ3.mjs';import {jsx,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 a=({date:t,...e})=>{let m=a$1(e);return t==null||Number.isNaN(Number(t))?(a$2("DateFormat:invalidDate","DateFormat: `date` is not a valid date, so nothing was rendered."),null):jsx(Fragment,{children:m.format(t)})};a.displayName="DateFormat";export{a};
@@ -0,0 +1,11 @@
1
+ import {a as a$6}from'./chunk-SZCVQU55.mjs';import {a as a$2}from'./chunk-YS3Z53YT.mjs';import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$b}from'./chunk-HI44JQA7.mjs';import {a as a$d}from'./chunk-3DWFAHR2.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-NRQSR3G7.mjs';import {a as a$4}from'./chunk-3KCSUNRV.mjs';import {a as a$8}from'./chunk-CIPPPD6E.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {a as a$7}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$3,b as b$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import z,{useContext,useMemo,useRef,useCallback,useEffect,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {PlusIcon}from'@baseline-ui/icons/12';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';import Je from'just-camel-case';import*as st from'comlink';/**
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 bt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},p=z.createContext(bt),Ee=z.memo(({children:e,isDisabled:t=false})=>{let[n,r]=z.useState(null),[a,o]=z.useState(null),[i,d]=z.useState(null),l=z.useRef(null),[s,x]=z.useState(null),[f,k]=z.useState(),c=z.useMemo(()=>({node:n,setNode:r,coordinates:s,setCoordinates:x,displayId:f,setDisplayId:k,boundsRef:l,isDisabled:t,cursorNode:a,setCursorNode:o,children:i,setChildren:d}),[n,s,f,x,r,l,t,a,o,i,d]);return jsx(p.Provider,{value:c,children:e})});Ee.displayName="PointPicker";var _e="m0xg2me";var ze="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",Ie="_1yep5z6fa",De="m0xg2mk m0xg2mj",Me=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Ne="m0xg2m8",Ae="m0xg2mb",q="m0xg2ma _1yep5z6hp _1yep5z6mf",Te="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Se="m0xg2mc",Oe="m0xg2mf";var W=a$1(ze,"BaselineUI-PointPicker-GridLine"),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),_t=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:W,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),He=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(p),a=useMemo(()=>{let o=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof o=="boolean"?o?r:void 0:o?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(Et,{coordinates:a}),jsx(_t,{coordinates:a})]}):null};function Ue({coordinates:e,setCoordinates:t,boundsRef:n,onKeyDown:r,onKeyUp:a}){let{isDisabled:o}=useContext(p);return j({isDisabled:o,onKeyDown:i=>{r?.(i);let d=i.shiftKey?10:1,l=n.current;if(!l||!e)return;let s;switch(i.key){case "ArrowRight":{i.preventDefault(),s={x:a$e(e.x+d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowLeft":{i.preventDefault(),s={x:a$e(e.x-d,0,l.width),y:a$e(e.y,0,l.height)};break}case "ArrowDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y+d,0,l.height)};break}case "ArrowUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:a$e(e.y-d,0,l.height)};break}case "Home":{i.preventDefault(),s={x:0,y:a$e(e.y,0,l.height)};break}case "End":{i.preventDefault(),s={x:l.width,y:a$e(e.y,0,l.height)};break}case "PageUp":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:0};break}case "PageDown":{i.preventDefault(),s={x:a$e(e.x,0,l.width),y:l.height};break}default:{i.continuePropagation();return}}s&&t(s);},onKeyUp:a})}function Ve(){let{node:e,coordinates:t}=useContext(p);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Fe}=themeVars,Ge=z.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:Re,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Fe.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Fe.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:De,ref:t}));Ge.displayName="PointPickerIndicatorIcon";var Tt=({trailingElement:e})=>{let{cursorNode:t}=useContext(p),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let o=new ResizeObserver(i=>{r({width:i[0].contentRect.width,height:i[0].contentRect.height});});return o.observe(t),()=>{o.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},Q=z.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:o}=useContext(p),i=a$2({ownerDocument:a$3(o)}),d=!!(r&&!a),l=useMemo(()=>e?.(),[e]),s=Ve(),x=useMemo(()=>{if(!r)return null;let f=t?.({coordinates:r,modality:i});return f===void 0?jsx(Ge,{modality:i}):f},[t,r,i]);return d?jsxs(a$4,{style:{left:s.x,top:s.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[x,l?jsx(Tt,{trailingElement:l}):null]}):null});Q.displayName="PointPickerIndicator";var Xe=z.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:o,onBlur:i,onFocus:d$1,onKeyDown:l,onKeyUp:s,gridLines:x=true,elementHandle:f,onMove:k,onPress:c$1,onPressStart:P,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},M)=>{let{setNode:C,node:_,coordinates:g,setCoordinates:R,displayId:j,boundsRef:I,isDisabled:h,setCursorNode:at,setChildren:Y}=useContext(p),S=useRef(null),le=useRef(null),ce=a$2({ownerDocument:a$3(_)}),N=useCallback(u=>{R(u??null),k?.({coordinates:u,boundingRect:I.current});},[R,k,I]);useEffect(()=>{if(!h)return Y(e),()=>{Y(null);}},[e,h,Y]),useEffect(()=>{let u=S.current;if(!u||h)return;let ue=()=>{let D=u.getBoundingClientRect();I.current=D;},H=D=>{let O=I.current;if(!O)return;let gt="clientX"in D?D.clientX:D.touches[0].clientX,vt="clientY"in D?D.clientY:D.touches[0].clientY,Pt={x:a$e(gt-O.left,0,O.width),y:a$e(vt-O.top,0,O.height)};N(Pt);},de=()=>{N(null);};return u.addEventListener("mousemove",H),u.addEventListener("touchmove",H),u.addEventListener("mouseenter",ue),u.addEventListener("mouseleave",de),()=>{u.removeEventListener("mousemove",H),u.removeEventListener("touchmove",H),u.removeEventListener("mouseenter",ue),u.removeEventListener("mouseleave",de);}},[I,h,N]);let{pressProps:lt}=d({isDisabled:h,onPress:u=>{u.pointerType==="keyboard"?g&&c$1?.({...u,x:g.x,y:g.y}):c$1?.(u);},onPressStart:P,onPressEnd:b$1}),{focusProps:ct,isFocusVisible:ut,isFocused:dt}=a$5();a$6({ref:le,isDisabled:h}),useImperativeHandle(f,()=>({focus:()=>{h||S.current?.focus();}}));let{focusProps:mt}=a$7({isDisabled:h,onFocusChange:o,onFocus:d$1,onBlur:i});function pt(){ce==="keyboard"&&setTimeout(()=>{let u=S.current?.getBoundingClientRect();u&&(I.current=u,N({x:a$e(u.width/2,0,u.width),y:a$e(u.height/2,0,u.height)}));},0);}function ft(){N(null);}let{keyboardProps:ht}=Ue({coordinates:g,setCoordinates:N,boundsRef:I,onKeyDown:l,onKeyUp:s});a$8({isDisabled:h,ref:S,onInteractOutside:()=>{N(null);}});let yt=!!(g&&!h),xt=a$9({"data-focus-visible":ut,"data-focused":dt,"data-disabled":h,"data-block-id":r,"data-block-class":a,"data-active":g&&!h,"data-modality":ce});return jsxs(Fragment,{children:[jsx(Q,{renderTrailingElement:w,renderCursor:E,ref:at}),jsxs("div",{...c(ct,mt,{onFocus:pt,onBlur:ft},h?{}:c(ht,lt)),ref:b(M,S,C),className:a$1(Me({isDisabled:!!h,isIndicatorVisible:!!yt}),"BaselineUI-PointPicker-Content",t),tabIndex:h?void 0:0,style:n,"aria-controls":j,"data-testid":"point-picker-content",...xt,children:[jsx(He,{gridLines:x}),jsx("div",{className:_e,ref:le,children:e})]})]})});Xe.displayName="PointPickerContent";function qe(e,t,n){let[r,a]=useState(0),o=i=>{a(i),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let i=new ResizeObserver(d=>{o(d[0].contentRect.width);});return o(e.getBoundingClientRect().width),i.observe(e),()=>{i.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var te=z.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:o="indicator"},i)=>{let d=useRef(null),{cursorNode:l,coordinates:s}=useContext(p),x=qe(l,o,()=>{c();}),f=jt(l,o),{overlayProps:k,updatePosition:c}=a$a({overlayRef:d,placement:a,targetRef:{get current(){return f}},crossOffset:n??x,offset:r});return useGranularEffect(()=>{c();},[s,n,r],[c]),s?jsx(a$4,{className:a$1(Oe,t),ref:i,children:jsx("div",{ref:d,...k,children:e})}):null});te.displayName="Floater";var nt=8,Xt=7,qt=7,ne=z.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:o,node:i}=useContext(p),d=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let x=r.current.querySelectorAll("canvas"),f=[],k=r.current.ownerDocument;for(let c of x){let P=c.getContext("2d");if(!P)continue;let b=c.clientWidth,w=c.clientHeight,E=c.width,M=c.height,C=P.getImageData(0,0,E,M);f.push({el:c,width:E,height:M,image:C});let _=k.createElement("canvas");_.width=E,_.height=M;let g=_.getContext("2d");g&&g.drawImage(c,0,0),c.width=b*t,c.height=w*t,c.style.width=`${b}px`,c.style.height=`${w}px`,P.scale(t,t),P.drawImage(_,0,0,b,w);}return d.current=f,()=>{for(let{el:c,width:P,height:b,image:w}of d.current)c.width=P,c.height=b,c.getContext("2d")?.putImageData(w,0,0);}},[i,t,n]);let l=useMemo(()=>n?n({coordinates:a,boundingRect:o.current,children:e}):e?z.cloneElement(e,{key:"magnifier-content"}):null,[n,a,o,e]),s=useMemo(()=>!o.current||!a?null:{x:a.x/o.current.width,y:a.y/o.current.height},[o,a]);return s?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${s.x*100}% + ${nt*Xt/(2*t)}px), calc(-${s.y*100}% + ${nt*qt/(2*t)}px))`},className:a$1(Se,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(i),ref:r,inert:"true",children:l})}):null});ne.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([o,i])=>o.startsWith("--")?[o,i]:o.startsWith("-")?[a$b(Je(o)),i]:[Je(o),i]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},it=z.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":o,floating:i=false,renderMagnifierContent:d},l)=>{let{coordinates:s,boundsRef:x,setDisplayId:f,isDisabled:k,children:c,cursorNode:P}=useContext(p),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:s?{x:s.x,y:s.y}:null,boundingRect:x.current}):n,[n,s,x]),M=!k&&!!w&&s,C=useMemo(()=>b$2(i,sn),[i]);useEffect(()=>((!C||C&&P)&&f(b),()=>{f(void 0);}),[P,b,f,C]);let _=jsxs(a$c,{ref:C?void 0:l,className:a$1(Ne,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":o,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Te,children:[M?jsx(ne,{scale:w.scale,renderMagnifierContent:d,children:c}):null,Array.from({length:nn*rn}).map((g,R)=>R===24?jsx("div",{className:a$1(q,Ae)},R):jsx("div",{className:q},R))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:g,icon:R},j)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(R,{size:12,className:Ie}),jsx(a$d,{type:"label",size:"sm",children:g})]},g+j))}):null]});return C?jsx(te,{ref:l,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});it.displayName="PointPickerDisplay";function oe(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function se(){return oe('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function an({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useRef(false),o=useCallback(()=>{if(a.current)return null;if(!r.current){let s=new se;r.current={worker:s,api:st.wrap(s)};}return r.current.api},[]);useEffect(()=>(a.current=false,o(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[o]);let i=useCallback(async()=>{let s=o();!e||!s||(n.current=await s.buildIndex(e));},[e,o]);useEffect(()=>{e&&e.length>0&&i();},[e,i]);let d=useCallback(async s=>e?(n.current||await i(),await o()?.findNearestPoint(s.x,s.y,t)??null):null,[e,t,i,o]),l=useCallback(async s=>e?(n.current||await i(),await o()?.findPointsInRadius(s.x,s.y,t)??[]):[],[e,t,i,o]);return {findNearestPoint:d,findPointsInRadius:l}}
11
+ export{Ee as a,Xe as b,it as c,an as d};
@@ -1,4 +1,4 @@
1
- import {d}from'./chunk-MRJFGHFW.mjs';/**
1
+ import {e}from'./chunk-PPHSLODC.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
@@ -7,4 +7,4 @@ import {d}from'./chunk-MRJFGHFW.mjs';/**
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function p(r,e=false){return d()?r.replace("Ctrl+",e?"\u2318":"Cmd+").replace("Alt+",e?"\u2325":"Option+").replace("Shift+",e?"\u21E7":"Shift+").replace("Enter+",e?"\u21A9":"Enter+").replace("Space+",e?"\u2423":"Space+").replace("Enter",e?"\u21A9":"Enter"):r}export{p as a};
10
+ function p(r,e$1=false){return e()?r.replace("Ctrl+",e$1?"\u2318":"Cmd+").replace("Alt+",e$1?"\u2325":"Option+").replace("Shift+",e$1?"\u21E7":"Shift+").replace("Enter+",e$1?"\u21A9":"Enter+").replace("Space+",e$1?"\u2423":"Space+").replace("Enter",e$1?"\u21A9":"Enter"):r}export{p as a};
@@ -0,0 +1,10 @@
1
+ import {c as c$1,b}from'./chunk-COHK4QQW.mjs';import {a}from'./chunk-MIF6BAPG.mjs';import {d}from'./chunk-PD5ZXNGT.mjs';import {a as a$1}from'./chunk-D4NW56YQ.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {f,b as b$2}from'./chunk-GQIS4QBN.mjs';import {i as i$1,b as b$3}from'./chunk-KUDCYGII.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c as c$2,a as a$3}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-SVIYLH7R.mjs';import {c,e}from'./chunk-ETM4MNG4.mjs';import {m,i,a as a$4,h,j}from'./chunk-SD43KVTU.mjs';import {useRef}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 M=new WeakMap;function I(n,t){let{id:e}=M.get(n)??{};if(!e)throw new Error("Unknown list");return `${e}-${se(t)}`}function se(n){return typeof n=="string"?n.replace(/\s*/g,""):""+n}function Se(n,t,e){let{isVirtualized:i,keyboardDelegate:a$3,layoutDelegate:u,onAction:p,disallowTypeAhead:d,linkBehavior:y="action",keyboardNavigationBehavior:O="arrow",escapeKeyBehavior:b$1="clearSelection",shouldSelectOnPressUp:F}=n;!n["aria-label"]&&!n["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:w}=a({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:e,keyboardDelegate:a$3,layoutDelegate:u,isVirtualized:i,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:n.shouldFocusWrap,linkBehavior:y,disallowTypeAhead:d,autoFocus:n.autoFocus,escapeKeyBehavior:b$1,UNSTABLE_focusOnEntry:n.UNSTABLE_focusOnEntry}),k=c(n.id);M.set(t,{id:k,onAction:p,linkBehavior:y,keyboardNavigationBehavior:O,shouldSelectOnPressUp:F});let T=c$1({selectionManager:t.selectionManager,hasItemActions:!!p}),x=a$1(e,{isDisabled:t.collection.size!==0}),g=a$2(n,{labelable:true}),E=c$2(g,{role:"grid",id:k,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:x?-1:0}:w,T);return i&&(E["aria-rowcount"]=t.collection.size,E["aria-colcount"]=1),b({},t),{gridProps:E}}var Y={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Ue(n,t,e$1){let{node:i$2,isVirtualized:a,focusMode:u="row",allowsArrowNavigation:p}=n,{direction:d$2}=b$1(),{onAction:y,linkBehavior:O,keyboardNavigationBehavior:b,shouldSelectOnPressUp:F}=M.get(t),w=e(),k=useRef(null),T=()=>{if(e$1.current!==null){if(u==="child"){if(m(e$1.current)&&e$1.current!==i(a$4(e$1.current)))return;let l=d$1(e$1.current,{tabbable:true}).firstChild();if(l){i$1(l),f(l,{containingElement:b$2(l)});return}}(k.current!=null&&i$2.key!==k.current||!m(e$1.current))&&i$1(e$1.current);}},x={},g=n.hasChildItems,E=t.selectionManager.isLink(i$2.key);if(i$2!=null&&"expandedKeys"in t){let r=t.collection.getChildren?.(i$2.key);g=g||[...r??[]].length>1,y==null&&!E&&t.selectionManager.selectionMode==="none"&&g&&(y=()=>t.toggleKey(i$2.key));let l=g?t.expandedKeys.has(i$2.key):void 0,o=1,c=i$2.index;if(i$2.level>=0&&i$2?.parentKey!=null){let s=t.collection.getItem(i$2.parentKey);if(s){let B=ue(s,t.collection);o=[...B].filter(ae=>ae.type==="item").length,c>0&&B[0].type!=="item"&&(c-=1);}}else o=[...t.collection].filter(s=>s.level===0&&s.type==="item").length;x={"aria-expanded":l,"aria-level":i$2.level+1,"aria-posinset":c+1,"aria-setsize":o};}let{itemProps:Z,...R}=d({selectionManager:t.selectionManager,key:i$2.key,ref:e$1,isVirtualized:a,shouldSelectOnPressUp:n.shouldSelectOnPressUp||F,onAction:y||i$2.props?.onAction?a$3(i$2.props?.onAction,y?()=>y(i$2.key):void 0):void 0,focus:T,linkBehavior:O}),ee=r=>{let l=i(a$4(e$1.current));if(!h(r.currentTarget,j(r))||!e$1.current||!l)return;let o=d$1(e$1.current);if(o.currentNode=l,!J(r,t,i$2,g,d$2,l,e$1.current,p))switch(r.key){case "ArrowLeft":{if(b==="arrow"){let c=d$2==="rtl"?o.nextNode():o.previousNode();if(c)r.preventDefault(),r.stopPropagation(),i$1(c),f(c,{containingElement:b$2(e$1.current)});else if(r.preventDefault(),r.stopPropagation(),d$2==="rtl")i$1(e$1.current),f(e$1.current,{containingElement:b$2(e$1.current)});else {o.currentNode=e$1.current;let s=Q(o);s&&(i$1(s),f(s,{containingElement:b$2(e$1.current)}));}}break}case "ArrowRight":{if(b==="arrow"){let c=d$2==="rtl"?o.previousNode():o.nextNode();if(c)r.preventDefault(),r.stopPropagation(),i$1(c),f(c,{containingElement:b$2(e$1.current)});else if(r.preventDefault(),r.stopPropagation(),d$2==="ltr")i$1(e$1.current),f(e$1.current,{containingElement:b$2(e$1.current)});else {o.currentNode=e$1.current;let s=Q(o);s&&(i$1(s),f(s,{containingElement:b$2(e$1.current)}));}}break}case "ArrowUp":case "ArrowDown":!r.altKey&&h(e$1.current,j(r))&&(r.stopPropagation(),r.preventDefault(),e$1.current.parentElement?.dispatchEvent(new KeyboardEvent(r.nativeEvent.type,r.nativeEvent)));break}},te=r=>{if(k.current=i$2.key,j(r)!==e$1.current){b$3()||t.selectionManager.setFocusedKey(i$2.key);return}u==="child"&&r.relatedTarget&&h(e$1.current,r.relatedTarget)||requestAnimationFrame(()=>{u==="child"&&i(a$4(e$1.current))===e$1.current&&T();});},re=r=>{let l=i(a$4(e$1.current));if(!(!h(r.currentTarget,j(r))||!e$1.current||!l)){if(b==="tab"){if(j(r)!==e$1.current&&r.key!=="Tab"){r.stopPropagation();return}if(J(r,t,i$2,g,d$2,l,e$1.current,p))return}switch(r.key){case "Tab":if(b==="tab"){let o=d$1(e$1.current,{tabbable:true});o.currentNode=l,(r.shiftKey?o.previousNode():o.nextNode())&&r.stopPropagation();}}}},ie=q(i$2.props),ne=R.hasAction?ie:{},K=c$2(Z,ne,{role:"row",onKeyDownCapture:b==="arrow"||p?ee:void 0,onFocus:te,"aria-label":i$2["aria-label"]||i$2.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(i$2.key)?t.selectionManager.isSelected(i$2.key):void 0,"aria-disabled":t.selectionManager.isDisabled(i$2.key)||void 0,"aria-labelledby":w&&(i$2["aria-label"]||i$2.textValue)?`${I(t,i$2.key)} ${w}`:void 0,id:I(t,i$2.key)});u==="child"&&p&&b==="tab"&&(K.tabIndex=-1);let oe=K.onKeyDown;if(K.onKeyDown=r=>{re(r),r.isPropagationStopped()||oe?.(r);},a){let{collection:r}=t,l=[...r];K["aria-rowindex"]=l.find(o=>o.type==="section")?[...r.getKeys()].filter(o=>r.getItem(o)?.type!=="section").findIndex(o=>o===i$2.key)+1:i$2.index+1;}let le={role:"gridcell","aria-colindex":1};return {rowProps:{...c$2(K,x)},gridCellProps:le,descriptionProps:{id:w},...R}}function J(n,t,e,i,a,u,p,d){if(!("expandedKeys"in t)||!d&&u!==p)return false;if(n.key===Y.expand[a]&&t.selectionManager.focusedKey===e.key&&i&&!t.expandedKeys.has(e.key))return t.toggleKey(e.key),n.stopPropagation(),true;if(n.key===Y.collapse[a]&&t.selectionManager.focusedKey===e.key){if(i&&t.expandedKeys.has(e.key))return t.toggleKey(e.key),n.stopPropagation(),true;if(!t.expandedKeys.has(e.key)&&e.parentKey&&t.collection.getItem(e.parentKey)?.type==="item")return t.selectionManager.setFocusedKey(e.parentKey),n.stopPropagation(),true}return false}function Q(n){let t=null,e=null;do e=n.lastChild(),e&&(t=e);while(e);return t}function ue(n,t){let e=t.getChildren?.(n.key),i=e?Array.from(e):[],a=i.length>0?i[0]:null,u=[];for(;a;)u.push(a),a=a.nextKey!=null?t.getItem(a.nextKey):null;return u}export{I as a,Se as b,Ue as c};
@@ -0,0 +1,10 @@
1
+ import {c}from'./chunk-HH4VLTF3.mjs';import {d,c as c$3}from'./chunk-F7WPMQ3P.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1,v}from'./chunk-PPHSLODC.mjs';import {b as b$1,c as c$2}from'./chunk-3WKDIXCM.mjs';import {b}from'./chunk-SD43KVTU.mjs';import p,{useEffect,useRef,useContext,useMemo}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 E=p.forwardRef(({children:a$1,...t},o)=>{o=a(o);let{pressProps:l}=d({...t,ref:o}),{focusableProps:n}=c(t,o),s=p.Children.only(a$1);useEffect(()=>{if(process.env.NODE_ENV==="production")return;let r=o.current;if(!r||!(r instanceof b(r).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!t.isDisabled&&!c$1(r,{skipVisibilityCheck:true})){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(r.localName!=="button"&&r.localName!=="input"&&r.localName!=="select"&&r.localName!=="textarea"&&r.localName!=="a"&&r.localName!=="area"&&r.localName!=="summary"){let e=r.getAttribute("role");e?e!=="application"&&e!=="button"&&e!=="checkbox"&&e!=="combobox"&&e!=="gridcell"&&e!=="link"&&e!=="menuitem"&&e!=="menuitemcheckbox"&&e!=="menuitemradio"&&e!=="option"&&e!=="radio"&&e!=="searchbox"&&e!=="separator"&&e!=="slider"&&e!=="spinbutton"&&e!=="switch"&&e!=="tab"&&e!=="textbox"&&e!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${e}".`):console.warn("<Pressable> child must have an interactive ARIA role.");}},[o,t.isDisabled]);let x=parseInt(p.version,10)<19?s.ref:s.props.ref;return p.cloneElement(s,{...c$2(l,n,s.props),ref:b$1(x,o)})});var A=p.forwardRef(({children:a$1,...t},o)=>{let l=useRef(false),n=useContext(c$3),s=c$2(n||{},{...t,register(){l.current=true,n&&n.register();}});return s.ref=a(o||n?.ref),v(n,s.ref),useEffect(()=>{l.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),l.current=true);},[]),jsx(c$3.Provider,{value:s,children:a$1})});function O({children:a}){let t=useMemo(()=>({register:()=>{}}),[]);return jsx(c$3.Provider,{value:t,children:a})}export{E as a,A as b,O as c};
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-QR2AF3KT.mjs';import {a}from'./chunk-OO7BXL2N.mjs';import {useContext}from'react';/**
1
+ import {b}from'./chunk-4JQUB53Q.mjs';import {a}from'./chunk-OO7BXL2N.mjs';import {useContext}from'react';/**
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 {b as b$3,a as a$4}from'./chunk-5BKC373Y.mjs';import {p,o}from'./chunk-YQHHE5AT.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {e as e$1}from'./chunk-J4OPD7OL.mjs';import {a as a$1}from'./chunk-AI6WQPRX.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u,b as b$4}from'./chunk-PPHSLODC.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {j,h,b as b$1,e,l,a as a$3}from'./chunk-SD43KVTU.mjs';import yt,{createContext,useRef,useCallback,useState,useEffect,useMemo,useContext}from'react';import {flushSync}from'react-dom';import {jsx,jsxs}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 C=class h{x;y;constructor(e=0,t=0){this.x=e,this.y=t;}copy(){return new h(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}};var y=class h{x;y;width;height;constructor(e=0,t=0,i=0,o=0){this.x=e,this.y=t,this.width=i,this.height=o;}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new C(this.x,this.y)}get topRight(){return new C(this.maxX,this.y)}get bottomLeft(){return new C(this.x,this.maxY)}get bottomRight(){return new C(this.maxX,this.maxY)}intersects(e){return (process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of ["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),o=Math.max(this.maxX,e.maxX)-t,r=Math.max(this.maxY,e.maxY)-i;return new h(t,i,o,r)}intersection(e){if(!this.intersects(e))return new h(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new h(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new h(this.x,this.y,this.width,this.height)}};var m=class h{width;height;constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0);}copy(){return new h(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}};var at=0,ce=class{virtualizer;layoutInfo;content;rendered;viewType;key;children;reusableViews;constructor(e,t){this.virtualizer=e,this.key=++at,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null;}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null;}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new ve(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e);}},ye=class extends ce{constructor(e){super(e,"root");}},ve=class extends ce{parent;constructor(e,t,i){super(e,i),this.parent=t;}};function Xe(h,e){if(h===e)return true;if(h.size!==e.size)return false;for(let t of h)if(!e.has(t))return false;return true}var fe=class{startTime=0;velocity=new C(0,0);visibleRect=new y;setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e;}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}};var st=4;function pe(h){return h==="x"?"width":"height"}function ht(h,e,t,i,o){let r=t(h.key);if(!r)return null;let l=r.rect[h.corner][e]-i[e]-h.offset;if(l===0)return null;let n=i[e]+l,a=pe(e),s=Math.max(0,o[a]-i[a]),u=Math.max(0,Math.min(s,n));return u!==i[e]?u:null}function ut(h,e,t,i,o=()=>true){let r=pe(e),l=null;for(let[n,a]of i){if(!a||!o(a))continue;let s=a.rect.intersection(t)[r];if(a.rect.area>0&&s>=st){let u=a.rect.getCornerInRect(t)??"topLeft",c=a.rect[u][e]-t[e];(!l||(h==="end"?c<l.offset:c>l.offset))&&(l={key:n,corner:u,offset:c});}}return l}function dt(h,e,t,i){if(h==="start")return 0;let o=pe(e);return Math.max(0,t[o]-i[o])}function Ge(h,e,t,i,o){if(t==="start")return h[i]<=o;let r=pe(i);return e[r]-(h[i]+h[r])<=o}function ct(h,e,t,i,o,r,l,n,a,s){let u=c=>e==="x"?new y(c,a.y,a.width,a.height):new y(a.x,c,a.width,a.height);if(t){let c=ht(t,e,n,a,s);if(c!=null)return u(c)}if(i&&!o&&(!r||l>0)){let c=u(dt(h,e,s,a));return c.equals(a)?null:c}return null}var me=class{hasSnappedToEdge=false;hadEstimatedVisibleItems=false;wasNearAnchorEdge=false;reset(){this.hasSnappedToEdge=false,this.hadEstimatedVisibleItems=false,this.wasNearAnchorEdge=false;}captureBeforeLayout(e,t,i){return e?ut(e.edge,e.axis,i,t,e.isAnchorable):null}resolveAfterLayout(e){let{anchorInfo:t,anchor:i,postLayoutInfos:o,previousVisibleRect:r,previousContentSize:l,contentSize:n,itemSizeChanged:a,isScrolling:s,getLayoutInfo:u}=e;if(!t)return null;let c=this.hadEstimatedVisibleItems,d=this.wasNearAnchorEdge,f=false;for(let T of o.values())if(T.estimatedSize){f=true;break}if(this.hadEstimatedVisibleItems=f,c||(this.wasNearAnchorEdge=Ge(r,l,t.edge,t.axis,t.threshold)),r.area===0)return null;let g=t.axis==="x"?"width":"height",p=n[g]-l[g],L=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=true,!(L||p!==0||a))return null;let v=L||c&&d||Ge(r,l,t.edge,t.axis,t.threshold);c||(this.wasNearAnchorEdge=v);let N=L||c&&d?null:i;return ct(t.edge,t.axis,N,v,s,a,p,u,r,n)}};var ge=class{delegate;collection;layout;contentSize;visibleRect;size;persistedKeys;_visibleViews;_renderedContent;_rootView;_isScrolling;_invalidationContext;_overscanManager;_scrollAnchor;constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new m,this.visibleRect=new y,this.size=new m,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ye(this),this._isScrolling=false,this._invalidationContext={},this._overscanManager=new fe,this._scrollAnchor=new me;}isPersistedKey(e){if(this.persistedKeys.has(e))return true;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return true}return false}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:o}=e.layoutInfo;e.content=o||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content);}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let o=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,o),o}keyAtPoint(e){let t=new y(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let o of i)if(o.rect.intersects(t))return o.key;return null}relayout(e={}){let t=this.layout.UNSTABLE_getScrollAnchorInfo?.(e.layoutOptions)??null,i=null;if(t){let c=[];for(let[d,f]of this._visibleViews){let g=this.layout.getLayoutInfo(d)??f.layoutInfo;g&&c.push([d,g]);}i=this._scrollAnchor.captureBeforeLayout(t,c,this.visibleRect);}let o=this.contentSize,r=this.visibleRect;this.layout.update(e);let l=this.layout.getContentSize();this.contentSize=new m(l.width,l.height);let n=this._scrollAnchor.resolveAfterLayout({anchorInfo:t,anchor:i,postLayoutInfos:t?this.getVisibleLayoutInfos():new Map,previousVisibleRect:r,previousContentSize:o,contentSize:this.contentSize,itemSizeChanged:e.itemSizeChanged??false,isScrolling:this._isScrolling,getLayoutInfo:c=>this.layout.getLayoutInfo(c)});if(n){this.delegate.setVisibleRect(n);return}let a=this.visibleRect,s=e.contentChanged?0:a.x,u=e.contentChanged?0:a.y;if(s=Math.max(0,Math.min(this.contentSize.width-a.width,s)),u=Math.max(0,Math.min(this.contentSize.height-a.height,u)),s!==a.x||u!==a.y){let c=new y(s,u,a.width,a.height);this.delegate.setVisibleRect(c);}else this.updateSubviews();}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),o;e&&!(t&&i)?o=new y(0,0,this.contentSize.width,this.contentSize.height):o=this._overscanManager.getOverscannedRect();let r=this.layout.getVisibleLayoutInfos(o),l=new Map;for(let n of r)l.set(n.key,n);return l}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,o]of this._visibleViews){let r=e.get(i);(!r||o.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),o.parent.reuseChild(o),t.add(o));}for(let[i,o]of e){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(o),r.parent.children.add(r),this._visibleViews.set(i,r),t.delete(r);else {r.layoutInfo=o;let l=this.collection.getItem(o.key);r.content!==l&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r));}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let o=this._visibleViews.get(i);o.parent.children.delete(o),o.parent.children.add(o);}}render(e){let t=this,i=false,o=false,r=false,l=false,n=false,a=false,s=false,u=false;if(e.collection!==this.collection&&(t.collection=e.collection,i=true),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,this._scrollAnchor.reset(),i=true),e.persistedKeys&&!Xe(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,u=true),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let c=new y(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),d=new y(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(d,c)?(o=!e.visibleRect.pointEquals(this.visibleRect),r=!this.size.equals(e.size),l=this.size.width!==e.size.width,n=this.size.height!==e.size.height,i=true):u=true,t.visibleRect=e.visibleRect,t.size=e.size;}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(r||=e.invalidationContext.sizeChanged||false,l||=e.invalidationContext.widthChanged||false,n||=e.invalidationContext.heightChanged||false,o||=e.invalidationContext.offsetChanged||false,a||=e.invalidationContext.itemSizeChanged||false,s||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),i||=a||r||o||s),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(u=true)),i?this.relayout({offsetChanged:o,sizeChanged:r,widthChanged:l,heightChanged:n,itemSizeChanged:a,layoutOptionsChanged:s,layoutOptions:this._invalidationContext.layoutOptions}):u&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e);}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:true});}};var mt=typeof document<"u"?yt.useLayoutEffect:()=>{};function xe(h){let[e,t]=useState(new y(0,0,0,0)),[i,o]=useState(new m),[r,l]=useState(false),[n,a]=useState({}),s=useRef(false),[u]=useState(()=>new ge({collection:h.collection,layout:h.layout,delegate:{setVisibleRect(v){t(v),s.current=true;},renderView:h.renderView,invalidate:a}}));mt(()=>{s.current&&(s.current=false,h.onVisibleRectChange(e));});let c=useMemo(()=>h.layoutOptions!=null?{...n,layoutOptions:h.layoutOptions}:n,[n,h.layoutOptions]),d=u.render({layout:h.layout,collection:h.collection,persistedKeys:h.persistedKeys,layoutOptions:h.layoutOptions,visibleRect:e,size:i,invalidationContext:c,isScrolling:r}),f=u.contentSize,g=useCallback(()=>{l(true);},[]),p=useCallback(()=>{l(false);},[]);return useMemo(()=>({virtualizer:u,visibleViews:d,setVisibleRect:t,size:i,setSize:o,contentSize:f,isScrolling:r,startScrolling:g,endScrolling:p}),[u,d,t,i,o,f,r,g,p])}var F=class{virtualizer=null;shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}};var x=class h{type;key;parentKey;content;rect;estimatedSize;isSticky;opacity;transform;zIndex;allowOverflow;constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=false,this.isSticky=false,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=false;}copy(){let e=new h(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}};var V={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),preserveAspectRatio:false,minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},re=class extends F{gap=V.minSpace;dropIndicatorThickness=2;numColumns=0;direction="ltr";contentSize=new m;layoutInfos=new Map;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||V.minItemSize).equals(t.minItemSize||V.minItemSize)||!(e.maxItemSize||V.maxItemSize).equals(t.maxItemSize||V.maxItemSize)||!(e.minSpace||V.minSpace).equals(t.minSpace||V.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=V.minItemSize,maxItemSize:i=V.maxItemSize,preserveAspectRatio:o=V.preserveAspectRatio,minSpace:r=V.minSpace,maxHorizontalSpace:l=V.maxSpace,maxColumns:n=V.maxColumns,dropIndicatorThickness:a=V.dropIndicatorThickness,loaderHeight:s=V.loaderHeight,direction:u="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=a,this.direction=u;let c=this.virtualizer.size.width,d=Math.min(i.width,c),f=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*d),g=Math.floor(c/(t.width+r.width)),p=Math.max(1,Math.min(n,g));this.numColumns=p;let L=c-r.width*Math.max(0,p),v=Math.floor(L/p);v=Math.max(t.width,Math.min(d,v));let N=(v-t.width)/Math.max(1,d-t.width),T=t.height+Math.floor((f-t.height)*N);T=Math.max(t.height,Math.min(f,T));let O=Math.min(Math.max(l,r.width),Math.floor((c-p*v)/(p+1)));this.gap=new m(O,r.height),this.margin=Math.floor((c-p*v-O*(p+1))/2);let k=this.virtualizer.collection,j=k.size,M=k.getLastKey();for(let R=0;R<2&&M!=null;R++){if(k.getItem(M)?.type==="skeleton"){j++;break}M=k.getKeyBefore(M);}let q=Math.ceil(j/p),X=k[Symbol.iterator](),z=q>0?r.height:0,w=new Map,I=null,S=0;for(let R=0;R<q;R++){let P=0,G=[];for(let E=0;E<p;E++){let A=I||X.next().value;if(!A)break;if(A.type==="loader")continue;A.type==="skeleton"&&(I=A);let _=I?`${I.key}-${S++}`:A.key,D=this.layoutInfos.get(_),H=A;I&&(H=D&&D.content.key===_?D.content:{...I,key:_});let he=O+E*(v+O)+this.margin,ue=T,te=!o;D&&te&&(ue=D.rect.height,te=e.layoutOptionsChanged||e.sizeChanged||D.estimatedSize||D.content!==H);let nt=new y(he,z,v,ue),$=new x(A.type,_,nt);$.estimatedSize=te,$.allowOverflow=true,$.content=H,w.set(_,$),G.push($),P=Math.max(P,$.rect.height);}for(let E of G)E.rect.height=P;z+=P+r.height,I&&R===q-1&&z<this.virtualizer.size.height&&q++;}let b=k.getItem(k.getLastKey());if(b?.type==="loader"){(S>0||!b.props.isLoading)&&(s=0);let R=c-O*2,P=new y(O,z,R,s),G=new x("loader",b.key,P);w.set(b.key,G),z=G.rect.maxY;}this.layoutInfos=w,this.contentSize=new m(this.virtualizer.size.width,z);}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getDropTargetFromPoint(e,t,i){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y,this.direction==="rtl"&&this.numColumns>1&&(e=this.contentSize.width-e);let o=null;if(this.numColumns===1){let u=new y(e,Math.max(0,t-this.gap.height),1,Math.max(1,this.gap.height*2)),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.y-t),p=Math.abs(f.rect.maxY-t),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}else {let u=new y(Math.max(0,e-this.gap.width),t,this.gap.width*2,1),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.x-e),p=Math.abs(f.rect.maxX-e),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}let r=o!=null?this.getLayoutInfo(o):null;if(!r)return {type:"root"};let l={type:"item",key:r.key,dropPosition:"on"},n=this.numColumns===1?t:e,a=this.numColumns===1?r.rect.y:r.rect.x,s=this.numColumns===1?r.rect.height:r.rect.width;if(i(l))n<a+5?l.dropPosition="before":n>a+s-5&&(l.dropPosition="after");else {let u=a+s/2;n<=u&&i({...l,dropPosition:"before"})?l.dropPosition="before":n>=u&&i({...l,dropPosition:"after"})&&(l.dropPosition="after");}return l}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return this.numColumns===1?i=new y(t.rect.x,e.dropPosition==="before"?t.rect.y-this.gap.height/2-this.dropIndicatorThickness/2:t.rect.maxY+this.gap.height/2-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=new y(e.dropPosition==="before"?t.rect.x-this.gap.width/2-this.dropIndicatorThickness/2:t.rect.maxX+this.gap.width/2-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height),new x("dropIndicator",e.key+":"+e.dropPosition,i)}};var J=48,Y=class extends F{rowSize;orientation;estimatedRowSize;headingSize;estimatedHeadingSize;loaderSize;dropIndicatorThickness;gap;padding;layoutNodes;contentSize;lastCollection;rootNodes;invalidateEverything;validRect;requestedRect;constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=false,this.validRect=new y,this.requestedRect=new y,this.contentSize=new m;}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t=this.orientation==="horizontal"?"x":"y",i=this.orientation==="horizontal"?"width":"height";if(e[i]>1){let l=(this.rowSize??this.estimatedRowSize??J)+this.gap;e=e.copy();let n=Math.floor(e[t]/l)*l,a=e[i]+e[t]-n;e[t]=n,e[i]=Math.ceil(a/l)*l;}this.layoutIfNeeded(e);let o=[],r=l=>{for(let n of l)this.isVisible(n,e)&&(o.push(n.layoutInfo),n.children&&r(n.children));};return r(this.rootNodes),o}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return !this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new y(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new y(0,0,this.contentSize.width,this.contentSize.height),true):false}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return (e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let o of this.lastCollection.getKeys())t.getItem(o)||this.layoutNodes.get(o)&&this.layoutNodes.delete(o);this.lastCollection=t,this.invalidateEverything=false,this.validRect=this.requestedRect.copy();}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=this.orientation==="horizontal"?"x":"y",o=this.orientation==="horizontal"?"maxX":"maxY",r=pt(t,s=>s.type!=="content"),l=r.filter(s=>s.type==="loader"),n=[],a=t?.size===0;a&&(e=0);for(let s of r){let u=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s.type==="item"&&e+u<this.requestedRect[i]&&!this.isValid(s,e)){e+=u;continue}let c=this.orientation==="horizontal"?this.buildChild(s,e,this.padding,null):this.buildChild(s,this.padding,e,null);if(e=c.layoutInfo.rect[o]+this.gap,n.push(c),s.type==="loader"){let d=l.indexOf(s);l.splice(d,1);}if((s.type==="item"||s.type==="loader")&&e>this.requestedRect[o]){let d=r.indexOf(s);for(let f of l){let g=r.indexOf(f);e+=(g-d-1)*u;let p=this.orientation==="horizontal"?this.buildChild(f,e,this.padding,null):this.buildChild(f,this.padding,e,null);n.push(p),e=p.layoutInfo.rect[o],d=g;}e+=(r.length-d-1)*u;break}}return e=Math.max(e-this.gap,0),e+=a?0:this.padding,this.contentSize=this.orientation==="horizontal"?new m(e,this.virtualizer.size.height):new m(this.virtualizer.size.width,e),n}isValid(e,t){let i=this.layoutNodes.get(e.key),o=this.orientation==="horizontal"?"x":"y";return !this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[o]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,o){if(this.isValid(e,this.orientation==="horizontal"?t:i))return this.layoutNodes.get(e.key);let r=this.buildNode(e,t,i);return r.layoutInfo.parentKey=o??null,r.layoutInfo.allowOverflow=true,this.layoutNodes.set(e.key,r),r}buildNode(e,t,i){switch(e.type){case "section":return this.buildSection(e,t,i);case "item":return this.buildItem(e,t,i);case "header":return this.buildSectionHeader(e,t,i);case "loader":return this.buildLoader(e,t,i);case "separator":return this.buildItem(e,t,i);case "submenutrigger":return this.buildSection(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let o=new y(t,i,this.padding,0),r=new x(e.type,e.key,o);return this.orientation==="horizontal"?(o.height=this.virtualizer.contentSize.height-this.padding-i,o.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0):(o.width=this.virtualizer.contentSize.width-this.padding-t,o.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0),{layoutInfo:r,validRect:o.intersection(this.requestedRect)}}buildSection(e,t,i){let o=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,l=this.virtualizer.size.height-this.padding-i,n=this.orientation==="horizontal"?new y(t,i,0,l):new y(t,i,r,0),a=new x(e.type,e.key,n),s=this.orientation==="horizontal"?t:i,u=this.orientation==="horizontal"?"x":"y",c=this.orientation==="horizontal"?"maxX":"maxY",d=this.orientation==="horizontal"?"width":"height",f=0,g=[];for(let p of b$2(e,o)){if(p.type==="content")continue;let L=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s+L<this.requestedRect[u]&&!this.isValid(e,s)){s+=L,f++;continue}let v=this.orientation==="horizontal"?this.buildChild(p,s,i,a.key):this.buildChild(p,t,s,a.key);if(s=v.layoutInfo.rect[c]+this.gap,g.push(v),s>this.requestedRect[c]){s+=([...b$2(e,o)].length-(g.length+f))*L;break}}return s-=this.gap,n[d]=s-(this.orientation==="horizontal"?t:i),{layoutInfo:a,children:g,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.headingSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key),d=c?.layoutInfo;if(d){let f=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;n=c.layoutInfo.rect[r],a=l!==d.rect[o]||f!==g||d.estimatedSize;}else n=e.rendered?this.estimatedHeadingSize:0,a=true;}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l-i):new y(t,i,l-t,n),u=new x("header",e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.rowSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key);c?(n=c.layoutInfo.rect[r],a=l!==c.layoutInfo.rect[o]||e!==c.node||c.layoutInfo.estimatedSize):(n=this.estimatedRowSize,a=true);}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l):new y(t,i,l,n),u=new x(e.type,e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return false;let o=this.virtualizer.collection,r=i.layoutInfo,l=this.orientation==="horizontal"?"x":"y",n=this.orientation==="horizontal"?"width":"height";if(r.estimatedSize=false,r.rect[n]!==t[n]){let a=r.copy();a.rect[n]=t[n],i.layoutInfo=a,this.validRect[n]=Math.min(this.validRect[n],r.rect[l]-this.validRect[l]),i.node?.type==="item"&&(this.requestedRect[n]+=a.rect[n]-r.rect[n]),this.updateLayoutNode(e,r,a);let s=r.parentKey!=null?o.getItem(r.parentKey):null;for(;s;)this.updateLayoutNode(s.key,r,a),s=s.parentKey!=null?o.getItem(s.parentKey):null;return true}return false}updateLayoutNode(e,t,i){let o=this.layoutNodes.get(e);o&&(o.validRect=o.validRect.intersection(this.validRect),o.layoutInfo===t&&(o.layoutInfo=i));}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=this.orientation==="horizontal"?new y(Math.max(0,t.rect.x-this.dropIndicatorThickness/2),t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){let r=o.level??0,l=this.collection.getKeyAfter(e.key);for(;l!=null;){let n=this.collection.getItem(l);if(!n||n.level<=r)break;t=this.getLayoutInfo(l)||t,l=this.collection.getKeyAfter(l);}}i=this.orientation==="horizontal"?new y(t.rect.maxX-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness);}else i=t.rect;return new x("dropIndicator",e.key+":"+e.dropPosition,i)}};function pt(h,e){let t=[];for(let i of h)e(i)&&t.push(i);return t}var Be=48,le=class extends Y{lastCollection=null;columnWidths=new Map;stickyColumnIndices;lastPersistedKeys=null;persistedIndices=new Map;constructor(e){super(e),this.stickyColumnIndices=[];}get collection(){return this.virtualizer.collection}get rowHeight(){return super.rowHeight}get estimatedRowHeight(){return super.estimatedRowHeight}get headingHeight(){return super.headingHeight}get estimatedHeadingHeight(){return super.estimatedHeadingHeight}get loaderHeight(){return super.loaderHeight}columnsChanged(e,t){return !t||e.columns!==t.columns&&e.columns.length!==t.columns.length||e.columns.some((i,o)=>i.key!==t.columns[o].key||i.props.width!==t.columns[o].props.width||i.props.minWidth!==t.columns[o].props.minWidth||i.props.maxWidth!==t.columns[o].props.maxWidth)}shouldInvalidateLayoutOptions(e,t){return e.columnWidths!==t.columnWidths||super.shouldInvalidateLayoutOptions(e,t)}update(e){let t=this.virtualizer.collection;if(e.layoutOptions?.columnWidths){for(let[i,o]of e.layoutOptions.columnWidths)if(this.columnWidths.get(i)!==o){this.columnWidths=e.layoutOptions.columnWidths,e.sizeChanged=true;break}}else if(e.sizeChanged||this.columnsChanged(t,this.lastCollection)){let i=new a$4({});this.columnWidths=i.buildColumnWidths(this.virtualizer.size.width-this.padding*2,t,new Map),e.sizeChanged=true;}super.update(e);}buildCollection(){this.stickyColumnIndices=[];let e=this.virtualizer.collection;for(let r of e.columns)(this.isStickyColumn(r)||e.rowHeaderColumnKeys.has(r.key))&&this.stickyColumnIndices.push(r.index);let t=[],i=0,o=0;if(e.head){for(let r of e)switch(r.type){case "tableheader":{let l=this.buildTableHeader();i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}case "tablebody":case "tablefooter":{let l=this.buildRowGroup(i,r);i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}}i>0&&(i-=this.gap);for(let r of t)r.layoutInfo.rect.width=o;}else {let r=this.buildTableHeader();this.layoutNodes.set(r.layoutInfo.key,r);let l=this.buildBody(r.layoutInfo.rect.maxY+this.gap);l.layoutInfo.rect.width=Math.max(r.layoutInfo.rect.width,l.layoutInfo.rect.width),i=l.layoutInfo.rect.maxY,o=l.layoutInfo.rect.width,t=[r,l];}return this.lastPersistedKeys=null,this.contentSize=new m(o+this.padding*2,i+this.padding),t}buildTableHeader(){let e=this.virtualizer.collection,t=new y(this.padding,this.padding,0,0),i=new x("header",e.head?.key??"header",t);i.isSticky=true,i.zIndex=1;let o=this.padding,r=0,l=[];for(let n of e.headerRows){let a=this.buildChild(n,this.padding,o,i.key);a.layoutInfo.parentKey=i.key,o=a.layoutInfo.rect.maxY,r=Math.max(r,a.layoutInfo.rect.width),a.index=l.length,l.push(a);}return t.width=r,t.height=o-this.padding,{layoutInfo:i,children:l,validRect:i.rect,node:e.head}}buildHeaderRow(e,t,i){let o=new y(t,i,0,0),r=new x("headerrow",e.key,o),l=0,n=[];for(let a of b$2(e,this.virtualizer.collection)){let s=this.buildChild(a,t,i,r.key);s.layoutInfo.parentKey=r.key,t=s.layoutInfo.rect.maxX,l=Math.max(l,s.layoutInfo.rect.height),s.index=n.length,n.push(s);}for(let[a,s]of n.entries())s.layoutInfo.zIndex=n.length-a+1;return this.setChildHeights(n,l),o.height=l,o.width=t-o.x,{layoutInfo:r,children:n,validRect:o,node:e}}setChildHeights(e,t){for(let i of e)i.layoutInfo.rect.height!==t&&(i.layoutInfo=i.layoutInfo.copy(),i.layoutInfo.rect.height=t);}getRenderedColumnWidth(e){let t=this.virtualizer.collection,i=e.colSpan??1,o=e.colIndex??e.index,r=0;for(let l=o;l<o+i;l++){let n=t.columns[l];n?.key!=null&&(r+=this.columnWidths.get(n.key)??0);}return r}getEstimatedHeight(e,t,i,o){let r=false;if(i==null){let l=this.layoutNodes.get(e.key);l?(i=l.layoutInfo.rect.height,r=e!==l.node||t!==l.layoutInfo.rect.width||l.layoutInfo.estimatedSize):(i=o??Be,r=true);}return {height:i,isEstimated:r}}getEstimatedRowHeight(){return this.rowHeight??this.estimatedRowHeight??Be}buildColumn(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.headingHeight??this.rowHeight,this.estimatedHeadingHeight??this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:a.rect,node:e}}isStickyColumn(e){return false}buildBody(e){let t=this.virtualizer.collection;return this.buildRowGroup(e,t.body)}buildRowGroup(e,t){let i=this.virtualizer.collection,o=new y(this.padding,e,0,0),r=new x("rowgroup",t.key,o),l=e,n=0,a=[],s=this.getEstimatedRowHeight()+this.gap,u=b$2(t,i);for(let d of u){if(e+s<this.requestedRect.y&&!this.isValid(d,e)||e>this.requestedRect.maxY&&d.type!=="loader"){e+=s;continue}let f=this.buildChild(d,this.padding,e,r.key);f.layoutInfo.parentKey=r.key,f.index=a.length,e=f.layoutInfo.rect.maxY+this.gap,n=Math.max(n,f.layoutInfo.rect.width),a.push(f);}return i?.size===0?e=this.virtualizer.size.height:e-=this.gap,o.width=n,o.height=e-l,{layoutInfo:r,children:a,validRect:r.rect.intersection(this.requestedRect),node:t}}buildLoader(e,t,i){let o=super.buildLoader(e,t,i),r=this.virtualizer.collection;return o.layoutInfo.rect.width=this.layoutNodes.get(r.head?.key??"header").layoutInfo.rect.width,o.validRect=o.layoutInfo.rect.intersection(this.requestedRect),o}buildNode(e,t,i){switch(e.type){case "headerrow":return this.buildHeaderRow(e,t,i);case "item":return this.buildRow(e,t,i);case "column":case "placeholder":return this.buildColumn(e,t,i);case "cell":return this.buildCell(e,t,i);case "loader":return this.buildLoader(e,t,i);default:throw new Error("Unknown node type "+e.type)}}buildRow(e,t,i){let o=this.virtualizer.collection,r=new y(t,i,0,0),l=new x("row",e.key,r),n=[],a=0;for(let s of b$2(e,o))if(s.type==="cell")if(t>this.requestedRect.maxX){let u=this.layoutNodes.get(s.key);if(u)u.layoutInfo.rect.x=t,t+=u.layoutInfo.rect.width;else break}else {let u=this.buildChild(s,t,i,l.key);t=u.layoutInfo.rect.maxX,a=Math.max(a,u.layoutInfo.rect.height),u.index=n.length,n.push(u);}return this.setChildHeights(n,a),r.width=this.layoutNodes.get(o.head?.key??"header").layoutInfo.rect.width,r.height=a,{layoutInfo:l,children:n,validRect:r.intersection(this.requestedRect),node:e}}buildCell(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.rowHeight,this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:n,node:e}}getVisibleLayoutInfos(e){if(e.height>1){let i=this.getEstimatedRowHeight();e.y=Math.floor(e.y/i)*i,e.height=Math.ceil(e.height/i)*i;}this.layoutIfNeeded(e);let t=[];this.buildPersistedIndices();for(let i of this.rootNodes)t.push(i.layoutInfo),this.addVisibleLayoutInfos(t,i,e);return t}addVisibleLayoutInfos(e,t,i){if(!(!t.children||t.children.length===0))switch(t.layoutInfo.type){case "header":{for(let o of t.children)e.push(o.layoutInfo),this.addVisibleLayoutInfos(e,o,i);break}case "rowgroup":{let o=this.binarySearch(t.children,i.topLeft,"y"),r=this.binarySearch(t.children,i.bottomRight,"y"),l=this.persistedIndices.get(t.layoutInfo.key),n=0;for(;l&&n<l.length&&l[n]<o;){let s=l[n];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i)),n++;}for(let s=o;s<=r;s++){for(;l&&n<l.length&&l[n]<s;)n++;e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i);}for(;l&&n<l.length;){let s=l[n++];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i));}let a=t.children.at(-1);a?.layoutInfo.type==="loader"&&e.push(a.layoutInfo);break}case "headerrow":case "row":{let o=this.binarySearch(t.children,i.topLeft,"x"),r=this.binarySearch(t.children,i.topRight,"x"),l=0,n=this.persistedIndices.get(t.layoutInfo.key)||this.stickyColumnIndices;for(;l<n.length&&n[l]<o;){let a=n[l];a<t.children.length&&e.push(t.children[a].layoutInfo),l++;}for(let a=o;a<=r;a++){for(;l<n.length&&n[l]<a;)l++;e.push(t.children[a].layoutInfo);}for(;l<n.length;){let a=n[l++];a<t.children.length&&e.push(t.children[a].layoutInfo);}break}default:throw new Error("Unknown node type "+t.layoutInfo.type)}}binarySearch(e,t,i){let o=0,r=e.length-1;for(;o<=r;){let l=o+r>>1,n=e[l];if(i==="x"&&n.layoutInfo.rect.maxX<=t.x||i==="y"&&n.layoutInfo.rect.maxY<=t.y)o=l+1;else if(i==="x"&&n.layoutInfo.rect.x>t.x||i==="y"&&n.layoutInfo.rect.y>t.y)r=l-1;else return l}return Math.max(0,Math.min(e.length-1,o))}buildPersistedIndices(){if(this.virtualizer.persistedKeys!==this.lastPersistedKeys){this.lastPersistedKeys=this.virtualizer.persistedKeys,this.persistedIndices.clear();for(let e of this.virtualizer.persistedKeys){let t=this.layoutNodes.get(e)?.layoutInfo;for(;t&&t.parentKey;){let i=this.virtualizer.collection.getItem(t.key),o=this.persistedIndices.get(t.parentKey);o||(o=i?.type==="cell"||i?.type==="column"?[...this.stickyColumnIndices]:[],this.persistedIndices.set(t.parentKey,o));let r=this.layoutNodes.get(t.key)?.index;r!=null&&!o.includes(r)&&o.push(r),t=this.layoutNodes.get(t.parentKey)?.layoutInfo;}}for(let e of this.persistedIndices.values())e.sort((t,i)=>t-i);}}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(c.type!=="row"||!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=super.getDropTargetLayoutInfo(e);return t.parentKey=this.virtualizer.collection.getItem(e.key)?.parentKey??null,t}};var Le=class extends x{column=0;index=0;copy(){let e=super.copy();return e.column=this.column,e.index=this.index,e}},K={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},ne=class extends F{contentSize=new m;layoutInfos=new Map;numColumns=0;dropIndicatorThickness=2;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||!(e.minItemSize||K.minItemSize).equals(t.minItemSize||K.minItemSize)||!(e.maxItemSize||K.maxItemSize).equals(t.maxItemSize||K.maxItemSize)||!(e.minSpace||K.minSpace).equals(t.minSpace||K.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight}update(e){let{minItemSize:t=K.minItemSize,maxItemSize:i=K.maxItemSize,minSpace:o=K.minSpace,maxHorizontalSpace:r=K.maxSpace,maxColumns:l=K.maxColumns,dropIndicatorThickness:n=K.dropIndicatorThickness,loaderHeight:a=K.loaderHeight}=e.layoutOptions||{};this.dropIndicatorThickness=n;let s=this.virtualizer.size.width,u=Math.min(i.width,s),c=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*u),d=Math.floor(s/(t.width+o.width)),f=Math.max(1,Math.min(l,d)),g=s-o.width*Math.max(0,f),p=Math.floor(g/f);p=Math.max(t.width,Math.min(u,p));let L=(p-t.width)/Math.max(1,u-t.width),v=t.height+Math.floor((c-t.height)*L);v=Math.max(t.height,Math.min(c,v));let N=Math.min(Math.max(r,o.width),Math.floor((s-f*p)/(f+1)));this.margin=Math.floor((s-f*p-N*(f+1))/2);let T=Array(f).fill(o.height),O=new Map,k=0,j=(I,S)=>{let b=this.layoutInfos.get(I),R=v,P=true;b&&(R=b.rect.height/b.rect.width*p,P=e.sizeChanged||b.estimatedSize||b.content!==S);let E=(f===this.numColumns&&b&&b.index===k&&b.rect.y<this.virtualizer.visibleRect.maxY?b.column:void 0)??T.reduce((he,ue,te)=>ue<T[he]?te:he,0),A=N+E*(p+N)+this.margin,_=T[E],D=new y(A,_,p,R),H=new Le(S.type,I,D);H.estimatedSize=P,H.allowOverflow=true,H.content=S,H.column=E,H.index=k++,O.set(I,H),T[E]+=H.rect.height+o.height;},M=this.virtualizer.collection,q=0;for(let I of M)if(I.type==="skeleton"){let S=[...T];for(;!T.every((b,R)=>b!==S[R])||Math.min(...T)<this.virtualizer.size.height;){let b=`${I.key}-${q++}`,R=this.layoutInfos.get(b)?.content||{...I};j(b,R);}break}else I.type!=="loader"&&j(I.key,I);let z=M?.size===0&&M.getItem(M.getFirstKey())?.type!=="skeleton"?0:Math.max(...T),w=M.getItem(M.getLastKey());if(w?.type==="loader"){(q>0||!w.props.isLoading)&&(a=0);let I=s-N*2,S=new y(N,z,I,a),b=new x("loader",w.key,S);O.set(w.key,b),z=b.rect.maxY;}this.contentSize=new m(this.virtualizer.size.width,z),this.layoutInfos=O,this.numColumns=f;}getLayoutInfo(e){return this.layoutInfos.get(e)}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getKeyRightOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(t.rect.maxX,t.rect.y,this.virtualizer.visibleRect.maxX-t.rect.maxX,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=n.rect.x-i.x,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyLeftOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(0,t.rect.y,t.rect.x,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=i.maxX-n.rect.maxX,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyRange(e,t){let i=this.getLayoutInfo(e),o=this.getLayoutInfo(t);if(!i||!o)return [];let r=i.rect.union(o.rect),l=[];for(let n of this.layoutInfos.values())r.intersection(n.rect).area>n.rect.area/2&&l.push(n.key);return l}getDropTargetFromPoint(e,t){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let i=this.virtualizer.keyAtPoint(new C(e,t));return i==null?{type:"root"}:{type:"item",key:i,dropPosition:"on"}}};var Re=new WeakMap;function Ue(h=false,e=document){if(!Re.has(e)||h){let t=e.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";let o=e.createElement("div"),r=o.style;r.width="100px",r.height="100px",t.appendChild(o),e.body.appendChild(t);let l;t.scrollLeft>0?l="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?l="negative":l="positive-ascending"),e.body.removeChild(t),Re.set(e,l);}return Re.get(e)}function ae(h,e){let{scrollLeft:t}=h;if(e==="rtl"){let{scrollWidth:i,clientWidth:o}=h;switch(Ue(false,a$3(h))){case "negative":t=-t;break;case "positive-descending":t=i-o-t;break}}return t}function zt(h,e){e=a(e);let{scrollViewProps:t,contentProps:i}=Ie(h,e);return jsx("div",{role:"presentation",...t,ref:e,children:jsx("div",{...i,children:h.children})})}yt.forwardRef(zt);function Ie(h$1,e$2){let{contentSize:t,onVisibleRectChange:i,onSizeChange:o,innerStyle:r,onScrollStart:l$1,onScrollEnd:n,scrollDirection:a="both",onScroll:s,allowsWindowScrolling:u$1,...c}=h$1,d=useRef({scrollPosition:new C,size:new m,viewportOffset:new C,viewportSize:new m,scrollEndTime:0,scrollTimeout:null,isScrolling:false,lastVisibleRect:new y}).current,{direction:f}=b(),g=useCallback(()=>{let z=u$1?new y(d.viewportOffset.x+d.scrollPosition.x,d.viewportOffset.y+d.scrollPosition.y,Math.max(0,Math.min(d.size.width-d.viewportOffset.x,d.viewportSize.width)),Math.max(0,Math.min(d.size.height-d.viewportOffset.y,d.viewportSize.height))):new y(d.scrollPosition.x,d.scrollPosition.y,d.size.width,d.size.height);(z.area>0||d.lastVisibleRect.area>0)&&(i(z),d.lastVisibleRect=z);},[d,u$1,i]),[p,L]=useState(false),v=useCallback(z=>{let w=j(z);if(!h(w,e$2.current))return;if(s&&w===e$2.current&&s(z),w!==e$2.current){let S=e$2.current.getBoundingClientRect(),b=S.x<0?-S.x:0,R=S.y<0?-S.y:0;if(b===d.viewportOffset.x&&R===d.viewportOffset.y)return;d.viewportOffset=new C(b,R);}else {let S=w.scrollTop,b=ae(w,f);d.scrollPosition=new C(Math.max(0,Math.min(b,t.width-d.size.width)),Math.max(0,Math.min(S,t.height-d.size.height)));}let I=b$1(z.currentTarget);flushSync(()=>{g(),d.isScrolling||(d.isScrolling=true,L(true),I.dispatchEvent(new I.Event("tk.disconnect-observer")),l$1&&l$1());let S=Date.now();d.scrollEndTime<=S+50&&(d.scrollEndTime=S+300,d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.scrollTimeout=setTimeout(()=>{d.isScrolling=false,L(false),d.scrollTimeout=null,I.dispatchEvent(new I.Event("tk.connect-observer")),n&&n();},300));});},[s,e$2,f,d,t,g,l$1,n]);a$1(e$2,"scroll",v),useEffect(()=>{let z=e$2.current;if(z)return e(l(z),"scroll",w=>{j(w)!==z&&v(w);},true)},[e$2,v]),useEffect(()=>()=>{if(d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.isScrolling){let z=b$1(e$2.current);z.dispatchEvent(new z.Event("tk.connect-observer"));}},[]);let N=useRef(false),T=useCallback(z=>{let w=e$2.current;if(!w||N.current)return;N.current=true;let I=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,S=b$1(w),b=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientWidth"),R=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientHeight"),P=w.clientWidth,G=w.clientHeight,E=I&&!b?1/0:P,A=I&&!R?1/0:G,_=S.innerWidth,D=S.innerHeight,H=d.viewportSize.width!==_||d.viewportSize.height!==D;H&&(d.viewportSize=new m(_,D)),(d.size.width!==E||d.size.height!==A||H)&&(d.size=new m(E,A),z(()=>{g(),o?.(d.size);}),(!I&&P!==w.clientWidth||G!==w.clientHeight)&&(d.size=new m(w.clientWidth,w.clientHeight),z(()=>{g(),o?.(d.size);}))),N.current=false;},[e$2,d,g,o]),O=u(T);useEffect(()=>{let z=b$1(e$2.current);d.viewportSize=new m(z.innerWidth,z.innerHeight);let w=()=>{O(flushSync);};return z.addEventListener("resize",w),()=>z.removeEventListener("resize",w)},[d,e$2]);let k=useRef(null),[j$1,M]=useState({});a$2(()=>{if(!N.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){M({}),k.current=t;return}else queueMicrotask(()=>O(flushSync));k.current=t;}),a$2(()=>{O(z=>z());},[j$1]);let q=useCallback(()=>{T(flushSync);},[T]);e$1({ref:e$2,box:"border-box",onResize:q});let X={padding:0,...c.style};return a==="horizontal"?(X.overflowX="auto",X.overflowY="hidden"):a==="vertical"||t.width===d.size.width?(X.overflowY="auto",X.overflowX="hidden"):X.overflow="auto",r={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:p?"none":"auto",position:"relative",...r},{isScrolling:p,scrollViewProps:{...c,style:X},contentProps:{role:"presentation",style:r}}}function Ze(h){let{layoutInfo:e,virtualizer:t,ref:i,shouldObserveItemSize:o}=h,r=e?.key,l=useCallback(()=>{if(r!=null&&i.current){if(!b$4(i.current))return;let a=St(i.current);t.updateItemSize(r,a);}},[t,r,i]),n=u(l);return a$2(()=>{e?.estimatedSize&&n();}),useEffect(()=>{if(!o)return;let a=i.current;if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(u=>{u.length&&n();});for(let u of a.children)s.observe(u);return ()=>{s.disconnect();}},[o,i,r]),{updateSize:l}}function St(h){let e=h.style.height;h.style.height="";let t=new m(h.scrollWidth,h.scrollHeight);return h.style.height=e,t}function be(h){let{style:e,className:t,layoutInfo:i,virtualizer:o,parent:r,children:l,shouldObserveItemSize:n}=h,{direction:a}=b(),s=useRef(null);return Ze({layoutInfo:i,virtualizer:o,ref:s,shouldObserveItemSize:n}),jsx("div",{role:"presentation",ref:s,className:t,style:{...et(i,a,r),...e},children:l})}var Qe=new WeakMap;function et(h,e,t){let i=e==="rtl"?"right":"left",o=Qe.get(h);if(o&&o[i]!=null){if(!t)return o;let n=h.rect.y-t.rect.y,a=h.rect.x-t.rect.x;if(o.top===n&&o[i]===a)return o}let r={top:h.rect.y-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.y:0),[i]:h.rect.x-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.x:0),width:h.rect.width,height:h.rect.height};Object.entries(r).forEach(([n,a])=>{Number.isFinite(a)||(r[n]=void 0);});let l={position:h.isSticky?"sticky":"absolute",display:h.isSticky?"inline-block":void 0,overflow:h.allowOverflow?"visible":"hidden",opacity:h.opacity,zIndex:h.zIndex,transform:h.transform??void 0,contain:"size layout style",...r};return Qe.set(h,l),l}var ot=createContext(null),Ne=createContext(null);function rt(h){let{children:e,layout:t,layoutOptions:i,shouldObserveItemSize:o}=h,r=useMemo(()=>typeof t=="function"?new t:t,[t]),l=useRef(null),{direction:n}=b(),a=useMemo(()=>({isVirtualized:true,layoutDelegate:r,dropTargetDelegate:r.getDropTargetFromPoint?{getDropTargetFromPoint(s,u,c){let d=l.current?.current;if(d&&r.virtualizer){let{visibleRect:f}=r.virtualizer;s-=f.x-ae(d,n),u-=f.y-d.scrollTop;}return r.getDropTargetFromPoint(s,u,c)}}:void 0,CollectionRoot:Tt,CollectionBranch:Ct}),[r,n]);return jsx(p.Provider,{value:a,children:jsx(Ne.Provider,{value:{layout:r,layoutOptions:i,shouldObserveItemSize:o,scrollRefHolder:l},children:e})})}function Tt({collection:h,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){let{layout:o,layoutOptions:r,shouldObserveItemSize:l,scrollRefHolder:n}=useContext(Ne);a$2(()=>{n.current=t??null;},[n,t]);let a=o.useLayoutOptions?.(),s=xe({allowsWindowScrolling:true,layout:o,collection:h,renderView:(c,d)=>d?.render?.(d),onVisibleRectChange(c){let d=t?.current;d&&(d.scrollLeft=c.x,d.scrollTop=c.y);},persistedKeys:e,layoutOptions:useMemo(()=>r&&a?{...r,...a}:r||a,[r,a])}),{contentProps:u}=Ie({onVisibleRectChange:s.setVisibleRect,onSizeChange:s.setSize,contentSize:s.contentSize,onScrollStart:s.startScrolling,onScrollEnd:s.endScrolling,allowsWindowScrolling:true},t);return jsx("div",{...u,children:jsx(ot.Provider,{value:s,children:lt(null,s.visibleViews,i,l)})})}function Ct({parent:h,renderDropIndicator:e}){let i=useContext(ot).virtualizer.getVisibleView(h.key),{shouldObserveItemSize:o}=useContext(Ne);return lt(i,Array.from(i.children),e,o)}function lt(h,e,t,i){return e.map(o=>kt(h,o,t,i))}function kt(h,e,t,i){let o$1=jsx(be,{layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:h?.layoutInfo,shouldObserveItemSize:i,children:e.rendered},e.key),{collection:r,layout:l}=e.virtualizer,n=e.content;return n?.type==="item"&&t&&l.getDropTargetLayoutInfo&&(o$1=jsxs(yt.Fragment,{children:[tt(h,e,{type:"item",key:e.content.key,dropPosition:"before"},t),o$1,o(r,n,a=>tt(h,e,a,t))]},e.key)),o$1}function tt(h,e,t,i){let o=i(t);if(o){let r=e.virtualizer.layout.getDropTargetLayoutInfo(t);o=jsx(be,{layoutInfo:r,virtualizer:e.virtualizer,parent:h?.layoutInfo,children:o});}return o}var Q=class extends re{useLayoutOptions(){let{direction:e}=b();return useMemo(()=>({direction:e}),[e])}};var ee=class extends le{useLayoutOptions(){let e=useContext(b$3);return useMemo(()=>({columnWidths:e?.columnWidths}),[e?.columnWidths])}};var se=class extends Q{useLayoutOptions(){let{direction:e}=b();return {direction:e}}};var Rr={LIST_BOX:{layout:Y,layoutOptions:{rowHeight:36}},TREE_VIEW:{layout:Y,layoutOptions:{rowHeight:44}},IMAGE_GALLERY:{layout:se,layoutOptions:{minItemSize:new m(114,167),maxItemSize:new m(114,167),dropIndicatorThickness:2,maxHorizontalSpace:0,minSpace:new m(4,16),preserveAspectRatio:true}},TABLE:{layout:ee,layoutOptions:{rowHeight:48,headingHeight:48}}};export{m as a,Y as b,ne as c,rt as d,Q as e,ee as f,se as g,Rr as h};
@@ -0,0 +1,10 @@
1
+ import {c,b}from'./chunk-DZDZZRWE.mjs';import {a}from'./chunk-JJG67M2S.mjs';import m,{useEffect,useCallback}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
+ function C(t,i){let{playingLabel:a$1,pausedLabel:r}=i??{},{formatMessage:n,locale:o}=b(),[T,f]=m.useState(false),[D,l]=m.useState(0),[c,v]=m.useState(0),[E,P]=m.useState(false);useEffect(()=>{if(!t.current)return;let e=t.current,s=()=>{f(false),l(0);},L=()=>{!E&&!Number.isNaN(e.duration)&&l(e.currentTime*100/e.duration);},p=()=>{v(e.duration);},u=()=>{f(!e.paused);},M=()=>{u(),l(0),v(0);};return e.readyState>=1&&p(),e.addEventListener("playing",u),e.addEventListener("pause",u),e.addEventListener("emptied",M),e.addEventListener("ended",s),e.addEventListener("timeupdate",L),e.addEventListener("loadedmetadata",p),()=>{e.removeEventListener("playing",u),e.removeEventListener("pause",u),e.removeEventListener("emptied",M),e.removeEventListener("ended",s),e.removeEventListener("timeupdate",L),e.removeEventListener("loadedmetadata",p);}},[E,t]);let I=useCallback(()=>{let e=t.current;e&&(e.paused?e.play().then(()=>{a(a$1??n(S.playing),"polite");},s=>{if(s?.name!=="AbortError")throw s}):(e.pause(),a(r??n(S.paused),"polite")));},[n,r,a$1,t]),A=useCallback(e=>{t.current&&Number.isFinite(t.current.duration)&&(t.current.currentTime=e*t.current.duration/100,a(F(t.current.currentTime,o.locale),"assertive"));},[o.locale,t]);return {isPlaying:T,progress:D,duration:c,togglePlay:I,seek:A,setProgress:l,formattedCurrentTime:t.current?.currentTime?g(t.current?.currentTime):"00:00",formattedDuration:Number.isFinite(c)&&c>0?g(c):"00:00",setIsSliderDragging:P}}var S=c({playing:{id:"bui.useMedia.playing",defaultMessage:"Playing"},paused:{id:"bui.useMedia.paused",defaultMessage:"Paused"}});function F(t,i){if(!("DurationFormat"in Intl))return g(t);let a=Math.floor(t/3600),r=Math.floor(t%3600/60),n=t%60,o={...a&&{hours:a},...r&&{minutes:r},seconds:Math.floor(n)};return new Intl.DurationFormat(i,{style:"long"}).format(o)}function g(t){let i=Math.floor(t/3600),a=Math.floor(t%3600/60),r=Math.floor(t%60),n=[a,r].map(o=>o.toString().padStart(2,"0")).join(":");return i?`${i}:${n}`:n}export{C as a,F as b};
@@ -0,0 +1,10 @@
1
+ import {a as a$1,c}from'./chunk-C4WHTPLY.mjs';import {d as d$2}from'./chunk-GMALMQWI.mjs';import {a as a$5}from'./chunk-5FK5AJ7A.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,h as h$1}from'./chunk-J4OPD7OL.mjs';import {e,f}from'./chunk-GQIS4QBN.mjs';import {a}from'./chunk-AI6WQPRX.mjs';import {j,i as i$1,c as c$1}from'./chunk-KUDCYGII.mjs';import {d as d$1}from'./chunk-F7WPMQ3P.mjs';import {o,p,d as d$3,a as a$6,e as e$1,i as i$2}from'./chunk-PPHSLODC.mjs';import {c as c$2,a as a$4}from'./chunk-3WKDIXCM.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {i,b as b$2,a as a$3,j as j$1,h}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect}from'react';import {flushSync}from'react-dom';/**
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
+ function Y(u){return i$2()?u.altKey:u.ctrlKey}function le(u,e){let r=`[data-key="${CSS.escape(String(e))}"]`,l=u.current?.dataset.collection;return l&&(r=`[data-collection="${CSS.escape(l)}"]${r}`),u.current?.querySelector(r)}var Ce=new WeakMap;function Ie(u){let e=c$3();return Ce.set(u,e),e}function ke(u){return Ce.get(u)}var xe=1e3;function Re(u){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:l}=u,i=useRef({search:"",timeout:void 0}),T=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let a=e.getKeyForSearch(i.current.search,r.focusedKey);a==null&&(a=e.getKeyForSearch(i.current.search)),a!=null&&(r.setFocusedKey(a),l&&l(a));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}},b=c=>{let a=We(c.key);if(!(!a||c.ctrlKey||c.metaKey||c.altKey||!h(c.currentTarget,j$1(c))||i.current.search.length===0&&a===" ")){if(i.current.search+=a,e.getKeyForSearch!=null){let y=e.getKeyForSearch(i.current.search,r.focusedKey);if(y==null&&(y=e.getKeyForSearch(i.current.search)),y!=null)r.setFocusedKey(y),l&&l(y),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?T:void 0,onKeyDown:e.getKeyForSearch?b:void 0}}}function We(u){return u.length===1||!/^[A-Z]/i.test(u)?u:""}function Pt(u){let{selectionManager:e$2,keyboardDelegate:r,ref:l,autoFocus:i$2=false,shouldFocusWrap:T=false,disallowEmptySelection:b$3=false,disallowSelectAll:c$3=false,escapeKeyBehavior:a$4="clearSelection",selectOnFocus:y=e$2.selectionBehavior==="replace",disallowTypeAhead:ie=false,shouldUseVirtualFocus:g,allowsTabNavigation:V=false,scrollRef:f$1=l,linkBehavior:v="action",UNSTABLE_focusOnEntry:H}=u,{direction:C}=b(),Z=o(),d$1=(n,o,m)=>{if(o!=null){if(e$2.isLink(o)&&v==="selection"&&y&&!Y(n)){flushSync(()=>{e$2.setFocusedKey(o,m);});let p=le(l,o),E=e$2.getItemProps(o);if(p){Z.open(p,n,E.href,E.routerOptions);return}return false}if(e$2.setFocusedKey(o,m),e$2.isLink(o)&&v==="override")return false;if(n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y&&!Y(n)){e$2.replaceSelection(o);return}}return false},_=n=>{if(r.getKeyBelow){let o=e$2.focusedKey!=null?r.getKeyBelow?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},F=n=>{if(r.getKeyAbove){let o=e$2.focusedKey!=null?r.getKeyAbove?.(e$2.focusedKey):r.getLastKey?.();if(o==null&&T&&(o=r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},W=n=>{if(r.getFirstKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getFirstKey(e$2.focusedKey,h$1(n));if(e$2.setFocusedKey(o),o!=null){if(h$1(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},A=n=>{if(r.getKeyLeftOf){let o=e$2.focusedKey!=null?r.getKeyLeftOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getFirstKey?.(e$2.focusedKey):r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"first":"last");return}}return false},I=n=>{if(r.getKeyRightOf){let o=e$2.focusedKey!=null?r.getKeyRightOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getLastKey?.(e$2.focusedKey):r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"last":"first");return}}return false},k=n=>{if(r.getLastKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getLastKey(e$2.focusedKey,h$1(n));if(e$2.setFocusedKey(o),o!=null){if(h$1(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},z=n=>{if(r.getKeyPageBelow&&e$2.focusedKey!=null){let o=r.getKeyPageBelow(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},J=n=>{if(r.getKeyPageAbove&&e$2.focusedKey!=null){let o=r.getKeyPageAbove(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},w=()=>{if(e$2.selectionMode==="multiple"&&c$3!==true){e$2.selectAll();return}return false},x=()=>{if(a$4==="clearSelection"&&!b$3&&e$2.selectedKeys.size!==0){e$2.clearSelection();return}return false},K=()=>{if(!V&&l.current){let n=d$2(l.current,{tabbable:true}),o,m;do m=n.lastChild(),m&&(o=m);while(m);let p=a$3(l.current),E=i(p);o&&(!h(o,E)||E&&!d$3(E))&&a$6(o);}return {shouldContinuePropagation:true,shouldPreventDefault:false}},Q=()=>(!V&&l.current&&l.current.focus(),{shouldContinuePropagation:true,shouldPreventDefault:false}),P=(n,o)=>({[e$1()?n+"+Shift+Alt":n+"+Shift+Control"]:o,[n+"+Shift"]:o,[e$1()?n+"+Alt":n+"+Control"]:o,[n]:o}),{keyboardProps:se}=j({shortcuts:{...P("ArrowDown",_),...P("ArrowUp",F),...P("ArrowLeft",A),...P("ArrowRight",I),...P("PageDown",z),...P("PageUp",J)},allowRepeats:true}),{keyboardProps:ue}=j({shortcuts:{...P("Home",W),...P("End",k),"Mod+A":w,Escape:x,Tab:K,"Tab+Shift":Q}}),j$2=useRef({top:0,left:0});a(f$1,"scroll",()=>{j$2.current={top:f$1.current?.scrollTop??0,left:f$1.current?.scrollLeft??0};});let ce=n=>{if(e$2.isFocused){h(n.currentTarget,j$1(n))||e$2.setFocused(false);return}if(!h(n.currentTarget,j$1(n)))return;let o=c$1();e$2.setFocused(true);let m=p=>{p!=null&&(e$2.setFocusedKey(p),y&&!e$2.isSelected(p)&&e$2.replaceSelection(p));};if(H&&(o==="keyboard"||o==="virtual"))m(H==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e$2.focusedKey==null){let p=n.relatedTarget;p&&n.currentTarget.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING?m(e$2.lastSelectedKey??r.getLastKey?.()):m(e$2.firstSelectedKey??r.getFirstKey?.());}else f$1.current&&(f$1.current.scrollTop=j$2.current.top,f$1.current.scrollLeft=j$2.current.left);if(e$2.focusedKey!=null&&f$1.current){let p=le(l,e$2.focusedKey),E=b$2(p);p instanceof E.HTMLElement&&(!h(p,i(E.document))&&!g&&a$6(p),(o==="keyboard"||H&&o==="virtual")&&f(p,{containingElement:l.current}));}},ae=n=>{h(n.currentTarget,n.relatedTarget)||e$2.setFocused(false);},S=useRef(false);a(l,b$1,g?n=>{let{detail:o}=n;n.stopPropagation(),e$2.setFocused(true),o?.focusStrategy==="first"&&(S.current=true);}:void 0);let R=r.getFirstKey?.()??null;d(()=>{if(S.current)if(R==null){let n=i();a$1(l.current),c(n,null),e$2.collection.size>0&&(S.current=false);}else e$2.setFocusedKey(R),S.current=false;},[R,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(S.current=false);},[e$2.focusedKey]),a(l,a$2,g?n=>{n.stopPropagation(),e$2.setFocused(false),n.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let X=useRef(i$2),B=useRef(false);useEffect(()=>{if(X.current){let n=null;i$2==="first"&&(n=r.getFirstKey?.()??null),i$2==="last"&&(n=r.getLastKey?.()??null);let o=e$2.selectedKeys;if(o.size){for(let m of o)if(e$2.canSelectItem(m)){n=m;break}}e$2.setFocused(true),e$2.setFocusedKey(n),n!=null&&y&&!o.size&&e$2.canSelectItem(n)&&e$2.replaceSelection(n),n==null&&!g&&l.current&&i$1(l.current),e$2.collection.size>0&&(X.current=false,B.current=true);}});let t=useRef(e$2.focusedKey),s=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==t.current||B.current)&&f$1.current&&l.current){let n=c$1(),o=le(l,e$2.focusedKey),m=b$2(o);if(!(o instanceof m.HTMLElement))return;(n==="keyboard"||B.current)&&(s.current&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{f$1.current&&(e(f$1.current,o),n!=="virtual"&&f(o,{containingElement:l.current}));}));}!g&&e$2.isFocused&&e$2.focusedKey==null&&t.current!=null&&l.current&&i$1(l.current),t.current=e$2.focusedKey,B.current=false;}),useEffect(()=>()=>{s.current&&cancelAnimationFrame(s.current);},[]),a(l,"react-aria-focus-scope-restore",n=>{n.preventDefault(),e$2.setFocused(true);});let M={...c$2(ue,se),onFocus:ce,onBlur:ae,onMouseDown(n){f$1.current===j$1(n)&&n.preventDefault();}},{typeSelectProps:$}=Re({keyboardDelegate:r,selectionManager:e$2});ie||(M=c$2($,M));let he;g||(he=e$2.focusedKey==null?0:-1);let Ve=Ie(e$2.collection);return {collectionProps:c$2(M,{tabIndex:he,"data-collection":Ve})}}function Ut(u){let{id:e,selectionManager:r,key:l,ref:i$2,shouldSelectOnPressUp:T,shouldUseVirtualFocus:b,focus:c,isDisabled:a,onAction:y,allowsDifferentPressOrigin:ie,linkBehavior:g="action"}=u,V=o();e=c$3(e);let f=t=>{if(t.pointerType==="keyboard"&&Y(t))r.toggleSelection(l);else {if(r.selectionMode==="none")return;if(r.isLink(l)){if(g==="selection"&&i$2.current){let s=r.getItemProps(l);V.open(i$2.current,t,s.href,s.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(g==="override"||g==="none")return}r.selectionMode==="single"?r.isSelected(l)&&!r.disallowEmptySelection?r.toggleSelection(l):r.replaceSelection(l):t&&t.shiftKey?r.extendSelection(l):r.selectionBehavior==="toggle"||t&&(h$1(t)||t.pointerType==="touch"||t.pointerType==="virtual")?r.toggleSelection(l):r.replaceSelection(l);}};useEffect(()=>{l===r.focusedKey&&r.isFocused&&(b?a$1(i$2.current):c?c():i(a$3(i$2.current))!==i$2.current&&i$2.current&&i$1(i$2.current));},[i$2,l,r.focusedKey,r.childFocusStrategy,r.isFocused,b]),a=a||r.isDisabled(l);let v={};!b&&!a?v={tabIndex:l===r.focusedKey?0:-1,onFocus(t){j$1(t)===i$2.current&&r.setFocusedKey(l);}}:a&&(v.onMouseDown=t=>{t.preventDefault();}),useEffect(()=>{a&&r.focusedKey===l&&r.setFocusedKey(null);},[r,a,l]);let H=r.isLink(l)&&g==="override",C=y&&u.UNSTABLE_itemBehavior==="action",Z=r.isLink(l)&&g!=="selection"&&g!=="none",d=!a&&r.canSelectItem(l)&&!H&&!C,_=(y||Z)&&!a,F=_&&(r.selectionBehavior==="replace"?!d:!d||r.isEmpty),W=_&&d&&r.selectionBehavior==="replace",A=F||W,I=useRef(null),k=A&&d,z=useRef(false),J=useRef(false),w=r.getItemProps(l),x=t=>{y&&(y(),i$2.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),Z&&i$2.current&&V.open(i$2.current,t,w.href,w.routerOptions);},K={ref:i$2};T?(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,t.pointerType==="keyboard"&&(!A||Ne(t.key))&&f(t);},ie?(K.onPressUp=F?void 0:t=>{t.pointerType==="mouse"&&d&&f(t);},K.onPress=F?x:t=>{t.pointerType!=="keyboard"&&t.pointerType!=="mouse"&&d&&f(t);}):K.onPress=t=>{if(F||W&&t.pointerType!=="mouse"){if(t.pointerType==="keyboard"&&!Ue(t.key))return;x(t);}else t.pointerType!=="keyboard"&&d&&f(t);}):(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,J.current=F,d&&(t.pointerType==="mouse"&&!F||t.pointerType==="keyboard"&&(!_||Ne(t.key)))&&f(t);},K.onPress=t=>{(t.pointerType==="touch"||t.pointerType==="pen"||t.pointerType==="virtual"||t.pointerType==="keyboard"&&A&&Ue(t.key)||t.pointerType==="mouse"&&J.current)&&(A?x(t):d&&f(t));});let Q=ke(r.collection);if(v["data-collection"]=Q,v["data-key"]=l,K.preventFocusOnPress=b,b&&(K=c$2(K,{onPressStart(t){t.pointerType!=="touch"&&(r.setFocused(true),r.setFocusedKey(l));},onPress(t){t.pointerType==="touch"&&(r.setFocused(true),r.setFocusedKey(l));}})),w)for(let t of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])w[t]&&(K[t]=a$4(K[t],w[t]));let{pressProps:P,isPressed:se}=d$1(K),ue=W?t=>{I.current==="mouse"&&(t.stopPropagation(),t.preventDefault(),x(t));}:void 0,{longPressProps:j}=a$5({isDisabled:!k,onLongPress(t){t.pointerType==="touch"&&(f(t),r.setSelectionBehavior("toggle"));}}),ce=t=>{if(I.current!=="touch"||!z.current)return;let s=j$1(t),$=(s.nodeType===Node.ELEMENT_NODE?s:s.parentElement)?.closest('[draggable="true"]');($==null||$===t.currentTarget||!t.currentTarget.contains($))&&t.preventDefault();},ae=g!=="none"&&r.isLink(l)?t=>{p.isOpening||t.preventDefault();}:void 0,S=c$2(v,d||F||b&&!a?P:{},k?j:{},{onDoubleClick:ue,onDragStartCapture:ce,onClick:ae,id:e},b?{onMouseDown:t=>t.preventDefault()}:void 0),R=t=>{let s=t;for(;s&&s!==i$2.current;){let M=s.getAttribute("data-collection");if(M!=null)return M!==Q;s=s.parentElement;}return d$3(t)},X=S.onPointerDown;S.onPointerDown=t=>{let s=j$1(t);if(s&&s!==i$2.current&&R(s)){t.stopPropagation();return}X?.(t);};let B=S.onMouseDown;return S.onMouseDown=t=>{let s=j$1(t);if(s&&s!==i$2.current&&R(s)){t.stopPropagation();return}B?.(t);},{itemProps:S,isPressed:se,isSelected:r.isSelected(l),isFocused:r.isFocused&&r.focusedKey===l,isDisabled:a,allowsSelection:d,hasAction:A}}function Ue(u){return u==="Enter"}function Ne(u){return u===" "}export{le as a,Re as b,Pt as c,Ut as d};
@@ -0,0 +1,10 @@
1
+ import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import v 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 p=v.forwardRef(({className:t,style:a$2,children:s,"data-block-id":d,"data-block-class":l,role:m="group",isDisabled:o,...u},f)=>{let{hoverProps:i,isHovered:c}=a({isDisabled:o});return jsx("div",{...i,role:m,...a$1({"data-hovered":c,"data-disabled":o}),"data-block-id":d,"data-block-class":l,className:t,style:a$2,...u,ref:f,children:s})});p.displayName="Group";export{p as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-ETM4MNG4.mjs';import {b as b$1,a as a$1,d,j}from'./chunk-SD43KVTU.mjs';import Z,{createContext,useContext,useRef,useCallback}from'react';import'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
+ function b(e){if(typeof window>"u"||window.navigator==null)return false;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function g(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):false}function l(e){if(process.env.NODE_ENV==="test")return e;let t=null;return ()=>(t==null&&(t=e()),t)}var E=l(function(){return g(/^Mac/i)}),N=l(function(){return g(/^iPhone/i)}),v=l(function(){return g(/^iPad/i)||E()&&navigator.maxTouchPoints>1}),S=l(function(){return N()||v()}),ne=l(function(){return E()||S()}),w=l(function(){return b(/AppleWebKit/i)&&(S()||!k())});l(function(){return w()&&!k()&&!V()});var k=l(function(){return b(/Chrome|CriOS|CrMo/i)}),m=l(function(){return b(/Android/i)}),V=l(function(){return b(/(Firefox|FxiOS)/i)});function L(e){e.focus({preventScroll:true});}var K=typeof Element<"u"&&"checkVisibility"in Element.prototype;function B(e){let t=b$1(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return false;let{display:n,visibility:i}=e.style,r=n!=="none"&&i!=="hidden"&&i!=="collapse";if(r){let{getComputedStyle:s}=b$1(e),{display:o,visibility:a}=s(e);r=o!=="none"&&a!=="hidden"&&a!=="collapse";}return r}function W(e,t){return !e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):true)}function h(e,t){return K?e.checkVisibility({visibilityProperty:true})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&B(e)&&W(e,t)&&(!e.parentElement||h(e.parentElement,e))}var M=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],F=M.join(':not([hidden]):not([data-bui-avoid-focus="true"]),')+',[tabindex]:not([disabled]):not([hidden]):not([data-bui-avoid-focus="true"])';M.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var I=M.join(':not([hidden]):not([tabindex="-1"]),');function fe(e,t){return e.matches(F)&&!x(e)&&(t?.skipVisibilityCheck||h(e))}function de(e){return e.matches(I)&&h(e)&&!x(e)}function x(e){let t=e;for(;t!=null;){if(t instanceof b$1(t).HTMLElement&&t.inert)return true;t=t.parentElement;}return false}function be(e){return e.pointerType===""&&e.isTrusted?true:m()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ee(e){return !m()&&e.width===0&&e.height===0||m()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var z=createContext({isNative:true,open:G,useHref:e=>e});function R(){return useContext(z)}function Q(e,t){let n=e.getAttribute("target");return (!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function y(e,t,n=true){let{metaKey:i,ctrlKey:r,altKey:s,shiftKey:o}=t,a=w()&&E()&&!v()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:r,altKey:s,shiftKey:o}):new MouseEvent("click",{metaKey:i,ctrlKey:r,altKey:s,shiftKey:o,detail:1,bubbles:true,cancelable:true});y.isOpening=n,L(e),e.dispatchEvent(a),y.isOpening=false;}y.isOpening=false;function U(e,t){if(e instanceof b$1(e).HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=a$1(e).createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n);}}function G(e,t){U(e,n=>y(n,t));}function Le(e){let n=R().useHref(e.href??"");return {"data-href":e.href?n:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function xe(e){let n=R().useHref(e?.href??""),i={};if(e)for(let r of ["href","target","rel","download","ping","referrerPolicy"])r in e&&e[r]!==void 0&&(i[r]=r==="href"?n:e[r]);return i}function Re(e,t,n,i){let r=b$1(e.currentTarget);!t.isNative&&e.currentTarget instanceof r.HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&Q(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,i));}var O=new WeakMap,C=new WeakSet;function P(e){return "propertyName"in e}function J(){let e=new Map,t=new Set,n=o=>{let a=j(o);if(!P(o)||!a)return;let u=e.get(a);u&&(u.delete(o.propertyName),u.size===0&&(a.removeEventListener("transitioncancel",n),e.delete(a)),e.size===0&&D(s));},i=(o,a)=>{let u=e.get(o);u||(u=new Set,e.set(o,u),o.addEventListener("transitioncancel",n,{once:true})),u.add(a);},s={transitionsByElement:e,transitionCallbacks:t,track:i,onTransitionStart:o=>{let a=j(o);!P(o)||!a||i(a,o.propertyName);},onTransitionEnd:n};return s}function H(e){let t=O.get(e);return t||(t=J(),O.set(e,t)),t}function X(e){let t=[],n=e?.getRootNode()??null;d(n)&&t.push(n);let i=a$1(e).body;return i&&t.push(i),t}function D(e){for(let t of e.transitionCallbacks)t(true);e.transitionCallbacks.clear();}function q(e,t){let n=d(e)?e:a$1(e),i=d(e)?e.getAnimations?.():a$1(e).getAnimations?.();for(let r of i??[]){if(r.playState==="finished"||!("transitionProperty"in r))continue;let s=r.effect?.target;s&&s.getRootNode()===n&&t.track(s,r.transitionProperty);}}function A(e){if(typeof window>"u")return;let t=X(e).filter(i=>!C.has(i));if(t.length===0)return;let n=H(a$1(e));for(let i of t)C.add(i),i.addEventListener("transitionrun",n.onTransitionStart),i.addEventListener("transitionend",n.onTransitionEnd),q(i,n);}typeof document<"u"&&(document.readyState!=="loading"?A():document.addEventListener("DOMContentLoaded",()=>A()));function Y(e){for(let[t]of e.transitionsByElement)"isConnected"in t&&(!t.isConnected||!t.ownerDocument?.defaultView)&&e.transitionsByElement.delete(t);e.transitionsByElement.size===0&&D(e);}function Ne(e,t){A(t);let n=H(a$1(t)),i=requestAnimationFrame(()=>{Y(n),n.transitionsByElement.size===0?e(false):n.transitionCallbacks.add(e);});return ()=>{cancelAnimationFrame(i),n.transitionCallbacks.delete(e);}}var te=Z.useInsertionEffect??a;function We(e){let t=useRef(null);return te(()=>{t.current=e;},[e]),useCallback((...n)=>{let i=t.current;return i?.(...n)},[])}function je(e,t){a(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null);}});}export{L as a,h as b,fe as c,de as d,E as e,N as f,v as g,S as h,ne as i,w as j,k,m as l,be as m,Ee as n,R as o,y as p,Le as q,xe as r,Re as s,Ne as t,We as u,je as v};
@@ -0,0 +1,11 @@
1
+ import {a as a$1}from'./chunk-2MS356Q7.mjs';import {f,d,b,h,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import A 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
+ function g({className:t}){return jsx("span",{className:t,"aria-hidden":"true","data-testid":"textinput-resize-grip",children:jsxs("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M4.72031 3.71962C5.01321 3.42683 5.488 3.42676 5.78086 3.71962C6.07352 4.01249 6.07358 4.48733 5.78086 4.78016L4.78086 5.78016C4.48803 6.07299 4.01322 6.07286 3.72031 5.78016C3.42742 5.48727 3.42742 5.01251 3.72031 4.71962L4.72031 3.71962Z",fill:"currentColor"}),jsx("path",{d:"M4.22031 0.219616C4.51321 -0.0731691 4.988 -0.0732413 5.28086 0.219616C5.57352 0.512488 5.57358 0.987325 5.28086 1.28016L1.27988 5.28016C0.986955 5.57268 0.512099 5.57293 0.219333 5.28016C-0.073139 4.98737 -0.0730827 4.51244 0.219333 4.21962L4.22031 0.219616Z",fill:"currentColor"})]})})}var F=A.forwardRef(({labelPosition:t="top",className:w,style:y,labelProps:z,isDisabled:r=false,isReadOnly:e=false,label:i,message:a$4,"data-block-id":k,"data-block-class":L,validationState:B="valid",isFocused:G=false,variant:H="primary",children:R,fieldProps:M,wrapperRef:T,wrapperClassName:Z,isInvalid:E,isMultiLine:s=false},V)=>{let{hoverProps:W,isHovered:b$1}=a({isDisabled:r}),n=E?"error":B,l=a$1({isReadOnly:e,validationState:n});return jsxs("div",{className:a$3(g$1({labelPosition:t}),w),"data-block-id":k,"data-block-class":L,style:y,ref:V,children:[i||t==="start"&&a$4?jsxs("div",{className:f({labelPosition:t,hasMessage:!!a$4}),children:[jsx(a$2,{...z,elementType:"label",color:"text.secondary",typography:"label.md.medium",children:i}),t==="start"&&a$4]}):null,jsxs("div",{className:a$3({[c$1]:r}),children:[jsxs("div",{...c(M,W),className:a$3(h({validationState:n,isHovered:b$1,isFocused:G,variant:H,isReadOnly:e,isDisabled:r,isMultiLine:s}),Z),ref:T,children:[R,l?jsx(l,{className:d({validationState:n,isReadOnly:e,isMultiLine:s}),size:16}):null,s&&!e&&!r?jsx(g,{className:b}):null]}),t==="top"&&a$4]})]})});F.displayName="SharedInput";
11
+ export{F as a};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-TKQOQVZD.mjs';import {a as a$2}from'./chunk-TAYP2OGC.mjs';import {a as a$4}from'./chunk-IVVZSESM.mjs';import {B as B$1}from'./chunk-OMT6ZWSV.mjs';import {b}from'./chunk-AYBACQ6U.mjs';import {a as a$6}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-WWSGOGLA.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UploadIcon}from'@baseline-ui/icons/20';import a$1 from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-AELTF2DE.mjs';import {a as a$2}from'./chunk-TAYP2OGC.mjs';import {a as a$4}from'./chunk-GL5GUKT7.mjs';import {B as B$1}from'./chunk-4MHBLLHV.mjs';import {b}from'./chunk-TUJLNJPJ.mjs';import {a as a$6}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-OQPYPKZV.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UploadIcon}from'@baseline-ui/icons/20';import a$1 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