@baseline-ui/core 3.10.0 → 3.11.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 (228) hide show
  1. package/dist/Accordion.css +1 -1
  2. package/dist/Accordion.mjs +1 -1
  3. package/dist/ActionButton.mjs +1 -1
  4. package/dist/ActionGroup.mjs +1 -1
  5. package/dist/ActionIconButton.mjs +1 -1
  6. package/dist/AlertDialog.css +1 -1
  7. package/dist/AlertDialog.mjs +1 -1
  8. package/dist/AudioPlayer.css +1 -1
  9. package/dist/AudioPlayer.mjs +1 -1
  10. package/dist/Avatar.css +1 -1
  11. package/dist/Avatar.mjs +1 -1
  12. package/dist/Breadcrumbs.mjs +1 -1
  13. package/dist/ButtonSelect.css +1 -1
  14. package/dist/ButtonSelect.mjs +1 -1
  15. package/dist/Calendar.css +1 -1
  16. package/dist/Calendar.mjs +1 -1
  17. package/dist/ColorInput.css +1 -1
  18. package/dist/ColorInput.mjs +1 -1
  19. package/dist/ColorSwatch.mjs +1 -1
  20. package/dist/ColorSwatchPicker.mjs +1 -1
  21. package/dist/ComboBox.css +1 -1
  22. package/dist/ComboBox.mjs +1 -1
  23. package/dist/DateField.css +1 -1
  24. package/dist/DateField.mjs +1 -1
  25. package/dist/Dialog.mjs +1 -1
  26. package/dist/Drawer.mjs +1 -1
  27. package/dist/Editor.css +1 -1
  28. package/dist/Editor.mjs +1 -1
  29. package/dist/FileInput.css +1 -1
  30. package/dist/FileInput.mjs +1 -1
  31. package/dist/FileList.mjs +1 -1
  32. package/dist/FileUploader.mjs +1 -1
  33. package/dist/FrameProvider.mjs +1 -1
  34. package/dist/FreehandCanvas.mjs +1 -1
  35. package/dist/GridList.mjs +1 -1
  36. package/dist/I18nProvider.mjs +1 -1
  37. package/dist/ImageDropZone.mjs +1 -1
  38. package/dist/ImageGallery.css +1 -1
  39. package/dist/ImageGallery.mjs +1 -1
  40. package/dist/InlineAlert.mjs +1 -1
  41. package/dist/InlineToolbar.mjs +2 -2
  42. package/dist/ListBox.mjs +1 -1
  43. package/dist/Menu.mjs +1 -1
  44. package/dist/MessageFormat.mjs +1 -1
  45. package/dist/Modal.mjs +1 -1
  46. package/dist/NumberInput.css +1 -1
  47. package/dist/NumberInput.mjs +1 -1
  48. package/dist/Pagination.mjs +1 -1
  49. package/dist/PointPicker.mjs +1 -1
  50. package/dist/Popover.mjs +1 -1
  51. package/dist/Portal.mjs +1 -1
  52. package/dist/Preview.css +1 -1
  53. package/dist/Preview.mjs +1 -1
  54. package/dist/ProgressBar.css +1 -1
  55. package/dist/ProgressBar.mjs +1 -1
  56. package/dist/RadioGroup.css +1 -1
  57. package/dist/RadioGroup.mjs +1 -1
  58. package/dist/ScrollControlButton.mjs +1 -1
  59. package/dist/SearchInput.mjs +1 -1
  60. package/dist/Select.css +1 -1
  61. package/dist/Select.mjs +1 -1
  62. package/dist/Slider.css +1 -1
  63. package/dist/Slider.mjs +1 -1
  64. package/dist/Stepper.mjs +1 -1
  65. package/dist/Table.mjs +1 -1
  66. package/dist/Tabs.mjs +1 -1
  67. package/dist/Tag.mjs +1 -1
  68. package/dist/TagGroup.mjs +1 -1
  69. package/dist/TaggedPagination.mjs +1 -1
  70. package/dist/TextInput.css +1 -1
  71. package/dist/TextInput.mjs +1 -1
  72. package/dist/ThemeProvider.mjs +1 -1
  73. package/dist/TimeField.css +1 -1
  74. package/dist/TimeField.mjs +1 -1
  75. package/dist/Toast.mjs +1 -1
  76. package/dist/ToggleButton.mjs +1 -1
  77. package/dist/ToggleIconButton.mjs +1 -1
  78. package/dist/Toolbar.mjs +1 -1
  79. package/dist/Tooltip.mjs +1 -1
  80. package/dist/TreeView.css +1 -1
  81. package/dist/TreeView.mjs +1 -1
  82. package/dist/UNSAFE_ListBox.mjs +1 -1
  83. package/dist/VideoPlayer.css +10 -0
  84. package/dist/VideoPlayer.mjs +1 -0
  85. package/dist/Virtualizer.mjs +1 -1
  86. package/dist/{chunk-A52PIXOO.mjs → chunk-2FKVQSXF.mjs} +1 -1
  87. package/dist/{chunk-QPWBJW2X.mjs → chunk-4ATAOS5R.mjs} +1 -1
  88. package/dist/{chunk-5B6263RO.mjs → chunk-4JSIG3XV.mjs} +16 -16
  89. package/dist/chunk-5GTM4EJO.mjs +10 -0
  90. package/dist/{chunk-6IK2TDLH.mjs → chunk-5I4MVN7X.mjs} +1 -1
  91. package/dist/chunk-5OWMDF6S.mjs +10 -0
  92. package/dist/{chunk-UXAMVDQ4.mjs → chunk-5TRRBR6N.mjs} +1 -1
  93. package/dist/{chunk-S2MA4MRM.mjs → chunk-5Z4XSXFW.mjs} +1 -1
  94. package/dist/{chunk-QVXIFV7W.mjs → chunk-65J43PGI.mjs} +1 -1
  95. package/dist/{chunk-HOZPCWCF.mjs → chunk-667TGPFX.mjs} +1 -1
  96. package/dist/{chunk-ACHYZYVA.mjs → chunk-6VKDP37C.mjs} +1 -1
  97. package/dist/{chunk-UBLCUHRL.mjs → chunk-7GXVKCFC.mjs} +1 -1
  98. package/dist/chunk-7P6YVPSY.mjs +10 -0
  99. package/dist/chunk-7YHC33LQ.mjs +10 -0
  100. package/dist/{chunk-JGKBJHX2.mjs → chunk-ABMYMS6P.mjs} +2 -2
  101. package/dist/chunk-AQGAGABL.mjs +10 -0
  102. package/dist/{chunk-LJM26E7W.mjs → chunk-BNTMAM3S.mjs} +1 -1
  103. package/dist/{chunk-HVSDXCZP.mjs → chunk-CFU5AQZ4.mjs} +1 -1
  104. package/dist/{chunk-EPWWEFTP.mjs → chunk-D4P3YVSV.mjs} +1 -1
  105. package/dist/chunk-DD2TRFO4.mjs +10 -0
  106. package/dist/{chunk-HOG4QRLG.mjs → chunk-EEW7GTPE.mjs} +1 -1
  107. package/dist/{chunk-7EOAYPSZ.mjs → chunk-EOOQLRV5.mjs} +1 -1
  108. package/dist/{chunk-6VKIT2PF.mjs → chunk-FDFERRJ3.mjs} +2 -2
  109. package/dist/{chunk-QYU7CWJD.mjs → chunk-FKMXBSV2.mjs} +1 -1
  110. package/dist/{chunk-G2RVM2KB.mjs → chunk-FOCVZZPT.mjs} +1 -1
  111. package/dist/{chunk-LGE4377M.mjs → chunk-G5JW7B2K.mjs} +1 -1
  112. package/dist/chunk-G67TAFNZ.mjs +10 -0
  113. package/dist/chunk-GJYCSAXU.mjs +10 -0
  114. package/dist/{chunk-AANAI2XF.mjs → chunk-GW2COPW6.mjs} +1 -1
  115. package/dist/{chunk-QMFL5BMI.mjs → chunk-GZS3IPK5.mjs} +1 -1
  116. package/dist/{chunk-L7GYT3MC.mjs → chunk-HN2XJOQL.mjs} +1 -1
  117. package/dist/{chunk-CWPFUB7B.mjs → chunk-IRTS2NKL.mjs} +2 -2
  118. package/dist/chunk-IX5XTUKY.mjs +10 -0
  119. package/dist/{chunk-GJVQMTGA.mjs → chunk-J5OHLCGT.mjs} +1 -1
  120. package/dist/{chunk-TUSG5ZRW.mjs → chunk-JVBUNQEI.mjs} +1 -1
  121. package/dist/{chunk-VOWLLVPD.mjs → chunk-JY4FZPOK.mjs} +1 -1
  122. package/dist/{chunk-DP76DMVO.mjs → chunk-KF6Q3PUU.mjs} +1 -1
  123. package/dist/{chunk-S3LWWMMQ.mjs → chunk-KPNRHAG6.mjs} +1 -1
  124. package/dist/{chunk-IQ3Z6ZO2.mjs → chunk-LDF2ZF7V.mjs} +1 -1
  125. package/dist/{chunk-GAKWWL3Y.mjs → chunk-LM3YM7P3.mjs} +1 -1
  126. package/dist/{chunk-64Y62MDR.mjs → chunk-LQ54FC6R.mjs} +1 -1
  127. package/dist/chunk-MM7BYXUH.mjs +11 -0
  128. package/dist/{chunk-ZZGRLSEK.mjs → chunk-N5BFSM4K.mjs} +1 -1
  129. package/dist/{chunk-3P25UGHE.mjs → chunk-NEJXDGP5.mjs} +1 -1
  130. package/dist/{chunk-YI5VNFT4.mjs → chunk-NHVS56EF.mjs} +1 -1
  131. package/dist/{chunk-24WOG72O.mjs → chunk-NNGNZKM5.mjs} +1 -1
  132. package/dist/chunk-NPU6O7FH.mjs +10 -0
  133. package/dist/{chunk-QMSBDXK6.mjs → chunk-NVMFITUK.mjs} +1 -1
  134. package/dist/chunk-O55OXQQW.mjs +10 -0
  135. package/dist/{chunk-JQSZFPWJ.mjs → chunk-OC3YS6SE.mjs} +1 -1
  136. package/dist/{chunk-LZOXWIAS.mjs → chunk-OMGTKXQP.mjs} +1 -1
  137. package/dist/chunk-OQSEPK4W.mjs +10 -0
  138. package/dist/chunk-OTJ22ZQT.mjs +10 -0
  139. package/dist/chunk-OXTTKEGF.mjs +10 -0
  140. package/dist/{chunk-CBQO7JUC.mjs → chunk-Q2JOERVZ.mjs} +1 -1
  141. package/dist/{chunk-G2IYZES5.mjs → chunk-QARYQDRQ.mjs} +1 -1
  142. package/dist/{chunk-OWXMAVXI.mjs → chunk-QRHVS6JA.mjs} +1 -1
  143. package/dist/{chunk-C6TD53KY.mjs → chunk-RCX7NNM3.mjs} +1 -1
  144. package/dist/{chunk-AU3GNNEG.mjs → chunk-RD5DYYWA.mjs} +1 -1
  145. package/dist/{chunk-ZY3ZKJVD.mjs → chunk-RE7M6EBB.mjs} +1 -1
  146. package/dist/{chunk-6RN7DKRF.mjs → chunk-RIX32JXL.mjs} +1 -1
  147. package/dist/chunk-RTKSIESZ.mjs +10 -0
  148. package/dist/{chunk-AFJ3QV2Q.mjs → chunk-SKKISVY6.mjs} +1 -1
  149. package/dist/{chunk-WSDEMATI.mjs → chunk-U6252C5R.mjs} +1 -1
  150. package/dist/chunk-U6K54GAE.mjs +10 -0
  151. package/dist/{chunk-RM64ROGL.mjs → chunk-UJWWCOY3.mjs} +2 -2
  152. package/dist/{chunk-P3RRGPNM.mjs → chunk-ULARAZ62.mjs} +1 -1
  153. package/dist/chunk-W4SU2CES.mjs +10 -0
  154. package/dist/{chunk-JYWJE6L5.mjs → chunk-WBLMAN7U.mjs} +1 -1
  155. package/dist/{chunk-IIYP5UE7.mjs → chunk-X6RWEBD6.mjs} +1 -1
  156. package/dist/{chunk-GZTF5YE3.mjs → chunk-XBIE4AD2.mjs} +1 -1
  157. package/dist/chunk-XVLQWX2M.mjs +10 -0
  158. package/dist/chunk-XY5S6U26.mjs +11 -0
  159. package/dist/{chunk-EGSNIMDP.mjs → chunk-YJF3BHGB.mjs} +1 -1
  160. package/dist/{chunk-U6W7D7TT.mjs → chunk-ZAYG54JO.mjs} +1 -1
  161. package/dist/{chunk-UC6WAEPH.mjs → chunk-ZLG42OHF.mjs} +1 -1
  162. package/dist/{chunk-HOV7MM7M.mjs → chunk-ZTMBDIZH.mjs} +1 -1
  163. package/dist/hooks/useI18n.mjs +1 -1
  164. package/dist/hooks/useIsTouchDevice.mjs +1 -1
  165. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  166. package/dist/hooks/useLocalStorage.mjs +1 -1
  167. package/dist/hooks/useMedia.mjs +1 -1
  168. package/dist/hooks/useMediaQuery.mjs +1 -0
  169. package/dist/hooks/usePortalContainer.mjs +1 -1
  170. package/dist/index.css +1 -1
  171. package/dist/index.d.ts +183 -36
  172. package/dist/index.js +22 -22
  173. package/dist/index.mjs +1 -1
  174. package/dist/messageIds.mjs +1 -1
  175. package/intl/ar.json +18 -1
  176. package/intl/cs.json +18 -1
  177. package/intl/cy.json +18 -1
  178. package/intl/da.json +18 -1
  179. package/intl/de.json +18 -1
  180. package/intl/el.json +18 -1
  181. package/intl/en-GB.json +18 -1
  182. package/intl/en.json +18 -1
  183. package/intl/es.json +18 -1
  184. package/intl/fi.json +18 -1
  185. package/intl/fr-CA.json +18 -1
  186. package/intl/fr.json +18 -1
  187. package/intl/he.json +18 -1
  188. package/intl/hr.json +18 -1
  189. package/intl/id.json +18 -1
  190. package/intl/it.json +18 -1
  191. package/intl/ja.json +18 -1
  192. package/intl/ko.json +18 -1
  193. package/intl/ms.json +18 -1
  194. package/intl/nb-NO.json +18 -1
  195. package/intl/nl.json +18 -1
  196. package/intl/pl.json +18 -1
  197. package/intl/pt-PT.json +18 -1
  198. package/intl/pt.json +18 -1
  199. package/intl/ru.json +18 -1
  200. package/intl/sk.json +18 -1
  201. package/intl/sl.json +18 -1
  202. package/intl/sv.json +18 -1
  203. package/intl/th.json +18 -1
  204. package/intl/tr.json +18 -1
  205. package/intl/uk.json +18 -1
  206. package/intl/zh-Hans.json +18 -1
  207. package/intl/zh-Hant.json +18 -1
  208. package/messages.json +68 -0
  209. package/package.json +4 -4
  210. package/sbom.json +6 -6
  211. package/dist/chunk-23OLSA2X.mjs +0 -10
  212. package/dist/chunk-2CFMM7MZ.mjs +0 -10
  213. package/dist/chunk-2KRVQJDA.mjs +0 -10
  214. package/dist/chunk-2TMQUHHU.mjs +0 -10
  215. package/dist/chunk-5YV74V36.mjs +0 -10
  216. package/dist/chunk-A455VRNY.mjs +0 -10
  217. package/dist/chunk-AYBI4SQV.mjs +0 -10
  218. package/dist/chunk-CMM5JW7L.mjs +0 -10
  219. package/dist/chunk-CPX5CB4L.mjs +0 -10
  220. package/dist/chunk-GHKMHXQ3.mjs +0 -10
  221. package/dist/chunk-LNEOOIXS.mjs +0 -10
  222. package/dist/chunk-MQCTOCK2.mjs +0 -10
  223. package/dist/chunk-OJIOLYTM.mjs +0 -11
  224. package/dist/chunk-Q5SN5AQT.mjs +0 -10
  225. package/dist/chunk-SUJD4QFW.mjs +0 -10
  226. package/dist/chunk-TDRN6VLD.mjs +0 -10
  227. package/dist/chunk-W4DOEGYH.mjs +0 -10
  228. /package/dist/{chunk-XF65LVBQ.mjs → chunk-JFS73ERR.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {d}from'./chunk-CPX5CB4L.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {f,g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {d}from'./chunk-7P6YVPSY.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {f,g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$b}from'./chunk-T7K4WI76.mjs';import {c as c$4,a as a$c,b as b$4}from'./chunk-EHIGJYGW.mjs';import {c}from'./chunk-6RN7DKRF.mjs';import {e,f,g}from'./chunk-XF65LVBQ.mjs';import {a as a$5}from'./chunk-SQPWV3OX.mjs';import {a as a$a}from'./chunk-TMGB4HZ7.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-TZSRU3GG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-I5YPTKMM.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-5NVCSLXT.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {a as a$7}from'./chunk-ELW6SXDM.mjs';import {c as c$3}from'./chunk-PV4E7XDP.mjs';import {b as b$1}from'./chunk-2PTLJDIT.mjs';import {a as a$8}from'./chunk-LRFFL765.mjs';import {j as j$1}from'./chunk-AIG23SN5.mjs';import {d as d$2}from'./chunk-MMLAKHLR.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {g as g$1,c as c$2}from'./chunk-V2C4UDOC.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {b as b$3,j as j$2}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Le,{useMemo,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$b}from'./chunk-T7K4WI76.mjs';import {c as c$4,a as a$c,b as b$4}from'./chunk-EHIGJYGW.mjs';import {c}from'./chunk-RIX32JXL.mjs';import {e,f,g}from'./chunk-JFS73ERR.mjs';import {a as a$5}from'./chunk-SQPWV3OX.mjs';import {a as a$a}from'./chunk-TMGB4HZ7.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-TZSRU3GG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-I5YPTKMM.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-5NVCSLXT.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {a as a$7}from'./chunk-ELW6SXDM.mjs';import {c as c$3}from'./chunk-PV4E7XDP.mjs';import {b as b$1}from'./chunk-2PTLJDIT.mjs';import {a as a$8}from'./chunk-LRFFL765.mjs';import {j as j$1}from'./chunk-AIG23SN5.mjs';import {d as d$2}from'./chunk-MMLAKHLR.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {g as g$1,c as c$2}from'./chunk-V2C4UDOC.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {b as b$3,j as j$2}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Le,{useMemo,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$5}from'./chunk-TUSG5ZRW.mjs';import {b,a as a$1,c as c$1}from'./chunk-6RN7DKRF.mjs';import {c as c$2}from'./chunk-XF65LVBQ.mjs';import {a}from'./chunk-PTL6NSYA.mjs';import {a as a$3}from'./chunk-3K6XNSYE.mjs';import {a as a$2}from'./chunk-ELW6SXDM.mjs';import {c,g}from'./chunk-V2C4UDOC.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$5}from'./chunk-JVBUNQEI.mjs';import {b,a as a$1,c as c$1}from'./chunk-RIX32JXL.mjs';import {c as c$2}from'./chunk-JFS73ERR.mjs';import {a}from'./chunk-PTL6NSYA.mjs';import {a as a$3}from'./chunk-3K6XNSYE.mjs';import {a as a$2}from'./chunk-ELW6SXDM.mjs';import {c,g}from'./chunk-V2C4UDOC.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {l,q,e,B,o,p,u,h,d as d$1,A,g as g$1,v,x,z,f,i,m,c as c$1,r,t,s,n as n$1,j as j$2,a as a$3,b as b$4,w}from'./chunk-UXAMVDQ4.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {d as d$2,a as a$1,b as b$3}from'./chunk-SMPF53W4.mjs';import {d}from'./chunk-AIG23SN5.mjs';import {j,h as h$1,m as m$1,n}from'./chunk-2MNK24YJ.mjs';import {a,c,g}from'./chunk-V2C4UDOC.mjs';import {a as a$2}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,j as j$1}from'./chunk-TYOEGCPS.mjs';import {flushSync}from'react-dom';import We,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {l,q,e,B,o,p,u,h,d as d$1,A,g as g$1,v,x,z,f,i,m,c as c$1,r,t,s,n as n$1,j as j$2,a as a$3,b as b$4,w}from'./chunk-5TRRBR6N.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {d as d$2,a as a$1,b as b$3}from'./chunk-SMPF53W4.mjs';import {d}from'./chunk-AIG23SN5.mjs';import {j,h as h$1,m as m$1,n}from'./chunk-2MNK24YJ.mjs';import {a,c,g}from'./chunk-V2C4UDOC.mjs';import {a as a$2}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,j as j$1}from'./chunk-TYOEGCPS.mjs';import {flushSync}from'react-dom';import We,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$k}from'./chunk-5OWMDF6S.mjs';import {a as a$m}from'./chunk-EEW7GTPE.mjs';import {c as c$1}from'./chunk-ZAYG54JO.mjs';import {c as c$3}from'./chunk-EOOQLRV5.mjs';import {I,j,f as f$1,e,p,F,A,H,i,B,s,C,G,z,h,g as g$1,m,q,D,E,t,l,v,y,u,a as a$n,w,d,c as c$5,x,k,b as b$7,o,n,r}from'./chunk-W4SU2CES.mjs';import {a as a$7,b as b$6,c as c$4,d as d$1}from'./chunk-FCKJCFMD.mjs';import {a as a$p}from'./chunk-CFU5AQZ4.mjs';import {a as a$i}from'./chunk-G5JW7B2K.mjs';import {a as a$c}from'./chunk-RCX7NNM3.mjs';import {a as a$d}from'./chunk-ZLG42OHF.mjs';import {b as b$4,e as e$1}from'./chunk-FOCVZZPT.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$1,c as c$2}from'./chunk-WBLMAN7U.mjs';import {b as b$3}from'./chunk-ULARAZ62.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-HN2XJOQL.mjs';import {a as a$g}from'./chunk-U6252C5R.mjs';import {a as a$a}from'./chunk-V3DTS6FF.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-JOK6I52O.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-I5YPTKMM.mjs';import {b as b$5,j as j$1}from'./chunk-QDMG3P5Z.mjs';import {a as a$9}from'./chunk-AB7LDKP2.mjs';import {a as a$f}from'./chunk-EYKQGC4O.mjs';import {a as a$8}from'./chunk-22VRCVTH.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-TQMBJFQC.mjs';import {a as a$3}from'./chunk-3K6XNSYE.mjs';import {a as a$2}from'./chunk-ELW6SXDM.mjs';import {a}from'./chunk-LRFFL765.mjs';import {c,f,g}from'./chunk-V2C4UDOC.mjs';import {j as j$2}from'./chunk-TYOEGCPS.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import no,{useCallback,useMemo,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {TextIcon,PlusIcon,MinusIcon}from'@baseline-ui/icons/20';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var so=no.forwardRef(({color:o,colorLabel:e,colorName:a$5,isIndeterminate:r,indeterminateIcon:t,noneLabel:s,...l},n)=>{let i=no.useRef(null),{hoverProps:c$1,isHovered:u}=a({isDisabled:l.isDisabled}),{buttonProps:d,isPressed:f$2}=a$1(l,i),{isFocused:C,isFocusVisible:I$1,focusProps:L}=a$2(),R=a$3({"data-block-id":l["data-block-id"],"data-focused":C,"data-focus-visible":I$1,"data-disabled":l.isDisabled,"data-hovered":u,"data-pressed":f$2}),S=c(),h=c(),B=!!e||typeof a$5=="string";return jsxs("button",{...g(d,c$1,L,R),style:l.style,className:a$4(f$1({isHovered:u,isFocusVisible:I$1||l.isOpen,isDisabled:l.isDisabled,labelPosition:l.labelPosition}),"BaselineUI-ColorInputButton",l.className),ref:f(n,i),id:S,"aria-labelledby":[l["aria-labelledby"]||S,B&&h].filter(Boolean).join(" "),children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:h,"aria-hidden":"true",children:a$5}):B&&jsx(b,{id:h,"aria-hidden":"true",children:a$5})]})});so.displayName="ColorInputButton";var xo=no.forwardRef(({className:o,style:e$1,icon:a$6,elementType:r="button",...t},s)=>{let l=no.useRef(null),{hoverProps:n,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:u}=a$1({...t,elementType:r},l),{isFocusVisible:d,focusProps:f$1}=a$2(),C=a$3({"data-block-id":t["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":t.isDisabled,"data-hovered":i,"data-pressed":u});return jsxs(r,{...g(a$5(r,t.isDisabled),c,n,f$1,C),ref:f(s,l),style:e$1,className:a$4(p({isHovered:i||u||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(a$6,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});xo.displayName="IconColorInputButton";var Wo=no.forwardRef(({setColor:o,color:e,triggerRef:a,autoFocus:r,presets:t,state:s$1,isIndeterminate:l,colorPresetsLabel:n},i$1)=>{let{formatMessage:c}=b$1(),u=useCallback(d=>{if(d instanceof Set&&d.size){let f=[...d][0],C=t.find(I=>I.id===f);a$6(C,"Preset not found"),o(C.id===F?null:a$7(C.id).toFormat(A)),s$1.close();}},[s$1,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:a.current?.offsetWidth},ref:i$1,children:jsx(c$1,{autoFocus:r,items:t,layout:"grid","aria-label":n??c(ft.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:l?[]:[e?.toString(B)||F],onSelectionChange:u,shouldSelectOnPressUp:true,escapeKeyBehavior:"none"})})});Wo.displayName="ColorPresetList";var ft=c$2({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Xe=({value:o,...e})=>{let a=no.useRef(null),r=no.useRef(null),t=no.useRef(null),s=b$6({...e,value:o}),{colorAreaProps:l,xInputProps:n,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:a,inputYRef:r,containerRef:t},s);useEffect(()=>{a.current?.focus();},[]);let{focusProps:u,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...l,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...c,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:a,...n,...u}),jsx("input",{ref:r,...i,...u})]})})};var ht=c$2({hex:{defaultMessage:"Hex",id:"bui.colorInput.hexField"}}),Ye=({color:o$1,setColor:e,allowAlpha:a$1,...r})=>{let t=d$1({value:o$1,onChange:f=>{e(C(f)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),{formatMessage:s}=b$1(),l=no.useRef(null),{inputProps:n$1}=b$7({...r,"aria-label":s(ht.hex)},t,l),{focusProps:i,isFocused:c}=a$2({isTextInput:true}),{hoverProps:u,isHovered:d}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":a$1?"hexa":"hex",children:[jsx("input",{...g(n$1,i,u),ref:l,className:o({isFocused:c,isHovered:d,allowAlpha:a$1})}),a$1?jsx($e,{color:o$1,setColor:e}):null]})},qe=({color:o,setColor:e,allowAlpha:a})=>{let r$1=o.toFormat("rgba"),{locale:t}=b$2();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":a?"rgba":"rgb",children:[jsx(a$p,{"aria-label":o.getChannelName("red",t),value:r$1.getChannelValue("red"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("red",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("green",t),value:r$1.getChannelValue("green"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("green",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("blue",t),value:r$1.getChannelValue("blue"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("blue",s).toFormat(A));},step:1,minValue:0,maxValue:255}),a?jsx($e,{color:o,setColor:e}):null]})},yt={style:"percent",maximumFractionDigits:0},$e=({color:o,setColor:e})=>{let{locale:a}=b$2(),r$1=useCallback(t=>{e(o.withChannelValue("alpha",t));},[o,e]);return jsx(a$p,{"aria-label":o.getChannelName("alpha",a),value:o.getChannelValue("alpha"),formatOptions:yt,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var qo=({channel:o,...e})=>{let{locale:a}=b$2(),r=c$4({...e,channel:o,locale:a}),t=no.useRef(null),s=no.useRef(null),{trackProps:l,thumbProps:n,inputProps:i}=c$5({...e,channel:o,trackRef:t,inputRef:s,"aria-label":r.value.getChannelName(o,a)},r),{focusProps:c,isFocusVisible:u}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...l,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:l.style}),jsxs("div",{className:a$4(w({isFocusVisible:u}),"BaselineUI-ColorInput-ColorSliderThumb"),...n,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:s,...i,...c})})]})]})};var Mo=({color:o,setColor:e,allowAlpha:a,colorFormatLabel:r,onChangeEnd:t})=>{let[s,l]=no.useState("hex"),{formatMessage:n}=b$1();return jsxs(Fragment,{children:[jsx(Xe,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:t}),jsxs("div",{className:v,children:[jsx(qo,{channel:"hue",value:o,onChange:e,onChangeEnd:t}),a?jsx(qo,{channel:"alpha",value:o,onChange:e,onChangeEnd:t}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$3,{label:r??n(Bt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:s,onSelectionChange:i=>{l(i);}}),s==="hex"&&jsx(Ye,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:a}),s==="rgb"&&jsx(qe,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:a})]})]})},Bt=c$2({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var Ze=({color:o,setColor:e,storePickedColorKey:a,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:s$1,addLabel:l$1,cancelLabel:n,newColorLabel:i$1,colorFormatLabel:c$2,pickerMode:u$1,allowAlpha:d,isIndeterminate:f,state:C})=>{let{locale:I}=b$2(),{formatMessage:L}=b$1(),R=no.useRef(null),S=a$j(R.current),[h,B$1]=a$k(a,[]),y=no.useMemo(()=>Array.isArray(h)?h.filter(m=>xt(m)):[],[h]),z=y.length>0,G=no.useRef(null),[K,uo]=no.useState(o),po=no.useMemo(()=>y.map(m=>({id:m,label:a$7(m).getColorName(I),description:m})),[y,I]),F=useCallback(()=>{let m=u$1==="active"?o:K;if(y.includes(m.toString(B))){G.current?.querySelector(`[data-key='${m.toString(B)}']`)?.classList.add(t);return}B$1([...y,m.toString(B)]);},[y,o,B$1,K,u$1]);useEffect(()=>{let m=G.current;function x(b){b.animationName===u&&j$2(b)?.classList.remove(t);}return m?.addEventListener("animationend",x),()=>{m?.removeEventListener("animationend",x);}},[z]);let co=c(),J=jsx(a$l,{ref:R,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:u$1==="active"?F:void 0}),fo=useCallback(m$1=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??L(Jo.newColor),children:[jsx(Mo,{color:K,setColor:uo,allowAlpha:d,colorFormatLabel:c$2}),jsx(a$e,{}),jsx(a$h,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(a$h,{display:"inline-flex",gap:"lg",children:[jsx(b$3,{label:n??L(Jo.cancel),size:"sm",variant:"secondary",onPress:m$1}),jsx(b$3,{label:l$1??L(Jo.add),variant:"primary",onPress:()=>{F(),m$1();},size:"sm"})]})})]}),[K,F,L,d,i$1,c$2,n,l$1]),Oo=useCallback(m=>{a$6(m instanceof Set,"Key must be a set");let x=[...m][0];x&&(e(a$7(x).toFormat(A)),u$1==="lazy"&&C.close());},[e,u$1,C]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:co,children:s$1}),jsxs(a$h,{display:"flex",children:[!!y.length&&y.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{B$1(y.filter(m=>m!==o.toString(B))),R.current?.focus();}}),u$1==="active"&&J,u$1==="lazy"&&(S==="mobile"?jsxs(b$4,{children:[jsx(a$m,{children:J}),jsx(e$1,{style:{zIndex:1e5},children:({close:m})=>fo(m)})]}):jsxs(b$5,{type:"dialog",children:[jsx(j$1,{children:J}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:m})=>fo(m)})]}))]})]}),!!y.length&&jsx(c$1,{items:po,layout:"grid","aria-labelledby":co,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:G,autoFocus:false,selectionMode:"single",selectedKeys:f?[]:[o.toString(B)],onSelectionChange:Oo,shouldSelectOnPressUp:true})]})},Jo=c$2({newColor:{defaultMessage:"New Custom Color",id:"bui.colorInput.newColor"},cancel:{defaultMessage:"Cancel",id:"bui.colorInput.cancel"},add:{defaultMessage:"Add",id:"bui.colorInput.add"}});function xt(o){if(typeof o!="string")return false;try{return a$7(o),!0}catch{return false}}function ot({colorLabel:o,color:e,presets:a,isIndeterminate:r,indeterminateLabel:t,transparentLabel:s}){let{formatMessage:l}=b$1(),{locale:n}=b$2(),i=useMemo(()=>r?{id:"indeterminate",label:t??l(je.indeterminate)}:a.find(d=>d.id===F?!e:e?D(e,a$7(d.id)):false),[a,e,r,l,t]),c=useMemo(()=>{if(typeof o=="function")return o?.(e,{isIndeterminate:!!r});if(typeof o=="boolean")return E(e,i,s??l(je.transparent));throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,l,i,r,s]),u=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(n);},[e,n,i?.label]);return {colorName:c,humanReadableName:u}}var je=c$2({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var Ao=no.forwardRef(({className:o,style:e,allowRemoval:a,allowAlpha:r=true,presets:t,labelPosition:s="top",colorLabel:l=true,includePicker:n=true,onChange:i,onChangeEnd:c$1,defaultValue:u,storePickedColorKey:d="baselinePickedColor",value:f,addColorButtonLabel:C$1,removeColorButtonLabel:I,customColorsLabel:L,addLabel:R,cancelLabel:S,newColorLabel:h$1,colorFormatLabel:B,colorPresetsLabel:y,noColorLabel:z$1,indeterminateLabel:G$1,transparentLabel:K,onTriggerPress:uo,renderTriggerButton:po,pickerMode:F$1="active",offset:co=2,placement:J=s==="start"?"bottom end":"bottom start","data-block-id":fo,"data-block-class":Oo,isIndeterminate:m$1,indeterminateIcon:x,...b},lt)=>{let Q=no.useRef(null),at=no.useRef(null),W=a$8(b),{triggerProps:oe,overlayProps:st}=a$9({type:"listbox"},W,Q),nt=a$a(b.portalContainer),[X,wo]=a$b(f===void 0?void 0:C(f),C(u),N=>i?.(N?.toFormat("rgba")||null)),{formatMessage:Z}=b$1(),Do=useMemo(()=>G(z$1??Z(To.noColor),t),[t,Z,z$1]),Co=c(),{colorName:ee}=ot({colorLabel:l||true,color:X,presets:Do,isIndeterminate:m$1,indeterminateLabel:G$1,transparentLabel:K}),it=l?ee:false,te=useMemo(()=>Do.filter(N=>a||N.id!==F),[Do,a]),mt=C$1||Z(To.addColor),ut=I||Z(To.removeColor),pt=L||Z(To.customColors),re=jsx(Ze,{color:X||z,setColor:N=>{wo(N),c$1?.(N?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:mt,removeColorButtonLabel:ut,customColorsLabel:pt,addLabel:R,cancelLabel:S,newColorLabel:h$1,colorFormatLabel:B,pickerMode:F$1,allowAlpha:r,isIndeterminate:!!m$1,state:W});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g$1]:s==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":fo,"data-block-class":Oo,style:e,ref:lt,children:[b.label?jsx("label",{id:Co,className:h({labelPosition:s}),children:b.label}):null,po?po({isOpen:W.isOpen,color:X,ref:Q,colorName:it,triggerProps:g(oe,{onPress:uo}),labelId:Co,isIndeterminate:m$1,indeterminateIcon:x,noneLabel:z$1}):jsx(so,{...g(oe,{onPress:uo,...b.label?{"aria-labelledby":Co}:{"aria-label":b["aria-label"]}}),ref:Q,isOpen:W.isOpen,isDisabled:b.isDisabled,labelPosition:s,color:X,colorLabel:l,colorName:ee,isIndeterminate:m$1,indeterminateIcon:x,noneLabel:z$1})]}),jsx(a$c,{...b,portalContainer:nt,placement:J,state:W,offset:co,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:Q,overlayProps:st,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:n}),ref:at,"aria-labelledby":b.label?Co:void 0,"aria-label":b["aria-label"],children:[n&&F$1==="active"?jsxs(Fragment,{children:[jsx(Mo,{color:X||z,setColor:wo,allowAlpha:r,colorFormatLabel:B,onChangeEnd:N=>{c$1?.(N?.toFormat("rgba")||null);}}),re]}):null,!!te.length&&jsxs(Fragment,{children:[n&&F$1==="active"?jsx(a$e,{}):null,jsx(Wo,{autoFocus:n&&F$1==="active"?false:"first",state:W,triggerRef:Q,presets:te,colorPresetsLabel:y,color:X,setColor:N=>{wo(N),c$1?.(N?.toFormat("rgba")||null);},isIndeterminate:!!m$1})]}),n&&F$1==="lazy"?re:null]})})]})});Ao.displayName="ColorInput";var To=c$2({addColor:{defaultMessage:"Add Color",id:"bui.colorInput.addColor"},removeColor:{defaultMessage:"Remove Color",id:"bui.colorInput.removeColor"},customColors:{defaultMessage:"Custom Colors",id:"bui.colorInput.customColors"},noColor:{defaultMessage:"None",id:"bui.colorInput.noColor"}});var rt=no.forwardRef(({className:o,style:e,icon:a,variant:r="standard","data-block-id":t,tooltip:s=true,iconTooltip:l=true,...n},i)=>{let c=no.useRef(null),{tooltipProps:u}=a$f({label:n["aria-label"],tooltip:s}),d=useCallback(({isOpen:f,color:C,ref:I,colorName:L,triggerProps:R,isIndeterminate:S,indeterminateIcon:h,noneLabel:B})=>jsx(a$g,{...u,children:r==="standard"?jsx(so,{...R,"aria-label":n["aria-label"],ref:I,isOpen:f,isDisabled:n.isDisabled,color:C,colorLabel:false,colorName:L,isIndeterminate:S,indeterminateIcon:h,noneLabel:B}):jsx(xo,{...R,isOpen:f,icon:TextIcon,color:C?.toString("hexa"),ref:I,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:S,indeterminateIcon:h})}),[n,u,r]);return jsxs(a$h,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":t,style:e,ref:f(i,c),children:[r==="standard"&&a?jsx(a$i,{icon:a,label:n["aria-label"],tooltip:l,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...n,renderTriggerButton:d})]})});rt.displayName="IconColorInput";export{xo as a,Ao as b,rt as c};
@@ -1,4 +1,4 @@
1
- import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c,d}from'./chunk-ST3TDAOP.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-L7GYT3MC.mjs';import {a as a$b}from'./chunk-PGDGNOYE.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-BPXZ6J5G.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-3K6XNSYE.mjs';import {a as a$5}from'./chunk-ELW6SXDM.mjs';import {c as c$2}from'./chunk-PV4E7XDP.mjs';import {a as a$4}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {r}from'./chunk-2MNK24YJ.mjs';import {g,c as c$1}from'./chunk-V2C4UDOC.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c,d}from'./chunk-ST3TDAOP.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-HN2XJOQL.mjs';import {a as a$b}from'./chunk-PGDGNOYE.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-BPXZ6J5G.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-3K6XNSYE.mjs';import {a as a$5}from'./chunk-ELW6SXDM.mjs';import {c as c$2}from'./chunk-PV4E7XDP.mjs';import {a as a$4}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {r}from'./chunk-2MNK24YJ.mjs';import {g,c as c$1}from'./chunk-V2C4UDOC.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
2
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}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-HN2XJOQL.mjs';import {a as a$4,b as b$1}from'./chunk-TZSRU3GG.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-TQMBJFQC.mjs';import {a as a$7}from'./chunk-ELW6SXDM.mjs';import {a as a$8}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {g,c}from'./chunk-V2C4UDOC.mjs';import {i,a as a$1}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import R,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
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 X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17dc _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dd"},isTriggered:{true:"_1kvz17de"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"},isRtl:{true:"_1kvz17d2"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17df",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d3 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isFocusVisible:{true:"_1kvz17d4"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17db _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d8 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var M=R.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:u}=useContext(z),l=R.Children.toArray(a).filter(e=>R.isValidElement(e));useEffect(()=>{for(let e of o.keys())e>=l.length&&o.delete(e);},[o,l.length]);let{keyboardProps:_}=j({onKeyDown:e=>{let n=i(a$1(e.target)),c=[...o?.keys()||[]].findIndex(d=>{let y=o?.get(d)?.current;return y?y===n:false});if(!o?.get(c)){e.continuePropagation();return}let s=o?.size||0,v=new Set([...u??[]].map(String)),m=d=>{let y=o.get(d)?.current?.dataset.key;return y!==void 0&&v.has(y)},r=(d,y)=>{for(let A=1;A<=s;A++){let g=((d+y*A)%s+s)%s;if(!m(g)){o.get(g)?.current?.focus();return}}};switch(e.key){case "Home":{e.preventDefault(),r(-1,1);break}case "End":{e.preventDefault(),r(s,-1);break}case "ArrowDown":{e.preventDefault(),r(c,1);break}case "ArrowUp":{e.preventDefault(),r(c,-1);break}default:e.continuePropagation();}}});return jsx("div",{...b(_),style:p,className:a$2(X,i$1),ref:t,children:l.map((e,n)=>R.cloneElement(e,{index:n}))})});M.displayName="AccordionBase";var z=R.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=R.forwardRef(({children:a,disabledKeys:i,defaultExpandedKeys:p=new Set,expandedKeys:t,expansionMode:o="multiple",onChange:u,className:l,style:_},e)=>{let[n,c]=a$3(t,p,u),f=R.useRef(new Map).current,[s,v]=R.useState(o);useEffect(()=>{v(o);},[o]);let m=useMemo(()=>({expandedKeys:n,setExpandedKeys:c,disabledKeys:i,headers:f,expansionMode:s}),[n,c,i,f,s]);return jsx(z.Provider,{value:m,children:jsx(a$4,{children:jsx(M,{className:l,style:_,ref:e,children:a})})})});se.displayName="Accordion";var D=R.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:u,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let n=R.useRef(null),{expandedKeys:c,setExpandedKeys:f,expansionMode:s,disabledKeys:v,headers:m}=useContext(z),r=v?.has(t),d$1=b$1();a$5(d$1);let{focusNext:y,focusPrevious:A}=d$1,{direction:g$1}=b$2(),pe=g$1==="rtl"?"ArrowLeft":"ArrowRight",le=g$1==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?A({wrap:true}):x.continuePropagation();},isDisabled:r});useEffect(()=>{a$5(typeof u=="number","AccordionItem must have an index"),m?.set(u,n);},[u,m]);let L=()=>{f(x=>{let b=new Set(x);return b.has(t)?b.delete(t):(s==="single"&&b.clear(),b.add(t)),b});},{buttonProps:ue}=a$6({"aria-expanded":c.has(t),"aria-controls":p,onPress:L,isDisabled:r},n),{pressProps:ye}=d({onPress:L,isDisabled:r}),{focusProps:fe,isFocusVisible:ze}=a$7(),{hoverProps:_e,isHovered:T}=a$8({isDisabled:r}),{focusProps:ve,isFocusVisible:xe}=a$7({within:true}),be=c.has(t);return jsxs("h3",{...g(me,ye,_e,ve),className:oe({isFocusVisible:ze,isHovered:T,isDisabled:r}),ref:e,children:[jsxs("div",{className:re({isDisabled:!!r}),children:[jsx(ChevronRightIcon,{className:Z({isExpanded:be,isRtl:g$1==="rtl"}),size:8}),jsx("button",{...g(ue,fe),id:o,"data-key":t,className:te,ref:n,children:a})]}),i?.length?jsx("div",{"data-testid":"action-buttons",className:Y({showActionsOnTriggerOnly:_,isTriggered:xe||T}),children:i.map((x,b)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:r,...x},b))}):null,l?jsx("div",{className:ee,children:l}):null]})});D.displayName="AccordionHeader";var Ke={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},Ne=({isExpanded:a,...i})=>{let[p,t]=useState(!a);return a&&p&&t(false),jsx(motion.section,{...i,initial:false,animate:a?"open":"closed",onAnimationComplete:o=>{o==="closed"&&t(true);},hidden:p})},de=R.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:u,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:n},c$1)=>{let f=c(),s=c(),{expandedKeys:v}=useContext(z),m=v.has(t),r={role:"region","aria-labelledby":s,id:f,className:$,variants:Ke},d=jsx("div",{style:l,className:_,children:p});return jsxs(Fragment,{children:[jsx(a$4,{children:jsx(D,{value:t,actions:i,id:s,title:a,controlId:m||n?f:void 0,ref:c$1,index:o,subLabel:u,showActionsOnTriggerOnly:e})}),n?jsx(Ne,{...r,isExpanded:m,children:d}):jsx(AnimatePresence,{initial:false,children:m?jsx(motion.section,{...r,initial:"closed",animate:"open",exit:"closed",children:d}):null})]})});de.displayName="AccordionItem";export{se as a,de as b};
@@ -1,4 +1,4 @@
1
- import {a as a$8}from'./chunk-E3FP4B25.mjs';import {a as a$1,b as b$2}from'./chunk-HI56YXPJ.mjs';import {a as a$6}from'./chunk-JZXLV6JU.mjs';import {b as b$1,c}from'./chunk-JYWJE6L5.mjs';import {a as a$5}from'./chunk-L7GYT3MC.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$4}from'./chunk-3K6XNSYE.mjs';import {a as a$3}from'./chunk-ELW6SXDM.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon as CaretLeftIcon$3,CaretRightIcon as CaretRightIcon$3}from'@baseline-ui/icons/12';import {CaretLeftIcon as CaretLeftIcon$2,CaretRightIcon as CaretRightIcon$2}from'@baseline-ui/icons/16';import {CaretLeftIcon as CaretLeftIcon$1,CaretRightIcon as CaretRightIcon$1}from'@baseline-ui/icons/20';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/24';import w from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$8}from'./chunk-E3FP4B25.mjs';import {a as a$1,b as b$2}from'./chunk-HI56YXPJ.mjs';import {a as a$6}from'./chunk-JZXLV6JU.mjs';import {b as b$1,c}from'./chunk-WBLMAN7U.mjs';import {a as a$5}from'./chunk-HN2XJOQL.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$4}from'./chunk-3K6XNSYE.mjs';import {a as a$3}from'./chunk-ELW6SXDM.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon as CaretLeftIcon$3,CaretRightIcon as CaretRightIcon$3}from'@baseline-ui/icons/12';import {CaretLeftIcon as CaretLeftIcon$2,CaretRightIcon as CaretRightIcon$2}from'@baseline-ui/icons/16';import {CaretLeftIcon as CaretLeftIcon$1,CaretRightIcon as CaretRightIcon$1}from'@baseline-ui/icons/20';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/24';import w from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-Q7BJGV4I.mjs';import {i}from'./chunk-VPN55UVA.mjs';import {c as c$1,b as b$2,a as a$3}from'./chunk-GZTF5YE3.mjs';import {c,b as b$1}from'./chunk-OY57K37D.mjs';import {d,f as f$1}from'./chunk-24WOG72O.mjs';import {c as c$2}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import P from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-Q7BJGV4I.mjs';import {i}from'./chunk-VPN55UVA.mjs';import {c as c$1,b as b$2,a as a$3}from'./chunk-XBIE4AD2.mjs';import {c,b as b$1}from'./chunk-OY57K37D.mjs';import {d,f as f$1}from'./chunk-NNGNZKM5.mjs';import {c as c$2}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import P from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$3}from'./chunk-IRTS2NKL.mjs';import {a as a$f}from'./chunk-NV7KQVPE.mjs';import {a as a$g}from'./chunk-4FN6UAXD.mjs';import {f as f$1,b as b$3,i,g as g$1,a as a$c,h,c as c$2,e as e$1,d}from'./chunk-VPN55UVA.mjs';import {a as a$b}from'./chunk-NMSOOQB2.mjs';import {a as a$a}from'./chunk-D4P3YVSV.mjs';import {q}from'./chunk-OYE6VSTU.mjs';import {c as c$1}from'./chunk-FFPJBDWH.mjs';import {p}from'./chunk-4Y5IKZSW.mjs';import {a as a$9}from'./chunk-FKMXBSV2.mjs';import {a as a$8,b as b$4}from'./chunk-KCHAWPUN.mjs';import {b as b$2,e}from'./chunk-FOCVZZPT.mjs';import {b}from'./chunk-3EFE2WAJ.mjs';import {b as b$1,c}from'./chunk-WBLMAN7U.mjs';import {a as a$e}from'./chunk-DIL5HL6K.mjs';import {a as a$d}from'./chunk-HN2XJOQL.mjs';import {a as a$4}from'./chunk-U6252C5R.mjs';import {a as a$6}from'./chunk-5IC46G5J.mjs';import {a as a$7}from'./chunk-FPM5UJRF.mjs';import {a}from'./chunk-TQMBJFQC.mjs';import {a as a$1}from'./chunk-LRFFL765.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {f,g}from'./chunk-V2C4UDOC.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import Z,{useRef,useLayoutEffect,useState,useContext,useEffect,useCallback,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {XIcon}from'@baseline-ui/icons/12';import {useReducedMotion,motion}from'motion/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 We=t=>a$a({getItems:(e,r)=>r.map(i=>({"text/plain":i.label})),renderDropIndicator(e){return jsx(c$1,{target:e,className:({isDropTarget:r})=>a$2(a$b({isDropTarget:r}),"BaselineUI-DropIndicator")})},...t});function K(t,e){return t.find(r=>r.id===e)}function $e(t,e,r,i){if(!K(t,e))return t;let n=t.filter(a=>r.has(a.id));return t.flatMap(a=>a.id===e?r.has(a.id)?n:i==="before"?[...n,a]:[a,...n]:r.has(a.id)?[]:a)}function Xe(t,e,r){return $e(t,e,r,"before")}function je(t,e,r){return $e(t,e,r,"after")}function oe(t){return t.map(e=>({id:e.id,label:e.label,data:{src:e.src,alt:e.alt}}))}function H(t){return t.map(e=>({id:e.id,label:e.label,src:e.data?.src,alt:e.data?.alt}))}var _={src:"src",alt:"alt"},T={sm:102,md:170};function qe(t,e){let r=K(t,e);return {[_.src]:r?.data?.src||"",[_.alt]:r?.data?.alt||"",key:String(e)}}function Je(t){let e=t[_.src];return e?{src:String(e),alt:t[_.alt]?String(t[_.alt]):""}:null}function Qe({fit:t,imageDimensions:e,item:r,isSelected:i}){let n={display:"block",objectFit:t},a=typeof e=="function"?r?e(r,{isSelected:i}):void 0:e;if(!a)return n;let s=typeof a.width=="string"?T[a.width]:a.width;return n.width=s,n.aspectRatio="height"in a?`${s} / ${a.height}`:a.aspectRatio.toString(),n}var Ze=Z.forwardRef(({className:t,children:e,style:r,isDisabled:i,onTruncatedChange:n,onHoverChange:a$3},s)=>{let m=useRef(null),{buttonProps:I}=a({elementType:"span",isDisabled:i},m);useLayoutEffect(()=>{m.current&&n?.(m.current.scrollWidth>m.current.clientWidth);},[e,n]);let{hoverProps:u}=a$1({isDisabled:i,onHoverChange:a$3});return jsx(b,{elementType:"span",slot:"label",...g(I,u),className:a$2(t,"BaselineUI-AdaptiveText"),tabIndex:-1,ref:f(m,s),style:r,role:void 0,children:e})});Ze.displayName="Label";var ie=Z.memo(Z.forwardRef(({children:t,isOpen:e,isDisabled:r,...i},n)=>{let[a,s]=useState(false),[m,I]=useState(false),u=a$3(),G=r||!m||u;return jsx(a$4,{text:t,variant:"inverse",includeArrow:false,size:"sm",placement:"bottom start",isOpen:(a||e)&&m,isDisabled:G,children:jsx(Ze,{...i,isDisabled:G,onTruncatedChange:I,onHoverChange:s,ref:n,children:t})})}));ie.displayName="AdaptiveText";var bt=t=>t.replaceAll(/["\\\n\r\f]/g,e=>`\\${e.codePointAt(0).toString(16)} `),ht=({fit:t,item:e,deleteElement:r,loadingLabel:i})=>{let{formatMessage:n}=b$1(),{isLoading:a,imgProps:s}=a$f({src:e.data?.src,alt:e.data?.alt||""});return jsxs("div",{className:e$1,children:[a?jsx(a$g,{"aria-label":i??n(z.loading)}):jsx("div",{role:"img",className:d({isLoading:a}),"aria-label":s.alt||"",style:{backgroundImage:s.src?`url("${bt(s.src)}")`:void 0,backgroundSize:t}}),r]})},Ve=({item:t,options:{isFocusVisible:e,isSelected:r,isFocused:i,isDisabled:n,isPressed:a},fit:s="contain",onDelete:m,className:I,imageClassName:u,imageLabelClassName:G,imageDimensions:O,style:U,layoutTransition:P=true,deleteLabel:F,loadingLabel:W,renderImage:$=(A,{deleteElement:k})=>jsx(ht,{item:A,deleteElement:k,fit:s,loadingLabel:W})})=>{let{formatMessage:A}=b$1(),k=m?jsx("div",{className:a$c,children:jsx(a$d,{"aria-label":F??A(z.delete),size:"xs",icon:XIcon,onPress:()=>{m(t.id);},isDisabled:n,UNSAFE_isVisuallyInteractiveOnly:true,"data-testid":"image-gallery-delete-button"})}):null,b=H([t])[0],N=useCallback(C=>{let g={},c=typeof C=="function"?C(b,{isSelected:r}):C;return c&&(g.width=typeof c.width=="string"?T[c.width]:c.width,g.aspectRatio="height"in c?`${g.width} / ${c.height}`:c?.aspectRatio?.toString()),g},[b,r]),S=useMemo(()=>({isFocusVisible:e,isSelected:r,isFocused:i,isDisabled:n,isPressed:a}),[e,r,i,n,a]),R=!useReducedMotion()&&(typeof P=="boolean"?P:true),h$1=typeof P=="object"?P:void 0,X=N(O),j=R?motion.div:"div";return jsxs(j,{...R?{layout:"position",initial:false,transition:h$1}:{},className:a$2(c$2,a$8(I,b,S)),style:b$4(U,b,S),children:[jsx(a$e,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",flexGrow:0,children:jsx("div",{className:a$2(g$1({isFocusVisible:e,isSelected:r,isLoading:true}),a$8(u,b,S)),style:X,"data-image-key":t.id,children:$(t,{deleteElement:k??void 0,onDelete:m})})}),jsx(ie,{className:a$2(h({isFocusVisible:e,isSelected:r}),G),style:{maxWidth:X.width},isOpen:e,children:t.label})]})};var V={keys:[],isAll:false};function Pt(t,e){return t==="all"?true:"has"in t&&typeof t.has=="function"?t.has(e):[...t].includes(e)}var rt=Z.forwardRef(({className:t,style:e$1,fit:r="cover",onReorder:i$1,"data-block-id":n,"data-block-class":a,onDelete:s,imageWidth:m,aspectRatio:I,items:u,defaultItems:G=[],onKeyDown:O,imageContainerClassName:U,imageClassName:P,labelClassName:F,onListChange:W,renderImage:$,layoutTransition:A,imageDimensions:k,imageContainerStyle:b,deleteConfirmationTitle:N="Are you sure you want to delete this item?",deleteLabel:S,cancelLabel:le,loadingLabel:R,...h},X)=>{let{isVirtualized:j}=useContext(p),C=a$5(X),[g,c]=useState(V),x=g.keys,{formatMessage:me}=b$1(),ce=m??T.sm,pe=I??3/4,de=m!==void 0||I!==void 0;useEffect(()=>{de&&a$6("ImageGallery:deprecatedSizing","ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[de]);let ee=Z.useMemo(()=>k??{width:ce,aspectRatio:pe},[k,ce,pe]),[v,q$1]=a$7(h.selectedKeys,h.defaultSelectedKeys??[],h.onSelectionChange),ot=Z.useMemo(()=>u?oe(u):void 0,[u]),at=Z.useMemo(()=>oe(G),[]),[y,B]=a$7(ot,at,W?o=>{W?.(H(o));}:void 0),nt=useCallback(o=>{let l=o.target.key,p=o.keys;if(o.target.dropPosition==="before"){let d=Xe(y,l,p);B(d);}else if(o.target.dropPosition==="after"){let d=je(y,l,p);B(d);}i$1?.(o);},[y,i$1,B]),{dragAndDropHooks:it}=We({onReorder:nt,isDisabled:!i$1,renderDragPreview:o=>jsx(i,{items:o,containerClassName:".BaselineUI-ImageGallery",previewClassName:g$1(),itemDataAttribute:"data-image-key",showCount:true,renderFallback:l=>{let p=Je(l);if(!p)return null;let d=K(y,l.key),J=d?H([d])[0]:void 0;return jsx("img",{...p,style:Qe({fit:r,imageDimensions:ee,item:J,isSelected:Pt(v,l.key)})})}}),getItems:o=>[...o].map(l=>qe(y,l)),renderDropIndicator(o){return jsx(c$1,{target:o,className:a$2(b$3({isVirtualized:!!j}),"BaselineUI-DropIndicator")})}}),st=useCallback(()=>{if(s&&x.length){if(g.isAll)q$1(new Set);else if(v!=="all"){let o=[...v],l=o.filter(p=>!x.includes(p));l.length!==o.length&&q$1(new Set(l));}B(y.filter(o=>!x.includes(o.id))),s(x),c(V);}},[x,g.isAll,y,s,v,B,q$1]),lt=useCallback((o,l)=>{let p={id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt};return jsx(Ve,{item:o,options:l,fit:r,onDelete:s?d=>{l.isDisabled||c({keys:[d],isAll:false});}:void 0,renderImage:$,className:a$8(U,p,l),imageClassName:P,imageLabelClassName:F,imageDimensions:ee,style:b,layoutTransition:A,deleteLabel:S,loadingLabel:R},o.id)},[r,s,$,U,P,F,ee,b,A,S,R]);return useEffect(()=>{let o=C.current;if(!o)return;let l=p=>{if(O?.(p),p.key==="Backspace"||p.key==="Delete"){if(!s)return;let d=new Set(h.disabledKeys);if(v==="all"){c({keys:y.map(w=>w.id).filter(w=>!d.has(w)),isAll:true});return}let J=[...v];if(J.length){let w=J.filter(mt=>!d.has(mt));w.length&&c({keys:w,isAll:false});return}let te=p.target.closest("[data-key]");if(!te||!o.contains(te))return;let fe=te.dataset.key;if(d.has(fe))return;c({keys:[fe],isAll:false});}};return o.addEventListener("keydown",l),()=>{o.removeEventListener("keydown",l);}},[C,s,O,v,y,h.disabledKeys]),jsxs(Fragment,{children:[jsx(q,{...h,ref:C,style:e$1,className:a$2(f$1,"BaselineUI-ImageGallery",t),"data-block-id":n,"data-block-class":a,selectedKeys:v,items:y,dragAndDropHooks:it,layout:"grid",orientation:"vertical",renderOption:lt,onSelectionChange:q$1,optionClassName:i$1&&!j?sprinkles({marginLeft:"sm"}):void 0}),jsx(b$2,{isOpen:!![...x].length,onOpenChange:o=>{o||c(V);},children:jsx(e,{isDismissable:true,children:jsx(a$9,{showCloseButton:false,title:typeof N=="function"?N(g.isAll?"all":new Set(x)):N,primaryActionLabel:S??me(z.delete),cancelLabel:le??me(z.cancel),onCancel:()=>{c(V);},onPrimaryAction:st,autoFocusButton:"cancel"})})})]})});rt.displayName="ImageGallery";var z=c({delete:{id:"bui.imageGallery.delete",defaultMessage:"Delete"},cancel:{id:"bui.imageGallery.cancel",defaultMessage:"Cancel"},loading:{id:"bui.imageGallery.loading",defaultMessage:"Loading"}});export{rt as a};
@@ -0,0 +1,10 @@
1
+ /**
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=["bui.alertDialog.close","bui.audioPlayer.audioTimeline","bui.audioPlayer.pause","bui.audioPlayer.play","bui.buttonSelect.more","bui.buttonSelect.moreWithLabel","bui.calendar.nextMonth","bui.calendar.nextYear","bui.calendar.previousMonth","bui.calendar.previousYear","bui.calendar.selectMonth","bui.calendar.selectYear","bui.colorInput.add","bui.colorInput.addColor","bui.colorInput.cancel","bui.colorInput.colorFormat","bui.colorInput.colorPresets","bui.colorInput.customColors","bui.colorInput.hexField","bui.colorInput.indeterminate","bui.colorInput.newColor","bui.colorInput.noColor","bui.colorInput.removeColor","bui.colorInput.transparent","bui.colorSwatch.none","bui.dateField.openCalendar","bui.drawer.close","bui.editor.action","bui.editor.addLink","bui.editor.backgroundColor","bui.editor.bold","bui.editor.cancel","bui.editor.close","bui.editor.copy","bui.editor.cut","bui.editor.editLink","bui.editor.editingArea","bui.editor.fontColor","bui.editor.help","bui.editor.italic","bui.editor.linkAnnotation","bui.editor.mention","bui.editor.openHelpDialog","bui.editor.paste","bui.editor.redo","bui.editor.removeLink","bui.editor.save","bui.editor.selectAll","bui.editor.shortcut","bui.editor.submit","bui.editor.toolbarFocus","bui.editor.underline","bui.editor.undo","bui.fileInput.chooseFile","bui.fileInput.fileCount","bui.fileInput.noFileChosen","bui.fileList.loading","bui.fileList.removeHint","bui.fileUploader.dropzoneLabel","bui.fileUploader.uploadButton","bui.freehandCanvas.canvasDescription","bui.freehandCanvas.canvasLabel","bui.freehandCanvas.redo","bui.freehandCanvas.undo","bui.imageDropZone.selectImage","bui.imageGallery.cancel","bui.imageGallery.delete","bui.imageGallery.loading","bui.inlineAlert.close","bui.pagination.goToPage","bui.pagination.nextPage","bui.pagination.pageXofY","bui.pagination.prevPage","bui.select.clear","bui.select.more","bui.select.search","bui.select.selectAll","bui.stepper.completed","bui.stepper.label","bui.stepper.step","bui.table.loading","bui.tag.remove","bui.taggedPagination.nextPage","bui.taggedPagination.prevPage","bui.toolbar.more","bui.treeView.collapse","bui.treeView.expand","bui.treeView.rename","bui.useMedia.paused","bui.useMedia.playing","bui.videoPlayer.enterFullScreen","bui.videoPlayer.exitFullScreen","bui.videoPlayer.loading","bui.videoPlayer.mute","bui.videoPlayer.pause","bui.videoPlayer.play","bui.videoPlayer.unmute","bui.videoPlayer.videoTimeline"],i={close:["bui.alertDialog.close","bui.drawer.close","bui.editor.close","bui.inlineAlert.close"],audioTimeline:["bui.audioPlayer.audioTimeline"],pause:["bui.audioPlayer.pause","bui.videoPlayer.pause"],play:["bui.audioPlayer.play","bui.videoPlayer.play"],more:["bui.buttonSelect.more","bui.select.more","bui.toolbar.more"],moreWithLabel:["bui.buttonSelect.moreWithLabel"],nextMonth:["bui.calendar.nextMonth"],nextYear:["bui.calendar.nextYear"],previousMonth:["bui.calendar.previousMonth"],previousYear:["bui.calendar.previousYear"],selectMonth:["bui.calendar.selectMonth"],selectYear:["bui.calendar.selectYear"],add:["bui.colorInput.add"],addColor:["bui.colorInput.addColor"],cancel:["bui.colorInput.cancel","bui.editor.cancel","bui.imageGallery.cancel"],colorFormat:["bui.colorInput.colorFormat"],colorPresets:["bui.colorInput.colorPresets"],customColors:["bui.colorInput.customColors"],hexField:["bui.colorInput.hexField"],indeterminate:["bui.colorInput.indeterminate"],newColor:["bui.colorInput.newColor"],noColor:["bui.colorInput.noColor"],removeColor:["bui.colorInput.removeColor"],transparent:["bui.colorInput.transparent"],none:["bui.colorSwatch.none"],openCalendar:["bui.dateField.openCalendar"],action:["bui.editor.action"],addLink:["bui.editor.addLink"],backgroundColor:["bui.editor.backgroundColor"],bold:["bui.editor.bold"],copy:["bui.editor.copy"],cut:["bui.editor.cut"],editLink:["bui.editor.editLink"],editingArea:["bui.editor.editingArea"],fontColor:["bui.editor.fontColor"],help:["bui.editor.help"],italic:["bui.editor.italic"],linkAnnotation:["bui.editor.linkAnnotation"],mention:["bui.editor.mention"],openHelpDialog:["bui.editor.openHelpDialog"],paste:["bui.editor.paste"],redo:["bui.editor.redo","bui.freehandCanvas.redo"],removeLink:["bui.editor.removeLink"],save:["bui.editor.save"],selectAll:["bui.editor.selectAll","bui.select.selectAll"],shortcut:["bui.editor.shortcut"],submit:["bui.editor.submit"],toolbarFocus:["bui.editor.toolbarFocus"],underline:["bui.editor.underline"],undo:["bui.editor.undo","bui.freehandCanvas.undo"],chooseFile:["bui.fileInput.chooseFile"],fileCount:["bui.fileInput.fileCount"],noFileChosen:["bui.fileInput.noFileChosen"],loading:["bui.fileList.loading","bui.imageGallery.loading","bui.table.loading","bui.videoPlayer.loading"],removeHint:["bui.fileList.removeHint"],dropzoneLabel:["bui.fileUploader.dropzoneLabel"],uploadButton:["bui.fileUploader.uploadButton"],canvasDescription:["bui.freehandCanvas.canvasDescription"],canvasLabel:["bui.freehandCanvas.canvasLabel"],selectImage:["bui.imageDropZone.selectImage"],delete:["bui.imageGallery.delete"],goToPage:["bui.pagination.goToPage"],nextPage:["bui.pagination.nextPage","bui.taggedPagination.nextPage"],pageXofY:["bui.pagination.pageXofY"],prevPage:["bui.pagination.prevPage","bui.taggedPagination.prevPage"],clear:["bui.select.clear"],search:["bui.select.search"],completed:["bui.stepper.completed"],label:["bui.stepper.label"],step:["bui.stepper.step"],remove:["bui.tag.remove"],collapse:["bui.treeView.collapse"],expand:["bui.treeView.expand"],rename:["bui.treeView.rename"],paused:["bui.useMedia.paused"],playing:["bui.useMedia.playing"],enterFullScreen:["bui.videoPlayer.enterFullScreen"],exitFullScreen:["bui.videoPlayer.exitFullScreen"],mute:["bui.videoPlayer.mute"],unmute:["bui.videoPlayer.unmute"],videoTimeline:["bui.videoPlayer.videoTimeline"]};export{e as a,i as b};
@@ -0,0 +1,10 @@
1
+ import {a as a$4}from'./chunk-CFU5AQZ4.mjs';import {a as a$d}from'./chunk-G5JW7B2K.mjs';import {a as a$f}from'./chunk-RCX7NNM3.mjs';import {a as a$3,b}from'./chunk-DNZMQ7EA.mjs';import {a as a$2}from'./chunk-XDTKLQJB.mjs';import {a as a$g}from'./chunk-ZLG42OHF.mjs';import {c as c$1}from'./chunk-RIX32JXL.mjs';import {b as b$4}from'./chunk-ULARAZ62.mjs';import {a as a$c}from'./chunk-DIL5HL6K.mjs';import {a as a$e}from'./chunk-U6252C5R.mjs';import {a as a$1}from'./chunk-RPIUPWPO.mjs';import {a as a$h}from'./chunk-TZSRU3GG.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-I5YPTKMM.mjs';import {b as b$3,j as j$1}from'./chunk-QDMG3P5Z.mjs';import {a as a$b}from'./chunk-EYKQGC4O.mjs';import {a as a$a}from'./chunk-FPM5UJRF.mjs';import {a as a$8}from'./chunk-3K6XNSYE.mjs';import {a as a$6}from'./chunk-ELW6SXDM.mjs';import {a as a$7}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {c,f,g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import B from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var me="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",ce="_14uvjig2 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",ye="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6jz _1yep5z6k0 _1yep5z6k1",fe=a({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ez",variantClassNames:{hasNumberInput:{false:"_1yep5z6p1 _1yep5z6p2 _1yep5z6p3"}},defaultVariants:{},compoundVariants:[]}),be=a({defaultClassName:"_14uvjiga _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6gh _1yep5z6m5 _1yep5z6lq",variantClassNames:{active:{true:"_14uvjigb _1yep5z6136 _1yep5z618x _1yep5z618p"},isDisabled:{true:"_14uvjigc _1yep5z613a"},isReadOnly:{true:"_1yep5z615l _1yep5z615m _1yep5z615n"},isFocusVisible:{true:"_14uvjige _1yep5z6136 _1yep5z6189"},isHovered:{true:"_14uvjigf _1yep5z6136"}},defaultVariants:{},compoundVariants:[]}),_e="z9nup8a _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",ze="_14uvjig3 z9nup87 _1yep5z6gd _1yep5z6m3",ge=a({defaultClassName:"_14uvjig4 _1yep5z6gh _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6m4",variantClassNames:{active:{true:"_1yep5z6136"},isFocusVisible:{true:"_1yep5z6136"},isDisabled:{true:"_1yep5z613a"},isHovered:{true:"_1yep5z6136"}},defaultVariants:{},compoundVariants:[]});function V(l,t){let e=l/t;return Math.abs(e-Math.round(e))<1e-9}function Ce(l,t=1,e=0){let{maximumFractionDigits:p=0,roundingIncrement:s=1,style:r}=l.resolvedOptions(),a=s*10**-p/(r==="percent"?100:1),o=t.toString().split(".")[1]?.length??0;return t>=a&&V(t,a)&&V(e,a)&&V(e,10**-o)}var N=B.forwardRef(({className:l,style:t,onChange:e,onChangeEnd:p,numberFormatOptions:s,isDisabled:r,step:a,minValue:o,maxValue:f$1,value:b,"aria-label":u,"aria-labelledby":i,"aria-details":c$2,"aria-describedby":y,"data-block-id":_,"data-block-class":I,defaultValue:T,isReadOnly:z,label:g,description:j,id:x,includeNumberInput:v,numberInputClassName:P,numberInputStyle:je},xe)=>{let H=B.useRef(null),A=c(),M={onChange:e===void 0?void 0:S=>{e(S[0]);},isDisabled:r||z,step:a,minValue:o,maxValue:f$1,onChangeEnd:p===void 0?void 0:S=>{p(S[0]);},value:b===void 0?void 0:[b],defaultValue:T===void 0?void 0:[T],"aria-label":u,"aria-labelledby":i,"aria-details":c$2,"aria-describedby":[j?A:void 0,y].filter(Boolean).join(" ")||void 0,id:x,label:g},L=a$1(s),h=a$2({...M,numberFormatter:L}),{trackProps:Pe,groupProps:ke,labelProps:U}=a$3(M,h,H),Te=Ce(L,a,o)?{step:a,minValue:o,maxValue:f$1}:void 0,E=jsx(a$4,{variant:"ghost",showStepper:false,className:P,"aria-label":u,"aria-labelledby":[U.id,i].filter(Boolean).join(" ")||void 0,...Te,isDisabled:r,isReadOnly:z,value:h.getThumbValue(0),formatOptions:s,onChange:S=>{Number.isNaN(S)||(h.setThumbDragging(0,true),h.setThumbValue(0,S),h.setThumbDragging(0,false));},style:{width:60,textAlign:"right",flexShrink:0,...je}});return jsxs("div",{...ke,style:t,"data-block-id":_,"data-block-class":I,className:a$5(me,"BaselineUI-Slider",l),children:[g?jsxs("div",{className:ye,children:[jsx("label",{...U,className:a$5(fe({hasNumberInput:!!v}),"BaselineUI-Slider-Label"),children:g}),v?E:null]}):null,jsxs("div",{className:ce,children:[jsx("div",{...Pe,className:a$5(ze,"BaselineUI-Slider-Track"),ref:f(H,xe),"data-testid":"track",children:jsx(Ne,{state:h,trackRef:H,isDisabled:r,isReadOnly:z})}),v&&!g?E:null]}),c$1({description:j,descriptionProps:{id:A},errorMessageProps:{},isDisabled:r})]})});N.displayName="Slider";function Ne({state:l,trackRef:t,isDisabled:e,isReadOnly:p}){let s=B.useRef(null),{thumbProps:r,inputProps:a,isDragging:o}=b({trackRef:t,inputRef:s},l),{focusProps:f,isFocused:b$3,isFocusVisible:u}=a$6(),{hoverProps:i,isHovered:c}=a$7({isDisabled:e}),{direction:y}=b$1(),_=a$8({"data-disabled":e,"data-readonly":p,"data-hovered":c,"data-focus-visible":u,"data-dragging":o,"data-focused":b$3});return jsxs(Fragment,{children:[jsx("div",{className:a$5(ge({isDisabled:e,isFocusVisible:u,active:o,isHovered:c}),"BaselineUI-Slider-TrackHighlight"),style:{width:y==="rtl"?`calc(100% - ${r.style?.left})`:r.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...g(r,i,_),className:a$5(_e,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:a$5(be({isDisabled:e,isFocusVisible:u,active:o,isReadOnly:p,isHovered:c}),"BaselineUI-Slider-Thumb")}),jsx(b$2,{children:jsx("input",{ref:s,...g(a,f)})})]})]})}var Se=B.forwardRef(({className:l,style:t,onChange:e,"data-block-id":p,icon:s,formatValue:r=y=>y,tooltip:a=true,iconTooltip:o=true,popoverContentProps:f,isDisabled:b,onTriggerPress:u,...i},c)=>{let y=a$9(c),[_,I]=a$a(i.value,i.defaultValue||0,e),[T,z]=B.useState(false),{keyboardProps:g}=j({onKeyDown:P=>{P.key==="Enter"||P.key==="Escape"?z(false):P.continuePropagation();}}),{tooltipProps:j$2}=a$b({label:i["aria-label"],tooltip:a}),x=r(_||0),v=j$2?.isDisabled||i["aria-label"]?`${i["aria-label"]}, ${x}`:x.toString();return jsxs(a$c,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$5("BaselineUI-IconSlider",l),"data-block-id":p,style:t,ref:y,children:[s?jsx(a$d,{icon:s,label:i["aria-label"],tooltip:o,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsxs(b$3,{type:"dialog",isOpen:T,onOpenChange:z,children:[jsx(j$1,{children:jsx(a$e,{...j$2,children:jsx(b$4,{label:x,variant:"popover","aria-label":v,isDisabled:b,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"},onPressStart:u})})}),jsx(a$f,{placement:"bottom start",...f,children:jsx(a$g,{size:"content","aria-label":v,children:jsx(a$h,{autoFocus:true,children:jsx(a$c,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...g,children:jsx(N,{...i,onChange:I,value:_})})})})})]})]})});Se.displayName="IconSlider";export{N as a,Se as b};
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-QRLUWOGW.mjs';import {a as a$8}from'./chunk-GKPZBTRE.mjs';import {a as a$5}from'./chunk-JBXZ6ZHP.mjs';import {a as a$d}from'./chunk-BPW4QRPV.mjs';import {a as a$f}from'./chunk-QMP72J5L.mjs';import {a as a$e}from'./chunk-DIL5HL6K.mjs';import {a as a$c}from'./chunk-46UWKP7W.mjs';import {a as a$4}from'./chunk-G2IYZES5.mjs';import {a as a$a}from'./chunk-NIGOM3FD.mjs';import {a as a$b,b as b$1}from'./chunk-3K6XNSYE.mjs';import {a as a$7}from'./chunk-ELW6SXDM.mjs';import {a as a$9}from'./chunk-2PTLJDIT.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$6,f,g,c}from'./chunk-V2C4UDOC.mjs';import {a as a$3,b}from'./chunk-TYOEGCPS.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 tt from'just-camel-case';import*as ct from'comlink';/**
1
+ import {a as a$8}from'./chunk-GKPZBTRE.mjs';import {a as a$2}from'./chunk-QRLUWOGW.mjs';import {a as a$5}from'./chunk-JBXZ6ZHP.mjs';import {a as a$d}from'./chunk-BPW4QRPV.mjs';import {a as a$f}from'./chunk-QMP72J5L.mjs';import {a as a$e}from'./chunk-DIL5HL6K.mjs';import {a as a$c}from'./chunk-46UWKP7W.mjs';import {a as a$4}from'./chunk-QARYQDRQ.mjs';import {a as a$a}from'./chunk-NIGOM3FD.mjs';import {a as a$b,b as b$1}from'./chunk-3K6XNSYE.mjs';import {a as a$7}from'./chunk-ELW6SXDM.mjs';import {a as a$9}from'./chunk-2PTLJDIT.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$6,f,g,c}from'./chunk-V2C4UDOC.mjs';import {a as a$3,b}from'./chunk-TYOEGCPS.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 tt from'just-camel-case';import*as ct from'comlink';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-V3DTS6FF.mjs';import {b as b$2}from'./chunk-LPHX7UMQ.mjs';import {b,c}from'./chunk-MQCTOCK2.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import C,{useContext}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-V3DTS6FF.mjs';import {b as b$2}from'./chunk-LPHX7UMQ.mjs';import {b,c}from'./chunk-DD2TRFO4.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import C,{useContext}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b,a as a$5}from'./chunk-HOZPCWCF.mjs';import {a as a$1,f as f$1}from'./chunk-V6ZIMZ53.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$f,q}from'./chunk-OYE6VSTU.mjs';import {a as a$9}from'./chunk-2MS356Q7.mjs';import {a as a$e}from'./chunk-C6TD53KY.mjs';import {b as b$1,a as a$6,c as c$1}from'./chunk-6RN7DKRF.mjs';import {a as a$b}from'./chunk-EJGGWOY5.mjs';import {b as b$3}from'./chunk-P3RRGPNM.mjs';import {a as a$d}from'./chunk-WSDEMATI.mjs';import {f}from'./chunk-CFDIUF4H.mjs';import {a as a$4}from'./chunk-NIGOM3FD.mjs';import {a as a$h}from'./chunk-5IC46G5J.mjs';import {a as a$c}from'./chunk-EYKQGC4O.mjs';import {a as a$a}from'./chunk-3K6XNSYE.mjs';import {a as a$8}from'./chunk-ELW6SXDM.mjs';import {a as a$7}from'./chunk-LRFFL765.mjs';import {j as j$1}from'./chunk-AIG23SN5.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {e,c,g,f as f$2}from'./chunk-V2C4UDOC.mjs';import {j,h}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$g}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {b,a as a$5}from'./chunk-667TGPFX.mjs';import {a as a$1,f as f$1}from'./chunk-V6ZIMZ53.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$f,q}from'./chunk-OYE6VSTU.mjs';import {a as a$9}from'./chunk-2MS356Q7.mjs';import {a as a$e}from'./chunk-RCX7NNM3.mjs';import {b as b$1,a as a$6,c as c$1}from'./chunk-RIX32JXL.mjs';import {a as a$b}from'./chunk-EJGGWOY5.mjs';import {b as b$3}from'./chunk-ULARAZ62.mjs';import {a as a$d}from'./chunk-U6252C5R.mjs';import {f}from'./chunk-CFDIUF4H.mjs';import {a as a$4}from'./chunk-NIGOM3FD.mjs';import {a as a$h}from'./chunk-5IC46G5J.mjs';import {a as a$c}from'./chunk-EYKQGC4O.mjs';import {a as a$a}from'./chunk-3K6XNSYE.mjs';import {a as a$8}from'./chunk-ELW6SXDM.mjs';import {a as a$7}from'./chunk-LRFFL765.mjs';import {j as j$1}from'./chunk-AIG23SN5.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {e,c,g,f as f$2}from'./chunk-V2C4UDOC.mjs';import {j,h}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$g}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-6IK2TDLH.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-G2RVM2KB.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-3A7ZISTE.mjs';import {a as a$7}from'./chunk-G2IYZES5.mjs';import {a as a$1}from'./chunk-V3DTS6FF.mjs';import {a as a$8}from'./chunk-LPHX7UMQ.mjs';import {b}from'./chunk-M3NJURGR.mjs';import {h,g,f,e,a as a$9,c as c$2,d as d$1}from'./chunk-QDMG3P5Z.mjs';import {c as c$1}from'./chunk-SMPF53W4.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {a as a$3,g as g$1}from'./chunk-V2C4UDOC.mjs';import {a as a$b,b as b$1}from'./chunk-TYOEGCPS.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
1
+ import {a as a$2}from'./chunk-5I4MVN7X.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-FOCVZZPT.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-3A7ZISTE.mjs';import {a as a$7}from'./chunk-QARYQDRQ.mjs';import {a as a$1}from'./chunk-V3DTS6FF.mjs';import {a as a$8}from'./chunk-LPHX7UMQ.mjs';import {b}from'./chunk-M3NJURGR.mjs';import {h,g,f,e,a as a$9,c as c$2,d as d$1}from'./chunk-QDMG3P5Z.mjs';import {c as c$1}from'./chunk-SMPF53W4.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {a as a$3,g as g$1}from'./chunk-V2C4UDOC.mjs';import {a as a$b,b as b$1}from'./chunk-TYOEGCPS.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,c as c$1,d}from'./chunk-IIYP5UE7.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {f}from'./chunk-V2C4UDOC.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a,b as b$1,c as c$1,d}from'./chunk-X6RWEBD6.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {f}from'./chunk-V2C4UDOC.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$4}from'./chunk-KOPAIJJU.mjs';import {a as a$5}from'./chunk-4FN6UAXD.mjs';import {a as a$2}from'./chunk-7JE2SRIH.mjs';import {d}from'./chunk-IIYP5UE7.mjs';import {q}from'./chunk-OYE6VSTU.mjs';import {b}from'./chunk-3EFE2WAJ.mjs';import {c as c$1,b as b$1}from'./chunk-JYWJE6L5.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$6}from'./chunk-L7GYT3MC.mjs';import {b as b$2}from'./chunk-I5YPTKMM.mjs';import {j}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import c from'react';import {PagePortraitIcon}from'@baseline-ui/icons/24';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$4}from'./chunk-KOPAIJJU.mjs';import {a as a$5}from'./chunk-4FN6UAXD.mjs';import {a as a$2}from'./chunk-7JE2SRIH.mjs';import {d}from'./chunk-X6RWEBD6.mjs';import {q}from'./chunk-OYE6VSTU.mjs';import {b}from'./chunk-3EFE2WAJ.mjs';import {c as c$1,b as b$1}from'./chunk-WBLMAN7U.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$6}from'./chunk-HN2XJOQL.mjs';import {b as b$2}from'./chunk-I5YPTKMM.mjs';import {j}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import c from'react';import {PagePortraitIcon}from'@baseline-ui/icons/24';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-XF65LVBQ.mjs';import {jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-JFS73ERR.mjs';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$5}from'./chunk-JZXLV6JU.mjs';import {a as a$2}from'./chunk-PTL6NSYA.mjs';import {b,c as c$1}from'./chunk-WBLMAN7U.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$4}from'./chunk-HN2XJOQL.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {c}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {CaretRightIcon,CaretLeftIcon}from'@baseline-ui/icons/24';import {useGranularEffect}from'granular-hooks';import Q,{useCallback,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var L=a({defaultClassName:"_1bwul1t8 _1yep5z6m6 _1yep5z6me _1yep5z6ey _1yep5z6g9",variantClassNames:{size:{xs:"_1bwul1t9 _1yep5z6q7 _1yep5z6q8 _1yep5z6q9 _1yep5z6nv _1yep5z6nw _1yep5z6nx _1yep5z610e",sm:"_1bwul1ta _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610h",md:"_1bwul1tb _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610k"}},defaultVariants:{},compoundVariants:[]}),E=a({defaultClassName:"_1bwul1t3 _1yep5z6ez",variantClassNames:{size:{xs:"_1yep5z610e",sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),Y={xs:"_1bwul1t0",sm:"_1bwul1t1",md:"_1bwul1t2"};var j=Q.forwardRef(({className:V,style:ee,size:p="md",isDisabled:i,decrementAriaLabel:te,incrementAriaLabel:ne,"data-block-id":ae,"data-block-class":re,label:ie,onChange:F,onBlur:k,onKeyDown:B,minValue:o=Number.NEGATIVE_INFINITY,maxValue:n=Number.POSITIVE_INFINITY,defaultValue:oe,value:se,description:w=g=>Number.isFinite(n)?`${g} / ${n}`:`${g}`,onInputChange:de,onChangeSuccess:le,step:y=1,valueToLabelMap:u,isDecrementButtonDisabled:pe,isIncrementButtonDisabled:ue,...d},ce)=>{let g=b(),{direction:q}=b$1(),me=Q.useRef(null),O=c(),S=c(),a=useCallback(e=>u?u.get(e)??e.toString():e.toString(),[u]),D=useCallback(e=>{if(u){let M=[...u.entries()].find(([,fe])=>fe===e);if(M)return M[0]}let r=e.trim();return /^-?\d+$/.test(r)?Number(r):Number.NaN},[u]),[t,c$1]=a$1(se,oe??1,le),[b$2,m]=useState(a(t)??""),z=t<=o||i||pe,P=t>=n||i||ue,f=useCallback(e=>{if(!e){m(a(t));return}if(e===a(t))return;let r=D(e);if(r!==t&&F?.(e),Number.isNaN(r)){m(a(t)??"");return}r>=o&&r<=n&&!i&&!d.isReadOnly?(c$1(r),m(a(r))):m(a(t));},[F,D,o,n,i,d.isReadOnly,a,t,c$1]),_=useCallback(e=>e>=o&&e<=n,[o,n]),ge=useCallback(e=>{f(b$2),k?.(e);},[b$2,f,k]),h=useCallback(()=>{if(P)return;let e=Math.min(t+y,n);_(e)&&c$1(e);},[t,P,_,n,c$1,y]),x=useCallback(()=>{if(z)return;let e=Math.max(t-y,o);_(e)&&c$1(e);},[t,z,_,o,c$1,y]),be=useCallback(e=>{if(d.isReadOnly)e.continuePropagation();else switch(e.key){case "Enter":{f(b$2);break}case "ArrowUp":{h();break}case "ArrowDown":{x();break}default:e.continuePropagation();}B?.(e);},[d.isReadOnly,B,f,b$2,h,x]);useGranularEffect(()=>{m(a(t));},[t],[a]);let v=typeof w=="function"?w(t):w,{inputProps:ye}=a$2({...d,value:b$2?.toString(),isDisabled:i,onBlur:ge,onChange:e=>{m(e),de?.(e);},onKeyDown:be,"aria-labelledby":O,"aria-describedby":v?S:void 0},me);return jsxs(a$3,{className:a$6(Y[p],V),display:"flex",flexDirection:"row",alignItems:"center","data-block-id":ae,"data-block-class":re,style:ee,ref:ce,"data-disabled":i||void 0,children:[jsx("span",{id:O,className:E({size:p,isDisabled:i}),children:ie}),jsxs(a$3,{display:"flex",flexDirection:"row",borderRadius:"sm",borderColor:"border.subtle",borderStyle:"solid",borderWidth:1,style:{height:"inherit"},children:[jsx(a$4,{icon:q==="rtl"?CaretRightIcon:CaretLeftIcon,elementType:"div",size:p,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-DecrementButton",isExcludedFromRovingFocus:true,isDisabled:z||d.isReadOnly,excludeFromTabOrder:true,onPress:x,"aria-label":te||g.formatMessage(X.prevPage),tooltip:true}),jsx(a$5,{orientation:"vertical"}),jsx("input",{...ye,className:L({size:p}),min:o,max:n}),jsx(a$5,{orientation:"vertical"}),jsx(a$4,{icon:q==="rtl"?CaretLeftIcon:CaretRightIcon,elementType:"div",size:p,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-IncrementButton",isExcludedFromRovingFocus:true,isDisabled:P||d.isReadOnly,excludeFromTabOrder:true,onPress:h,"aria-label":ne||g.formatMessage(X.nextPage),tooltip:true})]}),v?jsx("span",{id:S,className:E({size:p,isDisabled:i}),children:v}):null]})});j.displayName="TaggedPagination";var X=c$1({nextPage:{defaultMessage:"Next Page",id:"bui.taggedPagination.nextPage"},prevPage:{defaultMessage:"Previous Page",id:"bui.taggedPagination.prevPage"}});export{j as a};
@@ -1,4 +1,4 @@
1
- import {a as a$5}from'./chunk-LJM26E7W.mjs';import {a as a$a}from'./chunk-6DVKR25T.mjs';import {a as a$9}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$c}from'./chunk-C6TD53KY.mjs';import {b as b$3,e as e$1}from'./chunk-G2RVM2KB.mjs';import {b,c}from'./chunk-JYWJE6L5.mjs';import {b as b$5}from'./chunk-P3RRGPNM.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$7}from'./chunk-L7GYT3MC.mjs';import {a as a$3}from'./chunk-TZSRU3GG.mjs';import {a as a$2}from'./chunk-5IC46G5J.mjs';import {b as b$4}from'./chunk-N2XGJKZG.mjs';import {b as b$6,j as j$2}from'./chunk-QDMG3P5Z.mjs';import {e}from'./chunk-JANI446W.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b as b$2,a as a$1,g,f}from'./chunk-V2C4UDOC.mjs';import {j as j$1,b as b$7,i,a as a$b,h}from'./chunk-TYOEGCPS.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import O,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$5}from'./chunk-BNTMAM3S.mjs';import {a as a$a}from'./chunk-6DVKR25T.mjs';import {a as a$9}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$c}from'./chunk-RCX7NNM3.mjs';import {b as b$3,e as e$1}from'./chunk-FOCVZZPT.mjs';import {b,c}from'./chunk-WBLMAN7U.mjs';import {b as b$5}from'./chunk-ULARAZ62.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$7}from'./chunk-HN2XJOQL.mjs';import {a as a$3}from'./chunk-TZSRU3GG.mjs';import {a as a$2}from'./chunk-5IC46G5J.mjs';import {b as b$4}from'./chunk-N2XGJKZG.mjs';import {b as b$6,j as j$2}from'./chunk-QDMG3P5Z.mjs';import {e}from'./chunk-JANI446W.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b as b$2,a as a$1,g,f}from'./chunk-V2C4UDOC.mjs';import {j as j$1,b as b$7,i,a as a$b,h}from'./chunk-TYOEGCPS.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import O,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-3JHXI33A.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-3A7ZISTE.mjs';import {a as a$2}from'./chunk-46UWKP7W.mjs';import {f as f$1}from'./chunk-CFDIUF4H.mjs';import {a as a$8}from'./chunk-G2IYZES5.mjs';import {a as a$6}from'./chunk-V3DTS6FF.mjs';import {b}from'./chunk-A455VRNY.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$2,c as c$1}from'./chunk-PV4E7XDP.mjs';import {a as a$a}from'./chunk-LRFFL765.mjs';import {b as b$1,c as c$2}from'./chunk-AIG23SN5.mjs';import {a as a$1,g,f,c}from'./chunk-V2C4UDOC.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$c}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import F,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-3JHXI33A.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-3A7ZISTE.mjs';import {a as a$2}from'./chunk-46UWKP7W.mjs';import {f as f$1}from'./chunk-CFDIUF4H.mjs';import {a as a$8}from'./chunk-QARYQDRQ.mjs';import {a as a$6}from'./chunk-V3DTS6FF.mjs';import {b}from'./chunk-G67TAFNZ.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$2,c as c$1}from'./chunk-PV4E7XDP.mjs';import {a as a$a}from'./chunk-LRFFL765.mjs';import {b as b$1,c as c$2}from'./chunk-AIG23SN5.mjs';import {a as a$1,g,f,c}from'./chunk-V2C4UDOC.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$c}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import F,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$4}from'./chunk-4CMATAQ2.mjs';import {a as a$2}from'./chunk-2MS356Q7.mjs';import {c as c$1}from'./chunk-RIX32JXL.mjs';import {e,f,d,h,g}from'./chunk-JFS73ERR.mjs';import {b,c as c$2}from'./chunk-WBLMAN7U.mjs';import {b as b$1}from'./chunk-ULARAZ62.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$3}from'./chunk-3K6XNSYE.mjs';import {a as a$1}from'./chunk-ELW6SXDM.mjs';import {c}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import Q 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 G="_1hgzo20",J=a({defaultClassName:"_1hgzo22 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ey _1yep5z6dy",variantClassNames:{isPlaceholder:{true:"_1hgzo23"},isDisabled:{true:"_1hgzo24"}},defaultVariants:{},compoundVariants:[]}),K="_1hgzo21 _1yep5z69c _1yep5z69d _1yep5z69e";function ve(n,u,i){return n.length===0?u:n.length===1?n[0].name:i(n.length)}var X=Q.forwardRef(({className:n,style:u,label:i,buttonLabel:h$1,placeholder:y,description:I,errorMessage:l,warningMessage:F,validationState:Y,labelPosition:o="top",isDisabled:a,autoFocus:Z,buttonStyle:$,buttonClassName:ee,onValueChange:te,onSelect:ne,acceptedFileTypes:oe,allowsMultiple:ie,defaultCamera:ae,acceptDirectory:se,"aria-label":v,"aria-describedby":re,...le},de)=>{let{formatMessage:c$2}=b(),[b$2,pe]=Q.useState([]),z=c(),C=c(),_=c(),x=c(),w=c(),N=c(),{isFocusVisible:ue,focusProps:ce}=a$1({within:true}),s=l?"error":Y,f$1=s==="warning"&&!!F,fe=l?x:f$1?w:I?_:void 0,d$1=c$1({description:l||f$1?void 0:I,errorMessage:l,warningMessage:f$1?F:void 0,descriptionProps:{id:_},errorMessageProps:{id:x},warningMessageProps:{id:w},labelPosition:o,isDisabled:a}),M=e=>e.filter(Boolean).join(" ")||void 0,me=v?void 0:M([i?z:void 0,C]),ge=M([re,fe,N]),he=e=>{let B=e?[...e]:[];pe(B),te?.(B),ne?.(e);},ye=ve(b$2,y===void 0?c$2(m.noFileChosen):y,e=>c$2(m.fileCount,{count:e,countText:String(e)})),Ie=b$2.length===0,S=a$2({validationState:s}),Fe=a$3({"data-disabled":a,"data-validation-state":s});return jsx(a$4,{acceptedFileTypes:oe,allowsMultiple:ie,defaultCamera:ae,acceptDirectory:se,onSelect:he,children:jsxs("div",{ref:de,...le,...Fe,className:a$6("BaselineUI-FileInput",g({labelPosition:o}),n),style:u,children:[i||o==="start"&&d$1?jsxs("div",{className:f({labelPosition:o,hasMessage:!!d$1}),children:[jsx(a$5,{id:z,elementType:"span",className:e,children:i}),o==="start"&&d$1]}):null,jsxs("div",{...ce,className:a$6(h({validationState:s,isDisabled:a,variant:"primary",isFocused:ue,isHovered:false,isReadOnly:false}),K),children:[jsx(b$1,{id:C,"data-testid":"file-input-button",label:h$1===void 0?c$2(m.chooseFile):h$1,variant:"primary",size:"sm",autoFocus:Z,isDisabled:a,"aria-label":v,"aria-labelledby":me,"aria-describedby":ge,style:$,className:a$6(G,ee)}),jsx("span",{id:N,className:J({isPlaceholder:Ie,isDisabled:a}),children:ye}),S?jsx(S,{className:d({validationState:s}),size:16}):null]}),o==="top"&&d$1]})})});X.displayName="FileInput";var m=c$2({chooseFile:{defaultMessage:"Choose file",id:"bui.fileInput.chooseFile"},noFileChosen:{defaultMessage:"No file chosen",id:"bui.fileInput.noFileChosen"},fileCount:{defaultMessage:"{count, plural, other {{countText} files}}",id:"bui.fileInput.fileCount"}});export{X as a};
@@ -1,4 +1,4 @@
1
- import {c}from'./chunk-RO5ZRU3Y.mjs';import {a as a$7}from'./chunk-L7GYT3MC.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$5}from'./chunk-3K6XNSYE.mjs';import {a as a$2}from'./chunk-ELW6SXDM.mjs';import {a as a$3}from'./chunk-LRFFL765.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$6,g}from'./chunk-V2C4UDOC.mjs';import {a as a$1}from'./chunk-JQQGRJ5J.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {TrashIcon}from'@baseline-ui/icons/16';import*as R from'dompurify';import F from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {c}from'./chunk-RO5ZRU3Y.mjs';import {a as a$7}from'./chunk-HN2XJOQL.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$5}from'./chunk-3K6XNSYE.mjs';import {a as a$2}from'./chunk-ELW6SXDM.mjs';import {a as a$3}from'./chunk-LRFFL765.mjs';import {d}from'./chunk-MMLAKHLR.mjs';import {a as a$6,g}from'./chunk-V2C4UDOC.mjs';import {a as a$1}from'./chunk-JQQGRJ5J.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {TrashIcon}from'@baseline-ui/icons/16';import*as R from'dompurify';import F 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
@@ -7,4 +7,4 @@ import {c}from'./chunk-RO5ZRU3Y.mjs';import {a as a$7}from'./chunk-L7GYT3MC.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var N="_1vm2oh49 _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6gc",a="_1vm2oh48 _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km",j=a$1({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m9 _1yep5z6m7 _1yep5z6is _1yep5z6ma _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6m5 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z613z _1yep5z618y _1yep5z6190",false:"_1yep5z6135"},isFocusVisible:{true:"_1yep5z614b _1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zt"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61pm"],[{accent:"theme",isInline:true},"_1yep5z61pb"],[{accent:"positive",isInline:false},"_1yep5z61po"],[{accent:"theme",isInline:false},"_1yep5z61pd"],[{isFocusVisible:true,isInline:true},"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vc"],[{isHovered:true,isInline:true},"_1yep5z61vc _1yep5z61rf _1yep5z61v9 _1yep5z61vb"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61pn"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61pf"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61pc"]]});var T=F.forwardRef(({className:V,style:g$1,isDisabled:e,isInline:n=true,imageAlt:i,imageSrc:o,svgSrc:p,textValue:t,textStyle:q,onPress:E,onDelete:z,deleteAriaLabel:M,addAriaLabel:_,accent:U="positive","data-block-id":Y,"data-block-class":G,...r},J)=>{let{focusProps:m,isFocused:K,isFocusVisible:l}=a$2({within:true}),{isHovered:u,hoverProps:v}=a$3({isDisabled:e}),{pressProps:c$1}=d({isDisabled:e,onPress:E});a$4(o||p||t,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let f=a$5({"data-hovered":u,"data-focus-visible":l,"data-focused":K,"data-disabled":e}),[O,Q]=F.useState("");return a$6(()=>{Q(typeof p=="string"?R.default.sanitize(p):"");},[p]),jsxs("div",{...r,className:a$8(j({isInline:n,isFocusVisible:l,isDisabled:e,isHovered:u,accent:U}),"BaselineUI-Preview",V),"data-block-id":Y,"data-block-class":G,role:r["aria-label"]||r["aria-labelledby"]?"group":void 0,"aria-label":r["aria-label"]||i||t,style:g$1,ref:J,children:[typeof p=="string"?jsx("button",{disabled:e,...g(v,m,c$1,f),className:a,"aria-label":_||i||t,dangerouslySetInnerHTML:{__html:O}}):jsxs("button",{...g(v,m,c$1,f),disabled:e,style:q,"aria-label":_,className:a,children:[o?jsx("img",{src:o,alt:i,className:c({isInline:n,isDisabled:e})}):null,!!p&&typeof p=="object"&&p,t]}),z?jsx(a$7,{isDisabled:e,className:N,"aria-label":M,size:"xs",icon:TrashIcon,onPress:z}):null]})});T.displayName="Preview";export{T as a};
10
+ var N="_1vm2oh49 _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6gc",a="_1vm2oh48 _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km",j=a$1({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m9 _1yep5z6m7 _1yep5z6is _1yep5z6ma _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6m5 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z613z _1yep5z618y _1yep5z6190",false:"_1yep5z6135"},isFocusVisible:{true:"_1yep5z614b _1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zt"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61pm"],[{accent:"theme",isInline:true},"_1yep5z61pb"],[{accent:"positive",isInline:false},"_1yep5z61po"],[{accent:"theme",isInline:false},"_1yep5z61pd"],[{isFocusVisible:true,isInline:true},"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vc"],[{isHovered:true,isInline:true},"_1yep5z61vc _1yep5z61rf _1yep5z61v9 _1yep5z61vb"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61pn"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61pf"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61pc"]]});var T=F.forwardRef(({className:V,style:q,isDisabled:e,isInline:y=true,imageAlt:i,imageSrc:o,svgSrc:p,textValue:t,textStyle:g$1,onPress:E,onDelete:z,deleteAriaLabel:M,addAriaLabel:_,accent:U="positive","data-block-id":Y,"data-block-class":G,...r},J)=>{let{focusProps:m,isFocused:K,isFocusVisible:l}=a$2({within:true}),{isHovered:u,hoverProps:v}=a$3({isDisabled:e}),{pressProps:c$1}=d({isDisabled:e,onPress:E});a$4(o||p||t,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let f=a$5({"data-hovered":u,"data-focus-visible":l,"data-focused":K,"data-disabled":e}),[O,Q]=F.useState("");return a$6(()=>{Q(typeof p=="string"?R.default.sanitize(p):"");},[p]),jsxs("div",{...r,className:a$8(j({isInline:y,isFocusVisible:l,isDisabled:e,isHovered:u,accent:U}),"BaselineUI-Preview",V),"data-block-id":Y,"data-block-class":G,role:r["aria-label"]||r["aria-labelledby"]?"group":void 0,"aria-label":r["aria-label"]||i||t,style:q,ref:J,children:[typeof p=="string"?jsx("button",{disabled:e,...g(v,m,c$1,f),className:a,"aria-label":_||i||t,dangerouslySetInnerHTML:{__html:O}}):jsxs("button",{...g(v,m,c$1,f),disabled:e,style:g$1,"aria-label":_,className:a,children:[o?jsx("img",{src:o,alt:i,className:c({isInline:y,isDisabled:e})}):null,!!p&&typeof p=="object"&&p,t]}),z?jsx(a$7,{isDisabled:e,className:N,"aria-label":M,size:"xs",icon:TrashIcon,onPress:z}):null]})});T.displayName="Preview";export{T as a};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-BIDNNBRG.mjs';import {c}from'./chunk-CPX5CB4L.mjs';import {a as a$1}from'./chunk-NQIZ3U7Q.mjs';import {e}from'./chunk-EKRT3PPK.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {f,g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import R from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-BIDNNBRG.mjs';import {c}from'./chunk-7P6YVPSY.mjs';import {a as a$1}from'./chunk-NQIZ3U7Q.mjs';import {e}from'./chunk-EKRT3PPK.mjs';import {a as a$2}from'./chunk-3K6XNSYE.mjs';import {f,g}from'./chunk-V2C4UDOC.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import R 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
@@ -0,0 +1,10 @@
1
+ import {a as a$1,e}from'./chunk-FCKJCFMD.mjs';import {a as a$g,b as b$4}from'./chunk-DNZMQ7EA.mjs';import {a as a$j}from'./chunk-NIAMDJYU.mjs';import {a as a$h}from'./chunk-YYOOJMQZ.mjs';import {b,c}from'./chunk-WBLMAN7U.mjs';import {c as c$2}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$7}from'./chunk-U6252C5R.mjs';import {a as a$i}from'./chunk-RKPWFZB4.mjs';import {a as a$c}from'./chunk-RGWXVYDG.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$f}from'./chunk-I5YPTKMM.mjs';import {a as a$4}from'./chunk-EYKQGC4O.mjs';import {a as a$e}from'./chunk-BPXZ6J5G.mjs';import {a as a$k}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-5NVCSLXT.mjs';import {a as a$3}from'./chunk-3K6XNSYE.mjs';import {d}from'./chunk-PV4E7XDP.mjs';import {b as b$3,a as a$d}from'./chunk-2PTLJDIT.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-AIG23SN5.mjs';import {a as a$a,h,l}from'./chunk-2MNK24YJ.mjs';import {g,c as c$1}from'./chunk-V2C4UDOC.mjs';import {a as a$8}from'./chunk-SVIYLH7R.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Nr,{useMemo,useState,useCallback,useRef}from'react';import {flushSync}from'react-dom';import {themeVars}from'@baseline-ui/tokens';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 ne={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ye=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Je=e=>`${e.withChannelValue("saturation",0)}, transparent`,Pr={hue:Ye,saturation:Je,lightness:()=>"black, transparent, white"},wr={hue:Ye,saturation:Je,brightness:()=>"black, transparent"};function Ze({direction:e,state:r,zChannel:l,xChannel:t,yChannel:a}){return useMemo(()=>{let y=e==="rtl"?"left":"right",z={},S=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let i=a$1("rgb(0, 0, 0)");z={background:[`linear-gradient(to ${y}, ${i.withChannelValue(t,0)}, ${i.withChannelValue(t,255)})`,`linear-gradient(to top, ${i.withChannelValue(a,0)}, ${i.withChannelValue(a,255)})`,i.withChannelValue(l,S)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let i=r.value.getColorChannels(),s=a$1("hsl(0, 100%, 50%)").withChannelValue(l,S),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${Pr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),z={background:c.join(", ")};break}case "hsb":{let i=r.value.getColorChannels(),s=a$1("hsb(0, 100%, 100%)").withChannelValue(l,S),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${wr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),z={background:c.join(", ")};break}}let{x:f,y:d}=r.getThumbPosition();e==="rtl"&&(f=1-f);let h={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...h,...z}},thumbStyleProps:{style:{position:"absolute",left:`${f*100}%`,top:`${d*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...h}}}},[e,r,l,t,a])}function er(e,r){let{isDisabled:l$1,inputXRef:t,inputYRef:a,containerRef:u,"aria-label":y,xName:z,yName:S,form:f}=e,d=b$2(ne,"@react-aria/color"),{addGlobalListener:h$1,removeGlobalListener:i}=a$9(),{direction:s,locale:c}=b$1(),[n,C]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[x,v]=useState(false),[I,g$1]=useState(false),{xChannel:_,yChannel:m,zChannel:P}=r.channels,j$1=r.xChannelStep,N=r.yChannelStep,k=useRef(null),O=(o,p,A)=>{r.setDragging(true),v(true),o(),r.setDragging(false),b(p),C(A);},{keyboardProps:$}=j({shortcuts:{PageUp:()=>O(()=>{r.incrementY(r.yChannelPageStep);},a,"y"),PageDown:()=>O(()=>{r.decrementY(r.yChannelPageStep);},a,"y"),Home:()=>O(()=>{s==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep);},t,"x"),End:()=>O(()=>{s==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep);},t,"x")},allowRepeats:true}),J={onMoveStart(){k.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:p,pointerType:A,shiftKey:Z}){let{incrementX:U,decrementX:se,incrementY:ce,decrementY:T,xChannelPageStep:q,xChannelStep:B,yChannelPageStep:ke,yChannelStep:Pe,getThumbPosition:vr,setColorFromPoint:Sr}=r;k.current==null&&(k.current=vr());let{width:xr,height:gr}=u.current?.getBoundingClientRect()||{width:0,height:0},we=o!==0||p!==0;if(A==="keyboard"){let Ae=Z&&q>B?q:B,$e=Z&&ke>Pe?ke:Pe;o>0&&s==="ltr"||o<0&&s==="rtl"?U(Ae):o<0&&s==="ltr"||o>0&&s==="rtl"?se(Ae):p>0?T($e):p<0&&ce($e),v(we),n=we&&Math.abs(p)>Math.abs(o)?"y":"x",C(n);}else k.current.x+=(s==="rtl"?-1:1)*o/xr,k.current.y+=p/gr,Sr(k.current.x,k.current.y);},onMoveEnd(){M.current=false,r.setDragging(false),b(n==="x"?t:a);}},{moveProps:ur}=a$c(J),{focusWithinProps:sr}=b$3({onFocusWithinChange:o=>{o||(v(false),g$1(false));}}),F=useRef(void 0),M=useRef(false),{moveProps:cr}=a$c({onMoveStart(){M.current&&J.onMoveStart();},onMove(o){M.current&&J.onMove(o);},onMoveEnd(){M.current&&J.onMoveEnd();}}),pe=o=>{let p=b$5(u.current);r.isDragging||(F.current=o,v(false),b(),r.setDragging(true),typeof PointerEvent<"u"?h$1(p,"pointerup",R,false):(h$1(p,"mouseup",R,false),h$1(p,"touchend",R,false)));},R=o=>{let p=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===F.current&&(v(false),b(),r.setDragging(false),F.current=void 0,M.current=false,typeof PointerEvent<"u"?i(p,"pointerup",R,false):(i(p,"mouseup",R,false),i(p,"touchend",R,false)));},ue=(o,p,A,Z)=>{let U=o.getBoundingClientRect(),{width:se,height:ce}=U,T=(A-U.x)/se,q=(Z-U.y)/ce;s==="rtl"&&(T=1-T);let B=b$5(u.current);T>=0&&T<=1&&q>=0&&q<=1&&!r.isDragging&&F.current===void 0&&(M.current=true,v(false),F.current=p,r.setColorFromPoint(T,q),b(),r.setDragging(true),typeof PointerEvent<"u"?h$1(B,"pointerup",E,false):(h$1(B,"mouseup",E,false),h$1(B,"touchend",E,false)));},E=o=>{let p=o.pointerId??o.changedTouches?.[0].identifier;if(M.current&&p===F.current){M.current=false,v(false),F.current=void 0,r.setDragging(false),b();let A=b$5(u.current);typeof PointerEvent<"u"?i(A,"pointerup",E,false):(i(A,"mouseup",E,false),i(A,"touchend",E,false));}},dr=l$1?{}:g({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ue(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ue(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ue(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},cr),mr=l$1?{}:g({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||pe(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||pe(void 0);},onTouchStart:o=>{pe(o.changedTouches[0].identifier);}}},sr,$,ur),{focusProps:yr}=a$d({onFocus:()=>{C("x");}}),{focusProps:br}=a$d({onFocus:()=>{C("y");}}),ve=o=>{let{target:p}=o;g$1(true),p===t.current?r.setXValue(parseFloat(p.value)):p===a.current&&r.setYValue(parseFloat(p.value));},W=h()||l(),w=r.getDisplayColor(),Se=useCallback(o=>`${I||x?d.format("colorNameAndValue",{name:w.getChannelName(o,c),value:w.formatChannelValue(o,c)}):[d.format("colorNameAndValue",{name:w.getChannelName(o,c),value:w.formatChannelValue(o,c)}),d.format("colorNameAndValue",{name:w.getChannelName(o===m?_:m,c),value:w.formatChannelValue(o===m?_:m,c)}),d.format("colorNameAndValue",{name:w.getChannelName(P,c),value:w.formatChannelValue(P,c)})].join(", ")}, ${w.getColorName(c)}`,[c,w,d,I,x,_,m,P]),H=d.format("colorPicker"),_r=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),fr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),zr=a$e({...e,"aria-label":y?`${y}, ${H}`:void 0},W?H:void 0),xe=d.format("twoDimensionalSlider"),{visuallyHiddenProps:ge}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:hr,thumbStyleProps:Cr}=Ze({direction:s,state:r,xChannel:_,yChannel:m,zChannel:P});return {colorAreaProps:{...zr,...dr,...hr,role:"group"},thumbProps:{...mr,...Cr,role:"presentation"},xInputProps:{..._r,...ge,...yr,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:j$1,"aria-roledescription":xe,"aria-valuetext":Se(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(_),name:z,form:f,tabIndex:W||!n||n==="x"?void 0:-1,"aria-hidden":W||!n||n==="x"||x?void 0:"true",onChange:ve},yInputProps:{...fr,...ge,...br,type:"range",min:r.value.getChannelRange(m).minValue,max:r.value.getChannelRange(m).maxValue,step:N,"aria-roledescription":xe,"aria-valuetext":Se(m),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(m),name:S,form:f,tabIndex:W||n==="y"?void 0:-1,"aria-hidden":W||n==="y"||x?void 0:"true",onChange:ve}}}function rr(e,r){let{trackRef:l,inputRef:t,orientation:a,channel:u,"aria-label":y,name:z,form:S}=e,{locale:f,direction:d}=b$1();!e.label&&!y&&!e["aria-labelledby"]&&(y=r.value.getChannelName(u,f));let{groupProps:h,trackProps:i,labelProps:s,outputProps:c}=a$g({...e,"aria-label":y},r,l),{inputProps:n,thumbProps:C}=b$4({index:0,orientation:a,isDisabled:e.isDisabled,name:z,form:S,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),x=()=>{let g;switch(a==="vertical"?g="top":d==="ltr"?g="right":g="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(m=>b.withChannelValue("hue",m).toString("css")).join(", ");return `linear-gradient(to ${g}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),m=r.getThumbMaxValue(0),P=b.withChannelValue(u,_).toString("css"),j=b.withChannelValue(u,(m-_)/2).toString("css"),N=b.withChannelValue(u,m).toString("css");return `linear-gradient(to ${g}, ${P}, ${j}, ${N})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),m=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${g}, ${_}, ${m})`}default:throw new Error("Unknown color channel: "+u)}},v={forcedColorAdjust:"none"};u==="hue"?n["aria-valuetext"]+=`, ${b.getHueName(f)}`:u!=="alpha"&&(n["aria-valuetext"]+=`, ${b.getColorName(f)}`);let{visuallyHiddenProps:I}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...g(h,i),style:{...i.style,...v,background:x()}},inputProps:{...n,style:{...n.style,...I.style}},thumbProps:{...C,style:{...C.style,...v}},labelProps:s,outputProps:c}}function or(e,r,l){let{isDisabled:t,isReadOnly:a,isRequired:u,isWheelDisabled:y,validationBehavior:z="aria",onKeyDown:S,onKeyUp:f}=e,{colorValue:d,inputValue:h,increment:i,decrement:s,incrementToMax:c,decrementToMin:n,commit:C,commitValidation:b}=r,x=c$1(),{spinButtonProps:v}=a$h({isDisabled:t,isReadOnly:a,isRequired:u,maxValue:16777215,minValue:0,onIncrement:i,onIncrementToMax:c,onDecrement:s,onDecrementToMin:n,value:d?d.toHexInt():void 0,textValue:d?d.toString("hex"):void 0}),[I,g$1]=useState(false),{focusWithinProps:_}=b$3({isDisabled:t,onFocusWithinChange:g$1}),m=useCallback($=>{Math.abs($.deltaY)<=Math.abs($.deltaX)||($.deltaY>0?i():$.deltaY<0&&s());},[s,i]);a$i({onScroll:m,isDisabled:y||t||a||!I},l);let{keyboardProps:j$1}=j({isDisabled:t||a,shortcuts:{Enter:()=>(flushSync(()=>{C();}),b(),{shouldPreventDefault:false})},onKeyDown:S,onKeyUp:f}),N=$=>{r.validate($)&&r.setInputValue($);},{inputProps:k,...O}=a$j({...e,id:x,value:h,defaultValue:"!",validate:void 0,[c$2]:r,type:"text",autoComplete:"off",onChange:N,onKeyDown:void 0,onKeyUp:void 0},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),k=g(j$1,k,v,_,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:C}),z==="native"&&(k["aria-required"]=void 0),{inputProps:k,...O}}function ie(e){let{color:r,colorName:l}=e,t=r||"#fff0",a=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),y=a$8(e,{labelable:true}),z=b$2(ne,"@react-aria/color"),S=c$1(e.id);return l||(l=a.getChannelValue("alpha")===0?z.format("transparent"):a.getColorName(u)),{colorSwatchProps:{...y,role:"img","aria-roledescription":z.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${S} ${e["aria-labelledby"]}`:void 0,id:S,style:{backgroundColor:a.toString("css"),forcedColorAdjust:"none"}},color:a||null}}var nl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",il="_1dbkl5e",pl=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),ul="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",sl=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",dl="_1dbkl5f z9nup86",ml="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",lr="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",yl="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",bl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),_l="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",fl=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),zl=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),hl="_1dbkl5g",Cl="_1dbkl5u",vl="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",Sl="_1dbkl5x",xl="_1dbkl5w",gl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",kl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),Pl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var jl=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Nl=a$1("#000000").toFormat("hsla"),fe="hsla",ze="hexa";function Ir(e){if(typeof document>"u")return "#000000";let r=document.createElement("canvas").getContext("2d");return a$k(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ml(e$1){if(typeof e$1=="string")try{return e(e$1).toFormat(fe)}catch{return a$1(Ir(e$1)).toFormat(fe)}else if(e$1)return e$1.toFormat(fe);return null}function Fl(e,r){return e?.getChannelValue("alpha")?r?.toString(ze)===e.toString(ze):!r?.getChannelValue("alpha")}function Tl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var he="NONE";function Ol(e$1,r){let l=r?.map(a=>({id:e(a.color).toString(ze),label:a.label}))||[],t={id:he,label:e$1};return [...l,t]}var Rl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},a)=>(a$k(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:a,className:lr,children:jsx(Ce,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),ar=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var nr=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),ir="_1yep5z6fa",pr="_1344e9q9 _1yep5z6fp";var Ce=Nr.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:a,style:u,className:y,id:z,tooltip:S,isIndeterminate:f,indeterminateIcon:d$1=HelpIcon,noneLabel:h,"data-block-id":i,"data-block-class":s,...c},n)=>{let C=e$1&&e$1!==he&&(typeof e$1=="string"?e(e$1):e$1),{formatMessage:b$1}=b(),x=!C,{colorSwatchProps:v}=ie({color:x?"#000000":C}),{hoverProps:I,isHovered:g$1}=a$2({isDisabled:a||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":g$1,"data-block-id":i,"data-block-class":s,"data-disabled":a,"data-interactive":t,"data-indeterminate":f}),m=x?h??b$1(Mr.none):v["aria-label"],P=c["aria-label"]??m,{tooltipProps:j}=a$4({tooltip:S,label:P}),N=jsx("div",{...g(I,_,x?{}:v),style:u,role:"img",className:a$6(nr({removeBlendMode:x,isFocusVisible:r,isDisabled:!!a,isSelected:!!l,isHovered:g$1}),"BaselineUI-ColorSwatch",y),ref:n,id:z,...c,"aria-label":P,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:C&&!f?ar(C,4):void 0,children:[x&&!f?jsx("div",{className:pr}):null,f&&d$1?jsx(d$1,{role:"presentation",size:16,className:ir,"aria-hidden":"true"}):null]})});return j&&!a?jsx(a$7,{...j,children:jsx(d,{children:N})}):N});Ce.displayName="ColorSwatch";var Mr=c({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{fe as A,ze as B,Ml as C,Fl as D,Tl as E,he as F,Ol as G,Rl as H,Ce as I,er as a,or as b,rr as c,nl as d,il as e,pl as f,ul as g,sl as h,cl as i,dl as j,ml as k,yl as l,bl as m,_l as n,fl as o,zl as p,hl as q,Cl as r,vl as s,Sl as t,xl as u,gl as v,kl as w,Pl as x,jl as y,Nl as z};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-XXANV3FM.mjs';import {b as b$3}from'./chunk-TDRN6VLD.mjs';import {a,b as b$1,c}from'./chunk-LJZ7ZS4C.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {useContext,useMemo,useEffect}from'react';/**
1
+ import {a as a$1}from'./chunk-XXANV3FM.mjs';import {b as b$3}from'./chunk-OTJ22ZQT.mjs';import {a,b as b$1,c}from'./chunk-LJZ7ZS4C.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {useContext,useMemo,useEffect}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
@@ -1,4 +1,4 @@
1
- import {c,a as a$4,d,b as b$1,e}from'./chunk-X5Z54UUE.mjs';import {c as c$3,b as b$5}from'./chunk-OY57K37D.mjs';import {b as b$4}from'./chunk-I4F5NJUI.mjs';import {a as a$7}from'./chunk-SQPWV3OX.mjs';import {b,c as c$1}from'./chunk-JYWJE6L5.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-SMPF53W4.mjs';import {a as a$2}from'./chunk-TQMBJFQC.mjs';import {a}from'./chunk-ELW6SXDM.mjs';import {c as c$4}from'./chunk-PV4E7XDP.mjs';import {b as b$6}from'./chunk-2PTLJDIT.mjs';import {a as a$1}from'./chunk-LRFFL765.mjs';import {j,f as f$1}from'./chunk-AIG23SN5.mjs';import {q}from'./chunk-2MNK24YJ.mjs';import {g,f,c as c$2}from'./chunk-V2C4UDOC.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import T,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {c,a as a$4,d,b as b$1,e}from'./chunk-X5Z54UUE.mjs';import {c as c$3,b as b$5}from'./chunk-OY57K37D.mjs';import {b as b$4}from'./chunk-I4F5NJUI.mjs';import {a as a$7}from'./chunk-SQPWV3OX.mjs';import {b,c as c$1}from'./chunk-WBLMAN7U.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-SMPF53W4.mjs';import {a as a$2}from'./chunk-TQMBJFQC.mjs';import {a}from'./chunk-ELW6SXDM.mjs';import {c as c$4}from'./chunk-PV4E7XDP.mjs';import {b as b$6}from'./chunk-2PTLJDIT.mjs';import {a as a$1}from'./chunk-LRFFL765.mjs';import {j,f as f$1}from'./chunk-AIG23SN5.mjs';import {q}from'./chunk-2MNK24YJ.mjs';import {g,f,c as c$2}from'./chunk-V2C4UDOC.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import T,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-VEIBPZDL.mjs';import {a as a$4}from'./chunk-NMSOOQB2.mjs';import {g,e,h,a as a$1,i,c}from'./chunk-24WOG72O.mjs';import {b as b$1}from'./chunk-I4F5NJUI.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {useGranularEffect}from'granular-hooks';import P,{useCallback,useImperativeHandle}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-VEIBPZDL.mjs';import {a as a$4}from'./chunk-NMSOOQB2.mjs';import {g,e,h,a as a$1,i,c}from'./chunk-NNGNZKM5.mjs';import {b as b$1}from'./chunk-I4F5NJUI.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {useGranularEffect}from'granular-hooks';import P,{useCallback,useImperativeHandle}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {c,b}from'./chunk-WBLMAN7U.mjs';import {a}from'./chunk-JJG67M2S.mjs';import o,{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 B(t,s){let{playingLabel:r,pausedLabel:a$1}=s??{},{formatMessage:n,locale:i}=b(),[P,E]=o.useState(false),[A,u]=o.useState(0),[L,m]=o.useState(0),[g,y]=o.useState(0),[h,F]=o.useState(false),[k,w]=o.useState(false);useEffect(()=>{if(!t.current)return;let e=t.current,d=()=>{E(false),u(0),m(0);},b=()=>{m(e.currentTime),!h&&e.duration>0&&u(e.currentTime*100/e.duration);},p=()=>{y(e.duration);},c=()=>{E(!e.paused);},v=()=>{w(e.muted);},S=()=>{c(),u(0),m(0),y(0);};return e.readyState>=1&&p(),v(),e.addEventListener("playing",c),e.addEventListener("pause",c),e.addEventListener("emptied",S),e.addEventListener("ended",d),e.addEventListener("timeupdate",b),e.addEventListener("loadedmetadata",p),e.addEventListener("volumechange",v),()=>{e.removeEventListener("playing",c),e.removeEventListener("pause",c),e.removeEventListener("emptied",S),e.removeEventListener("ended",d),e.removeEventListener("timeupdate",b),e.removeEventListener("loadedmetadata",p),e.removeEventListener("volumechange",v);}},[h,t]);let x=useCallback(()=>{let e=t.current;e&&(e.paused?e.play().then(()=>{a(r??n(D.playing),"polite");},d=>{if(d?.name!=="AbortError")throw d}):(e.pause(),a(a$1??n(D.paused),"polite")));},[n,a$1,r,t]),C=useCallback(()=>{t.current&&(t.current.muted=!t.current.muted);},[t]),O=useCallback(e=>{t.current&&Number.isFinite(t.current.duration)&&t.current.duration>0?(t.current.currentTime=e*t.current.duration/100,m(t.current.currentTime),a(U(t.current.currentTime,i.locale),"assertive")):u(0);},[i.locale,t]);return {isPlaying:P,progress:A,duration:g,togglePlay:x,isMuted:k,toggleMute:C,seek:O,setProgress:u,formattedCurrentTime:L?M(L):"00:00",formattedDuration:Number.isFinite(g)&&g>0?M(g):"00:00",setIsSliderDragging:F}}var D=c({playing:{id:"bui.useMedia.playing",defaultMessage:"Playing"},paused:{id:"bui.useMedia.paused",defaultMessage:"Paused"}});function U(t,s){if(!("DurationFormat"in Intl))return M(t);let r=Math.floor(t/3600),a=Math.floor(t%3600/60),n=t%60,i={...r&&{hours:r},...a&&{minutes:a},seconds:Math.floor(n)};return new Intl.DurationFormat(s,{style:"long"}).format(i)}function M(t){let s=Math.floor(t/3600),r=Math.floor(t%3600/60),a=Math.floor(t%60),n=[r,a].map(i=>i.toString().padStart(2,"0")).join(":");return s?`${s}:${n}`:n}export{B as a,U as b};