efficient-shell 12.13.0 → 12.16.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 (515) hide show
  1. package/README.md +58 -3
  2. package/dist/{Browser-OFC3QRX3.js → Browser-7JNZKYCH.js} +14 -14
  3. package/dist/Calculator-4VBPCGRP.js +29 -0
  4. package/dist/{CurrencyConverter-HZWRB62S.js → CurrencyConverter-34AMD4W7.js} +9 -9
  5. package/dist/Files-2CUER7VQ.js +141 -0
  6. package/dist/{Notepad-77VJ4DK4.js → Notepad-S2COZUMR.js} +10 -10
  7. package/dist/PdfViewer-F2TCC5UD.js +1 -0
  8. package/dist/{PomodoroTimer-ME3BMHKR.js → PomodoroTimer-6WR3UOOM.js} +49 -49
  9. package/dist/{Preview-DXEYBUYC.js → Preview-C3JK6FBV.js} +38 -38
  10. package/dist/Sidebar-ADAIERCI.js +44 -0
  11. package/dist/{Stock-WK45DFIC.js → Stock-UAGSFAKY.js} +3 -3
  12. package/dist/{Weather-BVKZQI4R.js → Weather-G2VGEQX2.js} +17 -17
  13. package/dist/{WorldClock-L3BQXXQX.js → WorldClock-43KK7OTT.js} +4 -4
  14. package/dist/ai/index.d.ts +1 -1
  15. package/dist/ai/index.js +79 -79
  16. package/dist/apps/ImageAnnotator.js +1 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/Meter.js +1 -1
  33. package/dist/charts/PieChart.js +1 -1
  34. package/dist/charts/RadarChart.js +1 -1
  35. package/dist/charts/RadialBarChart.js +1 -1
  36. package/dist/charts/RangeChart.js +1 -1
  37. package/dist/charts/RankedBars.js +1 -1
  38. package/dist/charts/SankeyChart.js +1 -1
  39. package/dist/charts/ScatterChart.js +1 -1
  40. package/dist/charts/SpecChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-YX4MRM7A.js → chunk-232YPI2L.js} +6 -6
  47. package/dist/{chunk-W4NVTD5Q.js → chunk-24JKQX2N.js} +4 -4
  48. package/dist/{chunk-5EKNXSQG.js → chunk-24LO6OH4.js} +1 -1
  49. package/dist/chunk-25QDSYH5.js +13 -0
  50. package/dist/chunk-27RPYRRI.js +2 -0
  51. package/dist/{chunk-EDANELWX.js → chunk-2DYVVHZA.js} +1 -1
  52. package/dist/{chunk-RKYWKMUK.js → chunk-2NZ7CVMW.js} +1 -1
  53. package/dist/{chunk-27ZJQUDS.js → chunk-2VFSYSDS.js} +1 -1
  54. package/dist/{chunk-45HQXTA6.js → chunk-3A6FYWFQ.js} +1 -1
  55. package/dist/chunk-3UKNOOSL.js +4 -0
  56. package/dist/chunk-3W4JUMFI.js +1 -0
  57. package/dist/{chunk-JTZVUO3I.js → chunk-3YBXA72C.js} +1 -1
  58. package/dist/{chunk-4XS4DO4T.js → chunk-42XSMAIK.js} +1 -1
  59. package/dist/{chunk-2GS2VOQT.js → chunk-4BKJ6A5H.js} +9 -9
  60. package/dist/{chunk-Y23BITKG.js → chunk-4I4WZHMV.js} +1 -1
  61. package/dist/{chunk-JGJWPONL.js → chunk-4IHYWLWE.js} +5 -5
  62. package/dist/{chunk-KIRLSUQT.js → chunk-4LOHQ4QB.js} +5 -5
  63. package/dist/{chunk-YVAJ42M2.js → chunk-4Y33Y4OX.js} +6 -6
  64. package/dist/{chunk-654DGV5Q.js → chunk-56XKHWNL.js} +1 -1
  65. package/dist/chunk-574SLTKO.js +8 -0
  66. package/dist/{chunk-GCVIUXKL.js → chunk-5DQE6RQJ.js} +1 -1
  67. package/dist/chunk-5HLLCX6X.js +2 -0
  68. package/dist/{chunk-MFZPTS7W.js → chunk-5MH5N76F.js} +4 -4
  69. package/dist/{chunk-MXITMJCT.js → chunk-5QYKF7NK.js} +17 -17
  70. package/dist/chunk-5XCASBGK.js +5 -0
  71. package/dist/chunk-5ZT3FJ2W.js +2 -0
  72. package/dist/{chunk-LFYZ7NQ4.js → chunk-64RHGJXK.js} +4 -4
  73. package/dist/{chunk-YFDS6KF3.js → chunk-6A26HUVK.js} +1 -1
  74. package/dist/chunk-6RHKNP2Q.js +2 -0
  75. package/dist/chunk-6V3BNCDT.js +2 -0
  76. package/dist/{chunk-GB2XLSR5.js → chunk-74JMBOQH.js} +10 -10
  77. package/dist/{chunk-6YIVKPWQ.js → chunk-75H4BWNC.js} +1 -1
  78. package/dist/{chunk-AUCNJFTP.js → chunk-7K3FYCRZ.js} +9 -9
  79. package/dist/{chunk-4NLCXHWN.js → chunk-7X2P6IH3.js} +4 -4
  80. package/dist/{chunk-SEHKTBVM.js → chunk-7ZJRBFHA.js} +1 -1
  81. package/dist/chunk-A4PFVMQ2.js +7 -0
  82. package/dist/chunk-ABQWWMTO.js +2 -0
  83. package/dist/chunk-ASPLTZBH.js +2 -0
  84. package/dist/{chunk-ZV6WLVD3.js → chunk-B2KQ3T7Q.js} +6 -6
  85. package/dist/chunk-BAWT5QBA.js +2 -0
  86. package/dist/chunk-BHHFVIAD.js +2 -0
  87. package/dist/{chunk-GMJ5WOB2.js → chunk-CBVKGAZH.js} +1 -1
  88. package/dist/chunk-CDGK3TOO.js +2 -0
  89. package/dist/{chunk-BYDSBDVS.js → chunk-CEIIQRK5.js} +6 -6
  90. package/dist/{chunk-FZWAOYAM.js → chunk-CMJD5URC.js} +9 -9
  91. package/dist/chunk-CYU454QR.js +2 -0
  92. package/dist/{chunk-EO6MOQOZ.js → chunk-DCNSQGHJ.js} +12 -12
  93. package/dist/chunk-DG2TGWXI.js +15 -0
  94. package/dist/{chunk-D4K72BHN.js → chunk-DGHSCKOE.js} +4 -4
  95. package/dist/{chunk-GBEDLYND.js → chunk-DJXXY23A.js} +2 -2
  96. package/dist/chunk-DLOTU5XU.js +5 -0
  97. package/dist/chunk-DRMIQ3YE.js +1 -0
  98. package/dist/chunk-DRSPB4ZE.js +2 -0
  99. package/dist/chunk-DSOV33XA.js +1 -0
  100. package/dist/chunk-DVYBJOD3.js +11 -0
  101. package/dist/chunk-DWGYC7OD.js +1 -0
  102. package/dist/chunk-ECJSGHFD.js +2 -0
  103. package/dist/{chunk-Q64F2EXW.js → chunk-EDX55XGV.js} +6 -6
  104. package/dist/{chunk-QULE4LAC.js → chunk-EEAY7FJW.js} +17 -17
  105. package/dist/{chunk-WMIU2VR5.js → chunk-EEB5XPWP.js} +2 -2
  106. package/dist/{chunk-ZLFZJX6M.js → chunk-EGCHJHRR.js} +8 -8
  107. package/dist/chunk-EJRRJXDG.js +2 -0
  108. package/dist/chunk-ENFXDIIZ.js +8 -0
  109. package/dist/{chunk-CB5FQMFB.js → chunk-FI6IJTAJ.js} +12 -12
  110. package/dist/chunk-FIW2BUK2.js +2 -0
  111. package/dist/{chunk-JVNJCRHM.js → chunk-FJVZ2W55.js} +1 -1
  112. package/dist/{chunk-EAXPSAHZ.js → chunk-FQHPGREQ.js} +9 -9
  113. package/dist/chunk-FVKXDF2Q.js +12 -0
  114. package/dist/{chunk-QGFAQVUO.js → chunk-G3E4CD77.js} +6 -6
  115. package/dist/{chunk-SFFELHLP.js → chunk-GC4N4UQM.js} +5 -5
  116. package/dist/{chunk-4UQNNA4K.js → chunk-GEVNBBM7.js} +1 -1
  117. package/dist/{chunk-M2VCZAMQ.js → chunk-GOEHP2XM.js} +3 -3
  118. package/dist/{chunk-G3VRO4CK.js → chunk-GUHCKMC7.js} +2 -2
  119. package/dist/{chunk-B7HTKDT3.js → chunk-H32UNWVU.js} +5 -5
  120. package/dist/{chunk-LTN4AQYG.js → chunk-H4ABSQS6.js} +1 -1
  121. package/dist/chunk-H7RDZRJ4.js +2 -0
  122. package/dist/chunk-HBDNQ3ER.js +4 -0
  123. package/dist/chunk-HGOWQO63.js +1 -0
  124. package/dist/{chunk-NHIP2S4E.js → chunk-HJF4UZOA.js} +13 -13
  125. package/dist/chunk-HNBMBC77.js +1 -0
  126. package/dist/{chunk-NBUL37WB.js → chunk-HYPYNVQQ.js} +1 -1
  127. package/dist/{chunk-5T4WTFBC.js → chunk-I3TVRNUT.js} +1 -1
  128. package/dist/chunk-IFGNAY56.js +14 -0
  129. package/dist/{chunk-6BNLDGST.js → chunk-ILIPEY3D.js} +1 -1
  130. package/dist/chunk-J3Z4U2CT.js +2 -0
  131. package/dist/{chunk-FSZ3TNAR.js → chunk-JAVTQART.js} +1 -1
  132. package/dist/{chunk-HEX3EP5F.js → chunk-JFGJJNT2.js} +4 -4
  133. package/dist/{chunk-GMLDGXNQ.js → chunk-JQWZ36JD.js} +1 -1
  134. package/dist/chunk-JSHMIMAJ.js +1 -0
  135. package/dist/{chunk-SWB32OKH.js → chunk-JTGRLXZN.js} +1 -1
  136. package/dist/{chunk-NV7QRWQJ.js → chunk-JZBLOIL7.js} +1 -1
  137. package/dist/{chunk-O3YCIWHF.js → chunk-KAKJ7ENS.js} +2 -2
  138. package/dist/chunk-KELGQ7WI.js +2 -0
  139. package/dist/{chunk-YPZXE67U.js → chunk-KSMEWOCE.js} +1 -1
  140. package/dist/chunk-L7MWAC2P.js +6 -0
  141. package/dist/{chunk-WJBP5SND.js → chunk-LIWBCIRZ.js} +4 -4
  142. package/dist/{chunk-LTUVKDTO.js → chunk-LNZMA4PB.js} +1 -1
  143. package/dist/{chunk-P3GBQBDC.js → chunk-LQVQX5B2.js} +1 -1
  144. package/dist/chunk-LSADTBPH.js +4 -0
  145. package/dist/{chunk-XDJQWP5K.js → chunk-MBCUICY3.js} +1 -1
  146. package/dist/chunk-MEF5E2JA.js +2 -0
  147. package/dist/{chunk-5NCR64CE.js → chunk-MFJHLC5M.js} +1 -1
  148. package/dist/{chunk-EKDXJQIP.js → chunk-MJVFIH3J.js} +11 -11
  149. package/dist/{chunk-WQV7VQ5Z.js → chunk-MRLXGLNZ.js} +1 -1
  150. package/dist/chunk-MUNG4VXE.js +2 -0
  151. package/dist/{chunk-KWTK6TGH.js → chunk-MWTCGJAI.js} +1 -1
  152. package/dist/{chunk-6JLXXX4H.js → chunk-N2445WHJ.js} +12 -12
  153. package/dist/chunk-N3THYDNV.js +2 -0
  154. package/dist/{chunk-I5UM6UZF.js → chunk-NKP5WCEA.js} +6 -6
  155. package/dist/{chunk-MEAJGM6F.js → chunk-NOGSS432.js} +1 -1
  156. package/dist/{chunk-5ZQY42QX.js → chunk-OFYNPYY2.js} +1 -1
  157. package/dist/{chunk-V6FHZGCL.js → chunk-OM6VWUAZ.js} +1 -1
  158. package/dist/{chunk-EIXMUGVZ.js → chunk-OOWPLQD5.js} +2 -2
  159. package/dist/{chunk-NOEAEXIZ.js → chunk-OVD3ECM7.js} +1 -1
  160. package/dist/chunk-OYJAXZFU.js +2 -0
  161. package/dist/{chunk-EQ2KTDOU.js → chunk-PDA77NNC.js} +3 -3
  162. package/dist/{chunk-PDCCNHTP.js → chunk-PJE75B66.js} +1 -1
  163. package/dist/chunk-PMBCQWJW.js +4 -0
  164. package/dist/chunk-PTJIGNKA.js +4 -0
  165. package/dist/{chunk-UG5GKEU5.js → chunk-QADNVFV5.js} +1 -1
  166. package/dist/{chunk-KCAUYEYR.js → chunk-QBWMWK2W.js} +6 -6
  167. package/dist/chunk-QIFGQE6V.js +2 -0
  168. package/dist/{chunk-BET6KEY2.js → chunk-QPYVCG74.js} +12 -12
  169. package/dist/{chunk-ZR2UWJIR.js → chunk-RBS3AWE7.js} +1 -1
  170. package/dist/{chunk-WM2BBRT6.js → chunk-RF3ZFTAU.js} +1 -1
  171. package/dist/chunk-RIG5FEVS.js +1 -0
  172. package/dist/{chunk-HYQBYMJX.js → chunk-RMDVKQJE.js} +2 -2
  173. package/dist/chunk-RMKC5POE.js +3 -0
  174. package/dist/{chunk-42BVXJZN.js → chunk-RZ2DWX4N.js} +5 -5
  175. package/dist/{chunk-VPZOSVDF.js → chunk-SE6IQZYW.js} +9 -9
  176. package/dist/{chunk-ISU4FCEX.js → chunk-SR4W2SYQ.js} +4 -4
  177. package/dist/chunk-SRR4MAA6.js +4 -0
  178. package/dist/chunk-SZ6J44ZK.js +2 -0
  179. package/dist/{chunk-TJCJLKJB.js → chunk-T3JSUBIF.js} +1 -1
  180. package/dist/{chunk-SY65V6K7.js → chunk-T7D73HT7.js} +9 -9
  181. package/dist/chunk-THRSU75M.js +2 -0
  182. package/dist/{chunk-AG6Y62TP.js → chunk-TKPUYQ3Q.js} +72 -72
  183. package/dist/chunk-TO6CUG4Y.js +4 -0
  184. package/dist/chunk-TU2L7NW3.js +7 -0
  185. package/dist/chunk-TUA2VQO7.js +4 -0
  186. package/dist/{chunk-QJGZOD6X.js → chunk-TW7SWDKZ.js} +7 -4
  187. package/dist/{chunk-VLCHHTX6.js → chunk-TYQ2JL4J.js} +1 -1
  188. package/dist/chunk-U77527G3.js +2 -0
  189. package/dist/{chunk-VCNTSE3H.js → chunk-UHK4MAFE.js} +1 -1
  190. package/dist/chunk-US6NOIGO.js +6 -0
  191. package/dist/{chunk-LMUB2EAD.js → chunk-UULBPDAH.js} +8 -8
  192. package/dist/chunk-UWLGKMH5.js +9 -0
  193. package/dist/{chunk-Z7RXWXR5.js → chunk-V4XR4MOS.js} +1 -1
  194. package/dist/{chunk-4MUE4CYB.js → chunk-VBLCYL4L.js} +1 -1
  195. package/dist/chunk-VDYF3WPJ.js +2 -0
  196. package/dist/{chunk-MAI2DN7N.js → chunk-VEQ45GAH.js} +1 -1
  197. package/dist/{chunk-HE24VQMU.js → chunk-VFHKD7TQ.js} +1 -1
  198. package/dist/chunk-VIWM4GD7.js +2 -0
  199. package/dist/{chunk-TCMAWDBL.js → chunk-VJXPT53M.js} +18 -18
  200. package/dist/chunk-VL6SOWP5.js +2 -0
  201. package/dist/{chunk-P44RCA6Z.js → chunk-VP2GI3UP.js} +8 -8
  202. package/dist/chunk-VPXAOSVH.js +28 -0
  203. package/dist/{chunk-44VAZ2EL.js → chunk-VYRVSTI6.js} +9 -9
  204. package/dist/{chunk-QQM36CYU.js → chunk-W2663E4S.js} +3 -3
  205. package/dist/chunk-WBLA7EHW.js +2 -0
  206. package/dist/{chunk-OCI3PZDU.js → chunk-WCCGKDG6.js} +2 -2
  207. package/dist/{chunk-QMNDKNK2.js → chunk-WESNFWM4.js} +1 -1
  208. package/dist/{chunk-NGQZI7HP.js → chunk-WLUJQLXG.js} +1 -1
  209. package/dist/chunk-WNOXHJVT.js +9 -0
  210. package/dist/{chunk-EVEGK57J.js → chunk-WPG3ZHYT.js} +1 -1
  211. package/dist/chunk-WPT5DUCQ.js +2 -0
  212. package/dist/{chunk-QCOXJXGZ.js → chunk-WQ4YKWN2.js} +1 -1
  213. package/dist/chunk-WWABT3IW.js +5 -0
  214. package/dist/chunk-WX5KKB3X.js +4 -0
  215. package/dist/{chunk-YVIV7SKG.js → chunk-WXZZGHET.js} +1 -1
  216. package/dist/{chunk-BGBSEPPH.js → chunk-WYGUHCJ2.js} +8 -8
  217. package/dist/chunk-X7BRR6UW.js +5 -0
  218. package/dist/chunk-XAC2GAOD.js +4 -0
  219. package/dist/{chunk-BM5QI2L6.js → chunk-XG5ER6GJ.js} +6 -6
  220. package/dist/{chunk-ASOVTAIT.js → chunk-XHSMDUEW.js} +3 -3
  221. package/dist/{chunk-YMJOFWW6.js → chunk-XKJGJNY2.js} +3 -3
  222. package/dist/{chunk-6P7SIIG4.js → chunk-XKNKRKHH.js} +14 -14
  223. package/dist/chunk-XL4QM2D3.js +5 -0
  224. package/dist/chunk-XLWPIUZB.js +2 -0
  225. package/dist/chunk-XN3KM6YE.js +4 -0
  226. package/dist/chunk-XQWHKXLS.js +22 -0
  227. package/dist/{chunk-GOKJZKLV.js → chunk-XU3YOWEG.js} +1 -1
  228. package/dist/chunk-XW336CNF.js +2 -0
  229. package/dist/{chunk-SXHNZFUY.js → chunk-Y6E7IRK2.js} +1 -1
  230. package/dist/{chunk-5HOXR3L4.js → chunk-Y7KDCC6E.js} +1 -1
  231. package/dist/{chunk-UYTFNR4W.js → chunk-YC42NCCA.js} +1 -1
  232. package/dist/chunk-YFUY3VDW.js +9 -0
  233. package/dist/{chunk-AKTEMZOT.js → chunk-YO26RV3H.js} +1 -1
  234. package/dist/{chunk-BFCIOWYI.js → chunk-YTZFWV2W.js} +1 -1
  235. package/dist/{chunk-SEMV4NCH.js → chunk-YU52WMSH.js} +1 -1
  236. package/dist/{chunk-ICZUWLVU.js → chunk-YVHEKEHJ.js} +1 -1
  237. package/dist/chunk-YX2OOGV7.js +4 -0
  238. package/dist/{chunk-NORR52Z3.js → chunk-Z62RBVEJ.js} +1 -1
  239. package/dist/{chunk-RQKD5AAL.js → chunk-Z66QBDNU.js} +1 -1
  240. package/dist/{chunk-U35TIWEP.js → chunk-ZE7OVMDM.js} +16 -16
  241. package/dist/{chunk-IARCNQD3.js → chunk-ZGWXSHVM.js} +1 -1
  242. package/dist/chunk-ZILBCVKS.js +2 -0
  243. package/dist/{chunk-CU3ZE25J.js → chunk-ZKGUBIBT.js} +1 -1
  244. package/dist/{chunk-LRKFMR4K.js → chunk-ZQT3GNRU.js} +2 -2
  245. package/dist/{chunk-AXFNOY2L.js → chunk-ZTRKM3B5.js} +7 -7
  246. package/dist/data/DataTable.js +1 -1
  247. package/dist/data/EntityList.js +1 -1
  248. package/dist/data/Kanban.js +1 -1
  249. package/dist/data/ListFooter.js +1 -1
  250. package/dist/data/ListLoadError.js +1 -1
  251. package/dist/data/Pagination.js +1 -1
  252. package/dist/data/ResizableTable.js +1 -1
  253. package/dist/file-intake/index.js +1 -1
  254. package/dist/format/index.d.ts +152 -1
  255. package/dist/format/index.js +1 -1
  256. package/dist/forms/BorderInput.js +1 -1
  257. package/dist/forms/BrandAssetEditor.js +1 -1
  258. package/dist/forms/Calendar.js +1 -1
  259. package/dist/forms/ColorPicker.js +1 -1
  260. package/dist/forms/ComposerAttachments.js +1 -1
  261. package/dist/forms/CornersInput.js +1 -1
  262. package/dist/forms/DatePicker.js +1 -1
  263. package/dist/forms/DateRangePicker.js +1 -1
  264. package/dist/forms/DateTimePicker.js +1 -1
  265. package/dist/forms/DisplayChips.js +1 -1
  266. package/dist/forms/FilePicker.js +1 -1
  267. package/dist/forms/FormErrorSummary.js +1 -1
  268. package/dist/forms/IconPicker.js +1 -1
  269. package/dist/forms/ImageFocusPoint.js +1 -1
  270. package/dist/forms/Input.js +1 -1
  271. package/dist/forms/InputNumber.js +1 -1
  272. package/dist/forms/LinkPicker.js +1 -1
  273. package/dist/forms/MediaLibrary.js +1 -1
  274. package/dist/forms/MediaUploadField.js +1 -1
  275. package/dist/forms/MediaUploadGrid.js +1 -1
  276. package/dist/forms/MediaUsedInList.js +1 -1
  277. package/dist/forms/NumericKeypad.js +1 -1
  278. package/dist/forms/PictureTiles.js +1 -1
  279. package/dist/forms/PositionInput.js +1 -1
  280. package/dist/forms/RenameField.js +1 -1
  281. package/dist/forms/Select.d.ts +1 -1
  282. package/dist/forms/Select.js +1 -1
  283. package/dist/forms/SidesInput.js +1 -1
  284. package/dist/forms/Slider.js +1 -1
  285. package/dist/forms/Snippet.js +1 -1
  286. package/dist/forms/SplitButton.js +1 -1
  287. package/dist/forms/TagInput.js +1 -1
  288. package/dist/forms/TextToolbar.d.ts +1 -1
  289. package/dist/forms/TextToolbar.js +1 -1
  290. package/dist/forms/TimePicker.js +1 -1
  291. package/dist/forms/UnitMenu.js +1 -1
  292. package/dist/forms/WidthsBar.js +1 -1
  293. package/dist/forms/mediaLibraryMenu.js +1 -1
  294. package/dist/forms/mediaMoveItems.js +1 -1
  295. package/dist/forms/textAlign.d.ts +1 -1
  296. package/dist/forms/textAlign.js +1 -1
  297. package/dist/forms/useFileIntake.js +1 -1
  298. package/dist/icons/efficient-glyphs.d.ts +16 -0
  299. package/dist/icons/efficient-glyphs.js +1 -1
  300. package/dist/icons/efficient-looks.d.ts +32 -0
  301. package/dist/icons/efficient-looks.js +1 -1
  302. package/dist/icons/efficient-meanings.d.ts +16 -0
  303. package/dist/icons/efficient-meanings.js +1 -1
  304. package/dist/icons/efficient.d.ts +16 -0
  305. package/dist/icons/efficient.js +1 -1
  306. package/dist/icons/glyphs/EntranceBounceIcon.d.ts +8 -0
  307. package/dist/icons/glyphs/EntranceBounceIcon.js +1 -0
  308. package/dist/icons/glyphs/EntranceFadeIcon.d.ts +8 -0
  309. package/dist/icons/glyphs/EntranceFadeIcon.js +1 -0
  310. package/dist/icons/glyphs/EntranceFlipIcon.d.ts +8 -0
  311. package/dist/icons/glyphs/EntranceFlipIcon.js +1 -0
  312. package/dist/icons/glyphs/EntranceGlideIcon.d.ts +8 -0
  313. package/dist/icons/glyphs/EntranceGlideIcon.js +1 -0
  314. package/dist/icons/glyphs/EntranceRevealIcon.d.ts +8 -0
  315. package/dist/icons/glyphs/EntranceRevealIcon.js +1 -0
  316. package/dist/icons/glyphs/EntranceRiseIcon.d.ts +8 -0
  317. package/dist/icons/glyphs/EntranceRiseIcon.js +1 -0
  318. package/dist/icons/glyphs/EntranceScaleIcon.d.ts +8 -0
  319. package/dist/icons/glyphs/EntranceScaleIcon.js +1 -0
  320. package/dist/icons/glyphs/EntranceSpinIcon.d.ts +8 -0
  321. package/dist/icons/glyphs/EntranceSpinIcon.js +1 -0
  322. package/dist/icons/glyphs/LoopMarqueeIcon.d.ts +8 -0
  323. package/dist/icons/glyphs/LoopMarqueeIcon.js +1 -0
  324. package/dist/icons/glyphs/ScrollFadeInIcon.d.ts +8 -0
  325. package/dist/icons/glyphs/ScrollFadeInIcon.js +1 -0
  326. package/dist/icons/glyphs/ScrollFadeOutIcon.d.ts +8 -0
  327. package/dist/icons/glyphs/ScrollFadeOutIcon.js +1 -0
  328. package/dist/icons/glyphs/ScrollMoveDownIcon.d.ts +8 -0
  329. package/dist/icons/glyphs/ScrollMoveDownIcon.js +1 -0
  330. package/dist/icons/glyphs/ScrollMoveUpIcon.d.ts +8 -0
  331. package/dist/icons/glyphs/ScrollMoveUpIcon.js +1 -0
  332. package/dist/icons/glyphs/ScrollParallaxIcon.d.ts +8 -0
  333. package/dist/icons/glyphs/ScrollParallaxIcon.js +1 -0
  334. package/dist/icons/glyphs/ScrollZoomInIcon.d.ts +8 -0
  335. package/dist/icons/glyphs/ScrollZoomInIcon.js +1 -0
  336. package/dist/icons/glyphs/ScrollZoomOutIcon.d.ts +8 -0
  337. package/dist/icons/glyphs/ScrollZoomOutIcon.js +1 -0
  338. package/dist/icons/index.d.ts +2 -2
  339. package/dist/icons/index.js +1 -1
  340. package/dist/icons/looks/EntranceBounceMiniIcon.d.ts +8 -0
  341. package/dist/icons/looks/EntranceBounceMiniIcon.js +1 -0
  342. package/dist/icons/looks/EntranceBounceSolidIcon.d.ts +8 -0
  343. package/dist/icons/looks/EntranceBounceSolidIcon.js +1 -0
  344. package/dist/icons/looks/EntranceFadeMiniIcon.d.ts +8 -0
  345. package/dist/icons/looks/EntranceFadeMiniIcon.js +1 -0
  346. package/dist/icons/looks/EntranceFadeSolidIcon.d.ts +8 -0
  347. package/dist/icons/looks/EntranceFadeSolidIcon.js +1 -0
  348. package/dist/icons/looks/EntranceFlipMiniIcon.d.ts +8 -0
  349. package/dist/icons/looks/EntranceFlipMiniIcon.js +1 -0
  350. package/dist/icons/looks/EntranceFlipSolidIcon.d.ts +8 -0
  351. package/dist/icons/looks/EntranceFlipSolidIcon.js +1 -0
  352. package/dist/icons/looks/EntranceGlideMiniIcon.d.ts +8 -0
  353. package/dist/icons/looks/EntranceGlideMiniIcon.js +1 -0
  354. package/dist/icons/looks/EntranceGlideSolidIcon.d.ts +8 -0
  355. package/dist/icons/looks/EntranceGlideSolidIcon.js +1 -0
  356. package/dist/icons/looks/EntranceRevealMiniIcon.d.ts +8 -0
  357. package/dist/icons/looks/EntranceRevealMiniIcon.js +1 -0
  358. package/dist/icons/looks/EntranceRevealSolidIcon.d.ts +8 -0
  359. package/dist/icons/looks/EntranceRevealSolidIcon.js +1 -0
  360. package/dist/icons/looks/EntranceRiseMiniIcon.d.ts +8 -0
  361. package/dist/icons/looks/EntranceRiseMiniIcon.js +1 -0
  362. package/dist/icons/looks/EntranceRiseSolidIcon.d.ts +8 -0
  363. package/dist/icons/looks/EntranceRiseSolidIcon.js +1 -0
  364. package/dist/icons/looks/EntranceScaleMiniIcon.d.ts +8 -0
  365. package/dist/icons/looks/EntranceScaleMiniIcon.js +1 -0
  366. package/dist/icons/looks/EntranceScaleSolidIcon.d.ts +8 -0
  367. package/dist/icons/looks/EntranceScaleSolidIcon.js +1 -0
  368. package/dist/icons/looks/EntranceSpinMiniIcon.d.ts +8 -0
  369. package/dist/icons/looks/EntranceSpinMiniIcon.js +1 -0
  370. package/dist/icons/looks/EntranceSpinSolidIcon.d.ts +8 -0
  371. package/dist/icons/looks/EntranceSpinSolidIcon.js +1 -0
  372. package/dist/icons/looks/LoopMarqueeMiniIcon.d.ts +8 -0
  373. package/dist/icons/looks/LoopMarqueeMiniIcon.js +1 -0
  374. package/dist/icons/looks/LoopMarqueeSolidIcon.d.ts +8 -0
  375. package/dist/icons/looks/LoopMarqueeSolidIcon.js +1 -0
  376. package/dist/icons/looks/ScrollFadeInMiniIcon.d.ts +8 -0
  377. package/dist/icons/looks/ScrollFadeInMiniIcon.js +1 -0
  378. package/dist/icons/looks/ScrollFadeInSolidIcon.d.ts +8 -0
  379. package/dist/icons/looks/ScrollFadeInSolidIcon.js +1 -0
  380. package/dist/icons/looks/ScrollFadeOutMiniIcon.d.ts +8 -0
  381. package/dist/icons/looks/ScrollFadeOutMiniIcon.js +1 -0
  382. package/dist/icons/looks/ScrollFadeOutSolidIcon.d.ts +8 -0
  383. package/dist/icons/looks/ScrollFadeOutSolidIcon.js +1 -0
  384. package/dist/icons/looks/ScrollMoveDownMiniIcon.d.ts +8 -0
  385. package/dist/icons/looks/ScrollMoveDownMiniIcon.js +1 -0
  386. package/dist/icons/looks/ScrollMoveDownSolidIcon.d.ts +8 -0
  387. package/dist/icons/looks/ScrollMoveDownSolidIcon.js +1 -0
  388. package/dist/icons/looks/ScrollMoveUpMiniIcon.d.ts +8 -0
  389. package/dist/icons/looks/ScrollMoveUpMiniIcon.js +1 -0
  390. package/dist/icons/looks/ScrollMoveUpSolidIcon.d.ts +8 -0
  391. package/dist/icons/looks/ScrollMoveUpSolidIcon.js +1 -0
  392. package/dist/icons/looks/ScrollParallaxMiniIcon.d.ts +8 -0
  393. package/dist/icons/looks/ScrollParallaxMiniIcon.js +1 -0
  394. package/dist/icons/looks/ScrollParallaxSolidIcon.d.ts +8 -0
  395. package/dist/icons/looks/ScrollParallaxSolidIcon.js +1 -0
  396. package/dist/icons/looks/ScrollZoomInMiniIcon.d.ts +8 -0
  397. package/dist/icons/looks/ScrollZoomInMiniIcon.js +1 -0
  398. package/dist/icons/looks/ScrollZoomInSolidIcon.d.ts +8 -0
  399. package/dist/icons/looks/ScrollZoomInSolidIcon.js +1 -0
  400. package/dist/icons/looks/ScrollZoomOutMiniIcon.d.ts +8 -0
  401. package/dist/icons/looks/ScrollZoomOutMiniIcon.js +1 -0
  402. package/dist/icons/looks/ScrollZoomOutSolidIcon.d.ts +8 -0
  403. package/dist/icons/looks/ScrollZoomOutSolidIcon.js +1 -0
  404. package/dist/icons/looks/map.js +1 -1
  405. package/dist/icons/sets.js +1 -1
  406. package/dist/index.d.ts +1 -1
  407. package/dist/index.js +665 -665
  408. package/dist/locales/zh-Hans.js +1 -1
  409. package/dist/map/index.js +2 -2
  410. package/dist/motion.css +130 -1
  411. package/dist/{names-Cj_F68_V.d.ts → names-BNKpHeTy.d.ts} +1 -1
  412. package/dist/page-tabs/index.js +5 -5
  413. package/dist/pdf/index.js +1 -1
  414. package/dist/shell/Accordion.js +1 -1
  415. package/dist/shell/AppUpdateBanner.js +1 -1
  416. package/dist/shell/Avatar.js +1 -1
  417. package/dist/shell/Banner.js +1 -1
  418. package/dist/shell/Breadcrumbs.js +1 -1
  419. package/dist/shell/BudgetBar.js +1 -1
  420. package/dist/shell/Card.js +1 -1
  421. package/dist/shell/ColoredBadge.js +1 -1
  422. package/dist/shell/ConfirmDialog.js +1 -1
  423. package/dist/shell/ContainerFillChart.js +1 -1
  424. package/dist/shell/CountBadge.js +1 -1
  425. package/dist/shell/Dialog.js +1 -1
  426. package/dist/shell/Drawer.js +1 -1
  427. package/dist/shell/DropdownMenu.js +1 -1
  428. package/dist/shell/EditableGrid.js +1 -1
  429. package/dist/shell/EmptyState.js +1 -1
  430. package/dist/shell/GlobalSearch.js +1 -1
  431. package/dist/shell/HelpCenter.js +1 -1
  432. package/dist/shell/IconRail.js +1 -1
  433. package/dist/shell/ImageLightbox.js +1 -1
  434. package/dist/shell/ItemCount.js +1 -1
  435. package/dist/shell/LanguageSelect.js +1 -1
  436. package/dist/shell/Markdown.d.ts +1 -1
  437. package/dist/shell/Markdown.js +1 -1
  438. package/dist/shell/MetricBar.js +1 -1
  439. package/dist/shell/MetricBarLegend.js +1 -1
  440. package/dist/shell/MilestoneTimeline.js +1 -1
  441. package/dist/shell/PageHeader.js +1 -1
  442. package/dist/shell/Popover.js +1 -1
  443. package/dist/shell/ProductionTimeline.js +1 -1
  444. package/dist/shell/ResizeHandle.js +1 -1
  445. package/dist/shell/Result.js +1 -1
  446. package/dist/shell/SearchableSelect.js +1 -1
  447. package/dist/shell/SettingReset.js +1 -1
  448. package/dist/shell/SettingRow.js +1 -1
  449. package/dist/shell/SidebarLayout.js +1 -1
  450. package/dist/shell/SidebarNav.js +1 -1
  451. package/dist/shell/SortableList.js +1 -1
  452. package/dist/shell/Statistic.js +1 -1
  453. package/dist/shell/Tabs.d.ts +9 -0
  454. package/dist/shell/Tabs.js +1 -1
  455. package/dist/shell/TimeAgo.js +1 -1
  456. package/dist/shell/TimelineTrack.js +1 -1
  457. package/dist/shell/TopNav.js +1 -1
  458. package/dist/shell/TransferProgress.js +1 -1
  459. package/dist/shell/Tree.js +1 -1
  460. package/dist/shell/discardGuard.js +1 -1
  461. package/dist/shell/focusTrap.d.ts +6 -1
  462. package/dist/shell/focusTrap.js +1 -1
  463. package/dist/shell/globalSearchModel.js +1 -1
  464. package/dist/shell/language.js +1 -1
  465. package/dist/shell/strings.d.ts +2 -0
  466. package/dist/shell/strings.js +1 -1
  467. package/dist/shell/toast.js +1 -1
  468. package/dist/telemetry/index.js +1 -1
  469. package/dist/templates/AuthScreen.js +1 -1
  470. package/dist/templates/ChatTemplate.js +1 -1
  471. package/dist/templates/CheckoutTemplate.js +1 -1
  472. package/dist/templates/DashboardTemplate.js +1 -1
  473. package/dist/templates/DataTablePage.js +1 -1
  474. package/dist/templates/EmailTemplate.js +1 -1
  475. package/dist/templates/ErrorBoundary.js +1 -1
  476. package/dist/templates/ErrorPage.js +1 -1
  477. package/dist/templates/FormLayoutPage.js +1 -1
  478. package/dist/templates/GalleryTemplate.js +1 -1
  479. package/dist/ui/index.d.ts +1 -1
  480. package/dist/ui/index.js +1 -1
  481. package/dist/version.js +1 -1
  482. package/package.json +1 -1
  483. package/dist/Calculator-RP4UPGG7.js +0 -29
  484. package/dist/Files-HBJGKKO2.js +0 -141
  485. package/dist/PdfViewer-BFP2WCMQ.js +0 -1
  486. package/dist/Sidebar-FU7TD5FQ.js +0 -44
  487. package/dist/chunk-3DVNXNTF.js +0 -1
  488. package/dist/chunk-4WWK6FHD.js +0 -1
  489. package/dist/chunk-5POLDDQW.js +0 -14
  490. package/dist/chunk-675RYIWR.js +0 -7
  491. package/dist/chunk-6VB4TBU6.js +0 -9
  492. package/dist/chunk-7ADTFFEM.js +0 -5
  493. package/dist/chunk-CA3OC4YY.js +0 -9
  494. package/dist/chunk-CDAJKLGL.js +0 -1
  495. package/dist/chunk-EAIHBASJ.js +0 -28
  496. package/dist/chunk-FQHY6DTF.js +0 -4
  497. package/dist/chunk-FYNPQAFI.js +0 -1
  498. package/dist/chunk-GFOJM52T.js +0 -15
  499. package/dist/chunk-HL3V67JZ.js +0 -2
  500. package/dist/chunk-HLZJLFVR.js +0 -12
  501. package/dist/chunk-HULQSIX5.js +0 -8
  502. package/dist/chunk-ISZOD5S6.js +0 -2
  503. package/dist/chunk-ITGFHWYG.js +0 -13
  504. package/dist/chunk-J7CHHY7O.js +0 -6
  505. package/dist/chunk-JB3JD2XK.js +0 -22
  506. package/dist/chunk-JZKACEXW.js +0 -9
  507. package/dist/chunk-KOPTKTHN.js +0 -7
  508. package/dist/chunk-LZKPV3XR.js +0 -3
  509. package/dist/chunk-MLPXTFDS.js +0 -1
  510. package/dist/chunk-QQ5XCRZM.js +0 -11
  511. package/dist/chunk-TJSJVC6P.js +0 -1
  512. package/dist/chunk-WGRS6QBT.js +0 -1
  513. package/dist/chunk-YRG6XJ6M.js +0 -8
  514. package/dist/chunk-YYW4VNWL.js +0 -1
  515. /package/dist/{chunk-NQJXHV4K.js → chunk-VT7QZPIO.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";function t({size:t=18,...i}){/* @__PURE__ */
2
+ return r("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:[
3
+ /* @__PURE__ */e("path",{d:"M4.5 5.25h7.5a1.5 1.5 0 0 1 1.5 1.5v7.5a1.5 1.5 0 0 1 -1.5 1.5h-7.5a1.5 1.5 0 0 1 -1.5 -1.5v-7.5a1.5 1.5 0 0 1 1.5 -1.5Z"}),
4
+ /* @__PURE__ */e("path",{d:"M19.5 19.5L19.5 4.5M17.25 6.75L19.5 4.5L21.75 6.75"})]})}export{t as ScrollMoveUpIcon};
@@ -0,0 +1,7 @@
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-JSHMIMAJ.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),M=t=>0===p?0:t/p*s,y=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(y),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!y(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${M(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${M(t.to).toFixed(2)},${u} L${M(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},A=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},C=o(null),P=t=>e=>{C.current=t,e.currentTarget.setPointerCapture(e.pointerId)},L=t=>e=>{C.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},N=t=>()=>{C.current===t&&(C.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
+ return n("rect",{x:M(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:A(t),onPointerDown:P(t),onPointerMove:L(t),onPointerUp:N(t),onPointerCancel:N(t)},t)};/* @__PURE__ */
3
+ return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
4
+ /* @__PURE__ */n("path",{d:F,fill:e.grid}),
5
+ /* @__PURE__ */n("rect",{x:0,y:0,width:M(w),height:u,fill:e.surface,fillOpacity:.72}),
6
+ /* @__PURE__ */n("rect",{x:M(x),y:0,width:Math.max(0,s-M(x)),height:u,fill:e.surface,fillOpacity:.72}),
7
+ /* @__PURE__ */n("rect",{x:M(w),y:0,width:Math.max(1,M(x)-M(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
@@ -0,0 +1,4 @@
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";function t({size:t=18,...i}){/* @__PURE__ */
2
+ return r("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:[
3
+ /* @__PURE__ */e("path",{d:"M2.25 9.75V8.25h1.5M8.25 8.25h1.5v1.5M9.75 14.25v1.5h-1.5M3.75 15.75h-1.5v-1.5"}),
4
+ /* @__PURE__ */e("path",{d:"M15.75 8.25h4.5a1.5 1.5 0 0 1 1.5 1.5v4.5a1.5 1.5 0 0 1 -1.5 1.5h-4.5a1.5 1.5 0 0 1 -1.5 -1.5v-4.5a1.5 1.5 0 0 1 1.5 -1.5Z"})]})}export{t as EntranceFadeIcon};
@@ -1,5 +1,8 @@
1
- import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
- return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":R,labelsFit:A=!1}){const L=i([]),$=i(null),N="pill"===x,[S,D]=c(null),W=S??"none",H=i(()=>{});H.current=()=>{const t=$.current;if(!t||!A)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);D(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{H.current()}),d(()=>{const e=$.current?.parentElement;if(!A||!e)return;let t=!0;const n=()=>{t&&H.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[A]);const j=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},I=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
3
- return s("div",{ref:$,role:"tablist","data-labels-shown":A?W:void 0,"aria-label":E,"aria-labelledby":R,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=j(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=j(t,-1);else if("Home"===e.key)n=I(1);else{if("End"!==e.key)return;n=I(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),L.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=A&&null!=e.icon,c="all"===W||"chosen"===W&&a,d=/* @__PURE__ */s("button",{ref:e=>{L.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
1
+ import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function f(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function h(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:h(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),y=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
+ return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":N,"aria-labelledby":L,labelsFit:R=!1,dotLabel:A="Has a setting"}){const $=i([]),S=i(null),D="pill"===x,[H,W]=c(null),j=H??"none",z=i(()=>{});z.current=()=>{const t=S.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);W(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...w(t,n.length)}))},a(()=>{z.current()}),d(()=>{const e=S.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&z.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const I=(e,t)=>{for(let n=1;n<=h.length;n+=1){const r=((e+t*n)%h.length+h.length)%h.length;if(!h[r]?.disabled)return r}return null},M=e=>{const t=1===e?h.map((e,t)=>t):h.map((e,t)=>h.length-1-t);for(const e of t)if(!h[e]?.disabled)return e;return null};/* @__PURE__ */
3
+ return s("div",{ref:S,role:"tablist","data-labels-shown":R?j:void 0,"aria-label":N,"aria-labelledby":L,onKeyDown:e=>{const t=h.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=I(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=I(t,-1);else if("Home"===e.key)n=M(1);else{if("End"!==e.key)return;n=M(-1)}e.preventDefault(),null!==n&&n!==t&&(g(h[n].id),$.current[n]?.focus())},className:D?o(k,E):b(k,E),children:h.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===j||"chosen"===j&&a,d=e.dot?/* @__PURE__ */s(C,{label:e.label,on:a,said:A}):e.label,b=/* @__PURE__ */s("button",{ref:e=>{$.current[o]=e},type:"button",role:"tab",id:F?v(F,e.id):void 0,"aria-controls":F?y(F,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:D?n({selected:a,disabled:e.disabled,block:k}):f(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
4
4
  /* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
5
- /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
5
+ /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:D||k?r(k):void 0,children:b},e.id):b})})}function C({label:e,on:t,said:n}){/* @__PURE__ */
6
+ return u("span",{className:"inline-flex items-center gap-(--space-4)",children:[e,
7
+ /* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-dot":t?"on":"off",className:"size-2 shrink-0 rounded-full "+(t?"bg-current":"bg-accent-fill")}),
8
+ /* @__PURE__ */s("span",{className:"sr-only",children:n})]})}export{x as Tabs,v as tabButtonId,y as tabPanelId};
@@ -1,3 +1,3 @@
1
- import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-TJSJVC6P.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
1
+ import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-JSHMIMAJ.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
2
2
  return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
3
3
  /* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
@@ -0,0 +1,2 @@
1
+ import{jsx as c}from"react/jsx-runtime";function h({size:h=18,...e}){/* @__PURE__ */
2
+ return c("svg",{width:h,height:h,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...e,children:/* @__PURE__ */c("path",{fillRule:"evenodd",d:"M8.125,6.125h3.75c0.49841,0.03274 1.09349,0.26507 1.41421,0.58579c0.32072,0.32072 0.55305,0.9158 0.58579,1.41421v3.75c-0.03274,0.49841 -0.26507,1.09349 -0.58579,1.41421c-0.32072,0.32072 -0.9158,0.55305 -1.41421,0.58579h-3.75c-0.49841,-0.03274 -1.09349,-0.26507 -1.41421,-0.58579c-0.32072,-0.32072 -0.55305,-0.9158 -0.58579,-1.41421v-3.75c0.03274,-0.49841 0.26507,-1.09349 0.58579,-1.41421c0.32072,-0.32072 0.9158,-0.55305 1.41421,-0.58579zM3.75,5.75c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-1.25c0,-0.41421 0.33579,-0.75 0.75,-0.75h1.25c0.41421,0 0.75,0.33579 0.75,0.75c0,0.41421 -0.33579,0.75 -0.75,0.75h-0.5v0.5c0,0.41421 -0.33579,0.75 -0.75,0.75zM14.25,3.75c0,-0.41421 0.33579,-0.75 0.75,-0.75h1.25c0.41421,0 0.75,0.33579 0.75,0.75v1.25c0,0.41421 -0.33579,0.75 -0.75,0.75c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-0.5h-0.5c-0.41421,0 -0.75,-0.33579 -0.75,-0.75zM16.25,14.25c0.41421,0 0.75,0.33579 0.75,0.75v1.25c0,0.41421 -0.33579,0.75 -0.75,0.75h-1.25c-0.41421,0 -0.75,-0.33579 -0.75,-0.75c0,-0.41421 0.33579,-0.75 0.75,-0.75h0.5v-0.5c0,-0.41421 0.33579,-0.75 0.75,-0.75zM5.75,16.25c0,0.41421 -0.33579,0.75 -0.75,0.75h-1.25c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-1.25c0,-0.41421 0.33579,-0.75 0.75,-0.75c0.41421,0 0.75,0.33579 0.75,0.75v0.5h0.5c0.41421,0 0.75,0.33579 0.75,0.75z"})})}export{h as EntranceScaleMiniIcon};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-4WWK6FHD.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,W=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,J=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(W,"[redacted]").replace(J,"[url]").replace(D,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-3W4JUMFI.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],U=[800,1800],B=e=>{document.prerendering?E(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var N=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&N.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,U,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,U,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,U,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(W,"[url]").replace(V,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -0,0 +1,6 @@
1
+ import{jsxs as a,jsx as r}from"react/jsx-runtime";function t({size:t=18,...e}){/* @__PURE__ */
2
+ return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[
3
+ /* @__PURE__ */r("path",{d:"M3.75 6h1.5a1.5 1.5 0 0 1 1.5 1.5v4.5a1.5 1.5 0 0 1 -1.5 1.5h-1.5a1.5 1.5 0 0 1 -1.5 -1.5v-4.5a1.5 1.5 0 0 1 1.5 -1.5Z"}),
4
+ /* @__PURE__ */r("path",{d:"M11.25 6h1.5a1.5 1.5 0 0 1 1.5 1.5v4.5a1.5 1.5 0 0 1 -1.5 1.5h-1.5a1.5 1.5 0 0 1 -1.5 -1.5v-4.5a1.5 1.5 0 0 1 1.5 -1.5Z"}),
5
+ /* @__PURE__ */r("path",{d:"M18.75 6h1.5a1.5 1.5 0 0 1 1.5 1.5v4.5a1.5 1.5 0 0 1 -1.5 1.5h-1.5a1.5 1.5 0 0 1 -1.5 -1.5v-4.5a1.5 1.5 0 0 1 1.5 -1.5Z"}),
6
+ /* @__PURE__ */r("path",{d:"M7.5 18L16.5 18M14.25 15.75L16.5 18L14.25 20.25"})]})}export{t as LoopMarqueeIcon};
@@ -1,13 +1,13 @@
1
- import{copyToClipboard as e,selectionAt as t}from"./chunk-5HOXR3L4.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-ASOVTAIT.js";import{ListLoadError as l}from"./chunk-6BNLDGST.js";import{ResizableTable as i}from"./chunk-EAXPSAHZ.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-NV7QRWQJ.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-ZICGXJUB.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-JTZVUO3I.js";import{useShellStrings as y}from"./chunk-TJSJVC6P.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:T,totalCount:A,isError:L,onRetry:$,errorTitle:E,errorMessage:P,tableId:I,columns:K,renderCell:M,getRowId:J=e=>e.id,sort:U,onSort:D,selected:F,setSelected:O,onRowClick:H,onRowHover:V,getRowClassName:Z,footerLabel:B,footerExtra:W,footerExtraAfter:G,sentinelRef:Q,isFetchingNextPage:X,saveDefaultPerms:_,exportEndpoint:z,exportFilename:q="export.csv",contextActions:Y}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{O(t=>{const n=new Set(t),r=J(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{O(e=>{const t=R.map(J),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,H,le,ie,(e,t)=>{O(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(J(R[n]));return r})},ne),ce=R.filter(e=>F.has(J(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&F.has(J(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(K.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(J);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(K.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${I}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return K.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=q,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if(L&&0===R.length)/* @__PURE__ */
2
- return x(l,{title:E,message:P,onRetry:$});if(0===R.length)/* @__PURE__ */return x(w,{children:T});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=F.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...K],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:A,label:B,isFetchingMore:X,extra:W,extraAfter:G}),ye=Q?/* @__PURE__ */C(w,{children:[
3
- /* @__PURE__ */x("div",{ref:Q}),X&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=Y?Y(ce):[],a=ce.length,c=()=>te(null),u=void 0!==A&&A>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
1
+ import{copyToClipboard as e,selectionAt as t}from"./chunk-Y7KDCC6E.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-XHSMDUEW.js";import{ListLoadError as l}from"./chunk-ILIPEY3D.js";import{ResizableTable as i}from"./chunk-FQHPGREQ.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-JZBLOIL7.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-ZICGXJUB.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-3YBXA72C.js";import{useShellStrings as y}from"./chunk-JSHMIMAJ.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:L,emptyState:N,totalCount:E,isError:$,onRetry:A,errorTitle:M,errorMessage:I,tableId:T,columns:K,renderCell:P,getRowId:D=e=>e.id,sort:F,onSort:U,selected:H,setSelected:J,onRowClick:B,onRowHover:O,getRowClassName:W,footerLabel:Z,footerExtra:G,footerExtraAfter:Q,sentinelRef:X,isFetchingNextPage:Y,saveDefaultPerms:_,exportEndpoint:z,exportFilename:V="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{J(t=>{const n=new Set(t),r=D(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{J(e=>{const t=R.map(D),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,B,le,ie,(e,t)=>{J(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(D(R[n]));return r})},ne),ce=R.filter(e=>H.has(D(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&H.has(D(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(K.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(D);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(K.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${T}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return K.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=V,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(L)/* @__PURE__ */return x(c,{});if($&&0===R.length)/* @__PURE__ */
2
+ return x(l,{title:M,message:I,onRetry:A});if(0===R.length)/* @__PURE__ */return x(w,{children:N});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=H.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...K],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:E,label:Z,isFetchingMore:Y,extra:G,extraAfter:Q}),ye=X?/* @__PURE__ */C(w,{children:[
3
+ /* @__PURE__ */x("div",{ref:X}),Y&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==E&&E>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
4
4
  /* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
5
- /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),H(r)},children:oe.open}),
5
+ /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),B(r)},children:oe.open}),
6
6
  /* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
7
7
  /* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
8
8
  /* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
9
- /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),O(e=>/* @__PURE__ */new Set([...e,...R.map(J)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
- /* @__PURE__ */x(h,{onClick:()=>{c(),O(/* @__PURE__ */new Set)},children:oe.clearSelection}),$&&/* @__PURE__ */x(h,{onClick:()=>{c(),$()},children:oe.refresh})]})}/* @__PURE__ */
9
+ /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),J(e=>/* @__PURE__ */new Set([...e,...R.map(D)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
+ /* @__PURE__ */x(h,{onClick:()=>{c(),J(/* @__PURE__ */new Set)},children:oe.clearSelection}),A&&/* @__PURE__ */x(h,{onClick:()=>{c(),A()},children:oe.refresh})]})}/* @__PURE__ */
11
11
  return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
12
- /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:I,columns:fe,sort:U,onSort:D,footer:ge,afterBody:ye,saveDefaultPerms:_,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=J(n);/* @__PURE__ */
13
- return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":F.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${Z?.(n)??""}`,onClick:()=>H(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=J(n);F.has(r)||O(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?K.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:V?()=>V(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:F.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):M(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
12
+ /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:T,columns:fe,sort:F,onSort:U,footer:ge,afterBody:ye,saveDefaultPerms:_,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=D(n);/* @__PURE__ */
13
+ return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":H.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>B(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=D(n);H.has(r)||J(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?K.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:O?()=>O(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:H.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):P(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
@@ -0,0 +1,9 @@
1
+ import{Segmented as e}from"./chunk-QAS22BIS.js";import{ImageFocusPoint as a}from"./chunk-232YPI2L.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-OVD3ECM7.js";import{TransferProgress as u}from"./chunk-FJVZ2W55.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-V4XR4MOS.js";import{Icon as p}from"./chunk-JOAKKXTL.js";import{useShellStrings as b}from"./chunk-JSHMIMAJ.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:F,hint:O,error:U,required:P,className:S,accept:$="image/*",maxSizeBytes:z,fit:I="cover",height:A=112,placeholder:B,cta:H,acceptHint:J,showFilename:K=!0,allowReplace:M=!0,allowRemove:V=!0,replaceLabel:q,removeLabel:W,busy:D=!1,busyLabel:X,choosingLabel:Y,pickFailedLabel:_,progress:E,disabled:Q=!1,kind:T,onKindChange:Z,focus:G,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=H??ie.cta,oe=T??(/video/.test($)&&!/image/.test($)?"video":"image"),re="string"==typeof W&&W?W:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=D||ne,me=ne&&!D?Y??ie.choosing:X??ie.uploading,he=U??(se?_??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=Q||ue,ke=!!w&&(t(w,$)||w===ve),je=B??o($,ie),xe=q??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):C?C(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:$,maxSizeBytes:z,acceptHint:J,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Ce=w?r(w):"",Fe=!ke&&!!ee,Oe=Q||!M&&!V?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[M&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
+ /* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
+ /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),V&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Fe?void 0:{height:A},children:[Fe?
4
+ /* @__PURE__ */j(a,{value:G??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ce||void 0,className:"h-full w-full",style:{objectFit:I}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Ce,className:"h-full w-full",style:{objectFit:I,objectPosition:G||void 0}}),K&&w&&/* @__PURE__ */j(n,{children:Ce}),Oe,ue&&/* @__PURE__ */j(l,{label:me,progress:E,rounded:"rounded-md"})]}),Pe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":P||void 0,"aria-describedby":he?`${be}-error`:O?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:A},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:E}):/* @__PURE__ */k(x,{children:[
5
+ /* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
6
+ /* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
7
+ /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),J&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:J})]})});/* @__PURE__ */
8
+ return k(i,{label:F,htmlFor:be,hint:O,error:he,required:P,className:S,children:[Z&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(e,{value:oe,onChange:e=>Z(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Ue:Pe,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
9
+ /* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
@@ -1 +1 @@
1
- import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-TJSJVC6P.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",C=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),j=s(()=>{h||y.current?.click()},[h]),k=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>C(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),C(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),C(t))}},open:j,take:C,dragOver:x,rejections:D,clearRejections:k}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
1
+ import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,A]=n([]),L=r(0),b="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,b)});A(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,b,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>A([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
@@ -1,2 +1,2 @@
1
- import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-TJSJVC6P.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
1
+ import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-JSHMIMAJ.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
2
2
  return i("input",{ref:d,type:"time",lang:g,step:f,"aria-invalid":m||void 0,value:o(t,p),min:o(s,p)||void 0,max:o(u,p)||void 0,onChange:e=>r?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...v})});export{s as TimePicker_default};
@@ -0,0 +1,2 @@
1
+ import{CartesianPlot as t}from"./chunk-ENFXDIIZ.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-JSHMIMAJ.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,M=i(),v=d??(t=>Number.isInteger(t)?m(t,M):n(t,1,M)),w=x??(t=>m(t,M)),I=g??A.countAxis,L=k??A.distribution,N=h??o(c??[],s),C=a(0,b,f),F=N.map(t=>v(t.from)),J=N.map(t=>t.count);/* @__PURE__ */
2
+ return l(t,{labels:F,values:J,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:I,className:y,emptyLabel:j,ariaLabel:A.histogram(L,N.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${v(N[t].from)} – ${v(N[t].to)}`,rows:[{key:"count",label:A.observations,color:C,value:w(N[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:N.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:C,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
@@ -1,2 +1,2 @@
1
- import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-TJSJVC6P.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/;function s(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${e(n=t)}T${r(n.getHours())}:${r(n.getMinutes())}`:m.test(t)?t:"";var n}var u=a(function({value:e,onChange:r,min:a,max:u,invalid:l,size:c,className:d="",...f},p){const v=i();/* @__PURE__ */
1
+ import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-JSHMIMAJ.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/;function s(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${e(n=t)}T${r(n.getHours())}:${r(n.getMinutes())}`:m.test(t)?t:"";var n}var u=a(function({value:e,onChange:r,min:a,max:u,invalid:l,size:c,className:d="",...f},p){const v=i();/* @__PURE__ */
2
2
  return o("input",{ref:p,type:"datetime-local",lang:v,"aria-invalid":l||void 0,value:s(e),min:s(a)||void 0,max:s(u)||void 0,onChange:e=>r?.(function(e){if(!m.test(e))return null;const[n,r]=e.split("T"),i=t(n),[a,o,s=0]=r.split(":").map(Number);return!i||a>23||o>59||s>59?null:(i.setHours(a,o,s),i)}(e.target.value)),className:n({invalid:l,size:c,className:d}),...f})});export{u as DateTimePicker_default};
@@ -1,4 +1,4 @@
1
- import{ErrorPage as r}from"./chunk-6YIVKPWQ.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
1
+ import{ErrorPage as r}from"./chunk-75H4BWNC.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
2
2
  return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
3
3
  /* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
4
4
  /* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
@@ -0,0 +1,2 @@
1
+ import{jsx as c}from"react/jsx-runtime";function h({size:h=18,...e}){/* @__PURE__ */
2
+ return c("svg",{width:h,height:h,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:/* @__PURE__ */c("path",{fillRule:"evenodd",d:"M9.75,7.5h4.5c0.56745,0.03274 1.22503,0.29305 1.59099,0.65901c0.36596,0.36596 0.62627,1.02354 0.65901,1.59099v4.5c-0.03274,0.56745 -0.29305,1.22503 -0.65901,1.59099c-0.36596,0.36596 -1.02354,0.62627 -1.59099,0.65901h-4.5c-0.56745,-0.03274 -1.22503,-0.29305 -1.59099,-0.65901c-0.36596,-0.36596 -0.62627,-1.02354 -0.65901,-1.59099v-4.5c0.03274,-0.56745 0.29305,-1.22503 0.65901,-1.59099c0.36596,-0.36596 1.02354,-0.62627 1.59099,-0.65901zM4.5,6.75c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-1.5c0,-0.41421 0.33579,-0.75 0.75,-0.75h1.5c0.41421,0 0.75,0.33579 0.75,0.75c0,0.41421 -0.33579,0.75 -0.75,0.75h-0.75v0.75c0,0.41421 -0.33579,0.75 -0.75,0.75zM17.25,4.5c0,-0.41421 0.33579,-0.75 0.75,-0.75h1.5c0.41421,0 0.75,0.33579 0.75,0.75v1.5c0,0.41421 -0.33579,0.75 -0.75,0.75c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-0.75h-0.75c-0.41421,0 -0.75,-0.33579 -0.75,-0.75zM19.5,17.25c0.41421,0 0.75,0.33579 0.75,0.75v1.5c0,0.41421 -0.33579,0.75 -0.75,0.75h-1.5c-0.41421,0 -0.75,-0.33579 -0.75,-0.75c0,-0.41421 0.33579,-0.75 0.75,-0.75h0.75v-0.75c0,-0.41421 0.33579,-0.75 0.75,-0.75zM6.75,19.5c0,0.41421 -0.33579,0.75 -0.75,0.75h-1.5c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-1.5c0,-0.41421 0.33579,-0.75 0.75,-0.75c0.41421,0 0.75,0.33579 0.75,0.75v0.75h0.75c0.41421,0 0.75,0.33579 0.75,0.75z"})})}export{h as EntranceScaleSolidIcon};
@@ -1,19 +1,19 @@
1
- import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-RAOM3WIQ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as k}from"./chunk-TJSJVC6P.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as S,useEffect as H}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as O,Fragment as E}from"react/jsx-runtime";var I=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,$=k(),D=d(),j=f??D,S=w(),H=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:i}),
2
- /* @__PURE__ */O(A,{items:r})]});return j?/* @__PURE__ */C(E,{children:[H,
3
- /* @__PURE__ */O("span",{id:S,hidden:!0,children:$.settingView.auto})]}):H});function A({items:e}){const t=e=>/* @__PURE__ */O("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
4
- return O(E,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */O("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var K=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:K,className:R="",id:U,disabled:V,size:B,touchSize:P,title:W,multiple:J,renderOption:L,renderValue:M,valueText:Y,readOnly:F=!1,footer:G,changed:X=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!G?.length,me="sm"===B,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=U??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),Se=q??je,He=`${ke}-auto`,Te=[Q,X?De:void 0,Se?He:void 0].filter(Boolean).join(" ")||void 0,Ce=j(()=>n(N),[N]),Oe=J?l:[],Ee=u,Ie=f(oe,re,{matchTriggerWidth:!0,...G?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Ae=J?Ce.findIndex(e=>Oe.includes(e.value)):Ce.findIndex(e=>e.value===l),Ke=J?Ce.filter(e=>Oe.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ce[Ae].label:void 0,Re=!J&&Ae>=0?Ce[Ae].lang:void 0,Ue=J?Ce.filter(e=>Oe.includes(e.value)):Ae>=0?[Ce[Ae]]:[],Ve=M&&Ue.length?M(Ue):void 0,Be=void 0!==Ve&&Y?Y(Ue):void 0,Pe=S((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),We=S(()=>{V||F||(ae(Ae>=0?Ae:e(Ce)),ie(!0))},[V,F,Ce,Ae]),Je=S(e=>{const t=Ce[e];if(t&&!t.disabled){if(J){const r=l;return Ee(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ee(t.value),Pe()}},[Ce,J,l,Ee,Pe]);H(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Pe(),!0),ue)},[re,Pe]),H(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Pe(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Pe(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Pe]),H(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Le=S(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Ae,n=t(Ce,r.buffer,i);n<0||(re?ae(n):J?(ae(n),ie(!0)):Je(n))},[re,ne,Ae,Ce,Je,J]),Me=re?a(N,(e,t)=>{const r=(i=e.value,J?Oe.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
5
- return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||L?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Je(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${J?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[J&&/* @__PURE__ */O(o,{selected:r}),L?/* @__PURE__ */O("span",{className:"block min-w-0 flex-1 truncate",children:L(e,{selected:r,active:n})}):J?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
6
- /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
7
- /* @__PURE__ */C(E,{children:[
8
- /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Ye=void 0!==Ve?
9
- /* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
10
- /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ve}),
11
- /* @__PURE__ */O("span",{lang:void 0===Be?Re:void 0,className:"sr-only",children:Be??Ke})]}):/* @__PURE__ */O("span",{lang:Re,className:`block truncate ${void 0===Ke?c:""}`,children:Ke??z??" "}),Fe={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...x()},Ge=/* @__PURE__ */O("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":J||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Fe,maxHeight:fe}:Fe,children:Me}),Xe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Fe,children:[Ge,
12
- /* @__PURE__ */O("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Pe(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(G?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Pe());case"Escape":return e.preventDefault(),e.stopPropagation(),void Pe()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */O(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
1
+ import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-RAOM3WIQ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as k}from"./chunk-JSHMIMAJ.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as H,useEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as I,jsx as O,Fragment as C}from"react/jsx-runtime";var E=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,A=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,$=k(),D=d(),j=f??D,H=w(),S=/* @__PURE__ */I("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:i}),
2
+ /* @__PURE__ */O(z,{items:r})]});return j?/* @__PURE__ */I(C,{children:[S,
3
+ /* @__PURE__ */O("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function z({items:e}){const t=e=>/* @__PURE__ */O("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
4
+ return O(C,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */O("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var K=N(function({value:l,onChange:u,options:N,placeholder:A,invalid:K,className:M="",id:R,disabled:U,size:B,touchSize:V,title:W,multiple:J,renderOption:L,renderValue:P,valueText:Y,readOnly:F=!1,footer:G,changed:X=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!G?.length,me="sm"===B,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=R??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=q??je,Se=`${ke}-auto`,Te=[Q,X?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ie=j(()=>n(N),[N]),Oe=J?l:[],Ce=u,Ee=f(oe,re,{matchTriggerWidth:!0,...G?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ae=`${re}|${Ee?.top}|${Ee?.bottom}|${Ee?.maxHeight}|${N.length}`;g(()=>{be(null)},[Ae]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,Ae]);const ze=J?Ie.findIndex(e=>Oe.includes(e.value)):Ie.findIndex(e=>e.value===l),Ke=J?Ie.filter(e=>Oe.includes(e.value)).map(e=>e.label).join(", ")||void 0:ze>=0?Ie[ze].label:void 0,Me=!J&&ze>=0?Ie[ze].lang:void 0,Re=J?Ie.filter(e=>Oe.includes(e.value)):ze>=0?[Ie[ze]]:[],Ue=P&&Re.length?P(Re):void 0,Be=void 0!==Ue&&Y?Y(Re):void 0,Ve=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),We=H(()=>{U||F||(ae(ze>=0?ze:e(Ie)),ie(!0))},[U,F,Ie,ze]),Je=H(e=>{const t=Ie[e];if(t&&!t.disabled){if(J){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),Ve()}},[Ie,J,l,Ce,Ve]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Ve(),!0),ue)},[re,Ve]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Ve(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ve(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Ve]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Le=H(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:ze,n=t(Ie,r.buffer,i);n<0||(re?ae(n):J?(ae(n),ie(!0)):Je(n))},[re,ne,ze,Ie,Je,J]),Pe=re?a(N,(e,t)=>{const r=(i=e.value,J?Oe.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
5
+ return I("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||L?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Je(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${J?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[J&&/* @__PURE__ */O(o,{selected:r}),L?/* @__PURE__ */O("span",{className:"block min-w-0 flex-1 truncate",children:L(e,{selected:r,active:n})}):J?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1",children:[
6
+ /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:E(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
7
+ /* @__PURE__ */I(C,{children:[
8
+ /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:E(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Ye=void 0!==Ue?
9
+ /* @__PURE__ */I("span",{className:"relative block min-w-0 truncate",children:[
10
+ /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
11
+ /* @__PURE__ */O("span",{lang:void 0===Be?Me:void 0,className:"sr-only",children:Be??Ke})]}):/* @__PURE__ */O("span",{lang:Me,className:`block truncate ${void 0===Ke?c:""}`,children:Ke??A??" "}),Fe={zIndex:h.popup,left:Ee?.left,top:Ee?.top,bottom:Ee?.bottom,width:Ee?.width,maxHeight:Ee?.maxHeight??b,visibility:Ee?void 0:"hidden",...x()},Ge=/* @__PURE__ */O("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":J||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Fe,maxHeight:fe}:Fe,children:Pe}),Xe=pe?/* @__PURE__ */I("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Fe,children:[Ge,
12
+ /* @__PURE__ */O("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */I("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ve(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(G?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Ve());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ve()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */O(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
13
13
  /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Ge;/* @__PURE__ */
14
- return C("div",{ref:le,className:"relative",children:[
15
- /* @__PURE__ */O("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":K||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:W,disabled:V,"aria-readonly":F||void 0,onClick:()=>re?Pe():We(),onKeyDown:t=>{if(!V&&!F)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ce,e,1)):We());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ce,e,-1)):We());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),Je(ne)));case" ":return t.preventDefault(),void(re?Je(ne):We());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Pe()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Pe(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:K,size:B,readOnly:F,auto:Se,className:`${F?"":"pr-8 "}text-left ${R}`.trim()}),children:X?
16
- /* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Ye,
17
- /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ye}),X&&/* @__PURE__ */O("span",{id:De,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */O("span",{id:He,hidden:!0,children:ge.settingView.auto}),!F&&/* @__PURE__ */O(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
18
- /* @__PURE__ */C("select",{ref:te,value:l,multiple:J||void 0,onChange:e=>Ee(J?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:V,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!J&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:z}),
19
- /* @__PURE__ */O(A,{items:N})]}),re&&T(Xe,document.body)]})}),R=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */O(z,{ref:r,...t,size:n}):/* @__PURE__ */O(K,{ref:r,...t}):/* @__PURE__ */O(K,{ref:r,...t,size:n})});export{z as NativeSelect,R as Select_default};
14
+ return I("div",{ref:le,className:"relative",children:[
15
+ /* @__PURE__ */O("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":K||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:W,disabled:U,"aria-readonly":F||void 0,onClick:()=>re?Ve():We(),onKeyDown:t=>{if(!U&&!F)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ie,e,1)):We());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ie,e,-1)):We());case"Home":return void(re&&(t.preventDefault(),ae(e(Ie))));case"End":return void(re&&(t.preventDefault(),ae(r(Ie))));case"Enter":return void(re&&(t.preventDefault(),Je(ne)));case" ":return t.preventDefault(),void(re?Je(ne):We());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Ve()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Ve(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:K,size:B,readOnly:F,auto:He,className:`${F?"":"pr-8 "}text-left ${M}`.trim()}),children:X?
16
+ /* @__PURE__ */I("span",{className:"flex min-w-0 items-center gap-1",children:[Ye,
17
+ /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ye}),X&&/* @__PURE__ */O("span",{id:De,hidden:!0,children:ge.select.changed}),He&&/* @__PURE__ */O("span",{id:Se,hidden:!0,children:ge.settingView.auto}),!F&&/* @__PURE__ */O(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
18
+ /* @__PURE__ */I("select",{ref:te,value:l,multiple:J||void 0,onChange:e=>Ce(J?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:U,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==A&&!J&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:A}),
19
+ /* @__PURE__ */O(z,{items:N})]}),re&&T(Xe,document.body)]})}),M=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */O(A,{ref:r,...t,size:n}):/* @__PURE__ */O(K,{ref:r,...t}):/* @__PURE__ */O(K,{ref:r,...t,size:n})});export{A as NativeSelect,M as Select_default};
@@ -0,0 +1,2 @@
1
+ import{jsx as c}from"react/jsx-runtime";function e({size:e=18,...r}){/* @__PURE__ */
2
+ return c("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...r,children:/* @__PURE__ */c("path",{fillRule:"evenodd",d:"M9,1.5h6c0.56745,0.03274 1.22503,0.29305 1.59099,0.65901c0.36596,0.36596 0.62627,1.02354 0.65901,1.59099v6c-0.03274,0.56745 -0.29305,1.22503 -0.65901,1.59099c-0.36596,0.36596 -1.02354,0.62627 -1.59099,0.65901h-6c-0.56745,-0.03274 -1.22503,-0.29305 -1.59099,-0.65901c-0.36596,-0.36596 -0.62627,-1.02354 -0.65901,-1.59099v-6c0.03274,-0.56745 0.29305,-1.22503 0.65901,-1.59099c0.36596,-0.36596 1.02354,-0.62627 1.59099,-0.65901zM12,22.5c-0.41421,0 -0.75,-0.33579 -0.75,-0.75v-5.68934l-0.96967,0.96967c-0.29289,0.29289 -0.76777,0.29289 -1.06066,0c-0.29289,-0.29289 -0.29289,-0.76777 0,-1.06066l2.25,-2.25c0.07191,-0.07191 0.15478,-0.12616 0.24324,-0.16276c0.08843,-0.03667 0.1854,-0.05691 0.28709,-0.05691c0.10169,0 0.19866,0.02024 0.28709,0.05691c0.08846,0.0366 0.17134,0.09085 0.24324,0.16276l2.25,2.25c0.29289,0.29289 0.29289,0.76777 0,1.06066c-0.29289,0.29289 -0.76777,0.29289 -1.06066,0l-0.96967,-0.96967v5.68934c0,0.41421 -0.33579,0.75 -0.75,0.75z"})})}export{e as EntranceRiseSolidIcon};
@@ -1,13 +1,13 @@
1
- import{MOTION as e,stagger as t}from"./chunk-465RRWBY.js";import{arcPath as l}from"./chunk-VFC6QUEN.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-TJSJVC6P.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:F=!0,labels:P="none",labelMinShare:S=.04,className:w,emptyLabel:C}){const A=h().charts,W=c(),R=$??(e=>u(e,W)),T=I??A.other,V=C??A.nothingToBreakDown,z=d(),[E,_]=f(null),{highlighted:L}=a(),U=y(null),Y=r(U,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${w??""}`,children:V});const J=[...B].sort((e,t)=>t.value-e.value),O=J.slice(0,N),Q=J.slice(N),D=Q.length>0?[...O,{key:"__other__",label:T,value:Q.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:O,H=e=>i(e.slot,e.color,e.tone),Z=D.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,X="outside"===P&&Y>=120+2*q,G=X?q:0,K=X?Math.max(120,Math.min(k,Y-2*G)):k,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(D.length,b),oe=Math.max(...D.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!X)return[];let e=-Math.PI/2;const t=D.map((t,l)=>{const a="rose"===v?n(D.length,b).step:t.value/Z*Math.PI*2,r="rose"===v?n(D.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Z,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=S),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==E?E!==e:null!==L&&L!==t,me=null!==E?D[E]:void 0;/* @__PURE__ */
2
- return g("div",{className:`relative ${w??""}`,ref:U,children:[
3
- /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":z,onMouseLeave:()=>_(null),children:[
4
- /* @__PURE__ */p("title",{id:z,children:A.breakdown(R(Z),D.length)}),D.map((a,r)=>{const n=H(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Z*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Z*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
5
- return p("path",{d:l(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?e.sweep:void 0,style:F?t(r,55):void 0,onMouseEnter:()=>_(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
1
+ import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-JSHMIMAJ.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:M=280,innerRadius:k,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:F=!0,labels:S="none",labelMinShare:w=.04,className:A,emptyLabel:P}){const C=h().charts,W=c(),R=$??(e=>u(e,W)),z=I??C.other,E=P??C.nothingToBreakDown,T=d(),[V,_]=f(null),{highlighted:L}=a(),U=y(null),Y=r(U,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${A??""}`,children:E});const H=[...B].sort((e,t)=>t.value-e.value),J=H.slice(0,N),O=H.slice(N),Q=O.length>0?[...J,{key:"__other__",label:z,value:O.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:J,D=e=>i(e.slot,e.color,e.tone),Z=Q.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...Q.map(e=>String(e.label).length),4)*11)+24,X="outside"===S&&Y>=120+2*q,G=X?q:0,K=X?Math.max(120,Math.min(M,Y-2*G)):M,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=k??("ring"===v?.58*ae:0),ne=n(Q.length,b),oe=Math.max(...Q.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!X)return[];let e=-Math.PI/2;const t=Q.map((t,l)=>{const a="rose"===v?n(Q.length,b).step:t.value/Z*Math.PI*2,r="rose"===v?n(Q.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Z,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=w),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==V?V!==e:null!==L&&L!==t,me=null!==V?Q[V]:void 0;/* @__PURE__ */
2
+ return g("div",{className:`relative ${A??""}`,ref:U,children:[
3
+ /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":T,onMouseLeave:()=>_(null),children:[
4
+ /* @__PURE__ */p("title",{id:T,children:C.breakdown(R(Z),Q.length)}),Q.map((a,r)=>{const n=D(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Z*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Z*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
5
+ return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?t.sweep:void 0,style:F?l(r,55):void 0,onMouseEnter:()=>_(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
6
6
  return g("g",{children:[
7
7
  /* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
8
8
  /* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
9
- /* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,W)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(o,{title:me.label,rows:[{key:"value",label:A.value,color:H(me),value:R(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/Z*100,1,W)}]})}),
10
- /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:D.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
11
- /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:H(e)}}),
9
+ /* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,W)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==V&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(o,{title:me.label,rows:[{key:"value",label:C.value,color:D(me),value:R(me.value)},{key:"share",label:C.share,color:s.muted,value:m(me.value/Z*100,1,W)}]})}),
10
+ /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Q.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
11
+ /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:D(e)}}),
12
12
  /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
13
13
  /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/Z*100,1,W)})]},e.key))})]})}export{x as PieChart};
@@ -0,0 +1,28 @@
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-EDX55XGV.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-4I4WZHMV.js";import{ImageLightbox as r}from"./chunk-DVYBJOD3.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-YFUY3VDW.js";import{Breadcrumbs as d}from"./chunk-JTGRLXZN.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-MRLXGLNZ.js";import{useMediaMoveItems as u}from"./chunk-NOGSS432.js";import{RenameField as m}from"./chunk-LNZMA4PB.js";import{NativeSelect as h}from"./chunk-VJXPT53M.js";import{MediaUploadGrid as p}from"./chunk-ZTRKM3B5.js";import{MediaUsedInList as f}from"./chunk-LQVQX5B2.js";import{Segmented as g}from"./chunk-QAS22BIS.js";import{useGridSelection as v}from"./chunk-VLKDWKVR.js";import{useMarquee as k}from"./chunk-OLFYNMTD.js";import{copyToClipboard as y}from"./chunk-Y7KDCC6E.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-7ARBBWPQ.js";import{Banner as N}from"./chunk-YU52WMSH.js";import{Input_default as C}from"./chunk-ZKGUBIBT.js";import{DropdownMenu as I}from"./chunk-QBWMWK2W.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-V4XR4MOS.js";import{ColoredBadge as z}from"./chunk-WQ4YKWN2.js";import{Button_default as T}from"./chunk-EVYD6UFQ.js";import{Icon as O}from"./chunk-JOAKKXTL.js";import{Tooltip as F}from"./chunk-SOZCWT6I.js";import{buttonClasses as L}from"./chunk-UQYNPYF4.js";import{usePlotWidth as M}from"./chunk-MAFUXCPZ.js";import{useShellStrings as A}from"./chunk-JSHMIMAJ.js";import{useRef as P,useMemo as E,useCallback as B,useState as R,useEffect as K}from"react";import{jsxs as U,Fragment as V,jsx as W}from"react/jsx-runtime";var J="application/x-efficient-media-files",Y="application/x-efficient-media-folder",G="application/x-efficient-media-file";function Q(e){if(!e||!Array.from(e.types).includes(G))return null;try{const n=JSON.parse(e.getData(G));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var X={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */W(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */W(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */W(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */W(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */W(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */W(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */W(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */W(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */W(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */W(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */W(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */W(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */W(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */W(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */W(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},H={link:/* @__PURE__ */W(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */W(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */W(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function $(O){const{mode:Q="manage",layout:$="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=X,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:he,usedIn:pe,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ne,onTrash:Ce,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Te,onOpenInDesign:Oe,onChoose:Fe,onCancel:Le,pickNote:Me,onDragOut:Ae,className:Pe=""}=O,Ee=A().mediaLibrary,Be=A().media,Re="pick"===Q,Ke=!Re,Ue=P(null),Ve=M(Ue,"phone"===$?343:1200),We="phone"===$||"auto"===$&&Ve<640,Je=E(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Ye=E(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ge=E(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Ye.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Ye]),Qe=B(e=>{const n=[];for(let l=e?Ye.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Ye.get(l.parentId):void 0);return n},[Ye,ee.length]),Xe=B((e,n)=>Qe(e).some(e=>e.id===n),[Qe]),[Ze,He]=R(()=>/* @__PURE__ */new Set(["@files"])),$e=e=>He(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=B(e=>{He(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;K(()=>{if("files"===q.place)qe(["@files",...Qe(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Je.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Je.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=E(()=>ie.map(e=>e.id),[ie]),sn=E(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=v(dn),un=E(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,hn=P(!0);K(()=>{hn.current?hn.current=!1:cn.clear()},[_e]);const pn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[pn]);const fn=P(pn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,he?.(un))},[gn]);const vn=(e,n={})=>{Re?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=R(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Ye.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=B(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Ye.get(e.id);return n===e.id||n&&Xe(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:s,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Ge.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Ge,Ye,an,Xe,rn,Ee]),Nn=B(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Cn,In]=R(null),Dn={words:Ee,media:Be,denied:fe,moveTargets:xn,kindOf:Nn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Ke?e=>{wn(e)}:void 0,rename:xe&&Ke?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ne&&Ke?Ne:void 0,trash:Ce&&Ke?Ce:void 0,deleteFolder:Ie&&Ke?Ie:void 0,folderNotEmpty:e=>!!Ye.get(e)?.notEmpty,replace:ze&&Ke?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&y(Ee.urlLabel,n)},openInDesign:Oe,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),zn=(e,n)=>{Re||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Tn,On]=R(null),[Fn,Ln]=R(null),[Mn,An]=R(null);K(()=>{if(!Fn&&!Tn)return;const e=()=>{Ln(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[Fn,Tn]);const Pn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!Ne||fe.move||Re)&&(!!Pn(e,J)||!(!Pn(e,Y)||!Mn)&&(n!==Mn&&!(n&&Xe(n,Mn)))),Bn=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Tn!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),On(null),Pn(e,J)){let l;try{l=JSON.parse(e.dataTransfer.getData(J))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else Mn&&(Ne({kind:"folder",id:Mn},n),An(null))}}),Rn=e=>{const n=e=>Pn(e,J)||Pn(e,Y)||Pn(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&Fn!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */W(F,{side:"right",content:Fn===e?Ee.noDropProducts:on(l),open:Fn===e||!Fn&&void 0,children:/* @__PURE__ */W("span",{children:n})}),Un=e=>({onContextMenu:n=>{jn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=Ze.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
2
+ return U("div",{role:"none",className:"contents",children:[
3
+ /* @__PURE__ */W(n,{label:Kn(r,e.name,t),level:a,icon:d&&o?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>$e(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Rn(r),...Ke?Un({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */W(l,{children:Vn(d,a+1,t)})]},e.id)}),Wn=(e,a)=>(Ge.get(e)??[]).map(e=>{const i=Ge.get(e.id),r=Ze.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
4
+ return U("div",{role:"none",className:"contents",children:[
5
+ /* @__PURE__ */W(n,{label:e.name,level:a,icon:i&&r?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>$e(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Tn===e.id?"into":void 0,dragging:Mn===e.id,draggable:Ke&&!!Ne&&!fe.move,rename:t?/* @__PURE__ */W(m,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Ke&&o.length?/* @__PURE__ */W(I,{align:"end","aria-label":Ee.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Bn(e.id,e.id),...Ke?Un({kind:"folder",id:e.id}):{},...Ke&&Ne&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Y,e.id),An(e.id)},onDragEnd:()=>{An(null),On(null)}}:{}}}),i&&r&&/* @__PURE__ */W(l,{children:Wn(e.id,a+1)})]},e.id)}),Jn=Ze.has("@files"),Yn=Ze.has("@products"),Gn=/* @__PURE__ */U(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */U(V,{children:[
6
+ /* @__PURE__ */W(n,{label:Kn("@products",Ee.products),level:1,icon:Z.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Yn:void 0,onToggle:()=>$e("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Rn("@products")}}),Yn&&ne.length>0&&/* @__PURE__ */W(l,{children:Vn(ne,2)})]}),
7
+ /* @__PURE__ */W(n,{label:Ee.allFiles,level:1,icon:Jn?Z.folderOpen:Z.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Ge.get(null)?.length?Jn:void 0,onToggle:()=>$e("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Tn?"into":void 0,rowProps:{"data-media-row":"@files",...Bn("@files",null)}}),Jn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */W(l,{children:Wn(null,2)}),Ke&&/* @__PURE__ */W(n,{label:Ee.trash,level:1,icon:Z.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Qn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=q.nodeId?Je.get(q.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Qe(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Xn=nn?Ee.readOnly:fe.upload,Zn=!!be&&!ln&&!Xn,Hn=S({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!Zn,onAccept:e=>be?.(e,rn)}),$n=nn?Ee.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&we&&!ln&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{wn(rn)},...qn($n),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */W(T,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>Hn.open(),...qn(Xn),children:Ee.upload}),Ke&&ln&&je&&ie.length>0&&/* @__PURE__ */W(T,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */W("div",{style:{width:We?void 0:i,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */W(h,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */W("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */W(C,{size:"sm",type:"search",leftIcon:Z.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Ke&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */W(g,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:Z.grid},{value:"list",label:Ee.list,icon:Z.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:H.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:H.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:H.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:H.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */W(z,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Ke&&an&&!!Ne&&!fe.move,tl=!!Ae&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[G]:ol(e)}}:{}})),sl=We?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=P(null),ul=k({containerRef:cl,enabled:Ke&&!We&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Re){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Fe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},hl=ie.length?null:re?/* @__PURE__ */W(i,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */W(i,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */W(i,{variant:"dashed",title:Ee.trashEmpty}):!Zn||Re?/* @__PURE__ */W(i,{variant:"dashed",title:Ee.emptyFolder}):null,pl="list"===ce&&ie.length>0,fl=hl??(pl?/* @__PURE__ */W("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */U("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(G,ol(e)),Ae("start")}:void 0,onDragEnd:ol(e)?e=>Ae("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
8
+ /* @__PURE__ */W("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
9
+ /* @__PURE__ */W("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
10
+ /* @__PURE__ */W("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */W("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */W(p,{items:dl,readOnly:!Zn||Re,onFiles:Zn&&!Re?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?J:tl?G:void 0,onDragOutChange:tl?e=>Ae(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Ke?zn:void 0,menuOnMedia:Ke})),gl=u({count:un.length,kind:Nn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ne?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=L({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */W(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */U(V,{children:[Z.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Ke&&un.length>1&&!nn?/* @__PURE__ */U("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
11
+ /* @__PURE__ */W(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */U(V,ln?{children:[De&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>De(un),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */W(T,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[Ne&&kl,xe&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Ee.rename}),Ce&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>Ce({kind:"files",ids:un}),...qn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
12
+ /* @__PURE__ */W(T,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */W(m,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
13
+ return U("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
14
+ /* @__PURE__ */W("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */W(N,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
15
+ /* @__PURE__ */W(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */U("div",{className:"flex gap-2",children:[
16
+ /* @__PURE__ */W("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */W(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
17
+ /* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Ke&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ee.replace}),Te&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Te(e.id),children:Ee.cropEdit}),Ne&&"submenu"===i?.type&&/* @__PURE__ */W(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */U(V,{children:[Z.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ee.rename}),Ce&&/* @__PURE__ */W(D,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ce({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Z.trash})]}),ln&&Ke&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */W(T,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */W(T,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Oe&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Ee.openInDesign}),pe&&/* @__PURE__ */W(f,{items:pe})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,xl=Re?/* @__PURE__ */U("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
18
+ /* @__PURE__ */W("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
19
+ /* @__PURE__ */U("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */W(T,{variant:"secondary",size:"sm",onClick:Le,children:Ee.cancel}),
20
+ /* @__PURE__ */W(T,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Fe?.(mn)},children:Ee.chooseImage})]})]}):null,Nl=Ke&&!!mn,Cl=/* @__PURE__ */U("div",{className:"flex min-w-0 flex-col gap-3",children:[Me&&/* @__PURE__ */W(N,{tone:"neutral",children:Me}),
21
+ /* @__PURE__ */U("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
22
+ /* @__PURE__ */W(d,{items:Qn}),_n]}),ll,yl,
23
+ /* @__PURE__ */U("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
24
+ /* @__PURE__ */W(a,{rect:ul.rect})]}),Zn&&/* @__PURE__ */W("input",{...Hn.inputProps}),
25
+ /* @__PURE__ */W(j,{rejections:Hn.rejections})]});/* @__PURE__ */
26
+ return U("div",{ref:Ue,"data-media-library":"","data-layout":We?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Pe}`.trim(),children:[/* @__PURE__ */U("div",We?{className:"flex flex-col gap-3 p-3",children:[Gn,Cl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
27
+ /* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Gn}),
28
+ /* @__PURE__ */W("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Cl}),Nl&&/* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,We&&/* @__PURE__ */W(o,{open:Nl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */W(x,{...jn.props,items:Sn(jn.state.data)}),null!=Cn&&ie.length>0&&/* @__PURE__ */W(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Cn,ie.length-1),onClose:()=>In(null)})]})}export{J as MEDIA_FILES_DRAG_TYPE,G as MEDIA_FILE_DRAG_TYPE,Y as MEDIA_FOLDER_DRAG_TYPE,$ as MediaLibrary,Q as readMediaFileDrag};