efficient-shell 9.11.0 → 9.14.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 (316) hide show
  1. package/README.md +23 -1
  2. package/dist/{Browser-XPDD6RSI.js → Browser-42NYVAPR.js} +13 -13
  3. package/dist/Calculator-PCTFUS5O.js +29 -0
  4. package/dist/{CurrencyConverter-AW7BB3DD.js → CurrencyConverter-OIXAMDP7.js} +8 -8
  5. package/dist/{Documents-7SVXJFXI.js → Documents-V2OKP6JZ.js} +26 -26
  6. package/dist/{Files-H4TP2FLK.js → Files-OAMTKHYK.js} +78 -78
  7. package/dist/{Notepad-XP5TPXS5.js → Notepad-3LG227K2.js} +10 -10
  8. package/dist/{PdfViewer-FFQOKKFW.js → PdfViewer-DFBPEUY5.js} +1 -1
  9. package/dist/{PomodoroTimer-5VCWY4QT.js → PomodoroTimer-AYGPGA6Q.js} +12 -12
  10. package/dist/{Preview-3ZNKGYVJ.js → Preview-BBQWQ4DG.js} +28 -28
  11. package/dist/Sidebar-RHGWTAPS.js +44 -0
  12. package/dist/{Spreadsheet-VZGSCFFQ.js → Spreadsheet-MS5FU7ET.js} +14 -14
  13. package/dist/{Stock-2VWS2IQJ.js → Stock-GSQNTV7E.js} +4 -4
  14. package/dist/{Weather-4MEYBP4D.js → Weather-5XLO2GLO.js} +17 -17
  15. package/dist/{WorldClock-Y4YRJ43F.js → WorldClock-CG3NF4GA.js} +6 -6
  16. package/dist/ai/index.d.ts +42 -1
  17. package/dist/ai/index.js +59 -56
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/brand.css +1 -1
  23. package/dist/charts/BoxPlotChart.js +1 -1
  24. package/dist/charts/CandlestickChart.js +1 -1
  25. package/dist/charts/CartesianPlot.js +1 -1
  26. package/dist/charts/ChartBrush.js +1 -1
  27. package/dist/charts/ChartFrame.js +1 -1
  28. package/dist/charts/ChartSkeleton.js +1 -1
  29. package/dist/charts/ChordChart.js +1 -1
  30. package/dist/charts/ColumnChart.js +1 -1
  31. package/dist/charts/FunnelChart.js +1 -1
  32. package/dist/charts/HeatmapChart.js +1 -1
  33. package/dist/charts/HistogramChart.js +1 -1
  34. package/dist/charts/Meter.js +1 -1
  35. package/dist/charts/PieChart.js +1 -1
  36. package/dist/charts/RadarChart.js +1 -1
  37. package/dist/charts/RadialBarChart.js +1 -1
  38. package/dist/charts/RangeChart.js +1 -1
  39. package/dist/charts/RankedBars.js +1 -1
  40. package/dist/charts/SankeyChart.js +1 -1
  41. package/dist/charts/ScatterChart.js +1 -1
  42. package/dist/charts/SpecChart.js +1 -1
  43. package/dist/charts/StatTile.js +1 -1
  44. package/dist/charts/SunburstChart.js +1 -1
  45. package/dist/charts/TimeSeriesChart.js +1 -1
  46. package/dist/charts/TreemapChart.js +1 -1
  47. package/dist/charts/WaterfallChart.js +1 -1
  48. package/dist/chunk-25STFYV3.js +8 -0
  49. package/dist/{chunk-BNKULSCG.js → chunk-2OE5VVBE.js} +1 -1
  50. package/dist/{chunk-BRHKQMRH.js → chunk-2TQ6BLSN.js} +6 -6
  51. package/dist/{chunk-VZV7Q5V2.js → chunk-3AZBI76O.js} +1 -1
  52. package/dist/{chunk-NRGBXEBU.js → chunk-43T5JGFB.js} +1 -1
  53. package/dist/{chunk-QLYOGT3U.js → chunk-4E4GWE4L.js} +17 -17
  54. package/dist/{chunk-E6EUGQGA.js → chunk-4WZRNPIG.js} +1 -1
  55. package/dist/{chunk-5CVQN2BR.js → chunk-53KQSCMG.js} +7 -7
  56. package/dist/{chunk-65DYHG73.js → chunk-5VTRKWKO.js} +1 -1
  57. package/dist/{chunk-7WLFHDWA.js → chunk-66JYKX4T.js} +1 -1
  58. package/dist/{chunk-M5MAIJQQ.js → chunk-6L2UAAGT.js} +1 -1
  59. package/dist/{chunk-ODOEH5QZ.js → chunk-6TCJOVFX.js} +2 -2
  60. package/dist/{chunk-HRAK46H7.js → chunk-6YQPLI5M.js} +12 -12
  61. package/dist/{chunk-3MHBALGV.js → chunk-76IDLFXI.js} +1 -1
  62. package/dist/{chunk-D4KZOYXQ.js → chunk-7BDZZANS.js} +1 -1
  63. package/dist/{chunk-CJI3POCE.js → chunk-7KDGW6BR.js} +1 -1
  64. package/dist/{chunk-QCFN3ET4.js → chunk-7VCAMNCH.js} +1 -1
  65. package/dist/{chunk-VBNA237H.js → chunk-A4HA7EXR.js} +1 -1
  66. package/dist/{chunk-SGR4V5YI.js → chunk-A7CCSRPB.js} +1 -1
  67. package/dist/chunk-AEJNFA2K.js +6 -0
  68. package/dist/{chunk-CBMXYXBH.js → chunk-AG2OLB3E.js} +9 -9
  69. package/dist/{chunk-ZPW3KQ27.js → chunk-APXQMZSV.js} +28 -28
  70. package/dist/chunk-AVAYZK3Z.js +3 -0
  71. package/dist/{chunk-FNSVXN7B.js → chunk-B4DR72FR.js} +1 -1
  72. package/dist/{chunk-WZQCRTXF.js → chunk-B7AHMB3U.js} +1 -1
  73. package/dist/{chunk-TQH6E5V2.js → chunk-BDAKGS7O.js} +1 -1
  74. package/dist/chunk-BGNJQMAZ.js +1 -0
  75. package/dist/{chunk-MCMUJDEP.js → chunk-BMQCUHSD.js} +1 -1
  76. package/dist/{chunk-GVAWCTJN.js → chunk-C45OKLRM.js} +7 -7
  77. package/dist/{chunk-JECMVR4S.js → chunk-C6MV6IAX.js} +8 -8
  78. package/dist/{chunk-5RAOFJYT.js → chunk-CBGKLHPB.js} +6 -6
  79. package/dist/{chunk-KTRNAMHY.js → chunk-CL7SBEBQ.js} +1 -1
  80. package/dist/{chunk-4SZ3NNVF.js → chunk-D46AP6U5.js} +4 -4
  81. package/dist/{chunk-E72USUUR.js → chunk-D7X2HMMA.js} +9 -9
  82. package/dist/{chunk-GP5UNEKY.js → chunk-DKQWFQAV.js} +1 -1
  83. package/dist/{chunk-IBIUI2D3.js → chunk-DL6QIWVR.js} +1 -1
  84. package/dist/{chunk-7JJUI52C.js → chunk-DPDRFLBY.js} +3 -3
  85. package/dist/{chunk-H2XCQJRG.js → chunk-DXHLUB36.js} +1 -1
  86. package/dist/{chunk-YBU7NOD7.js → chunk-E7WY4GZ3.js} +1 -1
  87. package/dist/{chunk-RLLONZJJ.js → chunk-EGEWU776.js} +1 -1
  88. package/dist/{chunk-46YVA2BF.js → chunk-ELUTQZGP.js} +1 -1
  89. package/dist/{chunk-BJONHLET.js → chunk-EQN65XOO.js} +1 -1
  90. package/dist/chunk-EXJZUNNW.js +29 -0
  91. package/dist/{chunk-EWJELWIT.js → chunk-F24QTMTY.js} +3 -3
  92. package/dist/{chunk-QSUQC4AN.js → chunk-FTWWJHFX.js} +1 -1
  93. package/dist/{chunk-KAHYUBXM.js → chunk-GKK7DR2H.js} +8 -8
  94. package/dist/{chunk-NGQHXTUK.js → chunk-GKZUAT3K.js} +1 -1
  95. package/dist/{chunk-DRNB7KDC.js → chunk-GMRZX2ET.js} +1 -1
  96. package/dist/{chunk-UEIJSV45.js → chunk-GNU3U2TP.js} +1 -1
  97. package/dist/{chunk-FKA6ZVQO.js → chunk-GQK3U2IO.js} +9 -9
  98. package/dist/{chunk-UL4G6JY2.js → chunk-GRBBQ3VF.js} +1 -1
  99. package/dist/{chunk-73W7537K.js → chunk-GXGBBMGV.js} +1 -1
  100. package/dist/{chunk-FPGRKHUW.js → chunk-HAFB45DT.js} +7 -7
  101. package/dist/{chunk-6O2W4X2V.js → chunk-HI6IE5HI.js} +1 -1
  102. package/dist/chunk-HJPCHES5.js +8 -0
  103. package/dist/{chunk-ZC3CCRPG.js → chunk-IGEFUHYE.js} +5 -5
  104. package/dist/{chunk-KOSV4UPK.js → chunk-IKQVK3I3.js} +3 -3
  105. package/dist/{chunk-2GPHHW7C.js → chunk-IWEL2ZCV.js} +1 -1
  106. package/dist/{chunk-P65C5TUU.js → chunk-IWJRSC7M.js} +1 -1
  107. package/dist/{chunk-KECOZKJU.js → chunk-J53OQCKC.js} +7 -7
  108. package/dist/{chunk-BF7PZFKT.js → chunk-JB3WKDD7.js} +1 -1
  109. package/dist/{chunk-IENPHB5B.js → chunk-JJP54OT4.js} +1 -1
  110. package/dist/{chunk-MUHWI4GK.js → chunk-JKZJVQIB.js} +5 -5
  111. package/dist/{chunk-XS4HFUTW.js → chunk-JWX7QRGE.js} +1 -1
  112. package/dist/chunk-KAVFW5CU.js +7 -0
  113. package/dist/{chunk-VANJPZ3H.js → chunk-KCV7BFKJ.js} +1 -1
  114. package/dist/chunk-KE5U4KKG.js +4 -0
  115. package/dist/{chunk-2AHLONPR.js → chunk-KJXF5WAJ.js} +1 -1
  116. package/dist/{chunk-5EM5US6A.js → chunk-KTKMM2XW.js} +1 -1
  117. package/dist/chunk-LKW3YAZN.js +11 -0
  118. package/dist/chunk-LPUGK2MC.js +2 -0
  119. package/dist/{chunk-5Y7JITHW.js → chunk-M33225G6.js} +1 -1
  120. package/dist/{chunk-REGXKU74.js → chunk-M5YG57UP.js} +1 -1
  121. package/dist/{chunk-2XBJNB7D.js → chunk-M7H3OCIL.js} +50 -50
  122. package/dist/{chunk-IEPSBXMU.js → chunk-ME4VRJMK.js} +11 -11
  123. package/dist/{chunk-XREN3AKD.js → chunk-MNIULUQY.js} +10 -10
  124. package/dist/{chunk-AG63JVX7.js → chunk-MPALY3CL.js} +5 -5
  125. package/dist/{chunk-AGETTWMK.js → chunk-MRUJRFIX.js} +5 -5
  126. package/dist/{chunk-64R3IYAM.js → chunk-MVQMAIZM.js} +1 -1
  127. package/dist/{chunk-5Q3PFKB5.js → chunk-MZ26SYFY.js} +1 -1
  128. package/dist/{chunk-BYHKYYL6.js → chunk-NDEIZUMG.js} +1 -1
  129. package/dist/{chunk-2LDOLQ7F.js → chunk-NDKQDIWN.js} +5 -5
  130. package/dist/{chunk-WIOG2NOJ.js → chunk-NFJDLIRM.js} +5 -5
  131. package/dist/{chunk-IQWIYZB5.js → chunk-NU2YQSOP.js} +2 -2
  132. package/dist/{chunk-EGAV5LSX.js → chunk-O25B75XX.js} +1 -1
  133. package/dist/{chunk-4XZXY2AF.js → chunk-OQW42DOR.js} +1 -1
  134. package/dist/{chunk-3FBYM6O5.js → chunk-OUKDGO4N.js} +8 -8
  135. package/dist/{chunk-LYX55RI3.js → chunk-P6LB3I3D.js} +1 -1
  136. package/dist/{chunk-ZA6S5XVM.js → chunk-PF5CKD4C.js} +2 -2
  137. package/dist/{chunk-4YKRYIA7.js → chunk-PKHZTFBK.js} +1 -1
  138. package/dist/{chunk-TBLN4MDQ.js → chunk-PKIDVVAE.js} +2 -2
  139. package/dist/{chunk-YWR2WRDR.js → chunk-PUCPFBYO.js} +1 -1
  140. package/dist/{chunk-5AWV5R6E.js → chunk-PUIQFTCO.js} +6 -6
  141. package/dist/{chunk-PWBLGKQ3.js → chunk-Q3MNSM7W.js} +4 -4
  142. package/dist/chunk-QMUAY24U.js +8 -0
  143. package/dist/{chunk-VR4GSAFM.js → chunk-QO35WRYA.js} +17 -17
  144. package/dist/{chunk-5XNN2SSR.js → chunk-QRJRGP2K.js} +8 -8
  145. package/dist/{chunk-6TRE326A.js → chunk-QSW3YHPK.js} +4 -4
  146. package/dist/{chunk-T76X2SHR.js → chunk-R2QDO7NY.js} +3 -3
  147. package/dist/{chunk-JQDRM6UK.js → chunk-R5EJJ6HC.js} +1 -1
  148. package/dist/{chunk-V5QEPNPK.js → chunk-RBIGSJ2J.js} +1 -1
  149. package/dist/{chunk-N52D37FS.js → chunk-RPMWF42S.js} +5 -5
  150. package/dist/{chunk-QMYQ4B5A.js → chunk-RQNZ2PVW.js} +4 -4
  151. package/dist/{chunk-TRUPMMDJ.js → chunk-RYS3URDC.js} +11 -11
  152. package/dist/chunk-SKETTGCJ.js +2 -0
  153. package/dist/{chunk-IVY7CCTS.js → chunk-SVQJZF66.js} +5 -5
  154. package/dist/{chunk-EOWOVR55.js → chunk-SWO4VPOB.js} +1 -1
  155. package/dist/chunk-TIUFFVP5.js +9 -0
  156. package/dist/{chunk-T7O2TNNX.js → chunk-TXMAWCR7.js} +1 -1
  157. package/dist/{chunk-NCRLKFXD.js → chunk-U5DMF2TX.js} +1 -1
  158. package/dist/{chunk-T2ITXX7R.js → chunk-UB5TLWZN.js} +7 -7
  159. package/dist/{chunk-7IC4JMFA.js → chunk-UX5L3MOB.js} +4 -4
  160. package/dist/{chunk-4DBPKTVX.js → chunk-UXPZQID4.js} +15 -15
  161. package/dist/{chunk-H4YFANH5.js → chunk-VC42SDAC.js} +1 -1
  162. package/dist/{chunk-5Y6LGPZI.js → chunk-VG5NGCMQ.js} +7 -7
  163. package/dist/{chunk-I5XVZLDH.js → chunk-VO3ZB7C6.js} +7 -7
  164. package/dist/{chunk-KQSUSVMF.js → chunk-VSAI5TH7.js} +21 -21
  165. package/dist/{chunk-YQB5OYDC.js → chunk-VVVWVOG7.js} +1 -1
  166. package/dist/chunk-VVZE27M4.js +7 -0
  167. package/dist/{chunk-O4NPQ23Q.js → chunk-VXP5L6DI.js} +1 -1
  168. package/dist/{chunk-D7JY2KHG.js → chunk-W244OMOU.js} +6 -6
  169. package/dist/{chunk-NBKQADMY.js → chunk-WFANOFHG.js} +5 -5
  170. package/dist/{chunk-IZQ3XTD2.js → chunk-WUMHSI4U.js} +1 -1
  171. package/dist/chunk-X2PZMXDP.js +1 -0
  172. package/dist/{chunk-X4BKHXU5.js → chunk-X6TJR6M2.js} +7 -7
  173. package/dist/{chunk-R7JTTKG2.js → chunk-XILZGSMX.js} +3 -3
  174. package/dist/chunk-XOKANFQD.js +22 -0
  175. package/dist/{chunk-7YZJLFAK.js → chunk-XSJJPACH.js} +10 -10
  176. package/dist/{chunk-XI45TSEK.js → chunk-YFUMK2E7.js} +1 -1
  177. package/dist/{chunk-JVYSRH6U.js → chunk-YJSX6JAC.js} +1 -1
  178. package/dist/{chunk-2SJDTKQA.js → chunk-YL6LLHJA.js} +21 -21
  179. package/dist/{chunk-N3CTLEJS.js → chunk-YVTKTWZX.js} +6 -6
  180. package/dist/{chunk-QLOKT22X.js → chunk-ZCV377AG.js} +1 -1
  181. package/dist/{chunk-UZGVIHFI.js → chunk-ZF545DXX.js} +15 -15
  182. package/dist/{chunk-FEPBXJUR.js → chunk-ZG2HMC7S.js} +1 -1
  183. package/dist/{chunk-G6LOKIFC.js → chunk-ZMVCN4OA.js} +9 -9
  184. package/dist/{chunk-CB6ROWOC.js → chunk-ZOBLEXIU.js} +1 -1
  185. package/dist/{chunk-O426Q7KC.js → chunk-ZPCADTM5.js} +1 -1
  186. package/dist/{chunk-5VYBPDZ2.js → chunk-ZREDCRTL.js} +1 -1
  187. package/dist/data/DataTable.js +1 -1
  188. package/dist/data/Kanban.js +1 -1
  189. package/dist/data/ListFooter.js +1 -1
  190. package/dist/data/ListLoadError.js +1 -1
  191. package/dist/data/Pagination.js +1 -1
  192. package/dist/file-intake/index.js +1 -1
  193. package/dist/format/index.js +1 -1
  194. package/dist/forms/BorderInput.js +1 -1
  195. package/dist/forms/BrandAssetEditor.js +1 -1
  196. package/dist/forms/Calendar.js +1 -1
  197. package/dist/forms/ColorPicker.js +1 -1
  198. package/dist/forms/ComposerAttachments.js +1 -1
  199. package/dist/forms/CornersInput.js +1 -1
  200. package/dist/forms/DatePicker.js +1 -1
  201. package/dist/forms/DateRangePicker.js +1 -1
  202. package/dist/forms/DateTimePicker.js +1 -1
  203. package/dist/forms/DisplayChips.js +1 -1
  204. package/dist/forms/FilePicker.js +1 -1
  205. package/dist/forms/FormErrorSummary.js +1 -1
  206. package/dist/forms/IconPicker.js +1 -1
  207. package/dist/forms/ImageFocusPoint.js +1 -1
  208. package/dist/forms/InputNumber.js +1 -1
  209. package/dist/forms/LinkPicker.js +1 -1
  210. package/dist/forms/MediaLibrary.js +1 -1
  211. package/dist/forms/MediaUploadField.js +1 -1
  212. package/dist/forms/MediaUploadGrid.js +1 -1
  213. package/dist/forms/MediaUsedInList.js +1 -1
  214. package/dist/forms/NumericKeypad.js +1 -1
  215. package/dist/forms/PositionInput.js +1 -1
  216. package/dist/forms/Select.js +1 -1
  217. package/dist/forms/SidesInput.js +1 -1
  218. package/dist/forms/Slider.js +1 -1
  219. package/dist/forms/Snippet.js +1 -1
  220. package/dist/forms/SplitButton.js +1 -1
  221. package/dist/forms/TagInput.js +1 -1
  222. package/dist/forms/TextToolbar.d.ts +8 -2
  223. package/dist/forms/TextToolbar.js +1 -1
  224. package/dist/forms/TimePicker.js +1 -1
  225. package/dist/forms/WidthsBar.js +1 -1
  226. package/dist/forms/mediaLibraryMenu.js +1 -1
  227. package/dist/forms/mediaMoveItems.js +1 -1
  228. package/dist/forms/textAlign.js +1 -1
  229. package/dist/forms/useFileIntake.js +1 -1
  230. package/dist/icons/index.js +1 -1
  231. package/dist/index.d.ts +9 -1
  232. package/dist/index.js +154 -154
  233. package/dist/locales/zh-Hans.js +1 -1
  234. package/dist/map/index.js +7 -7
  235. package/dist/page-tabs/index.js +5 -5
  236. package/dist/pdf/index.js +1 -1
  237. package/dist/shell/Accordion.js +1 -1
  238. package/dist/shell/AppUpdateBanner.js +1 -1
  239. package/dist/shell/Avatar.js +1 -1
  240. package/dist/shell/Banner.js +1 -1
  241. package/dist/shell/Breadcrumbs.js +1 -1
  242. package/dist/shell/BudgetBar.js +1 -1
  243. package/dist/shell/Card.js +1 -1
  244. package/dist/shell/ColoredBadge.js +1 -1
  245. package/dist/shell/ConfirmDialog.js +1 -1
  246. package/dist/shell/ContainerFillChart.js +1 -1
  247. package/dist/shell/ContextMenu.js +1 -1
  248. package/dist/shell/CountBadge.js +1 -1
  249. package/dist/shell/Dialog.js +1 -1
  250. package/dist/shell/Drawer.js +1 -1
  251. package/dist/shell/DropdownMenu.js +1 -1
  252. package/dist/shell/EditableGrid.js +1 -1
  253. package/dist/shell/EmptyState.js +1 -1
  254. package/dist/shell/GlobalSearch.js +1 -1
  255. package/dist/shell/HelpCenter.js +1 -1
  256. package/dist/shell/IconRail.js +1 -1
  257. package/dist/shell/ImageLightbox.js +1 -1
  258. package/dist/shell/ItemCount.js +1 -1
  259. package/dist/shell/LanguageSelect.js +1 -1
  260. package/dist/shell/Markdown.js +1 -1
  261. package/dist/shell/MetricBar.js +1 -1
  262. package/dist/shell/MetricBarLegend.js +1 -1
  263. package/dist/shell/MilestoneTimeline.js +1 -1
  264. package/dist/shell/PageHeader.js +1 -1
  265. package/dist/shell/PopupMenu.js +1 -1
  266. package/dist/shell/ProductionTimeline.js +1 -1
  267. package/dist/shell/ResizeHandle.js +1 -1
  268. package/dist/shell/Result.js +1 -1
  269. package/dist/shell/SearchableSelect.js +1 -1
  270. package/dist/shell/SettingReset.js +1 -1
  271. package/dist/shell/SettingRow.js +1 -1
  272. package/dist/shell/SidebarLayout.js +1 -1
  273. package/dist/shell/SidebarNav.js +1 -1
  274. package/dist/shell/SortableList.js +1 -1
  275. package/dist/shell/Statistic.js +1 -1
  276. package/dist/shell/TimeAgo.js +1 -1
  277. package/dist/shell/TimelineTrack.js +1 -1
  278. package/dist/shell/TopNav.js +1 -1
  279. package/dist/shell/TransferProgress.js +1 -1
  280. package/dist/shell/Tree.js +1 -1
  281. package/dist/shell/language.js +1 -1
  282. package/dist/shell/strings.d.ts +2 -0
  283. package/dist/shell/strings.js +1 -1
  284. package/dist/shell/toast.js +1 -1
  285. package/dist/telemetry/index.js +1 -1
  286. package/dist/templates/AuthScreen.js +1 -1
  287. package/dist/templates/ChatTemplate.js +1 -1
  288. package/dist/templates/CheckoutTemplate.js +1 -1
  289. package/dist/templates/DashboardTemplate.js +1 -1
  290. package/dist/templates/DataTablePage.js +1 -1
  291. package/dist/templates/EmailTemplate.js +1 -1
  292. package/dist/templates/ErrorBoundary.js +1 -1
  293. package/dist/templates/ErrorPage.js +1 -1
  294. package/dist/templates/FormLayoutPage.js +1 -1
  295. package/dist/templates/GalleryTemplate.js +1 -1
  296. package/dist/ui/index.js +1 -1
  297. package/dist/version.js +1 -1
  298. package/package.json +1 -1
  299. package/dist/Calculator-IZXBE6R7.js +0 -29
  300. package/dist/Sidebar-TLJ7N3AQ.js +0 -44
  301. package/dist/chunk-3XRBVYTO.js +0 -2
  302. package/dist/chunk-4CPE5NBC.js +0 -8
  303. package/dist/chunk-5R6RNUDB.js +0 -7
  304. package/dist/chunk-GCB5S2OI.js +0 -8
  305. package/dist/chunk-GVH3NG6G.js +0 -22
  306. package/dist/chunk-HHOXLECO.js +0 -29
  307. package/dist/chunk-J7OKOVSL.js +0 -11
  308. package/dist/chunk-JG6DATT4.js +0 -1
  309. package/dist/chunk-LFPJ263N.js +0 -6
  310. package/dist/chunk-PEM7UXQ3.js +0 -1
  311. package/dist/chunk-POCQ7ZL4.js +0 -3
  312. package/dist/chunk-PVR4KU7H.js +0 -7
  313. package/dist/chunk-QYJQAY6C.js +0 -2
  314. package/dist/chunk-RSHNWBW2.js +0 -4
  315. package/dist/chunk-SC6HJBQA.js +0 -8
  316. package/dist/chunk-UYDP4DK3.js +0 -9
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-D4KZOYXQ.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-LYX55RI3.js";import{ColoredBadge as u}from"./chunk-H2XCQJRG.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-PEM7UXQ3.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:L,required:O,className:P,accept:S="image/*",maxSizeBytes:z,maxFiles:E,fit:M="cover",thumbSize:$=96,placeholder:R,cta:H,acceptHint:Q,showCover:B=!1,coverLabel:X,busy:W=!1,busyLabel:Y,progress:q,disabled:G=!1,readOnly:U=!1,selected:J,onItemClick:V,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=X??te.cover,ne=Y??te.uploading,le=g(),[ie,oe]=b(null),se=G||W,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!G&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=R??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:E,acceptHint:Q,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==J?null:new Set(J),Ce=!!V,Te=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=B&&(e.cover??0===t);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-7BDZZANS.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-P6LB3I3D.js";import{ColoredBadge as u}from"./chunk-DXHLUB36.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:P,hint:F,error:I,required:L,className:S,accept:O="image/*",maxSizeBytes:z,maxFiles:B,fit:M="cover",thumbSize:$=96,placeholder:E,cta:H,acceptHint:R,showCover:W=!1,coverLabel:X,busy:Z=!1,busyLabel:q,progress:Q,disabled:U=!1,readOnly:G=!1,selected:V,onItemClick:Y,onItemDoubleClick:J,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=X??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=U||Z,de=!(!k&&!N||se||G),ce=!!w&&!se&&!G,ue=!!j&&!se&&!G,me=!!K&&!U&&!ue,pe=!(!T||!A||se||G),fe=t(se),he=E??r(O,te),ge=d({accept:O,maxSizeBytes:z,maxFiles:B,acceptHint:R,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==V?null:new Set(V),Ce=!!Y,Te=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,O),a=e.name??o(e.url),n=W&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:J?()=>J(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
3
  /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
4
4
  /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
- /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Fe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Pe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Fe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),Q&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:Q})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:W?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
- return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:L,required:O,className:P,children:[
12
- /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":L?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":W||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),W&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),R&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:R})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:Z?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:P,labelId:P?`${le}-label`:void 0,htmlFor:le,hint:F,error:I,required:L,className:S,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":P?`${le}-label`:void 0,"aria-describedby":I?`${le}-error`:F?`${le}-hint`:void 0,"aria-busy":Z||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Fe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof P?P:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Pe]}),Z&&/* @__PURE__ */x(l,{label:ne,progress:Q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -1,9 +1,9 @@
1
- import{useShellLocale as e}from"./chunk-PEM7UXQ3.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as d,Children as n}from"react";import{jsxs as t,jsx as a}from"react/jsx-runtime";var i={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-line",warning:"border-amber-300",current:"border-line"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:x="",style:g,tone:f="neutral"}){const y=i[m??(o?"md":"none")],N=d(),v=d(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",M=`rounded-(--radius-card) border ${l[f]} bg-surface shadow-sm ${h}`.trim(),Q=n.toArray(e).length>0,B=Q?"border-b border-line-subtle ":"",E="current"===f,H=E?"text-base font-semibold text-blue-700":"text-base font-semibold text-ink-strongest",L=E?"rounded-t-(--radius-card) bg-accent-tint ":"",O=`${B}${L}${y.edge} ${H}`;/* @__PURE__ */
2
- return t(C,{className:M,style:g,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...E?{"aria-current":!0}:{},children:[$?
3
- /* @__PURE__ */t("div",{className:`${B}${L}${y.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${H}`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?/* @__PURE__ */a(j,{id:N,className:H,children:r}):/* @__PURE__ */a("div",{className:H,children:r}),
4
- /* @__PURE__ */a("p",{id:v,className:E?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-ink-faint",children:s})]}):null!=r&&(null!=u?
5
- /* @__PURE__ */t("div",{className:`${O} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?
6
- /* @__PURE__ */a(j,{id:N,className:O,children:r}):/* @__PURE__ */a("div",{className:O,children:r})),Q&&/* @__PURE__ */a("div",{className:[y.body,x].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */a("div",{className:`border-t border-gray-100 ${y.edge}`,children:c})]})}function c({label:d,value:n,icon:i,delta:l,className:s=""}){const c=e(),o="number"==typeof n&&c?r(n,c):n,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-X2PZMXDP.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as d,Children as n}from"react";import{jsxs as t,jsx as a}from"react/jsx-runtime";var i={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-line",warning:"border-amber-300",current:"border-line"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:x="",style:g,tone:f="neutral"}){const y=i[m??(o?"md":"none")],N=d(),v=d(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",M=`rounded-(--radius-card) border ${l[f]} bg-surface shadow-sm ${h}`.trim(),P=n.toArray(e).length>0,X=P?"border-b border-line-subtle ":"",B="current"===f,D=B?"text-base font-semibold text-blue-700":"text-base font-semibold text-ink-strongest",H=B?"rounded-t-(--radius-card) bg-accent-tint ":"",L=`${X}${H}${y.edge} ${D}`;/* @__PURE__ */
2
+ return t(C,{className:M,style:g,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...B?{"aria-current":!0}:{},children:[$?
3
+ /* @__PURE__ */t("div",{className:`${X}${H}${y.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${D}`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?/* @__PURE__ */a(j,{id:N,className:D,children:r}):/* @__PURE__ */a("div",{className:D,children:r}),
4
+ /* @__PURE__ */a("p",{id:v,className:B?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-ink-faint",children:s})]}):null!=r&&(null!=u?
5
+ /* @__PURE__ */t("div",{className:`${L} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?
6
+ /* @__PURE__ */a(j,{id:N,className:L,children:r}):/* @__PURE__ */a("div",{className:L,children:r})),P&&/* @__PURE__ */a("div",{className:[y.body,x].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */a("div",{className:`border-t border-gray-100 ${y.edge}`,children:c})]})}function c({label:d,value:n,icon:i,delta:l,className:s=""}){const c=e(),o="number"==typeof n&&c?r(n,c):n,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
7
7
  return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
8
8
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-ink-faint",children:[
9
9
  /* @__PURE__ */a("span",{className:"text-xs font-medium uppercase tracking-wide",children:d}),i]}),
@@ -1,4 +1,4 @@
1
- import{useShellStrings as e}from"./chunk-PEM7UXQ3.js";import{useRef as r,useEffect as t}from"react";import{jsxs as n,jsx as l}from"react/jsx-runtime";function o({errors:o,title:s,autoFocus:c=!0,className:i=""}){const d=e(),m=r(null),a=r(!1);if(t(()=>{const e=o.length>0;e&&!a.current&&c&&m.current?.focus(),a.current=e},[o.length>0,c]),0===o.length)return null;/* @__PURE__ */
1
+ import{useShellStrings as e}from"./chunk-X2PZMXDP.js";import{useRef as r,useEffect as t}from"react";import{jsxs as n,jsx as l}from"react/jsx-runtime";function o({errors:o,title:s,autoFocus:c=!0,className:i=""}){const d=e(),m=r(null),a=r(!1);if(t(()=>{const e=o.length>0;e&&!a.current&&c&&m.current?.focus(),a.current=e},[o.length>0,c]),0===o.length)return null;/* @__PURE__ */
2
2
  return n("div",{ref:m,role:"alert",tabIndex:-1,className:`rounded-md border border-red-300 bg-red-50 px-4 py-3 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-invalid-solid)] ${i}`.trim(),children:[
3
3
  /* @__PURE__ */l("h2",{className:"text-sm font-semibold text-red-800",children:s??d.form.errorSummaryTitle}),
4
4
  /* @__PURE__ */l("ul",{className:"mt-2 space-y-1",children:o.map(({fieldId:e,message:r},t)=>/* @__PURE__ */l("li",{children:e?/* @__PURE__ */l("a",{href:`#${e}`,onClick:r=>{r.preventDefault(),(e=>{const r=document.getElementById(e);r&&(r.scrollIntoView({block:"center"}),r.focus())})(e)},className:"text-sm text-red-700 underline hover:text-red-900",children:r}):
@@ -1,5 +1,5 @@
1
- import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-HL6JSDN3.js";import{Icon as a}from"./chunk-FSPFV4MI.js";import{OneLineLabel as o}from"./chunk-OZAAIE4E.js";import{Tooltip as s}from"./chunk-BCDG4N6L.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
2
- return t("div",{role:"group","aria-label":f?void 0:m,"aria-labelledby":f,"aria-describedby":p,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((n,l)=>{const b=`${g}-${l}-state`,m=`${g}-${l}-reason`,u=Boolean(n.disabled)&&null!=n.disabledReason&&""!==n.disabledReason,f=/* @__PURE__ */c("button",{type:"button","aria-pressed":n.shown,disabled:!(!n.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":i(b,u?m:void 0),onClick:u?e:()=>h(n.id,!n.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(n.shown?"border-blue-200 bg-accent-tint text-blue-700 hover:bg-blue-100":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink-strongest"),children:[
3
- /* @__PURE__ */t(a,{name:n.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{swallowPress as i,describedByWith as r,OffWithReason as a}from"./chunk-HL6JSDN3.js";import{OneLineLabel as o}from"./chunk-OZAAIE4E.js";import{Tooltip as s}from"./chunk-BCDG4N6L.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
2
+ return t("div",{role:"group","aria-label":f?void 0:m,"aria-labelledby":f,"aria-describedby":p,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((n,l)=>{const b=`${g}-${l}-state`,m=`${g}-${l}-reason`,u=Boolean(n.disabled)&&null!=n.disabledReason&&""!==n.disabledReason,f=/* @__PURE__ */c("button",{type:"button","aria-pressed":n.shown,disabled:!(!n.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":r(b,u?m:void 0),onClick:u?i:()=>h(n.id,!n.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(n.shown?"border-blue-200 bg-accent-tint text-blue-700 hover:bg-blue-100":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink-strongest"),children:[
3
+ /* @__PURE__ */t(e,{name:n.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
4
4
  /* @__PURE__ */t(o,{children:n.label})]}),p=/* @__PURE__ */t("span",{id:b,className:"sr-only",children:n.shown?w.shown:w.hidden});/* @__PURE__ */
5
- return c(d,{children:[u?/* @__PURE__ */t(r,{reason:n.disabledReason,id:m,children:f}):/* @__PURE__ */t(s,{content:n.shown?w.shownHint:w.hiddenHint,describe:!1,className:"relative inline-flex max-w-full",children:f}),p]},n.id)})})}export{b as DisplayChips};
5
+ return c(d,{children:[u?/* @__PURE__ */t(a,{reason:n.disabledReason,id:m,children:f}):/* @__PURE__ */t(s,{content:n.shown?w.shownHint:w.hiddenHint,describe:!1,className:"relative inline-flex max-w-full",children:f}),p]},n.id)})})}export{b as DisplayChips};
@@ -1,14 +1,14 @@
1
- import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-PEM7UXQ3.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var v=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var y=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:M,min:D,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:S,quickJump:$=!0,markedDates:A,readOnly:C=!1,"aria-label":P,className:q=""}){const E=l(()=>new Set(A??[]),[A]),K=f(h),O=a(y,null),T=f(O),U=n().calendar,H=o(),I=e(H),J=a(()=>t(H),0),V=S??J,W=()=>{if(!T)return null;const e=v(T);return D&&e<D.slice(0,7)?D.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[B,G]=i(()=>F||(K?v(K):W())),L=k??B??W(),Q=null===L?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(L,T),[R,X]=i(()=>h??O),z=s(null),Z=s(!1),[_,ee]=i("days"),te=l(()=>Q?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(Q,V):[],[L,V]),re=e=>!!D&&e<D||!!Y&&e>Y,ae=R??O,ne=te.some(e=>b(e)===ae),oe=Q?te.find(e=>e.getMonth()===Q.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{Z.current&&(Z.current=!1,z.current?.querySelector('[data-active="true"]')?.focus())},[le,L]),!Q)/* @__PURE__ */
1
+ import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-X2PZMXDP.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var v=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var y=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:D,min:M,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:S,quickJump:$=!0,markedDates:A,readOnly:C=!1,"aria-label":P,className:q=""}){const K=l(()=>new Set(A??[]),[A]),O=f(h),T=a(y,null),E=f(T),H=n().calendar,I=o(),J=e(I),U=a(()=>t(I),0),V=S??U,W=()=>{if(!E)return null;const e=v(E);return M&&e<M.slice(0,7)?M.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[X,B]=i(()=>F||(O?v(O):W())),G=k??X??W(),L=null===G?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(G,E),[R,Z]=i(()=>h??T),z=s(null),Q=s(!1),[_,ee]=i("days"),te=l(()=>L?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(L,V):[],[G,V]),re=e=>!!M&&e<M||!!Y&&e>Y,ae=R??T,ne=te.some(e=>b(e)===ae),oe=L?te.find(e=>e.getMonth()===L.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{Q.current&&(Q.current=!1,z.current?.querySelector('[data-active="true"]')?.focus())},[le,G]),!L)/* @__PURE__ */
2
2
  return u("div",{className:q,"aria-hidden":"true","data-calendar-pending":"",children:[
3
3
  /* @__PURE__ */g("div",{className:"mb-2 h-6"}),
4
- /* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(Q.getFullYear()+12*e,Q.getMonth(),1):"months"===_?new Date(Q.getFullYear()+e,Q.getMonth(),1):x(Q,e),se=e=>{const t=v(e);void 0===k&&G(t),j?.(t)},ce=P??I.monthYear(Q.getFullYear(),Q.getMonth());/* @__PURE__ */
4
+ /* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(L.getFullYear()+12*e,L.getMonth(),1):"months"===_?new Date(L.getFullYear()+e,L.getMonth(),1):x(L,e),se=e=>{const t=v(e);void 0===k&&B(t),j?.(t)},ce=P??J.monthYear(L.getFullYear(),L.getMonth());/* @__PURE__ */
5
5
  return u("div",{className:q,children:[
6
6
  /* @__PURE__ */u("div",{className:"mb-2 flex items-center justify-between px-1",children:[
7
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?U.previousYears:"months"===_?U.previousYear:U.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
8
- /* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:$?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":U.chooseMonth(I.months[Q.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:I.months[Q.getMonth()]}),
9
- /* @__PURE__ */g("button",{type:"button","aria-label":U.chooseYear(Q.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:Q.getFullYear()})]}):/* @__PURE__ */g("span",{children:I.monthYear(Q.getFullYear(),Q.getMonth())})}),
10
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?U.nextYears:"months"===_?U.nextYear:U.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":U.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:I.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===Q.getMonth(),onClick:()=>{se(new Date(Q.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===Q.getMonth()?"bg-blue-600 font-semibold text-white":T&&t===T.getMonth()&&Q.getFullYear()===T.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":U.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=Q.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===Q.getFullYear(),onClick:()=>{se(new Date(e,Q.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===Q.getFullYear()?"bg-blue-600 font-semibold text-white":e===T?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
11
- /* @__PURE__ */u("div",{ref:z,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??T??Q,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-V+7)%7),End:()=>p(t,6-(t.getDay()-V+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),Z.current=!0,X(b(a)),void(v(a)!==L&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||M(le))},hidden:"days"!==_,children:[
7
+ /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?H.previousYears:"months"===_?H.previousYear:H.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
8
+ /* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:$?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":H.chooseMonth(J.months[L.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:J.months[L.getMonth()]}),
9
+ /* @__PURE__ */g("button",{type:"button","aria-label":H.chooseYear(L.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:L.getFullYear()})]}):/* @__PURE__ */g("span",{children:J.monthYear(L.getFullYear(),L.getMonth())})}),
10
+ /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?H.nextYears:"months"===_?H.nextYear:H.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":H.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:J.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===L.getMonth(),onClick:()=>{se(new Date(L.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===L.getMonth()?"bg-blue-600 font-semibold text-white":E&&t===E.getMonth()&&L.getFullYear()===E.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":H.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=L.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===L.getFullYear(),onClick:()=>{se(new Date(e,L.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===L.getFullYear()?"bg-blue-600 font-semibold text-white":e===E?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
11
+ /* @__PURE__ */u("div",{ref:z,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??E??L,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-V+7)%7),End:()=>p(t,6-(t.getDay()-V+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),Q.current=!0,Z(b(a)),void(v(a)!==G&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||D(le))},hidden:"days"!==_,children:[
12
12
  /* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+V)%7).map(e=>
13
- /* @__PURE__ */g("div",{role:"columnheader","aria-label":I.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:I.weekdays[e],className:"no-underline",children:I.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==Q.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=I.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-accent-fill font-semibold text-on-accent":n?"bg-accent-tint-strong text-blue-800":r?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==O||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=E.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-surface":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
14
- return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===O?"date":void 0,onClick:()=>{X(t),M(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
13
+ /* @__PURE__ */g("div",{role:"columnheader","aria-label":J.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:J.weekdays[e],className:"no-underline",children:J.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==L.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=J.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-accent-fill font-semibold text-on-accent":n?"bg-accent-tint-strong text-blue-800":r?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==T||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=K.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-surface":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
14
+ return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===T?"date":void 0,onClick:()=>{Z(t),D(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
@@ -1,2 +1,2 @@
1
- import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-PEM7UXQ3.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
1
+ import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-X2PZMXDP.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
2
2
  return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
@@ -1,4 +1,4 @@
1
- import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-4CPE5NBC.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-PEM7UXQ3.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-25STFYV3.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
2
  return m(t,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
3
3
  return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
4
4
  return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-PEM7UXQ3.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
1
+ import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
2
2
  return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
3
3
  /* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
4
4
  /* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
@@ -11,7 +11,7 @@ return i("div",{className:"my-1 flex items-start gap-2 rounded-lg border border-
11
11
  /* @__PURE__ */a("thead",{children:/* @__PURE__ */a("tr",{className:"bg-gray-50",children:s.map((e,t)=>/* @__PURE__ */a("th",{className:"border-b border-line px-3 py-2 text-left font-semibold text-ink",children:u(e)},t))})}),
12
12
  /* @__PURE__ */a("tbody",{children:c.map((e,t)=>/* @__PURE__ */a("tr",{className:"even:bg-gray-50/50",children:e.map((e,t)=>/* @__PURE__ */a("td",{className:"border-t border-line-subtle px-3 h-8 align-top text-ink",children:u(e)},t))},t))})]})},r);return l?.length?/* @__PURE__ */i("div",{children:[o,
13
13
  /* @__PURE__ */a("div",{className:"flex flex-wrap justify-end gap-1",children:l.map(e=>/* @__PURE__ */a(t,{size:"sm",variant:"secondary",leftIcon:e.icon?/* @__PURE__ */a(n,{name:e.icon,look:"mini",className:"h-4 w-4","aria-hidden":"true"}):void 0,onClick:()=>e.onSelect({header:s.map(g),rows:c.map(e=>e.map(g))}),children:e.label},e.label))})]},r):o}var y=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/,v=/^[-*]\s+/,N=/^\d+\.\s+/,k=/^#{2,4}\s+/;function $(e){const t=e.split("\n"),n=[];let r=null;for(let e=0;e<t.length;e+=1){const l=t[e];let s=null;k.test(l)?s="heading":"table"!==r&&f(t.slice(e,e+2))?s="table":"bullet"!==r&&v.test(l)?s="bullet":"ordered"!==r&&N.test(l)&&("text"!==r||/^1\./.test(l))?s="ordered":"table"!==r||l.includes("|")?"heading"===r&&(s="text"):s="text",null!==s||null===r?(n.push([l]),r=s??"text"):n[n.length-1].push(l)}return n.map(e=>e.join("\n"))}function j(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let r=[];const l=()=>{for(const e of r.join("\n").split(/\n{2,}/))for(const t of $(e.replace(/\s+$/,"")))""!==t.trim()&&n.push({text:t});r=[]};for(let e=0;e<t.length;e+=1){const s=y.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){r.push(t[e]);continue}l();const[,a,i,c]=s,o=[];let d=!1;for(e+=1;e<t.length;e+=1){const n=y.exec(t[e]);if(null!==n&&n[2][0]===i[0]&&n[2].length>=i.length&&""===n[3]){d=!0;break}o.push(a?t[e].replace(new RegExp(`^ {0,${a.length}}`),""):t[e])}n.push({fence:{lang:c.split(/[ \t]/)[0],code:o.join("\n"),closed:d}})}return l(),n}function w(e,t,n){if(n){let r=null;try{r=n(e)}catch{r=null}if(null!=r)/* @__PURE__ */return a("div",{children:r},t)}return function({lang:e,code:t},n){/* @__PURE__ */
14
- return a("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */a("code",{children:t})},n)}(e,t)}function K({children:e,className:t,renderFence:n,tableActions:r,onLinkClick:l}){/* @__PURE__ */
14
+ return a("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */a("code",{children:t})},n)}(e,t)}function P({children:e,className:t,renderFence:n,tableActions:r,onLinkClick:l}){/* @__PURE__ */
15
15
  return a(o.Provider,{value:l,children:/* @__PURE__ */a("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:j(e??"").map((e,t)=>"fence"in e?w(e.fence,t,n):function(e,t,n){const r=e.split("\n"),l=r[0],s=/^(#{2,4})\s+(.*)$/.exec(l);if(s&&1===r.length){const e=s[1].length;/* @__PURE__ */
16
16
  return a(`h${e}`,{className:2===e?"mt-2 text-sm font-semibold uppercase tracking-wide text-ink-faint":3===e?"mt-1 text-base font-semibold text-gray-900":"mt-1 text-sm font-semibold text-gray-900",children:u(s[2])},t)}if(1===r.length&&/^---+$/.test(l))/* @__PURE__ */
17
17
  return a("hr",{className:"border-gray-200"},t);if(f(r))return b(r,t,n);if(/^>\s?/.test(l)){const e=r.map(e=>e.replace(/^>\s?/,"")).join(" ");/* @__PURE__ */
@@ -19,4 +19,4 @@ return a("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-
19
19
  return a(m,{alt:i[1]},t);if(/^[-*]\s+/.test(l)){const e=h(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
20
20
  return a("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */a("li",{children:u(e)},t))},t)}const c=/^(\d+)\.\s+/.exec(l);if(c){const e=h(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
21
21
  return a("ol",{start:Number(c[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */a("li",{className:"pl-1",children:u(e)},t))},t)}/* @__PURE__ */
22
- return a("p",{children:u(r.join(" "))},t)}(e.text,t,r))})})}export{K as Markdown,g as plainCell,x as tableToCsv};
22
+ return a("p",{children:u(r.join(" "))},t)}(e.text,t,r))})})}export{P as Markdown,g as plainCell,x as tableToCsv};
@@ -1,3 +1,3 @@
1
- import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as r}from"./chunk-OZAAIE4E.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
1
+ import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as r}from"./chunk-OZAAIE4E.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
2
2
  return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
3
3
  /* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-5AWV5R6E.js";import{Avatar as t}from"./chunk-65DYHG73.js";import{Input_default as a}from"./chunk-MAMWQCJ6.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-PUIQFTCO.js";import{Avatar as t}from"./chunk-5VTRKWKO.js";import{Input_default as a}from"./chunk-MAMWQCJ6.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
2
2
  return n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
3
3
  /* @__PURE__ */n(t,{name:e.name,status:e.status}),
4
4
  /* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check",...t});case"error":/* @__PURE__ */
3
3
  return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
4
4
  return n(e,{name:"error",...t});default:/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-PEM7UXQ3.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
2
2
  return r(e,{name:"align-left"});case"center":/* @__PURE__ */
3
3
  return r(e,{name:"align-center"});case"right":/* @__PURE__ */
4
4
  return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{GROUP_COLORS as e}from"./chunk-LNARMEEZ.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-PEM7UXQ3.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-LNARMEEZ.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
4
  /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,N=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),$="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,k=e=>[e,m,null==N?"":`${N}%`].filter(Boolean).join(" ");/* @__PURE__ */
@@ -0,0 +1,29 @@
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-ZMVCN4OA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-FTWWJHFX.js";import{ImageLightbox as r}from"./chunk-XSJJPACH.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-VG5NGCMQ.js";import{Breadcrumbs as d}from"./chunk-GKZUAT3K.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-YFUMK2E7.js";import{useMediaMoveItems as u}from"./chunk-B7AHMB3U.js";import{copyToClipboard as m}from"./chunk-VC42SDAC.js";import{DropdownMenu as p}from"./chunk-VVZE27M4.js";import{MediaUploadGrid as h}from"./chunk-C6MV6IAX.js";import{MediaUsedInList as f}from"./chunk-TXMAWCR7.js";import{NativeSelect as g}from"./chunk-UXPZQID4.js";import{Segmented as v}from"./chunk-CKPVXDKX.js";import{useGridSelection as k}from"./chunk-VLKDWKVR.js";import{useMarquee as y}from"./chunk-OLFYNMTD.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-NU2YQSOP.js";import{Banner as x}from"./chunk-66JYKX4T.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-RUTUVS4H.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-P6LB3I3D.js";import{ColoredBadge as j}from"./chunk-DXHLUB36.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-FSPFV4MI.js";import{Tooltip as O}from"./chunk-BCDG4N6L.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-X2PZMXDP.js";import{useRef as A,useMemo as L,useCallback as E,useState as U,useEffect as K}from"react";import{jsxs as B,Fragment as R,jsx as V}from"react/jsx-runtime";var X="application/x-efficient-media-files",H="application/x-efficient-media-folder",J="application/x-efficient-media-file";function G(e){if(!e||!Array.from(e.types).includes(J))return null;try{const n=JSON.parse(e.getData(J));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 W={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */V(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */V(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */V(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */V(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */V(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */V(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */V(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */V(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */V(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */V(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */V(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */V(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */V(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */V(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */V(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */V(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */V(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */V(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Q({value:e,label:n,onDone:l}){const[a,i]=U(e),r=A(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
2
+ return V(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Y(T){const{mode:G="manage",layout:Y="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=W,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Fe,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Me,onDragOut:Ae,className:Le=""}=T,Ee=M().mediaLibrary,Ue=M().media,Ke="pick"===G,Be=!Ke,Re=A(null),Ve=P(Re,"phone"===Y?343:1200),Xe="phone"===Y||"auto"===Y&&Ve<640,He=L(()=>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]),Je=L(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ge=L(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Je]),We=E(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,ee.length]),Ze=E((e,n)=>We(e).some(e=>e.id===n),[We]),[$e,Qe]=U(()=>/* @__PURE__ */new Set(["@files"])),Ye=e=>Qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=E(e=>{Qe(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",...We(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?He.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?He.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=L(()=>ie.map(e=>e.id),[ie]),sn=L(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=k(dn),un=L(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=A(!0);K(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[hn]);const fn=A(hn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Ke?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(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})},Cn=E(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&Ze(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,Je,an,Ze,rn,Ee]),xn=E(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Ee,media:Ue,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Be?e=>{wn(e)}:void 0,rename:Ce&&Be?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Be?xe:void 0,trash:Ne&&Be?Ne:void 0,deleteFolder:Ie&&Be?Ie:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Be?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&m(Ee.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),zn=(e,n)=>{Ke||(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)))},[Fn,Tn]=U(null),[On,Pn]=U(null),[Mn,An]=U(null);K(()=>{if(!On&&!Fn)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Fn]);const Ln=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!xe||fe.move||Ke)&&(!!Ln(e,X)||!(!Ln(e,H)||!Mn)&&(n!==Mn&&!(n&&Ze(n,Mn)))),Un=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Tn(null),Ln(e,X)){let l;try{l=JSON.parse(e.dataTransfer.getData(X))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else Mn&&(xe({kind:"folder",id:Mn},n),An(null))}}),Kn=e=>{const n=e=>Ln(e,X)||Ln(e,H)||Ln(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Bn=(e,n,l)=>/* @__PURE__ */V(O,{side:"right",content:On===e?Ee.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Rn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
3
+ return B("div",{role:"none",className:"contents",children:[
4
+ /* @__PURE__ */V(n,{label:Bn(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?()=>Ye(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Kn(r),...Be?Rn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */V(l,{children:Vn(d,a+1,t)})]},e.id)}),Xn=(e,a)=>(Ge.get(e)??[]).map(e=>{const i=Ge.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
5
+ return B("div",{role:"none",className:"contents",children:[
6
+ /* @__PURE__ */V(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?()=>Ye(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:Mn===e.id,draggable:Be&&!!xe&&!fe.move,rename:t?/* @__PURE__ */V(Q,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Be&&o.length?/* @__PURE__ */V(p,{align:"end","aria-label":Ee.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Be?Rn({kind:"folder",id:e.id}):{},...Be&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(H,e.id),An(e.id)},onDragEnd:()=>{An(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */V(l,{children:Xn(e.id,a+1)})]},e.id)}),Hn=$e.has("@files"),Jn=$e.has("@products"),Gn=/* @__PURE__ */B(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */B(R,{children:[
7
+ /* @__PURE__ */V(n,{label:Bn("@products",Ee.products),level:1,icon:Z.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Jn:void 0,onToggle:()=>Ye("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Kn("@products")}}),Jn&&ne.length>0&&/* @__PURE__ */V(l,{children:Vn(ne,2)})]}),
8
+ /* @__PURE__ */V(n,{label:Ee.allFiles,level:1,icon:Hn?Z.folderOpen:Z.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Ge.get(null)?.length?Hn:void 0,onToggle:()=>Ye("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Hn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Xn(null,2)}),Be&&/* @__PURE__ */V(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"}})]}),Wn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=q.nodeId?He.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=We(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}))]})(),Zn=nn?Ee.readOnly:fe.upload,$n=!!be&&!ln&&!Zn,Qn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Yn=nn?Ee.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Be&&we&&!ln&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{wn(rn)},...qn(Yn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>Qn.open(),...qn(Zn),children:Ee.upload}),Be&&ln&&je&&ie.length>0&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */V("div",{style:{width:Xe?void 0:i,flex:Xe?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */V(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */V("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */V(N,{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&&Be&&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__ */V(v,{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:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */V(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Be&&an&&!!xe&&!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:{[J]:ol(e)}}:{}})),sl=Xe?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=A(null),ul=y({containerRef:cl,enabled:Be&&!Xe&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ke){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.trashEmpty}):!$n||Ke?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":Be||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("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(J,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:[
9
+ /* @__PURE__ */V("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
10
+ /* @__PURE__ */V("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
11
+ /* @__PURE__ */V("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */V("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */V(h,{items:dl,readOnly:!$n||Ke,onFiles:$n&&!Ke?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?X:tl?J:void 0,onDragOutChange:tl?e=>Ae(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Be?zn:void 0,menuOnMedia:Be})),gl=u({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Z.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Be&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
12
+ /* @__PURE__ */V(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */B(R,ln?{children:[De&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>De(un),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Ee.rename}),Ne&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
13
+ /* @__PURE__ */V(z,{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__ */V(Q,{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__ */
14
+ return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
15
+ /* @__PURE__ */V("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */V(x,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
16
+ /* @__PURE__ */V(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
17
+ /* @__PURE__ */V("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */V(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
18
+ /* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ee.replace}),Fe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Fe(e.id),children:Ee.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Z.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ee.rename}),Ne&&/* @__PURE__ */V(I,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Z.trash})]}),ln&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Te&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Te({kind:"render",id:e.id}),children:Ee.openInDesign}),he&&/* @__PURE__ */V(f,{items:he})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,Cl=Ke?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
19
+ /* @__PURE__ */V("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
20
+ /* @__PURE__ */B("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",onClick:Pe,children:Ee.cancel}),
21
+ /* @__PURE__ */V(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ee.chooseImage})]})]}):null,xl=Be&&!!mn,Nl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Me&&/* @__PURE__ */V(x,{tone:"neutral",children:Me}),
22
+ /* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
23
+ /* @__PURE__ */V(d,{items:Wn}),_n]}),ll,yl,
24
+ /* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Be&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
25
+ /* @__PURE__ */V(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */V("input",{...Qn.inputProps}),
26
+ /* @__PURE__ */V(S,{rejections:Qn.rejections})]});/* @__PURE__ */
27
+ return B("div",{ref:Re,"data-media-library":"","data-layout":Xe?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Le}`.trim(),children:[/* @__PURE__ */B("div",Xe?{className:"flex flex-col gap-3 p-3",children:[Gn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
28
+ /* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Gn}),
29
+ /* @__PURE__ */V("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,Xe&&/* @__PURE__ */V(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */V(C,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */V(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{X as MEDIA_FILES_DRAG_TYPE,J as MEDIA_FILE_DRAG_TYPE,H as MEDIA_FOLDER_DRAG_TYPE,Y as MediaLibrary,G as readMediaFileDrag};
@@ -1,9 +1,9 @@
1
- import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-DRNB7KDC.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-PEM7UXQ3.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
1
+ import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
2
2
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
3
- /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const D=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
3
+ /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),I=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(S,()=>C.current,I.current)},[j,d,S]);const Z=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
4
4
  /* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
5
5
  /* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
6
- return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:D})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:D})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
6
+ return m("button",1===k?{ref:I,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:Z})}:{ref:I,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:Z})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
7
7
  return h("div",{children:[
8
8
  /* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
9
9
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-PEM7UXQ3.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
2
2
  return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
@@ -1,13 +1,13 @@
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{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-PEM7UXQ3.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:$,formatValue:j,centerLabel:I,animate:F=!0,labels:P="none",labelMinShare:w=.04,className:C,emptyLabel:S}){const A=h().charts,R=c(),T=j??(e=>u(e,R)),E=$??A.other,U=S??A.nothingToBreakDown,W=d(),[z,L]=f(null),{highlighted:_}=a(),V=y(null),Y=o(V,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 ${C??""}`,children:U});const O=[...B].sort((e,t)=>t.value-e.value),Q=O.slice(0,N),H=O.slice(N),X=H.length>0?[...Q,{key:"__other__",label:E,value:H.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:Q,Z=e=>i(e.slot,e.color,e.tone),q=X.reduce((e,t)=>e+t.value,0),D=Math.ceil(.62*Math.max(...X.map(e=>String(e.label).length),4)*11)+24,J="outside"===P&&Y>=120+2*D,G=J?D:0,K=J?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(X.length,b),oe=Math.max(...X.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!J)return[];let e=-Math.PI/2;const t=X.map((t,l)=>{const a="rose"===v?n(X.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(X.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/q,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!==z?z!==e:null!==_&&_!==t,me=null!==z?X[z]:void 0;/* @__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{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-X2PZMXDP.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:$,formatValue:j,centerLabel:I,animate:P=!0,labels:F="none",labelMinShare:w=.04,className:C,emptyLabel:S}){const A=h().charts,R=c(),T=j??(e=>u(e,R)),W=$??A.other,z=S??A.nothingToBreakDown,E=d(),[L,U]=f(null),{highlighted:_}=a(),V=y(null),Y=o(V,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 ${C??""}`,children:z});const O=[...B].sort((e,t)=>t.value-e.value),X=O.slice(0,N),Z=O.slice(N),D=Z.length>0?[...X,{key:"__other__",label:W,value:Z.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:X,H=e=>i(e.slot,e.color,e.tone),Q=D.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,J="outside"===F&&Y>=120+2*q,G=J?q:0,K=J?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(!J)return[];let e=-Math.PI/2;const t=D.map((t,l)=>{const a="rose"===v?n(D.length,b).step:t.value/Q*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/Q,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!==L?L!==e:null!==_&&_!==t,me=null!==L?D[L]:void 0;/* @__PURE__ */
2
2
  return g("div",{className:`relative ${C??""}`,ref:V,children:[
3
- /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":W,onMouseLeave:()=>L(null),children:[
4
- /* @__PURE__ */p("title",{id:W,children:A.breakdown(T(q),X.length)}),X.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*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:()=>L(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
3
+ /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":E,onMouseLeave:()=>U(null),children:[
4
+ /* @__PURE__ */p("title",{id:E,children:A.breakdown(T(Q),D.length)}),D.map((a,r)=>{const n=H(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Q*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:P?t.sweep:void 0,style:P?l(r,55):void 0,onMouseEnter:()=>U(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,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==z&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:Z(me),value:T(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/q*100,1,R)}]})}),
10
- /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:X.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:Z(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,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==L&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:H(me),value:T(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/Q*100,1,R)}]})}),
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)}}),
12
12
  /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
13
- /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/q*100,1,R)})]},e.key))})]})}export{x as PieChart};
13
+ /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/Q*100,1,R)})]},e.key))})]})}export{x as PieChart};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as i}from"./chunk-PEM7UXQ3.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
2
2
  return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
3
3
  /* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
4
4
  /* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
@@ -1,4 +1,4 @@
1
- import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-PEM7UXQ3.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
1
+ import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-X2PZMXDP.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
2
2
  return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
3
3
  /* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
4
4
  /* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
@@ -1,4 +1,4 @@
1
- import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-GVH3NG6G.js";import{ChartFrame as a}from"./chunk-2GPHHW7C.js";import{ColumnChart as l}from"./chunk-NBKQADMY.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
1
+ import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-XOKANFQD.js";import{ChartFrame as a}from"./chunk-IWEL2ZCV.js";import{ColumnChart as l}from"./chunk-WFANOFHG.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
2
2
  /* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
3
3
  /* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
4
4
  /* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-D4KZOYXQ.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-LYX55RI3.js";import{useShellStrings as l}from"./chunk-PEM7UXQ3.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},$){const z=m(),C=l().files,O=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),q=j?`${z}-error`:N?`${z}-hint`:void 0;/* @__PURE__ */
2
- return o(e,{label:g,htmlFor:z,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:$,type:"button",id:z,disabled:y,onClick:O.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":q,...O.zoneProps,className:t(O.dragOver,y,a(y),"px-4 py-6"),children:[
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-7BDZZANS.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-P6LB3I3D.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const P=m(),$=l().files,z=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),C=j?`${P}-error`:N?`${P}-hint`:void 0;/* @__PURE__ */
2
+ return o(e,{label:g,htmlFor:P,hint:N,error:j,required:k,className:v,children:[
3
+ /* @__PURE__ */o("button",{ref:B,type:"button",id:P,disabled:y,onClick:z.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...z.zoneProps,className:t(z.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
- /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?C.chooseMany:C.chooseOne}),
6
- /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?C.dragMany:C.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...O.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
5
+ /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?$.chooseMany:$.chooseOne}),
6
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?$.dragMany:$.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
+ /* @__PURE__ */d("input",{...z.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
- /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,C)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{O.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":C.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:O.rejections})]})});export{p as FilePicker_default};
9
+ /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,$)}),
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{z.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":$.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:z.rejections})]})});export{p as FilePicker_default};
@@ -1,4 +1,4 @@
1
- import{Banner as e}from"./chunk-7WLFHDWA.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
1
+ import{Banner as e}from"./chunk-66JYKX4T.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
2
2
  return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
3
3
  /* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
4
4
  /* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
@@ -1,2 +1,2 @@
1
- import{InputNumber_default as a}from"./chunk-ODOEH5QZ.js";import{Icon as e}from"./chunk-FSPFV4MI.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
1
+ import{InputNumber_default as a}from"./chunk-6TCJOVFX.js";import{Icon as e}from"./chunk-FSPFV4MI.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
2
2
  return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};