efficient-shell 12.28.0 → 12.30.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 (326) hide show
  1. package/README.md +38 -0
  2. package/dist/{Browser-PC45PVTN.js → Browser-FQHXHI3R.js} +16 -16
  3. package/dist/Calculator-XCRU5K4O.js +29 -0
  4. package/dist/{CurrencyConverter-BB4QWNER.js → CurrencyConverter-EHIQIFJK.js} +9 -9
  5. package/dist/Files-LTUUGPAM.js +141 -0
  6. package/dist/{Notepad-BLUA2254.js → Notepad-JPAXNEFR.js} +9 -9
  7. package/dist/PdfViewer-J55QKFNS.js +1 -0
  8. package/dist/{PomodoroTimer-KIJKDHVO.js → PomodoroTimer-IVDZBBUN.js} +8 -8
  9. package/dist/{Preview-JVL2N5GN.js → Preview-KRK4XT2B.js} +31 -31
  10. package/dist/Sidebar-FCXIPW5K.js +44 -0
  11. package/dist/{Stock-JQEJMIMG.js → Stock-OBS2LPX4.js} +7 -7
  12. package/dist/{Weather-FAQX55XL.js → Weather-I4TJBIEN.js} +18 -18
  13. package/dist/{WorldClock-YSZNGEL2.js → WorldClock-YU2ZPVSA.js} +6 -6
  14. package/dist/ai/index.js +134 -134
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/charts/BoxPlotChart.js +1 -1
  20. package/dist/charts/CandlestickChart.js +1 -1
  21. package/dist/charts/CartesianPlot.js +1 -1
  22. package/dist/charts/ChartBrush.js +1 -1
  23. package/dist/charts/ChartFrame.js +1 -1
  24. package/dist/charts/ChartSkeleton.js +1 -1
  25. package/dist/charts/ChordChart.js +1 -1
  26. package/dist/charts/ColumnChart.js +1 -1
  27. package/dist/charts/FunnelChart.js +1 -1
  28. package/dist/charts/HeatmapChart.js +1 -1
  29. package/dist/charts/HistogramChart.js +1 -1
  30. package/dist/charts/Meter.js +1 -1
  31. package/dist/charts/PieChart.js +1 -1
  32. package/dist/charts/RadarChart.js +1 -1
  33. package/dist/charts/RadialBarChart.js +1 -1
  34. package/dist/charts/RangeChart.js +1 -1
  35. package/dist/charts/RankedBars.js +1 -1
  36. package/dist/charts/SankeyChart.js +1 -1
  37. package/dist/charts/ScatterChart.js +1 -1
  38. package/dist/charts/SpecChart.js +1 -1
  39. package/dist/charts/StatTile.js +1 -1
  40. package/dist/charts/SunburstChart.js +1 -1
  41. package/dist/charts/TimeSeriesChart.js +1 -1
  42. package/dist/charts/TreemapChart.js +1 -1
  43. package/dist/charts/WaterfallChart.js +1 -1
  44. package/dist/{chunk-W2663E4S.js → chunk-23CZSU3H.js} +3 -3
  45. package/dist/{chunk-47UH3D4B.js → chunk-2DCATU5B.js} +1 -1
  46. package/dist/{chunk-RF3ZFTAU.js → chunk-2IEKMFVL.js} +1 -1
  47. package/dist/{chunk-TDXRG43I.js → chunk-2N6WWL7Y.js} +1 -1
  48. package/dist/{chunk-O4YKOS74.js → chunk-36MM4YRK.js} +9 -9
  49. package/dist/{chunk-HLE4LTRU.js → chunk-37EYKPR6.js} +1 -1
  50. package/dist/{chunk-RVVQDBV7.js → chunk-3B3QIHF7.js} +5 -5
  51. package/dist/{chunk-BKYRHQK2.js → chunk-3HLV6BEC.js} +12 -12
  52. package/dist/{chunk-BT2YPDQL.js → chunk-3N4XJS43.js} +3 -3
  53. package/dist/{chunk-232YPI2L.js → chunk-3R2TMLKH.js} +5 -5
  54. package/dist/{chunk-CON5NRCO.js → chunk-3ZC53F4T.js} +3 -3
  55. package/dist/{chunk-ZGCCV4WE.js → chunk-42GNFUAP.js} +10 -10
  56. package/dist/{chunk-OMFYTCBI.js → chunk-4FUQK2LK.js} +1 -1
  57. package/dist/{chunk-WKYNPGFB.js → chunk-4MCI7UHQ.js} +5 -5
  58. package/dist/chunk-4SEPQN2N.js +12 -0
  59. package/dist/{chunk-GEVNBBM7.js → chunk-4WW3SNL6.js} +1 -1
  60. package/dist/chunk-4YCWO2GZ.js +14 -0
  61. package/dist/{chunk-XSVQ5V7L.js → chunk-5O5QMMMG.js} +9 -9
  62. package/dist/{chunk-EATV7FMU.js → chunk-5RLJAXDR.js} +8 -8
  63. package/dist/{chunk-3YBXA72C.js → chunk-5X3Z45SL.js} +1 -1
  64. package/dist/{chunk-UEFIUTOU.js → chunk-5XYRFK7D.js} +1 -1
  65. package/dist/{chunk-6KOMF6WL.js → chunk-5ZS3VOJH.js} +1 -1
  66. package/dist/{chunk-YWNHK6Z5.js → chunk-64ZDYUE7.js} +15 -15
  67. package/dist/{chunk-WX2Q76WC.js → chunk-67JLD6AU.js} +6 -6
  68. package/dist/{chunk-OM6VWUAZ.js → chunk-6EETON2U.js} +1 -1
  69. package/dist/{chunk-4PIQG2ZK.js → chunk-6EXWWPAW.js} +1 -1
  70. package/dist/{chunk-ATZ262BR.js → chunk-6UB6YY3H.js} +1 -1
  71. package/dist/{chunk-ZGWXSHVM.js → chunk-77BK2IAJ.js} +1 -1
  72. package/dist/{chunk-Y4FWTYZS.js → chunk-7DTWIWFO.js} +6 -6
  73. package/dist/chunk-7IGWU6DK.js +8 -0
  74. package/dist/{chunk-XAEI36TW.js → chunk-AIGLJYQ5.js} +1 -1
  75. package/dist/chunk-AJVL6LXI.js +22 -0
  76. package/dist/{chunk-2OUAPOLK.js → chunk-ANGNTN36.js} +1 -1
  77. package/dist/{chunk-BC4FE77W.js → chunk-AYCWVVJ3.js} +50 -50
  78. package/dist/{chunk-7GJIIBJD.js → chunk-B27XRZ47.js} +1 -1
  79. package/dist/{chunk-EWVE5XG6.js → chunk-BEB3AGSY.js} +1 -1
  80. package/dist/{chunk-DIHHV6T6.js → chunk-CBBU74QT.js} +1 -1
  81. package/dist/chunk-CHV7U5UV.js +9 -0
  82. package/dist/{chunk-TGLUENXE.js → chunk-CIOPLPZW.js} +1 -1
  83. package/dist/{chunk-SS3CROPR.js → chunk-CVEVPB3O.js} +3 -3
  84. package/dist/chunk-CXXMSYA6.js +1 -0
  85. package/dist/{chunk-6Q7L32LL.js → chunk-DHRCI7KE.js} +1 -1
  86. package/dist/{chunk-HNEI2RKX.js → chunk-DOKA65JI.js} +1 -1
  87. package/dist/{chunk-XKNKRKHH.js → chunk-E7RMS776.js} +14 -14
  88. package/dist/chunk-EWSOX4WP.js +28 -0
  89. package/dist/{chunk-K5PDLRYH.js → chunk-FEWWCWKV.js} +9 -9
  90. package/dist/{chunk-SR4W2SYQ.js → chunk-FIXZT5TZ.js} +7 -7
  91. package/dist/{chunk-LAO6GLBY.js → chunk-FM34DWV7.js} +6 -6
  92. package/dist/{chunk-VP2GI3UP.js → chunk-FPYOZOUY.js} +8 -8
  93. package/dist/{chunk-VLKJN6HX.js → chunk-FSORYU5C.js} +12 -12
  94. package/dist/{chunk-MKNDDB6U.js → chunk-FYGPJPU7.js} +1 -1
  95. package/dist/{chunk-AFWLCXQD.js → chunk-GANZLRMW.js} +8 -8
  96. package/dist/{chunk-N5RV73CI.js → chunk-GBPGZFBS.js} +4 -4
  97. package/dist/chunk-GKX3C3JE.js +13 -0
  98. package/dist/{chunk-JLRF6FN7.js → chunk-GL4NELAT.js} +1 -1
  99. package/dist/{chunk-DGHSCKOE.js → chunk-GN3AHAVY.js} +4 -4
  100. package/dist/{chunk-7ZJRBFHA.js → chunk-HC3BZPWX.js} +1 -1
  101. package/dist/{chunk-JSHMIMAJ.js → chunk-HCDG7EUR.js} +1 -1
  102. package/dist/{chunk-GUHCKMC7.js → chunk-HE2I6KWY.js} +2 -2
  103. package/dist/chunk-HJECGV6W.js +5 -0
  104. package/dist/{chunk-TYQ2JL4J.js → chunk-HOXXEF52.js} +1 -1
  105. package/dist/{chunk-34L5SRM7.js → chunk-HRNT4UDG.js} +18 -18
  106. package/dist/{chunk-WPG3ZHYT.js → chunk-HU24RSAE.js} +1 -1
  107. package/dist/{chunk-7TNZ3DTT.js → chunk-I6V4DMNR.js} +2 -2
  108. package/dist/{chunk-EEB5XPWP.js → chunk-IBPULOGJ.js} +2 -2
  109. package/dist/{chunk-RZ2DWX4N.js → chunk-ILSE5F5F.js} +5 -5
  110. package/dist/{chunk-KAKJ7ENS.js → chunk-IOIY54KO.js} +2 -2
  111. package/dist/{chunk-NUPK6CUV.js → chunk-IQTURGC4.js} +1 -1
  112. package/dist/{chunk-VBLCYL4L.js → chunk-JA5WM66L.js} +1 -1
  113. package/dist/{chunk-XAF5ZI7H.js → chunk-JGZEZHMP.js} +1 -1
  114. package/dist/{chunk-CBVKGAZH.js → chunk-JOANOIVK.js} +1 -1
  115. package/dist/{chunk-24Y5JHIR.js → chunk-JTRQ7HAS.js} +1 -1
  116. package/dist/{chunk-CEIIQRK5.js → chunk-K6LO6QI5.js} +6 -6
  117. package/dist/{chunk-VLBIM33E.js → chunk-KHFPF534.js} +6 -6
  118. package/dist/{chunk-WN3JHPJI.js → chunk-KKYNDLOC.js} +6 -6
  119. package/dist/{chunk-4IHYWLWE.js → chunk-KLG6RYYC.js} +5 -5
  120. package/dist/{chunk-7K3FYCRZ.js → chunk-KNNFNOX7.js} +9 -9
  121. package/dist/chunk-KPFP2I2S.js +8 -0
  122. package/dist/{chunk-JZBLOIL7.js → chunk-KPPKPGQI.js} +1 -1
  123. package/dist/{chunk-XHSMDUEW.js → chunk-LBLWN3SH.js} +3 -3
  124. package/dist/chunk-LHATGPIE.js +19 -0
  125. package/dist/{chunk-TKIYZE7V.js → chunk-LQD54ZL5.js} +1 -1
  126. package/dist/{chunk-MTYEY7HT.js → chunk-M2GF44WC.js} +12 -12
  127. package/dist/{chunk-56XCGOX5.js → chunk-MFZ4YMXE.js} +6 -6
  128. package/dist/{chunk-VFHKD7TQ.js → chunk-MHVWUYEN.js} +1 -1
  129. package/dist/{chunk-BFRGDRFK.js → chunk-MKPZIEQP.js} +22 -22
  130. package/dist/{chunk-LL4KF43W.js → chunk-MRVW6F5E.js} +1 -1
  131. package/dist/chunk-MUSNAMWH.js +1 -0
  132. package/dist/{chunk-VEQ45GAH.js → chunk-MVBDE4AX.js} +1 -1
  133. package/dist/{chunk-V3XS6BTJ.js → chunk-MYJ3HQYG.js} +12 -12
  134. package/dist/{chunk-JFGJJNT2.js → chunk-N2BWOHNM.js} +6 -6
  135. package/dist/{chunk-N2445WHJ.js → chunk-NJ6WZHXC.js} +5 -5
  136. package/dist/{chunk-OXRQIWRT.js → chunk-NLQLVXMJ.js} +1 -1
  137. package/dist/{chunk-HSUTZCRT.js → chunk-NSNM4QIV.js} +5 -5
  138. package/dist/{chunk-QB2GJNGB.js → chunk-O3SCB4QZ.js} +8 -8
  139. package/dist/{chunk-HVYXJLAV.js → chunk-OMSIXLK4.js} +1 -1
  140. package/dist/{chunk-74JMBOQH.js → chunk-P4NWDRHS.js} +26 -26
  141. package/dist/{chunk-X5MUSNKH.js → chunk-PAVOVX3D.js} +1 -1
  142. package/dist/{chunk-LIWBCIRZ.js → chunk-PBZ3UQMS.js} +4 -4
  143. package/dist/chunk-PRWA4AAC.js +11 -0
  144. package/dist/{chunk-MWTCGJAI.js → chunk-Q4BJW37U.js} +1 -1
  145. package/dist/{chunk-WNOXHJVT.js → chunk-QB7TIWHT.js} +5 -5
  146. package/dist/{chunk-YO26RV3H.js → chunk-QF4FYOVE.js} +1 -1
  147. package/dist/{chunk-DJXXY23A.js → chunk-QHWD3G7T.js} +2 -2
  148. package/dist/{chunk-WXZZGHET.js → chunk-QT34GMZR.js} +1 -1
  149. package/dist/{chunk-UH5ZGWSA.js → chunk-QV5A7NFQ.js} +8 -8
  150. package/dist/chunk-RJG67VRP.js +15 -0
  151. package/dist/{chunk-63IGYBCQ.js → chunk-RMUOUMV2.js} +2 -2
  152. package/dist/{chunk-3FBXJO77.js → chunk-RPXRMTOU.js} +1 -1
  153. package/dist/chunk-RVD6HJUJ.js +4 -0
  154. package/dist/{chunk-NN32QUCE.js → chunk-SAAXAAAH.js} +1 -1
  155. package/dist/chunk-TIYRBJSB.js +7 -0
  156. package/dist/{chunk-4BKJ6A5H.js → chunk-TJ5ZX5HP.js} +10 -10
  157. package/dist/chunk-TN3W72FC.js +8 -0
  158. package/dist/{chunk-2DYVVHZA.js → chunk-U22563X2.js} +1 -1
  159. package/dist/{chunk-QADNVFV5.js → chunk-U45APXV3.js} +1 -1
  160. package/dist/{chunk-OOWPLQD5.js → chunk-UEADX2GV.js} +2 -2
  161. package/dist/chunk-UK2D2CSB.js +14 -0
  162. package/dist/{chunk-Z66QBDNU.js → chunk-UOHHIEH4.js} +1 -1
  163. package/dist/{chunk-H2CPT6K3.js → chunk-UQNKFMJR.js} +12 -12
  164. package/dist/{chunk-SE6IQZYW.js → chunk-V64XY7L4.js} +9 -9
  165. package/dist/{chunk-75H4BWNC.js → chunk-VEF3STCH.js} +1 -1
  166. package/dist/chunk-VLI2ED22.js +7 -0
  167. package/dist/{chunk-V4XR4MOS.js → chunk-VREZFFRE.js} +1 -1
  168. package/dist/chunk-VY5NO4TS.js +2 -0
  169. package/dist/{chunk-CMJD5URC.js → chunk-WCJR2GNH.js} +18 -18
  170. package/dist/{chunk-Y7KDCC6E.js → chunk-WM37FXRK.js} +1 -1
  171. package/dist/{chunk-4LOHQ4QB.js → chunk-X27K2NCU.js} +5 -5
  172. package/dist/{chunk-ZBJ7FTA5.js → chunk-X5RFTIHV.js} +1 -1
  173. package/dist/chunk-XJTZU7UH.js +4 -0
  174. package/dist/{chunk-RBS3AWE7.js → chunk-XK3VYRLR.js} +1 -1
  175. package/dist/{chunk-FJVZ2W55.js → chunk-XMAOLCQV.js} +1 -1
  176. package/dist/{chunk-GC4N4UQM.js → chunk-XXRUDMD5.js} +5 -5
  177. package/dist/{chunk-AMIMNRYU.js → chunk-Y6H5C6A4.js} +1 -1
  178. package/dist/{chunk-YYGJJ6EI.js → chunk-YGKQMENL.js} +1 -1
  179. package/dist/{chunk-NOGSS432.js → chunk-YNE5YC6E.js} +1 -1
  180. package/dist/chunk-YS3CF7GL.js +2 -0
  181. package/dist/{chunk-IB3LLQZC.js → chunk-ZSVBEJ4G.js} +1 -1
  182. package/dist/data/DataTable.js +1 -1
  183. package/dist/data/EntityList.js +1 -1
  184. package/dist/data/Kanban.js +1 -1
  185. package/dist/data/ListFooter.js +1 -1
  186. package/dist/data/ListLoadError.js +1 -1
  187. package/dist/data/Pagination.js +1 -1
  188. package/dist/data/ResizableTable.js +1 -1
  189. package/dist/file-intake/index.js +1 -1
  190. package/dist/forms/BorderInput.js +1 -1
  191. package/dist/forms/BrandAssetEditor.js +1 -1
  192. package/dist/forms/Calendar.js +1 -1
  193. package/dist/forms/ColorPicker.js +1 -1
  194. package/dist/forms/ComposerAttachments.js +1 -1
  195. package/dist/forms/CornersInput.js +1 -1
  196. package/dist/forms/DatePicker.js +1 -1
  197. package/dist/forms/DateRangePicker.js +1 -1
  198. package/dist/forms/DateTimePicker.js +1 -1
  199. package/dist/forms/DisplayChips.js +1 -1
  200. package/dist/forms/FilePicker.js +1 -1
  201. package/dist/forms/FormErrorSummary.js +1 -1
  202. package/dist/forms/IconPicker.js +1 -1
  203. package/dist/forms/ImageFocusPoint.js +1 -1
  204. package/dist/forms/InputNumber.js +1 -1
  205. package/dist/forms/LinkPicker.js +1 -1
  206. package/dist/forms/MediaLibrary.js +1 -1
  207. package/dist/forms/MediaUploadField.js +1 -1
  208. package/dist/forms/MediaUploadGrid.js +1 -1
  209. package/dist/forms/MediaUsedInList.js +1 -1
  210. package/dist/forms/NumericKeypad.js +1 -1
  211. package/dist/forms/PositionInput.js +1 -1
  212. package/dist/forms/Select.js +1 -1
  213. package/dist/forms/SidesInput.d.ts +13 -2
  214. package/dist/forms/SidesInput.js +1 -1
  215. package/dist/forms/Slider.js +1 -1
  216. package/dist/forms/Snippet.js +1 -1
  217. package/dist/forms/TagInput.js +1 -1
  218. package/dist/forms/TextToolbar.js +1 -1
  219. package/dist/forms/TimePicker.js +1 -1
  220. package/dist/forms/WidthsBar.js +1 -1
  221. package/dist/forms/mediaLibraryMenu.js +1 -1
  222. package/dist/forms/mediaMoveItems.js +1 -1
  223. package/dist/forms/textAlign.js +1 -1
  224. package/dist/forms/useFileIntake.js +1 -1
  225. package/dist/hooks/useTheme.d.ts +1 -1
  226. package/dist/icons/efficient-glyphs.js +1 -1
  227. package/dist/icons/efficient-looks.js +1 -1
  228. package/dist/icons/efficient.js +1 -1
  229. package/dist/icons/looks/map.js +1 -1
  230. package/dist/icons/payment.js +1 -1
  231. package/dist/icons/sets.js +1 -1
  232. package/dist/index.d.ts +4 -4
  233. package/dist/index.js +132 -132
  234. package/dist/locales/zh-Hans.js +1 -1
  235. package/dist/map/index.js +4 -4
  236. package/dist/model-viewer/index.d.ts +123 -0
  237. package/dist/model-viewer/index.js +7 -0
  238. package/dist/page-tabs/index.js +5 -5
  239. package/dist/pdf/index.js +1 -1
  240. package/dist/shell/Accordion.js +1 -1
  241. package/dist/shell/AppUpdateBanner.js +1 -1
  242. package/dist/shell/Avatar.js +1 -1
  243. package/dist/shell/Banner.js +1 -1
  244. package/dist/shell/Breadcrumbs.js +1 -1
  245. package/dist/shell/BudgetBar.js +1 -1
  246. package/dist/shell/Card.js +1 -1
  247. package/dist/shell/ColoredBadge.js +1 -1
  248. package/dist/shell/ConfirmDialog.js +1 -1
  249. package/dist/shell/ContainerFillChart.js +1 -1
  250. package/dist/shell/CountBadge.js +1 -1
  251. package/dist/shell/Dialog.js +1 -1
  252. package/dist/shell/Drawer.js +1 -1
  253. package/dist/shell/EditableGrid.js +1 -1
  254. package/dist/shell/EmptyState.js +1 -1
  255. package/dist/shell/GlobalSearch.js +1 -1
  256. package/dist/shell/HelpCenter.js +1 -1
  257. package/dist/shell/IconRail.js +1 -1
  258. package/dist/shell/ImageLightbox.js +1 -1
  259. package/dist/shell/ItemCount.js +1 -1
  260. package/dist/shell/LanguageSelect.js +1 -1
  261. package/dist/shell/Markdown.js +1 -1
  262. package/dist/shell/MetricBar.js +1 -1
  263. package/dist/shell/MetricBarLegend.js +1 -1
  264. package/dist/shell/MilestoneTimeline.js +1 -1
  265. package/dist/shell/PageHeader.js +1 -1
  266. package/dist/shell/ProductionTimeline.js +1 -1
  267. package/dist/shell/ResizeHandle.js +1 -1
  268. package/dist/shell/Result.js +1 -1
  269. package/dist/shell/SearchableSelect.js +1 -1
  270. package/dist/shell/SettingReset.js +1 -1
  271. package/dist/shell/SettingRow.js +1 -1
  272. package/dist/shell/SidebarLayout.js +1 -1
  273. package/dist/shell/SidebarNav.js +1 -1
  274. package/dist/shell/SortableList.js +1 -1
  275. package/dist/shell/Statistic.js +1 -1
  276. package/dist/shell/TimeAgo.js +1 -1
  277. package/dist/shell/TimelineTrack.js +1 -1
  278. package/dist/shell/TransferProgress.js +1 -1
  279. package/dist/shell/Tree.js +1 -1
  280. package/dist/shell/discardGuard.js +1 -1
  281. package/dist/shell/language.js +1 -1
  282. package/dist/shell/strings.d.ts +10 -0
  283. package/dist/shell/strings.js +1 -1
  284. package/dist/shell/toast.js +1 -1
  285. package/dist/telemetry/index.js +1 -1
  286. package/dist/templates/AuthScreen.js +1 -1
  287. package/dist/templates/ChatTemplate.js +1 -1
  288. package/dist/templates/CheckoutTemplate.js +1 -1
  289. package/dist/templates/DashboardTemplate.js +1 -1
  290. package/dist/templates/DataTablePage.js +1 -1
  291. package/dist/templates/EmailTemplate.js +1 -1
  292. package/dist/templates/ErrorBoundary.d.ts +1 -1
  293. package/dist/templates/ErrorBoundary.js +1 -1
  294. package/dist/templates/ErrorPage.js +1 -1
  295. package/dist/templates/FormLayoutPage.js +1 -1
  296. package/dist/templates/GalleryTemplate.js +1 -1
  297. package/dist/ui/index.d.ts +1 -1
  298. package/dist/ui/index.js +1 -1
  299. package/dist/version.js +1 -1
  300. package/package.json +12 -1
  301. package/dist/Calculator-5TRNFPY4.js +0 -29
  302. package/dist/Files-BKEREVQK.js +0 -141
  303. package/dist/PdfViewer-4YLDY4JY.js +0 -1
  304. package/dist/Sidebar-SAGLPIOC.js +0 -44
  305. package/dist/chunk-2SGOKMUU.js +0 -13
  306. package/dist/chunk-4Y33Y4OX.js +0 -8
  307. package/dist/chunk-574SLTKO.js +0 -8
  308. package/dist/chunk-64J7TYJ3.js +0 -4
  309. package/dist/chunk-A4PFVMQ2.js +0 -7
  310. package/dist/chunk-BHHFVIAD.js +0 -2
  311. package/dist/chunk-DG2TGWXI.js +0 -15
  312. package/dist/chunk-DRMIQ3YE.js +0 -1
  313. package/dist/chunk-ENFXDIIZ.js +0 -8
  314. package/dist/chunk-FFUTSMF5.js +0 -28
  315. package/dist/chunk-FI6IJTAJ.js +0 -14
  316. package/dist/chunk-FVKXDF2Q.js +0 -12
  317. package/dist/chunk-IATKDC52.js +0 -9
  318. package/dist/chunk-JJ2OXUK7.js +0 -14
  319. package/dist/chunk-S6AN76R3.js +0 -4
  320. package/dist/chunk-T7D73HT7.js +0 -11
  321. package/dist/chunk-TU2L7NW3.js +0 -7
  322. package/dist/chunk-UFM4YBZ7.js +0 -1
  323. package/dist/chunk-VDYF3WPJ.js +0 -2
  324. package/dist/chunk-XMY2HKVD.js +0 -19
  325. package/dist/chunk-XQWHKXLS.js +0 -22
  326. package/dist/chunk-YX2OOGV7.js +0 -4
@@ -1,7 +1,7 @@
1
- import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-XQWHKXLS.js";import{ChartFrame as a}from"./chunk-RBS3AWE7.js";import{ColumnChart as l}from"./chunk-GC4N4UQM.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
1
+ import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-AJVL6LXI.js";import{ColumnChart as a}from"./chunk-XXRUDMD5.js";import{ChartFrame as l}from"./chunk-XK3VYRLR.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
2
2
  /* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
3
3
  /* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
4
4
  /* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
5
5
  /* @__PURE__ */i("th",{scope:"row",className:`${s} border-t border-gray-100 px-2 py-1 text-left font-normal text-gray-700`,children:e}),n.series.map((e,a)=>{const l=e.values[t];/* @__PURE__ */
6
6
  return i("td",{className:"border-t border-gray-100 px-2 py-1 text-right tabular-nums text-gray-700",children:null===l?r:u(l)},a)})]},t))})]});/* @__PURE__ */
7
- return i(a,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(l,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
7
+ return i(l,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(a,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
@@ -1,8 +1,8 @@
1
- import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-JSHMIMAJ.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const M=i().charts,$=r(),j=d??(e=>m(e,$)),w=v??M.nothingToRank;if(0===c.length)/* @__PURE__ */
2
- return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:w});const F=t(c.map(e=>e.value),g),R=p??(null===F?void 0:c[F]?.key),C=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),H=s(0);/* @__PURE__ */
3
- return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===R,m=r?x?l[x]:s(1):R?n.muted:H,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&C>0?Math.max(0,Math.min(1,c/C)):0;/* @__PURE__ */
1
+ import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-HCDG7EUR.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const $=i().charts,j=r(),w=d??(e=>m(e,j)),M=v??$.nothingToRank;if(0===c.length)/* @__PURE__ */
2
+ return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:M});const R=t(c.map(e=>e.value),g),C=p??(null===R?void 0:c[R]?.key),F=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),H=s(0);/* @__PURE__ */
3
+ return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===C,m=r?x?l[x]:s(1):C?n.muted:H,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&F>0?Math.max(0,Math.min(1,c/F)):0;/* @__PURE__ */
4
4
  return h("li",{className:"grid gap-1",children:[
5
5
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-3",children:[
6
- /* @__PURE__ */h("span",{className:`truncate ${"mono"===N?"font-mono ":""}text-xs text-gray-600 ${r?"font-semibold":""}`,title:t.label,children:[t.label,r&&/* @__PURE__ */o("span",{className:"sr-only",children:` ${M.emphasised}`})]}),
7
- /* @__PURE__ */o("span",{className:"shrink-0 text-xs font-semibold tabular-nums text-gray-700",style:r?{color:m}:void 0,children:null===c?"—":j(c)})]}),
6
+ /* @__PURE__ */h("span",{className:`truncate ${"mono"===N?"font-mono ":""}text-xs text-gray-600 ${r?"font-semibold":""}`,title:t.label,children:[t.label,r&&/* @__PURE__ */o("span",{className:"sr-only",children:` ${$.emphasised}`})]}),
7
+ /* @__PURE__ */o("span",{className:"shrink-0 text-xs font-semibold tabular-nums text-gray-700",style:r?{color:m}:void 0,children:null===c?"—":w(c)})]}),
8
8
  /* @__PURE__ */o("div",{className:"w-full rounded-sm bg-gray-200",style:{height:f},children:/* @__PURE__ */o("div",{className:`rounded-sm ${b?e.grow:""}`,style:{width:`${(100*u).toFixed(2)}%`,height:f,backgroundColor:m,minWidth:u>0?2:0,...b?a(i):{}}})})]},t.key)})})}export{c as RankedBars};
@@ -1,5 +1,5 @@
1
- import{CartesianPlot as e}from"./chunk-ENFXDIIZ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-JSHMIMAJ.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),M=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
- return m(e,{labels:s.map(e=>e.label),values:M,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:e=>{const i=s[e];/* @__PURE__ */
1
+ import{CartesianPlot as e}from"./chunk-7IGWU6DK.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-HCDG7EUR.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
+ return m(e,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:e=>{const i=s[e];/* @__PURE__ */
3
3
  return m(t,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
4
4
  return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
5
5
  /* @__PURE__ */m("line",{x1:o,y1:t(r.max),x2:o,y2:t(r.q3),stroke:W,strokeWidth:1.5}),
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-CEIIQRK5.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-VP2GI3UP.js";import{Avatar as s}from"./chunk-24Y5JHIR.js";import{ColumnChart as l}from"./chunk-GC4N4UQM.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-K6LO6QI5.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-FPYOZOUY.js";import{Avatar as s}from"./chunk-JTRQ7HAS.js";import{ColumnChart as l}from"./chunk-XXRUDMD5.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,2 +1,2 @@
1
- import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-JSHMIMAJ.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
1
+ import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-HCDG7EUR.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
2
2
  return i("input",{ref:d,type:"time",lang:g,step:f,"aria-invalid":m||void 0,value:o(t,p),min:o(s,p)||void 0,max:o(u,p)||void 0,onChange:e=>r?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...v})});export{s as TimePicker_default};
@@ -1,4 +1,4 @@
1
- import{Modal as e}from"./chunk-BC4FE77W.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
1
+ import{Modal as e}from"./chunk-AYCWVVJ3.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
2
2
  return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
3
3
  /* @__PURE__ */n("div",{children:[
4
4
  /* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
@@ -1,4 +1,4 @@
1
- import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-OM6VWUAZ.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
1
+ import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-6EETON2U.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
2
2
  return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
3
3
  /* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
4
4
  /* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={"2xs":16,xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:h=""}){const u=s[i],g=Math.max(8,Math.round(.28*u)),[d,f]=r(!1);n(()=>{f(!1)},[e]);const p=Boolean(e)&&!d;
1
+ import{useShellLocale as e}from"./chunk-HCDG7EUR.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={"2xs":16,xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:h=""}){const u=s[i],g=Math.max(8,Math.round(.28*u)),[d,f]=r(!1);n(()=>{f(!1)},[e]);const p=Boolean(e)&&!d;
2
2
  /* @__PURE__ */
3
3
  return l("span",{className:`relative inline-flex shrink-0 align-top ${h}`.trim(),style:{width:u,height:u},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[p?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>f(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium leading-none text-gray-600",style:{fontSize:Math.max(7,Math.round(.4*u))},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:g,height:g}})]})}function h({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),h=n?c.slice(0,n):c,u=n?c.length-h.length:0,g=s[o],d=Math.round(.3*g),f=e();/* @__PURE__ */
4
4
  return l("div",{className:`flex items-center ${m}`.trim(),children:[h.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),u>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:g,height:g,marginLeft:-d,fontSize:Math.round(.36*g)},children:["+",t(u,f)]})]})}export{c as Avatar,h as AvatarGroup};
@@ -1,9 +1,9 @@
1
- import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as d,Children as n}from"react";import{jsxs as t,jsx as a}from"react/jsx-runtime";var i={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-line",warning:"border-amber-300",current:"border-line"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:x="",style:g,tone:f="neutral"}){const y=i[m??(o?"md":"none")],N=d(),v=d(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,M=A?"section":"div",C=`rounded-(--radius-card) border ${l[f]} bg-surface shadow-sm ${h}`.trim(),H=n.toArray(e).length>0,J=H?"border-b border-line-subtle ":"",B="current"===f,I=B?"text-base font-semibold text-blue-700":"text-base font-semibold text-ink-strongest",L=B?"rounded-t-(--radius-card) bg-accent-tint ":"",O=`${J}${L}${y.edge} ${I}`;/* @__PURE__ */
2
- return t(M,{className:C,style:g,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...B?{"aria-current":!0}:{},children:[$?
3
- /* @__PURE__ */t("div",{className:`${J}${L}${y.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${I}`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?/* @__PURE__ */a(j,{id:N,className:I,children:r}):/* @__PURE__ */a("div",{className:I,children:r}),
4
- /* @__PURE__ */a("p",{id:v,className:B?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-ink-faint",children:s})]}):null!=r&&(null!=u?
5
- /* @__PURE__ */t("div",{className:`${O} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?
6
- /* @__PURE__ */a(j,{id:N,className:O,children:r}):/* @__PURE__ */a("div",{className:O,children:r})),H&&/* @__PURE__ */a("div",{className:[y.body,x].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */a("div",{className:`border-t border-gray-100 ${y.edge}`,children:c})]})}function c({label:d,value:n,icon:i,delta:l,className:s=""}){const c=e(),o="number"==typeof n&&c?r(n,c):n,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-HCDG7EUR.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as d,Children as n}from"react";import{jsxs as t,jsx as a}from"react/jsx-runtime";var i={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-line",warning:"border-amber-300",current:"border-line"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:x="",style:g,tone:f="neutral"}){const y=i[m??(o?"md":"none")],N=d(),v=d(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,C=w||k,A=C?"section":"div",H=`rounded-(--radius-card) border ${l[f]} bg-surface shadow-sm ${h}`.trim(),R=n.toArray(e).length>0,B=R?"border-b border-line-subtle ":"",D="current"===f,E=D?"text-base font-semibold text-blue-700":"text-base font-semibold text-ink-strongest",G=D?"rounded-t-(--radius-card) bg-accent-tint ":"",L=`${B}${G}${y.edge} ${E}`;/* @__PURE__ */
2
+ return t(A,{className:H,style:g,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&C?{"aria-describedby":v}:{},...D?{"aria-current":!0}:{},children:[$?
3
+ /* @__PURE__ */t("div",{className:`${B}${G}${y.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${E}`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?/* @__PURE__ */a(j,{id:N,className:E,children:r}):/* @__PURE__ */a("div",{className:E,children:r}),
4
+ /* @__PURE__ */a("p",{id:v,className:D?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-ink-faint",children:s})]}):null!=r&&(null!=u?
5
+ /* @__PURE__ */t("div",{className:`${L} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?
6
+ /* @__PURE__ */a(j,{id:N,className:L,children:r}):/* @__PURE__ */a("div",{className:L,children:r})),R&&/* @__PURE__ */a("div",{className:[y.body,x].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */a("div",{className:`border-t border-gray-100 ${y.edge}`,children:c})]})}function c({label:d,value:n,icon:i,delta:l,className:s=""}){const c=e(),o="number"==typeof n&&c?r(n,c):n,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
7
7
  return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
8
8
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-ink-faint",children:[
9
9
  /* @__PURE__ */a("span",{className:"text-xs font-medium uppercase tracking-wide",children:d}),i]}),
@@ -1,8 +1,8 @@
1
- import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-JSHMIMAJ.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:M,id:D,className:L="",tone:J,tooltip:W,split:Y}){const[E,S]=m(!1),[$,G]=m(""),H=d(),I=h(null),T=h(null),B=h(null),F=s(I,E),A=e=>k.find(t=>t.value===e)?.label??e,K=p(()=>{const t=new Set(o),n=[],r=$.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,$]),P=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},Z=e=>{e&&!o.includes(e)?(y([...o,e]),G("")):G("")},z=e=>y(o.filter(t=>t!==e)),O=()=>{const e=$.trim();if(Y&&e)return P(e.split(Y)),void G("");j&&e?Z(e):G("")},U=h(()=>{});U.current=()=>{O(),S(!1)},f(()=>{if(!E)return;const e=e=>{const t=e.target;I.current?.contains(t)||B.current?.contains(t)||(O(),S(!1))};document.addEventListener("mousedown",e);const t=l(()=>U.current());return()=>{document.removeEventListener("mousedown",e),t()}});const q=k.length>0;/* @__PURE__ */
2
- return g("div",{ref:I,className:"relative",children:[
3
- /* @__PURE__ */g("div",{onMouseDown:e=>{M||e.target.closest("button")||(e.preventDefault(),T.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${M?"bg-gray-50 cursor-not-allowed":""} ${L}`}),children:[o.map(e=>{const t=J?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
- /* @__PURE__ */x("span",{className:"truncate",children:A(e)}),!M&&/* @__PURE__ */x("button",{type:"button","aria-label":H.select.removeItem?.(A(e))??`${H.select.remove} ${A(e)}`,onClick:()=>z(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
- /* @__PURE__ */x("input",{id:D,ref:T,type:"text",autoComplete:"off",role:"combobox","aria-expanded":E&&q,"aria-invalid":C||void 0,disabled:M,value:$,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(Y){const t=e.split(Y);if(t.length>1)return P(t.slice(0,-1)),void G(t[t.length-1])}G(e)})(e.target.value),S(!0)},onFocus:()=>{!M&&q&&S(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=$.trim(),o=n?K.filter(t=>e(t,n.toLowerCase())):[];1===o.length?Z(o[0].value):O()}else"Backspace"===t.key&&""===$&&o.length>0?z(o[o.length-1]):"Escape"===t.key?(S(!1),G(""),T.current?.blur()):"Tab"===t.key&&(O(),S(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),E&&q&&v(
6
- /* @__PURE__ */x("div",{ref:B,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:F?.left,right:F?.right,top:F?.top,bottom:F?.bottom,minWidth:F?.minWidth,maxWidth:F?.maxWidth??a,width:"max-content",visibility:F?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:F?.maxHeight??c},children:0===K.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?H.select.allSelected:H.select.noMatches}):K.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),Z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
1
+ import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-HCDG7EUR.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:M="",tone:E,tooltip:W,split:Y}){const[G,$]=m(!1),[H,J]=m(""),S=d(),T=h(null),B=h(null),F=h(null),I=s(T,G),K=e=>k.find(t=>t.value===e)?.label??e,P=p(()=>{const t=new Set(o),n=[],r=H.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,H]),U=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},Z=e=>{e&&!o.includes(e)?(y([...o,e]),J("")):J("")},z=e=>y(o.filter(t=>t!==e)),A=()=>{const e=H.trim();if(Y&&e)return U(e.split(Y)),void J("");j&&e?Z(e):J("")},O=h(()=>{});O.current=()=>{A(),$(!1)},f(()=>{if(!G)return;const e=e=>{const t=e.target;T.current?.contains(t)||F.current?.contains(t)||(A(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>O.current());return()=>{document.removeEventListener("mousedown",e),t()}});const R=k.length>0;/* @__PURE__ */
2
+ return g("div",{ref:T,className:"relative",children:[
3
+ /* @__PURE__ */g("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),B.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${M}`}),children:[o.map(e=>{const t=E?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
+ /* @__PURE__ */x("span",{className:"truncate",children:K(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":S.select.removeItem?.(K(e))??`${S.select.remove} ${K(e)}`,onClick:()=>z(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
+ /* @__PURE__ */x("input",{id:L,ref:B,type:"text",autoComplete:"off",role:"combobox","aria-expanded":G&&R,"aria-invalid":C||void 0,disabled:D,value:H,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(Y){const t=e.split(Y);if(t.length>1)return U(t.slice(0,-1)),void J(t[t.length-1])}J(e)})(e.target.value),$(!0)},onFocus:()=>{!D&&R&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=H.trim(),o=n?P.filter(t=>e(t,n.toLowerCase())):[];1===o.length?Z(o[0].value):A()}else"Backspace"===t.key&&""===H&&o.length>0?z(o[o.length-1]):"Escape"===t.key?($(!1),J(""),B.current?.blur()):"Tab"===t.key&&(A(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),G&&R&&v(
6
+ /* @__PURE__ */x("div",{ref:F,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:I?.left,right:I?.right,top:I?.top,bottom:I?.bottom,minWidth:I?.minWidth,maxWidth:I?.maxWidth??a,width:"max-content",visibility:I?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:I?.maxHeight??c},children:0===P.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?S.select.allSelected:S.select.noMatches}):P.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),Z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
7
7
  /* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
8
8
  /* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-OOWPLQD5.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-JSHMIMAJ.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:O=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:D="bg-white"}){const P="right"===m,W=i().sidebar,j=a(),z=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[C,I]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),S=null!=l||null!=n,M=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:C},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${S?"overflow-hidden":"overflow-y-auto"} ${O}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),S?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:C,onResize:I,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:W.resize})]}),R=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${D}`,children:u});/* @__PURE__ */
4
- return f("div",j?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:z,top:l,fallback:W.sections}),R,
6
- /* @__PURE__ */p(v,{phone:z,bottom:n,label:W.sections,closeLabel:W.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[P?null:M,R,P?M:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-UEADX2GV.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-HCDG7EUR.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:C="bg-white"}){const j="right"===m,z=i().sidebar,E=a(),O=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,R]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),W=null!=l||null!=n,I=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${W?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),W?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:P,onResize:R,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:z.resize})]}),S=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${C}`,children:u});/* @__PURE__ */
4
+ return f("div",E?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:O,top:l,fallback:z.sections}),S,
6
+ /* @__PURE__ */p(v,{phone:O,bottom:n,label:z.sections,closeLabel:z.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[j?null:I,S,j?I:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,6 +1,6 @@
1
- import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-ENFXDIIZ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-JSHMIMAJ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:M,emptyLabel:F,radius:N=3}){const A=o().charts,I=n(),O=w??(e=>h(e,I)),V=L??A.range,W=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),C=r(0,j,v);/* @__PURE__ */
2
- return s(l,{labels:d,values:W,height:k,width:g,max:b,min:x,formatValue:O,yAxisLabel:y,className:M,emptyLabel:F,bandPadding:"bar"===p?.34:0,ariaLabel:A.rangeLabel(V,d.length),tooltip:e=>/* @__PURE__ */s(t,{title:d[e],rows:[{key:"high",label:A.high,color:C,value:null==u[e]?void 0:O(u[e].high)},{key:"low",label:A.low,color:C,value:null==u[e]?void 0:O(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:C,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
1
+ import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-7IGWU6DK.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-HCDG7EUR.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:M,emptyLabel:W,radius:C=3}){const F=o().charts,N=n(),O=w??(e=>h(e,N)),U=L??F.range,V=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),A=r(0,j,v);/* @__PURE__ */
2
+ return s(l,{labels:d,values:V,height:k,width:g,max:b,min:x,formatValue:O,yAxisLabel:y,className:M,emptyLabel:W,bandPadding:"bar"===p?.34:0,ariaLabel:F.rangeLabel(U,d.length),tooltip:e=>/* @__PURE__ */s(t,{title:d[e],rows:[{key:"high",label:F.high,color:A,value:null==u[e]?void 0:O(u[e].high)},{key:"low",label:F.low,color:A,value:null==u[e]?void 0:O(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:C,fill:A,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
3
3
  return m(c,{children:[
4
- /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:C,fillOpacity:.2,stroke:"none"}),
5
- /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round"}),
6
- /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
4
+ /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:A,fillOpacity:.2,stroke:"none"}),
5
+ /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:A,strokeWidth:2,strokeLinejoin:"round"}),
6
+ /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:A,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
@@ -1,11 +1,11 @@
1
- import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-JSHMIMAJ.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
- return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:M,className:$=""}){const j=r().meter,A=s(),B=w??j.noData,F=null!=p&&Number.isFinite(p)?p:null,S=Number.isFinite(f)&&f>0?f:null;null==S&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const C=e(v,"MetricBar"),D=null!=F?C??t(l(F,g,b)):null,E=n(g),G=n(b),H=null!=F&&null!=S?x(F/S*100):0,J=null!=F?(y??(a=>100===S?u(a,1,A):m(a,A)))(F):"—",L=null!=F&&null!=S&&(null!=E||null!=G),P="md"===k||"lg"===k,R=P?"h-2":"h-1.5",z=null!=F&&null!=S,I=/* @__PURE__ */c("div",{...z?{role:"meter","aria-label":M??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":S,"aria-valuenow":Math.min(S,Math.max(0,F)),"aria-valuetext":J}:{"aria-hidden":!0},className:z&&D?`relative mt-2 ${R} rounded-full bg-gray-200`:`relative mt-2 ${R} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[z&&
3
- /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${D?D.fill:"bg-gray-400"}`,style:{width:`${H}%`}}),L&&null!=S&&null!=E&&/* @__PURE__ */o(d,{at:x(E/S*100),title:j.warningAt(E),className:i.warning}),L&&null!=S&&null!=G&&/* @__PURE__ */o(d,{at:x(G/S*100),title:j.criticalAt(G),className:i.critical})]}),O=D?D.ink:null!=F?"text-gray-900":"text-gray-400";if(P){const a="lg"===k;/* @__PURE__ */
4
- return c("div",{className:$,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
1
+ import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-HCDG7EUR.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
+ return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),A=w??j.noData,C=null!=p&&Number.isFinite(p)?p:null,D=Number.isFinite(f)&&f>0?f:null;null==D&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const E=e(v,"MetricBar"),F=null!=C?E??t(l(C,g,b)):null,G=n(g),R=n(b),H=null!=C&&null!=D?x(C/D*100):0,L=null!=C?(y??(a=>100===D?u(a,1,B):m(a,B)))(C):"—",P=null!=C&&null!=D&&(null!=G||null!=R),S="md"===k||"lg"===k,U=S?"h-2":"h-1.5",z=null!=C&&null!=D,O=/* @__PURE__ */c("div",{...z?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":D,"aria-valuenow":Math.min(D,Math.max(0,C)),"aria-valuetext":L}:{"aria-hidden":!0},className:z&&F?`relative mt-2 ${U} rounded-full bg-gray-200`:`relative mt-2 ${U} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[z&&
3
+ /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${F?F.fill:"bg-gray-400"}`,style:{width:`${H}%`}}),P&&null!=D&&null!=G&&/* @__PURE__ */o(d,{at:x(G/D*100),title:j.warningAt(G),className:i.warning}),P&&null!=D&&null!=R&&/* @__PURE__ */o(d,{at:x(R/D*100),title:j.criticalAt(R),className:i.critical})]}),Q=F?F.ink:null!=C?"text-gray-900":"text-gray-400";if(S){const a="lg"===k;/* @__PURE__ */
4
+ return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
5
5
  /* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
6
- /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${O}`,children:J}),
7
- /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=F?N:B})]}),I]})}/* @__PURE__ */
8
- return c("div",{className:$,children:[
6
+ /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${Q}`,children:L}),
7
+ /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=C?N:A})]}),O]})}/* @__PURE__ */
8
+ return c("div",{className:M,children:[
9
9
  /* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
10
- /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${O}`,children:J}),
11
- /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=F?N:B})]}),I]})}export{h as MetricBar};
10
+ /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${Q}`,children:L}),
11
+ /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=C?N:A})]}),O]})}export{h as MetricBar};
@@ -0,0 +1,8 @@
1
+ import{AccessibleTable as t}from"./chunk-HY6CBG4M.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-HCDG7EUR.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,C]=c(null),{highlighted:E}=o(),F=h(u,f,x,$.other),{labels:I,matrix:z,otherIndex:A,foldedCount:H}=F,Q=(t,e)=>z[t]?.[e]??0,L=t=>t===A?r.muted:a(t),O=F.totals,R=I.map((t,e)=>e).sort((t,e)=>O[e]-O[t]),U=R.reduce((t,e)=>t+O[e],0);if(U<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const V=p/2,W=p/2,Y=p/2-44,B=Y-b,D=g*R.length,G=/* @__PURE__ */new Map;let P=-Math.PI/2;R.forEach((t,e)=>{const o=O[t]/U*(2*Math.PI-D);G.set(t,{start:P,end:P+o,slot:e}),P+=o+g});const T=/* @__PURE__ */new Map,S=[];for(const t of R)for(const e of R){const o=Q(t,e);if(o<=0)continue;const n=G.get(t),r=o/Math.max(1,O[t])*(n.end-n.start),a=T.get(t)??0;T.set(t,a+r),S.push({from:t,to:e,value:o,a:n.start+a+r/2,b:G.get(e).start+(G.get(e).end-G.get(e).start)/2})}const Z=(t,e)=>[V+e*Math.cos(t),W+e*Math.sin(t)],q="arc"===y?.kind?y.index:void 0,J="ribbon"===y?.kind?S[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(R.length),onMouseLeave:()=>C(null),children:[S.map((t,e)=>{const[o,n]=Z(t.a,B),[r,a]=Z(t.b,B),l=L(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==E?I[t.from]===E||I[t.to]===E:null)(t,e);/* @__PURE__ */
4
+ return d("path",{d:`M${o},${n} Q${V},${W} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/U*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>C({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),R.map(t=>{const o=G.get(t),n=(o.start+o.end)/2,[a,l]=Z(n,Y+16),i=(t=>y?"arc"===y.kind?y.index===t:S[y.index].from===t||S[y.index].to===t:null!==E?I[t]===E:null)(t);/* @__PURE__ */
5
+ return m("g",{onMouseEnter:()=>C({kind:"arc",index:t}),children:[
6
+ /* @__PURE__ */d("path",{d:e(V,W,B,Y,o.start,o.end),fill:L(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:I[t]})]},t)})]}),H>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(H)}),void 0!==q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[q],rows:[{key:"total",label:$.totalFlow,color:L(q),value:N(O[q])}]})}),J&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[J.from]} → ${I[J.to]}`,rows:[{key:"value",label:$.flow,color:L(J.from),value:N(J.value)}]})}),
8
+ /* @__PURE__ */d(t,{caption:$.chord(R.length),head:[$.tableFrom,$.tableTo,$.value],rows:S.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
@@ -1,2 +1,2 @@
1
- import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-JSHMIMAJ.js";import{jsx as o}from"react/jsx-runtime";function i(){const i=r().loading;/* @__PURE__ */
1
+ import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-HCDG7EUR.js";import{jsx as o}from"react/jsx-runtime";function i(){const i=r().loading;/* @__PURE__ */
2
2
  return o(n,{size:"sm",padding:"p-8",label:i.label})}export{i as LoadingSpinner};
@@ -1,4 +1,4 @@
1
- import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{jsxs as n,Fragment as l,jsx as o}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:a,isFetchingMore:s,extra:u,extraAfter:h}){const m=t().list,f=i??d,p=d>=f,x=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
- return n(l,{children:[u,x?`${x} — `:"",p?null!=i?m.allLoaded(f,a):m.count(f,a):m.loadedOf(d,f,a),(M=h,null!=M&&!1!==M&&!0!==M&&""!==M?/* @__PURE__ */n(l,{children:[" · ",h]}):""),s?/* @__PURE__ */n(l,{children:[" · ",
1
+ import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-HCDG7EUR.js";import{jsxs as n,Fragment as l,jsx as o}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:a,isFetchingMore:s,extra:u,extraAfter:h}){const m=t().list,f=i??d,p=d>=f,x=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
+ return n(l,{children:[u,x?`${x} — `:"",p?null!=i?m.allLoaded(f,a):m.count(f,a):m.loadedOf(d,f,a),(C=h,null!=C&&!1!==C&&!0!==C&&""!==C?/* @__PURE__ */n(l,{children:[" · ",h]}):""),s?/* @__PURE__ */n(l,{children:[" · ",
3
3
  /* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
4
- /* @__PURE__ */o(e,{}),m.loadingMore]})]}):""]});var M}export{r as ListFooter};
4
+ /* @__PURE__ */o(e,{}),m.loadingMore]})]}):""]});var C}export{r as ListFooter};
@@ -0,0 +1,19 @@
1
+ import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as k}from"./chunk-HCDG7EUR.js";import{forwardRef as N,useId as w,useState as D,useRef as $,useMemo as j,useCallback as S,useEffect as H}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as E,Fragment as I}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,D=k(),$=d(),j=f??$,S=w(),H=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:i}),
2
+ /* @__PURE__ */E(R,{items:r})]});return j?/* @__PURE__ */C(I,{children:[H,
3
+ /* @__PURE__ */E("span",{id:S,hidden:!0,children:D.settingView.auto})]}):H});function R({items:e}){const t=e=>/* @__PURE__ */E("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
4
+ return E(I,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */E("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:A="",id:K,disabled:P,size:V,touchSize:B,title:Y,multiple:M,renderOption:W,renderValue:F,valueText:G,readOnly:L=!1,footer:J,changed:q=!1,auto:X,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=D(!1),[ne,ae]=D(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!J?.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=p(me),[fe,be]=D(null),ge=k(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=K??`${ke}-trigger`,De=e=>`${ke}-opt-${e}`,$e=`${ke}-changed`,je=d(),Se=X??je,He=`${ke}-auto`,Te=[Q,q?$e:void 0,Se?He:void 0].filter(Boolean).join(" ")||void 0,Ce=j(()=>n(N),[N]),Ee=M?l:[],Ie=u,Oe=f(oe,re,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Oe?.top}|${Oe?.bottom}|${Oe?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Re=M?Ce.findIndex(e=>Ee.includes(e.value)):Ce.findIndex(e=>e.value===l),Ue=M?Ce.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Re>=0?Ce[Re].label:void 0,Ae=!M&&Re>=0?Ce[Re].lang:void 0,Ke=M?Ce.filter(e=>Ee.includes(e.value)):Re>=0?[Ce[Re]]:[],Pe=F&&Ke.length?F(Ke):void 0,Ve=void 0!==Pe&&G?G(Ke):void 0,Be=S((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Ye=S(()=>{P||L||(ae(Re>=0?Re:e(Ce)),ie(!0))},[P,L,Ce,Re]),Me=S(e=>{const t=Ce[e];if(t&&!t.disabled){if(M){const r=l;return Ie(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ie(t.value),Be()}},[Ce,M,l,Ie,Be]);H(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Be(),!0),ue)},[re,Be]),H(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Be(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Be(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Be]),H(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape(De(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const We=S(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Re,n=t(Ce,r.buffer,i);n<0||(re?ae(n):M?(ae(n),ie(!0)):Me(n))},[re,ne,Re,Ce,Me,M]),Fe=re?a(N,(e,t)=>{const r=(i=e.value,M?Ee.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
5
+ return C("div",{id:De(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:()=>Me(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${M?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[M&&/* @__PURE__ */E(o,{selected:r}),W?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:n})}):M?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
6
+ /* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
7
+ /* @__PURE__ */C(I,{children:[
8
+ /* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Ge=void 0!==Pe?
9
+ /* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
10
+ /* @__PURE__ */E("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Pe}),
11
+ /* @__PURE__ */E("span",{lang:void 0===Ve?Ae:void 0,className:"sr-only",children:Ve??Ue})]}):/* @__PURE__ */E("span",{lang:Ae,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Le={zIndex:h.popup,left:Oe?.left,top:Oe?.top,bottom:Oe?.bottom,width:Oe?.width,maxHeight:Oe?.maxHeight??b,visibility:Oe?void 0:"hidden",...x()},Je=/* @__PURE__ */E("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":M||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?{...Le,maxHeight:fe}:Le,children:Fe}),qe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Le,children:[Je,
12
+ /* @__PURE__ */E("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Be(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Be());case"Escape":return e.preventDefault(),e.stopPropagation(),void Be()}})(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__ */E(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
13
+ /* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
14
+ return C("div",{ref:le,className:"relative",children:[
15
+ /* @__PURE__ */E("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?De(ne):void 0,"aria-invalid":U||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:Y,disabled:P,"aria-readonly":L||void 0,onClick:()=>re?Be():Ye(),onKeyDown:t=>{if(!P&&!L)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ce,e,1)):Ye());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ce,e,-1)):Ye());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),Me(ne)));case" ":return t.preventDefault(),void(re?Me(ne):Ye());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Be()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Be(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),We(t.key))}},className:s({invalid:U,size:V,readOnly:L,auto:Se,className:`${L?"":"pr-8 "}text-left ${A}`.trim()}),children:q?
16
+ /* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Ge,
17
+ /* @__PURE__ */E("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ge}),q&&/* @__PURE__ */E("span",{id:$e,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */E("span",{id:He,hidden:!0,children:ge.settingView.auto}),!L&&/* @__PURE__ */E(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
18
+ /* @__PURE__ */C("select",{ref:te,value:l,multiple:M||void 0,onChange:e=>Ie(M?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:P,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!M&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:z}),
19
+ /* @__PURE__ */E(R,{items:N})]}),re&&T(qe,document.body)]})}),A=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */E(z,{ref:r,...t,size:n}):/* @__PURE__ */E(U,{ref:r,...t}):/* @__PURE__ */E(U,{ref:r,...t,size:n})});export{z as NativeSelect,A as Select_default};
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-HCDG7EUR.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
2
2
  return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
@@ -1,15 +1,15 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-CMJD5URC.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-JSHMIMAJ.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const S=t.map(e=>a(e.date)).filter(e=>null!=e),x=l(Date.now,null)??Math.max(0,...S,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),C=S.length?Math.min(...S):x,D=S.length?Math.max(...S):x,P=a(r??null)??C,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,D,q,P+i];return O||e.push(x),Math.max(...e)})(),I=Math.max(1,Math.round((T-P)/i)),A=a(p??null)??D??P,L=Math.min(Math.max(y??A,P),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(P).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),J=j??F,z=j?a(j.date):F?P:null,H=$?a($.date):null,B=!!(J&&$&&null!=z&&null!=H&&L>z&&L<H);let E,G;if(B&&null!=z&&null!=H){const e=(L-z)/Math.max(H-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of J?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(J?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):J?.est_completion_date||$?.est_completion_date||null,E={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},G=J}else if(E=J??t[t.length-1]??null,E){const e=t.findIndex(e=>e.id===E.id);G=e>=0&&e<t.length-1?t[e+1]:null}else G=null;const K={};for(const e of G?.items??[])K[e.part_number]=e;const Q=!(!d||E?.id===d),U=d?Math.min(a(p??null)??T,T):T,V=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:P,endMs:T,totalLeadDays:I,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:Q,beforeAnchor:J,nextAfter:$,displayed:E,prevReport:G,prevByPN:K,isInterpolated:B,playing:v,startPlay:()=>{if(v)return void N();if(U<=P)return void f(U);M(!0),f(P);let e=performance.now(),t=P;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=U)return f(U),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:V,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),S=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),x=new Map(N.map(({report:e,ms:t})=>[e.id,t])),C=N.map(({ms:e})=>e),D=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
- return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:D,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=x.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:C,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:S,variant:x="card",onPlayStart:C}){const{reports:D,markers:P,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:I,setScrubMs:A,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:J,estCompletionMs:z}=n,H=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),A,C),B=c().production,E=d(),G=_??B.heading,K=e=>o(e,E);if(0===D.length&&0===P.length)return null;const Q=P.filter(e=>"shipment"===e.kind),U=P.filter(e=>"inspection"===e.kind),V=P.filter(e=>"invoice"===e.kind),Z=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),W=L?v(L):0,X=D.find(e=>e.id===F),Y=X?N(X):J,ee=
3
- /* @__PURE__ */h("button",{type:"button",onClick:H.toggle,"aria-pressed":H.playing,title:H.playing?B.pause:B.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[H.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
- /* @__PURE__ */b("span",{children:H.playing?B.pause:B.play})]}),te=j&&(S??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{H.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??B.backTo(String(Y))}):null,[re,ne]=p(B.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
5
- /* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
6
- /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",K(new Date(L.date).getTime())," · ",B.overall(Math.round(W))," · ",B.inStock(Z)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:B.noReport})});if("rail"===x){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:B.estimatedCompletion,dateText:K(z)}:null;/* @__PURE__ */
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-WCJR2GNH.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-HCDG7EUR.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const S=t.map(e=>a(e.date)).filter(e=>null!=e),x=l(Date.now,null)??Math.max(0,...S,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),C=S.length?Math.min(...S):x,D=S.length?Math.max(...S):x,P=a(r??null)??C,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,D,q,P+i];return O||e.push(x),Math.max(...e)})(),I=Math.max(1,Math.round((T-P)/i)),L=a(p??null)??D??P,A=Math.min(Math.max(y??L,P),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=A})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>A){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(P).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),G=j??F,H=j?a(j.date):F?P:null,J=$?a($.date):null,z=!!(G&&$&&null!=H&&null!=J&&A>H&&A<J);let E,B;if(z&&null!=H&&null!=J){const e=(A-H)/Math.max(J-H,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of G?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(G?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):G?.est_completion_date||$?.est_completion_date||null,E={id:`interp-${A}`,progress_number:_.estimated,date:new Date(A).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},B=G}else if(E=G??t[t.length-1]??null,E){const e=t.findIndex(e=>e.id===E.id);B=e>=0&&e<t.length-1?t[e+1]:null}else B=null;const K={};for(const e of B?.items??[])K[e.part_number]=e;const Q=!(!d||E?.id===d),U=d?Math.min(a(p??null)??T,T):T,V=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:P,endMs:T,totalLeadDays:I,scrubMs:A,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:Q,beforeAnchor:G,nextAfter:$,displayed:E,prevReport:B,prevByPN:K,isInterpolated:z,playing:v,startPlay:()=>{if(v)return void N();if(U<=P)return void f(U);M(!0),f(P);let e=performance.now(),t=P;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=U)return f(U),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:V,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),S=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),x=new Map(N.map(({report:e,ms:t})=>[e.id,t])),C=N.map(({ms:e})=>e),D=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
+ return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:D,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=x.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:C,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:S,variant:x="card",onPlayStart:C}){const{reports:D,markers:P,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:I,setScrubMs:L,displayed:A,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:G,estCompletionMs:H}=n,J=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),L,C),z=c().production,E=d(),B=_??z.heading,K=e=>o(e,E);if(0===D.length&&0===P.length)return null;const Q=P.filter(e=>"shipment"===e.kind),U=P.filter(e=>"inspection"===e.kind),V=P.filter(e=>"invoice"===e.kind),W=(A?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Z=A?v(A):0,X=D.find(e=>e.id===F),Y=X?N(X):G,ee=
3
+ /* @__PURE__ */h("button",{type:"button",onClick:J.toggle,"aria-pressed":J.playing,title:J.playing?z.pause:z.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[J.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
+ /* @__PURE__ */b("span",{children:J.playing?z.pause:z.play})]}),te=j&&(S??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{J.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??z.backTo(String(Y))}):null,[re,ne]=p(z.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:A?/* @__PURE__ */h(y,{children:[e&&re,
5
+ /* @__PURE__ */b("b",{className:"font-medium",children:N(A)}),e&&ne,
6
+ /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",K(new Date(A.date).getTime())," · ",z.overall(Math.round(Z))," · ",z.inStock(W)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:z.noReport})});if("rail"===x){const e=null!=H&&H>=q&&q>O,t=e?{key:"__estimate__",label:z.estimatedCompletion,dateText:K(H)}:null;/* @__PURE__ */
7
7
  return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
8
- /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:D,markers:P,valueMs:I,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??B.start,end:M?.end??(e?B.estDone:void 0)},onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:H.stop}}),
8
+ /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:D,markers:P,valueMs:I,activeId:A?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??z.start,end:M?.end??(e?z.estDone:void 0)},onDragStart:J.stop,playback:{playing:J.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:J.stop}}),
9
9
  /* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
10
- return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:G,subject:R,meta:[`${K(O)} → ${K(q)}`,B.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
10
+ return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:B,subject:R,meta:[`${K(O)} → ${K(q)}`,z.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
11
  /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[D.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),B.report]}),Q.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),B.shipment]}),U.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),B.inspection]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),B.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:D,markers:P,valueMs:I,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:H.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
12
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),z.report]}),Q.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),z.shipment]}),U.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),z.inspection]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),z.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:D,markers:P,valueMs:I,activeId:A?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:J.stop,playback:{playing:J.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:J.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
@@ -1,11 +1,11 @@
1
- import{MediaUploadField as e}from"./chunk-K5PDLRYH.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,R]=l(null),[U,H]=l(""),[I,A]=l(""),[C,F]=l(!1),[E,O]=l(!1),P=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),S=t().brandAsset,B=U||d||g||"",D=L?null:d?o:h,G=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const J=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
2
- return n("section",{"aria-label":S.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
1
+ import{MediaUploadField as e}from"./chunk-FEWWCWKV.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useShellStrings as t}from"./chunk-HCDG7EUR.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,C]=l(""),[E,F]=l(""),[H,I]=l(!1),[A,G]=l(!1),O=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),W=t().brandAsset,B=R||d||g||"",D=L?null:d?o:h,P=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const S=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
2
+ return n("section",{"aria-label":W.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
3
3
  /* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
4
- /* @__PURE__ */c(e,{value:B,onChange:()=>{},onFile:e=>{if(k)return;J();const r=URL.createObjectURL(e);j.current=r,R(e),H(r),A("")},label:p,hint:I||S.usedFor(b),error:I||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:C||E,disabled:k}),
4
+ /* @__PURE__ */c(e,{value:B,onChange:()=>{},onFile:e=>{if(k)return;S();const r=URL.createObjectURL(e);j.current=r,U(e),C(r),F("")},label:p,hint:E||W.usedFor(b),error:E||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:H||A,disabled:k}),
5
5
  /* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
6
- /* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!C){F(!0),A("");try{await x(L),J(),R(null),H("")}catch(e){A(e instanceof Error?e.message:S.saveFailed(P,p))}finally{F(!1)}}},disabled:!L||k,loading:C,children:S.save(P,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!E){if(L)return J(),R(null),H(""),void A("");if(d){O(!0),A("");try{await f()}catch(e){A(e instanceof Error?e.message:S.removeFailed(P,p))}finally{O(!1)}}}},disabled:k,loading:E,children:L?S.discard:S.remove(P,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":S.previews(p),children:[
7
- /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:S.preview}),
8
- /* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:B,alt:S.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:D,isLight:G,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
6
+ /* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!H){I(!0),F("");try{await x(L),S(),U(null),C("")}catch(e){F(e instanceof Error?e.message:W.saveFailed(O,p))}finally{I(!1)}}},disabled:!L||k,loading:H,children:W.save(O,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!A){if(L)return S(),U(null),C(""),void F("");if(d){G(!0),F("");try{await f()}catch(e){F(e instanceof Error?e.message:W.removeFailed(O,p))}finally{G(!1)}}}},disabled:k,loading:A,children:L?W.discard:W.remove(O,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":W.previews(p),children:[
7
+ /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:W.preview}),
8
+ /* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:B,alt:W.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:D,isLight:P,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
9
9
  return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
10
10
  /* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
11
11
  /* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
@@ -1,4 +1,4 @@
1
- import{ErrorPage as r}from"./chunk-75H4BWNC.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
1
+ import{ErrorPage as r}from"./chunk-VEF3STCH.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-HCDG7EUR.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
2
2
  return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
3
3
  /* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
4
4
  /* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[