@baseline-ui/core 3.6.0 → 3.8.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 (174) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionGroup.mjs +1 -1
  3. package/dist/ActionIconButton.mjs +1 -1
  4. package/dist/AlertDialog.mjs +1 -1
  5. package/dist/AudioPlayer.mjs +1 -1
  6. package/dist/Box.mjs +1 -1
  7. package/dist/ButtonSelect.mjs +1 -1
  8. package/dist/Calendar.css +1 -1
  9. package/dist/Calendar.mjs +1 -1
  10. package/dist/ColorInput.mjs +1 -1
  11. package/dist/ColorSwatch.mjs +1 -1
  12. package/dist/ColorSwatchPicker.mjs +1 -1
  13. package/dist/ComboBox.mjs +1 -1
  14. package/dist/DateField.css +1 -1
  15. package/dist/DateField.mjs +1 -1
  16. package/dist/Dialog.mjs +1 -1
  17. package/dist/Disclosure.mjs +1 -1
  18. package/dist/Drawer.mjs +1 -1
  19. package/dist/Editor.css +1 -1
  20. package/dist/Editor.mjs +1 -1
  21. package/dist/FileInput.mjs +1 -1
  22. package/dist/FileList.css +1 -1
  23. package/dist/FileList.mjs +1 -1
  24. package/dist/FileUploader.css +1 -1
  25. package/dist/FileUploader.mjs +1 -1
  26. package/dist/FreehandCanvas.mjs +1 -1
  27. package/dist/GridList.mjs +1 -1
  28. package/dist/Icon.mjs +1 -1
  29. package/dist/Image.css +10 -0
  30. package/dist/Image.mjs +1 -0
  31. package/dist/ImageDropZone.mjs +1 -1
  32. package/dist/ImageGallery.mjs +1 -1
  33. package/dist/InlineAlert.mjs +1 -1
  34. package/dist/InlineToolbar.mjs +2 -2
  35. package/dist/Kbd.mjs +1 -1
  36. package/dist/ListBox.mjs +1 -1
  37. package/dist/Markdown.css +1 -1
  38. package/dist/Markdown.mjs +1 -1
  39. package/dist/Menu.mjs +1 -1
  40. package/dist/Modal.mjs +1 -1
  41. package/dist/NumberInput.mjs +1 -1
  42. package/dist/Pagination.mjs +1 -1
  43. package/dist/PointPicker.mjs +1 -1
  44. package/dist/Popover.mjs +1 -1
  45. package/dist/Portal.mjs +1 -1
  46. package/dist/Preview.mjs +1 -1
  47. package/dist/RadioGroup.mjs +1 -1
  48. package/dist/Reaction.mjs +1 -1
  49. package/dist/SearchInput.mjs +1 -1
  50. package/dist/Select.mjs +1 -1
  51. package/dist/Slider.mjs +1 -1
  52. package/dist/StatusCard.mjs +1 -1
  53. package/dist/Stepper.mjs +1 -1
  54. package/dist/Switch.css +1 -1
  55. package/dist/Switch.mjs +1 -1
  56. package/dist/Tabs.mjs +1 -1
  57. package/dist/Tag.mjs +1 -1
  58. package/dist/TagGroup.mjs +1 -1
  59. package/dist/TaggedPagination.mjs +1 -1
  60. package/dist/TextInput.mjs +1 -1
  61. package/dist/ThemeProvider.mjs +1 -1
  62. package/dist/TimeField.mjs +1 -1
  63. package/dist/Toast.mjs +1 -1
  64. package/dist/ToggleIconButton.mjs +1 -1
  65. package/dist/Toolbar.mjs +1 -1
  66. package/dist/Tooltip.mjs +1 -1
  67. package/dist/TreeView.css +1 -1
  68. package/dist/TreeView.mjs +1 -1
  69. package/dist/UNSAFE_ListBox.mjs +1 -1
  70. package/dist/{chunk-UY76QEJC.mjs → chunk-2BG2JLFC.mjs} +1 -1
  71. package/dist/{chunk-XG6JJCCJ.mjs → chunk-2JRDTJWJ.mjs} +1 -1
  72. package/dist/{chunk-JTKDC2CM.mjs → chunk-2OXYNLVN.mjs} +1 -1
  73. package/dist/{chunk-C2B7L5CL.mjs → chunk-2TXFCYPO.mjs} +1 -1
  74. package/dist/{chunk-266F6F4Y.mjs → chunk-3IPRT57V.mjs} +1 -1
  75. package/dist/{chunk-ARCCPNHM.mjs → chunk-3TLWTZRL.mjs} +1 -1
  76. package/dist/chunk-3WX5PZ6X.mjs +10 -0
  77. package/dist/{chunk-6M77HEKA.mjs → chunk-464QF4AV.mjs} +2 -2
  78. package/dist/chunk-46VEK5WC.mjs +10 -0
  79. package/dist/chunk-54WJJ3EM.mjs +10 -0
  80. package/dist/chunk-54ZKQAA3.mjs +10 -0
  81. package/dist/chunk-57YWI7EG.mjs +10 -0
  82. package/dist/{chunk-7OUGARUO.mjs → chunk-5GW36EQJ.mjs} +1 -1
  83. package/dist/{chunk-XDTZXNGJ.mjs → chunk-5YKRWGEJ.mjs} +1 -1
  84. package/dist/chunk-64IFEFOT.mjs +30 -0
  85. package/dist/{chunk-HABKIEKC.mjs → chunk-655SS7D4.mjs} +1 -1
  86. package/dist/chunk-65PMDBYL.mjs +10 -0
  87. package/dist/{chunk-LRF3YZWU.mjs → chunk-6CEV43ZA.mjs} +1 -1
  88. package/dist/chunk-6MUTSHZO.mjs +10 -0
  89. package/dist/chunk-6TRBOQVN.mjs +10 -0
  90. package/dist/chunk-73UBSCJ2.mjs +10 -0
  91. package/dist/chunk-7JE2SRIH.mjs +10 -0
  92. package/dist/chunk-AGERZJ3X.mjs +10 -0
  93. package/dist/{chunk-ZI7HJRJA.mjs → chunk-CTTNZESA.mjs} +1 -1
  94. package/dist/{chunk-O7XK2WIX.mjs → chunk-DIL5HL6K.mjs} +2 -2
  95. package/dist/{chunk-PYV5J322.mjs → chunk-EFFODO2N.mjs} +1 -1
  96. package/dist/{chunk-XYK5KKOH.mjs → chunk-EJYSTNXD.mjs} +2 -2
  97. package/dist/{chunk-GDIKHTP3.mjs → chunk-EXX7ZFGI.mjs} +1 -1
  98. package/dist/{chunk-5VNC6UYE.mjs → chunk-F3THHK5C.mjs} +1 -1
  99. package/dist/{chunk-F67SYAEW.mjs → chunk-FWPWBCOS.mjs} +1 -1
  100. package/dist/{chunk-ZXEWW3E7.mjs → chunk-G5MSZV5O.mjs} +1 -1
  101. package/dist/{chunk-RITIRWKN.mjs → chunk-GIT77HDD.mjs} +2 -2
  102. package/dist/chunk-GJ6ZPLFR.mjs +10 -0
  103. package/dist/{chunk-XSORBGUU.mjs → chunk-GYIIVZDE.mjs} +1 -1
  104. package/dist/{chunk-3PU6C5US.mjs → chunk-HKVAL4BB.mjs} +2 -2
  105. package/dist/{chunk-2KX2HY2H.mjs → chunk-HU75NQMI.mjs} +1 -1
  106. package/dist/chunk-HV7DKEN7.mjs +10 -0
  107. package/dist/chunk-K3WFKO7R.mjs +10 -0
  108. package/dist/chunk-KOPAIJJU.mjs +10 -0
  109. package/dist/{chunk-7EQIV4GX.mjs → chunk-LDWNE2JT.mjs} +1 -1
  110. package/dist/{chunk-IC5SBDP3.mjs → chunk-LLSXABBJ.mjs} +1 -1
  111. package/dist/{chunk-6LP7UKPC.mjs → chunk-MHO7BDER.mjs} +1 -1
  112. package/dist/chunk-MN7USKSC.mjs +10 -0
  113. package/dist/{chunk-RUHZRYDJ.mjs → chunk-N7MIERZH.mjs} +1 -1
  114. package/dist/{chunk-FF7H33Z5.mjs → chunk-NLVJYKSA.mjs} +1 -1
  115. package/dist/chunk-OBEPT4LR.mjs +10 -0
  116. package/dist/{chunk-VJUSOXPW.mjs → chunk-OHTPDCQA.mjs} +1 -1
  117. package/dist/{chunk-G2T6UJ66.mjs → chunk-OTDBW5FO.mjs} +1 -1
  118. package/dist/chunk-PMMLDGSP.mjs +10 -0
  119. package/dist/{chunk-HJGMXLKN.mjs → chunk-PSAOTHYG.mjs} +1 -1
  120. package/dist/chunk-PSUCNVCE.mjs +10 -0
  121. package/dist/{chunk-SH7ZI4CA.mjs → chunk-RIVN2JT3.mjs} +1 -1
  122. package/dist/{chunk-K4N2ADJO.mjs → chunk-RRYP54UI.mjs} +1 -1
  123. package/dist/{chunk-SLFKSR3T.mjs → chunk-SAATXQOW.mjs} +1 -1
  124. package/dist/chunk-SCUNJNIO.mjs +0 -0
  125. package/dist/chunk-SND4G3LM.mjs +10 -0
  126. package/dist/{chunk-GJTOYWLJ.mjs → chunk-SOWGXN5P.mjs} +1 -1
  127. package/dist/{chunk-XKUZVQ2A.mjs → chunk-TCVES3WI.mjs} +1 -1
  128. package/dist/{chunk-7KZEJYIU.mjs → chunk-TU7JTGGE.mjs} +1 -1
  129. package/dist/{chunk-GFKZXGWJ.mjs → chunk-UCDGZFQ7.mjs} +1 -1
  130. package/dist/{chunk-VZ5CLAIL.mjs → chunk-UCIAWI4E.mjs} +1 -1
  131. package/dist/chunk-VE2UA2AH.mjs +0 -0
  132. package/dist/{chunk-JDIGAVFU.mjs → chunk-VIMSH5F5.mjs} +1 -1
  133. package/dist/chunk-VPVF5N62.mjs +10 -0
  134. package/dist/chunk-VQ2K6Q3G.mjs +10 -0
  135. package/dist/{chunk-WB7EFOP7.mjs → chunk-VQPEDDH6.mjs} +1 -1
  136. package/dist/{chunk-HCQI7MNN.mjs → chunk-WQBA2P6W.mjs} +1 -1
  137. package/dist/{chunk-LQHFBXCW.mjs → chunk-X3ACY7IY.mjs} +2 -2
  138. package/dist/chunk-XC2S3RLC.mjs +10 -0
  139. package/dist/{chunk-7HVUCDKZ.mjs → chunk-XWKTG7NR.mjs} +1 -1
  140. package/dist/{chunk-2CXZQGP5.mjs → chunk-YLL2APKH.mjs} +1 -1
  141. package/dist/{chunk-ZNLIC44U.mjs → chunk-YNJD34U4.mjs} +1 -1
  142. package/dist/{chunk-J2KZM2I2.mjs → chunk-Z73YU5ZQ.mjs} +1 -1
  143. package/dist/{chunk-4T7P66ZA.mjs → chunk-ZE2B6BS7.mjs} +1 -1
  144. package/dist/{chunk-RFVLSR2P.mjs → chunk-ZLDFLERD.mjs} +1 -1
  145. package/dist/hooks/useMedia.mjs +1 -1
  146. package/dist/hooks/useTextSelection.mjs +1 -1
  147. package/dist/index.css +1 -1
  148. package/dist/index.d.ts +455 -113
  149. package/dist/index.js +22 -21
  150. package/dist/index.mjs +1 -1
  151. package/dist/utils/selection.mjs +1 -0
  152. package/package.json +5 -5
  153. package/sbom.json +13 -13
  154. package/dist/chunk-335C37NB.mjs +0 -10
  155. package/dist/chunk-3RWM6E56.mjs +0 -10
  156. package/dist/chunk-3YVVIFY7.mjs +0 -10
  157. package/dist/chunk-42SQX2EB.mjs +0 -10
  158. package/dist/chunk-AMLFQDKI.mjs +0 -10
  159. package/dist/chunk-EIB7MPRA.mjs +0 -10
  160. package/dist/chunk-GAT5QH2M.mjs +0 -10
  161. package/dist/chunk-GTHN5ZCZ.mjs +0 -10
  162. package/dist/chunk-GYKBMDSJ.mjs +0 -10
  163. package/dist/chunk-IHES52NR.mjs +0 -10
  164. package/dist/chunk-JKOCFSBH.mjs +0 -10
  165. package/dist/chunk-KX2GDQKJ.mjs +0 -10
  166. package/dist/chunk-LV5AUNI2.mjs +0 -10
  167. package/dist/chunk-NMGKHMH3.mjs +0 -10
  168. package/dist/chunk-O4YMXTNR.mjs +0 -10
  169. package/dist/chunk-QC76UPJB.mjs +0 -29
  170. package/dist/chunk-RFVPGD6N.mjs +0 -10
  171. package/dist/chunk-RXVMJVRX.mjs +0 -10
  172. package/dist/chunk-TTJTZLW5.mjs +0 -10
  173. package/dist/chunk-ZP6QG5FX.mjs +0 -10
  174. /package/dist/{chunk-MAJ74VNE.mjs → chunk-HMAVZPRE.mjs} +0 -0
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-I7SMG6PT.mjs';import {i}from'./chunk-F3THHK5C.mjs';import {c as c$1,b as b$2,a as a$3}from'./chunk-GFBRKKX4.mjs';import {c,b as b$1}from'./chunk-MHAPHPNN.mjs';import {d,f as f$1}from'./chunk-XOS3JIQX.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 {c as c$3}from'./chunk-3WKDIXCM.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
+ * 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 O(e){return e&&(t=>{(t.key==="Enter"||t.key==="Escape")&&e(t);})}function f(e){return {...e,onKeyDown:O(e.onKeyDown),onKeyDownCapture:O(e.onKeyDownCapture)}}var A=a({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var G=P.forwardRef(({enableReorder:e,...t},r)=>e?jsx(j,{ref:r,...t}):jsx(k,{ref:r,...t}));G.displayName="GridListItem";var k=P.forwardRef(({item:e,state:t,dropState:r,renderGridItem:i,dragHandleProps:s,isEditing:p},u)=>{let a=a$1(u),d=c({node:e},t,a),g=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:L}=a$2({key:e.key},t),l={...d,rowProps:p?f(d.rowProps):d.rowProps,checkBoxProps:g?L:void 0,dragHandleProps:s};return jsxs("div",{"data-grid-list-item-key":e.key,children:[r?jsx(c$1,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:r}):null,i?i(e,l,a):null,r&&t.collection.getKeyAfter(e.key)==null?jsx(c$1,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:r}):null]},e.key)});k.displayName="BaseGridListItem";var j=P.forwardRef(({dragState:e,item:t,...r},i)=>{let s=a$1(i),p=d({key:t.key,hasDragButton:true},e,s);return jsx(k,{item:t,dragHandleProps:p,ref:s,...r})});j.displayName="DraggableGridListItem";var V=P.forwardRef(({className:e,style:t,isEditing:r=false,"data-block-id":i$1,"data-block-class":s,gridListHandle:p,onReorder:u,enableReorder:a=false,layout:d="stack",orientation:g="vertical",renderGridItem:L,...l},F)=>{let q=c$2(),o=b({...l,children:q}),w=P.useRef(null),y=a$1(F),{gridProps:J}=b$1(l,o,y);b$2({handle:p,type:"gridlist"},o,y);let{collectionProps:Q,dragState:W,dropState:X}=a$3({...l,onReorder:u,enableReorder:a,layout:d,orientation:g,preview:w,getItems:n=>[...n].map(Z=>{let v=o.collection.getItem(Z);return a$4(v,"Expected item to be defined."),{key:v.key.toString()}})},o,y),D=c$3(J,Q),Y={state:o,dragState:W,dropState:X,enableReorder:a,renderGridItem:L,isEditing:r};return jsxs("ul",{...r?f(D):D,className:a$5("BaselineUI-GridList",e),"data-block-id":i$1,"data-block-class":s,style:t,ref:y,"aria-rowcount":o.collection.size,children:[[...o.collection].map(n=>jsx(G,{item:n,...Y},n.key)),a?jsx(f$1,{ref:w,children:n=>jsx(i,{items:n,containerClassName:".BaselineUI-GridList",previewClassName:A(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});V.displayName="GridList";export{V as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-K3WFKO7R.mjs';import {d as d$1}from'./chunk-F7WPMQ3P.mjs';import {b,a as a$1}from'./chunk-SD43KVTU.mjs';import d,{useEffect}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function E({ref:n,onSelectionChange:i,onSelectionEnd:S,isDisabled:t}){let o=d.useRef(null);d$1({ref:n,isDisabled:t,onPressEnd(){let e=a(n.current);e&&n.current?.contains(e.anchorNode)&&S?.(e);},onPressStart(){let e=b(n.current);o.current=e.getSelection(),o.current&&o.current.removeAllRanges();}}),useEffect(()=>{let e=n.current;if(!e||t)return;function l(){let c=a(e);c&&n.current?.contains(c.anchorNode)&&i(c);}let s=a$1(e);return s.addEventListener("selectionchange",l),()=>{s.removeEventListener("selectionchange",l);}},[n,i,t]);}export{E as a};
@@ -0,0 +1,10 @@
1
+ import e from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var o=e.createContext({});export{o as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$k}from'./chunk-SBR5UAUY.mjs';import {a as a$m}from'./chunk-NLVJYKSA.mjs';import {c as c$2}from'./chunk-54ZKQAA3.mjs';import {c as c$4}from'./chunk-HU75NQMI.mjs';import {I,j,f,e,p,F,A,H,i,B,s,C,G,z,h,g,m,q,D,E,t,l,v,y,u,a as a$n,w,d,c as c$6,x,k,b as b$8,o,n,r}from'./chunk-3TLWTZRL.mjs';import {a as a$7,b as b$7,c as c$5,d as d$1}from'./chunk-FCKJCFMD.mjs';import {a as a$p}from'./chunk-WQBA2P6W.mjs';import {a as a$i}from'./chunk-SOWGXN5P.mjs';import {a as a$c}from'./chunk-Z73YU5ZQ.mjs';import {a as a$d}from'./chunk-RIVN2JT3.mjs';import {b as b$5,e as e$1}from'./chunk-VPVF5N62.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$2,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-2OXYNLVN.mjs';import {a as a$g}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-KX7WG3L4.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$9}from'./chunk-22MA6EYO.mjs';import {a as a$f}from'./chunk-VDUFLHKK.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-SGZWUG3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {b as b$1,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import io,{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 no=io.forwardRef(({color:o,colorLabel:e,colorName:l,isIndeterminate:r,indeterminateIcon:t,noneLabel:s,...a$5},n)=>{let i=io.useRef(null),{hoverProps:c$2,isHovered:m}=a({isDisabled:a$5.isDisabled}),{buttonProps:d,isPressed:g}=a$1(a$5,i),{isFocusVisible:f$1,focusProps:I$1}=a$2(),P=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":f$1,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":g}),B=c(),N=c(),y=!!e||typeof l=="string";return jsxs("button",{...c$1(d,c$2,I$1,P),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:f$1||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(n,i),id:B,"aria-labelledby":[a$5["aria-labelledby"]||B,y&&N].filter(Boolean).join(" "),children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:N,"aria-hidden":"true",children:l}):y&&jsx(b,{id:N,"aria-hidden":"true",children:l})]})});no.displayName="ColorInputButton";var Fo=io.forwardRef(({className:o,style:e$1,icon:l,elementType:r="button",...t},s)=>{let a$6=io.useRef(null),{hoverProps:n,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:m}=a$1({...t,elementType:r},a$6),{isFocusVisible:d,focusProps:g}=a$2(),f=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":m});return jsxs(r,{...c$1(a$5(r,t.isDisabled),c,n,g,f),ref:b$1(s,a$6),style:e$1,className:a$4(p({isHovered:i||m||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(l,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});Fo.displayName="IconColorInputButton";var Wo=io.forwardRef(({setColor:o,color:e,triggerRef:l,autoFocus:r,presets:t,state:s$1,isIndeterminate:a,colorPresetsLabel:n},i$1)=>{let{formatMessage:c}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let g=[...d][0],f=t.find(I=>I.id===g);a$6(f,"Preset not found"),o(f.id===F?null:a$7(f.id).toFormat(A)),s$1.close();}},[s$1,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:l.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:r,items:t,layout:"grid","aria-label":n??c(ft.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:a?[]:[e?.toString(B)||F],onSelectionChange:m,shouldSelectOnPressUp:true,escapeKeyBehavior:"none"})})});Wo.displayName="ColorPresetList";var ft=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Xe=({value:o,...e})=>{let l=io.useRef(null),r=io.useRef(null),t=io.useRef(null),s=b$7({...e,value:o}),{colorAreaProps:a,xInputProps:n,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:l,inputYRef:r,containerRef:t},s);useEffect(()=>{l.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...a,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:l,...n,...m}),jsx("input",{ref:r,...i,...m})]})})};var Ye=({color:o$1,setColor:e,allowAlpha:l,...r})=>{let t=d$1({value:o$1,onChange:d=>{e(C(d)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),s=io.useRef(null),{inputProps:a$1}=b$8({...r,"aria-label":"Hex"},t,s),{focusProps:n$1,isFocused:i}=a$2({isTextInput:true}),{hoverProps:c,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"hexa":"hex",children:[jsx("input",{...c$1(a$1,n$1,c),ref:s,className:o({isFocused:i,isHovered:m,allowAlpha:l})}),l?jsx($e,{color:o$1,setColor:e}):null]})},qe=({color:o,setColor:e,allowAlpha:l})=>{let r$1=o.toFormat("rgba"),{locale:t}=b$3();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"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}),l?jsx($e,{color:o,setColor:e}):null]})},yt={style:"percent",maximumFractionDigits:0},$e=({color:o,setColor:e})=>{let{locale:l}=b$3(),r$1=useCallback(t=>{e(o.withChannelValue("alpha",t));},[o,e]);return jsx(a$p,{"aria-label":o.getChannelName("alpha",l),value:o.getChannelValue("alpha"),formatOptions:yt,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var qo=({channel:o,...e})=>{let{locale:l}=b$3(),r=c$5({...e,channel:o,locale:l}),t=io.useRef(null),s=io.useRef(null),{trackProps:a,thumbProps:n,inputProps:i}=c$6({...e,channel:o,trackRef:t,inputRef:s,"aria-label":r.value.getChannelName(o,l)},r),{focusProps:c,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...a,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:a.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"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 xo=({color:o,setColor:e,allowAlpha:l,colorFormatLabel:r,onChangeEnd:t})=>{let[s,a]=io.useState("hex"),{formatMessage:n}=b$2();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}),l?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$4,{label:r??n(Pt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:s,onSelectionChange:i=>{a(i);}}),s==="hex"&&jsx(Ye,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l}),s==="rgb"&&jsx(qe,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l})]})]})},Pt=c$3({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var Ze=({color:o,setColor:e,storePickedColorKey:l$1,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:s$1,addLabel:a,cancelLabel:n,newColorLabel:i$1,colorFormatLabel:c$1,pickerMode:m$1,allowAlpha:d,isIndeterminate:g,state:f})=>{let{locale:I}=b$3(),{formatMessage:P}=b$2(),B$1=io.useRef(null),N=a$j(B$1.current),[y,M]=a$k(l$1,[]),h=io.useMemo(()=>Array.isArray(y)?y.filter(p=>Ft(p)):[],[y]),O=io.useRef(null),[K,Mo]=io.useState(o),uo=io.useMemo(()=>h.map(p=>({id:p,label:a$7(p).getColorName(I),description:p})),[h,I]),W=useCallback(()=>{let p=m$1==="active"?o:K;if(h.includes(p.toString(B))){O.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}M([...h,p.toString(B)]);},[h,o,M,K,m$1]);useEffect(()=>{let p=O.current;function b(Q){Q.animationName===u&&j$2(Q)?.classList.remove(t);}return p?.addEventListener("animationend",b),()=>{p?.removeEventListener("animationend",b);}},[]);let w=c(),J=jsx(a$l,{ref:B$1,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:m$1==="active"?W:void 0}),co=useCallback(p=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??P(Jo.newColor),children:[jsx(xo,{color:K,setColor:Mo,allowAlpha:d,colorFormatLabel:c$1}),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$4,{label:n??P(Jo.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??P(Jo.add),variant:"primary",onPress:()=>{W(),p();},size:"sm"})]})})]}),[K,W,P,d,i$1,c$1,n,a]),Oo=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let b=[...p][0];b&&(e(a$7(b).toFormat(A)),m$1==="lazy"&&f.close());},[e,m$1,f]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:w,children:s$1}),jsxs(a$h,{display:"flex",children:[!!h.length&&h.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{M(h.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&J,m$1==="lazy"&&(N==="mobile"?jsxs(b$5,{children:[jsx(a$m,{children:J}),jsx(e$1,{style:{zIndex:1e5},children:({close:p})=>co(p)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:J}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:p})=>co(p)})]}))]})]}),!!h.length&&jsx(c$2,{items:uo,layout:"grid","aria-labelledby":w,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:O,autoFocus:false,selectionMode:"single",selectedKeys:g?[]:[o.toString(B)],onSelectionChange:Oo,shouldSelectOnPressUp:true})]})},Jo=c$3({newColor:{defaultMessage:"New Custom Color",id:"bui.colorInput.newColor"},cancel:{defaultMessage:"Cancel",id:"bui.colorInput.cancel"},add:{defaultMessage:"Add",id:"bui.colorInput.add"}});function Ft(o){if(typeof o!="string")return false;try{return a$7(o),!0}catch{return false}}function ot({colorLabel:o,color:e,presets:l,isIndeterminate:r,indeterminateLabel:t,transparentLabel:s}){let{formatMessage:a}=b$2(),{locale:n}=b$3(),i=useMemo(()=>r?{id:"indeterminate",label:t??a(je.indeterminate)}:l.find(d=>d.id===F?!e:e?D(e,a$7(d.id)):false),[l,e,r,a,t]),c=useMemo(()=>{if(typeof o=="function")return o?.(e,{isIndeterminate:!!r});if(typeof o=="boolean")return E(e,i,s??a(je.transparent));throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,a,i,r,s]),m=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(n);},[e,n,i?.label]);return {colorName:c,humanReadableName:m}}var je=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var Ao=io.forwardRef(({className:o,style:e,allowRemoval:l,allowAlpha:r=true,presets:t,labelPosition:s="top",colorLabel:a=true,includePicker:n=true,onChange:i,onChangeEnd:c$2,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:g$1,addColorButtonLabel:f,removeColorButtonLabel:I,customColorsLabel:P,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,colorPresetsLabel:h$1,noColorLabel:O,indeterminateLabel:K,transparentLabel:Mo,onTriggerPress:uo,renderTriggerButton:W,pickerMode:w="active",offset:J=2,placement:co=s==="start"?"bottom end":"bottom start","data-block-id":Oo,"data-block-class":p,isIndeterminate:b,indeterminateIcon:Q,...L},lt)=>{let Z=io.useRef(null),at=io.useRef(null),X=a$8(L),{triggerProps:oe,overlayProps:st}=a$9({type:"listbox"},X,Z),nt=a$a(L.portalContainer),[Y,wo]=a$b(g$1===void 0?void 0:C(g$1),C(m$1),v=>i?.(v?.toFormat("rgba")||null)),{formatMessage:j}=b$2(),Do=useMemo(()=>G(O??j(To.noColor),t),[t,j,O]),fo=c(),{colorName:ee}=ot({colorLabel:a||true,color:Y,presets:Do,isIndeterminate:b,indeterminateLabel:K,transparentLabel:Mo}),it=a?ee:false,te=useMemo(()=>Do.filter(v=>l||v.id!==F),[Do,l]),mt=f||j(To.addColor),pt=I||j(To.removeColor),ut=P||j(To.customColors),re=jsx(Ze,{color:Y||z,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:mt,removeColorButtonLabel:pt,customColorsLabel:ut,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,pickerMode:w,allowAlpha:r,isIndeterminate:!!b,state:X});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:s==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":Oo,"data-block-class":p,style:e,ref:lt,children:[L.label?jsx("label",{id:fo,className:h({labelPosition:s}),children:L.label}):null,W?W({isOpen:X.isOpen,color:Y,ref:Z,colorName:it,triggerProps:c$1(oe,{onPress:uo}),labelId:fo,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O}):jsx(no,{...c$1(oe,{onPress:uo,...L.label?{"aria-labelledby":fo}:{"aria-label":L["aria-label"]}}),ref:Z,isOpen:X.isOpen,isDisabled:L.isDisabled,labelPosition:s,color:Y,colorLabel:a,colorName:ee,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O})]}),jsx(a$c,{...L,portalContainer:nt,placement:co,state:X,offset:J,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:Z,overlayProps:st,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:n}),ref:at,"aria-labelledby":L.label?fo:void 0,"aria-label":L["aria-label"],children:[n&&w==="active"?jsxs(Fragment,{children:[jsx(xo,{color:Y||z,setColor:wo,allowAlpha:r,colorFormatLabel:M,onChangeEnd:v=>{c$2?.(v?.toFormat("rgba")||null);}}),re]}):null,!!te.length&&jsxs(Fragment,{children:[n&&w==="active"?jsx(a$e,{}):null,jsx(Wo,{autoFocus:n&&w==="active"?false:"first",state:X,triggerRef:Z,presets:te,colorPresetsLabel:h$1,color:Y,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},isIndeterminate:!!b})]}),n&&w==="lazy"?re:null]})})]})});Ao.displayName="ColorInput";var To=c$3({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=io.forwardRef(({className:o,style:e,icon:l,variant:r="standard","data-block-id":t,tooltip:s=true,iconTooltip:a=true,...n},i)=>{let c=io.useRef(null),{tooltipProps:m}=a$f({label:n["aria-label"],tooltip:s}),d=useCallback(({isOpen:g,color:f,ref:I,colorName:P,triggerProps:B,isIndeterminate:N,indeterminateIcon:y,noneLabel:M})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...B,"aria-label":n["aria-label"],ref:I,isOpen:g,isDisabled:n.isDisabled,color:f,colorLabel:false,colorName:P,isIndeterminate:N,indeterminateIcon:y,noneLabel:M}):jsx(Fo,{...B,isOpen:g,icon:TextIcon,color:f?.toString("hexa"),ref:I,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:N,indeterminateIcon:y})}),[n,m,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:b$1(i,c),children:[r==="standard"&&l?jsx(a$i,{icon:l,label:n["aria-label"],tooltip:a,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...n,renderTriggerButton:d})]})});rt.displayName="IconColorInput";export{Fo as a,Ao as b,rt as c};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-7SKQUEHP.mjs';import {a as a$2}from'./chunk-UY76QEJC.mjs';import {c,e}from'./chunk-IROFSPEN.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import h,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-7SKQUEHP.mjs';import {a as a$2}from'./chunk-2BG2JLFC.mjs';import {c,e}from'./chunk-IROFSPEN.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import h,{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}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import c,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import k,{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
@@ -7,4 +7,4 @@ import {a}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function P(r){return sprinkles.properties.has(r)}var m=c.forwardRef(({elementType:r="div",children:l,...e},a$1)=>{let f=r,{sprinkleProps:k,domProps:p}=useMemo(()=>{let s={},n={};for(let o in e)P(o)?s[o]=e[o]:n[o]=e[o];return {sprinkleProps:s,domProps:n}},[e]);return jsx(f,{...p,className:a(sprinkles(k),"BaselineUI-Box",p.className),ref:a$1,children:l})});m.displayName="Box";export{m as a};
10
+ function y(s){return sprinkles.properties.has(s)}var P=k.forwardRef(({elementType:s="div",children:m,...e},l)=>{let a$1=s,{sprinkleProps:f,domProps:r}=useMemo(()=>{let p={},n={};for(let o in e)y(o)?p[o]=e[o]:n[o]=e[o];return {sprinkleProps:p,domProps:n}},[e]);return jsx(a$1,{...r,className:a(sprinkles(f),"BaselineUI-Box",r.className),ref:l,children:m})});P.displayName="Box";export{P as a};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-2MS356Q7.mjs';import {f,d,b,h,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import A from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-2MS356Q7.mjs';import {f,d,b,h,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$2}from'./chunk-DIL5HL6K.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import A from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {c}from'./chunk-266F6F4Y.mjs';import {a,d,b as b$3}from'./chunk-JHA7DIPG.mjs';import {b as b$1}from'./chunk-XAM3AXXK.mjs';import {c as c$1}from'./chunk-QMV2O57M.mjs';import {b as b$4,a as a$b}from'./chunk-DF2D7NE6.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {a as a$1}from'./chunk-7SQRBY7N.mjs';import {c as c$2,d as d$2}from'./chunk-W6QO7FPZ.mjs';import {c as c$4}from'./chunk-C4WHTPLY.mjs';import {a as a$6}from'./chunk-I7LPPUZS.mjs';import {b}from'./chunk-KG2EHFYA.mjs';import {a as a$a}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-JJG67M2S.mjs';import {c as c$3}from'./chunk-TZGK36KC.mjs';import {a as a$4}from'./chunk-Y2MIU76N.mjs';import {a as a$8}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-4QBHQCCK.mjs';import {j,d as d$1}from'./chunk-KUDCYGII.mjs';import {o,i}from'./chunk-PPHSLODC.mjs';import {a as a$2,c as c$5}from'./chunk-3WKDIXCM.mjs';import {c as c$6}from'./chunk-ETM4MNG4.mjs';import {i as i$1,a as a$7,h,j as j$1}from'./chunk-SD43KVTU.mjs';import {useRef,useMemo,useEffect,useState,useCallback}from'react';/**
1
+ import {c}from'./chunk-3IPRT57V.mjs';import {a,d,b as b$3}from'./chunk-JHA7DIPG.mjs';import {b as b$1}from'./chunk-XAM3AXXK.mjs';import {c as c$1}from'./chunk-QMV2O57M.mjs';import {b as b$4,a as a$b}from'./chunk-DF2D7NE6.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {a as a$1}from'./chunk-7SQRBY7N.mjs';import {c as c$2,d as d$2}from'./chunk-W6QO7FPZ.mjs';import {c as c$4}from'./chunk-C4WHTPLY.mjs';import {a as a$6}from'./chunk-I7LPPUZS.mjs';import {b}from'./chunk-KG2EHFYA.mjs';import {a as a$a}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-JJG67M2S.mjs';import {c as c$3}from'./chunk-TZGK36KC.mjs';import {a as a$4}from'./chunk-Y2MIU76N.mjs';import {a as a$8}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-4QBHQCCK.mjs';import {j,d as d$1}from'./chunk-KUDCYGII.mjs';import {o,i}from'./chunk-PPHSLODC.mjs';import {a as a$2,c as c$5}from'./chunk-3WKDIXCM.mjs';import {c as c$6}from'./chunk-ETM4MNG4.mjs';import {i as i$1,a as a$7,h,j as j$1}from'./chunk-SD43KVTU.mjs';import {useRef,useMemo,useEffect,useState,useCallback}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {c}from'./chunk-266F6F4Y.mjs';import {a,d,b as b$3}from'./chunk-JHA7DIPG.
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var ze={"ar-AE":{buttonLabel:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0627\u062A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})} \u0645\u062A\u0627\u062D\u0629.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u062F\u062E\u0644\u0629 ${e.groupTitle}, \u0645\u0639 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0645\u062D\u062F\u062F",other:""},e.isSelected)}`,listboxLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A",selectedAnnouncement:e=>`${e.optionText}\u060C \u0645\u062D\u062F\u062F`},"bg-BG":{buttonLabel:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u0438`})} \u043D\u0430 \u0440\u0430\u0437\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u044A\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0438\u0437\u0431\u0440\u0430\u043D\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0438\u0437\u0431\u0440\u0430\u043D\u0438`},"cs-CZ":{buttonLabel:"Zobrazit doporu\u010Den\xED",countAnnouncement:(e,n)=>`K dispozici ${n.plural(e.optionCount,{one:()=>`je ${n.number(e.optionCount)} mo\u017Enost`,other:()=>`jsou/je ${n.number(e.optionCount)} mo\u017Enosti/-\xED`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina \u201E${e.groupTitle}\u201C ${n.plural(e.groupCount,{one:()=>`s ${n.number(e.groupCount)} mo\u017Enost\xED`,other:()=>`se ${n.number(e.groupCount)} mo\u017Enostmi`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:" (vybr\xE1no)",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybr\xE1no`},"da-DK":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mulighed tilg\xE6ngelig`,other:()=>`${n.number(e.optionCount)} muligheder tilg\xE6ngelige`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angivet gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mulighed`,other:()=>`${n.number(e.groupCount)} muligheder`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"de-DE":{buttonLabel:"Empfehlungen anzeigen",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} Option`,other:()=>`${n.number(e.optionCount)} Optionen`})} verf\xFCgbar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Eingetretene Gruppe ${e.groupTitle}, mit ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} Option`,other:()=>`${n.number(e.groupCount)} Optionen`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", ausgew\xE4hlt",other:""},e.isSelected)}`,listboxLabel:"Empfehlungen",selectedAnnouncement:e=>`${e.optionText}, ausgew\xE4hlt`},"el-GR":{buttonLabel:"\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03C0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03C9\u03BD",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 `})} \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0395\u03B9\u03C3\u03B1\u03B3\u03BC\u03AD\u03BD\u03B7 \u03BF\u03BC\u03AC\u03B4\u03B1 ${e.groupTitle}, \u03BC\u03B5 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03BF",other:""},e.isSelected)}`,listboxLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2",selectedAnnouncement:e=>`${e.optionText}, \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B5`},"en-US":{focusAnnouncement:(e,n)=>`${n.select({true:()=>`Entered group ${e.groupTitle}, with ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selected",other:""},e.isSelected)}`,countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} available.`,selectedAnnouncement:e=>`${e.optionText}, selected`,buttonLabel:"Show suggestions",listboxLabel:"Suggestions"},"es-ES":{buttonLabel:"Mostrar sugerencias",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opci\xF3n`,other:()=>`${n.number(e.optionCount)} opciones`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Se ha unido al grupo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opci\xF3n`,other:()=>`${n.number(e.groupCount)} opciones`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", seleccionado",other:""},e.isSelected)}`,listboxLabel:"Sugerencias",selectedAnnouncement:e=>`${e.optionText}, seleccionado`},"et-EE":{buttonLabel:"Kuva soovitused",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} valik`,other:()=>`${n.number(e.optionCount)} valikud`})} saadaval.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Sisestatud r\xFChm ${e.groupTitle}, valikuga ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} valik`,other:()=>`${n.number(e.groupCount)} valikud`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valitud",other:""},e.isSelected)}`,listboxLabel:"Soovitused",selectedAnnouncement:e=>`${e.optionText}, valitud`},"fi-FI":{buttonLabel:"N\xE4yt\xE4 ehdotukset",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} vaihtoehto`,other:()=>`${n.number(e.optionCount)} vaihtoehtoa`})} saatavilla.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Siirtyi ryhm\xE4\xE4n ${e.groupTitle}, jossa ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} vaihtoehto`,other:()=>`${n.number(e.groupCount)} vaihtoehtoa`})}.`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valittu",other:""},e.isSelected)}`,listboxLabel:"Ehdotukset",selectedAnnouncement:e=>`${e.optionText}, valittu`},"fr-FR":{buttonLabel:"Afficher les suggestions",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groupe ${e.groupTitle} rejoint, avec ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", s\xE9lectionn\xE9(s)",other:""},e.isSelected)}`,listboxLabel:"Suggestions",selectedAnnouncement:e=>`${e.optionText}, s\xE9lectionn\xE9`},"he-IL":{buttonLabel:"\u05D4\u05E6\u05D2 \u05D4\u05E6\u05E2\u05D5\u05EA",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.optionCount)}`,other:()=>`${n.number(e.optionCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})} \u05D1\u05DE\u05E6\u05D1 \u05D6\u05DE\u05D9\u05DF.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u05E0\u05DB\u05E0\u05E1 \u05DC\u05E7\u05D1\u05D5\u05E6\u05D4 ${e.groupTitle}, \u05E2\u05DD ${n.plural(e.groupCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.groupCount)}`,other:()=>`${n.number(e.groupCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u05E0\u05D1\u05D7\u05E8",other:""},e.isSelected)}`,listboxLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA",selectedAnnouncement:e=>`${e.optionText}, \u05E0\u05D1\u05D7\u05E8`},"hr-HR":{buttonLabel:"Prika\u017Ei prijedloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} opcije/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", odabranih",other:""},e.isSelected)}`,listboxLabel:"Prijedlozi",selectedAnnouncement:e=>`${e.optionText}, odabrano`},"hu-HU":{buttonLabel:"Javaslatok megjelen\xEDt\xE9se",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`,other:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`})} \xE1ll rendelkez\xE9sre.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Bel\xE9pett a(z) ${e.groupTitle} csoportba, amely ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`,other:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`})} tartalmaz. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", kijel\xF6lve",other:""},e.isSelected)}`,listboxLabel:"Javaslatok",selectedAnnouncement:e=>`${e.optionText}, kijel\xF6lve`},"it-IT":{buttonLabel:"Mostra suggerimenti",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opzione disponibile`,other:()=>`${n.number(e.optionCount)} opzioni disponibili`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingresso nel gruppo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opzione`,other:()=>`${n.number(e.groupCount)} opzioni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selezionato",other:""},e.isSelected)}`,listboxLabel:"Suggerimenti",selectedAnnouncement:e=>`${e.optionText}, selezionato`},"ja-JP":{buttonLabel:"\u5019\u88DC\u3092\u8868\u793A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u5229\u7528\u3067\u304D\u307E\u3059\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u5165\u529B\u3055\u308C\u305F\u30B0\u30EB\u30FC\u30D7 ${e.groupTitle}\u3001${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u542B\u3080\u3002`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:"\u3001\u9078\u629E\u6E08\u307F",other:""},e.isSelected)}`,listboxLabel:"\u5019\u88DC",selectedAnnouncement:e=>`${e.optionText}\u3001\u9078\u629E\u6E08\u307F`},"ko-KR":{buttonLabel:"\uC81C\uC548 \uC0AC\uD56D \uD45C\uC2DC",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`})}\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\uC785\uB825\uD55C \uADF8\uB8F9 ${e.groupTitle}, ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \uC120\uD0DD\uB428",other:""},e.isSelected)}`,listboxLabel:"\uC81C\uC548",selectedAnnouncement:e=>`${e.optionText}, \uC120\uD0DD\uB428`},"lt-LT":{buttonLabel:"Rodyti pasi\u016Blymus",countAnnouncement:(e,n)=>`Yra ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} parinktis`,other:()=>`${n.number(e.optionCount)} parinktys (-i\u0173)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u012Evesta grup\u0117 ${e.groupTitle}, su ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} parinktimi`,other:()=>`${n.number(e.groupCount)} parinktimis (-i\u0173)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", pasirinkta",other:""},e.isSelected)}`,listboxLabel:"Pasi\u016Blymai",selectedAnnouncement:e=>`${e.optionText}, pasirinkta`},"lv-LV":{buttonLabel:"R\u0101d\u012Bt ieteikumus",countAnnouncement:(e,n)=>`Pieejamo opciju skaits: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcijas`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ievad\u012Bta grupa ${e.groupTitle}, ar ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opciju`,other:()=>`${n.number(e.groupCount)} opcij\u0101m`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", atlas\u012Bta",other:""},e.isSelected)}`,listboxLabel:"Ieteikumi",selectedAnnouncement:e=>`${e.optionText}, atlas\u012Bta`},"nb-NO":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativer`})} finnes.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angitt gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativer`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"nl-NL":{buttonLabel:"Suggesties weergeven",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} optie`,other:()=>`${n.number(e.optionCount)} opties`})} beschikbaar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groep ${e.groupTitle} ingevoerd met ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} optie`,other:()=>`${n.number(e.groupCount)} opties`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", geselecteerd",other:""},e.isSelected)}`,listboxLabel:"Suggesties",selectedAnnouncement:e=>`${e.optionText}, geselecteerd`},"pl-PL":{buttonLabel:"Wy\u015Bwietlaj sugestie",countAnnouncement:(e,n)=>`dost\u0119pna/dost\u0119pne(-nych) ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcja`,other:()=>`${n.number(e.optionCount)} opcje(-i)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Do\u0142\u0105czono do grupy ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcj\u0105`,other:()=>`${n.number(e.groupCount)} opcjami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", wybrano",other:""},e.isSelected)}`,listboxLabel:"Sugestie",selectedAnnouncement:e=>`${e.optionText}, wybrano`},"pt-BR":{buttonLabel:"Mostrar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo inserido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"pt-PT":{buttonLabel:"Apresentar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo introduzido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"ro-RO":{buttonLabel:"Afi\u0219are sugestii",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\u021Biune`,other:()=>`${n.number(e.optionCount)} op\u021Biuni`})} disponibile.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grup ${e.groupTitle} introdus, cu ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\u021Biune`,other:()=>`${n.number(e.groupCount)} op\u021Biuni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selectat",other:""},e.isSelected)}`,listboxLabel:"Sugestii",selectedAnnouncement:e=>`${e.optionText}, selectat`},"ru-RU":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u0430\u044F \u0433\u0440\u0443\u043F\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0432\u044B\u0431\u0440\u0430\u043D\u043E`},"sk-SK":{buttonLabel:"Zobrazi\u0165 n\xE1vrhy",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mo\u017Enos\u0165`,other:()=>`${n.number(e.optionCount)} mo\u017Enosti/-\xED`})} k dispoz\xEDcii.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ou`,other:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", vybrat\xE9",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybrat\xE9`},"sl-SI":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Na voljo je ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Vnesena skupina ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcija`,other:()=>`${n.number(e.groupCount)} opcije`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izbrano",other:""},e.isSelected)}`,listboxLabel:"Predlogi",selectedAnnouncement:e=>`${e.optionText}, izbrano`},"sr-SP":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena grupa ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} optione/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izabranih",other:""},e.isSelected)}`,listboxLabel:"Predlozi",selectedAnnouncement:e=>`${e.optionText}, izabrano`},"sv-SE":{buttonLabel:"Visa f\xF6rslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativ`})} tillg\xE4ngliga.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingick i gruppen ${e.groupTitle} med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativ`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valda",other:""},e.isSelected)}`,listboxLabel:"F\xF6rslag",selectedAnnouncement:e=>`${e.optionText}, valda`},"tr-TR":{buttonLabel:"\xD6nerileri g\xF6ster",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} se\xE7enek`,other:()=>`${n.number(e.optionCount)} se\xE7enekler`})} kullan\u0131labilir.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Girilen grup ${e.groupTitle}, ile ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} se\xE7enek`,other:()=>`${n.number(e.groupCount)} se\xE7enekler`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", se\xE7ildi",other:""},e.isSelected)}`,listboxLabel:"\xD6neriler",selectedAnnouncement:e=>`${e.optionText}, se\xE7ildi`},"uk-UA":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0437 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u0438\u0431\u0440\u0430\u043D\u043E",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",selectedAnnouncement:e=>`${e.optionText}, \u0432\u0438\u0431\u0440\u0430\u043D\u043E`},"zh-CN":{buttonLabel:"\u663E\u793A\u5EFA\u8BAE",countAnnouncement:(e,n)=>`\u6709 ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`})}\u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8FDB\u5165\u4E86 ${e.groupTitle} \u7EC4\uFF0C\u5176\u4E2D\u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9009\u62E9",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8BAE",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9009\u62E9`},"zh-TW":{buttonLabel:"\u986F\u793A\u5EFA\u8B70",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u9078\u9805`,other:()=>`${n.number(e.optionCount)} \u9078\u9805`})} \u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8F38\u5165\u7684\u7FA4\u7D44 ${e.groupTitle}, \u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u9078\u9805`,other:()=>`${n.number(e.groupCount)} \u9078\u9805`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9078\u53D6",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8B70",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9078\u53D6`}};function Ye(e,n){let{buttonRef:p,popoverRef:C,inputRef:u,listBoxRef:s,keyboardDelegate:l,layoutDelegate:x,shouldFocusWrap:N,isReadOnly:S,isDisabled:H}=e,ue=useRef(null);p=p??ue;let M=b(ze,"@react-aria/combobox"),{menuTriggerProps:f,menuProps:I}=c({type:"listbox",isDisabled:H||S},n,p);a.set(n,{id:I.id});let{collection:P}=n,{disabledKeys:G}=n.selectionManager,_=useMemo(()=>l||new b$1({collection:P,disabledKeys:G,ref:s,layoutDelegate:x}),[l,x,P,G,s]),{collectionProps:r}=c$1({selectionManager:n.selectionManager,keyboardDelegate:_,disallowTypeAhead:true,disallowEmptySelection:true,shouldFocusWrap:N,ref:u,isVirtualized:true}),L=o(),{keyboardProps:$}=j({shortcuts:{Enter:t=>{let i=n.isOpen;if(n.isOpen&&s.current&&n.selectionManager.focusedKey!=null){let m=n.collection.getItem(n.selectionManager.focusedKey);if(m?.props.href){let A=s.current.querySelector(`[data-key="${CSS.escape(n.selectionManager.focusedKey.toString())}"]`);return A instanceof HTMLAnchorElement&&L.open(A,t,m.props.href,m.props.routerOptions),n.close(),{shouldPreventDefault:i}}else if(m?.props.onAction)return m.props.onAction(),n.close(),{shouldPreventDefault:i}}return n.commit(),{shouldPreventDefault:i}},Tab:()=>{if(n.isOpen&&s.current&&n.selectionManager.focusedKey!=null){let t=n.collection.getItem(n.selectionManager.focusedKey);if(t?.props.href)return n.close(),{shouldPreventDefault:false};if(t?.props.onAction)return t.props.onAction(),n.close(),{shouldPreventDefault:false,shouldContinuePropagation:true}}return n.isOpen&&n.commit(),{shouldPreventDefault:false,shouldContinuePropagation:true}},Escape:()=>{let t=false;return (!n.selectionManager.isEmpty||n.inputValue===""||e.allowsCustomValue)&&(t=true),n.revert(),{shouldContinuePropagation:t}}}}),{keyboardProps:h$1}=j({shortcuts:{ArrowDown:()=>(n.open("first","manual"),{shouldPreventDefault:false}),ArrowUp:()=>(n.open("last","manual"),{shouldPreventDefault:false}),ArrowLeft:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false}),ArrowRight:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false})},allowRepeats:true}),le=t=>{let i=h(p.current,t.relatedTarget),m=h(C.current,t.relatedTarget);i||m||(e.onBlur&&e.onBlur(t),n.setFocused(false));},d$2=t=>{n.isFocused||(e.onFocus&&e.onFocus(t),n.setFocused(true));},U=Xe([n.selectionManager.selectedKeys,n.selectionManager.selectionMode]),{isInvalid:b$4,validationErrors:W,validationDetails:Q}=n.displayValidation,{labelProps:B,inputProps:V,descriptionProps:g,errorMessageProps:ee}=a$1({...e,isRequired:e.selectionMode==="multiple"?e.isRequired&&n.selectionManager.isEmpty:e.isRequired,onChange:n.setInputValue,onKeyDown:S?e.onKeyDown:a$2(n.isOpen&&r.onKeyDown,$.onKeyDown,h$1.onKeyDown,e.onKeyDown),onBlur:le,value:n.inputValue,defaultValue:n.defaultInputValue,onFocus:d$2,autoComplete:"off",validate:void 0,[c$2]:n,"aria-describedby":[U,e["aria-describedby"]].filter(Boolean).join(" ")||void 0},u);a$3(u,n.defaultValue,n.setValue);let ie=t=>{t.pointerType==="touch"&&(u.current?.focus(),n.toggle(null,"manual"));},Z=t=>{t.pointerType!=="touch"&&(u.current?.focus(),n.toggle(t.pointerType==="keyboard"||t.pointerType==="virtual"?"first":null,"manual"));},me=a$4({id:f.id,"aria-label":M.format("buttonLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),a$9=a$4({id:I.id,"aria-label":M.format("listboxLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),F=useRef(0),ce=t=>{if(H||S)return;if(t.timeStamp-F.current<500){t.preventDefault(),u.current?.focus();return}let i=j$1(t).getBoundingClientRect(),m=t.changedTouches[0],A=Math.ceil(i.left+.5*i.width),J=Math.ceil(i.top+.5*i.height);m.clientX===A&&m.clientY===J&&(t.preventDefault(),u.current?.focus(),n.toggle(null,"manual"),F.current=t.timeStamp);},y=n.selectionManager.focusedKey!=null&&n.isOpen?n.collection.getItem(n.selectionManager.focusedKey):void 0,k=y?.parentKey??null,T=n.selectionManager.focusedKey??null,R=useRef(k),K=useRef(T);useEffect(()=>{if(i()&&y!=null&&T!=null&&T!==K.current){let t=n.selectionManager.isSelected(T),i=k!=null?n.collection.getItem(k):null,m=i?.["aria-label"]||(typeof i?.rendered=="string"?i.rendered:"")||"",A=M.format("focusAnnouncement",{isGroupChange:(i&&k!==R.current)??false,groupTitle:m,groupCount:i?[...b$2(i,n.collection)].length:0,optionText:y["aria-label"]||y.textValue||"",isSelected:t});a$5(A);}R.current=k,K.current=T;});let v=d(n.collection),w=useRef(v),O=useRef(n.isOpen);useEffect(()=>{let t=n.isOpen!==O.current&&(n.selectionManager.focusedKey==null||i());if(n.isOpen&&(t||v!==w.current)){let i=M.format("countAnnouncement",{optionCount:v});a$5(i);}w.current=v,O.current=n.isOpen;});let q=useRef(n.selectedKey);return useEffect(()=>{if(i()&&n.isFocused&&n.selectedItem&&n.selectedKey!==q.current){let t=n.selectedItem["aria-label"]||n.selectedItem.textValue||"",i=M.format("selectedAnnouncement",{optionText:t});a$5(i);}q.current=n.selectedKey;}),useEffect(()=>{if(n.isOpen)return a$6([u.current,C.current].filter(t=>t!=null))},[n.isOpen,u,C]),c$3(()=>{!y&&u.current&&i$1(a$7(u.current))===u.current&&c$4(u.current,null);},[y]),a$8(s,"react-aria-item-action",n.isOpen?()=>{n.close();}:void 0),{labelProps:{...B,onClick:"htmlFor"in B&&B.htmlFor||e.isDisabled?void 0:()=>{u.current?.focus(),d$1("keyboard");}},buttonProps:{...f,...me,excludeFromTabOrder:true,preventFocusOnPress:true,onPress:ie,onPressStart:Z,isDisabled:H||S},inputProps:c$5(V,{role:"combobox","aria-expanded":f["aria-expanded"],"aria-controls":n.isOpen?I.id:void 0,"aria-autocomplete":"list","aria-activedescendant":y?b$3(n,y.key):void 0,onTouchEnd:ce,autoCorrect:"off",spellCheck:"false"}),listBoxProps:c$5(I,a$9,{onAction:void 0,autoFocus:n.focusStrategy||true,shouldUseVirtualFocus:true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,linkBehavior:"selection",UNSTABLE_itemBehavior:"action"}),valueProps:{id:U},descriptionProps:g,errorMessageProps:ee,isInvalid:b$4,validationErrors:W,validationDetails:Q}}function Xe(e=[]){let n=c$6(),[p,C]=useState(true),[u,s]=useState(e);return u.some((l,x)=>!Object.is(l,e[x]))&&(C(true),s(e)),useEffect(()=>{p&&!document.getElementById(n)&&C(false);},[n,p,u]),p?n:void 0}function Qe(e){let{defaultFilter:n,menuTrigger:p="input",allowsEmptyCollection:C=false,allowsCustomValue:u,shouldCloseOnBlur:s=true,selectionMode:l="single"}=e,[x,N]=useState(false),[S,H]=useState(false),[ue,M]=useState(null),f=useRef(false),I=useMemo(()=>e.defaultValue!==void 0?e.defaultValue:l==="single"?e.defaultSelectedKey??null:[],[e.defaultValue,e.defaultSelectedKey,l]),P=useMemo(()=>e.value!==void 0?e.value:l==="single"?e.selectedKey:void 0,[e.value,e.selectedKey,l]),[G,_]=a$9(P,I,e.onChange),r=l==="single"&&Array.isArray(G)?G[0]:G,L=o=>{if(l==="single"){let c=Array.isArray(o)?o[0]??null:o;_(c),c!==r&&e.onSelectionChange?.(c);}else {let c=[];Array.isArray(o)?c=o:o!=null&&(c=[o]),_(c);}},{collection:$,selectionManager:h,disabledKeys:le}=b$4({...e,items:e.items??e.defaultItems,selectionMode:l,disallowEmptySelection:l==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>nn(r),[r]),onSelectionChange:o=>{if(o!=="all")if(l==="single"){let c=o.values().next().value??null;c===r?(e.onSelectionChange?.(c),w(),T()):L(c);}else L([...o]);}}),d=l==="single"?h.firstSelectedKey:null,U=useMemo(()=>[...h.selectedKeys].map(o=>$.getItem(o)).filter(o=>o!=null),[h.selectedKeys,$]),[b,W]=a$9(e.inputValue,He(e.defaultInputValue,d,$)||"",e.onInputChange),[Q]=useState(r),[B]=useState(b),V=$,g=useMemo(()=>e.items!=null||!n?$:en($,b,n),[$,b,n,e.items]),[ee,ie]=useState(g),Z=useRef("focus"),a=a$a({...e,onOpenChange:o=>{e.onOpenChange&&e.onOpenChange(o,o?Z.current:void 0),h.setFocused(o),o||h.setFocusedKey(null);},isOpen:void 0,defaultOpen:void 0}),F=(o=null,c)=>{let Y=c==="manual"||c==="focus"&&p==="focus";(C||g.size>0||Y&&V.size>0||e.items)&&(Y&&!a.isOpen&&e.items===void 0&&N(true),Z.current=c,M(o),a.open());},ce=(o=null,c)=>{let Y=c==="manual"||c==="focus"&&p==="focus";!(C||g.size>0||Y&&V.size>0||e.items)&&!a.isOpen||(Y&&!a.isOpen&&e.items===void 0&&N(true),a.isOpen||(Z.current=c),k(o));},y=useCallback(()=>{ie(x?V:g);},[x,V,g]),k=useCallback((o=null)=>{a.isOpen&&y(),M(o),a.toggle();},[a,y]),T=useCallback(()=>{a.isOpen&&(y(),a.close());},[a,y]),[R,K]=useState(b),v=useRef(false),w=()=>{let o=d!=null?$.getItem(d)?.textValue??"":"";v.current=false,K(o),W(o);},O=useRef(r),q=useRef(d!=null?$.getItem(d)?.textValue??"":"");useEffect(()=>{S&&(g.size>0||C)&&!a.isOpen&&b!==R&&p!=="manual"&&F(null,"input"),!x&&!C&&a.isOpen&&g.size===0&&(f.current=true,T()),S&&f.current&&g.size>0&&!a.isOpen&&p!=="manual"&&(f.current=false,F(null,"input")),r!=null&&r!==O.current&&l==="single"&&T(),b!==R&&(v.current=true,h.setFocusedKey(null),N(false),l==="single"&&b===""&&(e.inputValue===void 0||P===void 0)&&L(null)),r!==O.current&&(e.inputValue===void 0||P===void 0)?w():R!==b&&K(b);let o=d!=null?$.getItem(d)?.textValue??"":"";(!S||!v.current)&&d!=null&&e.inputValue===void 0&&d===O.current&&q.current!==o&&(v.current=false,K(o),W(o)),O.current=r,q.current=o;});let t=d$2({...e,value:useMemo(()=>Array.isArray(r)&&r.length===0?null:{inputValue:b,value:r,selectedKey:d},[b,d,r])}),i=()=>{f.current=false,u&&d==null?m():A();},m=()=>{if(l==="multiple"){K(b),T();return}let o=null;O.current=o,L(o),T();},A=(o=false)=>{if(P!==void 0&&e.inputValue!==void 0){let c=d!=null?$.getItem(d)?.textValue??"":"";(o||l==="multiple"||b!==c)&&(e.onSelectionChange?.(d),e.onChange?.(r)),K(c),T();}else w(),T();},J=()=>{if(f.current=false,u){let o=d!=null?$.getItem(d)?.textValue??"":"";b===o?A():m();}else A();},We=()=>{a.isOpen&&h.focusedKey!=null?h.isSelected(h.focusedKey)&&l==="single"?A(true):h.select(h.focusedKey):J();},pe=useRef([b,r]),Ze=o=>{o?(pe.current=[b,r],p==="focus"&&!e.isReadOnly&&F(null,"focus")):(s&&J(),(b!==pe.current[0]||r!==pe.current[1])&&t.commitValidation()),H(o);},qe=useMemo(()=>a.isOpen?x?V:g:ee,[a.isOpen,V,g,x,ee]),Ce=e.defaultSelectedKey??(l==="single"?Q:null);return {...t,...a,focusStrategy:ue,toggle:ce,open:F,close:J,selectionManager:h,value:r,defaultValue:I??Q,setValue:L,selectedKey:d,selectedItems:U,defaultSelectedKey:Ce,setSelectedKey:L,disabledKeys:le,isFocused:S,setFocused:Ze,selectedItem:U[0]??null,collection:qe,inputValue:b,defaultInputValue:He(e.defaultInputValue,Ce,$)??B,setInputValue:W,commit:We,revert:i}}function en(e,n,p){return new a$b(Ue(e,e,n,p))}function Ue(e,n,p,C){let u=[];for(let s of n)if(s.type==="section"&&s.hasChildNodes){let l=Ue(e,b$2(s,e),p,C);[...l].some(x=>x.type==="item")&&u.push({...s,childNodes:l});}else s.type==="item"&&C(s.textValue,p)?u.push({...s}):s.type!=="item"&&u.push({...s});return u}function He(e,n,p){return e==null&&n!=null?p.getItem(n)?.textValue??"":e}function nn(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}export{Ye as a,Qe as b};
10
+ var Ne={"ar-AE":{buttonLabel:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0627\u062A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})} \u0645\u062A\u0627\u062D\u0629.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u062F\u062E\u0644\u0629 ${e.groupTitle}, \u0645\u0639 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0645\u062D\u062F\u062F",other:""},e.isSelected)}`,listboxLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A",selectedAnnouncement:e=>`${e.optionText}\u060C \u0645\u062D\u062F\u062F`},"bg-BG":{buttonLabel:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u0438`})} \u043D\u0430 \u0440\u0430\u0437\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u044A\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0438\u0437\u0431\u0440\u0430\u043D\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0438\u0437\u0431\u0440\u0430\u043D\u0438`},"cs-CZ":{buttonLabel:"Zobrazit doporu\u010Den\xED",countAnnouncement:(e,n)=>`K dispozici ${n.plural(e.optionCount,{one:()=>`je ${n.number(e.optionCount)} mo\u017Enost`,other:()=>`jsou/je ${n.number(e.optionCount)} mo\u017Enosti/-\xED`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina \u201E${e.groupTitle}\u201C ${n.plural(e.groupCount,{one:()=>`s ${n.number(e.groupCount)} mo\u017Enost\xED`,other:()=>`se ${n.number(e.groupCount)} mo\u017Enostmi`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:" (vybr\xE1no)",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybr\xE1no`},"da-DK":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mulighed tilg\xE6ngelig`,other:()=>`${n.number(e.optionCount)} muligheder tilg\xE6ngelige`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angivet gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mulighed`,other:()=>`${n.number(e.groupCount)} muligheder`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"de-DE":{buttonLabel:"Empfehlungen anzeigen",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} Option`,other:()=>`${n.number(e.optionCount)} Optionen`})} verf\xFCgbar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Eingetretene Gruppe ${e.groupTitle}, mit ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} Option`,other:()=>`${n.number(e.groupCount)} Optionen`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", ausgew\xE4hlt",other:""},e.isSelected)}`,listboxLabel:"Empfehlungen",selectedAnnouncement:e=>`${e.optionText}, ausgew\xE4hlt`},"el-GR":{buttonLabel:"\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03C0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03C9\u03BD",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 `})} \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0395\u03B9\u03C3\u03B1\u03B3\u03BC\u03AD\u03BD\u03B7 \u03BF\u03BC\u03AC\u03B4\u03B1 ${e.groupTitle}, \u03BC\u03B5 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03BF",other:""},e.isSelected)}`,listboxLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2",selectedAnnouncement:e=>`${e.optionText}, \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B5`},"en-US":{focusAnnouncement:(e,n)=>`${n.select({true:()=>`Entered group ${e.groupTitle}, with ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selected",other:""},e.isSelected)}`,countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} available.`,selectedAnnouncement:e=>`${e.optionText}, selected`,buttonLabel:"Show suggestions",listboxLabel:"Suggestions"},"es-ES":{buttonLabel:"Mostrar sugerencias",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opci\xF3n`,other:()=>`${n.number(e.optionCount)} opciones`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Se ha unido al grupo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opci\xF3n`,other:()=>`${n.number(e.groupCount)} opciones`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", seleccionado",other:""},e.isSelected)}`,listboxLabel:"Sugerencias",selectedAnnouncement:e=>`${e.optionText}, seleccionado`},"et-EE":{buttonLabel:"Kuva soovitused",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} valik`,other:()=>`${n.number(e.optionCount)} valikud`})} saadaval.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Sisestatud r\xFChm ${e.groupTitle}, valikuga ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} valik`,other:()=>`${n.number(e.groupCount)} valikud`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valitud",other:""},e.isSelected)}`,listboxLabel:"Soovitused",selectedAnnouncement:e=>`${e.optionText}, valitud`},"fi-FI":{buttonLabel:"N\xE4yt\xE4 ehdotukset",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} vaihtoehto`,other:()=>`${n.number(e.optionCount)} vaihtoehtoa`})} saatavilla.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Siirtyi ryhm\xE4\xE4n ${e.groupTitle}, jossa ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} vaihtoehto`,other:()=>`${n.number(e.groupCount)} vaihtoehtoa`})}.`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valittu",other:""},e.isSelected)}`,listboxLabel:"Ehdotukset",selectedAnnouncement:e=>`${e.optionText}, valittu`},"fr-FR":{buttonLabel:"Afficher les suggestions",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groupe ${e.groupTitle} rejoint, avec ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", s\xE9lectionn\xE9(s)",other:""},e.isSelected)}`,listboxLabel:"Suggestions",selectedAnnouncement:e=>`${e.optionText}, s\xE9lectionn\xE9`},"he-IL":{buttonLabel:"\u05D4\u05E6\u05D2 \u05D4\u05E6\u05E2\u05D5\u05EA",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.optionCount)}`,other:()=>`${n.number(e.optionCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})} \u05D1\u05DE\u05E6\u05D1 \u05D6\u05DE\u05D9\u05DF.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u05E0\u05DB\u05E0\u05E1 \u05DC\u05E7\u05D1\u05D5\u05E6\u05D4 ${e.groupTitle}, \u05E2\u05DD ${n.plural(e.groupCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.groupCount)}`,other:()=>`${n.number(e.groupCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u05E0\u05D1\u05D7\u05E8",other:""},e.isSelected)}`,listboxLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA",selectedAnnouncement:e=>`${e.optionText}, \u05E0\u05D1\u05D7\u05E8`},"hr-HR":{buttonLabel:"Prika\u017Ei prijedloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} opcije/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", odabranih",other:""},e.isSelected)}`,listboxLabel:"Prijedlozi",selectedAnnouncement:e=>`${e.optionText}, odabrano`},"hu-HU":{buttonLabel:"Javaslatok megjelen\xEDt\xE9se",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`,other:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`})} \xE1ll rendelkez\xE9sre.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Bel\xE9pett a(z) ${e.groupTitle} csoportba, amely ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`,other:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`})} tartalmaz. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", kijel\xF6lve",other:""},e.isSelected)}`,listboxLabel:"Javaslatok",selectedAnnouncement:e=>`${e.optionText}, kijel\xF6lve`},"it-IT":{buttonLabel:"Mostra suggerimenti",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opzione disponibile`,other:()=>`${n.number(e.optionCount)} opzioni disponibili`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingresso nel gruppo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opzione`,other:()=>`${n.number(e.groupCount)} opzioni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selezionato",other:""},e.isSelected)}`,listboxLabel:"Suggerimenti",selectedAnnouncement:e=>`${e.optionText}, selezionato`},"ja-JP":{buttonLabel:"\u5019\u88DC\u3092\u8868\u793A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u5229\u7528\u3067\u304D\u307E\u3059\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u5165\u529B\u3055\u308C\u305F\u30B0\u30EB\u30FC\u30D7 ${e.groupTitle}\u3001${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u542B\u3080\u3002`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:"\u3001\u9078\u629E\u6E08\u307F",other:""},e.isSelected)}`,listboxLabel:"\u5019\u88DC",selectedAnnouncement:e=>`${e.optionText}\u3001\u9078\u629E\u6E08\u307F`},"ko-KR":{buttonLabel:"\uC81C\uC548 \uC0AC\uD56D \uD45C\uC2DC",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`})}\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\uC785\uB825\uD55C \uADF8\uB8F9 ${e.groupTitle}, ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \uC120\uD0DD\uB428",other:""},e.isSelected)}`,listboxLabel:"\uC81C\uC548",selectedAnnouncement:e=>`${e.optionText}, \uC120\uD0DD\uB428`},"lt-LT":{buttonLabel:"Rodyti pasi\u016Blymus",countAnnouncement:(e,n)=>`Yra ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} parinktis`,other:()=>`${n.number(e.optionCount)} parinktys (-i\u0173)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u012Evesta grup\u0117 ${e.groupTitle}, su ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} parinktimi`,other:()=>`${n.number(e.groupCount)} parinktimis (-i\u0173)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", pasirinkta",other:""},e.isSelected)}`,listboxLabel:"Pasi\u016Blymai",selectedAnnouncement:e=>`${e.optionText}, pasirinkta`},"lv-LV":{buttonLabel:"R\u0101d\u012Bt ieteikumus",countAnnouncement:(e,n)=>`Pieejamo opciju skaits: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcijas`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ievad\u012Bta grupa ${e.groupTitle}, ar ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opciju`,other:()=>`${n.number(e.groupCount)} opcij\u0101m`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", atlas\u012Bta",other:""},e.isSelected)}`,listboxLabel:"Ieteikumi",selectedAnnouncement:e=>`${e.optionText}, atlas\u012Bta`},"nb-NO":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativer`})} finnes.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angitt gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativer`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"nl-NL":{buttonLabel:"Suggesties weergeven",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} optie`,other:()=>`${n.number(e.optionCount)} opties`})} beschikbaar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groep ${e.groupTitle} ingevoerd met ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} optie`,other:()=>`${n.number(e.groupCount)} opties`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", geselecteerd",other:""},e.isSelected)}`,listboxLabel:"Suggesties",selectedAnnouncement:e=>`${e.optionText}, geselecteerd`},"pl-PL":{buttonLabel:"Wy\u015Bwietlaj sugestie",countAnnouncement:(e,n)=>`dost\u0119pna/dost\u0119pne(-nych) ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcja`,other:()=>`${n.number(e.optionCount)} opcje(-i)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Do\u0142\u0105czono do grupy ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcj\u0105`,other:()=>`${n.number(e.groupCount)} opcjami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", wybrano",other:""},e.isSelected)}`,listboxLabel:"Sugestie",selectedAnnouncement:e=>`${e.optionText}, wybrano`},"pt-BR":{buttonLabel:"Mostrar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo inserido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"pt-PT":{buttonLabel:"Apresentar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo introduzido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"ro-RO":{buttonLabel:"Afi\u0219are sugestii",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\u021Biune`,other:()=>`${n.number(e.optionCount)} op\u021Biuni`})} disponibile.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grup ${e.groupTitle} introdus, cu ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\u021Biune`,other:()=>`${n.number(e.groupCount)} op\u021Biuni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selectat",other:""},e.isSelected)}`,listboxLabel:"Sugestii",selectedAnnouncement:e=>`${e.optionText}, selectat`},"ru-RU":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u0430\u044F \u0433\u0440\u0443\u043F\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0432\u044B\u0431\u0440\u0430\u043D\u043E`},"sk-SK":{buttonLabel:"Zobrazi\u0165 n\xE1vrhy",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mo\u017Enos\u0165`,other:()=>`${n.number(e.optionCount)} mo\u017Enosti/-\xED`})} k dispoz\xEDcii.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ou`,other:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", vybrat\xE9",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybrat\xE9`},"sl-SI":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Na voljo je ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Vnesena skupina ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcija`,other:()=>`${n.number(e.groupCount)} opcije`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izbrano",other:""},e.isSelected)}`,listboxLabel:"Predlogi",selectedAnnouncement:e=>`${e.optionText}, izbrano`},"sr-SP":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena grupa ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} optione/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izabranih",other:""},e.isSelected)}`,listboxLabel:"Predlozi",selectedAnnouncement:e=>`${e.optionText}, izabrano`},"sv-SE":{buttonLabel:"Visa f\xF6rslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativ`})} tillg\xE4ngliga.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingick i gruppen ${e.groupTitle} med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativ`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valda",other:""},e.isSelected)}`,listboxLabel:"F\xF6rslag",selectedAnnouncement:e=>`${e.optionText}, valda`},"tr-TR":{buttonLabel:"\xD6nerileri g\xF6ster",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} se\xE7enek`,other:()=>`${n.number(e.optionCount)} se\xE7enekler`})} kullan\u0131labilir.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Girilen grup ${e.groupTitle}, ile ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} se\xE7enek`,other:()=>`${n.number(e.groupCount)} se\xE7enekler`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", se\xE7ildi",other:""},e.isSelected)}`,listboxLabel:"\xD6neriler",selectedAnnouncement:e=>`${e.optionText}, se\xE7ildi`},"uk-UA":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0437 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u0438\u0431\u0440\u0430\u043D\u043E",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",selectedAnnouncement:e=>`${e.optionText}, \u0432\u0438\u0431\u0440\u0430\u043D\u043E`},"zh-CN":{buttonLabel:"\u663E\u793A\u5EFA\u8BAE",countAnnouncement:(e,n)=>`\u6709 ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`})}\u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8FDB\u5165\u4E86 ${e.groupTitle} \u7EC4\uFF0C\u5176\u4E2D\u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9009\u62E9",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8BAE",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9009\u62E9`},"zh-TW":{buttonLabel:"\u986F\u793A\u5EFA\u8B70",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u9078\u9805`,other:()=>`${n.number(e.optionCount)} \u9078\u9805`})} \u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8F38\u5165\u7684\u7FA4\u7D44 ${e.groupTitle}, \u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u9078\u9805`,other:()=>`${n.number(e.groupCount)} \u9078\u9805`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9078\u53D6",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8B70",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9078\u53D6`}};function Xe(e,n){let{buttonRef:r,popoverRef:m,inputRef:u,listBoxRef:d$2,keyboardDelegate:l,layoutDelegate:x,shouldFocusWrap:U,isReadOnly:A,isDisabled:W}=e,ue=useRef(null);r=r??ue;let M=b(Ne,"@react-aria/combobox"),{menuTriggerProps:S,menuProps:I}=c({type:"listbox",isDisabled:W||A},n,r);a.set(n,{id:I.id});let{collection:P}=n,{disabledKeys:R}=n.selectionManager,_=useMemo(()=>l||new b$1({collection:P,disabledKeys:R,ref:d$2,layoutDelegate:x}),[l,x,P,R,d$2]),{collectionProps:s}=c$1({selectionManager:n.selectionManager,keyboardDelegate:_,disallowTypeAhead:true,disallowEmptySelection:true,shouldFocusWrap:U,ref:u,isVirtualized:true}),L=o(),{keyboardProps:$}=j({shortcuts:{Enter:t=>{let i=n.isOpen;if(n.isOpen&&d$2.current&&n.selectionManager.focusedKey!=null){let h=n.collection.getItem(n.selectionManager.focusedKey);if(h?.props.href){let v=d$2.current.querySelector(`[data-key="${CSS.escape(n.selectionManager.focusedKey.toString())}"]`);return v instanceof HTMLAnchorElement&&L.open(v,t,h.props.href,h.props.routerOptions),n.close(),{shouldPreventDefault:i}}else if(h?.props.onAction)return h.props.onAction(),n.close(),{shouldPreventDefault:i}}return n.commit(),{shouldPreventDefault:i}},Tab:()=>{if(n.isOpen&&d$2.current&&n.selectionManager.focusedKey!=null){let t=n.collection.getItem(n.selectionManager.focusedKey);if(t?.props.href)return n.close(),{shouldPreventDefault:false};if(t?.props.onAction)return t.props.onAction(),n.close(),{shouldPreventDefault:false,shouldContinuePropagation:true}}return n.isOpen&&n.commit(),{shouldPreventDefault:false,shouldContinuePropagation:true}},Escape:()=>{let t=false;return (!n.selectionManager.isEmpty||n.inputValue===""||e.allowsCustomValue)&&(t=true),n.revert(),{shouldContinuePropagation:t}}}}),{keyboardProps:C}=j({shortcuts:{ArrowDown:()=>(n.open("first","manual"),{shouldPreventDefault:false}),ArrowUp:()=>(n.open("last","manual"),{shouldPreventDefault:false}),ArrowLeft:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false}),ArrowRight:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false})},allowRepeats:true}),le=t=>{let i=h(r.current,t.relatedTarget),h$1=h(m.current,t.relatedTarget);i||h$1||(e.onBlur&&e.onBlur(t),n.setFocused(false));},b$4=t=>{n.isFocused||(e.onFocus&&e.onFocus(t),n.setFocused(true));},Z=_e([n.selectionManager.selectedKeys,n.selectionManager.selectionMode]),{isInvalid:c$6,validationErrors:q,validationDetails:Q}=n.displayValidation,{labelProps:B,inputProps:V,descriptionProps:g,errorMessageProps:ee}=a$1({...e,isRequired:e.selectionMode==="multiple"?e.isRequired&&n.selectionManager.isEmpty:e.isRequired,onChange:n.setInputValue,onKeyDown:A?e.onKeyDown:a$2(n.isOpen&&s.onKeyDown,$.onKeyDown,C.onKeyDown,e.onKeyDown),onBlur:le,value:n.inputValue,defaultValue:n.defaultInputValue,onFocus:b$4,autoComplete:"off",validate:void 0,[c$2]:n,"aria-describedby":[Z,e["aria-describedby"]].filter(Boolean).join(" ")||void 0},u);a$3(u,n.defaultValue,n.setValue);let ie=t=>{t.pointerType==="touch"&&(u.current?.focus(),n.toggle(null,"manual"));},J=t=>{t.pointerType!=="touch"&&(u.current?.focus(),n.toggle(t.pointerType==="keyboard"||t.pointerType==="virtual"?"first":null,"manual"));},Ce=a$4({id:S.id,"aria-label":M.format("buttonLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),a$9=a$4({id:I.id,"aria-label":M.format("listboxLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),F=useRef(0),ce=t=>{if(W||A)return;if(t.timeStamp-F.current<500){t.preventDefault(),u.current?.focus();return}let i=j$1(t).getBoundingClientRect(),h=t.changedTouches[0],v=Math.ceil(i.left+.5*i.width),H=Math.ceil(i.top+.5*i.height);h.clientX===v&&h.clientY===H&&(t.preventDefault(),u.current?.focus(),n.toggle(null,"manual"),F.current=t.timeStamp);},y=n.selectionManager.focusedKey!=null&&n.isOpen?n.collection.getItem(n.selectionManager.focusedKey):void 0,k=y?.parentKey??null,T=n.selectionManager.focusedKey??null,w=useRef(k),K=useRef(T);useEffect(()=>{if(i()&&y!=null&&T!=null&&T!==K.current){let t=n.selectionManager.isSelected(T),i=k!=null?n.collection.getItem(k):null,h=i?.["aria-label"]||(typeof i?.rendered=="string"?i.rendered:"")||"",v=M.format("focusAnnouncement",{isGroupChange:(i&&k!==w.current)??false,groupTitle:h,groupCount:i?[...b$2(i,n.collection)].length:0,optionText:y["aria-label"]||y.textValue||"",isSelected:t});a$5(v);}w.current=k,K.current=T;});let f=d(n.collection),z=useRef(f),N=useRef(n.isOpen);useEffect(()=>{let t=n.isOpen!==N.current&&(n.selectionManager.focusedKey==null||i());if(n.isOpen&&(t||f!==z.current)){let i=M.format("countAnnouncement",{optionCount:f});a$5(i);}z.current=f,N.current=n.isOpen;});let O=useRef(n.selectedKey);return useEffect(()=>{if(i()&&n.isFocused&&n.selectedItem&&n.selectedKey!==O.current){let t=n.selectedItem["aria-label"]||n.selectedItem.textValue||"",i=M.format("selectedAnnouncement",{optionText:t});a$5(i);}O.current=n.selectedKey;}),useEffect(()=>{if(n.isOpen)return a$6([u.current,m.current].filter(t=>t!=null))},[n.isOpen,u,m]),c$3(()=>{!y&&u.current&&i$1(a$7(u.current))===u.current&&c$4(u.current,null);},[y]),a$8(d$2,"react-aria-item-action",n.isOpen?()=>{n.close();}:void 0),{labelProps:{...B,onClick:"htmlFor"in B&&B.htmlFor||e.isDisabled?void 0:()=>{u.current?.focus(),d$1("keyboard");}},buttonProps:{...S,...Ce,excludeFromTabOrder:true,preventFocusOnPress:true,onPress:ie,onPressStart:J,isDisabled:W||A},inputProps:c$5(V,{role:"combobox","aria-expanded":S["aria-expanded"],"aria-controls":n.isOpen?I.id:void 0,"aria-autocomplete":"list","aria-activedescendant":y?b$3(n,y.key):void 0,onTouchEnd:ce,autoCorrect:"off",spellCheck:"false"}),listBoxProps:c$5(I,a$9,{onAction:void 0,autoFocus:n.focusStrategy||true,shouldUseVirtualFocus:true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,linkBehavior:"selection",UNSTABLE_itemBehavior:"action"}),valueProps:{id:Z},descriptionProps:g,errorMessageProps:ee,isInvalid:c$6,validationErrors:q,validationDetails:Q}}function _e(e=[]){let n=c$6(),[r,m]=useState(true),[u,d]=useState(e);return u.some((l,x)=>!Object.is(l,e[x]))&&(m(true),d(e)),useEffect(()=>{r&&!document.getElementById(n)&&m(false);},[n,r,u]),r?n:void 0}function en(e){let{defaultFilter:n,menuTrigger:r="input",allowsEmptyCollection:m=false,allowsCustomValue:u,shouldCloseOnBlur:d=true,selectionMode:l="single"}=e,[x,U]=useState(false),[A,W]=useState(false),[ue,M]=useState(null),S=useRef(false),I=useMemo(()=>e.defaultValue!==void 0?e.defaultValue:l==="single"?e.defaultSelectedKey??null:[],[e.defaultValue,e.defaultSelectedKey,l]),P=useMemo(()=>e.value!==void 0?e.value:l==="single"?e.selectedKey:void 0,[e.value,e.selectedKey,l]),[R,_]=a$9(P,I,e.onChange),s=l==="single"&&Array.isArray(R)?R[0]:R,L=o=>{if(l==="single"){let p=Array.isArray(o)?o[0]??null:o;_(p),p!==s&&e.onSelectionChange?.(p);}else {let p=[];Array.isArray(o)?p=o:o!=null&&(p=[o]),_(p);}},{collection:$,selectionManager:C,disabledKeys:le}=b$4({...e,items:e.items??e.defaultItems,selectionMode:l,disallowEmptySelection:l==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>on(s),[s]),onSelectionChange:o=>{if(o!=="all")if(l==="single"){let p=o.values().next().value??null;p===s?(e.onSelectionChange?.(p),z(),T()):L(p);}else L([...o]);}}),b=l==="single"?C.firstSelectedKey:null,Z=useMemo(()=>[...C.selectedKeys].map(o=>$.getItem(o)).filter(o=>o!=null),[C.selectedKeys,$]),[c,q]=a$9(e.inputValue,Ue(e.defaultInputValue,b,$)||"",e.onInputChange),[Q]=useState(s),[B]=useState(c),V=$,g=useMemo(()=>e.items!=null||!n?$:nn($,c,n),[$,c,n,e.items]),[ee,ie]=useState(g),J=useRef("focus"),a=a$a({...e,onOpenChange:o=>{e.onOpenChange&&e.onOpenChange(o,o?J.current:void 0),C.setFocused(o),o||C.setFocusedKey(null);},isOpen:void 0,defaultOpen:void 0}),F=(o=null,p)=>{let Y=p==="manual"||p==="focus"&&r==="focus";(m||g.size>0||Y&&V.size>0||e.items)&&(Y&&!a.isOpen&&e.items===void 0&&U(true),J.current=p,M(o),a.open());},ce=(o=null,p)=>{let Y=p==="manual"||p==="focus"&&r==="focus";!(m||g.size>0||Y&&V.size>0||e.items)&&!a.isOpen||(Y&&!a.isOpen&&e.items===void 0&&U(true),a.isOpen||(J.current=p),k(o));},y=useCallback(()=>{ie(x?V:g);},[x,V,g]),k=useCallback((o=null)=>{a.isOpen&&y(),M(o),a.toggle();},[a,y]),T=useCallback(()=>{a.isOpen&&(y(),a.close());},[a,y]),[w,K]=useState(c),f=useRef(false),z=()=>{let o=b!=null?$.getItem(b)?.textValue??"":"";f.current=false,K(o),q(o);},N=useRef(null),O=useRef(s),t=useRef(b!=null?$.getItem(b)?.textValue??"":"");useEffect(()=>{A&&(g.size>0||m)&&!a.isOpen&&c!==w&&c!==N.current&&r!=="manual"&&F(null,"input"),!x&&!m&&a.isOpen&&g.size===0&&(S.current=true,T()),A&&S.current&&g.size>0&&!a.isOpen&&r!=="manual"&&(S.current=false,F(null,"input")),s!=null&&s!==O.current&&l==="single"&&T(),c!==w&&(f.current=true,C.setFocusedKey(null),U(false),l==="single"&&c===""&&(e.inputValue===void 0||P===void 0)&&L(null)),s!==O.current&&(e.inputValue===void 0||P===void 0)?z():w!==c&&K(c);let o=b!=null?$.getItem(b)?.textValue??"":"";(!A||!f.current)&&b!=null&&e.inputValue===void 0&&b===O.current&&t.current!==o&&(f.current=false,K(o),q(o)),O.current=s,t.current=o,N.current=null;});let i=d$2({...e,value:useMemo(()=>Array.isArray(s)&&s.length===0?null:{inputValue:c,value:s,selectedKey:b},[c,b,s])}),h=()=>{S.current=false,u&&b==null?v():H();},v=()=>{if(l==="multiple"){K(c),T();return}let o=null;O.current=o,L(o),N.current=c,T();},H=(o=false)=>{if(P!==void 0&&e.inputValue!==void 0){let p=b!=null?$.getItem(b)?.textValue??"":"";(o||l==="multiple"||c!==p)&&(e.onSelectionChange?.(b),e.onChange?.(s)),K(p),T();}else z(),T();},pe=()=>{if(S.current=false,u){let o=b!=null?$.getItem(b)?.textValue??"":"";c===o?H():v();}else H();},Ze=()=>{a.isOpen&&C.focusedKey!=null?C.isSelected(C.focusedKey)&&l==="single"?H(true):C.select(C.focusedKey):pe();},re=useRef([c,s]),qe=o=>{o?(re.current=[c,s],r==="focus"&&!e.isReadOnly&&F(null,"focus")):(d&&pe(),(c!==re.current[0]||s!==re.current[1])&&i.commitValidation()),W(o);},Je=useMemo(()=>a.isOpen?x?V:g:ee,[a.isOpen,V,g,x,ee]),he=e.defaultSelectedKey??(l==="single"?Q:null);return {...i,...a,focusStrategy:ue,toggle:ce,open:F,close:pe,selectionManager:C,value:s,defaultValue:I??Q,setValue:L,selectedKey:b,selectedItems:Z,defaultSelectedKey:he,setSelectedKey:L,disabledKeys:le,isFocused:A,setFocused:qe,selectedItem:Z[0]??null,collection:Je,inputValue:c,defaultInputValue:Ue(e.defaultInputValue,he,$)??B,setInputValue:q,commit:Ze,revert:h}}function nn(e,n,r){return new a$b(We(e,e,n,r))}function We(e,n,r,m){let u=[];for(let d of n)if(d.type==="section"&&d.hasChildNodes){let l=We(e,b$2(d,e),r,m);[...l].some(x=>x.type==="item")&&u.push({...d,childNodes:l});}else d.type==="item"&&m(d.textValue,r)?u.push({...d}):d.type!=="item"&&u.push({...d});return u}function Ue(e,n,r){return e==null&&n!=null?r.getItem(n)?.textValue??"":e}function on(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}export{Xe as a,en as b};
@@ -1,4 +1,4 @@
1
- import {c,a as a$1,d,e}from'./chunk-3RWM6E56.mjs';import {a as a$7}from'./chunk-6M77HEKA.mjs';import {a as a$3}from'./chunk-PYV5J322.mjs';import {a as a$6}from'./chunk-J2KZM2I2.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {b as b$1,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-JTKDC2CM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,j}from'./chunk-MBRNO6IW.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {CalendarIcon}from'@baseline-ui/icons/16';import {createCalendar,toCalendarDateTime,Time,toZoned}from'@internationalized/date';import n from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {c,a as a$1,d,e}from'./chunk-57YWI7EG.mjs';import {a as a$7}from'./chunk-464QF4AV.mjs';import {a as a$3}from'./chunk-EFFODO2N.mjs';import {a as a$6}from'./chunk-Z73YU5ZQ.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {b as b$1,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2OXYNLVN.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,j}from'./chunk-MBRNO6IW.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {CalendarIcon}from'@baseline-ui/icons/16';import {createCalendar,toCalendarDateTime,Time,toZoned}from'@internationalized/date';import n from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {b}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import z,{useLayoutEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1}from'./chunk-DIL5HL6K.mjs';import {b}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import z,{useLayoutEffect}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 {b,a as a$5}from'./chunk-XYK5KKOH.mjs';import {a as a$1,f as f$1}from'./chunk-7OUGARUO.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-266F6F4Y.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-J2KZM2I2.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$e}from'./chunk-UY76QEJC.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}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-EJYSTNXD.mjs';import {a as a$1,f as f$1}from'./chunk-5GW36EQJ.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-3IPRT57V.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-Z73YU5ZQ.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$e}from'./chunk-2BG2JLFC.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}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 {b}from'./chunk-JDIGAVFU.mjs';import {a as a$1}from'./chunk-JZXLV6JU.mjs';import {a as a$8}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1,a as a$b}from'./chunk-ETM4MNG4.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {b}from'./chunk-VIMSH5F5.mjs';import {a as a$1}from'./chunk-JZXLV6JU.mjs';import {a as a$8}from'./chunk-DIL5HL6K.mjs';import {a as a$a}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1,a as a$b}from'./chunk-ETM4MNG4.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-JTKDC2CM.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.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-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{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';/**
1
+ import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-2OXYNLVN.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.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-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{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
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-JTKDC2CM.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17de",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d2 _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:"_1kvz17d3"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var N=H.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:m}=useContext(z),l=H.Children.toArray(a).filter(e=>H.isValidElement(e));useEffect(()=>{for(let e of o.keys())e>=l.length&&o.delete(e);},[o,l.length]);let{keyboardProps:_}=j({onKeyDown:e=>{let s=i(a$1(e.target)),c=[...o?.keys()||[]].findIndex(d=>{let y=o?.get(d)?.current;return y?y===s:false});if(!o?.get(c)){e.continuePropagation();return}let n=o?.size||0,v=new Set([...m??[]].map(String)),u=d=>{let y=o.get(d)?.current?.dataset.key;return y!==void 0&&v.has(y)},r=(d,y)=>{for(let g=1;g<=n;g++){let A=((d+y*g)%n+n)%n;if(!u(A)){o.get(A)?.current?.focus();return}}};switch(e.key){case "Home":{e.preventDefault(),r(-1,1);break}case "End":{e.preventDefault(),r(n,-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,s)=>H.cloneElement(e,{index:s}))})});N.displayName="AccordionBase";var z=H.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=H.forwardRef(({children:a,disabledKeys:i,defaultExpandedKeys:p=new Set,expandedKeys:t,expansionMode:o="multiple",onChange:m,className:l,style:_},e)=>{let[s,c]=a$3(t,p,m),f=H.useRef(new Map).current,[n,v]=H.useState(o);useEffect(()=>{v(o);},[o]);let u=useMemo(()=>({expandedKeys:s,setExpandedKeys:c,disabledKeys:i,headers:f,expansionMode:n}),[s,c,i,f,n]);return jsx(z.Provider,{value:u,children:jsx(a$4,{children:jsx(N,{className:l,style:_,ref:e,children:a})})})});se.displayName="Accordion";var D=H.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:m,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let s=H.useRef(null),{expandedKeys:c$1,setExpandedKeys:f,expansionMode:n,disabledKeys:v,headers:u}=useContext(z),r=v?.has(t),d$1=b$1();a$5(d$1);let{focusNext:y,focusPrevious:g}=d$1,{direction:A}=b$2(),pe=A==="rtl"?"ArrowLeft":"ArrowRight",le=A==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?g({wrap:true}):x.continuePropagation();},isDisabled:r});useEffect(()=>{a$5(typeof m=="number","AccordionItem must have an index"),u?.set(m,s);},[m,u]);let F=()=>{f(x=>{let h=new Set(x);return h.has(t)?h.delete(t):(n==="single"&&h.clear(),h.add(t)),h});},{buttonProps:ue}=a$6({"aria-expanded":c$1.has(t),"aria-controls":p,onPress:F,isDisabled:r},s),{pressProps:ye}=d({onPress:F,isDisabled:r}),{focusProps:fe,isFocusVisible:ze}=a$7(),{hoverProps:_e,isHovered:L}=a$8({isDisabled:r}),{focusProps:ve,isFocusVisible:xe}=a$7({within:true}),he=c$1.has(t);return jsxs("h3",{...c(me,ye,_e,ve),className:oe({isFocusVisible:ze,isHovered:L,isDisabled:r}),ref:e,children:[jsxs("div",{className:re({isDisabled:!!r}),children:[jsx(ChevronRightIcon,{className:Z({isExpanded:he}),size:8}),jsx("button",{...c(ue,fe),id:o,"data-key":t,className:te,ref:s,children:a})]}),i?.length?jsx("div",{"data-testid":"action-buttons",className:Y({showActionsOnTriggerOnly:_,isTriggered:xe||L}),children:i.map((x,h)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:r,...x},h))}):null,l?jsx("div",{className:ee,children:l}):null]})});D.displayName="AccordionHeader";var Ke={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},Me=({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=H.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:m,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:s},c)=>{let f=c$1(),n=c$1(),{expandedKeys:v}=useContext(z),u=v.has(t),r={role:"region","aria-labelledby":n,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:n,title:a,controlId:f,ref:c,index:o,subLabel:m,showActionsOnTriggerOnly:e})}),s?jsx(Me,{...r,isExpanded:u,children:d}):jsx(AnimatePresence,{initial:false,children:u?jsx(motion.section,{...r,initial:"closed",animate:"open",exit:"closed",children:d}):null})]})});de.displayName="AccordionItem";export{se as a,de as b};
10
+ var X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17de",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d2 _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:"_1kvz17d3"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var M=H.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:u}=useContext(z),l=H.Children.toArray(a).filter(e=>H.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 g=1;g<=s;g++){let A=((d+y*g)%s+s)%s;if(!m(A)){o.get(A)?.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)=>H.cloneElement(e,{index:n}))})});M.displayName="AccordionBase";var z=H.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=H.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=H.useRef(new Map).current,[s,v]=H.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=H.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:u,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let n=H.useRef(null),{expandedKeys:c$1,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:g}=d$1,{direction:A}=b$2(),pe=A==="rtl"?"ArrowLeft":"ArrowRight",le=A==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?g({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$1.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$1.has(t);return jsxs("h3",{...c(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}),size:8}),jsx("button",{...c(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=H.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:u,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:n},c)=>{let f=c$1(),s=c$1(),{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,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};
@@ -0,0 +1,10 @@
1
+ import {a as a$b}from'./chunk-5USQ6HBY.mjs';import {c as c$4,a as a$c,b as b$5}from'./chunk-BROSGYL3.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,g}from'./chunk-PG3WDHSK.mjs';import {a as a$5}from'./chunk-CY6W27WG.mjs';import {a as a$a}from'./chunk-6QQEK5I6.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-4QBHQCCK.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {b as b$4,j as j$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Se,{useMemo,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 N=new WeakMap;function w(e,a,r){let{value:t,children:p,"aria-label":n,"aria-labelledby":u,onPressStart:s,onPressEnd:l,onPressChange:d,onPress:m,onPressUp:v,onClick:g}=e,o=e.isDisabled||a.isDisabled,V=p!=null,x=n!=null||u!=null;!V&&!x&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let R=a.selectedValue===t,G=M=>{M.stopPropagation(),a.setSelectedValue(t);},{pressProps:D,isPressed:_}=d$2({onPressStart:s,onPressEnd:l,onPressChange:d,onPress:m,onPressUp:v,onClick:g,isDisabled:o}),{pressProps:P,isPressed:f}=d$2({onPressStart:s,onPressEnd:l,onPressChange:d,onPressUp:v,onClick:g,isDisabled:o,onPress(M){m?.(M),a.setSelectedValue(t),r.current?.focus();}}),{focusableProps:I}=c$3(c$1(e,{onFocus:()=>a.setLastFocusedValue(t)}),r),i=c$1(D,I),z=a$6(e,{labelable:true}),b=-1;a.selectedValue!=null?a.selectedValue===t&&(b=0):(a.lastFocusedValue===t||a.lastFocusedValue==null)&&(b=0),o&&(b=void 0);let{name:y,form:S,descriptionId:_e,errorMessageId:ze,validationBehavior:B}=N.get(a);a$9(r,a.defaultSelectedValue,a.setSelectedValue),a$a({validationBehavior:B},a,r);let W=a$b();return {labelProps:c$1(P,useMemo(()=>({onClick:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault()}),[])),inputProps:c$1(z,{...i,type:"radio",name:y,form:S,tabIndex:b,disabled:o,required:a.isRequired&&B==="native",checked:R,value:t,onChange:G,"aria-describedby":[e["aria-describedby"],W.id,a.isInvalid?ze:null,_e].filter(Boolean).join(" ")||void 0}),descriptionProps:W,isDisabled:o,isSelected:R,isPressed:_||f}}function T(e,a,r){let{name:t,form:p,isReadOnly:n,isRequired:u,isDisabled:s,orientation:l="vertical",validationBehavior:d="aria"}=e,{direction:m}=b$1(),{isInvalid:v,validationErrors:g,validationDetails:o}=a.displayValidation,{labelProps:V,fieldProps:x,descriptionProps:R,errorMessageProps:G}=a$5({...e,labelElementType:"span",isInvalid:a.isInvalid,errorMessage:e.errorMessage||g,ref:r}),D=a$6(e,{labelable:true}),{focusWithinProps:_}=b$2({onBlurWithin(i){e.onBlur?.(i),a.selectedValue||a.setLastFocusedValue(null);},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function P(i,z){let b=d$1(z.currentTarget,{from:j$1(z),accept:S=>S instanceof b$4(S).HTMLInputElement&&S.type==="radio"}),y;return i==="next"?(y=b.nextNode(),y||(b.currentNode=z.currentTarget,y=b.firstChild())):(y=b.previousNode(),y||(b.currentNode=z.currentTarget,y=b.lastChild())),y?(y.focus(),a.setSelectedValue(y.value),true):false}let{keyboardProps:f}=j({shortcuts:{ArrowRight:i=>P(m==="rtl"&&l!=="vertical"?"prev":"next",i),ArrowLeft:i=>P(m==="rtl"&&l!=="vertical"?"next":"prev",i),ArrowDown:i=>P("next",i),ArrowUp:i=>P("prev",i)},allowRepeats:true}),I=c$2(t);return N.set(a,{name:I,form:p,descriptionId:R.id,errorMessageId:G.id,validationBehavior:d}),{radioGroupProps:c$1(D,{role:"radiogroup",...f,"aria-invalid":a.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":n||void 0,"aria-required":u||void 0,"aria-disabled":s||void 0,"aria-orientation":l,...x,..._}),labelProps:V,descriptionProps:R,errorMessageProps:G,isInvalid:v,validationErrors:g,validationDetails:o}}var Oe=Math.round(Math.random()*1e10),Le=0;function E(e){let a=useMemo(()=>e.name||`radio-group-${Oe}-${++Le}`,[e.name]),[r,t]=a$4(e.value,e.defaultValue??null,e.onChange),[p]=useState(r),[n,u]=useState(null),s=d({...e,value:r}),l=m=>{!e.isReadOnly&&!e.isDisabled&&(t(m),s.commitValidation());},d$1=s.displayValidation.isInvalid;return {...s,name:a,selectedValue:r,defaultSelectedValue:e.value!==void 0?p:e.defaultValue??null,setSelectedValue:l,lastFocusedValue:n,setLastFocusedValue:u,isDisabled:e.isDisabled||false,isReadOnly:e.isReadOnly||false,isRequired:e.isRequired||false,validationState:e.validationState||(d$1?"invalid":null),isInvalid:d$1}}var Re="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",Pe=a({defaultClassName:"cw3m0n5 _1yep5z6f0 _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),ve="cw3m0n4",ge="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m0",Ve=a({defaultClassName:"cw3m0n0 _1yep5z61k2 _1yep5z61k3 _1yep5z61k4 _1yep5z61kq _1yep5z61kr _1yep5z61ks _1yep5z61le _1yep5z61lf _1yep5z61lg _1yep5z61m2 _1yep5z61m3 _1yep5z61m4 _1yep5z61ob _1yep5z61us",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var he=({label:e,description:a},{isSelected:r,isFocusVisible:t,isDisabled:p,optionLabelPosition:n,isHovered:u,isReadOnly:s},l,d)=>jsxs("div",{className:b$5({labelPosition:n}),children:[jsx("div",{className:a$3(c$4({isSelected:r,isFocusVisible:t,isDisabled:p,isReadOnly:s,isHovered:u}),Ve({isHovered:u})),children:r?jsx("div",{className:ve}):null}),e?jsxs("div",{className:Re,children:[jsx("span",{id:l,className:a$c({isDisabled:p}),children:e}),a?jsx("span",{...d,className:Pe({isDisabled:p}),children:a}):null]}):null]}),xe=({state:e,renderOption:a,item:r,optionLabelPosition:t="end",optionStyle:p,optionClassName:n,isReadOnly:u,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(r.id),d=Se.useRef(null),m=c$2(),v=!a&&!!r.label&&!!r.description,{inputProps:g,isPressed:o,isSelected:V,labelProps:x,descriptionProps:R}=w({...s,isDisabled:l,children:r.label,value:r.id,"aria-labelledby":v?m:s["aria-labelledby"]},e,d),{focusProps:G,isFocusVisible:D,isFocused:_}=a$7(),{hoverProps:P,isHovered:f}=a$8({isDisabled:l},d),I=a$2({"data-selected":V,"data-focused":_,"data-focus-visible":D,"data-hovered":f,"data-disabled":l,"data-pressed":o,"data-read-only":u}),i={isFocusVisible:D,isSelected:V,isFocused:_,isHovered:f,isDisabled:l,optionLabelPosition:t,isReadOnly:u};return jsxs("label",{...c$1(x,P,I),style:p,className:a$3("BaselineUI-Radio-Item",n),children:[jsx(b$3,{children:jsx("input",{...c$1(g,G),ref:d})}),a?a(r,i):he(r,i,v?m:void 0,R)]})};var De=Se.forwardRef(({className:e$1,style:a,optionsContainerClassName:r,optionsContainerStyle:t,items:p,labelPosition:n="top",renderOption:u,"aria-label":s,"aria-labelledby":l,"aria-describedby":d,"aria-details":m,"data-block-id":v,"data-block-class":g$1,...o},V)=>{let x=a$1(V),R=E(o),{radioGroupProps:G,labelProps:D,descriptionProps:_,errorMessageProps:P}=T({...o,"aria-label":s,"aria-labelledby":l,"aria-describedby":d,"aria-details":m},R,x),f$1=b({...o,descriptionProps:_,errorMessageProps:P,labelPosition:n}),I=a$2({"data-orientation":o.orientation,"data-block-id":v,"data-block-class":g$1,"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly});return jsxs("div",{...c$1(G,I),className:a$3(g({labelPosition:n}),"BaselineUI-RadioGroup",e$1),style:a,ref:x,children:[o.label||f$1?jsxs("div",{className:f({labelPosition:n,hasMessage:!!f$1}),children:[jsx("span",{...D,className:a$3(e,"BaselineUI-RadioGroup-Label"),children:o.label}),n==="start"&&f$1]}):null,jsx("div",{className:a$3(ge,{[c]:o.isDisabled},r),style:t,children:p.map(i=>jsx(xe,{state:R,renderOption:u,item:i,optionLabelPosition:o.optionLabelPosition,optionStyle:o.optionStyle,optionClassName:o.optionClassName,isReadOnly:o.isReadOnly,isDisabled:o.isDisabled,disabledValues:o.disabledValues,value:i.id},i.id))}),n==="top"&&f$1]})});De.displayName="RadioGroup";export{De as a};
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-7EQIV4GX.mjs';import {a as a$3}from'./chunk-SH7ZI4CA.mjs';import {a as a$1}from'./chunk-6GV3YWV7.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-JTKDC2CM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-LDWNE2JT.mjs';import {a as a$3}from'./chunk-RIVN2JT3.mjs';import {a as a$1}from'./chunk-6GV3YWV7.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2OXYNLVN.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';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$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-QMV2O57M.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-JTKDC2CM.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.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 as c$1,d}from'./chunk-QMV2O57M.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-2OXYNLVN.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.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
@@ -7,4 +7,4 @@ import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-QMV2
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var I=new WeakMap;function P(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:s,shouldSelectOnPressUp:r$1}=a,{selectionManager:o,selectedKey:b}=e,p=i===b,l=s||e.isDisabled||e.selectionManager.isDisabled(i),d$1=e.collection.getItem(i),{itemProps:n,isPressed:m}=d({selectionManager:o,key:i,ref:t,isDisabled:l,shouldSelectOnPressUp:r$1??d$1?.props.href!=null,linkBehavior:"selection"}),h=P(e,i,"tab"),c$1=P(e,i,"tabpanel"),{tabIndex:_}=n,x=a$a(d$1?.props,{labelable:true});delete x.id;let v=r(d$1?.props),{focusableProps:K}=c$3({...d$1?.props,isDisabled:l},t);return {tabProps:c(x,K,v,n,{id:h,"aria-selected":p,"aria-disabled":l||void 0,"aria-controls":p?c$1:void 0,tabIndex:l?void 0:_,role:"tab"}),isSelected:p,isDisabled:l,isPressed:m}}function A(a,e,t){let i=a$b(t)?void 0:0,s=P(e,a.id??e?.selectedKey,"tabpanel"),r=a$9({...a,id:s,"aria-labelledby":P(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var L=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,s=new Set){this.collection=e,this.flipDirection=t==="rtl",this.disabledKeys=s,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:s="automatic"}=a,{collection:r,selectionManager:o,disabledKeys:b$1}=e,{direction:p}=b(),l=useMemo(()=>new L(r,p,i,b$1),[r,b$1,i,p]),{collectionProps:d}=c$1({ref:t,selectionManager:o,keyboardDelegate:l,selectOnFocus:s==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),n=c$2();I.set(e,n);let m=a$9({...a,id:n});return {tabListProps:{...c(d,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$8({...a,onSelectionChange:a.onSelectionChange?o=>{o!=null&&a.onSelectionChange?.(o);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:s}=e,r=useRef(s);return useEffect(()=>{let o=s;a.selectedKey==null&&(t.isEmpty||o==null||!i.getItem(o))&&(o=Z(i,e.disabledKeys),o!=null&&t.setSelectedKeys([o])),(o!=null&&t.focusedKey==null||!t.isFocused&&o!==r.current)&&t.setFocusedKey(o),r.current=o;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:s}=a,{focusProps:r,isFocusVisible:o}=a$5();if(!s?.value)return null;let{className:b,style:p,"data-block-id":l}=s.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:o},"Baseline-Tabs-TabPanel",b),"data-block-id":l,style:p,children:s?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:s="primary",actions:r,onRemove:o,"data-block-id":b,"data-block-class":p,...l},d)=>{let n=N({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),m=R.useRef(null),{tabListProps:h}=O({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},n,m);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:d,"data-block-id":b,"data-block-class":p,children:[jsxs("div",{className:a$3(se({variant:s}),i),style:t,children:[jsx("div",{...h,className:ae({variant:s}),ref:m,children:[...n.collection].map(c=>(a$1(c.value,"TabItem requires a value prop"),jsx(le,{item:c,state:n,onRemove:o,variant:s},c.key)))}),r?.map((c,_)=>jsx("div",{className:ee,children:jsx(a$2,{...c,variant:"secondary",size:"sm",className:a$3(ie,c.className)})},_))]}),jsx(oe,{state:n},n.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:s,value:r}=a,o=R.useRef(null),{tabProps:b,isSelected:p,isDisabled:l}=C({key:s},t,o),{hoverProps:d,isHovered:n}=a$4({});a$1(r,"TabButton requires a value prop");let{title:m,icon:h,titleStyle:c$1,titleClassName:_}=r,{focusProps:x,isFocusVisible:v,isFocused:K}=a$5(),{keyboardProps:de}=j({onKeyDown:w=>{w.key==="Backspace"&&e?e(s):w.continuePropagation();}}),ce=a$6({"data-selected":p,"data-disabled":l,"data-focused":K,"data-hovered":n,"data-focus-visible":v});return jsxs("div",{...c(de,b,d,x,ce),className:a$3(te({isHovered:n,isSelected:p,isFocusVisible:v,isDisabled:l,variant:i}),"BaselineUI-Tabs-TabButton",_),style:c$1,ref:o,children:[h?jsx(h,{size:20,className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(s);},excludeFromTabOrder:true,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:p||K||n?1:0},className:k({isHovered:n,isSelected:p,isDisabled:l,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let s=useMemo(()=>(R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value})??[]).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:s,children:r=>jsx(a$7,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
10
+ var I=new WeakMap;function P(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:o,shouldSelectOnPressUp:r$1}=a,{selectionManager:l,selectedKey:b}=e,p=i===b,s=o||e.isDisabled||e.selectionManager.isDisabled(i),d$1=e.collection.getItem(i),{itemProps:n,isPressed:m}=d({selectionManager:l,key:i,ref:t,isDisabled:s,shouldSelectOnPressUp:r$1??d$1?.props.href!=null,linkBehavior:"selection"}),h=P(e,i,"tab"),c$1=P(e,i,"tabpanel"),{tabIndex:_}=n,x=a$a(d$1?.props,{labelable:true});delete x.id;let v=r(d$1?.props),{focusableProps:K}=c$3({...d$1?.props,isDisabled:s},t);return {tabProps:c(x,K,v,n,{id:h,"aria-selected":p,"aria-disabled":s||void 0,"aria-controls":p?c$1:void 0,tabIndex:s?void 0:_,role:"tab"}),isSelected:p,isDisabled:s,isPressed:m}}function A(a,e,t){let i=a$b(t)?void 0:0,o=P(e,a.id??e?.selectedKey,"tabpanel"),r=a$9({...a,id:o,"aria-labelledby":P(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var L=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,o=new Set){this.collection=e,this.flipDirection=t==="rtl",this.disabledKeys=o,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:o="automatic"}=a,{collection:r,selectionManager:l,disabledKeys:b$1}=e,{direction:p}=b(),s=useMemo(()=>new L(r,p,i,b$1),[r,b$1,i,p]),{collectionProps:d}=c$1({ref:t,selectionManager:l,keyboardDelegate:s,selectOnFocus:o==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),n=c$2();I.set(e,n);let m=a$9({...a,id:n});return {tabListProps:{...c(d,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$8({...a,onSelectionChange:a.onSelectionChange?l=>{l!=null&&a.onSelectionChange?.(l);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:o}=e,r=useRef(o);return useEffect(()=>{let l=o;a.selectedKey==null&&(t.isEmpty||l==null||!i.getItem(l))&&(l=Z(i,e.disabledKeys),l!=null&&t.setSelectedKeys([l])),(l!=null&&t.focusedKey==null||!t.isFocused&&l!==r.current)&&t.setFocusedKey(l),r.current=l;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:o}=a,{focusProps:r,isFocusVisible:l}=a$5();if(!o?.value)return null;let{className:b,style:p,"data-block-id":s}=o.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:l},"Baseline-Tabs-TabPanel",b),"data-block-id":s,style:p,children:o?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:o="primary",actions:r,onRemove:l,"data-block-id":b,"data-block-class":p,...s},d)=>{let n=N({...s,selectedKey:s.selectedValue,defaultSelectedKey:s.defaultSelectedValue,disabledKeys:s.disabledValues}),m=R.useRef(null),{tabListProps:h}=O({...s,selectedKey:s.selectedValue,defaultSelectedKey:s.defaultSelectedValue,disabledKeys:s.disabledValues},n,m);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:d,"data-block-id":b,"data-block-class":p,children:[jsxs("div",{className:a$3(se({variant:o}),i),style:t,children:[jsx("div",{...h,className:ae({variant:o}),ref:m,children:[...n.collection].map(c=>(a$1(c.value,"TabItem requires a value prop"),jsx(le,{item:c,state:n,onRemove:l,variant:o},c.key)))}),r?.map((c,_)=>jsx("div",{className:ee,children:jsx(a$2,{...c,variant:"secondary",size:"sm",className:a$3(ie,c.className)})},_))]}),jsx(oe,{state:n},n.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:o,value:r}=a,l=R.useRef(null),{tabProps:b,isSelected:p,isDisabled:s}=C({key:o},t,l),{hoverProps:d,isHovered:n}=a$4({isDisabled:s});a$1(r,"TabButton requires a value prop");let{title:m,icon:h,titleStyle:c$1,titleClassName:_}=r,{focusProps:x,isFocusVisible:v,isFocused:K}=a$5(),{keyboardProps:de}=j({onKeyDown:w=>{w.key==="Backspace"&&e?e(o):w.continuePropagation();}}),ce=a$6({"data-selected":p,"data-disabled":s,"data-focused":K,"data-hovered":n,"data-focus-visible":v});return jsxs("div",{...c(de,b,d,x,ce),className:a$3(te({isHovered:n,isSelected:p,isFocusVisible:v,isDisabled:s,variant:i}),"BaselineUI-Tabs-TabButton",_),style:c$1,ref:l,children:[h?jsx(h,{size:20,className:k({isHovered:n,isSelected:p,isDisabled:s,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(o);},excludeFromTabOrder:true,isDisabled:s,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:p||K||n?1:0},className:k({isHovered:n,isSelected:p,isDisabled:s,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let o=useMemo(()=>(R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value})??[]).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:o,children:r=>jsx(a$7,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
@@ -1,4 +1,4 @@
1
- import {a as a$6}from'./chunk-4T7P66ZA.mjs';import {a as a$e}from'./chunk-HJGMXLKN.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-7OUGARUO.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-266F6F4Y.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-QUWRO3HT.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-GJTOYWLJ.mjs';import {a as a$d}from'./chunk-J2KZM2I2.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-UY76QEJC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
1
+ import {a as a$6}from'./chunk-ZE2B6BS7.mjs';import {a as a$e}from'./chunk-PSAOTHYG.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-5GW36EQJ.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-3IPRT57V.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-QUWRO3HT.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-SOWGXN5P.mjs';import {a as a$d}from'./chunk-Z73YU5ZQ.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {a as a$j}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
2
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