efficient-shell 9.12.0 → 10.0.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 (337) hide show
  1. package/README.md +26 -20
  2. package/dist/{Browser-G7AXZ4OT.js → Browser-RFLTFP7Y.js} +14 -14
  3. package/dist/Calculator-DV2R65OS.js +29 -0
  4. package/dist/{CurrencyConverter-EDEJOKHC.js → CurrencyConverter-ELSCNMUT.js} +9 -9
  5. package/dist/{Documents-7AVOO2DA.js → Documents-HKTTXLSR.js} +27 -27
  6. package/dist/Files-ZSYGKZOV.js +88 -0
  7. package/dist/{Notepad-KBRNR5BU.js → Notepad-63Q3JSCV.js} +10 -10
  8. package/dist/{PdfViewer-FFQOKKFW.js → PdfViewer-DFBPEUY5.js} +1 -1
  9. package/dist/{PomodoroTimer-HCLT2JVD.js → PomodoroTimer-XHNZGBDR.js} +11 -11
  10. package/dist/{Preview-4SOGNXHL.js → Preview-PLCASIZA.js} +38 -38
  11. package/dist/Sidebar-QFT5WPK4.js +44 -0
  12. package/dist/{Spreadsheet-W2AGKEWT.js → Spreadsheet-Y7TJIBI5.js} +14 -14
  13. package/dist/{Stock-3IBS63UR.js → Stock-KLYWTMMD.js} +3 -3
  14. package/dist/{Weather-EFIIVKFE.js → Weather-CT2IZHEW.js} +20 -20
  15. package/dist/{WorldClock-ERQQ4VWP.js → WorldClock-EJCUVIUW.js} +6 -6
  16. package/dist/ai/index.js +59 -59
  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-25STFYV3.js +8 -0
  47. package/dist/chunk-2NMW66P5.js +1 -0
  48. package/dist/{chunk-BNKULSCG.js → chunk-2OE5VVBE.js} +1 -1
  49. package/dist/{chunk-VZV7Q5V2.js → chunk-3AZBI76O.js} +1 -1
  50. package/dist/{chunk-NRGBXEBU.js → chunk-43T5JGFB.js} +1 -1
  51. package/dist/{chunk-QLYOGT3U.js → chunk-4E4GWE4L.js} +17 -17
  52. package/dist/{chunk-E6EUGQGA.js → chunk-4WZRNPIG.js} +1 -1
  53. package/dist/{chunk-5CVQN2BR.js → chunk-53KQSCMG.js} +7 -7
  54. package/dist/chunk-5CH2RGL6.js +29 -0
  55. package/dist/{chunk-65DYHG73.js → chunk-5VTRKWKO.js} +1 -1
  56. package/dist/{chunk-7WLFHDWA.js → chunk-66JYKX4T.js} +1 -1
  57. package/dist/{chunk-ERLZDA75.js → chunk-6I6VSUKY.js} +4 -4
  58. package/dist/{chunk-M5MAIJQQ.js → chunk-6L2UAAGT.js} +1 -1
  59. package/dist/{chunk-HRAK46H7.js → chunk-6YQPLI5M.js} +12 -12
  60. package/dist/{chunk-D4KZOYXQ.js → chunk-7BDZZANS.js} +1 -1
  61. package/dist/{chunk-CJI3POCE.js → chunk-7KDGW6BR.js} +1 -1
  62. package/dist/{chunk-QCFN3ET4.js → chunk-7VCAMNCH.js} +1 -1
  63. package/dist/chunk-7YU27U3Y.js +19 -0
  64. package/dist/chunk-AEJNFA2K.js +6 -0
  65. package/dist/{chunk-CBMXYXBH.js → chunk-AG2OLB3E.js} +9 -9
  66. package/dist/{chunk-KJHXCVNI.js → chunk-AJ3R5QPD.js} +5 -5
  67. package/dist/{chunk-ZPW3KQ27.js → chunk-APXQMZSV.js} +28 -28
  68. package/dist/{chunk-WZQCRTXF.js → chunk-B7AHMB3U.js} +1 -1
  69. package/dist/{chunk-B74Y4QR2.js → chunk-B7KD3DGY.js} +1 -1
  70. package/dist/{chunk-TQH6E5V2.js → chunk-BDAKGS7O.js} +1 -1
  71. package/dist/{chunk-AOSLOKAL.js → chunk-BFVL2VTS.js} +1 -1
  72. package/dist/{chunk-MCMUJDEP.js → chunk-BMQCUHSD.js} +1 -1
  73. package/dist/{chunk-SAHQB2JD.js → chunk-BXEKX4TB.js} +17 -17
  74. package/dist/{chunk-JECMVR4S.js → chunk-C6MV6IAX.js} +8 -8
  75. package/dist/{chunk-5RAOFJYT.js → chunk-CBGKLHPB.js} +6 -6
  76. package/dist/{chunk-KTRNAMHY.js → chunk-CL7SBEBQ.js} +1 -1
  77. package/dist/{chunk-O4NPQ23Q.js → chunk-D2WGDTWN.js} +1 -1
  78. package/dist/{chunk-E72USUUR.js → chunk-D7X2HMMA.js} +9 -9
  79. package/dist/{chunk-GP5UNEKY.js → chunk-DKQWFQAV.js} +1 -1
  80. package/dist/{chunk-IBIUI2D3.js → chunk-DL6QIWVR.js} +1 -1
  81. package/dist/{chunk-7JJUI52C.js → chunk-DPDRFLBY.js} +3 -3
  82. package/dist/{chunk-IK332TWA.js → chunk-DVOQCAC2.js} +1 -1
  83. package/dist/{chunk-H2XCQJRG.js → chunk-DXHLUB36.js} +1 -1
  84. package/dist/{chunk-YBU7NOD7.js → chunk-E7WY4GZ3.js} +1 -1
  85. package/dist/{chunk-HMG5TW2R.js → chunk-ED3QFXBC.js} +1 -1
  86. package/dist/{chunk-O25B75XX.js → chunk-EGAV5LSX.js} +1 -1
  87. package/dist/{chunk-RLLONZJJ.js → chunk-EGEWU776.js} +1 -1
  88. package/dist/{chunk-46YVA2BF.js → chunk-ELUTQZGP.js} +1 -1
  89. package/dist/{chunk-BJONHLET.js → chunk-EQN65XOO.js} +1 -1
  90. package/dist/{chunk-EWJELWIT.js → chunk-F24QTMTY.js} +3 -3
  91. package/dist/{chunk-HAFB45DT.js → chunk-FPGRKHUW.js} +7 -7
  92. package/dist/{chunk-VBNA237H.js → chunk-FRINAJU7.js} +1 -1
  93. package/dist/{chunk-QSUQC4AN.js → chunk-FTWWJHFX.js} +1 -1
  94. package/dist/chunk-GBLMVFDW.js +5 -0
  95. package/dist/{chunk-KAHYUBXM.js → chunk-GKK7DR2H.js} +8 -8
  96. package/dist/{chunk-NGQHXTUK.js → chunk-GKZUAT3K.js} +1 -1
  97. package/dist/{chunk-DRNB7KDC.js → chunk-GMRZX2ET.js} +1 -1
  98. package/dist/{chunk-UEIJSV45.js → chunk-GNU3U2TP.js} +1 -1
  99. package/dist/{chunk-FKA6ZVQO.js → chunk-GQK3U2IO.js} +9 -9
  100. package/dist/{chunk-YQB5OYDC.js → chunk-GQMS5657.js} +1 -1
  101. package/dist/{chunk-UL4G6JY2.js → chunk-GRBBQ3VF.js} +1 -1
  102. package/dist/chunk-GY67Y5SN.js +10 -0
  103. package/dist/{chunk-6O2W4X2V.js → chunk-HI6IE5HI.js} +1 -1
  104. package/dist/chunk-HJPCHES5.js +8 -0
  105. package/dist/{chunk-27W6BXT6.js → chunk-HKAQXFUR.js} +2 -2
  106. package/dist/chunk-IEAFSVXC.js +1 -0
  107. package/dist/{chunk-ZC3CCRPG.js → chunk-IGEFUHYE.js} +5 -5
  108. package/dist/{chunk-NU2YQSOP.js → chunk-IQWIYZB5.js} +2 -2
  109. package/dist/{chunk-FVDX6ZSZ.js → chunk-IU5KBQEQ.js} +6 -6
  110. package/dist/{chunk-2GPHHW7C.js → chunk-IWEL2ZCV.js} +1 -1
  111. package/dist/{chunk-P65C5TUU.js → chunk-IWJRSC7M.js} +1 -1
  112. package/dist/{chunk-KECOZKJU.js → chunk-J53OQCKC.js} +7 -7
  113. package/dist/{chunk-BF7PZFKT.js → chunk-JB3WKDD7.js} +1 -1
  114. package/dist/{chunk-5ZGL2BRZ.js → chunk-JHZV4TN6.js} +2 -2
  115. package/dist/{chunk-IENPHB5B.js → chunk-JJP54OT4.js} +1 -1
  116. package/dist/{chunk-MUHWI4GK.js → chunk-JKZJVQIB.js} +5 -5
  117. package/dist/chunk-KAVFW5CU.js +7 -0
  118. package/dist/{chunk-VANJPZ3H.js → chunk-KCV7BFKJ.js} +1 -1
  119. package/dist/chunk-KE5U4KKG.js +4 -0
  120. package/dist/chunk-LKW3YAZN.js +11 -0
  121. package/dist/chunk-LPUGK2MC.js +2 -0
  122. package/dist/chunk-LR77AS3N.js +15 -0
  123. package/dist/{chunk-BWIX3YIH.js → chunk-M3R4C3A6.js} +2 -2
  124. package/dist/chunk-MKEYXKZA.js +4 -0
  125. package/dist/{chunk-AG63JVX7.js → chunk-MPALY3CL.js} +5 -5
  126. package/dist/{chunk-64R3IYAM.js → chunk-MVQMAIZM.js} +1 -1
  127. package/dist/{chunk-5Q3PFKB5.js → chunk-MZ26SYFY.js} +1 -1
  128. package/dist/{chunk-BYHKYYL6.js → chunk-NDEIZUMG.js} +1 -1
  129. package/dist/{chunk-2LDOLQ7F.js → chunk-NDKQDIWN.js} +5 -5
  130. package/dist/chunk-O33CUGOI.js +6 -0
  131. package/dist/{chunk-4XZXY2AF.js → chunk-OQW42DOR.js} +1 -1
  132. package/dist/{chunk-3FBYM6O5.js → chunk-OUKDGO4N.js} +8 -8
  133. package/dist/{chunk-LYX55RI3.js → chunk-P6LB3I3D.js} +1 -1
  134. package/dist/chunk-PA37I5ZX.js +3 -0
  135. package/dist/{chunk-TBLN4MDQ.js → chunk-PKIDVVAE.js} +2 -2
  136. package/dist/chunk-POCQ7ZL4.js +3 -0
  137. package/dist/{chunk-YWR2WRDR.js → chunk-PUCPFBYO.js} +1 -1
  138. package/dist/{chunk-5AWV5R6E.js → chunk-PUIQFTCO.js} +6 -6
  139. package/dist/chunk-PVR4KU7H.js +7 -0
  140. package/dist/{chunk-PWBLGKQ3.js → chunk-Q3MNSM7W.js} +4 -4
  141. package/dist/chunk-QMUAY24U.js +8 -0
  142. package/dist/{chunk-5XNN2SSR.js → chunk-QRJRGP2K.js} +8 -8
  143. package/dist/{chunk-6TRE326A.js → chunk-QSW3YHPK.js} +4 -4
  144. package/dist/{chunk-RISKWWMD.js → chunk-QTQQKQGQ.js} +3 -3
  145. package/dist/{chunk-T76X2SHR.js → chunk-R2QDO7NY.js} +3 -3
  146. package/dist/{chunk-JQDRM6UK.js → chunk-R5EJJ6HC.js} +1 -1
  147. package/dist/{chunk-V5QEPNPK.js → chunk-RBIGSJ2J.js} +1 -1
  148. package/dist/chunk-RBXSU25O.js +9 -0
  149. package/dist/{chunk-N52D37FS.js → chunk-RPMWF42S.js} +5 -5
  150. package/dist/{chunk-QMYQ4B5A.js → chunk-RQNZ2PVW.js} +4 -4
  151. package/dist/{chunk-TRUPMMDJ.js → chunk-RYS3URDC.js} +11 -11
  152. package/dist/{chunk-3MHBALGV.js → chunk-SGTZJMZ6.js} +1 -1
  153. package/dist/chunk-SKETTGCJ.js +2 -0
  154. package/dist/{chunk-EOWOVR55.js → chunk-SWO4VPOB.js} +1 -1
  155. package/dist/{chunk-R6R57BWQ.js → chunk-T5V2GJ4D.js} +4 -4
  156. package/dist/{chunk-T7O2TNNX.js → chunk-TXMAWCR7.js} +1 -1
  157. package/dist/{chunk-NCRLKFXD.js → chunk-U5DMF2TX.js} +1 -1
  158. package/dist/{chunk-T2ITXX7R.js → chunk-UB5TLWZN.js} +7 -7
  159. package/dist/{chunk-2J2OU65F.js → chunk-UFXE363L.js} +2 -2
  160. package/dist/chunk-UTQG344L.js +15 -0
  161. package/dist/{chunk-GVAWCTJN.js → chunk-UZ43AT4O.js} +7 -7
  162. package/dist/{chunk-H4YFANH5.js → chunk-VC42SDAC.js} +1 -1
  163. package/dist/{chunk-5Y6LGPZI.js → chunk-VG5NGCMQ.js} +7 -7
  164. package/dist/{chunk-I5XVZLDH.js → chunk-VO3ZB7C6.js} +7 -7
  165. package/dist/{chunk-KQSUSVMF.js → chunk-VSAI5TH7.js} +21 -21
  166. package/dist/{chunk-D7JY2KHG.js → chunk-W244OMOU.js} +6 -6
  167. package/dist/{chunk-NBKQADMY.js → chunk-WFANOFHG.js} +5 -5
  168. package/dist/{chunk-IZQ3XTD2.js → chunk-WUMHSI4U.js} +1 -1
  169. package/dist/chunk-X2PZMXDP.js +1 -0
  170. package/dist/{chunk-X4BKHXU5.js → chunk-X6TJR6M2.js} +7 -7
  171. package/dist/{chunk-R7JTTKG2.js → chunk-XILZGSMX.js} +3 -3
  172. package/dist/chunk-XOKANFQD.js +22 -0
  173. package/dist/{chunk-JWX7QRGE.js → chunk-XS4HFUTW.js} +1 -1
  174. package/dist/{chunk-7YZJLFAK.js → chunk-XSJJPACH.js} +10 -10
  175. package/dist/{chunk-XI45TSEK.js → chunk-YFUMK2E7.js} +1 -1
  176. package/dist/{chunk-JVYSRH6U.js → chunk-YJSX6JAC.js} +1 -1
  177. package/dist/{chunk-2SJDTKQA.js → chunk-YL6LLHJA.js} +21 -21
  178. package/dist/{chunk-N3CTLEJS.js → chunk-YVTKTWZX.js} +6 -6
  179. package/dist/{chunk-6FI3HVUR.js → chunk-ZBTDMQUI.js} +54 -54
  180. package/dist/{chunk-QLOKT22X.js → chunk-ZCV377AG.js} +1 -1
  181. package/dist/{chunk-UZGVIHFI.js → chunk-ZF545DXX.js} +15 -15
  182. package/dist/{chunk-FEPBXJUR.js → chunk-ZG2HMC7S.js} +1 -1
  183. package/dist/{chunk-G6LOKIFC.js → chunk-ZMVCN4OA.js} +9 -9
  184. package/dist/{chunk-CB6ROWOC.js → chunk-ZOBLEXIU.js} +1 -1
  185. package/dist/{chunk-O426Q7KC.js → chunk-ZPCADTM5.js} +1 -1
  186. package/dist/{chunk-5VYBPDZ2.js → chunk-ZREDCRTL.js} +1 -1
  187. package/dist/data/DataTable.js +1 -1
  188. package/dist/data/Kanban.js +1 -1
  189. package/dist/data/ListFooter.js +1 -1
  190. package/dist/data/ListLoadError.js +1 -1
  191. package/dist/data/Pagination.js +1 -1
  192. package/dist/file-intake/index.js +1 -1
  193. package/dist/format/index.js +1 -1
  194. package/dist/forms/BorderInput.js +1 -1
  195. package/dist/forms/BrandAssetEditor.js +1 -1
  196. package/dist/forms/Calendar.js +1 -1
  197. package/dist/forms/ColorPicker.js +1 -1
  198. package/dist/forms/ComposerAttachments.js +1 -1
  199. package/dist/forms/CornersInput.js +1 -1
  200. package/dist/forms/DatePicker.js +1 -1
  201. package/dist/forms/DateRangePicker.js +1 -1
  202. package/dist/forms/DateTimePicker.js +1 -1
  203. package/dist/forms/DisplayChips.js +1 -1
  204. package/dist/forms/FilePicker.js +1 -1
  205. package/dist/forms/FormErrorSummary.js +1 -1
  206. package/dist/forms/IconPicker.js +1 -1
  207. package/dist/forms/ImageFocusPoint.js +1 -1
  208. package/dist/forms/InputNumber.js +1 -1
  209. package/dist/forms/LinkPicker.js +1 -1
  210. package/dist/forms/MediaLibrary.js +1 -1
  211. package/dist/forms/MediaUploadField.js +1 -1
  212. package/dist/forms/MediaUploadGrid.js +1 -1
  213. package/dist/forms/MediaUsedInList.js +1 -1
  214. package/dist/forms/NumericKeypad.js +1 -1
  215. package/dist/forms/PositionInput.js +1 -1
  216. package/dist/forms/Select.d.ts +0 -6
  217. package/dist/forms/Select.js +1 -1
  218. package/dist/forms/SidesInput.js +1 -1
  219. package/dist/forms/Slider.js +1 -1
  220. package/dist/forms/Snippet.js +1 -1
  221. package/dist/forms/SplitButton.js +1 -1
  222. package/dist/forms/Switch.js +1 -1
  223. package/dist/forms/TagInput.js +1 -1
  224. package/dist/forms/TextToolbar.d.ts +8 -2
  225. package/dist/forms/TextToolbar.js +1 -1
  226. package/dist/forms/TimePicker.js +1 -1
  227. package/dist/forms/WidthsBar.js +1 -1
  228. package/dist/forms/mediaLibraryMenu.js +1 -1
  229. package/dist/forms/mediaMoveItems.js +1 -1
  230. package/dist/forms/settingRowContext.d.ts +1 -3
  231. package/dist/forms/settingRowContext.js +1 -1
  232. package/dist/forms/textAlign.js +1 -1
  233. package/dist/forms/useFileIntake.js +1 -1
  234. package/dist/hooks/useTheme.d.ts +1 -1
  235. package/dist/icons/index.js +1 -1
  236. package/dist/index.d.ts +11 -3
  237. package/dist/index.js +151 -151
  238. package/dist/locales/zh-Hans.js +1 -1
  239. package/dist/map/index.js +7 -7
  240. package/dist/page-tabs/index.js +5 -5
  241. package/dist/pdf/index.js +1 -1
  242. package/dist/shell/Accordion.d.ts +22 -12
  243. package/dist/shell/Accordion.js +1 -1
  244. package/dist/shell/AppUpdateBanner.js +1 -1
  245. package/dist/shell/Avatar.js +1 -1
  246. package/dist/shell/Banner.js +1 -1
  247. package/dist/shell/Breadcrumbs.js +1 -1
  248. package/dist/shell/BudgetBar.js +1 -1
  249. package/dist/shell/Card.js +1 -1
  250. package/dist/shell/ColoredBadge.js +1 -1
  251. package/dist/shell/ConfirmDialog.js +1 -1
  252. package/dist/shell/ContainerFillChart.js +1 -1
  253. package/dist/shell/ContextMenu.js +1 -1
  254. package/dist/shell/CountBadge.js +1 -1
  255. package/dist/shell/Dialog.js +1 -1
  256. package/dist/shell/Drawer.js +1 -1
  257. package/dist/shell/DropdownMenu.js +1 -1
  258. package/dist/shell/EditableGrid.js +1 -1
  259. package/dist/shell/EmptyState.js +1 -1
  260. package/dist/shell/GlobalSearch.js +1 -1
  261. package/dist/shell/HelpCenter.js +1 -1
  262. package/dist/shell/IconRail.js +1 -1
  263. package/dist/shell/ImageLightbox.js +1 -1
  264. package/dist/shell/ItemCount.js +1 -1
  265. package/dist/shell/LanguageSelect.js +1 -1
  266. package/dist/shell/Markdown.js +1 -1
  267. package/dist/shell/MetricBar.js +1 -1
  268. package/dist/shell/MetricBarLegend.js +1 -1
  269. package/dist/shell/MilestoneTimeline.js +1 -1
  270. package/dist/shell/PageHeader.js +1 -1
  271. package/dist/shell/PopupMenu.js +1 -1
  272. package/dist/shell/ProductionTimeline.js +1 -1
  273. package/dist/shell/ResizeHandle.js +1 -1
  274. package/dist/shell/Result.js +1 -1
  275. package/dist/shell/SearchableSelect.js +1 -1
  276. package/dist/shell/SettingReset.d.ts +23 -5
  277. package/dist/shell/SettingReset.js +1 -1
  278. package/dist/shell/SettingRow.d.ts +9 -14
  279. package/dist/shell/SettingRow.js +1 -1
  280. package/dist/shell/SidebarLayout.js +1 -1
  281. package/dist/shell/SidebarNav.js +1 -1
  282. package/dist/shell/SortableList.js +1 -1
  283. package/dist/shell/Statistic.js +1 -1
  284. package/dist/shell/TimeAgo.js +1 -1
  285. package/dist/shell/TimelineTrack.js +1 -1
  286. package/dist/shell/TopNav.js +1 -1
  287. package/dist/shell/TransferProgress.js +1 -1
  288. package/dist/shell/Tree.js +1 -1
  289. package/dist/shell/language.js +1 -1
  290. package/dist/shell/strings.d.ts +2 -0
  291. package/dist/shell/strings.js +1 -1
  292. package/dist/shell/toast.js +1 -1
  293. package/dist/telemetry/index.js +1 -1
  294. package/dist/templates/AuthScreen.js +1 -1
  295. package/dist/templates/ChatTemplate.js +1 -1
  296. package/dist/templates/CheckoutTemplate.js +1 -1
  297. package/dist/templates/DashboardTemplate.js +1 -1
  298. package/dist/templates/DataTablePage.js +1 -1
  299. package/dist/templates/EmailTemplate.js +1 -1
  300. package/dist/templates/ErrorBoundary.d.ts +1 -1
  301. package/dist/templates/ErrorBoundary.js +1 -1
  302. package/dist/templates/ErrorPage.js +1 -1
  303. package/dist/templates/FormLayoutPage.js +1 -1
  304. package/dist/templates/GalleryTemplate.js +1 -1
  305. package/dist/ui/index.d.ts +1 -1
  306. package/dist/ui/index.js +1 -1
  307. package/dist/ui.css +247 -32
  308. package/dist/version.js +1 -1
  309. package/package.json +1 -1
  310. package/dist/Calculator-6NA35GFS.js +0 -29
  311. package/dist/Files-MT6PMAHO.js +0 -88
  312. package/dist/Sidebar-LIP2DYTO.js +0 -44
  313. package/dist/chunk-2AHLONPR.js +0 -5
  314. package/dist/chunk-3XRBVYTO.js +0 -2
  315. package/dist/chunk-4CPE5NBC.js +0 -8
  316. package/dist/chunk-4DBPKTVX.js +0 -20
  317. package/dist/chunk-4GPUKEYQ.js +0 -1
  318. package/dist/chunk-5R6RNUDB.js +0 -7
  319. package/dist/chunk-7BYBGPWU.js +0 -9
  320. package/dist/chunk-AVAYZK3Z.js +0 -3
  321. package/dist/chunk-GCB5S2OI.js +0 -8
  322. package/dist/chunk-GVH3NG6G.js +0 -22
  323. package/dist/chunk-J7OKOVSL.js +0 -11
  324. package/dist/chunk-JENEVLJU.js +0 -3
  325. package/dist/chunk-JGDLTIOX.js +0 -14
  326. package/dist/chunk-L65BESIE.js +0 -1
  327. package/dist/chunk-LFPJ263N.js +0 -6
  328. package/dist/chunk-O56CY36U.js +0 -5
  329. package/dist/chunk-OVDHEMLK.js +0 -6
  330. package/dist/chunk-PEM7UXQ3.js +0 -1
  331. package/dist/chunk-QYJQAY6C.js +0 -2
  332. package/dist/chunk-RSHNWBW2.js +0 -4
  333. package/dist/chunk-SC6HJBQA.js +0 -8
  334. package/dist/chunk-SGR4V5YI.js +0 -12
  335. package/dist/chunk-SYH7EPLF.js +0 -29
  336. package/dist/chunk-VVZE27M4.js +0 -7
  337. package/dist/chunk-Z3CYLDHB.js +0 -16
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-ZTV2BA3P.js";import{ResizeHandle as o}from"./chunk-V5QEPNPK.js";import{openGlobalSearch as s}from"./chunk-MUHWI4GK.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-RUTUVS4H.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as y,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as w,sectionIcons as C}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as z,PopupMenuLabel as W}from"./chunk-HAFB45DT.js";import"./chunk-5QFPTDQF.js";import"./chunk-URHGHXDN.js";import"./chunk-UQYNPYF4.js";import{Icon as $}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-HL6JSDN3.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as A}from"./chunk-PEM7UXQ3.js";import"./chunk-C3QOHMR6.js";import{useMemo as H,useState as I,useRef as R,useEffect as T,isValidElement as M,cloneElement as D}from"react";import{jsx as K,jsxs as P,Fragment as U}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function Q(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var J=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),F="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function V({open:e,children:t}){const r=R(null);return T(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */K("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */K("div",{className:"min-h-0 overflow-hidden",children:t})})}function G({open:e}){/* @__PURE__ */
2
- return K($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function _({dir:e}){/* @__PURE__ */
3
- return K($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function O({className:e}){/* @__PURE__ */
4
- return K($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var X=e=>.75+1.75*e+"rem";function E({width:E,collapsed:Y,onToggleCollapsed:Z,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=w,sectionIcons:me=C,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ye=A().layout,{hasAnyPerm:ke}=e(),ve=H(()=>c(ce,he,ke),[ce,he,ke]),[Ne,je]=I(()=>t(r(n))),we=H(()=>[...ve.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ke]),Ce=(e,t=we)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=I(null),[ze,We]=I(!1),$e=R(null);T(()=>{Y||Le(null)},[Y]);const Ae=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},He=(e,t)=>{const r=t[e];/* @__PURE__ */
5
- return K("span",{className:F,"aria-hidden":"true",children:r&&M(r)?D(r,{className:"size-[18px]"}):r})},Ie=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),Re=(e,t,r=we)=>{const n=d(e,ke),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ke);/* @__PURE__ */
6
- return P("div",{children:[
7
- /* @__PURE__ */P("button",{type:"button",onClick:()=>Ce(i,r),"aria-expanded":l,className:J(o,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&He(e.to,de),
8
- /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a}),
9
- /* @__PURE__ */K(G,{open:l})]}),
10
- /* @__PURE__ */K(V,{open:l,children:/* @__PURE__ */K("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Re(e,t+1,Ie(n)))})}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
11
- return P("div",{children:[
12
- /* @__PURE__ */P("button",{type:"button",onClick:t=>Ae(e,t),onAuxClick:t=>{1===t.button&&Ae(e,t)},"aria-current":i?"page":void 0,className:J(i,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&He(e.to,de),
13
- /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)},Te=(e,t)=>{const r=t?e.items:h(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */K("span",{className:F,"aria-hidden":"true",children:e.icon}):He(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ke),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
14
- return P("div",{children:[
15
- /* @__PURE__ */K("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:J(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
16
- return P("div",{children:[
17
- /* @__PURE__ */P("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:J(!o&&i,!1),children:[n,
18
- /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a}),
19
- /* @__PURE__ */K(G,{open:o})]}),
20
- /* @__PURE__ */K(V,{open:o,children:/* @__PURE__ */K("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>Re(e,1,Ie(r)))})}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Me=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",De=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Ke=ne?.avatar_url?/* @__PURE__ */K("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */K("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:De}),Pe=ze?$e.current?.getBoundingClientRect():void 0,Ue=Y?"":"px-3",Be=Y?{paddingInline:k}:void 0,Qe=`${Y?ye.expandSidebar:ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,Je=ee?{run:ee,label:ye.goHome,title:ye.goHome}:se?null:{run:Z,label:Y?ye.expandSidebar:ye.collapseSidebar,title:Qe},Fe=/* @__PURE__ */P(U,{children:[pe&&/* @__PURE__ */K(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!Y&&/* @__PURE__ */P("span",{className:"min-w-0 text-left leading-tight",children:[
21
- /* @__PURE__ */K("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */K("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Ve=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
22
- return P("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:E},children:[
23
- /* @__PURE__ */P("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:y},children:[Je?/* @__PURE__ */K("button",{type:"button",onClick:Je.run,"aria-label":Je.label,title:Je.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Fe}):/* @__PURE__ */K("span",{className:"flex min-w-0 items-center gap-2",children:Fe}),se?/* @__PURE__ */K(b,{onClick:se,"aria-label":ye.closeMenu,children:/* @__PURE__ */K($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */K("button",{type:"button",onClick:Z,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */K(_,{dir:"left"})})]}),
24
- /* @__PURE__ */K("div",{className:`shrink-0 pt-3 ${Ue}`,style:Be,children:Y?/* @__PURE__ */K("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${B?"⌘K":"Ctrl K"})`,className:J(!1,!0),children:/* @__PURE__ */K(O,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */P("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */K(O,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ye.search}),
27
- /* @__PURE__ */K("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:B?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */P("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ue} ${Y?"space-y-1":"space-y-0.5"}`,style:Be,children:[Y&&/* @__PURE__ */K("button",{type:"button",onClick:Z,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${J(!1,!0)} mb-3`,children:/* @__PURE__ */K(_,{dir:"right"})}),ve.topItems.map(e=>{if(!Y)return Re(e,0);const t=d(e,ke),r=e.to===re||u(t,re,ke),n=e.menuLabel??e.label;/* @__PURE__ */
29
- return P("div",{children:[
30
- /* @__PURE__ */K("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ae(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:J(r,!0),children:He(e.to,de)}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Ve&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>Te(e,!1)),ve.systemSections.map(e=>Te(e,!1)),ve.virtualSections.map(e=>Te(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Te(e,!1))]}),
31
- /* @__PURE__ */K("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ue}`,style:Be,children:/* @__PURE__ */P("button",{ref:$e,type:"button",onClick:()=>We(e=>!e),"aria-haspopup":"menu","aria-expanded":ze,"aria-label":Y?ye.accountMenu(Me):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[Ke,!Y&&/* @__PURE__ */P("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */K("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Me}),ae?.email&&Me!==ae.email&&/* @__PURE__ */K("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!Y&&!se&&/* @__PURE__ */K(o,{side:"left",width:E,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ye.resizeSidebar}),ze&&Pe&&/* @__PURE__ */P(S,{portal:!0,minWidth:224,onClose:()=>We(!1),style:Q(E,Pe,window.innerHeight),children:[Y&&/* @__PURE__ */P("div",{className:"border-b border-line px-3 py-3",children:[
33
- /* @__PURE__ */K("p",{className:"truncate text-sm font-semibold text-gray-800",children:Me}),ae?.email&&/* @__PURE__ */K("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
34
- /* @__PURE__ */P(L,{onClick:()=>{We(!1),te("/profile",!1)},children:[
35
- /* @__PURE__ */K($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ve.footerItems.map(e=>/* @__PURE__ */P(L,{onClick:()=>{We(!1),Ae(e)},children:[
36
- /* @__PURE__ */K("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */P(L,{onClick:()=>{We(!1),oe()},children:[
37
- /* @__PURE__ */K($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
38
- /* @__PURE__ */K(z,{}),le&&/* @__PURE__ */P(U,{children:[
39
- /* @__PURE__ */P(L,{onClick:()=>{We(!1),le()},children:[
40
- /* @__PURE__ */K($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
41
- /* @__PURE__ */K(z,{})]}),
42
- /* @__PURE__ */P(L,{danger:!0,onClick:()=>{We(!1),ie()},children:[
43
- /* @__PURE__ */K($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),Se&&Y&&/* @__PURE__ */K(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:E+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ke).map((e,t)=>/* @__PURE__ */P("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */K(z,{}),e.heading&&/* @__PURE__ */K(W,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */P(L,{onClick:()=>Ae(e),children:[He(e.to,de),
44
- /* @__PURE__ */K("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{Q as accountMenuPosition,E as default};
@@ -1,5 +0,0 @@
1
- import{IconButton_default as e}from"./chunk-RUTUVS4H.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{Tooltip as r}from"./chunk-BCDG4N6L.js";import{useShellStrings as o}from"./chunk-PEM7UXQ3.js";import{useId as i}from"react";import{jsxs as n,jsx as a}from"react/jsx-runtime";var s=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function d({label:d,onReset:l,view:c="desktop",detail:b,disabled:m}){const f=o().settingView,u=i(),p="desktop"===c,h=p?f.resetName(d):f.inheritName(d),k=b?f.backTo(b):p?f.backToDefault:f.backToAuto;
2
- /* @__PURE__ */
3
- return n(r,{content:f.tip(h,k),describe:!1,children:[
4
- /* @__PURE__ */a(e,{size:"sm","aria-label":h,"aria-describedby":u,disabled:m,className:"relative before:absolute before:-top-2.5 before:-bottom-2.5 before:-left-1 before:-right-4",onClick:e=>{l(),function(e){const t=e.currentTarget,r=t.closest("[data-setting-reset]")??t;let o=r.parentElement;for(let e=0;o&&e<4;e+=1,o=o.parentElement){const e=[...o.querySelectorAll(s)].find(e=>!r.contains(e)&&!e.closest('[aria-hidden="true"]'));if(e)return void e.focus()}}(e)},children:/* @__PURE__ */a(t,{name:"revert",size:16,"aria-hidden":"true"})}),
5
- /* @__PURE__ */a("span",{id:u,hidden:!0,children:k})]})}export{d as SettingReset};
@@ -1,2 +0,0 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-2SJDTKQA.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-PEM7UXQ3.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],x=[],C=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?x.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const w=i(g??null);let H,K,L=!0;0===j.length?(K=w??M??0,H=K-30*a,L=null!==w||null!==M):(H=j[0].ms,K=w??j[j.length-1].ms,K-H<a&&(K=H+a));const N=j.length>0?Math.max(0,Math.round((K-H)/a)):0,O=u??(N>0?C.duration(N):void 0),A=[j.length>0?C.started(t(j[0].ms,D)):void 0,O,x.length>0?C.reached(j.length,p.length):void 0],E=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),J={};for(const e of j)e.phase&&(J[e.phase]=J[e.phase]||[]).push(e.ms);const Q=Object.entries(J).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),S="rail"===v,T=L&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:S?"spread":"compressed",labels:S?"none":"lanes",items:E,pending:x,phases:Q,startMs:H,endMs:K,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:C.milestones(m)})});/* @__PURE__ */
2
- return h("div",S?{className:"shrink-0","data-timeline-variant":"rail",children:T}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:A,children:T})})}export{m as MilestoneTimeline};
@@ -1,8 +0,0 @@
1
- import{DragBand as e,tooltipBesideBand as t}from"./chunk-QCFN3ET4.js";import{niceAxis as r,niceMax as i,linearScale as n,axisGutter as o,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-PEM7UXQ3.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:b,height:k=220,width:M,bandPadding:w=.24,min:N,max:A,yTickCount:$=4,formatValue:j,yAxisLabel:E,xTickAnchor:P="center",children:U,overlay:R,tooltip:z,onSelect:C,zoom:D,ariaLabel:F,className:L,emptyLabel:S}){const T=c().charts,I=m(),Q=j??(e=>d(e,I)),V=S??T.noData,W=u(null),B=a(W),X=M??B,[Z,H]=f(null),J=g();if(p(()=>{if(null!==Z)return s(e=>"Escape"===e.key&&(H(null),!0))},[Z]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
2
- return x("div",{className:L,ref:W,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const K=b.filter(Number.isFinite),O=K.every(Number.isInteger),q=void 0===N&&void 0===A?r(Math.min(0,...K),Math.max(0,...K),{intervals:$+1,integer:O}):null,G=void 0!==N&&void 0===A?r(N,Math.max(N,...K),{intervals:$+1,integer:O,zero:!1}):null,Y=q?q.lo:N??Math.min(0,...K),_=q?q.hi:G?G.hi:A??i(Math.max(...K,0)),ee=q?q.ticks:G?[Y,...G.ticks.filter(e=>e>Y)]:n([Y,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:o(ee.map(Q),48)+(E?10:0)},re=te.left,ie=Math.max(re+1,X-te.right),ne=te.top,oe=k-te.bottom,le=n([Y,_],{from:oe,to:ne}),ae=l(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(X/84)))),me=Math.max(2,Math.floor((he-6)/6.6)),de=e=>se&&e.length>me?`${e.slice(0,me-1).trimEnd()}…`:e;/* @__PURE__ */
3
- return y("div",{className:`relative ${L??""}`,ref:W,children:[
4
- /* @__PURE__ */y("svg",{width:"100%",height:k,viewBox:`0 0 ${X} ${k}`,role:"img","aria-label":F,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>H(null),onBlur:()=>H(null),onKeyDown:e=>{if(C&&null!==Z&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void C(Z);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;H(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:D?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
5
- /* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:J,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
6
- /* @__PURE__ */x("line",{x1:re,y1:le(Math.max(Y,0)),x2:ie,y2:le(Math.max(Y,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(e)},`t${e}`)),E&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:E}),
7
- /* @__PURE__ */x("g",{clipPath:`url(#${J})`,children:U({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:X,height:k,clipId:J,active:Z})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:X,height:k,clipId:J,active:Z}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===P?ae(t):ae.center(t),y:k-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),D?.drag&&/* @__PURE__ */x(e,{x0:ae.center(D.drag[0])-(ie-re)/v.length/2,x1:ae.center(D.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>H(t),onPointerDown:D?()=>D.press(t):void 0,onPointerEnter:D?()=>D.over(t):void 0,onPointerUp:D?.release,onClick:C?()=>C(t):void 0,style:C?{cursor:"pointer"}:void 0},`h${t}`))]}),z&&null!==Z&&
8
- /* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(Z),ae.bandwidth,X),children:z(Z)})]})}export{v as CartesianPlot};
@@ -1,20 +0,0 @@
1
- import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-5F7HMNCX.js";import{useSettingAuto as d,useInSettingRow as s}from"./chunk-L65BESIE.js";import{inputClasses as c,PLACEHOLDER_INK as u}from"./chunk-AYZY3YNC.js";import{useIsMobile as p}from"./chunk-UGTRSRIW.js";import{optionNoteClass as m}from"./chunk-URHGHXDN.js";import{Icon as v}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as y}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-PEM7UXQ3.js";import{forwardRef as w,useId as N,useState as $,useRef as D,useMemo as S,useCallback as j,useEffect as E,useLayoutEffect as H}from"react";import{createPortal as I}from"react-dom";import{jsxs as T,jsx as C,Fragment as z}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,R=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:p,renderValue:m,valueText:h,readOnly:f,footer:b,changed:g,auto:y,multiple:x,"aria-describedby":w,...$},D){const S=t,j=k(),E=d(),H=y??E,I=N(),O=s(),R=/* @__PURE__ */T("select",{ref:D,value:e,multiple:x||void 0,onChange:e=>S(x?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[w,H?I:void 0].filter(Boolean).join(" ")||void 0,className:c({invalid:i,size:l,auto:H,className:`${O&&!x?"appearance-none ":""}pr-8 ${a}`.trim()}),...$,children:[void 0!==n&&!x&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:n}),
2
- /* @__PURE__ */C(U,{items:r})]}),A=O&&!x?/* @__PURE__ */T("div",{className:"relative",children:[R,
3
- /* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2})]}):R;return H?/* @__PURE__ */T(z,{children:[A,
4
- /* @__PURE__ */C("span",{id:I,hidden:!0,children:j.settingView.auto})]}):A});function U({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
5
- return C(z,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var A=w(function({value:l,onChange:s,options:p,placeholder:w,invalid:R,className:A="",id:B,disabled:F,size:V,touchSize:K,title:M,multiple:P,renderOption:W,renderValue:L,valueText:G,readOnly:X=!1,footer:Y,changed:J=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ne]=$(!1),[ie,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===V,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=m(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=N(),we=`${ke}-listbox`,Ne=B??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,Se=d(),je=q??Se,Ee=`${ke}-auto`,He=[Q,J?De:void 0,je?Ee:void 0].filter(Boolean).join(" ")||void 0,Ie=S(()=>i(p),[p]),Te=P?l:[],Ce=s,ze=b(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Oe="undefined"==typeof window?E:H,Re=`${re}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${p.length}`;Oe(()=>{be(null)},[Re]),Oe(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&be(Math.floor(i))},[re,fe,Re]);const Ue=P?Ie.findIndex(e=>Te.includes(e.value)):Ie.findIndex(e=>e.value===l),Ae=P?Ie.filter(e=>Te.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ue>=0?Ie[Ue].label:void 0,Be=!P&&Ue>=0?Ie[Ue].lang:void 0,Fe=P?Ie.filter(e=>Te.includes(e.value)):Ue>=0?[Ie[Ue]]:[],Ve=L&&Fe.length?L(Fe):void 0,Ke=void 0!==Ve&&G?G(Fe):void 0,Me=j((e=!0)=>{ne(!1),ae(-1),e&&oe.current?.focus()},[]),Pe=j(()=>{F||X||(ae(Ue>=0?Ue:e(Ie)),ne(!0))},[F,X,Ie,Ue]),We=j(e=>{const t=Ie[e];if(t&&!t.disabled){if(P){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),Me()}},[Ie,P,l,Ce,Me]);E(()=>{if(!re)return;return x(e=>!("Escape"!==e.key||!ye.current)&&(Me(),!0),ue)},[re,Me]),E(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Me(!1)};document.addEventListener("pointerdown",e);const t=h(()=>Me(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Me]),E(()=>{!re||ie<0||de.current?.querySelector(`#${CSS.escape($e(ie))}`)?.scrollIntoView({block:"nearest"})},[re,ie]);const Le=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=re?ie:Ue,i=t(Ie,r.buffer,n);i<0||(re?ae(i):P?(ae(i),ne(!0)):We(i))},[re,ie,Ue,Ie,We,P]),Ge=re?a(p,(e,t)=>{const r=(n=e.value,P?Te.includes(n):l===n);var n;const i=t===ie;/* @__PURE__ */
6
- return T("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||W?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>We(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${P?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[P&&/* @__PURE__ */C(o,{selected:r}),W?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:i})}):P?/* @__PURE__ */T("span",{className:"block min-w-0 flex-1",children:[
7
- /* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
8
- /* @__PURE__ */T(z,{children:[
9
- /* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Xe=void 0!==Ve?
10
- /* @__PURE__ */T("span",{className:"relative block min-w-0 truncate",children:[
11
- /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ve}),
12
- /* @__PURE__ */C("span",{lang:void 0===Ke?Be:void 0,className:"sr-only",children:Ke??Ae})]}):/* @__PURE__ */C("span",{lang:Be,className:`block truncate ${void 0===Ae?u:""}`,children:Ae??w??" "}),Ye={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...y()},Je=/* @__PURE__ */C("div",{ref:de,id:we,role:"listbox","aria-labelledby":_??(Z?void 0:Ne),"aria-label":_?void 0:Z,"aria-multiselectable":P||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ye,maxHeight:fe}:Ye,children:Ge}),qe=pe?/* @__PURE__ */T("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ye,children:[Je,
13
- /* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */T("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Me(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,n=t=>{e.preventDefault(),ce.current[t]?.focus()},i=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Me());case"Escape":return e.preventDefault(),e.stopPropagation(),void Me()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */C(v,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
14
- /* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
15
- return T("div",{ref:le,className:"relative",children:[
16
- /* @__PURE__ */C("button",{ref:oe,id:Ne,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?we:void 0,"aria-activedescendant":re&&ie>=0?$e(ie):void 0,"aria-invalid":R||void 0,"aria-describedby":He,"aria-label":Z,"aria-labelledby":_,title:M,disabled:F,"aria-readonly":X||void 0,onClick:()=>re?Me():Pe(),onKeyDown:t=>{if(!F&&!X)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>n(Ie,e,1)):Pe());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>n(Ie,e,-1)):Pe());case"Home":return void(re&&(t.preventDefault(),ae(e(Ie))));case"End":return void(re&&(t.preventDefault(),ae(r(Ie))));case"Enter":return void(re&&(t.preventDefault(),We(ie)));case" ":return t.preventDefault(),void(re?We(ie):Pe());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Me()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Me(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:c({invalid:R,size:V,readOnly:X,auto:je,className:`${X?"":"pr-8 "}text-left ${A}`.trim()}),children:J?
17
- /* @__PURE__ */T("span",{className:"flex min-w-0 items-center gap-1",children:[Xe,
18
- /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Xe}),J&&/* @__PURE__ */C("span",{id:De,hidden:!0,children:ge.select.changed}),je&&/* @__PURE__ */C("span",{id:Ee,hidden:!0,children:ge.settingView.auto}),!X&&/* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2}),
19
- /* @__PURE__ */T("select",{ref:te,value:l,multiple:P||void 0,onChange:e=>Ce(P?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:F,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==w&&!P&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:w}),
20
- /* @__PURE__ */C(U,{items:p})]}),re&&I(qe,document.body)]})}),B=w(function({touchSize:e,...t},r){const n=p(),i=s(),a=e??(i?t.size??"md":"touch");return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */C(R,{ref:r,...t,size:a}):/* @__PURE__ */C(A,{ref:r,...t}):/* @__PURE__ */C(A,{ref:r,...t,size:a})});export{R as NativeSelect,B as Select_default};
@@ -1 +0,0 @@
1
- var r="9.12.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,7 +0,0 @@
1
- import{writeClipboard as e}from"./chunk-H4YFANH5.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{toast_default as t}from"./chunk-4XZXY2AF.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-PEM7UXQ3.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
- return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
- return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:N=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":F,className:T=""}){const[C,H]=i(!1),U=o(null),X=a().copy;c(()=>()=>{U.current&&clearTimeout(U.current)},[]);const A=l(async()=>{await e(n)?(H(!0),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{H(!1),U.current=null},2e3),v?.(n)):t.error(X.failed)},[n,v,X]),{box:B,button:M}=p[g],P=!N;/* @__PURE__ */
4
- return m("div",{id:P?void 0:j,"aria-describedby":P?void 0:F,className:["inline-flex max-w-full items-center rounded-md",u[k],B,T].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
- /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:n,children:y??n}),!N&&/* @__PURE__ */m(d,{children:[
6
- /* @__PURE__ */s(r,{id:j,"aria-label":x?X.copyLabel(x):X.copy,"aria-describedby":F,onClick:A,className:`${M} text-gray-400`,children:/* @__PURE__ */s(C?h:b,{})}),
7
- /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:C?X.copied:""})]})]})}export{y as Snippet};
@@ -1,9 +0,0 @@
1
- import{ImageFocusPoint as e}from"./chunk-6TRE326A.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-D4KZOYXQ.js";import{TransferProgress as u}from"./chunk-BJONHLET.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-LYX55RI3.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{useShellStrings as b}from"./chunk-PEM7UXQ3.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:F,label:C,hint:U,error:P,required:O,className:$,accept:z="image/*",maxSizeBytes:K,fit:X="cover",height:B=112,placeholder:H,cta:I,acceptHint:q,showFilename:D=!0,allowReplace:E=!0,allowRemove:S=!0,replaceLabel:V,removeLabel:Y,busy:A=!1,busyLabel:M,choosingLabel:Q,pickFailedLabel:T,progress:W,disabled:_=!1,kind:J,onKindChange:Z,focus:G,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=I??ie.cta,oe=J??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof Y&&Y?Y:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?Q??ie.choosing:M??ie.uploading,he=P??(se?T??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=_||ue,ke=!!w&&(t(w,z)||w===ve),je=H??o(z,ie),xe=V??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):F?F(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:z,maxSizeBytes:K,acceptHint:q,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Fe=w?r(w):"",Ce=!ke&&!!ee,Ue=_||!E&&!S?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[E&&/* @__PURE__ */k("button",{id:Ce?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
- /* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
- /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),S&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:B},children:[Ce?
4
- /* @__PURE__ */j(e,{value:G??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:X}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:X,objectPosition:G||void 0}}),D&&w&&/* @__PURE__ */j(n,{children:Fe}),Ue,ue&&/* @__PURE__ */j(l,{label:me,progress:W,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:U?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:B},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:W}):/* @__PURE__ */k(x,{children:[
5
- /* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
6
- /* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
7
- /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),q&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:q})]})});/* @__PURE__ */
8
- return k(a,{label:C,htmlFor:be,hint:U,error:he,required:O,className:$,children:[Z&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>Z(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof C&&C?C:ie.upload})}),w?Pe:Oe,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
9
- /* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
@@ -1,3 +0,0 @@
1
- import{DropdownMenu as e}from"./chunk-VVZE27M4.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:N=!1,disabledReason:g,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:F,align:M="end",side:z="bottom",menuMinWidth:L,linkAs:W,block:D=!1,className:I=""},R){const V=N&&(null!=g&&""!==g&&!1!==g)&&!v,$=x&&null!=j&&""!==j&&!1!==j,A=o(),B=/* @__PURE__ */t(i,{ref:R,type:b,variant:f,size:p,loading:v,leftIcon:k,block:D,disabled:N&&!V,"aria-disabled":!!V||void 0,disabledReason:V?g:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),H=D?"relative flex min-w-0 flex-1":"relative inline-flex",O=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
2
- return s("div",{className:[D?"flex w-full":"inline-flex","items-stretch",I].filter(Boolean).join(" "),children:[null==w||""===w||V?B:/* @__PURE__ */t(a,{content:w,className:H,children:B}),
3
- /* @__PURE__ */t(a,{content:$?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":$?A:void 0,items:h,align:M,side:z,minWidth:L,linkAs:W,disabled:x&&!$,"aria-disabled":$,onOpenChange:y,footer:C,footerLabel:F,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:O,strokeWidth:2,"aria-hidden":"true"})})}),$&&/* @__PURE__ */t("span",{id:A,className:"sr-only",children:j})]})});export{c as SplitButton_default};
@@ -1,8 +0,0 @@
1
- import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-PEM7UXQ3.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:U=[4,22],className:L,emptyLabel:S}){const D=m().charts,P=h(),C=z??(e=>f(e,P)),E=N??(e=>f(e,P)),T=S??D.noObservations,W=u(null),F=n(W),O=v??F,Q=p(),[V,X]=d(null);x(()=>{if(null!==V)return c(e=>"Escape"===e.key&&(X(null),!0))},[V]);const B=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),I=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),Z=$||j?I.map(e=>({...e,points:e.points.filter(e=>B(e.x,$)&&B(e.y,j))})).filter(e=>e.points.length>0):I,H=I.reduce((e,t)=>e+t.points.length,0)-Z.reduce((e,t)=>e+t.points.length,0);if(0===Z.length)/* @__PURE__ */
2
- return y("div",{className:L,ref:W,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:T})});const J=Z.flatMap(e=>e.points),K=J.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(J.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(E),_),le=Math.max(ie+1,O-q),re=ee(J.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...J.map(e=>e.size??1))],{from:U[0],to:U[1]}),ne=V?Z[V.s]:void 0,ae=V&&ne?ne.points[V.i]:void 0,se=Z.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
3
- return g("div",{className:`relative ${L??""}`,ref:W,children:[
4
- /* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${O} ${k}`,role:"img","aria-label":D.scatter(Z.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(H>0?`. ${D.outsideRange(H)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>X(null),onBlur:()=>X(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=V?se.findIndex(e=>e.s===V.s&&e.i===V.i):0;X(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
5
- /* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:Q,children:/* @__PURE__ */y("rect",{x:ie-U[1],y:Y-U[1],width:le-ie+2*U[1],height:k-G-Y+2*U[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
6
- /* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
7
- /* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
8
- /* @__PURE__ */y("g",{clipPath:`url(#${Q})`,children:Z.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):U[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>X({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??D.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??D.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:E(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:a.muted,value:f(ae.size,P)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
@@ -1,22 +0,0 @@
1
- import{ChartBrush as t}from"./chunk-QMYQ4B5A.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-MCMUJDEP.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{ChartTooltip as p}from"./chunk-TLRCTNUF.js";import{useDragZoom as g,DragBand as y,ChartZoomSummary as k,tooltipBesideBand as x}from"./chunk-QCFN3ET4.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{usePlotWidth as z}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as A,CHART_INK as C,STATUS_VARS as E}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as V}from"./chunk-TWVUQUUD.js";import{useShellStrings as L,useShellLocale as R}from"./chunk-PEM7UXQ3.js";import{formatPercent as S,formatPlain as T}from"./chunk-C3QOHMR6.js";import{useRef as U,useState as W,useId as D,useEffect as P}from"react";import{jsx as F,jsxs as I}from"react/jsx-runtime";var Q=12,B=16,O=26,Y=52,H=t=>"number"==typeof t&&Number.isFinite(t);function J({series:J,labels:K,height:X=200,stacked:Z=!1,stackMode:G="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=L().charts,zt=R(),At=rt??(t=>T(t,zt)),Ct=ot??At,Et=jt??$t.noData,Vt=U(null),Lt=z(Vt),Rt=Nt??Lt,[St,Tt]=W(null),[Ut,Wt]=W(null),{highlighted:Dt}=u(),Pt=D(),Ft=ut??Ut,It=g(ht&&Ft?Ft[1]-Ft[0]+1:K.length,pt);if(P(()=>{if(null!==St)return V(t=>"Escape"===t.key&&(Tt(null),!0))},[St]),kt)/* @__PURE__ */
2
- return F("div",{className:wt,ref:Vt,children:/* @__PURE__ */F(h,{height:X,width:Nt??Lt})});const Qt=K,Bt=ut??Ut??[0,Math.max(0,Qt.length-1)],[Ot,Yt]=Bt,Ht=t=>It.slice(ht?t.slice(Ot,Yt+1):t),Jt=lt?Ht(lt):void 0,Kt=J.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(H)).map(t=>({...t,data:Ht(t.data),pointTones:t.pointTones?Ht(t.pointTones):void 0})),Xt=t=>(ht?Ot:0)+(It.view?.[0]??0)+t;if(K=Ht(Qt),0===Kt.length||0===K.length)/* @__PURE__ */
3
- return F("div",{className:wt,ref:Vt,children:/* @__PURE__ */F("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:X},children:Et})});const Zt=K.map((t,e)=>Kt.reduce((t,a)=>t+(H(a.data[e])?a.data[e]:0),0)),Gt=(t,e)=>Zt[e]>0?t/Zt[e]:null,qt=[];if(Z){let t=K.map(()=>0);for(const e of Kt)t=t.map((t,a)=>t+(H(e.data[a])?e.data[a]:0)),qt.push("percent"===G?t.map((t,e)=>Gt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!Z&&!_t&&void 0===et&&Kt.some(te)&&Kt.some(t=>!te(t)),ae=gt&&!Z?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Kt.filter(t=>!te(t)):Kt).filter(t=>!re(t)),le=ee?Kt.filter(te).flatMap(t=>t.data.filter(H)):[],ne=Z?(qt.at(-1)??[]).filter(H):oe.flatMap(t=>t.data.filter(H)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:Z&&"percent"===G||_t||void 0!==et?null:b(Z?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=Z&&"percent"===G?1:se?se.hi:et??M(Math.max(...ne,0)),me=Z&&"percent"===G?t=>S(Math.round(100*t),0,zt):At,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),Y),fe=ie?w(ie.right.ticks.map(At),B):B,pe={left:ue,right:Math.max(ue+1,Rt-fe),top:Q,bottom:X-O},ge=j(K.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Kt.filter(re),Me=Math.max(0,...K.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,H(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),ze=t=>e=>{e.preventDefault(),Tt(e=>{const a=(e??0)+t;return Math.min(K.length-1,Math.max(0,a))})},Ae=Math.max(1,Math.ceil(K.length/Math.max(1,Math.floor(Rt/96))));/* @__PURE__ */
4
- return I("div",{className:`relative ${wt??""}`,ref:Vt,children:[
5
- /* @__PURE__ */I("svg",{width:"100%",height:X,viewBox:`0 0 ${Rt} ${X}`,role:"img","aria-label":$t.overIntervals(Kt.map(t=>t.label),K.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Tt(null),onBlur:()=>Tt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==St&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Xt(St));"ArrowRight"===t.key&&ze(1)(t),"ArrowLeft"===t.key&&ze(-1)(t)},children:[
6
- /* @__PURE__ */F("defs",{children:/* @__PURE__ */F("clipPath",{id:Pt,children:/* @__PURE__ */F("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
7
- /* @__PURE__ */F(n,{id:Pt,fills:Kt.map((t,e)=>({color:A(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:Z?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */F("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:C.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
8
- /* @__PURE__ */F("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:C.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */F("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:C.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */F("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:C.label,style:{fontVariantNumeric:"tabular-nums"},children:At(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */F("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:C.label,children:nt}),
9
- /* @__PURE__ */F("g",{clipPath:`url(#${Pt})`,mask:xt&&vt?`url(#${m(Pt)})`:void 0,children:Kt.map((t,e)=>{const n=A(t.slot,t.color,t.tone),m=t.mode??(Z?"area":"line"),h=f(t.key,Dt);if("step"===m){const e=K.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>H(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
10
- return F("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=K.map((a,r)=>{const o=Z?qt[e]?.[r]:t.data[r];return H(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((o,l)=>{const i=t.data[l];if(!H(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Kt[t]?.key)).reduce((t,a)=>t+Math.max(0,H(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
11
- return F("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?E[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((l,c)=>{const d=Z?qt[e]?.[c]:t.data[c];if(!H(d))return null;const m=o(d);/* @__PURE__ */
12
- return F("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=Z&&e>0?K.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
13
- return I("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||Z)&&
14
- /* @__PURE__ */F("path",{d:y,fill:c(Pt,e,t.fillVariant??bt,n),stroke:"none"}),
15
- /* @__PURE__ */F("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??E[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
16
- return I("g",{children:[
17
- /* @__PURE__ */F("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */F("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Kt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=A(t.slot,t.color,t.tone),l=[...t.data].map(H).lastIndexOf(!0),n="all"===r?K.map((t,e)=>e).filter(e=>H(Z?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
18
- return I("g",{children:[n.map(r=>{const n=Z?qt[a]?.[r]:t.data[r];return H(n)?/* @__PURE__ */F(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${K[r]}: ${t.label} ${At(n)}`},r):null}),st&&l>=0&&H(Z?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */F("text",{x:ge.center(l)-10,y:je(t)(Z?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:C.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Z?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),K.map((t,e)=>e%Ae===0?/* @__PURE__ */F("text",{x:ge.center(e),y:X-8,textAnchor:"middle",fontSize:11,fill:C.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==St&&/* @__PURE__ */F("line",{x1:ge.center(St),y1:pe.top,x2:ge.center(St),y2:pe.bottom,stroke:C.axis,strokeWidth:1}),ae&&Me>0&&
19
- /* @__PURE__ */I("g",{pointerEvents:"none","data-column-strip":"true",children:[
20
- /* @__PURE__ */F("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:C.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
21
- /* @__PURE__ */F("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:C.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Me)})]}),It.drag&&/* @__PURE__ */F(y,{x0:ge(It.drag[0]),x1:ge(It.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),K.map((t,e)=>/* @__PURE__ */F("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Tt(e),onPointerDown:()=>It.press(e),onPointerEnter:()=>It.over(e),onPointerUp:It.release,onClick:yt?()=>yt(Xt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),It.view&&/* @__PURE__ */F(k,{from:Jt?.[0]??K[0],to:Jt?.at(-1)??K[K.length-1],count:K.length,total:Z&&"percent"!==G?Ct(Zt.reduce((t,e)=>t+e,0)):ae?Ct(be.reduce((t,e)=>t+e.data.filter(H).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Kt).filter(t=>t.data.some(H)).map(t=>{const e=t.data.filter(H),a=A(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=Z||"column"===t.mode?Ct(r):$t.zoomLevel(Ct(r/e.length),Ct(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:It.clear}),ht&&Qt.length>2&&/* @__PURE__ */F(t,{className:"mt-1",labels:Qt,width:Rt,data:J[0]?.data??[],range:Bt,onRangeChange:t=>{ft?ft(t):Wt(t)}}),null!==St&&
22
- /* @__PURE__ */F("div",{className:"pointer-events-none absolute top-2 z-10",style:x(ge.center(St),ge.bandwidth,Rt),children:/* @__PURE__ */F(p,{title:Jt?.[St]??K[St],rows:Kt.map((t,e)=>({key:t.key,label:t.label,color:A(t.slot,t.color,t.tone),value:H(t.data[St])?Z&&"percent"===G?`${S(100*(Gt(t.data[St],St)??0),1,zt)} · ${Ct(t.data[St])}`:Ct(t.data[St]):void 0})),footnote:Z&&"percent"===G?$t.inBucket(Ct(Zt[St])):void 0})})]})}export{J as TimeSeriesChart};
@@ -1,11 +0,0 @@
1
- import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-PEM7UXQ3.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const U=i().charts,j=a(),C=$??(e=>o(e,j)),z=b??U.intensity,F=w??U.noActivity,R=h(null),D=t(R),L=g??D,S=c(),[T,E]=s(null);if(m(()=>{if(null!==T)return n(e=>"Escape"===e.key&&(E(null),!0))},[T]),0===x.length||0===d.length)/* @__PURE__ */
2
- return f("div",{className:k,ref:R,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:F})});const Q=y??l(0),V=v??Math.max(1,...p.flat().filter(Number.isFinite)),B=96,G=26*x.length,P=M??G+26+26,X=Math.max(2,(Math.max(97,L)-B)/d.length),Z=e=>{const t=V>0?Math.max(0,Math.min(1,e/V)):0;return`color-mix(in oklab, ${Q} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
3
- return u("div",{className:`relative ${k??""}`,ref:R,children:[
4
- /* @__PURE__ */u("svg",{width:"100%",height:P,viewBox:`0 0 ${L} ${P}`,role:"img","aria-label":U.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),E(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
5
- /* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:S,x1:"0",x2:"1",children:[
6
- /* @__PURE__ */f("stop",{offset:"0",stopColor:Z(0)}),
7
- /* @__PURE__ */f("stop",{offset:"1",stopColor:Z(V)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=T&&(T.r!==t||T.c!==r);/* @__PURE__ */
8
- return f("rect",{x:B+r*X+A/2,y:26*t+A/2,width:Math.max(1,X-A),height:26-A,rx:N,fill:Z(n),opacity:i?.55:1,onMouseEnter:()=>E({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-B)/56))))===0?/* @__PURE__ */f("text",{x:B+t*X+X/2,y:G+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
9
- /* @__PURE__ */f("rect",{x:B,y:G+26,width:Math.min(180,Math.max(40,L-B)),height:8,rx:4,fill:`url(#${S})`}),
10
- /* @__PURE__ */f("text",{x:B,y:G+48,fontSize:11,fill:r.label,children:"0"}),
11
- /* @__PURE__ */f("text",{x:B+Math.min(180,Math.max(40,L-B)),y:G+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:C(V)})]}),T&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[T.r]} · ${d[T.c]}`,rows:[{key:"v",label:z,color:Q,value:null==p[T.r]?.[T.c]?void 0:C(p[T.r][T.c])}]})})]})}export{x as HeatmapChart};
@@ -1,3 +0,0 @@
1
- import{useSettingAuto as e,useInSettingRow as t}from"./chunk-L65BESIE.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{IconButton_default as n}from"./chunk-RUTUVS4H.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-PEM7UXQ3.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:r,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":r,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(n,{size:"sm",...b,children:f})}var g=l(function({value:n,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:E,readOnly:N,invalid:j,placeholder:D,size:S,prefix:F,suffix:U,id:B,name:C,className:M="",onBlur:P,onFocus:K,steppers:L,stepFrom:T,snap:W=!1,allowEmpty:I=!0,appearance:O="box",display:V,reportWhileTyping:$=!0,onRevert:Y,"aria-label":z,"aria-labelledby":A,"aria-describedby":Q,auto:R,...X},H){const Z="bare"===O,q=e(),G=R??q,J=c(),_="string"==typeof U&&""!==U.trim()?U.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(X).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(n,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof H?H(e):H&&(H.current=e)},[H]),ce=s(n),ue=s(n);ue.current=n;const se=Boolean(E||N),de=t(),pe=L??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==n&&ie(h(n,x))},[n,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??T??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{Z&&xe(e=>e+1)};p(()=>{Z&&he&&document.activeElement===ae.current&&ae.current?.select()},[Z,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(Y??i)(t),we(),!0})},[he,se,x,i,Y]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(W?Math.max(v(w??1),v(l??0)):void 0);W&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ne=/* @__PURE__ */m("input",{ref:le,id:B,"data-number-input":"",name:C,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&V?V(n):ne,disabled:E,readOnly:N,placeholder:D,step:w,role:"spinbutton","aria-valuenow":n??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==n?D||void 0:`${h(n,x)}${Z&&_?_:""}`,"aria-describedby":[Q,G?J:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":Z?"bare":void 0,...te,autoComplete:Z?"off":void 0,spellCheck:!Z&&void 0,"aria-invalid":j||void 0,"aria-label":z,"aria-labelledby":A,onChange:e=>(e=>{if(N)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!$)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,K?.()},onMouseUp:Z?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ee(),P?.()},className:Z?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",M].filter(Boolean).join(" "):r({invalid:j,size:S,readOnly:N,auto:G,className:[F?"pl-6":"",me?U?"pr-10":"pr-6":pe?U?"pr-24":"pr-16":U?"pr-10":"","text-left tabular-nums",M].filter(Boolean).join(" ")})}),je=G?/* @__PURE__ */m("span",{id:J,hidden:!0,children:re.settingView.auto}):null;if(Z||!F&&!U&&!pe)return je?/* @__PURE__ */f(b,{children:[Ne,je]}):Ne;const De=ee(ne);/* @__PURE__ */
2
- return f("div",{className:"relative","data-number-box":"",children:[F&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-ink-faint",children:F}),Ne,je,U&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:U}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
3
- return f("span",me?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[t,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,t]})})()]})});export{g as InputNumber_default};
@@ -1,14 +0,0 @@
1
- import{CountBadge as e}from"./chunk-5Q3PFKB5.js";import{SettingRowNameContext as t,SettingAutoContext as a,InSettingRowContext as i}from"./chunk-L65BESIE.js";import{isShown as n}from"./chunk-HCP7WOAL.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{useId as l}from"react";import{jsx as r,jsxs as d}from"react/jsx-runtime";var c={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function m({label:m,icon:o,action:p,value:h,readout:u,description:x,children:f,controlId:v,labelId:g,unknownText:N="—",quiet:w=!1,size:y="default",viewState:b,divider:k=!0,showWhen:$,values:j,context:P,className:T=""}){const B=s(),E=l();if(!n($,j,P))return null;const I=c[y],F=void 0!==h||void 0===f&&null==p,L=null==h||""===h,Q=w?"text-gray-500":"text-gray-800",S=L?"text-gray-400":w?"text-gray-500":"text-gray-900",V=null!=u&&!1!==u,W=`${I.text} font-medium ${Q}${"compact"===y?" whitespace-nowrap":""}`,q=g??("compact"===y?E:void 0),z=v?/* @__PURE__ */r("label",{htmlFor:v,id:q,className:W,children:m}):/* @__PURE__ */r("span",{id:q,className:W,children:m}),A="auto"===b?/* @__PURE__ */r("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:B.settingView.auto}):"edited"===b?/* @__PURE__ */d("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
- /* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */r(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */r("span",{className:"sr-only",children:B.settingView.edited})]}):null,C=/* @__PURE__ */r(t.Provider,{value:q,children:/* @__PURE__ */r(a.Provider,{value:"auto"===b,children:L?N:h})}),H=[k?"border-t border-line-subtle first:border-t-0":"",I.pad,T].filter(Boolean).join(" "),K=null!=f&&!1!==f&&/* @__PURE__ */r("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:f});/* @__PURE__ */
4
- return d("div",V?{className:H,"data-setting-row":"compact"===y?y:void 0,children:[
5
- /* @__PURE__ */d("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
6
- /* @__PURE__ */r("div",{"data-setting-name":"compact"===y?"":void 0,className:"flex-1 basis-0",children:/* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${Q}`,children:[null!=o&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),z,A]})}),
7
- /* @__PURE__ */d("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
8
- /* @__PURE__ */r("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${w?"text-ink-faint":"text-ink-strongest"}`,children:u}),("compact"===y||null!=p)&&/* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]})]}),x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==h&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${S}`,children:/* @__PURE__ */r(i.Provider,{value:"compact"===y,children:C})}),K]}:{className:H,"data-setting-row":"compact"===y?y:void 0,children:[
9
- /* @__PURE__ */d("div",{className:"compact"===y?"flex flex-wrap items-center justify-between gap-x-2 gap-y-2":`flex items-center justify-between ${I.gap}`,children:[
10
- /* @__PURE__ */d("div",{"data-setting-name":"compact"===y?"":void 0,className:"compact"===y?"flex-1 basis-0":"min-w-0 flex-1",children:[null!=o?
11
- /* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${Q}`,children:[
12
- /* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),z,A]}):A?/* @__PURE__ */d("div",{className:"flex min-w-0 items-center gap-2",children:[z,A]}):z,x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),"compact"===y?
13
- /* @__PURE__ */d("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[F&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`flex items-center justify-end ${I.text} ${S}`,children:/* @__PURE__ */r(i.Provider,{value:!0,children:C})}),
14
- /* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]}):null!=p?/* @__PURE__ */d("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[F&&/* @__PURE__ */r("div",{className:`${I.text} ${S}`,children:C}),p]}):F&&/* @__PURE__ */r("div",{className:`shrink-0 ${I.text} ${S}`,children:C})]}),K]})}export{m as SettingRow};
@@ -1 +0,0 @@
1
- import{createContext as r,useContext as n}from"react";var t=r(!1);function o(){return n(t)}var u=r(!1);function e(){return n(u)}var i=r(void 0);function a(){return n(i)}export{t as InSettingRowContext,u as SettingAutoContext,i as SettingRowNameContext,o as useInSettingRow,e as useSettingAuto,a as useSettingRowName};
@@ -1,6 +0,0 @@
1
- import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-46YVA2BF.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s}){const i=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),t=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);return{words:i>0,paragraph:t>0,oneRow:i>0&&t>0&&i+1+t<=9,flow:i>0&&t>0&&i+1+t>9&&i<=7,cells:{words:i,paragraph:t}}}function w(e,l){/* @__PURE__ */
2
- return i(n,{content:e,children:l},l.key??void 0)}function g({offered:n,pressed:h,onMark:g,color:f,linkOpen:k=!1,last:v,alignment:N,list:C,letterCase:M,disabled:D=!1,"aria-label":x,windows:y,className:j="",layout:A="grid"}){const B=s().textToolbar,S=m({offered:n,color:f,last:v,alignment:N,list:C,letterCase:M});if(!S.words&&!S.paragraph)return null;const U=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,q=(e,l,r,o)=>n.has(e)?w(l,/* @__PURE__ */i(a,"link"===e?{pressed:k,className:U(k),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":k,"aria-keyshortcuts":o,disabled:D,onMouseDown:c,onClick:()=>g(e),children:r}:{className:U(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:D,onMouseDown:c,onClick:()=>g(e),children:r},e)):null,I=l(B),L=e.map(e=>[e,I[e],r(e)]),R=N?e.filter(e=>N.allow.includes(e)):[],$=N&&R.includes(N.value)?N.value:R[0],T=[["none",B.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",B.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",B.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],F=/* @__PURE__ */t(d,{children:[q("bold",B.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),q("italic",B.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),q("underline",B.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),q("strike",B.strike,/* @__PURE__ */i(o,{name:"strike"})),f?w(B.color,/* @__PURE__ */i(a,{pressed:f.open,className:U(f.open,"rosh-tb-color"),"aria-label":B.color,"aria-haspopup":"dialog","aria-expanded":f.open,disabled:D,style:f.run?{"--rosh-tb-run":f.run}:void 0,onMouseDown:c,onClick:f.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,q("link",B.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),q("sup",B.sup,/* @__PURE__ */i(o,{name:"superscript"})),q("sub",B.sub,/* @__PURE__ */i(o,{name:"subscript"})),q("code",B.code,/* @__PURE__ */i(o,{name:"code"})),u(v)?v:null]}),K=/* @__PURE__ */t(d,{children:[N&&R.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":B.alignment,onKeyDown:e=>p(e,R,e=>N.onChange(e)),children:L.map(([e,l,r])=>N.allow.includes(e)?w(l,/* @__PURE__ */i(a,{role:"radio",pressed:N.value===e,className:U(N.value===e),"aria-checked":N.value===e,"aria-label":l,tabIndex:e===$?0:-1,disabled:D||N.disabled,onMouseDown:c,onClick:()=>N.onChange(e),children:r},e)):null)}):null,C&&n.has("bullet")?w(B.bullet,/* @__PURE__ */i(a,{className:U("bullet"===C.pressed),"aria-label":B.bullet,"aria-pressed":"bullet"===C.pressed,disabled:D,onMouseDown:c,onClick:()=>C.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,C&&n.has("number")?w(B.number,/* @__PURE__ */i(a,{className:U("number"===C.pressed),"aria-label":B.number,"aria-pressed":"number"===C.pressed,disabled:D,onMouseDown:c,onClick:()=>C.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,q("quote",B.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":B.letterCase,onKeyDown:e=>p(e,T.map(([e])=>e),e=>M.onChange(e)),children:T.map(([e,l,r])=>w(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:U(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:D||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null]}),V="row"===A,E=V?" is-row":S.flow?" is-flow":S.oneRow?" is-one-row":S.words&&void 0===v?" is-eight":"",H=b(n,Boolean(f)),P={"--rosh-tb-color-col":String(H.color),"--rosh-tb-link-col":String(H.link),...V?{"--rosh-tb-cells":String(S.cells.words+S.cells.paragraph),"--rosh-tb-groupgap":S.words&&S.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let G;return G=V?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[S.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}):null,S.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:K}):null]}):S.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[F,
3
- /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),K]}):S.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
- /* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}),
5
- /* @__PURE__ */i("div",{className:"rosh-tb-para",children:K})]}):/* @__PURE__ */t(d,{children:[S.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===v?" is-eight":""),children:F}):null,S.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:K}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${E} ${j}`.trim(),style:P,children:[
6
- /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":x??B.formatting,children:G}),y]})}export{g as TextToolbar,m as textToolbarRows,b as textToolbarWindowColumns};
@@ -1,5 +0,0 @@
1
- import{InputNumber_default as e}from"./chunk-JENEVLJU.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-L65BESIE.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
- return m(g.Provider,{value:r,children:e})}function z({value:r,onChange:a,min:c,max:S,step:z=1,shiftStep:F,precision:$,inputMin:k,inputMax:E,suffix:L,showInput:N=!0,emptyLabel:j,placeholderValue:M,stepFrom:K,label:A,"aria-labelledby":C,valueText:D,id:R,disabled:U,size:V="md",boxSize:B="sm",className:I="",auto:J}){const P=n(),W=o(),q=t(),O=J??q,Q=o(),T=R??W,X=$??h(z),G=k??c,H=E??S,Y=void 0!==j||void 0!==M,Z=K??M,_=p(r??M??c,c,S),ee=d(null),[te,ie]=l(null),ne=Boolean(L);w(()=>{const e=()=>{const e=ee.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||ie(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ne,N]);const re=e=>D?D(e):"string"==typeof L?`${e.toFixed(X)} ${L}`:void 0,le=null==r?j??(null!=M?re(M)??String(M):void 0):re(r),ae=`calc(${b([c.toFixed(X),S.toFixed(X),r?.toFixed(X),j,M?.toFixed(X)])}ch + ${(te?.frame??10+(ne?x:v))+2}px)`,oe=s(g),de=o(),se=oe?.set;w(()=>{se&&se(de,N?ae:null)},[se,de,ae,N]),u(()=>()=>se?.(de,null),[se,de]);const ue=i();/* @__PURE__ */
3
- return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${ue?"flex-wrap gap-2":"gap-3"} ${I}`.trim(),children:[
4
- /* @__PURE__ */m("input",{id:T,type:"range",min:c,max:S,step:z,value:_,disabled:U,"aria-label":C?void 0:A,"aria-labelledby":C,"aria-valuetext":le,"aria-describedby":O?Q:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=F;if(!i&&!(null==r&&null!=Z))return;e.preventDefault();a(y((r??Z??_)+t*(i?F??z:z),c,S,X))},onChange:e=>a(y(Number(e.target.value),c,S,X)),className:`min-w-24 flex-1 ${ue?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===V?"h-1":"h-1.5"}`}),N&&
5
- /* @__PURE__ */m("div",{ref:ee,"data-slider-box":"",className:ue?"ml-auto shrink-0":"shrink-0 text-xs",style:ue?void 0:{width:oe?.width??ae,...te?{fontSize:te.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<G||e>H||a(e):Y&&a(null)},min:G,max:H,step:z,shiftStep:F,stepFrom:Z,precision:X,snap:!0,allowEmpty:Y,suffix:L,disabled:U,placeholder:j??(null!=M?M.toFixed(X):void 0),size:ue?void 0:B,auto:O,"aria-label":A?P.slider.value(A):void 0,"aria-labelledby":A?void 0:C})}),O&&/* @__PURE__ */m("span",{id:Q,hidden:!0,children:P.settingView.auto})]})}export{z as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
@@ -1,6 +0,0 @@
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-JENEVLJU.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-PEM7UXQ3.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:j=""}){const R=l().widths,z=a(),B=m(Math.round(x)||1,1,n),E=e($,B),A=E??[...t[B]??[]],D=[...A,100-p(A)],S=P||M,K=s(null),L=s({onChange:k,shown:A,locked:S,n:B,stored:E});L.current={onChange:k,shown:A,locked:S,n:B,stored:E};const O=t=>{const{onChange:r,shown:n,locked:o,n:i}=L.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},T=(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],O(i.slice(0,-1))&&(ne.current=null)},U=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=D[e]+D[e+1],i="ArrowRight"===t.key?D[e]+n:"ArrowLeft"===t.key?D[e]-n:"PageUp"===t.key?D[e]+10:"PageDown"===t.key?D[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),T(D,e,i))},G=s(null),[H,I]=c(null),J=()=>{G.current=null,I(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>J,[]);const X=e=>t=>{if(0!==t.button||S)return;t.preventDefault();const r=K.current?.getBoundingClientRect().width??0;r<=0||(G.current={i:e,x:t.clientX,width:r,from:D,moved:!1,pointer:t.pointerId},I(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},F=e=>{const t=G.current;if(!t)return;if(0===e.buttons)return void J();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}T(t.from,t.i,t.from[t.i]+r/t.width*100)},V=e=>{const t=G.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),J())},W=(e,t)=>{const{shown:n}=L.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 O(o.slice(0,-1))?o:null},[q,Q]=c(0);u(()=>{const e=K.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Q(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Y=s(null),[Z,_]=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}=L.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=D.join(",");u(()=>{const e=null===Z?[]: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]:[]})}(Y.current,Z);te(t=>v(t,e)?t:e)},[Z,ie,q]);const le=R.hint(B,r),ae=D.slice(0,-1).map((e,t)=>p(D.slice(0,t+1)));/* @__PURE__ */
2
- return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":B>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
3
- /* @__PURE__ */h("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
4
- /* @__PURE__ */f("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:D.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===B&&/* @__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"}),B>1&&D.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Z===t,l=p(D.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-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||W(t,e)},onRevert:e=>((e,t)=>{L.current.locked||null===t||oe(e,t)||W(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:L.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<B-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:R.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":R.divider(t+1,t+2),"aria-valuenow":D[t],"aria-valuemin":r,"aria-valuemax":D[t]+D[t+1]-r,"aria-valuetext":R.dividerValue(t+1,D[t],t+2,D[t+1]),"aria-disabled":S||void 0,onKeyDown:S?void 0:U(t),onPointerDown:X(t),onPointerMove:F,onPointerUp:V,onPointerCancel:V,onLostPointerCapture:()=>{G.current&&J()},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)] "+(S?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(S?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${H===t?"w-1":y}`)})})})})]},t))]}),B>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
@@ -1 +0,0 @@
1
- import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,spreadsheet:"Multi-sheet spreadsheet editor with CSV / TSV import and export.",notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",documents:"Letter-page editor for Word documents and plain-text files — images, lists, alignment.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
@@ -1,2 +0,0 @@
1
- import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-4CPE5NBC.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-PEM7UXQ3.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const C=e().charts,L=i(),N=d??(t=>Number.isInteger(t)?m(t,L):n(t,1,L)),v=x??(t=>m(t,L)),w=g??C.countAxis,A=k??C.distribution,M=h??r(c??[],s),P=a(0,b,f),R=M.map(t=>N(t.from)),T=M.map(t=>t.count);/* @__PURE__ */
2
- return l(o,{labels:R,values:T,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:v,yAxisLabel:w,className:y,emptyLabel:j,ariaLabel:C.histogram(A,M.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${N(M[o].from)} – ${N(M[o].to)}`,rows:[{key:"count",label:C.observations,color:P,value:v(M[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:P,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
@@ -1,4 +0,0 @@
1
- import{AccessibleTable as e}from"./chunk-TBPHW42V.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-PEM7UXQ3.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(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const T=Math.max(...L.map(e=>e.depth))+1,F=f/2,P=f/2,R=(f/2-8-b)/T,U=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,A=e=>null!==w?e.id===w:null===E||e.branchKey===E,B=w?L.find(e=>e.id===w):void 0,H=e=>c(e.value/U*100,1,$);/* @__PURE__ */
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(U),T),onMouseLeave:()=>C(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(F,P,b+e.depth*R+v/2,b+(e.depth+1)*R-v/2,e.start,e.end),fill:z(e),fillOpacity:A(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:F,y:P+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),B&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:B.label,rows:[{key:"value",label:M.value,color:z(B),value:j(B.value)},{key:"share",label:M.share,color:a.muted,value:H(B)}]})}),
4
- /* @__PURE__ */s(e,{caption:M.sunburst(j(U),T),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
@@ -1,8 +0,0 @@
1
- import{AccessibleTable as t}from"./chunk-TBPHW42V.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-TLRCTNUF.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-PEM7UXQ3.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:T,matrix:z,otherIndex:A,foldedCount:I}=C,L=(t,e)=>z[t]?.[e]??0,P=t=>t===A?r.muted:a(t),Q=C.totals,U=T.map((t,e)=>e).sort((t,e)=>Q[e]-Q[t]),H=U.reduce((t,e)=>t+Q[e],0);if(H<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const O=p/2,R=p/2,V=p/2-44,W=V-b,B=g*U.length,Y=/* @__PURE__ */new Map;let S=-Math.PI/2;U.forEach((t,e)=>{const o=Q[t]/H*(2*Math.PI-B);Y.set(t,{start:S,end:S+o,slot:e}),S+=o+g});const X=/* @__PURE__ */new Map,Z=[];for(const t of U)for(const e of U){const o=L(t,e);if(o<=0)continue;const n=Y.get(t),r=o/Math.max(1,Q[t])*(n.end-n.start),a=X.get(t)??0;X.set(t,a+r),Z.push({from:t,to:e,value:o,a:n.start+a+r/2,b:Y.get(e).start+(Y.get(e).end-Y.get(e).start)/2})}const q=(t,e)=>[O+e*Math.cos(t),R+e*Math.sin(t)],D="arc"===y?.kind?y.index:void 0,G="ribbon"===y?.kind?Z[y.index]:void 0;/* @__PURE__ */
2
- return m("div",{className:`relative ${v??""}`,children:[
3
- /* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(U.length),onMouseLeave:()=>E(null),children:[Z.map((t,e)=>{const[o,n]=q(t.a,W),[r,a]=q(t.b,W),l=P(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?T[t.from]===F||T[t.to]===F:null)(t,e);/* @__PURE__ */
4
- return d("path",{d:`M${o},${n} Q${O},${R} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/H*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${T[t.from]}→${T[t.to]}`)}),U.map(t=>{const o=Y.get(t),n=(o.start+o.end)/2,[a,l]=q(n,V+16),i=(t=>y?"arc"===y.kind?y.index===t:Z[y.index].from===t||Z[y.index].to===t:null!==F?T[t]===F:null)(t);/* @__PURE__ */
5
- return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
6
- /* @__PURE__ */d("path",{d:e(O,R,W,V,o.start,o.end),fill:P(t),fillOpacity:null===i||i?1:.45}),
7
- /* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:T[t]})]},t)})]}),I>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(I)}),void 0!==D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:T[D],rows:[{key:"total",label:$.totalFlow,color:P(D),value:N(Q[D])}]})}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${T[G.from]} → ${T[G.to]}`,rows:[{key:"value",label:$.flow,color:P(G.from),value:N(G.value)}]})}),
8
- /* @__PURE__ */d(t,{caption:$.chord(U.length),head:[$.tableFrom,$.tableTo,$.value],rows:Z.map(t=>[T[t.from],T[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};