efficient-shell 12.30.0 → 12.33.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 (333) hide show
  1. package/README.md +77 -3
  2. package/dist/{Browser-FQHXHI3R.js → Browser-TYVPZ2NT.js} +16 -16
  3. package/dist/Calculator-2N7WJ6NR.js +29 -0
  4. package/dist/{CurrencyConverter-EHIQIFJK.js → CurrencyConverter-LJ73P5P7.js} +7 -7
  5. package/dist/Files-VUZWJMCE.js +141 -0
  6. package/dist/{Notepad-JPAXNEFR.js → Notepad-LXLUGQUN.js} +9 -9
  7. package/dist/PdfViewer-OLQBTKOC.js +1 -0
  8. package/dist/{PomodoroTimer-IVDZBBUN.js → PomodoroTimer-T34U5BLE.js} +69 -69
  9. package/dist/{Preview-KRK4XT2B.js → Preview-VRYWLVJY.js} +177 -177
  10. package/dist/Sidebar-I5QQHJSA.js +44 -0
  11. package/dist/{Stock-OBS2LPX4.js → Stock-BV36WRZA.js} +7 -7
  12. package/dist/{Weather-I4TJBIEN.js → Weather-YQQT5XYX.js} +20 -20
  13. package/dist/{WorldClock-YU2ZPVSA.js → WorldClock-WN2X3YIV.js} +7 -7
  14. package/dist/ai/index.js +88 -88
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.d.ts +51 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/Meter.js +1 -1
  33. package/dist/charts/PieChart.js +1 -1
  34. package/dist/charts/RadarChart.js +1 -1
  35. package/dist/charts/RadialBarChart.js +1 -1
  36. package/dist/charts/RangeChart.js +1 -1
  37. package/dist/charts/RankedBars.js +1 -1
  38. package/dist/charts/SankeyChart.js +1 -1
  39. package/dist/charts/ScatterChart.js +1 -1
  40. package/dist/charts/SpecChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-7DTWIWFO.js → chunk-2FQBY4ED.js} +6 -6
  47. package/dist/{chunk-3B3QIHF7.js → chunk-2LRSUDGN.js} +6 -6
  48. package/dist/{chunk-U22563X2.js → chunk-2UBR4YUF.js} +1 -1
  49. package/dist/{chunk-X27K2NCU.js → chunk-3DV5YLAI.js} +5 -5
  50. package/dist/chunk-3RX5KCUH.js +9 -0
  51. package/dist/{chunk-LQD54ZL5.js → chunk-3TCGXYUC.js} +1 -1
  52. package/dist/{chunk-77BK2IAJ.js → chunk-3U4IIEEY.js} +1 -1
  53. package/dist/{chunk-4FUQK2LK.js → chunk-3YCU6V3U.js} +1 -1
  54. package/dist/{chunk-FSORYU5C.js → chunk-44ZHEIJZ.js} +12 -12
  55. package/dist/{chunk-DOKA65JI.js → chunk-4HJNHI4A.js} +1 -1
  56. package/dist/{chunk-I6V4DMNR.js → chunk-4HJX2M4W.js} +1 -1
  57. package/dist/{chunk-37EYKPR6.js → chunk-4RSBPRCQ.js} +1 -1
  58. package/dist/{chunk-HJECGV6W.js → chunk-4YWQE67T.js} +1 -1
  59. package/dist/{chunk-KPPKPGQI.js → chunk-5LHEPE4B.js} +1 -1
  60. package/dist/{chunk-HRNT4UDG.js → chunk-5PSFENSW.js} +17 -17
  61. package/dist/{chunk-MYJ3HQYG.js → chunk-5UPLN44S.js} +9 -9
  62. package/dist/{chunk-CBBU74QT.js → chunk-65JCQLM4.js} +1 -1
  63. package/dist/{chunk-KKYNDLOC.js → chunk-6D6Q3ZCG.js} +6 -6
  64. package/dist/{chunk-UOHHIEH4.js → chunk-6SOS6OBB.js} +1 -1
  65. package/dist/{chunk-V64XY7L4.js → chunk-6XPS3H5Z.js} +8 -8
  66. package/dist/{chunk-4WW3SNL6.js → chunk-75TPMXA7.js} +1 -1
  67. package/dist/{chunk-5RLJAXDR.js → chunk-7VIRSTRC.js} +7 -7
  68. package/dist/{chunk-X5RFTIHV.js → chunk-7WMFHPKS.js} +1 -1
  69. package/dist/{chunk-MKPZIEQP.js → chunk-A6KFGANR.js} +22 -22
  70. package/dist/{chunk-VEF3STCH.js → chunk-AEMTJGD4.js} +1 -1
  71. package/dist/{chunk-KNNFNOX7.js → chunk-AJ5GLMGD.js} +7 -7
  72. package/dist/{chunk-DHRCI7KE.js → chunk-AKKDFFUO.js} +1 -1
  73. package/dist/{chunk-IBPULOGJ.js → chunk-APGIPXR7.js} +2 -2
  74. package/dist/{chunk-ILSE5F5F.js → chunk-ARBS2EZ6.js} +3 -3
  75. package/dist/chunk-B3KQELHS.js +7 -0
  76. package/dist/chunk-B447IHIL.js +4 -0
  77. package/dist/chunk-BLXEDMZM.js +8 -0
  78. package/dist/{chunk-ZSVBEJ4G.js → chunk-BLXHT72M.js} +1 -1
  79. package/dist/{chunk-O3SCB4QZ.js → chunk-BNPJHOAC.js} +9 -9
  80. package/dist/{chunk-6EXWWPAW.js → chunk-BRFUQAVC.js} +1 -1
  81. package/dist/{chunk-NLQLVXMJ.js → chunk-BSEQJM7X.js} +1 -1
  82. package/dist/{chunk-U45APXV3.js → chunk-BXZLSY2S.js} +1 -1
  83. package/dist/{chunk-3ZC53F4T.js → chunk-CBXEMPZL.js} +3 -3
  84. package/dist/{chunk-B27XRZ47.js → chunk-CCPUNN4F.js} +1 -1
  85. package/dist/{chunk-QHWD3G7T.js → chunk-COHFFGFE.js} +2 -2
  86. package/dist/{chunk-K6LO6QI5.js → chunk-CVXJKHPD.js} +5 -5
  87. package/dist/{chunk-7IGWU6DK.js → chunk-D53FU245.js} +8 -8
  88. package/dist/{chunk-2DCATU5B.js → chunk-DASRJ26L.js} +1 -1
  89. package/dist/chunk-DEJIH3ZQ.js +1 -0
  90. package/dist/{chunk-NSNM4QIV.js → chunk-DFOKJAIS.js} +5 -5
  91. package/dist/chunk-DGFFDZCY.js +15 -0
  92. package/dist/{chunk-QF4FYOVE.js → chunk-DU7TJVX5.js} +1 -1
  93. package/dist/{chunk-FPYOZOUY.js → chunk-DYOFTZOC.js} +8 -8
  94. package/dist/{chunk-YGKQMENL.js → chunk-E44RNULN.js} +1 -1
  95. package/dist/{chunk-TJ5ZX5HP.js → chunk-E6PDAYBR.js} +10 -10
  96. package/dist/chunk-EEFUXXYJ.js +22 -0
  97. package/dist/{chunk-P4NWDRHS.js → chunk-EQFWFQOZ.js} +6 -6
  98. package/dist/{chunk-6EETON2U.js → chunk-F3MO56N4.js} +1 -1
  99. package/dist/chunk-FBMYLCCE.js +11 -0
  100. package/dist/{chunk-AYCWVVJ3.js → chunk-FCILLVVT.js} +29 -29
  101. package/dist/{chunk-42GNFUAP.js → chunk-FCWBO7I3.js} +9 -9
  102. package/dist/{chunk-TIYRBJSB.js → chunk-FEQQMRHJ.js} +4 -4
  103. package/dist/{chunk-GANZLRMW.js → chunk-FOE2QHDE.js} +9 -9
  104. package/dist/{chunk-3N4XJS43.js → chunk-FUNGLFQE.js} +3 -3
  105. package/dist/{chunk-JA5WM66L.js → chunk-FVORTWUY.js} +1 -1
  106. package/dist/{chunk-2IEKMFVL.js → chunk-FXG7TOZN.js} +1 -1
  107. package/dist/{chunk-KLG6RYYC.js → chunk-G5U7IRH4.js} +5 -5
  108. package/dist/{chunk-IOIY54KO.js → chunk-GAGCE2ML.js} +1 -1
  109. package/dist/{chunk-OMSIXLK4.js → chunk-GHLXZDLU.js} +1 -1
  110. package/dist/{chunk-MHVWUYEN.js → chunk-H4GOJ26X.js} +1 -1
  111. package/dist/{chunk-QB7TIWHT.js → chunk-HTHD7STJ.js} +5 -5
  112. package/dist/{chunk-WM37FXRK.js → chunk-HTHNDX32.js} +1 -1
  113. package/dist/{chunk-QV5A7NFQ.js → chunk-HWJQLLJA.js} +8 -8
  114. package/dist/chunk-I4RJAMLJ.js +1 -0
  115. package/dist/{chunk-6UB6YY3H.js → chunk-ID35S5Y6.js} +1 -1
  116. package/dist/chunk-IESNUXYH.js +1 -0
  117. package/dist/{chunk-PBZ3UQMS.js → chunk-IEW5JTIR.js} +1 -1
  118. package/dist/{chunk-JGZEZHMP.js → chunk-IFLIE3EQ.js} +1 -1
  119. package/dist/{chunk-LBLWN3SH.js → chunk-IODIQ77P.js} +1 -1
  120. package/dist/{chunk-5O5QMMMG.js → chunk-IRCASURW.js} +8 -8
  121. package/dist/{chunk-VREZFFRE.js → chunk-ITEOA45V.js} +1 -1
  122. package/dist/{chunk-AIGLJYQ5.js → chunk-IYTOOV7Q.js} +1 -1
  123. package/dist/{chunk-36MM4YRK.js → chunk-JOYGSKWG.js} +9 -9
  124. package/dist/chunk-JTMR3EH3.js +28 -0
  125. package/dist/{chunk-YNE5YC6E.js → chunk-JWUNK2PW.js} +1 -1
  126. package/dist/{chunk-LHATGPIE.js → chunk-KITSIQCV.js} +19 -19
  127. package/dist/{chunk-M2GF44WC.js → chunk-KRCWLZV7.js} +12 -12
  128. package/dist/{chunk-64ZDYUE7.js → chunk-KV6XCHAG.js} +19 -19
  129. package/dist/chunk-KZQRUVII.js +12 -0
  130. package/dist/{chunk-IQTURGC4.js → chunk-LPAOHDUE.js} +1 -1
  131. package/dist/chunk-LSONG4QV.js +1 -0
  132. package/dist/{chunk-HU24RSAE.js → chunk-MZCYB2MW.js} +1 -1
  133. package/dist/{chunk-CIOPLPZW.js → chunk-NDWX5Z4D.js} +1 -1
  134. package/dist/{chunk-MVBDE4AX.js → chunk-NGG6DYNN.js} +1 -1
  135. package/dist/{chunk-QT34GMZR.js → chunk-NLHGFQ54.js} +1 -1
  136. package/dist/{chunk-HC3BZPWX.js → chunk-NUDL6UO3.js} +1 -1
  137. package/dist/{chunk-GKX3C3JE.js → chunk-P62QGXRW.js} +13 -13
  138. package/dist/{chunk-XXRUDMD5.js → chunk-PA3OU3Y7.js} +5 -5
  139. package/dist/{chunk-UEADX2GV.js → chunk-PC3MYH2K.js} +2 -2
  140. package/dist/{chunk-BEB3AGSY.js → chunk-PGATHOTX.js} +1 -1
  141. package/dist/{chunk-Q4BJW37U.js → chunk-PR6FNBKR.js} +1 -1
  142. package/dist/{chunk-NJ6WZHXC.js → chunk-PZNF2TEB.js} +5 -5
  143. package/dist/{chunk-JOANOIVK.js → chunk-Q6GECV4J.js} +1 -1
  144. package/dist/{chunk-Y6H5C6A4.js → chunk-QDEQHT2T.js} +1 -1
  145. package/dist/{chunk-RPXRMTOU.js → chunk-QDIPNQ6M.js} +1 -1
  146. package/dist/{chunk-MFZ4YMXE.js → chunk-QO7UHTUE.js} +6 -6
  147. package/dist/chunk-QXXMRV4E.js +2 -0
  148. package/dist/{chunk-GBPGZFBS.js → chunk-R5SVNFUG.js} +4 -4
  149. package/dist/{chunk-FM34DWV7.js → chunk-R5TSUJTK.js} +6 -6
  150. package/dist/{chunk-N2BWOHNM.js → chunk-RJ24VXBZ.js} +6 -6
  151. package/dist/chunk-RMEYKJEH.js +8 -0
  152. package/dist/{chunk-XMAOLCQV.js → chunk-ROKUEMAK.js} +1 -1
  153. package/dist/{chunk-2N6WWL7Y.js → chunk-ROPVIMIR.js} +1 -1
  154. package/dist/chunk-RTGGGZ2R.js +2 -0
  155. package/dist/{chunk-WCJR2GNH.js → chunk-S26FG4RF.js} +19 -19
  156. package/dist/{chunk-ANGNTN36.js → chunk-SQ4ZFG2B.js} +1 -1
  157. package/dist/{chunk-HOXXEF52.js → chunk-TAEO2JC6.js} +1 -1
  158. package/dist/{chunk-23CZSU3H.js → chunk-TDG5WGLR.js} +1 -1
  159. package/dist/{chunk-5X3Z45SL.js → chunk-TMSSR5UH.js} +1 -1
  160. package/dist/chunk-UHQBHSWL.js +11 -0
  161. package/dist/{chunk-KHFPF534.js → chunk-V3KQIY6T.js} +6 -6
  162. package/dist/chunk-V5VAKDLS.js +7 -0
  163. package/dist/{chunk-67JLD6AU.js → chunk-VMKTA5HL.js} +6 -6
  164. package/dist/{chunk-CVEVPB3O.js → chunk-VUM6BYAX.js} +3 -3
  165. package/dist/{chunk-XJTZU7UH.js → chunk-VVXBBU6R.js} +3 -3
  166. package/dist/{chunk-XK3VYRLR.js → chunk-VWYICGVA.js} +4 -4
  167. package/dist/{chunk-3HLV6BEC.js → chunk-W5HT23P7.js} +12 -12
  168. package/dist/{chunk-UK2D2CSB.js → chunk-WEZ2RO72.js} +11 -11
  169. package/dist/{chunk-PAVOVX3D.js → chunk-WKWZILZA.js} +2 -2
  170. package/dist/{chunk-4YCWO2GZ.js → chunk-WUEH6DLJ.js} +6 -6
  171. package/dist/chunk-WW5AXVBX.js +2 -0
  172. package/dist/{chunk-FIXZT5TZ.js → chunk-X22SFR5F.js} +7 -7
  173. package/dist/chunk-XBX3N3VG.js +26 -0
  174. package/dist/{chunk-5ZS3VOJH.js → chunk-XCY7A5UM.js} +1 -1
  175. package/dist/{chunk-HE2I6KWY.js → chunk-XPSWZQR4.js} +2 -2
  176. package/dist/{chunk-MRVW6F5E.js → chunk-XYMEC63O.js} +1 -1
  177. package/dist/{chunk-UQNKFMJR.js → chunk-Y43S6YS5.js} +12 -12
  178. package/dist/{chunk-JTRQ7HAS.js → chunk-YAM3L5N4.js} +1 -1
  179. package/dist/{chunk-GN3AHAVY.js → chunk-YEEMRWBS.js} +1 -1
  180. package/dist/{chunk-GL4NELAT.js → chunk-YM7AWNMY.js} +1 -1
  181. package/dist/{chunk-3R2TMLKH.js → chunk-YMUHIJDJ.js} +5 -5
  182. package/dist/{chunk-5XYRFK7D.js → chunk-YW6BODBX.js} +1 -1
  183. package/dist/{chunk-RMUOUMV2.js → chunk-ZDCCYRFF.js} +2 -2
  184. package/dist/{chunk-FYGPJPU7.js → chunk-ZDDMFFQK.js} +1 -1
  185. package/dist/{chunk-SAAXAAAH.js → chunk-ZGIAMYTI.js} +1 -1
  186. package/dist/chunk-ZHR2HNT2.js +20 -0
  187. package/dist/data/DataTable.js +1 -1
  188. package/dist/data/EntityList.js +1 -1
  189. package/dist/data/Gantt.d.ts +107 -0
  190. package/dist/data/Gantt.js +2 -0
  191. package/dist/data/Kanban.js +1 -1
  192. package/dist/data/ListFooter.js +1 -1
  193. package/dist/data/ListLoadError.js +1 -1
  194. package/dist/data/Pagination.js +1 -1
  195. package/dist/data/ResizableTable.js +1 -1
  196. package/dist/file-intake/index.js +1 -1
  197. package/dist/forms/BorderInput.js +1 -1
  198. package/dist/forms/BrandAssetEditor.js +1 -1
  199. package/dist/forms/Calendar.js +1 -1
  200. package/dist/forms/ColorPicker.js +1 -1
  201. package/dist/forms/ComposerAttachments.js +1 -1
  202. package/dist/forms/CornersInput.js +1 -1
  203. package/dist/forms/DatePicker.js +1 -1
  204. package/dist/forms/DateRangePicker.js +1 -1
  205. package/dist/forms/DateTimePicker.js +1 -1
  206. package/dist/forms/DisplayChips.js +1 -1
  207. package/dist/forms/FilePicker.js +1 -1
  208. package/dist/forms/FormErrorSummary.js +1 -1
  209. package/dist/forms/IconPicker.js +1 -1
  210. package/dist/forms/ImageFocusPoint.js +1 -1
  211. package/dist/forms/InputNumber.js +1 -1
  212. package/dist/forms/LinkPicker.js +1 -1
  213. package/dist/forms/MediaLibrary.js +1 -1
  214. package/dist/forms/MediaUploadField.js +1 -1
  215. package/dist/forms/MediaUploadGrid.js +1 -1
  216. package/dist/forms/MediaUsedInList.js +1 -1
  217. package/dist/forms/NumericKeypad.js +1 -1
  218. package/dist/forms/PictureTiles.d.ts +14 -2
  219. package/dist/forms/PictureTiles.js +1 -1
  220. package/dist/forms/PositionInput.js +1 -1
  221. package/dist/forms/Select.js +1 -1
  222. package/dist/forms/SidesInput.js +1 -1
  223. package/dist/forms/Slider.js +1 -1
  224. package/dist/forms/Snippet.js +1 -1
  225. package/dist/forms/TagInput.js +1 -1
  226. package/dist/forms/TextToolbar.js +1 -1
  227. package/dist/forms/TimePicker.js +1 -1
  228. package/dist/forms/WidthsBar.js +1 -1
  229. package/dist/forms/mediaLibraryMenu.js +1 -1
  230. package/dist/forms/mediaMoveItems.js +1 -1
  231. package/dist/forms/textAlign.js +1 -1
  232. package/dist/forms/useFileIntake.js +1 -1
  233. package/dist/hooks/useTheme.d.ts +1 -1
  234. package/dist/icons/efficient-glyphs.js +1 -1
  235. package/dist/icons/efficient-looks.js +1 -1
  236. package/dist/icons/efficient.js +1 -1
  237. package/dist/icons/looks/map.js +1 -1
  238. package/dist/icons/payment.js +1 -1
  239. package/dist/icons/sets.js +1 -1
  240. package/dist/index.d.ts +5 -4
  241. package/dist/index.js +361 -361
  242. package/dist/locales/zh-Hans.js +1 -1
  243. package/dist/map/index.js +1 -1
  244. package/dist/model-viewer/index.js +1 -1
  245. package/dist/page-tabs/index.js +5 -5
  246. package/dist/pdf/index.js +1 -1
  247. package/dist/shell/Accordion.js +1 -1
  248. package/dist/shell/AppUpdateBanner.js +1 -1
  249. package/dist/shell/Avatar.js +1 -1
  250. package/dist/shell/Banner.js +1 -1
  251. package/dist/shell/Breadcrumbs.js +1 -1
  252. package/dist/shell/BudgetBar.js +1 -1
  253. package/dist/shell/Card.js +1 -1
  254. package/dist/shell/ColoredBadge.js +1 -1
  255. package/dist/shell/ConfirmDialog.js +1 -1
  256. package/dist/shell/ContainerFillChart.js +1 -1
  257. package/dist/shell/CountBadge.js +1 -1
  258. package/dist/shell/Dialog.js +1 -1
  259. package/dist/shell/Drawer.js +1 -1
  260. package/dist/shell/EditableGrid.js +1 -1
  261. package/dist/shell/EmptyState.js +1 -1
  262. package/dist/shell/GlobalSearch.js +1 -1
  263. package/dist/shell/HelpCenter.js +1 -1
  264. package/dist/shell/IconRail.js +1 -1
  265. package/dist/shell/ImageLightbox.js +1 -1
  266. package/dist/shell/ItemCount.js +1 -1
  267. package/dist/shell/LanguageSelect.js +1 -1
  268. package/dist/shell/Markdown.js +1 -1
  269. package/dist/shell/MetricBar.js +1 -1
  270. package/dist/shell/MetricBarLegend.js +1 -1
  271. package/dist/shell/MilestoneTimeline.js +1 -1
  272. package/dist/shell/PageHeader.js +1 -1
  273. package/dist/shell/ProductionTimeline.js +1 -1
  274. package/dist/shell/ResizeHandle.js +1 -1
  275. package/dist/shell/Result.js +1 -1
  276. package/dist/shell/SearchableSelect.js +1 -1
  277. package/dist/shell/SettingReset.js +1 -1
  278. package/dist/shell/SettingRow.js +1 -1
  279. package/dist/shell/SidebarLayout.js +1 -1
  280. package/dist/shell/SidebarNav.js +1 -1
  281. package/dist/shell/SortableList.js +1 -1
  282. package/dist/shell/Statistic.js +1 -1
  283. package/dist/shell/TimeAgo.js +1 -1
  284. package/dist/shell/TimelineTrack.js +1 -1
  285. package/dist/shell/TransferProgress.js +1 -1
  286. package/dist/shell/Tree.js +1 -1
  287. package/dist/shell/discardGuard.js +1 -1
  288. package/dist/shell/language.js +1 -1
  289. package/dist/shell/strings.d.ts +30 -0
  290. package/dist/shell/strings.js +1 -1
  291. package/dist/shell/toast.js +1 -1
  292. package/dist/telemetry/index.js +1 -1
  293. package/dist/templates/AuthScreen.js +1 -1
  294. package/dist/templates/ChatTemplate.js +1 -1
  295. package/dist/templates/CheckoutTemplate.js +1 -1
  296. package/dist/templates/DashboardTemplate.js +1 -1
  297. package/dist/templates/DataTablePage.js +1 -1
  298. package/dist/templates/EmailTemplate.js +1 -1
  299. package/dist/templates/ErrorBoundary.d.ts +1 -1
  300. package/dist/templates/ErrorBoundary.js +1 -1
  301. package/dist/templates/ErrorPage.js +1 -1
  302. package/dist/templates/FormLayoutPage.js +1 -1
  303. package/dist/templates/GalleryTemplate.js +1 -1
  304. package/dist/ui/index.d.ts +2 -1
  305. package/dist/ui/index.js +1 -1
  306. package/dist/ui.css +35 -0
  307. package/dist/version.js +1 -1
  308. package/package.json +1 -1
  309. package/dist/Calculator-XCRU5K4O.js +0 -29
  310. package/dist/Files-LTUUGPAM.js +0 -141
  311. package/dist/PdfViewer-J55QKFNS.js +0 -1
  312. package/dist/Sidebar-FCXIPW5K.js +0 -44
  313. package/dist/chunk-4MCI7UHQ.js +0 -7
  314. package/dist/chunk-4SEPQN2N.js +0 -12
  315. package/dist/chunk-AJVL6LXI.js +0 -22
  316. package/dist/chunk-CHV7U5UV.js +0 -9
  317. package/dist/chunk-CXXMSYA6.js +0 -1
  318. package/dist/chunk-E7RMS776.js +0 -20
  319. package/dist/chunk-ESL5TDNA.js +0 -1
  320. package/dist/chunk-EWSOX4WP.js +0 -28
  321. package/dist/chunk-FEWWCWKV.js +0 -11
  322. package/dist/chunk-GCTJIZTJ.js +0 -2
  323. package/dist/chunk-HCDG7EUR.js +0 -1
  324. package/dist/chunk-KPFP2I2S.js +0 -8
  325. package/dist/chunk-MUSNAMWH.js +0 -1
  326. package/dist/chunk-PRWA4AAC.js +0 -11
  327. package/dist/chunk-RJG67VRP.js +0 -15
  328. package/dist/chunk-RVD6HJUJ.js +0 -4
  329. package/dist/chunk-TN3W72FC.js +0 -8
  330. package/dist/chunk-VLI2ED22.js +0 -7
  331. package/dist/chunk-VY5NO4TS.js +0 -2
  332. package/dist/chunk-YS3CF7GL.js +0 -2
  333. /package/dist/{chunk-GMHMWDXU.js → chunk-KH3253OM.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{DAY_MS as e,fmtSliderDate as t}from"./chunk-7TC3LJQM.js";import{calendarNames as n}from"./chunk-Y3JW2GW5.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a,useBrowserLayoutEffect as s}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useShellStrings as o,useShellLocale as c}from"./chunk-HCDG7EUR.js";import{useRef as u,useState as d,useId as m,useEffect as h,useCallback as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
1
+ import{DAY_MS as e,fmtSliderDate as t}from"./chunk-7TC3LJQM.js";import{calendarNames as n}from"./chunk-Y3JW2GW5.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a,useBrowserLayoutEffect as s}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useShellStrings as o,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{useRef as u,useState as d,useId as m,useEffect as h,useCallback as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
2
2
  /* @__PURE__ */x("path",{d:"M3.4 1.9h5.2v7.2l-1.3-.9-1.3.9-1.3-.9-1.3.9z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
3
3
  /* @__PURE__ */x("path",{d:"M4.9 4.4h2.2M4.9 6.1h2.2",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),check:/* @__PURE__ */x("path",{d:"M2.6 6.3 4.9 8.6 9.4 3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),doc:/* @__PURE__ */f(y,{children:[
4
4
  /* @__PURE__ */x("path",{d:"M3.5 1.9h3.4l2 2v6.2H3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
@@ -13,7 +13,7 @@ return x("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:k[e]})}functio
13
13
  return f("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[
14
14
  /* @__PURE__ */x("path",{d:"M4.2 2.2v11.6"}),
15
15
  /* @__PURE__ */x("path",{d:"M4.2 3.1h7.4l-1.6 2.5 1.6 2.6H4.2z"})]})}function v(){/* @__PURE__ */
16
- return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],u=[],d=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),u.push(a>0?t/a*r:0),d.push(a>0&&t/a>s)}const m=d.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)d[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>d[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,d,o),k=y.reduce((e,t,n)=>d[n]?e:e+t,0),g=y.map((e,t)=>d[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:u[t],clampedPx:f[t],px:M[t+1]-e,compressed:d[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function R(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function j(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function U(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}function H(e,t){const[n,r]=d(0);return s(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function O(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),u=Math.min(Math.max(c,i),.8*n);if(u<=i+.5)return e;const d=a,m=n-s,h=d+m,p=Math.max(0,n-u),x=h>0?p*d/h:0,f=x,y=x+u,k=o.map(e=>c>0?e*u/c:0),g=e=>{if(e<=a)return d>0?e*x/d:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*d/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function I(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function W({marks:e,innerRef:t}){/* @__PURE__ */
16
+ return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],u=[],d=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),u.push(a>0?t/a*r:0),d.push(a>0&&t/a>s)}const m=d.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)d[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>d[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,d,o),k=y.reduce((e,t,n)=>d[n]?e:e+t,0),g=y.map((e,t)=>d[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:u[t],clampedPx:f[t],px:M[t+1]-e,compressed:d[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function H(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}function U(e,t){const[n,r]=d(0);return s(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function O(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),u=Math.min(Math.max(c,i),.8*n);if(u<=i+.5)return e;const d=a,m=n-s,h=d+m,p=Math.max(0,n-u),x=h>0?p*d/h:0,f=x,y=x+u,k=o.map(e=>c>0?e*u/c:0),g=e=>{if(e<=a)return d>0?e*x/d:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*d/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function I(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function W({marks:e,innerRef:t}){/* @__PURE__ */
17
17
  return x("div",{ref:t,"aria-hidden":"true",className:"rosh-tl-measure",children:e.map(e=>/* @__PURE__ */f("div",{"data-lane-key":e.key,className:"rosh-tl-measure-box",children:[
18
18
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
19
19
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function z({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const i=o().timeline,u=n(c()),d=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
@@ -33,7 +33,7 @@ return f("div",{className:"rosh-tl-pending","data-timeline-part":"pending",child
33
33
  /* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-node is-ghost"+(e.kind&&A[e.kind].diamond?" is-diamond":"")}),
34
34
  /* @__PURE__ */f("span",{children:[0===r&&/* @__PURE__ */x("b",{children:`${n.next} · `}),e.label]})]},e.key))}),s>0&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-more text-gray-500",onClick:()=>l(!0),children:n.more(s)})]})}function E({marks:t,pending:n,currentKey:l,todayMs:a,reveal:s,ariaLabel:i,step:c,nodeProps:u,onKeyDown:d}){const m=o().timeline,h=t.findIndex(e=>e.key===l),p=t.length>0&&null!==a?Math.round((a-t[t.length-1].ms)/e):0;/* @__PURE__ */
35
35
  return f("div",{"data-timeline-part":"vertical",children:[
36
- /* @__PURE__ */x("ol",{className:"rosh-tl-v","aria-label":i,onKeyDown:d,children:t.map((e,t)=>{const n=j(e.kind,e.role),a=h>=0&&t<h,{glyph:i}=e;/* @__PURE__ */
36
+ /* @__PURE__ */x("ol",{className:"rosh-tl-v","aria-label":i,onKeyDown:d,children:t.map((e,t)=>{const n=R(e.kind,e.role),a=h>=0&&t<h,{glyph:i}=e;/* @__PURE__ */
37
37
  return f("li",{className:s?"rosh-tl-fade":void 0,style:s?r(t,c):void 0,...e.key===l?{"aria-current":"step"}:{},children:[
38
38
  /* @__PURE__ */x("i",{"aria-hidden":"true",className:`rosh-tl-vline text-blue-600${a?" is-on":" is-dash"}${a&&s?" rosh-tl-drawy":""}`}),
39
39
  /* @__PURE__ */f("button",{...u(e),className:`${n.className}${s?" rosh-tl-pop":""}`,style:{...n.style,...s?r(t,c):{}},children:[i&&/* @__PURE__ */x(g,{name:i}),"current"===e.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(s?" is-on":"")})]}),
@@ -47,15 +47,15 @@ return f("div",{"aria-hidden":"true",children:[
47
47
  /* @__PURE__ */x("i",{}),
48
48
  /* @__PURE__ */x("i",{})]},`railcut-${e.fromMs}`))]})}function V({geo:e,caption:t,endCaption:n,around:r,reveal:l,trackPx:a}){const s=e.rail-13-4,i=l?" rosh-tl-fade":"",o=l?{animationDelay:"420ms"}:{};/* @__PURE__ */
49
49
  return f("div",{"aria-hidden":"true","data-timeline-part":"start",children:[
50
- /* @__PURE__ */x("i",{className:`rosh-tl-start${r?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=n&&!1!==n&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:n})]})}function G({x:e,geo:t,trackPx:n,label:r,reveal:l}){const a=o().timeline;/* @__PURE__ */
50
+ /* @__PURE__ */x("i",{className:`rosh-tl-start${r?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=n&&!1!==n&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:n})]})}function J({x:e,geo:t,trackPx:n,label:r,reveal:l}){const a=o().timeline;/* @__PURE__ */
51
51
  return f("div",{"aria-hidden":"true","data-timeline-part":"today",children:[
52
52
  /* @__PURE__ */x("div",{className:"rosh-tl-todayline"+(l?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${t.laneA}px`,height:t.ruler+20-t.laneA+"px",...l?{animationDelay:"420ms"}:{}}}),
53
- /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function J({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function Y({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
53
+ /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function G({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function Y({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
54
54
  return f("div",{"aria-hidden":"true","data-timeline-part":"phase",children:[
55
55
  /* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${r}px`,width:`${l}px`,top:t.laneB+t.laneH-4+"px"}}),
56
56
  /* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function _({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=o().timeline,i=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>i(e,r))??null;if(!c)return null;const u=c.mark,d=u?u.label:`×${c.members.length}`,m=u?u.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=u?u.widthPx:N(d,m),p=u?.onOpen;/* @__PURE__ */
57
57
  return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${i(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${n.laneB}px`,width:`${h}px`,height:`${n.laneH}px`},children:[p?/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-name rosh-tl-open","data-timeline-part":"open","aria-label":s.open(d),onClick:p,children:d}):/* @__PURE__ */x("span",{className:"rosh-tl-name","aria-hidden":"true",children:d}),
58
- /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function q({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:u,popId:d,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===u)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),u=Array.from({length:o},()=>[]),d=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){d.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(u[e].every(e=>l>e.right+i||c+i<e.left)){u[e].push({left:l,right:c}),m=e;break}d.set(e.key,m)}return e.map(e=>({key:e.key,lane:d.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
58
+ /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function Q({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:u,popId:d,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===u)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),u=Array.from({length:o},()=>[]),d=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){d.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(u[e].every(e=>l>e.right+i||c+i<e.left)){u[e].push({left:l,right:c}),m=e;break}d.set(e.key,m)}return e.map(e=>({key:e.key,lane:d.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
59
59
  return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),n=Math.round(e.index*c+60);if("cluster"===e.group.type){const l=h===e.key,a=e.group.members.map(e=>e.x),s=()=>{g(null),l||M(null)};/* @__PURE__ */
60
60
  return f("div",{children:[
61
61
  /* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":d,style:{left:`${e.left}px`,top:`${0===t?r.laneA+r.laneH-19:r.laneB}px`,color:A[e.group.kind]?.token,...o?{animationDelay:`${n}ms`}:{}},onMouseEnter:()=>{g(e.key),M(e.key)},onMouseLeave:s,onFocus:()=>{g(e.key),M(e.key)},onBlur:s,onClick:()=>{p(l?null:e.key),M(l?null:e.key)},children:[
@@ -70,24 +70,24 @@ return f("div",{children:[
70
70
  /* @__PURE__ */x("p",{className:"rosh-tl-popover-head",children:N.text}),
71
71
  /* @__PURE__ */x("ol",{children:N.group.members.map(e=>/* @__PURE__ */f("li",{children:[
72
72
  /* @__PURE__ */x("span",{children:e.label}),
73
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Q({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:i,endMs:d,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=o().timeline,b=c(),$=u(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=I(n.stops),B=T?T.indexOf(r):-1,L=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):r},D=e=>{const t=l(e);t!==r&&n.onChange(t)},K=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),n.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),n.onDragEnd?.())},F=e=>{if(!$.current)return;const t=L(e.clientX);D(t),M(function(e,t){if(!Number.isFinite(t))return null;const n=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<n.length;e++){const r=n[e],l=n[e+1];if(t<r.ms||t>l.ms)continue;const a=l.ms-r.ms;return{fromKey:r.key,toKey:l.key,t:a>0?C((t-r.ms)/a,0,1):1,ms:t}}return null}(g,t))},R=n.valueText?n.valueText(N):t(N,b),j=Math.max(1,Math.round((d-i)/e));/* @__PURE__ */
73
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Z({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:i,endMs:d,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=o().timeline,b=c(),$=u(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=I(n.stops),B=T?T.indexOf(r):-1,L=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):r},D=e=>{const t=l(e);t!==r&&n.onChange(t)},K=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),n.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),n.onDragEnd?.())},F=e=>{if(!$.current)return;const t=L(e.clientX);D(t),M(function(e,t){if(!Number.isFinite(t))return null;const n=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<n.length;e++){const r=n[e],l=n[e+1];if(t<r.ms||t>l.ms)continue;const a=l.ms-r.ms;return{fromKey:r.key,toKey:l.key,t:a>0?C((t-r.ms)/a,0,1):1,ms:t}}return null}(g,t))},j=n.valueText?n.valueText(N):t(N,b),R=Math.max(1,Math.round((d-i)/e));/* @__PURE__ */
74
74
  return f(y,{children:[
75
75
  /* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{K(e),D(L(e.clientX))},onPointerMove:F,onPointerUp:A,onPointerCancel:A}),
76
76
  /* @__PURE__ */x("div",{className:"rosh-tl-chip","data-timeline-part":"chip",style:{left:`${w(P,88,m)+44}px`,top:`${s.tag}px`},children:n.chip?n.chip(N):t(N,b)}),
77
- /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:j,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-i)/e),"aria-valuetext":R,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?i:"End"===n?d:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function Z(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function ee({startMs:n,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:de=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=e=>t(e,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[Re,je]=d(null),[Ue,He]=d(null),[Oe,Ie]=d(null),[We,ze]=d(null),[Se,Ee]=d(null),Xe=m(),Ve=m(),Ge=H(Me,!0),Je=Ge>0?Ge-(w.length>0&&!fe?176:0):0,Ye=Je>0&&Je-20<320,_e=H(we,!Ye),qe=_e>0?_e:600,Qe=L[ne],Ze=fe&&w.length>0,et=Ze?Math.max(0,qe-36):qe,tt=t=>t>=n-e&&t<=k+e,nt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:R(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),dt=Ze?(()=>{const t=w[w.length-1],n=w.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:k+e,x:qe,baseX:qe,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Ze?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...dt,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??Oe??We,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?O(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ye?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[Ft,Rt]=d(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,Rt(!0);const e=setTimeout(()=>Rt(!1),240);return()=>clearTimeout(e)},[Ct]);const jt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");s(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[jt]);const Ut=`${ne}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ht,Ot]=d(Ut),It=de&&Ht===Ut;h(()=>{Ht!==Ut&&Ot(Ut)},[Ht,Ut]);const Wt=Math.min(28,340/Math.max(1,ht.length-1)),zt=I(ae?.stops),St=e=>{const t=Math.min(Math.max(e,n),k);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),d=Math.max(0,u-c),m=d<=.5||n.reducedMotion?0:C(350*d/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:d,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Jt]=d(null),Yt=u(null),_t=u({segments:Vt,value:Et,playback:se});h(()=>{_t.current={segments:Vt,value:Et,playback:se}});const qt=u(null),Qt=p(e=>{null===e&&null===qt.current||(qt.current=e,_t.current.playback?.onProgress?.(e))},[]),Zt=p(()=>{Yt.current=null,Jt(null),Qt(null),_t.current.playback?.onStop?.()},[Qt]),en=!!se?.playing&&!!ae;h(()=>{if(!en)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Zt();Yt.current&&Yt.current.index===t||(Yt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Jt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Yt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Yt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Yt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Zt()},i=e=>{const t=_t.current,n=Yt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Yt.current=s.cursor,s.at&&l(s.at),Qt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Zt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Yt.current&&(Yt.current.sinceMs=null,Qt(null))}},[en,Zt,Qt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Et:void 0!==ee?ee:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),je(null),He(null),Ie(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==Re||null!==Ue||null!==Oe||null!==We;h(()=>{if(on)return i(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=p((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[qe]),un=Bt.find(e=>e.key===Re)??null,dn=un?un.x:0;s(()=>{cn(Ne.current,dn)},[cn,Re,dn]);const mn=Et??void 0,hn=u(null);h(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Se&&pn.includes(Se)?Se:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),je(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>je(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":Re===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(U))),"aria-describedby":Re===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Ye)/* @__PURE__ */
78
- return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:Wt,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Qe.rail-3+"px"},children:e});/* @__PURE__ */
77
+ /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-i)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?i:"End"===n?d:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function q(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function ee({startMs:n,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:de=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=e=>t(e,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[He,Ue]=d(null),[Oe,Ie]=d(null),[We,ze]=d(null),[Se,Ee]=d(null),Xe=m(),Ve=m(),Je=U(Me,!0),Ge=Je>0?Je-(w.length>0&&!fe?176:0):0,Ye=Ge>0&&Ge-20<320,_e=U(we,!Ye),Qe=_e>0?_e:600,Ze=L[ne],qe=fe&&w.length>0,et=qe?Math.max(0,Qe-36):Qe,tt=t=>t>=n-e&&t<=k+e,nt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),dt=qe?(()=>{const t=w[w.length-1],n=w.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:k+e,x:Qe,baseX:Qe,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!qe?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...dt,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=He??Oe??We,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?O(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ye?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[Ft,jt]=d(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");s(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ht=`${ne}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ut,Ot]=d(Ht),It=de&&Ut===Ht;h(()=>{Ut!==Ht&&Ot(Ht)},[Ut,Ht]);const Wt=Math.min(28,340/Math.max(1,ht.length-1)),zt=I(ae?.stops),St=e=>{const t=Math.min(Math.max(e,n),k);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),d=Math.max(0,u-c),m=d<=.5||n.reducedMotion?0:C(350*d/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:d,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Jt,Gt]=d(null),Yt=u(null),_t=u({segments:Vt,value:Et,playback:se});h(()=>{_t.current={segments:Vt,value:Et,playback:se}});const Qt=u(null),Zt=p(e=>{null===e&&null===Qt.current||(Qt.current=e,_t.current.playback?.onProgress?.(e))},[]),qt=p(()=>{Yt.current=null,Gt(null),Zt(null),_t.current.playback?.onStop?.()},[Zt]),en=!!se?.playing&&!!ae;h(()=>{if(!en)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void qt();Yt.current&&Yt.current.index===t||(Yt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Gt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Yt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Yt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Yt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):qt()},i=e=>{const t=_t.current,n=Yt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Yt.current=s.cursor,s.at&&l(s.at),Zt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):qt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Yt.current&&(Yt.current.sinceMs=null,Zt(null))}},[en,qt,Zt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Jt?Jt.ms:Et:void 0!==ee?ee:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),Ue(null),Ie(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==He||null!==Oe||null!==We;h(()=>{if(on)return i(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=p((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Qe]),un=Bt.find(e=>e.key===je)??null,dn=un?un.x:0;s(()=>{cn(Ne.current,dn)},[cn,je,dn]);const mn=Et??void 0,hn=u(null);h(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Se&&pn.includes(Se)?Se:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":H(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(H))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Ye)/* @__PURE__ */
78
+ return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:Wt,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Ze.rail-3+"px"},children:e});/* @__PURE__ */
79
79
  return f("div",{ref:Me,className:"rosh-tl-body"+(w.length>0&&!fe?"":" is-solo"),children:[
80
80
  /* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&Cn(pt,!1),
81
- /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${Z(Qe,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(W,{marks:ht,innerRef:Pe}),
82
- /* @__PURE__ */x(X,{axis:wt,geo:Qe,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Ze&&
83
- /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:qe-et+"px",top:Qe.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:Qe.rail-7+"px",height:"20px"}}),
84
- /* @__PURE__ */x(z,{startMs:n,endMs:k,axis:wt,geo:Qe,reveal:It}),
85
- /* @__PURE__ */x(V,{geo:Qe,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:qe}),fe&&/* @__PURE__ */x(J,{nodes:Bt,geo:Qe,reveal:It}),null!==ge&&ge>n&&ge<=k+e&&/* @__PURE__ */x(G,{x:wt.xByMs(Math.min(ge,k)),geo:Qe,trackPx:qe,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(Y,{phase:e,geo:Qe,xOf:wt.xByMs},e.key)),
86
- /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Qe.rail+3}px`,a=It?r(t,Wt):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
87
- return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${It?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,r=j(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
81
+ /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${q(Ze,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Jt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(W,{marks:ht,innerRef:Pe}),
82
+ /* @__PURE__ */x(X,{axis:wt,geo:Ze,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),qe&&
83
+ /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Qe-et+"px",top:Ze.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:Ze.rail-7+"px",height:"20px"}}),
84
+ /* @__PURE__ */x(z,{startMs:n,endMs:k,axis:wt,geo:Ze,reveal:It}),
85
+ /* @__PURE__ */x(V,{geo:Ze,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:Qe}),fe&&/* @__PURE__ */x(G,{nodes:Bt,geo:Ze,reveal:It}),null!==ge&&ge>n&&ge<=k+e&&/* @__PURE__ */x(J,{x:wt.xByMs(Math.min(ge,k)),geo:Ze,trackPx:Qe,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(Y,{phase:e,geo:Ze,xOf:wt.xByMs},e.key)),
86
+ /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Ze.rail+3}px`,a=It?r(t,Wt):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
87
+ return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${It?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,r=R(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
88
88
  return f("li",{...n(ot)?{"aria-current":"step"}:{},children:[
89
- /* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...r.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(It?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=j(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
90
- return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(q,{groups:ft,trackPx:qe,geo:Qe,startMs:n,endMs:k,currentKey:ot,hoveredKey:Ae,reveal:It,step:Wt,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:Ue,setOpenCluster:He,previewCluster:Oe,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(_,{nodes:Bt,trackPx:qe,geo:Qe,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,un&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(un.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Qe.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(un.key)},onMouseLeave:()=>{Mn(),$n(un.key)},onFocus:()=>{kn(),bn(un.key)},onBlur:()=>{Mn(),$n(un.key)},children:un.mark?/* @__PURE__ */f(y,{children:[
89
+ /* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...r.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(It?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=R(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
90
+ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(Q,{groups:ft,trackPx:Qe,geo:Ze,startMs:n,endMs:k,currentKey:ot,hoveredKey:Ae,reveal:It,step:Wt,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:He,setOpenCluster:Ue,previewCluster:Oe,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(_,{nodes:Bt,trackPx:Qe,geo:Ze,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,un&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(un.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Ze.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(un.key)},onMouseLeave:()=>{Mn(),$n(un.key)},onFocus:()=>{kn(),bn(un.key)},onBlur:()=>{Mn(),$n(un.key)},children:un.mark?/* @__PURE__ */f(y,{children:[
91
91
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:un.mark.label}),
92
92
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:un.mark.dateText}),un.mark.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:un.mark.preview}):un.mark.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:un.mark.detail}),(un.mark.onOpen??un.mark.onClick)&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-bubble-open text-blue-600","data-timeline-part":"bubble-open",onClick:()=>(un.mark?.onOpen??un.mark?.onClick)?.(),children:ve.openButton})]}):
93
93
  /* @__PURE__ */f("div",{className:"rosh-tl-fold-list","data-timeline-part":"fold-members",children:[
@@ -96,4 +96,4 @@ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */
96
96
  /* @__PURE__ */f("p",{className:"rosh-tl-foldrow",children:[
97
97
  /* @__PURE__ */x("span",{children:e.label}),
98
98
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Et&&
99
- /* @__PURE__ */x(Q,{thumb:ae,value:Et,snap:St,axis:wt,geo:Qe,startMs:n,endMs:k,trackPx:qe,layerRef:we,glide:Gt,onScrub:se?Zt:void 0,nodes:Xt,onProgress:Qt})]})}),fe&&Cn(ie?.end,!0)]}),w.length>0&&!fe&&/* @__PURE__ */x(S,{pending:w,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,ee as TimelineTrack};
99
+ /* @__PURE__ */x(Z,{thumb:ae,value:Et,snap:St,axis:wt,geo:Ze,startMs:n,endMs:k,trackPx:Qe,layerRef:we,glide:Jt,onScrub:se?qt:void 0,nodes:Xt,onProgress:Zt})]})}),fe&&Cn(ie?.end,!0)]}),w.length>0&&!fe&&/* @__PURE__ */x(S,{pending:w,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,ee as TimelineTrack};
@@ -1 +1 @@
1
- import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-WBAWJIVM.js";import{setPdfPreview as n}from"./chunk-ESL5TDNA.js";import{toast_default as i}from"./chunk-5X3Z45SL.js";var o="react-os-shell:preview-opened";async function a(a){const{filePath:r,filename:l,kind:c,onStaged:s,load:d}=a;try{const a=d?d():e().readShortcut?.(r)??null;let f;if(a)f=await a;else{const e=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(r)}`,{credentials:"include"});if(!e.ok)return i.error(`Download failed (${e.status})`),!1;f=await e.blob()}if("csv"===c){const e=await f.text();t({csv:e,filename:l}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(f);n({url:e,filename:l,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{filePath:r,filename:l,kind:c}})),!0}catch(e){return i.error(e?.message||"Open failed"),!1}}export{o as PREVIEW_OPENED_EVENT,a as openPreviewFile};
1
+ import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-WBAWJIVM.js";import{setPdfPreview as n}from"./chunk-I4RJAMLJ.js";import{toast_default as i}from"./chunk-TMSSR5UH.js";var o="react-os-shell:preview-opened";async function a(a){const{filePath:r,filename:l,kind:c,onStaged:s,load:d}=a;try{const a=d?d():e().readShortcut?.(r)??null;let f;if(a)f=await a;else{const e=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(r)}`,{credentials:"include"});if(!e.ok)return i.error(`Download failed (${e.status})`),!1;f=await e.blob()}if("csv"===c){const e=await f.text();t({csv:e,filename:l}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(f);n({url:e,filename:l,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{filePath:r,filename:l,kind:c}})),!0}catch(e){return i.error(e?.message||"Open failed"),!1}}export{o as PREVIEW_OPENED_EVENT,a as openPreviewFile};
@@ -1,3 +1,3 @@
1
- import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-HCDG7EUR.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
1
+ import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-DEJIH3ZQ.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
2
2
  return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
3
3
  /* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
@@ -1,4 +1,4 @@
1
- import{useShellStrings as e,useShellLocale as a}from"./chunk-HCDG7EUR.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),j=`h${N}`,k=p??x;/* @__PURE__ */
1
+ import{useShellStrings as e,useShellLocale as a}from"./chunk-DEJIH3ZQ.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),j=`h${N}`,k=p??x;/* @__PURE__ */
2
2
  return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=k.includes(e.id),i=e.headId??`${I}-${l(e.id)}-head`,d=e.headId?`${e.headId}-body`:`${I}-${l(e.id)}-panel`,t=a||b;/* @__PURE__ */
3
3
  return c("div",{className:e.className?`es-group ${e.className}`:"es-group",children:[
4
4
  /* @__PURE__ */r(j,{className:"es-group-title",children:/* @__PURE__ */c("button",{type:"button",id:i,disabled:e.disabled,"aria-expanded":a,"aria-controls":t?d:void 0,onClick:()=>(e=>{const a=k.includes(e)?k.filter(a=>a!==e):h?[...k,e]:[e];void 0===p&&y(a),m?.(a)})(e.id),className:o[g],children:[null!=e.icon&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:e.icon}),e.title,"number"==typeof e.count&&e.count>0&&
@@ -1 +1 @@
1
- import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-HCDG7EUR.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
1
+ import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-DEJIH3ZQ.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
@@ -0,0 +1,11 @@
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as i}from"./chunk-YMUHIJDJ.js";import{Segmented as a}from"./chunk-HNIIDDLJ.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-CCPUNN4F.js";import{TransferProgress as u}from"./chunk-ROKUEMAK.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-ITEOA45V.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-DEJIH3ZQ.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as N}from"react/jsx-runtime";var j=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:U,hint:$,error:F,required:z,className:I,accept:O="image/*",maxSizeBytes:P,fit:D="cover",height:H,shape:q="rect",placeholder:J,cta:K,acceptHint:S,showFilename:A=!0,allowReplace:B=!0,allowRemove:E=!0,replaceLabel:V,removeLabel:M,busy:W=!1,busyLabel:Y,choosingLabel:_,pickFailedLabel:Q,progress:T,disabled:Z=!1,kind:G,onKindChange:X,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===q,oe=H??(re?96:112),ne=K??te.cta,se=G??(/video/.test(O)&&!/image/.test(O)?"video":"image"),le="string"==typeof M&&M?M:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=W||ce,be=ce&&!W?_??te.choosing:Y??te.uploading,fe=F??(ue?Q??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const Ne=Z||pe,je=!!w&&(t(w,O)||w===ke),we=J??r(O,te),Le=V??(je||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:O,maxSizeBytes:P,acceptHint:S,multiple:!1,disabled:Ne,onAccept:([e])=>Re(e)}),{dragOver:Ue}=Ce,$e=()=>{Ne||(R?ge():Ce.open())},Fe=w?o(w):"",ze=!re&&!je&&!!ie,Ie=Z||!B&&!E?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[B&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>$e(),disabled:pe,className:re?`w-8 shrink-0 ${j}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${j}`,children:[
2
+ /* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
+ /* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),E&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${j}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Oe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",Ue?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
4
+ /* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:Ne,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):je?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:D}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:D,objectPosition:ee||void 0}}),A&&!re&&w&&/* @__PURE__ */x(n,{children:Fe}),Ie,pe&&/* @__PURE__ */x(s,{label:be,progress:T,rounded:re?"rounded-full":"rounded-md"})]}),Pe=/* @__PURE__ */k(N,{children:[
5
+ /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
6
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),S&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:S})]}),De=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>$e(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",Ne?"cursor-not-allowed opacity-60":"cursor-pointer",c(Ne)].join(" "),children:[
7
+ /* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",Ue?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
8
+ /* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:T}):Pe})]}),He=re?De:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>$e(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,className:d(Ue,Ne,c(Ne)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:T}):/* @__PURE__ */k(N,{children:[
9
+ /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),Pe]})});/* @__PURE__ */
10
+ return k(e,{label:U,htmlFor:ve,hint:$,error:fe,required:z,className:I,children:[X&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>X(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne}],block:!0,size:"md",label:"string"==typeof U&&U?U:te.upload})}),w?Oe:He,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
11
+ /* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
@@ -1,8 +1,8 @@
1
- import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-HCDG7EUR.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:M="",tone:E,tooltip:W,split:Y}){const[G,$]=m(!1),[H,J]=m(""),S=d(),T=h(null),B=h(null),F=h(null),I=s(T,G),K=e=>k.find(t=>t.value===e)?.label??e,P=p(()=>{const t=new Set(o),n=[],r=H.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,H]),U=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},Z=e=>{e&&!o.includes(e)?(y([...o,e]),J("")):J("")},z=e=>y(o.filter(t=>t!==e)),A=()=>{const e=H.trim();if(Y&&e)return U(e.split(Y)),void J("");j&&e?Z(e):J("")},O=h(()=>{});O.current=()=>{A(),$(!1)},f(()=>{if(!G)return;const e=e=>{const t=e.target;T.current?.contains(t)||F.current?.contains(t)||(A(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>O.current());return()=>{document.removeEventListener("mousedown",e),t()}});const R=k.length>0;/* @__PURE__ */
2
- return g("div",{ref:T,className:"relative",children:[
3
- /* @__PURE__ */g("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),B.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${M}`}),children:[o.map(e=>{const t=E?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
- /* @__PURE__ */x("span",{className:"truncate",children:K(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":S.select.removeItem?.(K(e))??`${S.select.remove} ${K(e)}`,onClick:()=>z(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
- /* @__PURE__ */x("input",{id:L,ref:B,type:"text",autoComplete:"off",role:"combobox","aria-expanded":G&&R,"aria-invalid":C||void 0,disabled:D,value:H,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(Y){const t=e.split(Y);if(t.length>1)return U(t.slice(0,-1)),void J(t[t.length-1])}J(e)})(e.target.value),$(!0)},onFocus:()=>{!D&&R&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=H.trim(),o=n?P.filter(t=>e(t,n.toLowerCase())):[];1===o.length?Z(o[0].value):A()}else"Backspace"===t.key&&""===H&&o.length>0?z(o[o.length-1]):"Escape"===t.key?($(!1),J(""),B.current?.blur()):"Tab"===t.key&&(A(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),G&&R&&v(
6
- /* @__PURE__ */x("div",{ref:F,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:I?.left,right:I?.right,top:I?.top,bottom:I?.bottom,minWidth:I?.minWidth,maxWidth:I?.maxWidth??a,width:"max-content",visibility:I?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:I?.maxHeight??c},children:0===P.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?S.select.allSelected:S.select.noMatches}):P.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),Z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
1
+ import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-DEJIH3ZQ.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:M="",tone:E,tooltip:W,split:Y}){const[J,$]=m(!1),[G,H]=m(""),I=d(),S=h(null),T=h(null),B=h(null),F=s(S,J),Z=e=>k.find(t=>t.value===e)?.label??e,K=p(()=>{const t=new Set(o),n=[],r=G.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,G]),P=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),H("")):H("")},A=e=>y(o.filter(t=>t!==e)),O=()=>{const e=G.trim();if(Y&&e)return P(e.split(Y)),void H("");j&&e?z(e):H("")},Q=h(()=>{});Q.current=()=>{O(),$(!1)},f(()=>{if(!J)return;const e=e=>{const t=e.target;S.current?.contains(t)||B.current?.contains(t)||(O(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>Q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const U=k.length>0;/* @__PURE__ */
2
+ return g("div",{ref:S,className:"relative",children:[
3
+ /* @__PURE__ */g("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),T.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${M}`}),children:[o.map(e=>{const t=E?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
+ /* @__PURE__ */x("span",{className:"truncate",children:Z(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":I.select.removeItem?.(Z(e))??`${I.select.remove} ${Z(e)}`,onClick:()=>A(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
+ /* @__PURE__ */x("input",{id:L,ref:T,type:"text",autoComplete:"off",role:"combobox","aria-expanded":J&&U,"aria-invalid":C||void 0,disabled:D,value:G,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(Y){const t=e.split(Y);if(t.length>1)return P(t.slice(0,-1)),void H(t[t.length-1])}H(e)})(e.target.value),$(!0)},onFocus:()=>{!D&&U&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=G.trim(),o=n?K.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):O()}else"Backspace"===t.key&&""===G&&o.length>0?A(o[o.length-1]):"Escape"===t.key?($(!1),H(""),T.current?.blur()):"Tab"===t.key&&(O(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),J&&U&&v(
6
+ /* @__PURE__ */x("div",{ref:B,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:F?.left,right:F?.right,top:F?.top,bottom:F?.bottom,minWidth:F?.minWidth,maxWidth:F?.maxWidth??a,width:"max-content",visibility:F?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:F?.maxHeight??c},children:0===K.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?I.select.allSelected:I.select.noMatches}):K.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
7
7
  /* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
8
8
  /* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
@@ -0,0 +1,7 @@
1
+ import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-HY6CBG4M.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-DEJIH3ZQ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const M=n().charts,w=m(),N=y??(e=>h(e,w)),$=j??M.nothingToBreakDown,C=c(null),B=a(C),D=v??B,[F,H]=u(null),{highlighted:Y}=l(),z=e(p,D,d);if(0===z.length)/* @__PURE__ */
2
+ return s("div",{className:b,ref:C,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const A=k??i(0),E=Math.max(...z.map(e=>e.value),1),G=e=>34+e/E*62,I=e=>`color-mix(in oklab, ${A} ${G(e).toFixed(0)}%, ${o.surface})`,Q=e=>G(e)>=55?o.surface:o.label,V=F??Y,Z=F?z.find(e=>e.key===F):void 0;/* @__PURE__ */
3
+ return f("div",{className:`relative ${b??""}`,ref:C,children:[
4
+ /* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${D} ${d}`,role:"img","aria-label":M.treemap(p.length),onMouseLeave:()=>H(null),children:z.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
5
+ return f("g",{opacity:V&&V!==e.key?.55:1,onMouseEnter:()=>H(e.key),children:[
6
+ /* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:I(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:Q(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:Q(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),Z&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:Z.label,rows:[{key:"value",label:M.value,color:I(Z.value),value:N(Z.value)}]})}),
7
+ /* @__PURE__ */s(t,{caption:M.treemap(p.length),head:[M.tableItem,M.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
@@ -1,6 +1,6 @@
1
- import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-RMUOUMV2.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-HCDG7EUR.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:R=""}){const j=l().widths,z=a(),O=m(Math.round(x)||1,1,n),S=e($,O),A=S??[...t[O]??[]],B=[...A,100-p(A)],D=P||M,T=s(null),E=s({onChange:k,shown:A,locked:D,n:O,stored:S});E.current={onChange:k,shown:A,locked:D,n:O,stored:S};const K=t=>{const{onChange:r,shown:n,locked:o,n:i}=E.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},U=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],K(i.slice(0,-1))&&(ne.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=B[e]+B[e+1],i="ArrowRight"===t.key?B[e]+n:"ArrowLeft"===t.key?B[e]-n:"PageUp"===t.key?B[e]+10:"PageDown"===t.key?B[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),U(B,e,i))},I=s(null),[G,L]=c(null),W=()=>{I.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>W,[]);const F=e=>t=>{if(0!==t.button||D)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(I.current={i:e,x:t.clientX,width:r,from:B,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},V=e=>{const t=I.current;if(!t)return;if(0===e.buttons)return void W();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}U(t.from,t.i,t.from[t.i]+r/t.width*100)},X=e=>{const t=I.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),W())},q=(e,t)=>{const{shown:n}=E.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return K(o.slice(0,-1))?o:null},[J,Z]=c(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Z(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Q=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=E.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=B.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Q.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,J]);const le=j.hint(O,r),ae=B.slice(0,-1).map((e,t)=>p(B.slice(0,t+1)));/* @__PURE__ */
2
- return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":O>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
3
- /* @__PURE__ */h("div",{ref:Q,"data-widths-bar":"",className:"relative h-8",children:[
4
- /* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===O&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
- /* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),O>1&&B.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(B.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
- return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>J>0&&J*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(O-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":j.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||q(t,e)},onRevert:e=>((e,t)=>{E.current.locked||null===t||oe(e,t)||q(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:E.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<O-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:j.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":j.divider(t+1,t+2),"aria-valuenow":B[t],"aria-valuemin":r,"aria-valuemax":B[t]+B[t+1]-r,"aria-valuetext":j.dividerValue(t+1,B[t],t+2,B[t+1]),"aria-disabled":D||void 0,onKeyDown:D?void 0:H(t),onPointerDown:F(t),onPointerMove:V,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{I.current&&W()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(D?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(D?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${G===t?"w-1":y}`)})})})})]},t))]}),O>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
1
+ import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-ZDCCYRFF.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-DEJIH3ZQ.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:C,label:k,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:R=""}){const j=l().widths,z=a(),D=m(Math.round(x)||1,1,n),S=e($,D),A=S??[...t[D]??[]],B=[...A,100-p(A)],O=P||M,T=s(null),E=s({onChange:C,shown:A,locked:O,n:D,stored:S});E.current={onChange:C,shown:A,locked:O,n:D,stored:S};const I=t=>{const{onChange:r,shown:n,locked:o,n:i}=E.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},K=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],I(i.slice(0,-1))&&(ne.current=null)},F=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=B[e]+B[e+1],i="ArrowRight"===t.key?B[e]+n:"ArrowLeft"===t.key?B[e]-n:"PageUp"===t.key?B[e]+10:"PageDown"===t.key?B[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),K(B,e,i))},H=s(null),[L,W]=c(null),Z=()=>{H.current=null,W(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>Z,[]);const G=e=>t=>{if(0!==t.button||O)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(H.current={i:e,x:t.clientX,width:r,from:B,moved:!1,pointer:t.pointerId},W(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},J=e=>{const t=H.current;if(!t)return;if(0===e.buttons)return void Z();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}K(t.from,t.i,t.from[t.i]+r/t.width*100)},U=e=>{const t=H.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),Z())},X=(e,t)=>{const{shown:n}=E.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return I(o.slice(0,-1))?o:null},[q,Q]=c(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Q(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const V=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=E.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=B.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(V.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=j.hint(D,r),ae=B.slice(0,-1).map((e,t)=>p(B.slice(0,t+1)));/* @__PURE__ */
2
+ return h("div",{role:"group","aria-label":N?void 0:k,"aria-labelledby":N,"aria-describedby":D>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
3
+ /* @__PURE__ */h("div",{ref:V,"data-widths-bar":"",className:"relative h-8",children:[
4
+ /* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===D&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
+ /* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),D>1&&B.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(B.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
+ return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>q>0&&q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(D-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":j.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||X(t,e)},onRevert:e=>((e,t)=>{E.current.locked||null===t||oe(e,t)||X(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:E.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<D-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:j.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":j.divider(t+1,t+2),"aria-valuenow":B[t],"aria-valuemin":r,"aria-valuemax":B[t]+B[t+1]-r,"aria-valuetext":j.dividerValue(t+1,B[t],t+2,B[t+1]),"aria-disabled":O||void 0,onKeyDown:O?void 0:F(t),onPointerDown:G(t),onPointerMove:J,onPointerUp:U,onPointerCancel:U,onLostPointerCapture:()=>{H.current&&Z()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(O?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(O?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${L===t?"w-1":y}`)})})})})]},t))]}),D>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
@@ -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-Q4BJW37U.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-HCDG7EUR.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-PR6FNBKR.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-DEJIH3ZQ.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 D=/* @__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:D})}:{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: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__ */
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,4 +1,4 @@
1
- import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-HCDG7EUR.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),C=y??M.nothingToBreakDown,[N,w]=u(null),{highlighted:E}=r(),F=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",F),0===F.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:C});const H=Math.max(...F.map(e=>e.depth))+1,I=f/2,L=f/2,R=(f/2-8-b)/H,z=F.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,B=e=>null!==N?e.id===N:null===E||e.branchKey===E,D=N?F.find(e=>e.id===N):void 0,G=e=>c(e.value/z*100,1,$);/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-DEJIH3ZQ.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,C]=u(null),{highlighted:E}=r(),I=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",I),0===I.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const F=Math.max(...I.map(e=>e.depth))+1,H=f/2,L=f/2,Q=(f/2-8-b)/F,z=I.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,B=e=>null!==w?e.id===w:null===E||e.branchKey===E,D=w?I.find(e=>e.id===w):void 0,R=e=>c(e.value/z*100,1,$);/* @__PURE__ */
2
2
  return d("div",{className:`relative ${g??""}`,children:[
3
- /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),H),onMouseLeave:()=>w(null),children:[F.map(e=>/* @__PURE__ */s("path",{d:t(I,L,b+e.depth*R+v/2,b+(e.depth+1)*R-v/2,e.start,e.end),fill:A(e),fillOpacity:B(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),D&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:D.label,rows:[{key:"value",label:M.value,color:A(D),value:j(D.value)},{key:"share",label:M.share,color:a.muted,value:G(D)}]})}),
4
- /* @__PURE__ */s(e,{caption:M.sunburst(j(z),H),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:F.map(e=>[e.depth+1,e.label,j(e.value),G(e)])})]})}export{f as SunburstChart};
3
+ /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),F),onMouseLeave:()=>C(null),children:[I.map(e=>/* @__PURE__ */s("path",{d:t(H,L,b+e.depth*Q+v/2,b+(e.depth+1)*Q-v/2,e.start,e.end),fill:A(e),fillOpacity:B(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:H,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),D&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:D.label,rows:[{key:"value",label:M.value,color:A(D),value:j(D.value)},{key:"share",label:M.share,color:a.muted,value:R(D)}]})}),
4
+ /* @__PURE__ */s(e,{caption:M.sunburst(j(z),F),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:I.map(e=>[e.depth+1,e.label,j(e.value),R(e)])})]})}export{f as SunburstChart};
@@ -1,4 +1,4 @@
1
- import{ChartSkeleton as e}from"./chunk-QT34GMZR.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-HCDG7EUR.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
1
+ import{ChartSkeleton as e}from"./chunk-NLHGFQ54.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-DEJIH3ZQ.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
2
2
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:r}});case"circle-outline":/* @__PURE__ */
3
3
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:r}});case"rounded-square-outline":/* @__PURE__ */
4
4
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:r}});case"square":/* @__PURE__ */
@@ -8,10 +8,10 @@ return n("span",{className:`${a} h-3.5 w-1 rounded-full`,style:{backgroundColor:
8
8
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm`,style:{backgroundColor:r}})}}function d({entries:e,interactive:r,fallbackSwatch:t,onClick:l}){const{highlighted:d,setHighlighted:u}=a();/* @__PURE__ */
9
9
  return n("ul",{className:"m-0 flex flex-wrap items-center gap-x-4 gap-y-1 p-0",children:e.map((e,a)=>{const h=r&&null!==d&&d!==e.key,m=/* @__PURE__ */o(c,{children:[
10
10
  /* @__PURE__ */n(i,{shape:e.swatch??t,colour:s(a,e.color,e.tone)}),e.label]});/* @__PURE__ */
11
- return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:x,className:N}){const w=l().charts;/* @__PURE__ */
12
- return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${N??""}`,"aria-busy":h||m||void 0,children:[
11
+ return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:N,className:x}){const w=l().charts;/* @__PURE__ */
12
+ return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${x??""}`,"aria-busy":h||m||void 0,children:[
13
13
  /* @__PURE__ */o("header",{className:"flex items-start justify-between gap-4",children:[
14
14
  /* @__PURE__ */o("div",{className:"min-w-0",children:[
15
- /* @__PURE__ */n("h3",{className:"text-base font-semibold text-ink-strongest",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:x}),!m&&c&&c.length>1&&/* @__PURE__ */n(d,{entries:c,interactive:g,fallbackSwatch:y,onClick:f}),!m&&i&&/* @__PURE__ */o("details",{className:"border-t border-gray-100 pt-3",children:[
15
+ /* @__PURE__ */n("h3",{className:"text-base font-semibold text-ink-strongest",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:N}),!m&&c&&c.length>1&&/* @__PURE__ */n(d,{entries:c,interactive:g,fallbackSwatch:y,onClick:f}),!m&&i&&/* @__PURE__ */o("details",{className:"border-t border-gray-100 pt-3",children:[
16
16
  /* @__PURE__ */n("summary",{className:"cursor-pointer text-sm font-medium text-gray-600 rosh-focus-outline",children:u??w.showTable}),
17
17
  /* @__PURE__ */n("div",{className:"mt-3 overflow-x-auto",style:{color:t.label},children:i})]})]})})}export{u as ChartFrame};